@aws-sdk/client-batch 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,38 +1,31 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.de_UpdateSchedulingPolicyCommand = exports.de_UpdateJobQueueCommand = exports.de_UpdateComputeEnvironmentCommand = exports.de_UntagResourceCommand = exports.de_TerminateJobCommand = exports.de_TagResourceCommand = exports.de_SubmitJobCommand = exports.de_RegisterJobDefinitionCommand = exports.de_ListTagsForResourceCommand = exports.de_ListSchedulingPoliciesCommand = exports.de_ListJobsCommand = exports.de_DescribeSchedulingPoliciesCommand = exports.de_DescribeJobsCommand = exports.de_DescribeJobQueuesCommand = exports.de_DescribeJobDefinitionsCommand = exports.de_DescribeComputeEnvironmentsCommand = exports.de_DeregisterJobDefinitionCommand = exports.de_DeleteSchedulingPolicyCommand = exports.de_DeleteJobQueueCommand = exports.de_DeleteComputeEnvironmentCommand = exports.de_CreateSchedulingPolicyCommand = exports.de_CreateJobQueueCommand = exports.de_CreateComputeEnvironmentCommand = exports.de_CancelJobCommand = exports.se_UpdateSchedulingPolicyCommand = exports.se_UpdateJobQueueCommand = exports.se_UpdateComputeEnvironmentCommand = exports.se_UntagResourceCommand = exports.se_TerminateJobCommand = exports.se_TagResourceCommand = exports.se_SubmitJobCommand = exports.se_RegisterJobDefinitionCommand = exports.se_ListTagsForResourceCommand = exports.se_ListSchedulingPoliciesCommand = exports.se_ListJobsCommand = exports.se_DescribeSchedulingPoliciesCommand = exports.se_DescribeJobsCommand = exports.se_DescribeJobQueuesCommand = exports.se_DescribeJobDefinitionsCommand = exports.se_DescribeComputeEnvironmentsCommand = exports.se_DeregisterJobDefinitionCommand = exports.se_DeleteSchedulingPolicyCommand = exports.se_DeleteJobQueueCommand = exports.se_DeleteComputeEnvironmentCommand = exports.se_CreateSchedulingPolicyCommand = exports.se_CreateJobQueueCommand = exports.se_CreateComputeEnvironmentCommand = exports.se_CancelJobCommand = 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 BatchServiceException_1 = require("../models/BatchServiceException");
7
7
  const models_0_1 = require("../models/models_0");
8
8
  const se_CancelJobCommand = async (input, context) => {
9
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
9
+ const b = (0, core_1.requestBuilder)(input, context);
10
10
  const headers = {
11
11
  "content-type": "application/json",
12
12
  };
13
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/canceljob";
13
+ b.bp("/v1/canceljob");
14
14
  let body;
15
15
  body = JSON.stringify((0, smithy_client_1.take)(input, {
16
16
  jobId: [],
17
17
  reason: [],
18
18
  }));
19
- return new protocol_http_1.HttpRequest({
20
- protocol,
21
- hostname,
22
- port,
23
- method: "POST",
24
- headers,
25
- path: resolvedPath,
26
- body,
27
- });
19
+ b.m("POST").h(headers).b(body);
20
+ return b.build();
28
21
  };
29
22
  exports.se_CancelJobCommand = se_CancelJobCommand;
