@aws-sdk/client-snow-device-management 3.474.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,34 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ListTasksCommand = exports.de_ListTagsForResourceCommand = exports.de_ListExecutionsCommand = exports.de_ListDevicesCommand = exports.de_ListDeviceResourcesCommand = exports.de_DescribeTaskCommand = exports.de_DescribeExecutionCommand = exports.de_DescribeDeviceEc2InstancesCommand = exports.de_DescribeDeviceCommand = exports.de_CreateTaskCommand = exports.de_CancelTaskCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ListTasksCommand = exports.se_ListTagsForResourceCommand = exports.se_ListExecutionsCommand = exports.se_ListDevicesCommand = exports.se_ListDeviceResourcesCommand = exports.se_DescribeTaskCommand = exports.se_DescribeExecutionCommand = exports.se_DescribeDeviceEc2InstancesCommand = exports.se_DescribeDeviceCommand = exports.se_CreateTaskCommand = exports.se_CancelTaskCommand = void 0;
4
- const protocol_http_1 = require("@smithy/protocol-http");
4
+ const core_1 = require("@smithy/core");
5
5
  const smithy_client_1 = require("@smithy/smithy-client");
6
6
  const uuid_1 = require("uuid");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const SnowDeviceManagementServiceException_1 = require("../models/SnowDeviceManagementServiceException");
9
9
  const se_CancelTaskCommand = async (input, context) => {
10
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
10
+ const b = (0, core_1.requestBuilder)(input, context);
11
11
  const headers = {};
12
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task/{taskId}/cancel";
13
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "taskId", () => input.taskId, "{taskId}", false);
12
+ b.bp("/task/{taskId}/cancel");
13
+ b.p("taskId", () => input.taskId, "{taskId}", false);
14
14
  let body;
15
- return new protocol_http_1.HttpRequest({
16
- protocol,
17
- hostname,
18
- port,
19
- method: "POST",
20
- headers,
21
- path: resolvedPath,
22
- body,
23
- });
15
+ b.m("POST").h(headers).b(body);
16
+ return b.build();
24
17
  };
25
18
  exports.se_CancelTaskCommand = se_CancelTaskCommand;
