@aws-sdk/client-batch 3.490.0 → 3.495.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.
- package/dist-cjs/Batch.js +1 -59
- package/dist-cjs/BatchClient.js +1 -43
- package/dist-cjs/commands/CancelJobCommand.js +1 -28
- package/dist-cjs/commands/CreateComputeEnvironmentCommand.js +1 -28
- package/dist-cjs/commands/CreateJobQueueCommand.js +1 -28
- package/dist-cjs/commands/CreateSchedulingPolicyCommand.js +1 -28
- package/dist-cjs/commands/DeleteComputeEnvironmentCommand.js +1 -28
- package/dist-cjs/commands/DeleteJobQueueCommand.js +1 -28
- package/dist-cjs/commands/DeleteSchedulingPolicyCommand.js +1 -28
- package/dist-cjs/commands/DeregisterJobDefinitionCommand.js +1 -28
- package/dist-cjs/commands/DescribeComputeEnvironmentsCommand.js +1 -28
- package/dist-cjs/commands/DescribeJobDefinitionsCommand.js +1 -28
- package/dist-cjs/commands/DescribeJobQueuesCommand.js +1 -28
- package/dist-cjs/commands/DescribeJobsCommand.js +1 -28
- package/dist-cjs/commands/DescribeSchedulingPoliciesCommand.js +1 -28
- package/dist-cjs/commands/ListJobsCommand.js +1 -28
- package/dist-cjs/commands/ListSchedulingPoliciesCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/RegisterJobDefinitionCommand.js +1 -28
- package/dist-cjs/commands/SubmitJobCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/TerminateJobCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateComputeEnvironmentCommand.js +1 -28
- package/dist-cjs/commands/UpdateJobQueueCommand.js +1 -28
- package/dist-cjs/commands/UpdateSchedulingPolicyCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -27
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2241 -11
- package/dist-cjs/models/BatchServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -135
- package/dist-cjs/pagination/DescribeComputeEnvironmentsPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeJobDefinitionsPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeJobQueuesPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListJobsPaginator.js +1 -7
- package/dist-cjs/pagination/ListSchedulingPoliciesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -9
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1411
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1411 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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 core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const BatchServiceException_1 = require("../models/BatchServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CancelJobCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/v1/canceljob");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
jobId: [],
|
|
17
|
-
reason: [],
|
|
18
|
-
}));
|
|
19
|
-
b.m("POST").h(headers).b(body);
|
|
20
|
-
return b.build();
|
|
21
|
-
};
|
|
22
|
-
exports.se_CancelJobCommand = se_CancelJobCommand;
|
|
23
|
-
const se_CreateComputeEnvironmentCommand = async (input, context) => {
|
|
24
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
25
|
-
const headers = {
|
|
26
|
-
"content-type": "application/json",
|
|
27
|
-
};
|
|
28
|
-
b.bp("/v1/createcomputeenvironment");
|
|
29
|
-
let body;
|
|
30
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
31
|
-
computeEnvironmentName: [],
|
|
32
|
-
computeResources: (_) => (0, smithy_client_1._json)(_),
|
|
33
|
-
eksConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
34
|
-
serviceRole: [],
|
|
35
|
-
state: [],
|
|
36
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
37
|
-
type: [],
|
|
38
|
-
unmanagedvCpus: [],
|
|
39
|
-
}));
|
|
40
|
-
b.m("POST").h(headers).b(body);
|
|
41
|
-
return b.build();
|
|
42
|
-
};
|
|
43
|
-
exports.se_CreateComputeEnvironmentCommand = se_CreateComputeEnvironmentCommand;
|
|
44
|
-
const se_CreateJobQueueCommand = async (input, context) => {
|
|
45
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
46
|
-
const headers = {
|
|
47
|
-
"content-type": "application/json",
|
|
48
|
-
};
|
|
49
|
-
b.bp("/v1/createjobqueue");
|
|
50
|
-
let body;
|
|
51
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
52
|
-
computeEnvironmentOrder: (_) => (0, smithy_client_1._json)(_),
|
|
53
|
-
jobQueueName: [],
|
|
54
|
-
priority: [],
|
|
55
|
-
schedulingPolicyArn: [],
|
|
56
|
-
state: [],
|
|
57
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
58
|
-
}));
|
|
59
|
-
b.m("POST").h(headers).b(body);
|
|
60
|
-
return b.build();
|
|
61
|
-
};
|
|
62
|
-
exports.se_CreateJobQueueCommand = se_CreateJobQueueCommand;
|
|
63
|
-
const se_CreateSchedulingPolicyCommand = async (input, context) => {
|
|
64
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
65
|
-
const headers = {
|
|
66
|
-
"content-type": "application/json",
|
|
67
|
-
};
|
|
68
|
-
b.bp("/v1/createschedulingpolicy");
|
|
69
|
-
let body;
|
|
70
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
71
|
-
fairsharePolicy: (_) => se_FairsharePolicy(_, context),
|
|
72
|
-
name: [],
|
|
73
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
74
|
-
}));
|
|
75
|
-
b.m("POST").h(headers).b(body);
|
|
76
|
-
return b.build();
|
|
77
|
-
};
|
|
78
|
-
exports.se_CreateSchedulingPolicyCommand = se_CreateSchedulingPolicyCommand;
|
|
79
|
-
const se_DeleteComputeEnvironmentCommand = async (input, context) => {
|
|
80
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
81
|
-
const headers = {
|
|
82
|
-
"content-type": "application/json",
|
|
83
|
-
};
|
|
84
|
-
b.bp("/v1/deletecomputeenvironment");
|
|
85
|
-
let body;
|
|
86
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
87
|
-
computeEnvironment: [],
|
|
88
|
-
}));
|
|
89
|
-
b.m("POST").h(headers).b(body);
|
|
90
|
-
return b.build();
|
|
91
|
-
};
|
|
92
|
-
exports.se_DeleteComputeEnvironmentCommand = se_DeleteComputeEnvironmentCommand;
|
|
93
|
-
const se_DeleteJobQueueCommand = async (input, context) => {
|
|
94
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
95
|
-
const headers = {
|
|
96
|
-
"content-type": "application/json",
|
|
97
|
-
};
|
|
98
|
-
b.bp("/v1/deletejobqueue");
|
|
99
|
-
let body;
|
|
100
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
101
|
-
jobQueue: [],
|
|
102
|
-
}));
|
|
103
|
-
b.m("POST").h(headers).b(body);
|
|
104
|
-
return b.build();
|
|
105
|
-
};
|
|
106
|
-
exports.se_DeleteJobQueueCommand = se_DeleteJobQueueCommand;
|
|
107
|
-
const se_DeleteSchedulingPolicyCommand = async (input, context) => {
|
|
108
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
109
|
-
const headers = {
|
|
110
|
-
"content-type": "application/json",
|
|
111
|
-
};
|
|
112
|
-
b.bp("/v1/deleteschedulingpolicy");
|
|
113
|
-
let body;
|
|
114
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
115
|
-
arn: [],
|
|
116
|
-
}));
|
|
117
|
-
b.m("POST").h(headers).b(body);
|
|
118
|
-
return b.build();
|
|
119
|
-
};
|
|
120
|
-
exports.se_DeleteSchedulingPolicyCommand = se_DeleteSchedulingPolicyCommand;
|
|
121
|
-
const se_DeregisterJobDefinitionCommand = async (input, context) => {
|
|
122
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
123
|
-
const headers = {
|
|
124
|
-
"content-type": "application/json",
|
|
125
|
-
};
|
|
126
|
-
b.bp("/v1/deregisterjobdefinition");
|
|
127
|
-
let body;
|
|
128
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
129
|
-
jobDefinition: [],
|
|
130
|
-
}));
|
|
131
|
-
b.m("POST").h(headers).b(body);
|
|
132
|
-
return b.build();
|
|
133
|
-
};
|
|
134
|
-
exports.se_DeregisterJobDefinitionCommand = se_DeregisterJobDefinitionCommand;
|
|
135
|
-
const se_DescribeComputeEnvironmentsCommand = async (input, context) => {
|
|
136
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
137
|
-
const headers = {
|
|
138
|
-
"content-type": "application/json",
|
|
139
|
-
};
|
|
140
|
-
b.bp("/v1/describecomputeenvironments");
|
|
141
|
-
let body;
|
|
142
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
143
|
-
computeEnvironments: (_) => (0, smithy_client_1._json)(_),
|
|
144
|
-
maxResults: [],
|
|
145
|
-
nextToken: [],
|
|
146
|
-
}));
|
|
147
|
-
b.m("POST").h(headers).b(body);
|
|
148
|
-
return b.build();
|
|
149
|
-
};
|
|
150
|
-
exports.se_DescribeComputeEnvironmentsCommand = se_DescribeComputeEnvironmentsCommand;
|
|
151
|
-
const se_DescribeJobDefinitionsCommand = async (input, context) => {
|
|
152
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
153
|
-
const headers = {
|
|
154
|
-
"content-type": "application/json",
|
|
155
|
-
};
|
|
156
|
-
b.bp("/v1/describejobdefinitions");
|
|
157
|
-
let body;
|
|
158
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
159
|
-
jobDefinitionName: [],
|
|
160
|
-
jobDefinitions: (_) => (0, smithy_client_1._json)(_),
|
|
161
|
-
maxResults: [],
|
|
162
|
-
nextToken: [],
|
|
163
|
-
status: [],
|
|
164
|
-
}));
|
|
165
|
-
b.m("POST").h(headers).b(body);
|
|
166
|
-
return b.build();
|
|
167
|
-
};
|
|
168
|
-
exports.se_DescribeJobDefinitionsCommand = se_DescribeJobDefinitionsCommand;
|
|
169
|
-
const se_DescribeJobQueuesCommand = async (input, context) => {
|
|
170
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
171
|
-
const headers = {
|
|
172
|
-
"content-type": "application/json",
|
|
173
|
-
};
|
|
174
|
-
b.bp("/v1/describejobqueues");
|
|
175
|
-
let body;
|
|
176
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
177
|
-
jobQueues: (_) => (0, smithy_client_1._json)(_),
|
|
178
|
-
maxResults: [],
|
|
179
|
-
nextToken: [],
|
|
180
|
-
}));
|
|
181
|
-
b.m("POST").h(headers).b(body);
|
|
182
|
-
return b.build();
|
|
183
|
-
};
|
|
184
|
-
exports.se_DescribeJobQueuesCommand = se_DescribeJobQueuesCommand;
|
|
185
|
-
const se_DescribeJobsCommand = async (input, context) => {
|
|
186
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
187
|
-
const headers = {
|
|
188
|
-
"content-type": "application/json",
|
|
189
|
-
};
|
|
190
|
-
b.bp("/v1/describejobs");
|
|
191
|
-
let body;
|
|
192
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
193
|
-
jobs: (_) => (0, smithy_client_1._json)(_),
|
|
194
|
-
}));
|
|
195
|
-
b.m("POST").h(headers).b(body);
|
|
196
|
-
return b.build();
|
|
197
|
-
};
|
|
198
|
-
exports.se_DescribeJobsCommand = se_DescribeJobsCommand;
|
|
199
|
-
const se_DescribeSchedulingPoliciesCommand = async (input, context) => {
|
|
200
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
201
|
-
const headers = {
|
|
202
|
-
"content-type": "application/json",
|
|
203
|
-
};
|
|
204
|
-
b.bp("/v1/describeschedulingpolicies");
|
|
205
|
-
let body;
|
|
206
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
207
|
-
arns: (_) => (0, smithy_client_1._json)(_),
|
|
208
|
-
}));
|
|
209
|
-
b.m("POST").h(headers).b(body);
|
|
210
|
-
return b.build();
|
|
211
|
-
};
|
|
212
|
-
exports.se_DescribeSchedulingPoliciesCommand = se_DescribeSchedulingPoliciesCommand;
|
|
213
|
-
const se_ListJobsCommand = async (input, context) => {
|
|
214
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
215
|
-
const headers = {
|
|
216
|
-
"content-type": "application/json",
|
|
217
|
-
};
|
|
218
|
-
b.bp("/v1/listjobs");
|
|
219
|
-
let body;
|
|
220
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
221
|
-
arrayJobId: [],
|
|
222
|
-
filters: (_) => (0, smithy_client_1._json)(_),
|
|
223
|
-
jobQueue: [],
|
|
224
|
-
jobStatus: [],
|
|
225
|
-
maxResults: [],
|
|
226
|
-
multiNodeJobId: [],
|
|
227
|
-
nextToken: [],
|
|
228
|
-
}));
|
|
229
|
-
b.m("POST").h(headers).b(body);
|
|
230
|
-
return b.build();
|
|
231
|
-
};
|
|
232
|
-
exports.se_ListJobsCommand = se_ListJobsCommand;
|
|
233
|
-
const se_ListSchedulingPoliciesCommand = async (input, context) => {
|
|
234
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
235
|
-
const headers = {
|
|
236
|
-
"content-type": "application/json",
|
|
237
|
-
};
|
|
238
|
-
b.bp("/v1/listschedulingpolicies");
|
|
239
|
-
let body;
|
|
240
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
241
|
-
maxResults: [],
|
|
242
|
-
nextToken: [],
|
|
243
|
-
}));
|
|
244
|
-
b.m("POST").h(headers).b(body);
|
|
245
|
-
return b.build();
|
|
246
|
-
};
|
|
247
|
-
exports.se_ListSchedulingPoliciesCommand = se_ListSchedulingPoliciesCommand;
|
|
248
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
249
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
250
|
-
const headers = {};
|
|
251
|
-
b.bp("/v1/tags/{resourceArn}");
|
|
252
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
253
|
-
let body;
|
|
254
|
-
b.m("GET").h(headers).b(body);
|
|
255
|
-
return b.build();
|
|
256
|
-
};
|
|
257
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
258
|
-
const se_RegisterJobDefinitionCommand = async (input, context) => {
|
|
259
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
260
|
-
const headers = {
|
|
261
|
-
"content-type": "application/json",
|
|
262
|
-
};
|
|
263
|
-
b.bp("/v1/registerjobdefinition");
|
|
264
|
-
let body;
|
|
265
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
266
|
-
containerProperties: (_) => (0, smithy_client_1._json)(_),
|
|
267
|
-
eksProperties: (_) => (0, smithy_client_1._json)(_),
|
|
268
|
-
jobDefinitionName: [],
|
|
269
|
-
nodeProperties: (_) => (0, smithy_client_1._json)(_),
|
|
270
|
-
parameters: (_) => (0, smithy_client_1._json)(_),
|
|
271
|
-
platformCapabilities: (_) => (0, smithy_client_1._json)(_),
|
|
272
|
-
propagateTags: [],
|
|
273
|
-
retryStrategy: (_) => (0, smithy_client_1._json)(_),
|
|
274
|
-
schedulingPriority: [],
|
|
275
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
276
|
-
timeout: (_) => (0, smithy_client_1._json)(_),
|
|
277
|
-
type: [],
|
|
278
|
-
}));
|
|
279
|
-
b.m("POST").h(headers).b(body);
|
|
280
|
-
return b.build();
|
|
281
|
-
};
|
|
282
|
-
exports.se_RegisterJobDefinitionCommand = se_RegisterJobDefinitionCommand;
|
|
283
|
-
const se_SubmitJobCommand = async (input, context) => {
|
|
284
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
285
|
-
const headers = {
|
|
286
|
-
"content-type": "application/json",
|
|
287
|
-
};
|
|
288
|
-
b.bp("/v1/submitjob");
|
|
289
|
-
let body;
|
|
290
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
291
|
-
arrayProperties: (_) => (0, smithy_client_1._json)(_),
|
|
292
|
-
containerOverrides: (_) => (0, smithy_client_1._json)(_),
|
|
293
|
-
dependsOn: (_) => (0, smithy_client_1._json)(_),
|
|
294
|
-
eksPropertiesOverride: (_) => (0, smithy_client_1._json)(_),
|
|
295
|
-
jobDefinition: [],
|
|
296
|
-
jobName: [],
|
|
297
|
-
jobQueue: [],
|
|
298
|
-
nodeOverrides: (_) => (0, smithy_client_1._json)(_),
|
|
299
|
-
parameters: (_) => (0, smithy_client_1._json)(_),
|
|
300
|
-
propagateTags: [],
|
|
301
|
-
retryStrategy: (_) => (0, smithy_client_1._json)(_),
|
|
302
|
-
schedulingPriorityOverride: [],
|
|
303
|
-
shareIdentifier: [],
|
|
304
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
305
|
-
timeout: (_) => (0, smithy_client_1._json)(_),
|
|
306
|
-
}));
|
|
307
|
-
b.m("POST").h(headers).b(body);
|
|
308
|
-
return b.build();
|
|
309
|
-
};
|
|
310
|
-
exports.se_SubmitJobCommand = se_SubmitJobCommand;
|
|
311
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
312
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
313
|
-
const headers = {
|
|
314
|
-
"content-type": "application/json",
|
|
315
|
-
};
|
|
316
|
-
b.bp("/v1/tags/{resourceArn}");
|
|
317
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
318
|
-
let body;
|
|
319
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
320
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
321
|
-
}));
|
|
322
|
-
b.m("POST").h(headers).b(body);
|
|
323
|
-
return b.build();
|
|
324
|
-
};
|
|
325
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
326
|
-
const se_TerminateJobCommand = async (input, context) => {
|
|
327
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
328
|
-
const headers = {
|
|
329
|
-
"content-type": "application/json",
|
|
330
|
-
};
|
|
331
|
-
b.bp("/v1/terminatejob");
|
|
332
|
-
let body;
|
|
333
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
334
|
-
jobId: [],
|
|
335
|
-
reason: [],
|
|
336
|
-
}));
|
|
337
|
-
b.m("POST").h(headers).b(body);
|
|
338
|
-
return b.build();
|
|
339
|
-
};
|
|
340
|
-
exports.se_TerminateJobCommand = se_TerminateJobCommand;
|
|
341
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
342
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
343
|
-
const headers = {};
|
|
344
|
-
b.bp("/v1/tags/{resourceArn}");
|
|
345
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
346
|
-
const query = (0, smithy_client_1.map)({
|
|
347
|
-
[_tK]: [
|
|
348
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
349
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
350
|
-
],
|
|
351
|
-
});
|
|
352
|
-
let body;
|
|
353
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
354
|
-
return b.build();
|
|
355
|
-
};
|
|
356
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
357
|
-
const se_UpdateComputeEnvironmentCommand = async (input, context) => {
|
|
358
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
359
|
-
const headers = {
|
|
360
|
-
"content-type": "application/json",
|
|
361
|
-
};
|
|
362
|
-
b.bp("/v1/updatecomputeenvironment");
|
|
363
|
-
let body;
|
|
364
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
365
|
-
computeEnvironment: [],
|
|
366
|
-
computeResources: (_) => (0, smithy_client_1._json)(_),
|
|
367
|
-
serviceRole: [],
|
|
368
|
-
state: [],
|
|
369
|
-
unmanagedvCpus: [],
|
|
370
|
-
updatePolicy: (_) => (0, smithy_client_1._json)(_),
|
|
371
|
-
}));
|
|
372
|
-
b.m("POST").h(headers).b(body);
|
|
373
|
-
return b.build();
|
|
374
|
-
};
|
|
375
|
-
exports.se_UpdateComputeEnvironmentCommand = se_UpdateComputeEnvironmentCommand;
|
|
376
|
-
const se_UpdateJobQueueCommand = async (input, context) => {
|
|
377
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
378
|
-
const headers = {
|
|
379
|
-
"content-type": "application/json",
|
|
380
|
-
};
|
|
381
|
-
b.bp("/v1/updatejobqueue");
|
|
382
|
-
let body;
|
|
383
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
384
|
-
computeEnvironmentOrder: (_) => (0, smithy_client_1._json)(_),
|
|
385
|
-
jobQueue: [],
|
|
386
|
-
priority: [],
|
|
387
|
-
schedulingPolicyArn: [],
|
|
388
|
-
state: [],
|
|
389
|
-
}));
|
|
390
|
-
b.m("POST").h(headers).b(body);
|
|
391
|
-
return b.build();
|
|
392
|
-
};
|
|
393
|
-
exports.se_UpdateJobQueueCommand = se_UpdateJobQueueCommand;
|
|
394
|
-
const se_UpdateSchedulingPolicyCommand = async (input, context) => {
|
|
395
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
396
|
-
const headers = {
|
|
397
|
-
"content-type": "application/json",
|
|
398
|
-
};
|
|
399
|
-
b.bp("/v1/updateschedulingpolicy");
|
|
400
|
-
let body;
|
|
401
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
402
|
-
arn: [],
|
|
403
|
-
fairsharePolicy: (_) => se_FairsharePolicy(_, context),
|
|
404
|
-
}));
|
|
405
|
-
b.m("POST").h(headers).b(body);
|
|
406
|
-
return b.build();
|
|
407
|
-
};
|
|
408
|
-
exports.se_UpdateSchedulingPolicyCommand = se_UpdateSchedulingPolicyCommand;
|
|
409
|
-
const de_CancelJobCommand = async (output, context) => {
|
|
410
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
411
|
-
return de_CancelJobCommandError(output, context);
|
|
412
|
-
}
|
|
413
|
-
const contents = (0, smithy_client_1.map)({
|
|
414
|
-
$metadata: deserializeMetadata(output),
|
|
415
|
-
});
|
|
416
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
417
|
-
return contents;
|
|
418
|
-
};
|
|
419
|
-
exports.de_CancelJobCommand = de_CancelJobCommand;
|
|
420
|
-
const de_CancelJobCommandError = async (output, context) => {
|
|
421
|
-
const parsedOutput = {
|
|
422
|
-
...output,
|
|
423
|
-
body: await parseErrorBody(output.body, context),
|
|
424
|
-
};
|
|
425
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
426
|
-
switch (errorCode) {
|
|
427
|
-
case "ClientException":
|
|
428
|
-
case "com.amazonaws.batch#ClientException":
|
|
429
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
430
|
-
case "ServerException":
|
|
431
|
-
case "com.amazonaws.batch#ServerException":
|
|
432
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
433
|
-
default:
|
|
434
|
-
const parsedBody = parsedOutput.body;
|
|
435
|
-
return throwDefaultError({
|
|
436
|
-
output,
|
|
437
|
-
parsedBody,
|
|
438
|
-
errorCode,
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
const de_CreateComputeEnvironmentCommand = async (output, context) => {
|
|
443
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
444
|
-
return de_CreateComputeEnvironmentCommandError(output, context);
|
|
445
|
-
}
|
|
446
|
-
const contents = (0, smithy_client_1.map)({
|
|
447
|
-
$metadata: deserializeMetadata(output),
|
|
448
|
-
});
|
|
449
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
450
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
451
|
-
computeEnvironmentArn: smithy_client_1.expectString,
|
|
452
|
-
computeEnvironmentName: smithy_client_1.expectString,
|
|
453
|
-
});
|
|
454
|
-
Object.assign(contents, doc);
|
|
455
|
-
return contents;
|
|
456
|
-
};
|
|
457
|
-
exports.de_CreateComputeEnvironmentCommand = de_CreateComputeEnvironmentCommand;
|
|
458
|
-
const de_CreateComputeEnvironmentCommandError = async (output, context) => {
|
|
459
|
-
const parsedOutput = {
|
|
460
|
-
...output,
|
|
461
|
-
body: await parseErrorBody(output.body, context),
|
|
462
|
-
};
|
|
463
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
464
|
-
switch (errorCode) {
|
|
465
|
-
case "ClientException":
|
|
466
|
-
case "com.amazonaws.batch#ClientException":
|
|
467
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
468
|
-
case "ServerException":
|
|
469
|
-
case "com.amazonaws.batch#ServerException":
|
|
470
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
471
|
-
default:
|
|
472
|
-
const parsedBody = parsedOutput.body;
|
|
473
|
-
return throwDefaultError({
|
|
474
|
-
output,
|
|
475
|
-
parsedBody,
|
|
476
|
-
errorCode,
|
|
477
|
-
});
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
const de_CreateJobQueueCommand = async (output, context) => {
|
|
481
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
482
|
-
return de_CreateJobQueueCommandError(output, context);
|
|
483
|
-
}
|
|
484
|
-
const contents = (0, smithy_client_1.map)({
|
|
485
|
-
$metadata: deserializeMetadata(output),
|
|
486
|
-
});
|
|
487
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
488
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
489
|
-
jobQueueArn: smithy_client_1.expectString,
|
|
490
|
-
jobQueueName: smithy_client_1.expectString,
|
|
491
|
-
});
|
|
492
|
-
Object.assign(contents, doc);
|
|
493
|
-
return contents;
|
|
494
|
-
};
|
|
495
|
-
exports.de_CreateJobQueueCommand = de_CreateJobQueueCommand;
|
|
496
|
-
const de_CreateJobQueueCommandError = async (output, context) => {
|
|
497
|
-
const parsedOutput = {
|
|
498
|
-
...output,
|
|
499
|
-
body: await parseErrorBody(output.body, context),
|
|
500
|
-
};
|
|
501
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
502
|
-
switch (errorCode) {
|
|
503
|
-
case "ClientException":
|
|
504
|
-
case "com.amazonaws.batch#ClientException":
|
|
505
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
506
|
-
case "ServerException":
|
|
507
|
-
case "com.amazonaws.batch#ServerException":
|
|
508
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
509
|
-
default:
|
|
510
|
-
const parsedBody = parsedOutput.body;
|
|
511
|
-
return throwDefaultError({
|
|
512
|
-
output,
|
|
513
|
-
parsedBody,
|
|
514
|
-
errorCode,
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
};
|
|
518
|
-
const de_CreateSchedulingPolicyCommand = async (output, context) => {
|
|
519
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
520
|
-
return de_CreateSchedulingPolicyCommandError(output, context);
|
|
521
|
-
}
|
|
522
|
-
const contents = (0, smithy_client_1.map)({
|
|
523
|
-
$metadata: deserializeMetadata(output),
|
|
524
|
-
});
|
|
525
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
526
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
527
|
-
arn: smithy_client_1.expectString,
|
|
528
|
-
name: smithy_client_1.expectString,
|
|
529
|
-
});
|
|
530
|
-
Object.assign(contents, doc);
|
|
531
|
-
return contents;
|
|
532
|
-
};
|
|
533
|
-
exports.de_CreateSchedulingPolicyCommand = de_CreateSchedulingPolicyCommand;
|
|
534
|
-
const de_CreateSchedulingPolicyCommandError = async (output, context) => {
|
|
535
|
-
const parsedOutput = {
|
|
536
|
-
...output,
|
|
537
|
-
body: await parseErrorBody(output.body, context),
|
|
538
|
-
};
|
|
539
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
540
|
-
switch (errorCode) {
|
|
541
|
-
case "ClientException":
|
|
542
|
-
case "com.amazonaws.batch#ClientException":
|
|
543
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
544
|
-
case "ServerException":
|
|
545
|
-
case "com.amazonaws.batch#ServerException":
|
|
546
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
547
|
-
default:
|
|
548
|
-
const parsedBody = parsedOutput.body;
|
|
549
|
-
return throwDefaultError({
|
|
550
|
-
output,
|
|
551
|
-
parsedBody,
|
|
552
|
-
errorCode,
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
};
|
|
556
|
-
const de_DeleteComputeEnvironmentCommand = async (output, context) => {
|
|
557
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
558
|
-
return de_DeleteComputeEnvironmentCommandError(output, context);
|
|
559
|
-
}
|
|
560
|
-
const contents = (0, smithy_client_1.map)({
|
|
561
|
-
$metadata: deserializeMetadata(output),
|
|
562
|
-
});
|
|
563
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
564
|
-
return contents;
|
|
565
|
-
};
|
|
566
|
-
exports.de_DeleteComputeEnvironmentCommand = de_DeleteComputeEnvironmentCommand;
|
|
567
|
-
const de_DeleteComputeEnvironmentCommandError = async (output, context) => {
|
|
568
|
-
const parsedOutput = {
|
|
569
|
-
...output,
|
|
570
|
-
body: await parseErrorBody(output.body, context),
|
|
571
|
-
};
|
|
572
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
573
|
-
switch (errorCode) {
|
|
574
|
-
case "ClientException":
|
|
575
|
-
case "com.amazonaws.batch#ClientException":
|
|
576
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
577
|
-
case "ServerException":
|
|
578
|
-
case "com.amazonaws.batch#ServerException":
|
|
579
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
580
|
-
default:
|
|
581
|
-
const parsedBody = parsedOutput.body;
|
|
582
|
-
return throwDefaultError({
|
|
583
|
-
output,
|
|
584
|
-
parsedBody,
|
|
585
|
-
errorCode,
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
const de_DeleteJobQueueCommand = async (output, context) => {
|
|
590
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
591
|
-
return de_DeleteJobQueueCommandError(output, context);
|
|
592
|
-
}
|
|
593
|
-
const contents = (0, smithy_client_1.map)({
|
|
594
|
-
$metadata: deserializeMetadata(output),
|
|
595
|
-
});
|
|
596
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
597
|
-
return contents;
|
|
598
|
-
};
|
|
599
|
-
exports.de_DeleteJobQueueCommand = de_DeleteJobQueueCommand;
|
|
600
|
-
const de_DeleteJobQueueCommandError = async (output, context) => {
|
|
601
|
-
const parsedOutput = {
|
|
602
|
-
...output,
|
|
603
|
-
body: await parseErrorBody(output.body, context),
|
|
604
|
-
};
|
|
605
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
606
|
-
switch (errorCode) {
|
|
607
|
-
case "ClientException":
|
|
608
|
-
case "com.amazonaws.batch#ClientException":
|
|
609
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
610
|
-
case "ServerException":
|
|
611
|
-
case "com.amazonaws.batch#ServerException":
|
|
612
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
613
|
-
default:
|
|
614
|
-
const parsedBody = parsedOutput.body;
|
|
615
|
-
return throwDefaultError({
|
|
616
|
-
output,
|
|
617
|
-
parsedBody,
|
|
618
|
-
errorCode,
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
};
|
|
622
|
-
const de_DeleteSchedulingPolicyCommand = async (output, context) => {
|
|
623
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
624
|
-
return de_DeleteSchedulingPolicyCommandError(output, context);
|
|
625
|
-
}
|
|
626
|
-
const contents = (0, smithy_client_1.map)({
|
|
627
|
-
$metadata: deserializeMetadata(output),
|
|
628
|
-
});
|
|
629
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
630
|
-
return contents;
|
|
631
|
-
};
|
|
632
|
-
exports.de_DeleteSchedulingPolicyCommand = de_DeleteSchedulingPolicyCommand;
|
|
633
|
-
const de_DeleteSchedulingPolicyCommandError = async (output, context) => {
|
|
634
|
-
const parsedOutput = {
|
|
635
|
-
...output,
|
|
636
|
-
body: await parseErrorBody(output.body, context),
|
|
637
|
-
};
|
|
638
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
639
|
-
switch (errorCode) {
|
|
640
|
-
case "ClientException":
|
|
641
|
-
case "com.amazonaws.batch#ClientException":
|
|
642
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
643
|
-
case "ServerException":
|
|
644
|
-
case "com.amazonaws.batch#ServerException":
|
|
645
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
646
|
-
default:
|
|
647
|
-
const parsedBody = parsedOutput.body;
|
|
648
|
-
return throwDefaultError({
|
|
649
|
-
output,
|
|
650
|
-
parsedBody,
|
|
651
|
-
errorCode,
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
};
|
|
655
|
-
const de_DeregisterJobDefinitionCommand = async (output, context) => {
|
|
656
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
657
|
-
return de_DeregisterJobDefinitionCommandError(output, context);
|
|
658
|
-
}
|
|
659
|
-
const contents = (0, smithy_client_1.map)({
|
|
660
|
-
$metadata: deserializeMetadata(output),
|
|
661
|
-
});
|
|
662
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
663
|
-
return contents;
|
|
664
|
-
};
|
|
665
|
-
exports.de_DeregisterJobDefinitionCommand = de_DeregisterJobDefinitionCommand;
|
|
666
|
-
const de_DeregisterJobDefinitionCommandError = async (output, context) => {
|
|
667
|
-
const parsedOutput = {
|
|
668
|
-
...output,
|
|
669
|
-
body: await parseErrorBody(output.body, context),
|
|
670
|
-
};
|
|
671
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
672
|
-
switch (errorCode) {
|
|
673
|
-
case "ClientException":
|
|
674
|
-
case "com.amazonaws.batch#ClientException":
|
|
675
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
676
|
-
case "ServerException":
|
|
677
|
-
case "com.amazonaws.batch#ServerException":
|
|
678
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
679
|
-
default:
|
|
680
|
-
const parsedBody = parsedOutput.body;
|
|
681
|
-
return throwDefaultError({
|
|
682
|
-
output,
|
|
683
|
-
parsedBody,
|
|
684
|
-
errorCode,
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
};
|
|
688
|
-
const de_DescribeComputeEnvironmentsCommand = async (output, context) => {
|
|
689
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
690
|
-
return de_DescribeComputeEnvironmentsCommandError(output, context);
|
|
691
|
-
}
|
|
692
|
-
const contents = (0, smithy_client_1.map)({
|
|
693
|
-
$metadata: deserializeMetadata(output),
|
|
694
|
-
});
|
|
695
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
696
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
697
|
-
computeEnvironments: smithy_client_1._json,
|
|
698
|
-
nextToken: smithy_client_1.expectString,
|
|
699
|
-
});
|
|
700
|
-
Object.assign(contents, doc);
|
|
701
|
-
return contents;
|
|
702
|
-
};
|
|
703
|
-
exports.de_DescribeComputeEnvironmentsCommand = de_DescribeComputeEnvironmentsCommand;
|
|
704
|
-
const de_DescribeComputeEnvironmentsCommandError = async (output, context) => {
|
|
705
|
-
const parsedOutput = {
|
|
706
|
-
...output,
|
|
707
|
-
body: await parseErrorBody(output.body, context),
|
|
708
|
-
};
|
|
709
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
710
|
-
switch (errorCode) {
|
|
711
|
-
case "ClientException":
|
|
712
|
-
case "com.amazonaws.batch#ClientException":
|
|
713
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
714
|
-
case "ServerException":
|
|
715
|
-
case "com.amazonaws.batch#ServerException":
|
|
716
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
717
|
-
default:
|
|
718
|
-
const parsedBody = parsedOutput.body;
|
|
719
|
-
return throwDefaultError({
|
|
720
|
-
output,
|
|
721
|
-
parsedBody,
|
|
722
|
-
errorCode,
|
|
723
|
-
});
|
|
724
|
-
}
|
|
725
|
-
};
|
|
726
|
-
const de_DescribeJobDefinitionsCommand = async (output, context) => {
|
|
727
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
728
|
-
return de_DescribeJobDefinitionsCommandError(output, context);
|
|
729
|
-
}
|
|
730
|
-
const contents = (0, smithy_client_1.map)({
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
});
|
|
733
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
734
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
735
|
-
jobDefinitions: smithy_client_1._json,
|
|
736
|
-
nextToken: smithy_client_1.expectString,
|
|
737
|
-
});
|
|
738
|
-
Object.assign(contents, doc);
|
|
739
|
-
return contents;
|
|
740
|
-
};
|
|
741
|
-
exports.de_DescribeJobDefinitionsCommand = de_DescribeJobDefinitionsCommand;
|
|
742
|
-
const de_DescribeJobDefinitionsCommandError = async (output, context) => {
|
|
743
|
-
const parsedOutput = {
|
|
744
|
-
...output,
|
|
745
|
-
body: await parseErrorBody(output.body, context),
|
|
746
|
-
};
|
|
747
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
748
|
-
switch (errorCode) {
|
|
749
|
-
case "ClientException":
|
|
750
|
-
case "com.amazonaws.batch#ClientException":
|
|
751
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
752
|
-
case "ServerException":
|
|
753
|
-
case "com.amazonaws.batch#ServerException":
|
|
754
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
755
|
-
default:
|
|
756
|
-
const parsedBody = parsedOutput.body;
|
|
757
|
-
return throwDefaultError({
|
|
758
|
-
output,
|
|
759
|
-
parsedBody,
|
|
760
|
-
errorCode,
|
|
761
|
-
});
|
|
762
|
-
}
|
|
763
|
-
};
|
|
764
|
-
const de_DescribeJobQueuesCommand = async (output, context) => {
|
|
765
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
766
|
-
return de_DescribeJobQueuesCommandError(output, context);
|
|
767
|
-
}
|
|
768
|
-
const contents = (0, smithy_client_1.map)({
|
|
769
|
-
$metadata: deserializeMetadata(output),
|
|
770
|
-
});
|
|
771
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
772
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
773
|
-
jobQueues: smithy_client_1._json,
|
|
774
|
-
nextToken: smithy_client_1.expectString,
|
|
775
|
-
});
|
|
776
|
-
Object.assign(contents, doc);
|
|
777
|
-
return contents;
|
|
778
|
-
};
|
|
779
|
-
exports.de_DescribeJobQueuesCommand = de_DescribeJobQueuesCommand;
|
|
780
|
-
const de_DescribeJobQueuesCommandError = async (output, context) => {
|
|
781
|
-
const parsedOutput = {
|
|
782
|
-
...output,
|
|
783
|
-
body: await parseErrorBody(output.body, context),
|
|
784
|
-
};
|
|
785
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
786
|
-
switch (errorCode) {
|
|
787
|
-
case "ClientException":
|
|
788
|
-
case "com.amazonaws.batch#ClientException":
|
|
789
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
790
|
-
case "ServerException":
|
|
791
|
-
case "com.amazonaws.batch#ServerException":
|
|
792
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
793
|
-
default:
|
|
794
|
-
const parsedBody = parsedOutput.body;
|
|
795
|
-
return throwDefaultError({
|
|
796
|
-
output,
|
|
797
|
-
parsedBody,
|
|
798
|
-
errorCode,
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
};
|
|
802
|
-
const de_DescribeJobsCommand = async (output, context) => {
|
|
803
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
804
|
-
return de_DescribeJobsCommandError(output, context);
|
|
805
|
-
}
|
|
806
|
-
const contents = (0, smithy_client_1.map)({
|
|
807
|
-
$metadata: deserializeMetadata(output),
|
|
808
|
-
});
|
|
809
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
810
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
811
|
-
jobs: smithy_client_1._json,
|
|
812
|
-
});
|
|
813
|
-
Object.assign(contents, doc);
|
|
814
|
-
return contents;
|
|
815
|
-
};
|
|
816
|
-
exports.de_DescribeJobsCommand = de_DescribeJobsCommand;
|
|
817
|
-
const de_DescribeJobsCommandError = async (output, context) => {
|
|
818
|
-
const parsedOutput = {
|
|
819
|
-
...output,
|
|
820
|
-
body: await parseErrorBody(output.body, context),
|
|
821
|
-
};
|
|
822
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
823
|
-
switch (errorCode) {
|
|
824
|
-
case "ClientException":
|
|
825
|
-
case "com.amazonaws.batch#ClientException":
|
|
826
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
827
|
-
case "ServerException":
|
|
828
|
-
case "com.amazonaws.batch#ServerException":
|
|
829
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
830
|
-
default:
|
|
831
|
-
const parsedBody = parsedOutput.body;
|
|
832
|
-
return throwDefaultError({
|
|
833
|
-
output,
|
|
834
|
-
parsedBody,
|
|
835
|
-
errorCode,
|
|
836
|
-
});
|
|
837
|
-
}
|
|
838
|
-
};
|
|
839
|
-
const de_DescribeSchedulingPoliciesCommand = async (output, context) => {
|
|
840
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
841
|
-
return de_DescribeSchedulingPoliciesCommandError(output, context);
|
|
842
|
-
}
|
|
843
|
-
const contents = (0, smithy_client_1.map)({
|
|
844
|
-
$metadata: deserializeMetadata(output),
|
|
845
|
-
});
|
|
846
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
847
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
848
|
-
schedulingPolicies: (_) => de_SchedulingPolicyDetailList(_, context),
|
|
849
|
-
});
|
|
850
|
-
Object.assign(contents, doc);
|
|
851
|
-
return contents;
|
|
852
|
-
};
|
|
853
|
-
exports.de_DescribeSchedulingPoliciesCommand = de_DescribeSchedulingPoliciesCommand;
|
|
854
|
-
const de_DescribeSchedulingPoliciesCommandError = async (output, context) => {
|
|
855
|
-
const parsedOutput = {
|
|
856
|
-
...output,
|
|
857
|
-
body: await parseErrorBody(output.body, context),
|
|
858
|
-
};
|
|
859
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
860
|
-
switch (errorCode) {
|
|
861
|
-
case "ClientException":
|
|
862
|
-
case "com.amazonaws.batch#ClientException":
|
|
863
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
864
|
-
case "ServerException":
|
|
865
|
-
case "com.amazonaws.batch#ServerException":
|
|
866
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
867
|
-
default:
|
|
868
|
-
const parsedBody = parsedOutput.body;
|
|
869
|
-
return throwDefaultError({
|
|
870
|
-
output,
|
|
871
|
-
parsedBody,
|
|
872
|
-
errorCode,
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
};
|
|
876
|
-
const de_ListJobsCommand = async (output, context) => {
|
|
877
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
878
|
-
return de_ListJobsCommandError(output, context);
|
|
879
|
-
}
|
|
880
|
-
const contents = (0, smithy_client_1.map)({
|
|
881
|
-
$metadata: deserializeMetadata(output),
|
|
882
|
-
});
|
|
883
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
884
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
885
|
-
jobSummaryList: smithy_client_1._json,
|
|
886
|
-
nextToken: smithy_client_1.expectString,
|
|
887
|
-
});
|
|
888
|
-
Object.assign(contents, doc);
|
|
889
|
-
return contents;
|
|
890
|
-
};
|
|
891
|
-
exports.de_ListJobsCommand = de_ListJobsCommand;
|
|
892
|
-
const de_ListJobsCommandError = async (output, context) => {
|
|
893
|
-
const parsedOutput = {
|
|
894
|
-
...output,
|
|
895
|
-
body: await parseErrorBody(output.body, context),
|
|
896
|
-
};
|
|
897
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
898
|
-
switch (errorCode) {
|
|
899
|
-
case "ClientException":
|
|
900
|
-
case "com.amazonaws.batch#ClientException":
|
|
901
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
902
|
-
case "ServerException":
|
|
903
|
-
case "com.amazonaws.batch#ServerException":
|
|
904
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
905
|
-
default:
|
|
906
|
-
const parsedBody = parsedOutput.body;
|
|
907
|
-
return throwDefaultError({
|
|
908
|
-
output,
|
|
909
|
-
parsedBody,
|
|
910
|
-
errorCode,
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
};
|
|
914
|
-
const de_ListSchedulingPoliciesCommand = async (output, context) => {
|
|
915
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
916
|
-
return de_ListSchedulingPoliciesCommandError(output, context);
|
|
917
|
-
}
|
|
918
|
-
const contents = (0, smithy_client_1.map)({
|
|
919
|
-
$metadata: deserializeMetadata(output),
|
|
920
|
-
});
|
|
921
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
922
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
923
|
-
nextToken: smithy_client_1.expectString,
|
|
924
|
-
schedulingPolicies: smithy_client_1._json,
|
|
925
|
-
});
|
|
926
|
-
Object.assign(contents, doc);
|
|
927
|
-
return contents;
|
|
928
|
-
};
|
|
929
|
-
exports.de_ListSchedulingPoliciesCommand = de_ListSchedulingPoliciesCommand;
|
|
930
|
-
const de_ListSchedulingPoliciesCommandError = async (output, context) => {
|
|
931
|
-
const parsedOutput = {
|
|
932
|
-
...output,
|
|
933
|
-
body: await parseErrorBody(output.body, context),
|
|
934
|
-
};
|
|
935
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
936
|
-
switch (errorCode) {
|
|
937
|
-
case "ClientException":
|
|
938
|
-
case "com.amazonaws.batch#ClientException":
|
|
939
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
940
|
-
case "ServerException":
|
|
941
|
-
case "com.amazonaws.batch#ServerException":
|
|
942
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
943
|
-
default:
|
|
944
|
-
const parsedBody = parsedOutput.body;
|
|
945
|
-
return throwDefaultError({
|
|
946
|
-
output,
|
|
947
|
-
parsedBody,
|
|
948
|
-
errorCode,
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
953
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
954
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
955
|
-
}
|
|
956
|
-
const contents = (0, smithy_client_1.map)({
|
|
957
|
-
$metadata: deserializeMetadata(output),
|
|
958
|
-
});
|
|
959
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
960
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
961
|
-
tags: smithy_client_1._json,
|
|
962
|
-
});
|
|
963
|
-
Object.assign(contents, doc);
|
|
964
|
-
return contents;
|
|
965
|
-
};
|
|
966
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
967
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
968
|
-
const parsedOutput = {
|
|
969
|
-
...output,
|
|
970
|
-
body: await parseErrorBody(output.body, context),
|
|
971
|
-
};
|
|
972
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
973
|
-
switch (errorCode) {
|
|
974
|
-
case "ClientException":
|
|
975
|
-
case "com.amazonaws.batch#ClientException":
|
|
976
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
977
|
-
case "ServerException":
|
|
978
|
-
case "com.amazonaws.batch#ServerException":
|
|
979
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
980
|
-
default:
|
|
981
|
-
const parsedBody = parsedOutput.body;
|
|
982
|
-
return throwDefaultError({
|
|
983
|
-
output,
|
|
984
|
-
parsedBody,
|
|
985
|
-
errorCode,
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
|
-
const de_RegisterJobDefinitionCommand = async (output, context) => {
|
|
990
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
991
|
-
return de_RegisterJobDefinitionCommandError(output, context);
|
|
992
|
-
}
|
|
993
|
-
const contents = (0, smithy_client_1.map)({
|
|
994
|
-
$metadata: deserializeMetadata(output),
|
|
995
|
-
});
|
|
996
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
997
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
998
|
-
jobDefinitionArn: smithy_client_1.expectString,
|
|
999
|
-
jobDefinitionName: smithy_client_1.expectString,
|
|
1000
|
-
revision: smithy_client_1.expectInt32,
|
|
1001
|
-
});
|
|
1002
|
-
Object.assign(contents, doc);
|
|
1003
|
-
return contents;
|
|
1004
|
-
};
|
|
1005
|
-
exports.de_RegisterJobDefinitionCommand = de_RegisterJobDefinitionCommand;
|
|
1006
|
-
const de_RegisterJobDefinitionCommandError = async (output, context) => {
|
|
1007
|
-
const parsedOutput = {
|
|
1008
|
-
...output,
|
|
1009
|
-
body: await parseErrorBody(output.body, context),
|
|
1010
|
-
};
|
|
1011
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1012
|
-
switch (errorCode) {
|
|
1013
|
-
case "ClientException":
|
|
1014
|
-
case "com.amazonaws.batch#ClientException":
|
|
1015
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1016
|
-
case "ServerException":
|
|
1017
|
-
case "com.amazonaws.batch#ServerException":
|
|
1018
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1019
|
-
default:
|
|
1020
|
-
const parsedBody = parsedOutput.body;
|
|
1021
|
-
return throwDefaultError({
|
|
1022
|
-
output,
|
|
1023
|
-
parsedBody,
|
|
1024
|
-
errorCode,
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
};
|
|
1028
|
-
const de_SubmitJobCommand = async (output, context) => {
|
|
1029
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1030
|
-
return de_SubmitJobCommandError(output, context);
|
|
1031
|
-
}
|
|
1032
|
-
const contents = (0, smithy_client_1.map)({
|
|
1033
|
-
$metadata: deserializeMetadata(output),
|
|
1034
|
-
});
|
|
1035
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1036
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1037
|
-
jobArn: smithy_client_1.expectString,
|
|
1038
|
-
jobId: smithy_client_1.expectString,
|
|
1039
|
-
jobName: smithy_client_1.expectString,
|
|
1040
|
-
});
|
|
1041
|
-
Object.assign(contents, doc);
|
|
1042
|
-
return contents;
|
|
1043
|
-
};
|
|
1044
|
-
exports.de_SubmitJobCommand = de_SubmitJobCommand;
|
|
1045
|
-
const de_SubmitJobCommandError = async (output, context) => {
|
|
1046
|
-
const parsedOutput = {
|
|
1047
|
-
...output,
|
|
1048
|
-
body: await parseErrorBody(output.body, context),
|
|
1049
|
-
};
|
|
1050
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1051
|
-
switch (errorCode) {
|
|
1052
|
-
case "ClientException":
|
|
1053
|
-
case "com.amazonaws.batch#ClientException":
|
|
1054
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1055
|
-
case "ServerException":
|
|
1056
|
-
case "com.amazonaws.batch#ServerException":
|
|
1057
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1058
|
-
default:
|
|
1059
|
-
const parsedBody = parsedOutput.body;
|
|
1060
|
-
return throwDefaultError({
|
|
1061
|
-
output,
|
|
1062
|
-
parsedBody,
|
|
1063
|
-
errorCode,
|
|
1064
|
-
});
|
|
1065
|
-
}
|
|
1066
|
-
};
|
|
1067
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1068
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1069
|
-
return de_TagResourceCommandError(output, context);
|
|
1070
|
-
}
|
|
1071
|
-
const contents = (0, smithy_client_1.map)({
|
|
1072
|
-
$metadata: deserializeMetadata(output),
|
|
1073
|
-
});
|
|
1074
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1075
|
-
return contents;
|
|
1076
|
-
};
|
|
1077
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1078
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1079
|
-
const parsedOutput = {
|
|
1080
|
-
...output,
|
|
1081
|
-
body: await parseErrorBody(output.body, context),
|
|
1082
|
-
};
|
|
1083
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1084
|
-
switch (errorCode) {
|
|
1085
|
-
case "ClientException":
|
|
1086
|
-
case "com.amazonaws.batch#ClientException":
|
|
1087
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1088
|
-
case "ServerException":
|
|
1089
|
-
case "com.amazonaws.batch#ServerException":
|
|
1090
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1091
|
-
default:
|
|
1092
|
-
const parsedBody = parsedOutput.body;
|
|
1093
|
-
return throwDefaultError({
|
|
1094
|
-
output,
|
|
1095
|
-
parsedBody,
|
|
1096
|
-
errorCode,
|
|
1097
|
-
});
|
|
1098
|
-
}
|
|
1099
|
-
};
|
|
1100
|
-
const de_TerminateJobCommand = async (output, context) => {
|
|
1101
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1102
|
-
return de_TerminateJobCommandError(output, context);
|
|
1103
|
-
}
|
|
1104
|
-
const contents = (0, smithy_client_1.map)({
|
|
1105
|
-
$metadata: deserializeMetadata(output),
|
|
1106
|
-
});
|
|
1107
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1108
|
-
return contents;
|
|
1109
|
-
};
|
|
1110
|
-
exports.de_TerminateJobCommand = de_TerminateJobCommand;
|
|
1111
|
-
const de_TerminateJobCommandError = async (output, context) => {
|
|
1112
|
-
const parsedOutput = {
|
|
1113
|
-
...output,
|
|
1114
|
-
body: await parseErrorBody(output.body, context),
|
|
1115
|
-
};
|
|
1116
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1117
|
-
switch (errorCode) {
|
|
1118
|
-
case "ClientException":
|
|
1119
|
-
case "com.amazonaws.batch#ClientException":
|
|
1120
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1121
|
-
case "ServerException":
|
|
1122
|
-
case "com.amazonaws.batch#ServerException":
|
|
1123
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1124
|
-
default:
|
|
1125
|
-
const parsedBody = parsedOutput.body;
|
|
1126
|
-
return throwDefaultError({
|
|
1127
|
-
output,
|
|
1128
|
-
parsedBody,
|
|
1129
|
-
errorCode,
|
|
1130
|
-
});
|
|
1131
|
-
}
|
|
1132
|
-
};
|
|
1133
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1134
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1135
|
-
return de_UntagResourceCommandError(output, context);
|
|
1136
|
-
}
|
|
1137
|
-
const contents = (0, smithy_client_1.map)({
|
|
1138
|
-
$metadata: deserializeMetadata(output),
|
|
1139
|
-
});
|
|
1140
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1141
|
-
return contents;
|
|
1142
|
-
};
|
|
1143
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1144
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1145
|
-
const parsedOutput = {
|
|
1146
|
-
...output,
|
|
1147
|
-
body: await parseErrorBody(output.body, context),
|
|
1148
|
-
};
|
|
1149
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1150
|
-
switch (errorCode) {
|
|
1151
|
-
case "ClientException":
|
|
1152
|
-
case "com.amazonaws.batch#ClientException":
|
|
1153
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1154
|
-
case "ServerException":
|
|
1155
|
-
case "com.amazonaws.batch#ServerException":
|
|
1156
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1157
|
-
default:
|
|
1158
|
-
const parsedBody = parsedOutput.body;
|
|
1159
|
-
return throwDefaultError({
|
|
1160
|
-
output,
|
|
1161
|
-
parsedBody,
|
|
1162
|
-
errorCode,
|
|
1163
|
-
});
|
|
1164
|
-
}
|
|
1165
|
-
};
|
|
1166
|
-
const de_UpdateComputeEnvironmentCommand = async (output, context) => {
|
|
1167
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1168
|
-
return de_UpdateComputeEnvironmentCommandError(output, context);
|
|
1169
|
-
}
|
|
1170
|
-
const contents = (0, smithy_client_1.map)({
|
|
1171
|
-
$metadata: deserializeMetadata(output),
|
|
1172
|
-
});
|
|
1173
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1174
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1175
|
-
computeEnvironmentArn: smithy_client_1.expectString,
|
|
1176
|
-
computeEnvironmentName: smithy_client_1.expectString,
|
|
1177
|
-
});
|
|
1178
|
-
Object.assign(contents, doc);
|
|
1179
|
-
return contents;
|
|
1180
|
-
};
|
|
1181
|
-
exports.de_UpdateComputeEnvironmentCommand = de_UpdateComputeEnvironmentCommand;
|
|
1182
|
-
const de_UpdateComputeEnvironmentCommandError = async (output, context) => {
|
|
1183
|
-
const parsedOutput = {
|
|
1184
|
-
...output,
|
|
1185
|
-
body: await parseErrorBody(output.body, context),
|
|
1186
|
-
};
|
|
1187
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1188
|
-
switch (errorCode) {
|
|
1189
|
-
case "ClientException":
|
|
1190
|
-
case "com.amazonaws.batch#ClientException":
|
|
1191
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1192
|
-
case "ServerException":
|
|
1193
|
-
case "com.amazonaws.batch#ServerException":
|
|
1194
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1195
|
-
default:
|
|
1196
|
-
const parsedBody = parsedOutput.body;
|
|
1197
|
-
return throwDefaultError({
|
|
1198
|
-
output,
|
|
1199
|
-
parsedBody,
|
|
1200
|
-
errorCode,
|
|
1201
|
-
});
|
|
1202
|
-
}
|
|
1203
|
-
};
|
|
1204
|
-
const de_UpdateJobQueueCommand = async (output, context) => {
|
|
1205
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1206
|
-
return de_UpdateJobQueueCommandError(output, context);
|
|
1207
|
-
}
|
|
1208
|
-
const contents = (0, smithy_client_1.map)({
|
|
1209
|
-
$metadata: deserializeMetadata(output),
|
|
1210
|
-
});
|
|
1211
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1212
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1213
|
-
jobQueueArn: smithy_client_1.expectString,
|
|
1214
|
-
jobQueueName: smithy_client_1.expectString,
|
|
1215
|
-
});
|
|
1216
|
-
Object.assign(contents, doc);
|
|
1217
|
-
return contents;
|
|
1218
|
-
};
|
|
1219
|
-
exports.de_UpdateJobQueueCommand = de_UpdateJobQueueCommand;
|
|
1220
|
-
const de_UpdateJobQueueCommandError = async (output, context) => {
|
|
1221
|
-
const parsedOutput = {
|
|
1222
|
-
...output,
|
|
1223
|
-
body: await parseErrorBody(output.body, context),
|
|
1224
|
-
};
|
|
1225
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1226
|
-
switch (errorCode) {
|
|
1227
|
-
case "ClientException":
|
|
1228
|
-
case "com.amazonaws.batch#ClientException":
|
|
1229
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1230
|
-
case "ServerException":
|
|
1231
|
-
case "com.amazonaws.batch#ServerException":
|
|
1232
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1233
|
-
default:
|
|
1234
|
-
const parsedBody = parsedOutput.body;
|
|
1235
|
-
return throwDefaultError({
|
|
1236
|
-
output,
|
|
1237
|
-
parsedBody,
|
|
1238
|
-
errorCode,
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
};
|
|
1242
|
-
const de_UpdateSchedulingPolicyCommand = async (output, context) => {
|
|
1243
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1244
|
-
return de_UpdateSchedulingPolicyCommandError(output, context);
|
|
1245
|
-
}
|
|
1246
|
-
const contents = (0, smithy_client_1.map)({
|
|
1247
|
-
$metadata: deserializeMetadata(output),
|
|
1248
|
-
});
|
|
1249
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1250
|
-
return contents;
|
|
1251
|
-
};
|
|
1252
|
-
exports.de_UpdateSchedulingPolicyCommand = de_UpdateSchedulingPolicyCommand;
|
|
1253
|
-
const de_UpdateSchedulingPolicyCommandError = async (output, context) => {
|
|
1254
|
-
const parsedOutput = {
|
|
1255
|
-
...output,
|
|
1256
|
-
body: await parseErrorBody(output.body, context),
|
|
1257
|
-
};
|
|
1258
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1259
|
-
switch (errorCode) {
|
|
1260
|
-
case "ClientException":
|
|
1261
|
-
case "com.amazonaws.batch#ClientException":
|
|
1262
|
-
throw await de_ClientExceptionRes(parsedOutput, context);
|
|
1263
|
-
case "ServerException":
|
|
1264
|
-
case "com.amazonaws.batch#ServerException":
|
|
1265
|
-
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1266
|
-
default:
|
|
1267
|
-
const parsedBody = parsedOutput.body;
|
|
1268
|
-
return throwDefaultError({
|
|
1269
|
-
output,
|
|
1270
|
-
parsedBody,
|
|
1271
|
-
errorCode,
|
|
1272
|
-
});
|
|
1273
|
-
}
|
|
1274
|
-
};
|
|
1275
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(BatchServiceException_1.BatchServiceException);
|
|
1276
|
-
const de_ClientExceptionRes = async (parsedOutput, context) => {
|
|
1277
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1278
|
-
const data = parsedOutput.body;
|
|
1279
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1280
|
-
message: smithy_client_1.expectString,
|
|
1281
|
-
});
|
|
1282
|
-
Object.assign(contents, doc);
|
|
1283
|
-
const exception = new models_0_1.ClientException({
|
|
1284
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1285
|
-
...contents,
|
|
1286
|
-
});
|
|
1287
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1288
|
-
};
|
|
1289
|
-
const de_ServerExceptionRes = async (parsedOutput, context) => {
|
|
1290
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1291
|
-
const data = parsedOutput.body;
|
|
1292
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1293
|
-
message: smithy_client_1.expectString,
|
|
1294
|
-
});
|
|
1295
|
-
Object.assign(contents, doc);
|
|
1296
|
-
const exception = new models_0_1.ServerException({
|
|
1297
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1298
|
-
...contents,
|
|
1299
|
-
});
|
|
1300
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1301
|
-
};
|
|
1302
|
-
const se_FairsharePolicy = (input, context) => {
|
|
1303
|
-
return (0, smithy_client_1.take)(input, {
|
|
1304
|
-
computeReservation: [],
|
|
1305
|
-
shareDecaySeconds: [],
|
|
1306
|
-
shareDistribution: (_) => se_ShareAttributesList(_, context),
|
|
1307
|
-
});
|
|
1308
|
-
};
|
|
1309
|
-
const se_ShareAttributes = (input, context) => {
|
|
1310
|
-
return (0, smithy_client_1.take)(input, {
|
|
1311
|
-
shareIdentifier: [],
|
|
1312
|
-
weightFactor: smithy_client_1.serializeFloat,
|
|
1313
|
-
});
|
|
1314
|
-
};
|
|
1315
|
-
const se_ShareAttributesList = (input, context) => {
|
|
1316
|
-
return input
|
|
1317
|
-
.filter((e) => e != null)
|
|
1318
|
-
.map((entry) => {
|
|
1319
|
-
return se_ShareAttributes(entry, context);
|
|
1320
|
-
});
|
|
1321
|
-
};
|
|
1322
|
-
const de_FairsharePolicy = (output, context) => {
|
|
1323
|
-
return (0, smithy_client_1.take)(output, {
|
|
1324
|
-
computeReservation: smithy_client_1.expectInt32,
|
|
1325
|
-
shareDecaySeconds: smithy_client_1.expectInt32,
|
|
1326
|
-
shareDistribution: (_) => de_ShareAttributesList(_, context),
|
|
1327
|
-
});
|
|
1328
|
-
};
|
|
1329
|
-
const de_SchedulingPolicyDetail = (output, context) => {
|
|
1330
|
-
return (0, smithy_client_1.take)(output, {
|
|
1331
|
-
arn: smithy_client_1.expectString,
|
|
1332
|
-
fairsharePolicy: (_) => de_FairsharePolicy(_, context),
|
|
1333
|
-
name: smithy_client_1.expectString,
|
|
1334
|
-
tags: smithy_client_1._json,
|
|
1335
|
-
});
|
|
1336
|
-
};
|
|
1337
|
-
const de_SchedulingPolicyDetailList = (output, context) => {
|
|
1338
|
-
const retVal = (output || [])
|
|
1339
|
-
.filter((e) => e != null)
|
|
1340
|
-
.map((entry) => {
|
|
1341
|
-
return de_SchedulingPolicyDetail(entry, context);
|
|
1342
|
-
});
|
|
1343
|
-
return retVal;
|
|
1344
|
-
};
|
|
1345
|
-
const de_ShareAttributes = (output, context) => {
|
|
1346
|
-
return (0, smithy_client_1.take)(output, {
|
|
1347
|
-
shareIdentifier: smithy_client_1.expectString,
|
|
1348
|
-
weightFactor: smithy_client_1.limitedParseFloat32,
|
|
1349
|
-
});
|
|
1350
|
-
};
|
|
1351
|
-
const de_ShareAttributesList = (output, context) => {
|
|
1352
|
-
const retVal = (output || [])
|
|
1353
|
-
.filter((e) => e != null)
|
|
1354
|
-
.map((entry) => {
|
|
1355
|
-
return de_ShareAttributes(entry, context);
|
|
1356
|
-
});
|
|
1357
|
-
return retVal;
|
|
1358
|
-
};
|
|
1359
|
-
const deserializeMetadata = (output) => ({
|
|
1360
|
-
httpStatusCode: output.statusCode,
|
|
1361
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1362
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1363
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1364
|
-
});
|
|
1365
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1366
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1367
|
-
value !== null &&
|
|
1368
|
-
value !== "" &&
|
|
1369
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1370
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1371
|
-
const _tK = "tagKeys";
|
|
1372
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1373
|
-
if (encoded.length) {
|
|
1374
|
-
return JSON.parse(encoded);
|
|
1375
|
-
}
|
|
1376
|
-
return {};
|
|
1377
|
-
});
|
|
1378
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1379
|
-
const value = await parseBody(errorBody, context);
|
|
1380
|
-
value.message = value.message ?? value.Message;
|
|
1381
|
-
return value;
|
|
1382
|
-
};
|
|
1383
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1384
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1385
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1386
|
-
let cleanValue = rawValue;
|
|
1387
|
-
if (typeof cleanValue === "number") {
|
|
1388
|
-
cleanValue = cleanValue.toString();
|
|
1389
|
-
}
|
|
1390
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1391
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1392
|
-
}
|
|
1393
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1394
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1395
|
-
}
|
|
1396
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1397
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1398
|
-
}
|
|
1399
|
-
return cleanValue;
|
|
1400
|
-
};
|
|
1401
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1402
|
-
if (headerKey !== undefined) {
|
|
1403
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1404
|
-
}
|
|
1405
|
-
if (data.code !== undefined) {
|
|
1406
|
-
return sanitizeErrorCode(data.code);
|
|
1407
|
-
}
|
|
1408
|
-
if (data["__type"] !== undefined) {
|
|
1409
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1410
|
-
}
|
|
1411
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|