30
23
  const se_CreateComputeEnvironmentCommand = async (input, context) => {
31
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
24
+ const b = (0, core_1.requestBuilder)(input, context);
32
25
  const headers = {
33
26
  "content-type": "application/json",
34
27
  };
35
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createcomputeenvironment";
28
+ b.bp("/v1/createcomputeenvironment");
36
29
  let body;
37
30
  body = JSON.stringify((0, smithy_client_1.take)(input, {
38
31
  computeEnvironmentName: [],
@@ -44,23 +37,16 @@ const se_CreateComputeEnvironmentCommand = async (input, context) => {
44
37
  type: [],
45
38
  unmanagedvCpus: [],
46
39
  }));
47
- return new protocol_http_1.HttpRequest({
48
- protocol,
49
- hostname,
50
- port,
51
- method: "POST",
52
- headers,
53
- path: resolvedPath,
54
- body,
55
- });
40
+ b.m("POST").h(headers).b(body);
41
+ return b.build();
56
42
  };
57
43
  exports.se_CreateComputeEnvironmentCommand = se_CreateComputeEnvironmentCommand;
58
44
  const se_CreateJobQueueCommand = async (input, context) => {
59
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
45
+ const b = (0, core_1.requestBuilder)(input, context);
60
46
  const headers = {
61
47
  "content-type": "application/json",
62
48
  };
63
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createjobqueue";
49
+ b.bp("/v1/createjobqueue");
64
50
  let body;
65
51
  body = JSON.stringify((0, smithy_client_1.take)(input, {
66
52
  computeEnvironmentOrder: (_) => (0, smithy_client_1._json)(_),
@@ -70,153 +56,104 @@ const se_CreateJobQueueCommand = async (input, context) => {
70
56
  state: [],
71
57
  tags: (_) => (0, smithy_client_1._json)(_),
72
58
  }));
73
- return new protocol_http_1.HttpRequest({
74
- protocol,
75
- hostname,
76
- port,
77
- method: "POST",
78
- headers,
79
- path: resolvedPath,
80
- body,
81
- });
59
+ b.m("POST").h(headers).b(body);
60
+ return b.build();
82
61
  };
83
62
  exports.se_CreateJobQueueCommand = se_CreateJobQueueCommand;
84
63
  const se_CreateSchedulingPolicyCommand = async (input, context) => {
85
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
64
+ const b = (0, core_1.requestBuilder)(input, context);
86
65
  const headers = {
87
66
  "content-type": "application/json",
88
67
  };
89
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createschedulingpolicy";
68
+ b.bp("/v1/createschedulingpolicy");
90
69
  let body;
91
70
  body = JSON.stringify((0, smithy_client_1.take)(input, {
92
71
  fairsharePolicy: (_) => se_FairsharePolicy(_, context),
93
72
  name: [],
94
73
  tags: (_) => (0, smithy_client_1._json)(_),
95
74
  }));
96
- return new protocol_http_1.HttpRequest({
97
- protocol,
98
- hostname,
99
- port,
100
- method: "POST",
101
- headers,
102
- path: resolvedPath,
103
- body,
104
- });
75
+ b.m("POST").h(headers).b(body);
76
+ return b.build();
105
77
  };
106
78
  exports.se_CreateSchedulingPolicyCommand = se_CreateSchedulingPolicyCommand;
107
79
  const se_DeleteComputeEnvironmentCommand = async (input, context) => {
108
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
80
+ const b = (0, core_1.requestBuilder)(input, context);
109
81
  const headers = {
110
82
  "content-type": "application/json",
111
83
  };
112
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletecomputeenvironment";
84
+ b.bp("/v1/deletecomputeenvironment");
113
85
  let body;
114
86
  body = JSON.stringify((0, smithy_client_1.take)(input, {
115
87
  computeEnvironment: [],
116
88
  }));
117
- return new protocol_http_1.HttpRequest({
118
- protocol,
119
- hostname,
120
- port,
121
- method: "POST",
122
- headers,
123
- path: resolvedPath,
124
- body,
125
- });
89
+ b.m("POST").h(headers).b(body);
90
+ return b.build();
126
91
  };
127
92
  exports.se_DeleteComputeEnvironmentCommand = se_DeleteComputeEnvironmentCommand;
128
93
  const se_DeleteJobQueueCommand = async (input, context) => {
129
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
94
+ const b = (0, core_1.requestBuilder)(input, context);
130
95
  const headers = {
131
96
  "content-type": "application/json",
132
97
  };
133
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletejobqueue";
98
+ b.bp("/v1/deletejobqueue");
134
99
  let body;
135
100
  body = JSON.stringify((0, smithy_client_1.take)(input, {
136
101
  jobQueue: [],
137
102
  }));
138
- return new protocol_http_1.HttpRequest({
139
- protocol,
140
- hostname,
141
- port,
142
- method: "POST",
143
- headers,
144
- path: resolvedPath,
145
- body,
146
- });
103
+ b.m("POST").h(headers).b(body);
104
+ return b.build();
147
105
  };
148
106
  exports.se_DeleteJobQueueCommand = se_DeleteJobQueueCommand;
149
107
  const se_DeleteSchedulingPolicyCommand = async (input, context) => {
150
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
108
+ const b = (0, core_1.requestBuilder)(input, context);
151
109
  const headers = {
152
110
  "content-type": "application/json",
153
111
  };
154
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deleteschedulingpolicy";
112
+ b.bp("/v1/deleteschedulingpolicy");
155
113
  let body;
156
114
  body = JSON.stringify((0, smithy_client_1.take)(input, {
157
115
  arn: [],
158
116
  }));
159
- return new protocol_http_1.HttpRequest({
160
- protocol,
161
- hostname,
162
- port,
163
- method: "POST",
164
- headers,
165
- path: resolvedPath,
166
- body,
167
- });
117
+ b.m("POST").h(headers).b(body);
118
+ return b.build();
168
119
  };
169
120
  exports.se_DeleteSchedulingPolicyCommand = se_DeleteSchedulingPolicyCommand;
170
121
  const se_DeregisterJobDefinitionCommand = async (input, context) => {
171
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
122
+ const b = (0, core_1.requestBuilder)(input, context);
172
123
  const headers = {
173
124
  "content-type": "application/json",
174
125
  };
175
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deregisterjobdefinition";
126
+ b.bp("/v1/deregisterjobdefinition");
176
127
  let body;
177
128
  body = JSON.stringify((0, smithy_client_1.take)(input, {
178
129
  jobDefinition: [],
179
130
  }));
180
- return new protocol_http_1.HttpRequest({
181
- protocol,
182
- hostname,
183
- port,
184
- method: "POST",
185
- headers,
186
- path: resolvedPath,
187
- body,
188
- });
131
+ b.m("POST").h(headers).b(body);
132
+ return b.build();
189
133
  };
190
134
  exports.se_DeregisterJobDefinitionCommand = se_DeregisterJobDefinitionCommand;
191
135
  const se_DescribeComputeEnvironmentsCommand = async (input, context) => {
192
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
136
+ const b = (0, core_1.requestBuilder)(input, context);
193
137
  const headers = {
194
138
  "content-type": "application/json",
195
139
  };
196
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describecomputeenvironments";
140
+ b.bp("/v1/describecomputeenvironments");
197
141
  let body;
198
142
  body = JSON.stringify((0, smithy_client_1.take)(input, {
199
143
  computeEnvironments: (_) => (0, smithy_client_1._json)(_),
200
144
  maxResults: [],
201
145
  nextToken: [],
202
146
  }));
203
- return new protocol_http_1.HttpRequest({
204
- protocol,
205
- hostname,
206
- port,
207
- method: "POST",
208
- headers,
209
- path: resolvedPath,
210
- body,
211
- });
147
+ b.m("POST").h(headers).b(body);
148
+ return b.build();
212
149
  };
213
150
  exports.se_DescribeComputeEnvironmentsCommand = se_DescribeComputeEnvironmentsCommand;
214
151
  const se_DescribeJobDefinitionsCommand = async (input, context) => {
215
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
152
+ const b = (0, core_1.requestBuilder)(input, context);
216
153
  const headers = {
217
154
  "content-type": "application/json",
218
155
  };
219
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobdefinitions";
156
+ b.bp("/v1/describejobdefinitions");
220
157
  let body;
221
158
  body = JSON.stringify((0, smithy_client_1.take)(input, {
222
159
  jobDefinitionName: [],
@@ -225,88 +162,60 @@ const se_DescribeJobDefinitionsCommand = async (input, context) => {
225
162
  nextToken: [],
226
163
  status: [],
227
164
  }));
228
- return new protocol_http_1.HttpRequest({
229
- protocol,
230
- hostname,
231
- port,
232
- method: "POST",
233
- headers,
234
- path: resolvedPath,
235
- body,
236
- });
165
+ b.m("POST").h(headers).b(body);
166
+ return b.build();
237
167
  };
238
168
  exports.se_DescribeJobDefinitionsCommand = se_DescribeJobDefinitionsCommand;
239
169
  const se_DescribeJobQueuesCommand = async (input, context) => {
240
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
170
+ const b = (0, core_1.requestBuilder)(input, context);
241
171
  const headers = {
242
172
  "content-type": "application/json",
243
173
  };
244
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobqueues";
174
+ b.bp("/v1/describejobqueues");
245
175
  let body;
246
176
  body = JSON.stringify((0, smithy_client_1.take)(input, {
247
177
  jobQueues: (_) => (0, smithy_client_1._json)(_),
248
178
  maxResults: [],
249
179
  nextToken: [],
250
180
  }));
251
- return new protocol_http_1.HttpRequest({
252
- protocol,
253
- hostname,
254
- port,
255
- method: "POST",
256
- headers,
257
- path: resolvedPath,
258
- body,
259
- });
181
+ b.m("POST").h(headers).b(body);
182
+ return b.build();
260
183
  };
261
184
  exports.se_DescribeJobQueuesCommand = se_DescribeJobQueuesCommand;
262
185
  const se_DescribeJobsCommand = async (input, context) => {
263
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
186
+ const b = (0, core_1.requestBuilder)(input, context);
264
187
  const headers = {
265
188
  "content-type": "application/json",
266
189
  };
267
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobs";
190
+ b.bp("/v1/describejobs");
268
191
  let body;
269
192
  body = JSON.stringify((0, smithy_client_1.take)(input, {
270
193
  jobs: (_) => (0, smithy_client_1._json)(_),
271
194
  }));
272
- return new protocol_http_1.HttpRequest({
273
- protocol,
274
- hostname,
275
- port,
276
- method: "POST",
277
- headers,
278
- path: resolvedPath,
279
- body,
280
- });
195
+ b.m("POST").h(headers).b(body);
196
+ return b.build();
281
197
  };
282
198
  exports.se_DescribeJobsCommand = se_DescribeJobsCommand;
283
199
  const se_DescribeSchedulingPoliciesCommand = async (input, context) => {
284
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
200
+ const b = (0, core_1.requestBuilder)(input, context);
285
201
  const headers = {
286
202
  "content-type": "application/json",
287
203
  };
288
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describeschedulingpolicies";
204
+ b.bp("/v1/describeschedulingpolicies");
289
205
  let body;
290
206
  body = JSON.stringify((0, smithy_client_1.take)(input, {
291
207
  arns: (_) => (0, smithy_client_1._json)(_),
292
208
  }));
293
- return new protocol_http_1.HttpRequest({
294
- protocol,
295
- hostname,
296
- port,
297
- method: "POST",
298
- headers,
299
- path: resolvedPath,
300
- body,
301
- });
209
+ b.m("POST").h(headers).b(body);
210
+ return b.build();
302
211
  };
303
212
  exports.se_DescribeSchedulingPoliciesCommand = se_DescribeSchedulingPoliciesCommand;
304
213
  const se_ListJobsCommand = async (input, context) => {
305
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
214
+ const b = (0, core_1.requestBuilder)(input, context);
306
215
  const headers = {
307
216
  "content-type": "application/json",
308
217
  };
309
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listjobs";
218
+ b.bp("/v1/listjobs");
310
219
  let body;
311
220
  body = JSON.stringify((0, smithy_client_1.take)(input, {
312
221
  arrayJobId: [],
@@ -317,62 +226,41 @@ const se_ListJobsCommand = async (input, context) => {
317
226
  multiNodeJobId: [],
318
227
  nextToken: [],
319
228
  }));
320
- return new protocol_http_1.HttpRequest({
321
- protocol,
322
- hostname,
323
- port,
324
- method: "POST",
325
- headers,
326
- path: resolvedPath,
327
- body,
328
- });
229
+ b.m("POST").h(headers).b(body);
230
+ return b.build();
329
231
  };
330
232
  exports.se_ListJobsCommand = se_ListJobsCommand;
331
233
  const se_ListSchedulingPoliciesCommand = async (input, context) => {
332
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
234
+ const b = (0, core_1.requestBuilder)(input, context);
333
235
  const headers = {
334
236
  "content-type": "application/json",
335
237
  };
336
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listschedulingpolicies";
238
+ b.bp("/v1/listschedulingpolicies");
337
239
  let body;
338
240
  body = JSON.stringify((0, smithy_client_1.take)(input, {
339
241
  maxResults: [],
340
242
  nextToken: [],
341
243
  }));
342
- return new protocol_http_1.HttpRequest({
343
- protocol,
344
- hostname,
345
- port,
346
- method: "POST",
347
- headers,
348
- path: resolvedPath,
349
- body,
350
- });
244
+ b.m("POST").h(headers).b(body);
245
+ return b.build();
351
246
  };
352
247
  exports.se_ListSchedulingPoliciesCommand = se_ListSchedulingPoliciesCommand;
353
248
  const se_ListTagsForResourceCommand = async (input, context) => {
354
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
249
+ const b = (0, core_1.requestBuilder)(input, context);
355
250
  const headers = {};
356
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
357
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
251
+ b.bp("/v1/tags/{resourceArn}");
252
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
358
253
  let body;
359
- return new protocol_http_1.HttpRequest({
360
- protocol,
361
- hostname,
362
- port,
363
- method: "GET",
364
- headers,
365
- path: resolvedPath,
366
- body,
367
- });
254
+ b.m("GET").h(headers).b(body);
255
+ return b.build();
368
256
  };
369
257
  exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
370
258
  const se_RegisterJobDefinitionCommand = async (input, context) => {
371
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
259
+ const b = (0, core_1.requestBuilder)(input, context);
372
260
  const headers = {
373
261
  "content-type": "application/json",
374
262
  };
375
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registerjobdefinition";
263
+ b.bp("/v1/registerjobdefinition");
376
264
  let body;
377
265
  body = JSON.stringify((0, smithy_client_1.take)(input, {
378
266
  containerProperties: (_) => (0, smithy_client_1._json)(_),
@@ -388,23 +276,16 @@ const se_RegisterJobDefinitionCommand = async (input, context) => {
388
276
  timeout: (_) => (0, smithy_client_1._json)(_),
389
277
  type: [],
390
278
  }));
391
- return new protocol_http_1.HttpRequest({
392
- protocol,
393
- hostname,
394
- port,
395
- method: "POST",
396
- headers,
397
- path: resolvedPath,
398
- body,
399
- });
279
+ b.m("POST").h(headers).b(body);
280
+ return b.build();
400
281
  };
401
282
  exports.se_RegisterJobDefinitionCommand = se_RegisterJobDefinitionCommand;
402
283
  const se_SubmitJobCommand = async (input, context) => {
403
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
284
+ const b = (0, core_1.requestBuilder)(input, context);
404
285
  const headers = {
405
286
  "content-type": "application/json",
406
287
  };
407
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/submitjob";
288
+ b.bp("/v1/submitjob");
408
289
  let body;
409
290
  body = JSON.stringify((0, smithy_client_1.take)(input, {
410
291
  arrayProperties: (_) => (0, smithy_client_1._json)(_),
@@ -423,91 +304,62 @@ const se_SubmitJobCommand = async (input, context) => {
423
304
  tags: (_) => (0, smithy_client_1._json)(_),
424
305
  timeout: (_) => (0, smithy_client_1._json)(_),
425
306
  }));
426
- return new protocol_http_1.HttpRequest({
427
- protocol,
428
- hostname,
429
- port,
430
- method: "POST",
431
- headers,
432
- path: resolvedPath,
433
- body,
434
- });
307
+ b.m("POST").h(headers).b(body);
308
+ return b.build();
435
309
  };
436
310
  exports.se_SubmitJobCommand = se_SubmitJobCommand;
437
311
  const se_TagResourceCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
312
+ const b = (0, core_1.requestBuilder)(input, context);
439
313
  const headers = {
440
314
  "content-type": "application/json",
441
315
  };
442
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
443
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
316
+ b.bp("/v1/tags/{resourceArn}");
317
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
444
318
  let body;
445
319
  body = JSON.stringify((0, smithy_client_1.take)(input, {
446
320
  tags: (_) => (0, smithy_client_1._json)(_),
447
321
  }));
448
- return new protocol_http_1.HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "POST",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
322
+ b.m("POST").h(headers).b(body);
323
+ return b.build();
457
324
  };
458
325
  exports.se_TagResourceCommand = se_TagResourceCommand;
459
326
  const se_TerminateJobCommand = async (input, context) => {
460
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
327
+ const b = (0, core_1.requestBuilder)(input, context);
461
328
  const headers = {
462
329
  "content-type": "application/json",
463
330
  };
464
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/terminatejob";
331
+ b.bp("/v1/terminatejob");
465
332
  let body;
466
333
  body = JSON.stringify((0, smithy_client_1.take)(input, {
467
334
  jobId: [],
468
335
  reason: [],
469
336
  }));
470
- return new protocol_http_1.HttpRequest({
471
- protocol,
472
- hostname,
473
- port,
474
- method: "POST",
475
- headers,
476
- path: resolvedPath,
477
- body,
478
- });
337
+ b.m("POST").h(headers).b(body);
338
+ return b.build();
479
339
  };
480
340
  exports.se_TerminateJobCommand = se_TerminateJobCommand;
481
341
  const se_UntagResourceCommand = async (input, context) => {
482
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
342
+ const b = (0, core_1.requestBuilder)(input, context);
483
343
  const headers = {};
484
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
485
- resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
344
+ b.bp("/v1/tags/{resourceArn}");
345
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
486
346
  const query = (0, smithy_client_1.map)({
487
- tagKeys: [
347
+ [_tK]: [
488
348
  (0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
489
- () => (input.tagKeys || []).map((_entry) => _entry),
349
+ () => (input[_tK] || []).map((_entry) => _entry),
490
350
  ],
491
351
  });
492
352
  let body;
493
- return new protocol_http_1.HttpRequest({
494
- protocol,
495
- hostname,
496
- port,
497
- method: "DELETE",
498
- headers,
499
- path: resolvedPath,
500
- query,
501
- body,
502
- });
353
+ b.m("DELETE").h(headers).q(query).b(body);
354
+ return b.build();
503
355
  };
504
356
  exports.se_UntagResourceCommand = se_UntagResourceCommand;
505
357
  const se_UpdateComputeEnvironmentCommand = async (input, context) => {
506
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
358
+ const b = (0, core_1.requestBuilder)(input, context);
507
359
  const headers = {
508
360
  "content-type": "application/json",
509
361
  };
510
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatecomputeenvironment";
362
+ b.bp("/v1/updatecomputeenvironment");
511
363
  let body;
512
364
  body = JSON.stringify((0, smithy_client_1.take)(input, {
513
365
  computeEnvironment: [],
@@ -517,23 +369,16 @@ const se_UpdateComputeEnvironmentCommand = async (input, context) => {
517
369
  unmanagedvCpus: [],
518
370
  updatePolicy: (_) => (0, smithy_client_1._json)(_),
519
371
  }));
520
- return new protocol_http_1.HttpRequest({
521
- protocol,
522
- hostname,
523
- port,
524
- method: "POST",
525
- headers,
526
- path: resolvedPath,
527
- body,
528
- });
372
+ b.m("POST").h(headers).b(body);
373
+ return b.build();
529
374
  };
530
375
  exports.se_UpdateComputeEnvironmentCommand = se_UpdateComputeEnvironmentCommand;
531
376
  const se_UpdateJobQueueCommand = async (input, context) => {
532
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
377
+ const b = (0, core_1.requestBuilder)(input, context);
533
378
  const headers = {
534
379
  "content-type": "application/json",
535
380
  };
536
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatejobqueue";
381
+ b.bp("/v1/updatejobqueue");
537
382
  let body;
538
383
  body = JSON.stringify((0, smithy_client_1.take)(input, {
539
384
  computeEnvironmentOrder: (_) => (0, smithy_client_1._json)(_),
@@ -542,37 +387,23 @@ const se_UpdateJobQueueCommand = async (input, context) => {
542
387
  schedulingPolicyArn: [],
543
388
  state: [],
544
389
  }));
545
- return new protocol_http_1.HttpRequest({
546
- protocol,
547
- hostname,
548
- port,
549
- method: "POST",
550
- headers,
551
- path: resolvedPath,
552
- body,
553
- });
390
+ b.m("POST").h(headers).b(body);
391
+ return b.build();
554
392
  };
555
393
  exports.se_UpdateJobQueueCommand = se_UpdateJobQueueCommand;
556
394
  const se_UpdateSchedulingPolicyCommand = async (input, context) => {
557
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
395
+ const b = (0, core_1.requestBuilder)(input, context);
558
396
  const headers = {
559
397
  "content-type": "application/json",
560
398
  };
561
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updateschedulingpolicy";
399
+ b.bp("/v1/updateschedulingpolicy");
562
400
  let body;
563
401
  body = JSON.stringify((0, smithy_client_1.take)(input, {
564
402
  arn: [],
565
403
  fairsharePolicy: (_) => se_FairsharePolicy(_, context),
566
404
  }));
567
- return new protocol_http_1.HttpRequest({
568
- protocol,
569
- hostname,
570
- port,
571
- method: "POST",
572
- headers,
573
- path: resolvedPath,
574
- body,
575
- });
405
+ b.m("POST").h(headers).b(body);
406
+ return b.build();
576
407
  };
577
408
  exports.se_UpdateSchedulingPolicyCommand = se_UpdateSchedulingPolicyCommand;
578
409
  const de_CancelJobCommand = async (output, context) => {
@@ -1537,6 +1368,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1537
1368
  value !== "" &&
1538
1369
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1539
1370
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1371
+ const _tK = "tagKeys";
1540
1372
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1541
1373
  if (encoded.length) {
1542
1374
  return JSON.parse(encoded);
@@ -1,34 +1,27 @@
1
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
1
+ import { requestBuilder as rb } from "@smithy/core";
2
+ import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, map, serializeFloat as __serializeFloat, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { BatchServiceException as __BaseException } from "../models/BatchServiceException";
4
4
  import { ClientException, ServerException, } from "../models/models_0";
5
5
  export const se_CancelJobCommand = async (input, context) => {
6
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
6
+ const b = rb(input, context);
7
7
  const headers = {
8
8
  "content-type": "application/json",
9
9
  };
10
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/canceljob";
10
+ b.bp("/v1/canceljob");
11
11
  let body;
12
12
  body = JSON.stringify(take(input, {
13
13
  jobId: [],
14
14
  reason: [],
15
15
  }));
16
- return new __HttpRequest({
17
- protocol,
18
- hostname,
19
- port,
20
- method: "POST",
21
- headers,
22
- path: resolvedPath,
23
- body,
24
- });
16
+ b.m("POST").h(headers).b(body);
17
+ return b.build();
25
18
  };
26
19
  export const se_CreateComputeEnvironmentCommand = async (input, context) => {
27
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
20
+ const b = rb(input, context);
28
21
  const headers = {
29
22
  "content-type": "application/json",
30
23
  };
31
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createcomputeenvironment";
24
+ b.bp("/v1/createcomputeenvironment");
32
25
  let body;
33
26
  body = JSON.stringify(take(input, {
34
27
  computeEnvironmentName: [],
@@ -40,22 +33,15 @@ export const se_CreateComputeEnvironmentCommand = async (input, context) => {
40
33
  type: [],
41
34
  unmanagedvCpus: [],
42
35
  }));
43
- return new __HttpRequest({
44
- protocol,
45
- hostname,
46
- port,
47
- method: "POST",
48
- headers,
49
- path: resolvedPath,
50
- body,
51
- });
36
+ b.m("POST").h(headers).b(body);
37
+ return b.build();
52
38
  };
53
39
  export const se_CreateJobQueueCommand = async (input, context) => {
54
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
40
+ const b = rb(input, context);
55
41
  const headers = {
56
42
  "content-type": "application/json",
57
43
  };
58
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createjobqueue";
44
+ b.bp("/v1/createjobqueue");
59
45
  let body;
60
46
  body = JSON.stringify(take(input, {
61
47
  computeEnvironmentOrder: (_) => _json(_),
@@ -65,146 +51,97 @@ export const se_CreateJobQueueCommand = async (input, context) => {
65
51
  state: [],
66
52
  tags: (_) => _json(_),
67
53
  }));
68
- return new __HttpRequest({
69
- protocol,
70
- hostname,
71
- port,
72
- method: "POST",
73
- headers,
74
- path: resolvedPath,
75
- body,
76
- });
54
+ b.m("POST").h(headers).b(body);
55
+ return b.build();
77
56
  };
78
57
  export const se_CreateSchedulingPolicyCommand = async (input, context) => {
79
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
58
+ const b = rb(input, context);
80
59
  const headers = {
81
60
  "content-type": "application/json",
82
61
  };
83
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/createschedulingpolicy";
62
+ b.bp("/v1/createschedulingpolicy");
84
63
  let body;
85
64
  body = JSON.stringify(take(input, {
86
65
  fairsharePolicy: (_) => se_FairsharePolicy(_, context),
87
66
  name: [],
88
67
  tags: (_) => _json(_),
89
68
  }));
90
- return new __HttpRequest({
91
- protocol,
92
- hostname,
93
- port,
94
- method: "POST",
95
- headers,
96
- path: resolvedPath,
97
- body,
98
- });
69
+ b.m("POST").h(headers).b(body);
70
+ return b.build();
99
71
  };
100
72
  export const se_DeleteComputeEnvironmentCommand = async (input, context) => {
101
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
73
+ const b = rb(input, context);
102
74
  const headers = {
103
75
  "content-type": "application/json",
104
76
  };
105
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletecomputeenvironment";
77
+ b.bp("/v1/deletecomputeenvironment");
106
78
  let body;
107
79
  body = JSON.stringify(take(input, {
108
80
  computeEnvironment: [],
109
81
  }));
110
- return new __HttpRequest({
111
- protocol,
112
- hostname,
113
- port,
114
- method: "POST",
115
- headers,
116
- path: resolvedPath,
117
- body,
118
- });
82
+ b.m("POST").h(headers).b(body);
83
+ return b.build();
119
84
  };
120
85
  export const se_DeleteJobQueueCommand = async (input, context) => {
121
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
86
+ const b = rb(input, context);
122
87
  const headers = {
123
88
  "content-type": "application/json",
124
89
  };
125
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deletejobqueue";
90
+ b.bp("/v1/deletejobqueue");
126
91
  let body;
127
92
  body = JSON.stringify(take(input, {
128
93
  jobQueue: [],
129
94
  }));
130
- return new __HttpRequest({
131
- protocol,
132
- hostname,
133
- port,
134
- method: "POST",
135
- headers,
136
- path: resolvedPath,
137
- body,
138
- });
95
+ b.m("POST").h(headers).b(body);
96
+ return b.build();
139
97
  };
140
98
  export const se_DeleteSchedulingPolicyCommand = async (input, context) => {
141
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
99
+ const b = rb(input, context);
142
100
  const headers = {
143
101
  "content-type": "application/json",
144
102
  };
145
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deleteschedulingpolicy";
103
+ b.bp("/v1/deleteschedulingpolicy");
146
104
  let body;
147
105
  body = JSON.stringify(take(input, {
148
106
  arn: [],
149
107
  }));
150
- return new __HttpRequest({
151
- protocol,
152
- hostname,
153
- port,
154
- method: "POST",
155
- headers,
156
- path: resolvedPath,
157
- body,
158
- });
108
+ b.m("POST").h(headers).b(body);
109
+ return b.build();
159
110
  };
160
111
  export const se_DeregisterJobDefinitionCommand = async (input, context) => {
161
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
112
+ const b = rb(input, context);
162
113
  const headers = {
163
114
  "content-type": "application/json",
164
115
  };
165
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/deregisterjobdefinition";
116
+ b.bp("/v1/deregisterjobdefinition");
166
117
  let body;
167
118
  body = JSON.stringify(take(input, {
168
119
  jobDefinition: [],
169
120
  }));
170
- return new __HttpRequest({
171
- protocol,
172
- hostname,
173
- port,
174
- method: "POST",
175
- headers,
176
- path: resolvedPath,
177
- body,
178
- });
121
+ b.m("POST").h(headers).b(body);
122
+ return b.build();
179
123
  };
180
124
  export const se_DescribeComputeEnvironmentsCommand = async (input, context) => {
181
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
125
+ const b = rb(input, context);
182
126
  const headers = {
183
127
  "content-type": "application/json",
184
128
  };
185
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describecomputeenvironments";
129
+ b.bp("/v1/describecomputeenvironments");
186
130
  let body;
187
131
  body = JSON.stringify(take(input, {
188
132
  computeEnvironments: (_) => _json(_),
189
133
  maxResults: [],
190
134
  nextToken: [],
191
135
  }));
192
- return new __HttpRequest({
193
- protocol,
194
- hostname,
195
- port,
196
- method: "POST",
197
- headers,
198
- path: resolvedPath,
199
- body,
200
- });
136
+ b.m("POST").h(headers).b(body);
137
+ return b.build();
201
138
  };
202
139
  export const se_DescribeJobDefinitionsCommand = async (input, context) => {
203
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
140
+ const b = rb(input, context);
204
141
  const headers = {
205
142
  "content-type": "application/json",
206
143
  };
207
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobdefinitions";
144
+ b.bp("/v1/describejobdefinitions");
208
145
  let body;
209
146
  body = JSON.stringify(take(input, {
210
147
  jobDefinitionName: [],
@@ -213,84 +150,56 @@ export const se_DescribeJobDefinitionsCommand = async (input, context) => {
213
150
  nextToken: [],
214
151
  status: [],
215
152
  }));
216
- return new __HttpRequest({
217
- protocol,
218
- hostname,
219
- port,
220
- method: "POST",
221
- headers,
222
- path: resolvedPath,
223
- body,
224
- });
153
+ b.m("POST").h(headers).b(body);
154
+ return b.build();
225
155
  };
226
156
  export const se_DescribeJobQueuesCommand = async (input, context) => {
227
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
157
+ const b = rb(input, context);
228
158
  const headers = {
229
159
  "content-type": "application/json",
230
160
  };
231
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobqueues";
161
+ b.bp("/v1/describejobqueues");
232
162
  let body;
233
163
  body = JSON.stringify(take(input, {
234
164
  jobQueues: (_) => _json(_),
235
165
  maxResults: [],
236
166
  nextToken: [],
237
167
  }));
238
- return new __HttpRequest({
239
- protocol,
240
- hostname,
241
- port,
242
- method: "POST",
243
- headers,
244
- path: resolvedPath,
245
- body,
246
- });
168
+ b.m("POST").h(headers).b(body);
169
+ return b.build();
247
170
  };
248
171
  export const se_DescribeJobsCommand = async (input, context) => {
249
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
172
+ const b = rb(input, context);
250
173
  const headers = {
251
174
  "content-type": "application/json",
252
175
  };
253
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describejobs";
176
+ b.bp("/v1/describejobs");
254
177
  let body;
255
178
  body = JSON.stringify(take(input, {
256
179
  jobs: (_) => _json(_),
257
180
  }));
258
- return new __HttpRequest({
259
- protocol,
260
- hostname,
261
- port,
262
- method: "POST",
263
- headers,
264
- path: resolvedPath,
265
- body,
266
- });
181
+ b.m("POST").h(headers).b(body);
182
+ return b.build();
267
183
  };
268
184
  export const se_DescribeSchedulingPoliciesCommand = async (input, context) => {
269
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
185
+ const b = rb(input, context);
270
186
  const headers = {
271
187
  "content-type": "application/json",
272
188
  };
273
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/describeschedulingpolicies";
189
+ b.bp("/v1/describeschedulingpolicies");
274
190
  let body;
275
191
  body = JSON.stringify(take(input, {
276
192
  arns: (_) => _json(_),
277
193
  }));
278
- return new __HttpRequest({
279
- protocol,
280
- hostname,
281
- port,
282
- method: "POST",
283
- headers,
284
- path: resolvedPath,
285
- body,
286
- });
194
+ b.m("POST").h(headers).b(body);
195
+ return b.build();
287
196
  };
288
197
  export const se_ListJobsCommand = async (input, context) => {
289
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
198
+ const b = rb(input, context);
290
199
  const headers = {
291
200
  "content-type": "application/json",
292
201
  };
293
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listjobs";
202
+ b.bp("/v1/listjobs");
294
203
  let body;
295
204
  body = JSON.stringify(take(input, {
296
205
  arrayJobId: [],
@@ -301,59 +210,38 @@ export const se_ListJobsCommand = async (input, context) => {
301
210
  multiNodeJobId: [],
302
211
  nextToken: [],
303
212
  }));
304
- return new __HttpRequest({
305
- protocol,
306
- hostname,
307
- port,
308
- method: "POST",
309
- headers,
310
- path: resolvedPath,
311
- body,
312
- });
213
+ b.m("POST").h(headers).b(body);
214
+ return b.build();
313
215
  };
314
216
  export const se_ListSchedulingPoliciesCommand = async (input, context) => {
315
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
217
+ const b = rb(input, context);
316
218
  const headers = {
317
219
  "content-type": "application/json",
318
220
  };
319
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/listschedulingpolicies";
221
+ b.bp("/v1/listschedulingpolicies");
320
222
  let body;
321
223
  body = JSON.stringify(take(input, {
322
224
  maxResults: [],
323
225
  nextToken: [],
324
226
  }));
325
- return new __HttpRequest({
326
- protocol,
327
- hostname,
328
- port,
329
- method: "POST",
330
- headers,
331
- path: resolvedPath,
332
- body,
333
- });
227
+ b.m("POST").h(headers).b(body);
228
+ return b.build();
334
229
  };
335
230
  export const se_ListTagsForResourceCommand = async (input, context) => {
336
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
231
+ const b = rb(input, context);
337
232
  const headers = {};
338
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
339
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
233
+ b.bp("/v1/tags/{resourceArn}");
234
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
340
235
  let body;
341
- return new __HttpRequest({
342
- protocol,
343
- hostname,
344
- port,
345
- method: "GET",
346
- headers,
347
- path: resolvedPath,
348
- body,
349
- });
236
+ b.m("GET").h(headers).b(body);
237
+ return b.build();
350
238
  };
351
239
  export const se_RegisterJobDefinitionCommand = async (input, context) => {
352
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
240
+ const b = rb(input, context);
353
241
  const headers = {
354
242
  "content-type": "application/json",
355
243
  };
356
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/registerjobdefinition";
244
+ b.bp("/v1/registerjobdefinition");
357
245
  let body;
358
246
  body = JSON.stringify(take(input, {
359
247
  containerProperties: (_) => _json(_),
@@ -369,22 +257,15 @@ export const se_RegisterJobDefinitionCommand = async (input, context) => {
369
257
  timeout: (_) => _json(_),
370
258
  type: [],
371
259
  }));
372
- return new __HttpRequest({
373
- protocol,
374
- hostname,
375
- port,
376
- method: "POST",
377
- headers,
378
- path: resolvedPath,
379
- body,
380
- });
260
+ b.m("POST").h(headers).b(body);
261
+ return b.build();
381
262
  };
382
263
  export const se_SubmitJobCommand = async (input, context) => {
383
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
264
+ const b = rb(input, context);
384
265
  const headers = {
385
266
  "content-type": "application/json",
386
267
  };
387
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/submitjob";
268
+ b.bp("/v1/submitjob");
388
269
  let body;
389
270
  body = JSON.stringify(take(input, {
390
271
  arrayProperties: (_) => _json(_),
@@ -403,87 +284,58 @@ export const se_SubmitJobCommand = async (input, context) => {
403
284
  tags: (_) => _json(_),
404
285
  timeout: (_) => _json(_),
405
286
  }));
406
- return new __HttpRequest({
407
- protocol,
408
- hostname,
409
- port,
410
- method: "POST",
411
- headers,
412
- path: resolvedPath,
413
- body,
414
- });
287
+ b.m("POST").h(headers).b(body);
288
+ return b.build();
415
289
  };
416
290
  export const se_TagResourceCommand = async (input, context) => {
417
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
291
+ const b = rb(input, context);
418
292
  const headers = {
419
293
  "content-type": "application/json",
420
294
  };
421
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
422
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
295
+ b.bp("/v1/tags/{resourceArn}");
296
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
423
297
  let body;
424
298
  body = JSON.stringify(take(input, {
425
299
  tags: (_) => _json(_),
426
300
  }));
427
- return new __HttpRequest({
428
- protocol,
429
- hostname,
430
- port,
431
- method: "POST",
432
- headers,
433
- path: resolvedPath,
434
- body,
435
- });
301
+ b.m("POST").h(headers).b(body);
302
+ return b.build();
436
303
  };
437
304
  export const se_TerminateJobCommand = async (input, context) => {
438
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
305
+ const b = rb(input, context);
439
306
  const headers = {
440
307
  "content-type": "application/json",
441
308
  };
442
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/terminatejob";
309
+ b.bp("/v1/terminatejob");
443
310
  let body;
444
311
  body = JSON.stringify(take(input, {
445
312
  jobId: [],
446
313
  reason: [],
447
314
  }));
448
- return new __HttpRequest({
449
- protocol,
450
- hostname,
451
- port,
452
- method: "POST",
453
- headers,
454
- path: resolvedPath,
455
- body,
456
- });
315
+ b.m("POST").h(headers).b(body);
316
+ return b.build();
457
317
  };
458
318
  export const se_UntagResourceCommand = async (input, context) => {
459
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
319
+ const b = rb(input, context);
460
320
  const headers = {};
461
- let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/tags/{resourceArn}";
462
- resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
321
+ b.bp("/v1/tags/{resourceArn}");
322
+ b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
463
323
  const query = map({
464
- tagKeys: [
324
+ [_tK]: [
465
325
  __expectNonNull(input.tagKeys, `tagKeys`) != null,
466
- () => (input.tagKeys || []).map((_entry) => _entry),
326
+ () => (input[_tK] || []).map((_entry) => _entry),
467
327
  ],
468
328
  });
469
329
  let body;
470
- return new __HttpRequest({
471
- protocol,
472
- hostname,
473
- port,
474
- method: "DELETE",
475
- headers,
476
- path: resolvedPath,
477
- query,
478
- body,
479
- });
330
+ b.m("DELETE").h(headers).q(query).b(body);
331
+ return b.build();
480
332
  };
481
333
  export const se_UpdateComputeEnvironmentCommand = async (input, context) => {
482
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
334
+ const b = rb(input, context);
483
335
  const headers = {
484
336
  "content-type": "application/json",
485
337
  };
486
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatecomputeenvironment";
338
+ b.bp("/v1/updatecomputeenvironment");
487
339
  let body;
488
340
  body = JSON.stringify(take(input, {
489
341
  computeEnvironment: [],
@@ -493,22 +345,15 @@ export const se_UpdateComputeEnvironmentCommand = async (input, context) => {
493
345
  unmanagedvCpus: [],
494
346
  updatePolicy: (_) => _json(_),
495
347
  }));
496
- return new __HttpRequest({
497
- protocol,
498
- hostname,
499
- port,
500
- method: "POST",
501
- headers,
502
- path: resolvedPath,
503
- body,
504
- });
348
+ b.m("POST").h(headers).b(body);
349
+ return b.build();
505
350
  };
506
351
  export const se_UpdateJobQueueCommand = async (input, context) => {
507
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
352
+ const b = rb(input, context);
508
353
  const headers = {
509
354
  "content-type": "application/json",
510
355
  };
511
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updatejobqueue";
356
+ b.bp("/v1/updatejobqueue");
512
357
  let body;
513
358
  body = JSON.stringify(take(input, {
514
359
  computeEnvironmentOrder: (_) => _json(_),
@@ -517,36 +362,22 @@ export const se_UpdateJobQueueCommand = async (input, context) => {
517
362
  schedulingPolicyArn: [],
518
363
  state: [],
519
364
  }));
520
- return new __HttpRequest({
521
- protocol,
522
- hostname,
523
- port,
524
- method: "POST",
525
- headers,
526
- path: resolvedPath,
527
- body,
528
- });
365
+ b.m("POST").h(headers).b(body);
366
+ return b.build();
529
367
  };
530
368
  export const se_UpdateSchedulingPolicyCommand = async (input, context) => {
531
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
369
+ const b = rb(input, context);
532
370
  const headers = {
533
371
  "content-type": "application/json",
534
372
  };
535
- const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/v1/updateschedulingpolicy";
373
+ b.bp("/v1/updateschedulingpolicy");
536
374
  let body;
537
375
  body = JSON.stringify(take(input, {
538
376
  arn: [],
539
377
  fairsharePolicy: (_) => se_FairsharePolicy(_, context),
540
378
  }));
541
- return new __HttpRequest({
542
- protocol,
543
- hostname,
544
- port,
545
- method: "POST",
546
- headers,
547
- path: resolvedPath,
548
- body,
549
- });
379
+ b.m("POST").h(headers).b(body);
380
+ return b.build();
550
381
  };
551
382
  export const de_CancelJobCommand = async (output, context) => {
552
383
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1486,6 +1317,7 @@ const isSerializableHeaderValue = (value) => value !== undefined &&
1486
1317
  value !== "" &&
1487
1318
  (!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
1488
1319
  (!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
1320
+ const _tK = "tagKeys";
1489
1321
  const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
1490
1322
  if (encoded.length) {
1491
1323
  return JSON.parse(encoded);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-batch",
3
3
  "description": "AWS SDK for JavaScript Batch 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",