26
19
  const se_CreateTaskCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = (0, core_1.requestBuilder)(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task";
24
+ b.bp("/task");
32
25
  let body;
33
26
  body = JSON.stringify((0, smithy_client_1.take)(input, {
34
27
  clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
@@ -37,246 +30,153 @@ const se_CreateTaskCommand = async (input, context) => {
37
30
  tags: (_) => (0, smithy_client_1._json)(_),
38
31
  targets: (_) => (0, smithy_client_1._json)(_),
39
32
  }));
40
- return new protocol_http_1.HttpRequest({
41
- protocol,
42
- hostname,
43
- port,
44
- method: "POST",
45
- headers,
46
- path: resolvedPath,
47
- body,
48
- });
33
+ b.m("POST").h(headers).b(body);
34
+ return b.build();
49
35
  };
50
36
  exports.se_CreateTaskCommand = se_CreateTaskCommand;
51
37
  const se_DescribeDeviceCommand = async (input, context) => {
52
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
38
+ const b = (0, core_1.requestBuilder)(input, context);
53
39
  const headers = {};
54
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
55
- "/managed-device/{managedDeviceId}/describe";
56
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
40
+ b.bp("/managed-device/{managedDeviceId}/describe");
41
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
57
42
  let body;
58
- return new protocol_http_1.HttpRequest({
59
- protocol,
60
- hostname,
61
- port,
62
- method: "POST",
63
- headers,
64
- path: resolvedPath,
65
- body,
66
- });
43
+ b.m("POST").h(headers).b(body);
44
+ return b.build();
67
45
  };
68
46
  exports.se_DescribeDeviceCommand = se_DescribeDeviceCommand;
69
47
  const se_DescribeDeviceEc2InstancesCommand = async (input, context) => {
70
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
48
+ const b = (0, core_1.requestBuilder)(input, context);
71
49
  const headers = {
72
50
  "content-type": "application/json",
73
51
  };
74
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
75
- "/managed-device/{managedDeviceId}/resources/ec2/describe";
76
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
52
+ b.bp("/managed-device/{managedDeviceId}/resources/ec2/describe");
53
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
77
54
  let body;
78
55
  body = JSON.stringify((0, smithy_client_1.take)(input, {
79
56
  instanceIds: (_) => (0, smithy_client_1._json)(_),
80
57
  }));
81
- return new protocol_http_1.HttpRequest({
82
- protocol,
83
- hostname,
84
- port,
85
- method: "POST",
86
- headers,
87
- path: resolvedPath,
88
- body,
89
- });
58
+ b.m("POST").h(headers).b(body);
59
+ return b.build();
90
60
  };
91
61
  exports.se_DescribeDeviceEc2InstancesCommand = se_DescribeDeviceEc2InstancesCommand;
92
62
  const se_DescribeExecutionCommand = async (input, context) => {
93
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
63
+ const b = (0, core_1.requestBuilder)(input, context);
94
64
  const headers = {};
95
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
96
- "/task/{taskId}/execution/{managedDeviceId}";
97
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "taskId", () => input.taskId, "{taskId}", false);
98
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
65
+ b.bp("/task/{taskId}/execution/{managedDeviceId}");
66
+ b.p("taskId", () => input.taskId, "{taskId}", false);
67
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
99
68
  let body;
100
- return new protocol_http_1.HttpRequest({
101
- protocol,
102
- hostname,
103
- port,
104
- method: "POST",
105
- headers,
106
- path: resolvedPath,
107
- body,
108
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
109
71
  };
110
72
  exports.se_DescribeExecutionCommand = se_DescribeExecutionCommand;
111
73
  const se_DescribeTaskCommand = async (input, context) => {
112
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
74
+ const b = (0, core_1.requestBuilder)(input, context);
113
75
  const headers = {};
114
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task/{taskId}";
115
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "taskId", () => input.taskId, "{taskId}", false);
76
+ b.bp("/task/{taskId}");
77
+ b.p("taskId", () => input.taskId, "{taskId}", false);
116
78
  let body;
117
- return new protocol_http_1.HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "POST",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
79
+ b.m("POST").h(headers).b(body);
80
+ return b.build();
126
81
  };
127
82
  exports.se_DescribeTaskCommand = se_DescribeTaskCommand;
128
83
  const se_ListDeviceResourcesCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
84
+ const b = (0, core_1.requestBuilder)(input, context);
130
85
  const headers = {};
131
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
132
- "/managed-device/{managedDeviceId}/resources";
133
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
86
+ b.bp("/managed-device/{managedDeviceId}/resources");
87
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
134
88
  const query = (0, smithy_client_1.map)({
135
- type: [, input.type],
136
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
137
- nextToken: [, input.nextToken],
89
+ [_t]: [, input[_t]],
90
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
91
+ [_nT]: [, input[_nT]],
138
92
  });
139
93
  let body;
140
- return new protocol_http_1.HttpRequest({
141
- protocol,
142
- hostname,
143
- port,
144
- method: "GET",
145
- headers,
146
- path: resolvedPath,
147
- query,
148
- body,
149
- });
94
+ b.m("GET").h(headers).q(query).b(body);
95
+ return b.build();
150
96
  };
151
97
  exports.se_ListDeviceResourcesCommand = se_ListDeviceResourcesCommand;
152
98
  const se_ListDevicesCommand = async (input, context) => {
153
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = (0, core_1.requestBuilder)(input, context);
154
100
  const headers = {};
155
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/managed-devices";
101
+ b.bp("/managed-devices");
156
102
  const query = (0, smithy_client_1.map)({
157
- jobId: [, input.jobId],
158
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
159
- nextToken: [, input.nextToken],
103
+ [_jI]: [, input[_jI]],
104
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
105
+ [_nT]: [, input[_nT]],
160
106
  });
161
107
  let body;
162
- return new protocol_http_1.HttpRequest({
163
- protocol,
164
- hostname,
165
- port,
166
- method: "GET",
167
- headers,
168
- path: resolvedPath,
169
- query,
170
- body,
171
- });
108
+ b.m("GET").h(headers).q(query).b(body);
109
+ return b.build();
172
110
  };
173
111
  exports.se_ListDevicesCommand = se_ListDevicesCommand;
174
112
  const se_ListExecutionsCommand = async (input, context) => {
175
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
113
+ const b = (0, core_1.requestBuilder)(input, context);
176
114
  const headers = {};
177
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/executions";
115
+ b.bp("/executions");
178
116
  const query = (0, smithy_client_1.map)({
179
- taskId: [, (0, smithy_client_1.expectNonNull)(input.taskId, `taskId`)],
180
- state: [, input.state],
181
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
182
- nextToken: [, input.nextToken],
117
+ [_tI]: [, (0, smithy_client_1.expectNonNull)(input[_tI], `taskId`)],
118
+ [_s]: [, input[_s]],
119
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
120
+ [_nT]: [, input[_nT]],
183
121
  });
184
122
  let body;
185
- return new protocol_http_1.HttpRequest({
186
- protocol,
187
- hostname,
188
- port,
189
- method: "GET",
190
- headers,
191
- path: resolvedPath,
192
- query,
193
- body,
194
- });
123
+ b.m("GET").h(headers).q(query).b(body);
124
+ return b.build();
195
125
  };
196
126
  exports.se_ListExecutionsCommand = se_ListExecutionsCommand;
197
127
  const se_ListTagsForResourceCommand = async (input, context) => {
198
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
128
+ const b = (0, core_1.requestBuilder)(input, context);
199
129
  const headers = {};
200
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
201
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
130
+ b.bp("/tags/{resourceArn}");
131
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
202
132
  let body;
203
- return new protocol_http_1.HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "GET",
208
- headers,
209
- path: resolvedPath,
210
- body,
211
- });
133
+ b.m("GET").h(headers).b(body);
134
+ return b.build();
212
135
  };
213
136
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
214
137
  const se_ListTasksCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = (0, core_1.requestBuilder)(input, context);
216
139
  const headers = {};
217
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tasks";
140
+ b.bp("/tasks");
218
141
  const query = (0, smithy_client_1.map)({
219
- state: [, input.state],
220
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
221
- nextToken: [, input.nextToken],
142
+ [_s]: [, input[_s]],
143
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
144
+ [_nT]: [, input[_nT]],
222
145
  });
223
146
  let body;
224
- return new protocol_http_1.HttpRequest({
225
- protocol,
226
- hostname,
227
- port,
228
- method: "GET",
229
- headers,
230
- path: resolvedPath,
231
- query,
232
- body,
233
- });
147
+ b.m("GET").h(headers).q(query).b(body);
148
+ return b.build();
234
149
  };
235
150
  exports.se_ListTasksCommand = se_ListTasksCommand;
236
151
  const se_TagResourceCommand = async (input, context) => {
237
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_1.requestBuilder)(input, context);
238
153
  const headers = {
239
154
  "content-type": "application/json",
240
155
  };
241
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
242
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
156
+ b.bp("/tags/{resourceArn}");
157
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
243
158
  let body;
244
159
  body = JSON.stringify((0, smithy_client_1.take)(input, {
245
160
  tags: (_) => (0, smithy_client_1._json)(_),
246
161
  }));
247
- return new protocol_http_1.HttpRequest({
248
- protocol,
249
- hostname,
250
- port,
251
- method: "POST",
252
- headers,
253
- path: resolvedPath,
254
- body,
255
- });
162
+ b.m("POST").h(headers).b(body);
163
+ return b.build();
256
164
  };
257
165
  exports.se_TagResourceCommand = se_TagResourceCommand;
258
166
  const se_UntagResourceCommand = async (input, context) => {
259
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
167
+ const b = (0, core_1.requestBuilder)(input, context);
260
168
  const headers = {};
261
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
262
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
169
+ b.bp("/tags/{resourceArn}");
170
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
263
171
  const query = (0, smithy_client_1.map)({
264
- tagKeys: [
172
+ [_tK]: [
265
173
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
266
- () => (input.tagKeys || []).map((_entry) => _entry),
174
+ () => (input[_tK] || []).map((_entry) => _entry),
267
175
  ],
268
176
  });
269
177
  let body;
270
- return new protocol_http_1.HttpRequest({
271
- protocol,
272
- hostname,
273
- port,
274
- method: "DELETE",
275
- headers,
276
- path: resolvedPath,
277
- query,
278
- body,
279
- });
178
+ b.m("DELETE").h(headers).q(query).b(body);
179
+ return b.build();
280
180
  };
281
181
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
282
182
  const de_CancelTaskCommand = async (output, context) => {
@@ -1020,6 +920,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1020
920
  value !== "" &&
1021
921
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1022
922
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
923
+ const _jI = "jobId";
924
+ const _mR = "maxResults";
925
+ const _nT = "nextToken";
926
+ const _s = "state";
927
+ const _t = "type";
928
+ const _tI = "taskId";
929
+ const _tK = "tagKeys";
1023
930
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1024
931
  if (encoded.length) {
1025
932
  return JSON.parse(encoded);
@@ -1,30 +1,23 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ServiceQuotaExceededException, ThrottlingException, ValidationException, } from "../models/models_0";
5
5
  import { SnowDeviceManagementServiceException as __BaseException } from "../models/SnowDeviceManagementServiceException";
6
6
  export const se_CancelTaskCommand = async (input, context) => {
7
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
+ const b = rb(input, context);
8
8
  const headers = {};
9
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task/{taskId}/cancel";
10
- resolvedPath = __resolvedPath(resolvedPath, input, "taskId", () => input.taskId, "{taskId}", false);
9
+ b.bp("/task/{taskId}/cancel");
10
+ b.p("taskId", () => input.taskId, "{taskId}", false);
11
11
  let body;
12
- return new __HttpRequest({
13
- protocol,
14
- hostname,
15
- port,
16
- method: "POST",
17
- headers,
18
- path: resolvedPath,
19
- body,
20
- });
12
+ b.m("POST").h(headers).b(body);
13
+ return b.build();
21
14
  };
22
15
  export const se_CreateTaskCommand = async (input, context) => {
23
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
16
+ const b = rb(input, context);
24
17
  const headers = {
25
18
  "content-type": "application/json",
26
19
  };
27
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task";
20
+ b.bp("/task");
28
21
  let body;
29
22
  body = JSON.stringify(take(input, {
30
23
  clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
@@ -33,235 +26,142 @@ export const se_CreateTaskCommand = async (input, context) => {
33
26
  tags: (_) => _json(_),
34
27
  targets: (_) => _json(_),
35
28
  }));
36
- return new __HttpRequest({
37
- protocol,
38
- hostname,
39
- port,
40
- method: "POST",
41
- headers,
42
- path: resolvedPath,
43
- body,
44
- });
29
+ b.m("POST").h(headers).b(body);
30
+ return b.build();
45
31
  };
46
32
  export const se_DescribeDeviceCommand = async (input, context) => {
47
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
33
+ const b = rb(input, context);
48
34
  const headers = {};
49
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
50
- "/managed-device/{managedDeviceId}/describe";
51
- resolvedPath = __resolvedPath(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
35
+ b.bp("/managed-device/{managedDeviceId}/describe");
36
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
52
37
  let body;
53
- return new __HttpRequest({
54
- protocol,
55
- hostname,
56
- port,
57
- method: "POST",
58
- headers,
59
- path: resolvedPath,
60
- body,
61
- });
38
+ b.m("POST").h(headers).b(body);
39
+ return b.build();
62
40
  };
63
41
  export const se_DescribeDeviceEc2InstancesCommand = async (input, context) => {
64
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
42
+ const b = rb(input, context);
65
43
  const headers = {
66
44
  "content-type": "application/json",
67
45
  };
68
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
69
- "/managed-device/{managedDeviceId}/resources/ec2/describe";
70
- resolvedPath = __resolvedPath(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
46
+ b.bp("/managed-device/{managedDeviceId}/resources/ec2/describe");
47
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
71
48
  let body;
72
49
  body = JSON.stringify(take(input, {
73
50
  instanceIds: (_) => _json(_),
74
51
  }));
75
- return new __HttpRequest({
76
- protocol,
77
- hostname,
78
- port,
79
- method: "POST",
80
- headers,
81
- path: resolvedPath,
82
- body,
83
- });
52
+ b.m("POST").h(headers).b(body);
53
+ return b.build();
84
54
  };
85
55
  export const se_DescribeExecutionCommand = async (input, context) => {
86
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
56
+ const b = rb(input, context);
87
57
  const headers = {};
88
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
89
- "/task/{taskId}/execution/{managedDeviceId}";
90
- resolvedPath = __resolvedPath(resolvedPath, input, "taskId", () => input.taskId, "{taskId}", false);
91
- resolvedPath = __resolvedPath(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
58
+ b.bp("/task/{taskId}/execution/{managedDeviceId}");
59
+ b.p("taskId", () => input.taskId, "{taskId}", false);
60
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
92
61
  let body;
93
- return new __HttpRequest({
94
- protocol,
95
- hostname,
96
- port,
97
- method: "POST",
98
- headers,
99
- path: resolvedPath,
100
- body,
101
- });
62
+ b.m("POST").h(headers).b(body);
63
+ return b.build();
102
64
  };
103
65
  export const se_DescribeTaskCommand = async (input, context) => {
104
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
66
+ const b = rb(input, context);
105
67
  const headers = {};
106
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/task/{taskId}";
107
- resolvedPath = __resolvedPath(resolvedPath, input, "taskId", () => input.taskId, "{taskId}", false);
68
+ b.bp("/task/{taskId}");
69
+ b.p("taskId", () => input.taskId, "{taskId}", false);
108
70
  let body;
109
- return new __HttpRequest({
110
- protocol,
111
- hostname,
112
- port,
113
- method: "POST",
114
- headers,
115
- path: resolvedPath,
116
- body,
117
- });
71
+ b.m("POST").h(headers).b(body);
72
+ return b.build();
118
73
  };
119
74
  export const se_ListDeviceResourcesCommand = async (input, context) => {
120
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
75
+ const b = rb(input, context);
121
76
  const headers = {};
122
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
123
- "/managed-device/{managedDeviceId}/resources";
124
- resolvedPath = __resolvedPath(resolvedPath, input, "managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
77
+ b.bp("/managed-device/{managedDeviceId}/resources");
78
+ b.p("managedDeviceId", () => input.managedDeviceId, "{managedDeviceId}", false);
125
79
  const query = map({
126
- type: [, input.type],
127
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
128
- nextToken: [, input.nextToken],
80
+ [_t]: [, input[_t]],
81
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
82
+ [_nT]: [, input[_nT]],
129
83
  });
130
84
  let body;
131
- return new __HttpRequest({
132
- protocol,
133
- hostname,
134
- port,
135
- method: "GET",
136
- headers,
137
- path: resolvedPath,
138
- query,
139
- body,
140
- });
85
+ b.m("GET").h(headers).q(query).b(body);
86
+ return b.build();
141
87
  };
142
88
  export const se_ListDevicesCommand = async (input, context) => {
143
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
89
+ const b = rb(input, context);
144
90
  const headers = {};
145
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/managed-devices";
91
+ b.bp("/managed-devices");
146
92
  const query = map({
147
- jobId: [, input.jobId],
148
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
149
- nextToken: [, input.nextToken],
93
+ [_jI]: [, input[_jI]],
94
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
95
+ [_nT]: [, input[_nT]],
150
96
  });
151
97
  let body;
152
- return new __HttpRequest({
153
- protocol,
154
- hostname,
155
- port,
156
- method: "GET",
157
- headers,
158
- path: resolvedPath,
159
- query,
160
- body,
161
- });
98
+ b.m("GET").h(headers).q(query).b(body);
99
+ return b.build();
162
100
  };
163
101
  export const se_ListExecutionsCommand = async (input, context) => {
164
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
102
+ const b = rb(input, context);
165
103
  const headers = {};
166
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/executions";
104
+ b.bp("/executions");
167
105
  const query = map({
168
- taskId: [, __expectNonNull(input.taskId, `taskId`)],
169
- state: [, input.state],
170
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
171
- nextToken: [, input.nextToken],
106
+ [_tI]: [, __expectNonNull(input[_tI], `taskId`)],
107
+ [_s]: [, input[_s]],
108
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
109
+ [_nT]: [, input[_nT]],
172
110
  });
173
111
  let body;
174
- return new __HttpRequest({
175
- protocol,
176
- hostname,
177
- port,
178
- method: "GET",
179
- headers,
180
- path: resolvedPath,
181
- query,
182
- body,
183
- });
112
+ b.m("GET").h(headers).q(query).b(body);
113
+ return b.build();
184
114
  };
185
115
  export const se_ListTagsForResourceCommand = async (input, context) => {
186
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
116
+ const b = rb(input, context);
187
117
  const headers = {};
188
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
189
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
118
+ b.bp("/tags/{resourceArn}");
119
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
190
120
  let body;
191
- return new __HttpRequest({
192
- protocol,
193
- hostname,
194
- port,
195
- method: "GET",
196
- headers,
197
- path: resolvedPath,
198
- body,
199
- });
121
+ b.m("GET").h(headers).b(body);
122
+ return b.build();
200
123
  };
201
124
  export const se_ListTasksCommand = async (input, context) => {
202
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
203
126
  const headers = {};
204
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tasks";
127
+ b.bp("/tasks");
205
128
  const query = map({
206
- state: [, input.state],
207
- maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
208
- nextToken: [, input.nextToken],
129
+ [_s]: [, input[_s]],
130
+ [_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
131
+ [_nT]: [, input[_nT]],
209
132
  });
210
133
  let body;
211
- return new __HttpRequest({
212
- protocol,
213
- hostname,
214
- port,
215
- method: "GET",
216
- headers,
217
- path: resolvedPath,
218
- query,
219
- body,
220
- });
134
+ b.m("GET").h(headers).q(query).b(body);
135
+ return b.build();
221
136
  };
222
137
  export const se_TagResourceCommand = async (input, context) => {
223
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
138
+ const b = rb(input, context);
224
139
  const headers = {
225
140
  "content-type": "application/json",
226
141
  };
227
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
228
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
142
+ b.bp("/tags/{resourceArn}");
143
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
229
144
  let body;
230
145
  body = JSON.stringify(take(input, {
231
146
  tags: (_) => _json(_),
232
147
  }));
233
- return new __HttpRequest({
234
- protocol,
235
- hostname,
236
- port,
237
- method: "POST",
238
- headers,
239
- path: resolvedPath,
240
- body,
241
- });
148
+ b.m("POST").h(headers).b(body);
149
+ return b.build();
242
150
  };
243
151
  export const se_UntagResourceCommand = async (input, context) => {
244
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = rb(input, context);
245
153
  const headers = {};
246
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
247
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
154
+ b.bp("/tags/{resourceArn}");
155
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
248
156
  const query = map({
249
- tagKeys: [
157
+ [_tK]: [
250
158
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
251
- () => (input.tagKeys || []).map((_entry) => _entry),
159
+ () => (input[_tK] || []).map((_entry) => _entry),
252
160
  ],
253
161
  });
254
162
  let body;
255
- return new __HttpRequest({
256
- protocol,
257
- hostname,
258
- port,
259
- method: "DELETE",
260
- headers,
261
- path: resolvedPath,
262
- query,
263
- body,
264
- });
163
+ b.m("DELETE").h(headers).q(query).b(body);
164
+ return b.build();
265
165
  };
266
166
  export const de_CancelTaskCommand = async (output, context) => {
267
167
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -991,6 +891,13 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
991
891
  value !== "" &&
992
892
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
993
893
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
894
+ const _jI = "jobId";
895
+ const _mR = "maxResults";
896
+ const _nT = "nextToken";
897
+ const _s = "state";
898
+ const _t = "type";
899
+ const _tI = "taskId";
900
+ const _tK = "tagKeys";
994
901
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
995
902
  if (encoded.length) {
996
903
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-snow-device-management",
3
3
  "description": "AWS SDK for JavaScript Snow Device Management Client for Node.js, Browser and React Native",
4
- "version": "3.474.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.474.0",
24
- "@aws-sdk/core": "3.474.0",
25
- "@aws-sdk/credential-provider-node": "3.474.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
@@ -34,6 +34,7 @@
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",