@aws-sdk/client-emr-serverless 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/EMRServerless.js +1 -41
- package/dist-cjs/EMRServerlessClient.js +1 -43
- package/dist-cjs/commands/CancelJobRunCommand.js +1 -28
- package/dist-cjs/commands/CreateApplicationCommand.js +1 -29
- package/dist-cjs/commands/DeleteApplicationCommand.js +1 -28
- package/dist-cjs/commands/GetApplicationCommand.js +1 -29
- package/dist-cjs/commands/GetDashboardForJobRunCommand.js +1 -28
- package/dist-cjs/commands/GetJobRunCommand.js +1 -29
- package/dist-cjs/commands/ListApplicationsCommand.js +1 -28
- package/dist-cjs/commands/ListJobRunsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/StartApplicationCommand.js +1 -28
- package/dist-cjs/commands/StartJobRunCommand.js +1 -29
- package/dist-cjs/commands/StopApplicationCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateApplicationCommand.js +1 -29
- package/dist-cjs/commands/index.js +1 -18
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1760 -11
- package/dist-cjs/models/EMRServerlessServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -193
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListApplicationsPaginator.js +1 -7
- package/dist-cjs/pagination/ListJobRunsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1091
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1091 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateApplicationCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopApplicationCommand = exports.de_StartJobRunCommand = exports.de_StartApplicationCommand = exports.de_ListTagsForResourceCommand = exports.de_ListJobRunsCommand = exports.de_ListApplicationsCommand = exports.de_GetJobRunCommand = exports.de_GetDashboardForJobRunCommand = exports.de_GetApplicationCommand = exports.de_DeleteApplicationCommand = exports.de_CreateApplicationCommand = exports.de_CancelJobRunCommand = exports.se_UpdateApplicationCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopApplicationCommand = exports.se_StartJobRunCommand = exports.se_StartApplicationCommand = exports.se_ListTagsForResourceCommand = exports.se_ListJobRunsCommand = exports.se_ListApplicationsCommand = exports.se_GetJobRunCommand = exports.se_GetDashboardForJobRunCommand = exports.se_GetApplicationCommand = exports.se_DeleteApplicationCommand = exports.se_CreateApplicationCommand = exports.se_CancelJobRunCommand = void 0;
|
|
4
|
-
const core_1 = require("@aws-sdk/core");
|
|
5
|
-
const core_2 = require("@smithy/core");
|
|
6
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
|
-
const uuid_1 = require("uuid");
|
|
8
|
-
const EMRServerlessServiceException_1 = require("../models/EMRServerlessServiceException");
|
|
9
|
-
const models_0_1 = require("../models/models_0");
|
|
10
|
-
const se_CancelJobRunCommand = async (input, context) => {
|
|
11
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
12
|
-
const headers = {};
|
|
13
|
-
b.bp("/applications/{applicationId}/jobruns/{jobRunId}");
|
|
14
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
15
|
-
b.p("jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
16
|
-
let body;
|
|
17
|
-
b.m("DELETE").h(headers).b(body);
|
|
18
|
-
return b.build();
|
|
19
|
-
};
|
|
20
|
-
exports.se_CancelJobRunCommand = se_CancelJobRunCommand;
|
|
21
|
-
const se_CreateApplicationCommand = async (input, context) => {
|
|
22
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
23
|
-
const headers = {
|
|
24
|
-
"content-type": "application/json",
|
|
25
|
-
};
|
|
26
|
-
b.bp("/applications");
|
|
27
|
-
let body;
|
|
28
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
29
|
-
architecture: [],
|
|
30
|
-
autoStartConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
31
|
-
autoStopConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
32
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
33
|
-
imageConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
34
|
-
initialCapacity: (_) => (0, smithy_client_1._json)(_),
|
|
35
|
-
maximumCapacity: (_) => (0, smithy_client_1._json)(_),
|
|
36
|
-
monitoringConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
37
|
-
name: [],
|
|
38
|
-
networkConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
39
|
-
releaseLabel: [],
|
|
40
|
-
runtimeConfiguration: (_) => se_ConfigurationList(_, context),
|
|
41
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
42
|
-
type: [],
|
|
43
|
-
workerTypeSpecifications: (_) => (0, smithy_client_1._json)(_),
|
|
44
|
-
}));
|
|
45
|
-
b.m("POST").h(headers).b(body);
|
|
46
|
-
return b.build();
|
|
47
|
-
};
|
|
48
|
-
exports.se_CreateApplicationCommand = se_CreateApplicationCommand;
|
|
49
|
-
const se_DeleteApplicationCommand = async (input, context) => {
|
|
50
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
51
|
-
const headers = {};
|
|
52
|
-
b.bp("/applications/{applicationId}");
|
|
53
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
54
|
-
let body;
|
|
55
|
-
b.m("DELETE").h(headers).b(body);
|
|
56
|
-
return b.build();
|
|
57
|
-
};
|
|
58
|
-
exports.se_DeleteApplicationCommand = se_DeleteApplicationCommand;
|
|
59
|
-
const se_GetApplicationCommand = async (input, context) => {
|
|
60
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
61
|
-
const headers = {};
|
|
62
|
-
b.bp("/applications/{applicationId}");
|
|
63
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
64
|
-
let body;
|
|
65
|
-
b.m("GET").h(headers).b(body);
|
|
66
|
-
return b.build();
|
|
67
|
-
};
|
|
68
|
-
exports.se_GetApplicationCommand = se_GetApplicationCommand;
|
|
69
|
-
const se_GetDashboardForJobRunCommand = async (input, context) => {
|
|
70
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
71
|
-
const headers = {};
|
|
72
|
-
b.bp("/applications/{applicationId}/jobruns/{jobRunId}/dashboard");
|
|
73
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
74
|
-
b.p("jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
75
|
-
let body;
|
|
76
|
-
b.m("GET").h(headers).b(body);
|
|
77
|
-
return b.build();
|
|
78
|
-
};
|
|
79
|
-
exports.se_GetDashboardForJobRunCommand = se_GetDashboardForJobRunCommand;
|
|
80
|
-
const se_GetJobRunCommand = async (input, context) => {
|
|
81
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
82
|
-
const headers = {};
|
|
83
|
-
b.bp("/applications/{applicationId}/jobruns/{jobRunId}");
|
|
84
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
85
|
-
b.p("jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
86
|
-
let body;
|
|
87
|
-
b.m("GET").h(headers).b(body);
|
|
88
|
-
return b.build();
|
|
89
|
-
};
|
|
90
|
-
exports.se_GetJobRunCommand = se_GetJobRunCommand;
|
|
91
|
-
const se_ListApplicationsCommand = async (input, context) => {
|
|
92
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
93
|
-
const headers = {};
|
|
94
|
-
b.bp("/applications");
|
|
95
|
-
const query = (0, smithy_client_1.map)({
|
|
96
|
-
[_nT]: [, input[_nT]],
|
|
97
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
98
|
-
[_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
|
|
99
|
-
});
|
|
100
|
-
let body;
|
|
101
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
102
|
-
return b.build();
|
|
103
|
-
};
|
|
104
|
-
exports.se_ListApplicationsCommand = se_ListApplicationsCommand;
|
|
105
|
-
const se_ListJobRunsCommand = async (input, context) => {
|
|
106
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
107
|
-
const headers = {};
|
|
108
|
-
b.bp("/applications/{applicationId}/jobruns");
|
|
109
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
110
|
-
const query = (0, smithy_client_1.map)({
|
|
111
|
-
[_nT]: [, input[_nT]],
|
|
112
|
-
[_mR]: [() => input.maxResults !== void 0, () => input[_mR].toString()],
|
|
113
|
-
[_cAA]: [() => input.createdAtAfter !== void 0, () => (input[_cAA].toISOString().split(".")[0] + "Z").toString()],
|
|
114
|
-
[_cAB]: [() => input.createdAtBefore !== void 0, () => (input[_cAB].toISOString().split(".")[0] + "Z").toString()],
|
|
115
|
-
[_s]: [() => input.states !== void 0, () => (input[_s] || []).map((_entry) => _entry)],
|
|
116
|
-
});
|
|
117
|
-
let body;
|
|
118
|
-
b.m("GET").h(headers).q(query).b(body);
|
|
119
|
-
return b.build();
|
|
120
|
-
};
|
|
121
|
-
exports.se_ListJobRunsCommand = se_ListJobRunsCommand;
|
|
122
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
123
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
124
|
-
const headers = {};
|
|
125
|
-
b.bp("/tags/{resourceArn}");
|
|
126
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
127
|
-
let body;
|
|
128
|
-
b.m("GET").h(headers).b(body);
|
|
129
|
-
return b.build();
|
|
130
|
-
};
|
|
131
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
132
|
-
const se_StartApplicationCommand = async (input, context) => {
|
|
133
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
134
|
-
const headers = {};
|
|
135
|
-
b.bp("/applications/{applicationId}/start");
|
|
136
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
137
|
-
let body;
|
|
138
|
-
b.m("POST").h(headers).b(body);
|
|
139
|
-
return b.build();
|
|
140
|
-
};
|
|
141
|
-
exports.se_StartApplicationCommand = se_StartApplicationCommand;
|
|
142
|
-
const se_StartJobRunCommand = async (input, context) => {
|
|
143
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
144
|
-
const headers = {
|
|
145
|
-
"content-type": "application/json",
|
|
146
|
-
};
|
|
147
|
-
b.bp("/applications/{applicationId}/jobruns");
|
|
148
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
149
|
-
let body;
|
|
150
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
151
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
152
|
-
configurationOverrides: (_) => se_ConfigurationOverrides(_, context),
|
|
153
|
-
executionRoleArn: [],
|
|
154
|
-
executionTimeoutMinutes: [],
|
|
155
|
-
jobDriver: (_) => (0, smithy_client_1._json)(_),
|
|
156
|
-
name: [],
|
|
157
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
158
|
-
}));
|
|
159
|
-
b.m("POST").h(headers).b(body);
|
|
160
|
-
return b.build();
|
|
161
|
-
};
|
|
162
|
-
exports.se_StartJobRunCommand = se_StartJobRunCommand;
|
|
163
|
-
const se_StopApplicationCommand = async (input, context) => {
|
|
164
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
165
|
-
const headers = {};
|
|
166
|
-
b.bp("/applications/{applicationId}/stop");
|
|
167
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
168
|
-
let body;
|
|
169
|
-
b.m("POST").h(headers).b(body);
|
|
170
|
-
return b.build();
|
|
171
|
-
};
|
|
172
|
-
exports.se_StopApplicationCommand = se_StopApplicationCommand;
|
|
173
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
174
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
175
|
-
const headers = {
|
|
176
|
-
"content-type": "application/json",
|
|
177
|
-
};
|
|
178
|
-
b.bp("/tags/{resourceArn}");
|
|
179
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
180
|
-
let body;
|
|
181
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
182
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
183
|
-
}));
|
|
184
|
-
b.m("POST").h(headers).b(body);
|
|
185
|
-
return b.build();
|
|
186
|
-
};
|
|
187
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
188
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
189
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
190
|
-
const headers = {};
|
|
191
|
-
b.bp("/tags/{resourceArn}");
|
|
192
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
193
|
-
const query = (0, smithy_client_1.map)({
|
|
194
|
-
[_tK]: [
|
|
195
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
196
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
197
|
-
],
|
|
198
|
-
});
|
|
199
|
-
let body;
|
|
200
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
201
|
-
return b.build();
|
|
202
|
-
};
|
|
203
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
204
|
-
const se_UpdateApplicationCommand = async (input, context) => {
|
|
205
|
-
const b = (0, core_2.requestBuilder)(input, context);
|
|
206
|
-
const headers = {
|
|
207
|
-
"content-type": "application/json",
|
|
208
|
-
};
|
|
209
|
-
b.bp("/applications/{applicationId}");
|
|
210
|
-
b.p("applicationId", () => input.applicationId, "{applicationId}", false);
|
|
211
|
-
let body;
|
|
212
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
213
|
-
architecture: [],
|
|
214
|
-
autoStartConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
215
|
-
autoStopConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
216
|
-
clientToken: [true, (_) => _ ?? (0, uuid_1.v4)()],
|
|
217
|
-
imageConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
218
|
-
initialCapacity: (_) => (0, smithy_client_1._json)(_),
|
|
219
|
-
maximumCapacity: (_) => (0, smithy_client_1._json)(_),
|
|
220
|
-
monitoringConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
221
|
-
networkConfiguration: (_) => (0, smithy_client_1._json)(_),
|
|
222
|
-
releaseLabel: [],
|
|
223
|
-
runtimeConfiguration: (_) => se_ConfigurationList(_, context),
|
|
224
|
-
workerTypeSpecifications: (_) => (0, smithy_client_1._json)(_),
|
|
225
|
-
}));
|
|
226
|
-
b.m("PATCH").h(headers).b(body);
|
|
227
|
-
return b.build();
|
|
228
|
-
};
|
|
229
|
-
exports.se_UpdateApplicationCommand = se_UpdateApplicationCommand;
|
|
230
|
-
const de_CancelJobRunCommand = async (output, context) => {
|
|
231
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
232
|
-
return de_CancelJobRunCommandError(output, context);
|
|
233
|
-
}
|
|
234
|
-
const contents = (0, smithy_client_1.map)({
|
|
235
|
-
$metadata: deserializeMetadata(output),
|
|
236
|
-
});
|
|
237
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
238
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
239
|
-
applicationId: smithy_client_1.expectString,
|
|
240
|
-
jobRunId: smithy_client_1.expectString,
|
|
241
|
-
});
|
|
242
|
-
Object.assign(contents, doc);
|
|
243
|
-
return contents;
|
|
244
|
-
};
|
|
245
|
-
exports.de_CancelJobRunCommand = de_CancelJobRunCommand;
|
|
246
|
-
const de_CancelJobRunCommandError = async (output, context) => {
|
|
247
|
-
const parsedOutput = {
|
|
248
|
-
...output,
|
|
249
|
-
body: await parseErrorBody(output.body, context),
|
|
250
|
-
};
|
|
251
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
252
|
-
switch (errorCode) {
|
|
253
|
-
case "InternalServerException":
|
|
254
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
255
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
256
|
-
case "ResourceNotFoundException":
|
|
257
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
258
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
259
|
-
case "ValidationException":
|
|
260
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
261
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
262
|
-
default:
|
|
263
|
-
const parsedBody = parsedOutput.body;
|
|
264
|
-
return throwDefaultError({
|
|
265
|
-
output,
|
|
266
|
-
parsedBody,
|
|
267
|
-
errorCode,
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
const de_CreateApplicationCommand = async (output, context) => {
|
|
272
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
273
|
-
return de_CreateApplicationCommandError(output, context);
|
|
274
|
-
}
|
|
275
|
-
const contents = (0, smithy_client_1.map)({
|
|
276
|
-
$metadata: deserializeMetadata(output),
|
|
277
|
-
});
|
|
278
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
279
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
280
|
-
applicationId: smithy_client_1.expectString,
|
|
281
|
-
arn: smithy_client_1.expectString,
|
|
282
|
-
name: smithy_client_1.expectString,
|
|
283
|
-
});
|
|
284
|
-
Object.assign(contents, doc);
|
|
285
|
-
return contents;
|
|
286
|
-
};
|
|
287
|
-
exports.de_CreateApplicationCommand = de_CreateApplicationCommand;
|
|
288
|
-
const de_CreateApplicationCommandError = async (output, context) => {
|
|
289
|
-
const parsedOutput = {
|
|
290
|
-
...output,
|
|
291
|
-
body: await parseErrorBody(output.body, context),
|
|
292
|
-
};
|
|
293
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
294
|
-
switch (errorCode) {
|
|
295
|
-
case "ConflictException":
|
|
296
|
-
case "com.amazonaws.emrserverless#ConflictException":
|
|
297
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
298
|
-
case "InternalServerException":
|
|
299
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
300
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
301
|
-
case "ResourceNotFoundException":
|
|
302
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
303
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
304
|
-
case "ValidationException":
|
|
305
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
306
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
307
|
-
default:
|
|
308
|
-
const parsedBody = parsedOutput.body;
|
|
309
|
-
return throwDefaultError({
|
|
310
|
-
output,
|
|
311
|
-
parsedBody,
|
|
312
|
-
errorCode,
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
const de_DeleteApplicationCommand = async (output, context) => {
|
|
317
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
318
|
-
return de_DeleteApplicationCommandError(output, context);
|
|
319
|
-
}
|
|
320
|
-
const contents = (0, smithy_client_1.map)({
|
|
321
|
-
$metadata: deserializeMetadata(output),
|
|
322
|
-
});
|
|
323
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
324
|
-
return contents;
|
|
325
|
-
};
|
|
326
|
-
exports.de_DeleteApplicationCommand = de_DeleteApplicationCommand;
|
|
327
|
-
const de_DeleteApplicationCommandError = async (output, context) => {
|
|
328
|
-
const parsedOutput = {
|
|
329
|
-
...output,
|
|
330
|
-
body: await parseErrorBody(output.body, context),
|
|
331
|
-
};
|
|
332
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
333
|
-
switch (errorCode) {
|
|
334
|
-
case "InternalServerException":
|
|
335
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
336
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
337
|
-
case "ResourceNotFoundException":
|
|
338
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
339
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
340
|
-
case "ValidationException":
|
|
341
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
342
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
343
|
-
default:
|
|
344
|
-
const parsedBody = parsedOutput.body;
|
|
345
|
-
return throwDefaultError({
|
|
346
|
-
output,
|
|
347
|
-
parsedBody,
|
|
348
|
-
errorCode,
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
const de_GetApplicationCommand = async (output, context) => {
|
|
353
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
354
|
-
return de_GetApplicationCommandError(output, context);
|
|
355
|
-
}
|
|
356
|
-
const contents = (0, smithy_client_1.map)({
|
|
357
|
-
$metadata: deserializeMetadata(output),
|
|
358
|
-
});
|
|
359
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
360
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
361
|
-
application: (_) => de_Application(_, context),
|
|
362
|
-
});
|
|
363
|
-
Object.assign(contents, doc);
|
|
364
|
-
return contents;
|
|
365
|
-
};
|
|
366
|
-
exports.de_GetApplicationCommand = de_GetApplicationCommand;
|
|
367
|
-
const de_GetApplicationCommandError = async (output, context) => {
|
|
368
|
-
const parsedOutput = {
|
|
369
|
-
...output,
|
|
370
|
-
body: await parseErrorBody(output.body, context),
|
|
371
|
-
};
|
|
372
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
373
|
-
switch (errorCode) {
|
|
374
|
-
case "InternalServerException":
|
|
375
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
376
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
377
|
-
case "ResourceNotFoundException":
|
|
378
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
379
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
380
|
-
case "ValidationException":
|
|
381
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
382
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
383
|
-
default:
|
|
384
|
-
const parsedBody = parsedOutput.body;
|
|
385
|
-
return throwDefaultError({
|
|
386
|
-
output,
|
|
387
|
-
parsedBody,
|
|
388
|
-
errorCode,
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
const de_GetDashboardForJobRunCommand = async (output, context) => {
|
|
393
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
394
|
-
return de_GetDashboardForJobRunCommandError(output, context);
|
|
395
|
-
}
|
|
396
|
-
const contents = (0, smithy_client_1.map)({
|
|
397
|
-
$metadata: deserializeMetadata(output),
|
|
398
|
-
});
|
|
399
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
400
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
401
|
-
url: smithy_client_1.expectString,
|
|
402
|
-
});
|
|
403
|
-
Object.assign(contents, doc);
|
|
404
|
-
return contents;
|
|
405
|
-
};
|
|
406
|
-
exports.de_GetDashboardForJobRunCommand = de_GetDashboardForJobRunCommand;
|
|
407
|
-
const de_GetDashboardForJobRunCommandError = async (output, context) => {
|
|
408
|
-
const parsedOutput = {
|
|
409
|
-
...output,
|
|
410
|
-
body: await parseErrorBody(output.body, context),
|
|
411
|
-
};
|
|
412
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
413
|
-
switch (errorCode) {
|
|
414
|
-
case "InternalServerException":
|
|
415
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
416
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
417
|
-
case "ResourceNotFoundException":
|
|
418
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
419
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
420
|
-
case "ValidationException":
|
|
421
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
422
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
423
|
-
default:
|
|
424
|
-
const parsedBody = parsedOutput.body;
|
|
425
|
-
return throwDefaultError({
|
|
426
|
-
output,
|
|
427
|
-
parsedBody,
|
|
428
|
-
errorCode,
|
|
429
|
-
});
|
|
430
|
-
}
|
|
431
|
-
};
|
|
432
|
-
const de_GetJobRunCommand = async (output, context) => {
|
|
433
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
434
|
-
return de_GetJobRunCommandError(output, context);
|
|
435
|
-
}
|
|
436
|
-
const contents = (0, smithy_client_1.map)({
|
|
437
|
-
$metadata: deserializeMetadata(output),
|
|
438
|
-
});
|
|
439
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
440
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
441
|
-
jobRun: (_) => de_JobRun(_, context),
|
|
442
|
-
});
|
|
443
|
-
Object.assign(contents, doc);
|
|
444
|
-
return contents;
|
|
445
|
-
};
|
|
446
|
-
exports.de_GetJobRunCommand = de_GetJobRunCommand;
|
|
447
|
-
const de_GetJobRunCommandError = async (output, context) => {
|
|
448
|
-
const parsedOutput = {
|
|
449
|
-
...output,
|
|
450
|
-
body: await parseErrorBody(output.body, context),
|
|
451
|
-
};
|
|
452
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
453
|
-
switch (errorCode) {
|
|
454
|
-
case "InternalServerException":
|
|
455
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
456
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
457
|
-
case "ResourceNotFoundException":
|
|
458
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
459
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
460
|
-
case "ValidationException":
|
|
461
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
462
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
463
|
-
default:
|
|
464
|
-
const parsedBody = parsedOutput.body;
|
|
465
|
-
return throwDefaultError({
|
|
466
|
-
output,
|
|
467
|
-
parsedBody,
|
|
468
|
-
errorCode,
|
|
469
|
-
});
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
const de_ListApplicationsCommand = async (output, context) => {
|
|
473
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
474
|
-
return de_ListApplicationsCommandError(output, context);
|
|
475
|
-
}
|
|
476
|
-
const contents = (0, smithy_client_1.map)({
|
|
477
|
-
$metadata: deserializeMetadata(output),
|
|
478
|
-
});
|
|
479
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
480
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
481
|
-
applications: (_) => de_ApplicationList(_, context),
|
|
482
|
-
nextToken: smithy_client_1.expectString,
|
|
483
|
-
});
|
|
484
|
-
Object.assign(contents, doc);
|
|
485
|
-
return contents;
|
|
486
|
-
};
|
|
487
|
-
exports.de_ListApplicationsCommand = de_ListApplicationsCommand;
|
|
488
|
-
const de_ListApplicationsCommandError = async (output, context) => {
|
|
489
|
-
const parsedOutput = {
|
|
490
|
-
...output,
|
|
491
|
-
body: await parseErrorBody(output.body, context),
|
|
492
|
-
};
|
|
493
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
494
|
-
switch (errorCode) {
|
|
495
|
-
case "InternalServerException":
|
|
496
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
497
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
498
|
-
case "ValidationException":
|
|
499
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
500
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
501
|
-
default:
|
|
502
|
-
const parsedBody = parsedOutput.body;
|
|
503
|
-
return throwDefaultError({
|
|
504
|
-
output,
|
|
505
|
-
parsedBody,
|
|
506
|
-
errorCode,
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
};
|
|
510
|
-
const de_ListJobRunsCommand = async (output, context) => {
|
|
511
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
512
|
-
return de_ListJobRunsCommandError(output, context);
|
|
513
|
-
}
|
|
514
|
-
const contents = (0, smithy_client_1.map)({
|
|
515
|
-
$metadata: deserializeMetadata(output),
|
|
516
|
-
});
|
|
517
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
518
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
519
|
-
jobRuns: (_) => de_JobRuns(_, context),
|
|
520
|
-
nextToken: smithy_client_1.expectString,
|
|
521
|
-
});
|
|
522
|
-
Object.assign(contents, doc);
|
|
523
|
-
return contents;
|
|
524
|
-
};
|
|
525
|
-
exports.de_ListJobRunsCommand = de_ListJobRunsCommand;
|
|
526
|
-
const de_ListJobRunsCommandError = async (output, context) => {
|
|
527
|
-
const parsedOutput = {
|
|
528
|
-
...output,
|
|
529
|
-
body: await parseErrorBody(output.body, context),
|
|
530
|
-
};
|
|
531
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
532
|
-
switch (errorCode) {
|
|
533
|
-
case "InternalServerException":
|
|
534
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
535
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
536
|
-
case "ValidationException":
|
|
537
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
538
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
539
|
-
default:
|
|
540
|
-
const parsedBody = parsedOutput.body;
|
|
541
|
-
return throwDefaultError({
|
|
542
|
-
output,
|
|
543
|
-
parsedBody,
|
|
544
|
-
errorCode,
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
};
|
|
548
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
549
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
550
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
551
|
-
}
|
|
552
|
-
const contents = (0, smithy_client_1.map)({
|
|
553
|
-
$metadata: deserializeMetadata(output),
|
|
554
|
-
});
|
|
555
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
556
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
557
|
-
tags: smithy_client_1._json,
|
|
558
|
-
});
|
|
559
|
-
Object.assign(contents, doc);
|
|
560
|
-
return contents;
|
|
561
|
-
};
|
|
562
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
563
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
564
|
-
const parsedOutput = {
|
|
565
|
-
...output,
|
|
566
|
-
body: await parseErrorBody(output.body, context),
|
|
567
|
-
};
|
|
568
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
569
|
-
switch (errorCode) {
|
|
570
|
-
case "InternalServerException":
|
|
571
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
572
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
573
|
-
case "ResourceNotFoundException":
|
|
574
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
575
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
576
|
-
case "ValidationException":
|
|
577
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
578
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
579
|
-
default:
|
|
580
|
-
const parsedBody = parsedOutput.body;
|
|
581
|
-
return throwDefaultError({
|
|
582
|
-
output,
|
|
583
|
-
parsedBody,
|
|
584
|
-
errorCode,
|
|
585
|
-
});
|
|
586
|
-
}
|
|
587
|
-
};
|
|
588
|
-
const de_StartApplicationCommand = async (output, context) => {
|
|
589
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
590
|
-
return de_StartApplicationCommandError(output, context);
|
|
591
|
-
}
|
|
592
|
-
const contents = (0, smithy_client_1.map)({
|
|
593
|
-
$metadata: deserializeMetadata(output),
|
|
594
|
-
});
|
|
595
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
596
|
-
return contents;
|
|
597
|
-
};
|
|
598
|
-
exports.de_StartApplicationCommand = de_StartApplicationCommand;
|
|
599
|
-
const de_StartApplicationCommandError = async (output, context) => {
|
|
600
|
-
const parsedOutput = {
|
|
601
|
-
...output,
|
|
602
|
-
body: await parseErrorBody(output.body, context),
|
|
603
|
-
};
|
|
604
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
605
|
-
switch (errorCode) {
|
|
606
|
-
case "InternalServerException":
|
|
607
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
608
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
609
|
-
case "ResourceNotFoundException":
|
|
610
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
611
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
612
|
-
case "ServiceQuotaExceededException":
|
|
613
|
-
case "com.amazonaws.emrserverless#ServiceQuotaExceededException":
|
|
614
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
615
|
-
case "ValidationException":
|
|
616
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
617
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
618
|
-
default:
|
|
619
|
-
const parsedBody = parsedOutput.body;
|
|
620
|
-
return throwDefaultError({
|
|
621
|
-
output,
|
|
622
|
-
parsedBody,
|
|
623
|
-
errorCode,
|
|
624
|
-
});
|
|
625
|
-
}
|
|
626
|
-
};
|
|
627
|
-
const de_StartJobRunCommand = async (output, context) => {
|
|
628
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
629
|
-
return de_StartJobRunCommandError(output, context);
|
|
630
|
-
}
|
|
631
|
-
const contents = (0, smithy_client_1.map)({
|
|
632
|
-
$metadata: deserializeMetadata(output),
|
|
633
|
-
});
|
|
634
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
635
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
636
|
-
applicationId: smithy_client_1.expectString,
|
|
637
|
-
arn: smithy_client_1.expectString,
|
|
638
|
-
jobRunId: smithy_client_1.expectString,
|
|
639
|
-
});
|
|
640
|
-
Object.assign(contents, doc);
|
|
641
|
-
return contents;
|
|
642
|
-
};
|
|
643
|
-
exports.de_StartJobRunCommand = de_StartJobRunCommand;
|
|
644
|
-
const de_StartJobRunCommandError = async (output, context) => {
|
|
645
|
-
const parsedOutput = {
|
|
646
|
-
...output,
|
|
647
|
-
body: await parseErrorBody(output.body, context),
|
|
648
|
-
};
|
|
649
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
650
|
-
switch (errorCode) {
|
|
651
|
-
case "ConflictException":
|
|
652
|
-
case "com.amazonaws.emrserverless#ConflictException":
|
|
653
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
654
|
-
case "InternalServerException":
|
|
655
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
656
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
657
|
-
case "ResourceNotFoundException":
|
|
658
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
659
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
660
|
-
case "ValidationException":
|
|
661
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
662
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
663
|
-
default:
|
|
664
|
-
const parsedBody = parsedOutput.body;
|
|
665
|
-
return throwDefaultError({
|
|
666
|
-
output,
|
|
667
|
-
parsedBody,
|
|
668
|
-
errorCode,
|
|
669
|
-
});
|
|
670
|
-
}
|
|
671
|
-
};
|
|
672
|
-
const de_StopApplicationCommand = async (output, context) => {
|
|
673
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
674
|
-
return de_StopApplicationCommandError(output, context);
|
|
675
|
-
}
|
|
676
|
-
const contents = (0, smithy_client_1.map)({
|
|
677
|
-
$metadata: deserializeMetadata(output),
|
|
678
|
-
});
|
|
679
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
680
|
-
return contents;
|
|
681
|
-
};
|
|
682
|
-
exports.de_StopApplicationCommand = de_StopApplicationCommand;
|
|
683
|
-
const de_StopApplicationCommandError = async (output, context) => {
|
|
684
|
-
const parsedOutput = {
|
|
685
|
-
...output,
|
|
686
|
-
body: await parseErrorBody(output.body, context),
|
|
687
|
-
};
|
|
688
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
689
|
-
switch (errorCode) {
|
|
690
|
-
case "InternalServerException":
|
|
691
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
692
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
693
|
-
case "ResourceNotFoundException":
|
|
694
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
695
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
696
|
-
case "ValidationException":
|
|
697
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
698
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
699
|
-
default:
|
|
700
|
-
const parsedBody = parsedOutput.body;
|
|
701
|
-
return throwDefaultError({
|
|
702
|
-
output,
|
|
703
|
-
parsedBody,
|
|
704
|
-
errorCode,
|
|
705
|
-
});
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
709
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
710
|
-
return de_TagResourceCommandError(output, context);
|
|
711
|
-
}
|
|
712
|
-
const contents = (0, smithy_client_1.map)({
|
|
713
|
-
$metadata: deserializeMetadata(output),
|
|
714
|
-
});
|
|
715
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
716
|
-
return contents;
|
|
717
|
-
};
|
|
718
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
719
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
720
|
-
const parsedOutput = {
|
|
721
|
-
...output,
|
|
722
|
-
body: await parseErrorBody(output.body, context),
|
|
723
|
-
};
|
|
724
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
725
|
-
switch (errorCode) {
|
|
726
|
-
case "InternalServerException":
|
|
727
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
728
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
729
|
-
case "ResourceNotFoundException":
|
|
730
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
731
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
732
|
-
case "ValidationException":
|
|
733
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
734
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
735
|
-
default:
|
|
736
|
-
const parsedBody = parsedOutput.body;
|
|
737
|
-
return throwDefaultError({
|
|
738
|
-
output,
|
|
739
|
-
parsedBody,
|
|
740
|
-
errorCode,
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
};
|
|
744
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
745
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
746
|
-
return de_UntagResourceCommandError(output, context);
|
|
747
|
-
}
|
|
748
|
-
const contents = (0, smithy_client_1.map)({
|
|
749
|
-
$metadata: deserializeMetadata(output),
|
|
750
|
-
});
|
|
751
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
752
|
-
return contents;
|
|
753
|
-
};
|
|
754
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
755
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
756
|
-
const parsedOutput = {
|
|
757
|
-
...output,
|
|
758
|
-
body: await parseErrorBody(output.body, context),
|
|
759
|
-
};
|
|
760
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
761
|
-
switch (errorCode) {
|
|
762
|
-
case "InternalServerException":
|
|
763
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
764
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
765
|
-
case "ResourceNotFoundException":
|
|
766
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
767
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
768
|
-
case "ValidationException":
|
|
769
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
770
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
771
|
-
default:
|
|
772
|
-
const parsedBody = parsedOutput.body;
|
|
773
|
-
return throwDefaultError({
|
|
774
|
-
output,
|
|
775
|
-
parsedBody,
|
|
776
|
-
errorCode,
|
|
777
|
-
});
|
|
778
|
-
}
|
|
779
|
-
};
|
|
780
|
-
const de_UpdateApplicationCommand = async (output, context) => {
|
|
781
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
782
|
-
return de_UpdateApplicationCommandError(output, context);
|
|
783
|
-
}
|
|
784
|
-
const contents = (0, smithy_client_1.map)({
|
|
785
|
-
$metadata: deserializeMetadata(output),
|
|
786
|
-
});
|
|
787
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
788
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
789
|
-
application: (_) => de_Application(_, context),
|
|
790
|
-
});
|
|
791
|
-
Object.assign(contents, doc);
|
|
792
|
-
return contents;
|
|
793
|
-
};
|
|
794
|
-
exports.de_UpdateApplicationCommand = de_UpdateApplicationCommand;
|
|
795
|
-
const de_UpdateApplicationCommandError = async (output, context) => {
|
|
796
|
-
const parsedOutput = {
|
|
797
|
-
...output,
|
|
798
|
-
body: await parseErrorBody(output.body, context),
|
|
799
|
-
};
|
|
800
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
801
|
-
switch (errorCode) {
|
|
802
|
-
case "InternalServerException":
|
|
803
|
-
case "com.amazonaws.emrserverless#InternalServerException":
|
|
804
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
805
|
-
case "ResourceNotFoundException":
|
|
806
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
807
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
808
|
-
case "ValidationException":
|
|
809
|
-
case "com.amazonaws.emrserverless#ValidationException":
|
|
810
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
811
|
-
default:
|
|
812
|
-
const parsedBody = parsedOutput.body;
|
|
813
|
-
return throwDefaultError({
|
|
814
|
-
output,
|
|
815
|
-
parsedBody,
|
|
816
|
-
errorCode,
|
|
817
|
-
});
|
|
818
|
-
}
|
|
819
|
-
};
|
|
820
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(EMRServerlessServiceException_1.EMRServerlessServiceException);
|
|
821
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
822
|
-
const contents = (0, smithy_client_1.map)({});
|
|
823
|
-
const data = parsedOutput.body;
|
|
824
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
825
|
-
message: smithy_client_1.expectString,
|
|
826
|
-
});
|
|
827
|
-
Object.assign(contents, doc);
|
|
828
|
-
const exception = new models_0_1.ConflictException({
|
|
829
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
830
|
-
...contents,
|
|
831
|
-
});
|
|
832
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
833
|
-
};
|
|
834
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
835
|
-
const contents = (0, smithy_client_1.map)({});
|
|
836
|
-
const data = parsedOutput.body;
|
|
837
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
838
|
-
message: smithy_client_1.expectString,
|
|
839
|
-
});
|
|
840
|
-
Object.assign(contents, doc);
|
|
841
|
-
const exception = new models_0_1.InternalServerException({
|
|
842
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
843
|
-
...contents,
|
|
844
|
-
});
|
|
845
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
846
|
-
};
|
|
847
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
848
|
-
const contents = (0, smithy_client_1.map)({});
|
|
849
|
-
const data = parsedOutput.body;
|
|
850
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
851
|
-
message: smithy_client_1.expectString,
|
|
852
|
-
});
|
|
853
|
-
Object.assign(contents, doc);
|
|
854
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
855
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
856
|
-
...contents,
|
|
857
|
-
});
|
|
858
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
859
|
-
};
|
|
860
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
861
|
-
const contents = (0, smithy_client_1.map)({});
|
|
862
|
-
const data = parsedOutput.body;
|
|
863
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
864
|
-
message: smithy_client_1.expectString,
|
|
865
|
-
});
|
|
866
|
-
Object.assign(contents, doc);
|
|
867
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
868
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
869
|
-
...contents,
|
|
870
|
-
});
|
|
871
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
872
|
-
};
|
|
873
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
874
|
-
const contents = (0, smithy_client_1.map)({});
|
|
875
|
-
const data = parsedOutput.body;
|
|
876
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
877
|
-
message: smithy_client_1.expectString,
|
|
878
|
-
});
|
|
879
|
-
Object.assign(contents, doc);
|
|
880
|
-
const exception = new models_0_1.ValidationException({
|
|
881
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
882
|
-
...contents,
|
|
883
|
-
});
|
|
884
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
885
|
-
};
|
|
886
|
-
const se_Configuration = (input, context) => {
|
|
887
|
-
return (0, smithy_client_1.take)(input, {
|
|
888
|
-
classification: [],
|
|
889
|
-
configurations: (_) => se_ConfigurationList(_, context),
|
|
890
|
-
properties: smithy_client_1._json,
|
|
891
|
-
});
|
|
892
|
-
};
|
|
893
|
-
const se_ConfigurationList = (input, context) => {
|
|
894
|
-
return input
|
|
895
|
-
.filter((e) => e != null)
|
|
896
|
-
.map((entry) => {
|
|
897
|
-
return se_Configuration(entry, context);
|
|
898
|
-
});
|
|
899
|
-
};
|
|
900
|
-
const se_ConfigurationOverrides = (input, context) => {
|
|
901
|
-
return (0, smithy_client_1.take)(input, {
|
|
902
|
-
applicationConfiguration: (_) => se_ConfigurationList(_, context),
|
|
903
|
-
monitoringConfiguration: smithy_client_1._json,
|
|
904
|
-
});
|
|
905
|
-
};
|
|
906
|
-
const de_Application = (output, context) => {
|
|
907
|
-
return (0, smithy_client_1.take)(output, {
|
|
908
|
-
applicationId: smithy_client_1.expectString,
|
|
909
|
-
architecture: smithy_client_1.expectString,
|
|
910
|
-
arn: smithy_client_1.expectString,
|
|
911
|
-
autoStartConfiguration: smithy_client_1._json,
|
|
912
|
-
autoStopConfiguration: smithy_client_1._json,
|
|
913
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
914
|
-
imageConfiguration: smithy_client_1._json,
|
|
915
|
-
initialCapacity: smithy_client_1._json,
|
|
916
|
-
maximumCapacity: smithy_client_1._json,
|
|
917
|
-
monitoringConfiguration: smithy_client_1._json,
|
|
918
|
-
name: smithy_client_1.expectString,
|
|
919
|
-
networkConfiguration: smithy_client_1._json,
|
|
920
|
-
releaseLabel: smithy_client_1.expectString,
|
|
921
|
-
runtimeConfiguration: (_) => de_ConfigurationList(_, context),
|
|
922
|
-
state: smithy_client_1.expectString,
|
|
923
|
-
stateDetails: smithy_client_1.expectString,
|
|
924
|
-
tags: smithy_client_1._json,
|
|
925
|
-
type: smithy_client_1.expectString,
|
|
926
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
927
|
-
workerTypeSpecifications: smithy_client_1._json,
|
|
928
|
-
});
|
|
929
|
-
};
|
|
930
|
-
const de_ApplicationList = (output, context) => {
|
|
931
|
-
const retVal = (output || [])
|
|
932
|
-
.filter((e) => e != null)
|
|
933
|
-
.map((entry) => {
|
|
934
|
-
return de_ApplicationSummary(entry, context);
|
|
935
|
-
});
|
|
936
|
-
return retVal;
|
|
937
|
-
};
|
|
938
|
-
const de_ApplicationSummary = (output, context) => {
|
|
939
|
-
return (0, smithy_client_1.take)(output, {
|
|
940
|
-
architecture: smithy_client_1.expectString,
|
|
941
|
-
arn: smithy_client_1.expectString,
|
|
942
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
943
|
-
id: smithy_client_1.expectString,
|
|
944
|
-
name: smithy_client_1.expectString,
|
|
945
|
-
releaseLabel: smithy_client_1.expectString,
|
|
946
|
-
state: smithy_client_1.expectString,
|
|
947
|
-
stateDetails: smithy_client_1.expectString,
|
|
948
|
-
type: smithy_client_1.expectString,
|
|
949
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
950
|
-
});
|
|
951
|
-
};
|
|
952
|
-
const de_Configuration = (output, context) => {
|
|
953
|
-
return (0, smithy_client_1.take)(output, {
|
|
954
|
-
classification: smithy_client_1.expectString,
|
|
955
|
-
configurations: (_) => de_ConfigurationList(_, context),
|
|
956
|
-
properties: smithy_client_1._json,
|
|
957
|
-
});
|
|
958
|
-
};
|
|
959
|
-
const de_ConfigurationList = (output, context) => {
|
|
960
|
-
const retVal = (output || [])
|
|
961
|
-
.filter((e) => e != null)
|
|
962
|
-
.map((entry) => {
|
|
963
|
-
return de_Configuration(entry, context);
|
|
964
|
-
});
|
|
965
|
-
return retVal;
|
|
966
|
-
};
|
|
967
|
-
const de_ConfigurationOverrides = (output, context) => {
|
|
968
|
-
return (0, smithy_client_1.take)(output, {
|
|
969
|
-
applicationConfiguration: (_) => de_ConfigurationList(_, context),
|
|
970
|
-
monitoringConfiguration: smithy_client_1._json,
|
|
971
|
-
});
|
|
972
|
-
};
|
|
973
|
-
const de_JobRun = (output, context) => {
|
|
974
|
-
return (0, smithy_client_1.take)(output, {
|
|
975
|
-
applicationId: smithy_client_1.expectString,
|
|
976
|
-
arn: smithy_client_1.expectString,
|
|
977
|
-
billedResourceUtilization: (_) => de_ResourceUtilization(_, context),
|
|
978
|
-
configurationOverrides: (_) => de_ConfigurationOverrides(_, context),
|
|
979
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
980
|
-
createdBy: smithy_client_1.expectString,
|
|
981
|
-
executionRole: smithy_client_1.expectString,
|
|
982
|
-
executionTimeoutMinutes: smithy_client_1.expectLong,
|
|
983
|
-
jobDriver: (_) => (0, smithy_client_1._json)((0, core_1.awsExpectUnion)(_)),
|
|
984
|
-
jobRunId: smithy_client_1.expectString,
|
|
985
|
-
name: smithy_client_1.expectString,
|
|
986
|
-
networkConfiguration: smithy_client_1._json,
|
|
987
|
-
releaseLabel: smithy_client_1.expectString,
|
|
988
|
-
state: smithy_client_1.expectString,
|
|
989
|
-
stateDetails: smithy_client_1.expectString,
|
|
990
|
-
tags: smithy_client_1._json,
|
|
991
|
-
totalExecutionDurationSeconds: smithy_client_1.expectInt32,
|
|
992
|
-
totalResourceUtilization: (_) => de_TotalResourceUtilization(_, context),
|
|
993
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
994
|
-
});
|
|
995
|
-
};
|
|
996
|
-
const de_JobRuns = (output, context) => {
|
|
997
|
-
const retVal = (output || [])
|
|
998
|
-
.filter((e) => e != null)
|
|
999
|
-
.map((entry) => {
|
|
1000
|
-
return de_JobRunSummary(entry, context);
|
|
1001
|
-
});
|
|
1002
|
-
return retVal;
|
|
1003
|
-
};
|
|
1004
|
-
const de_JobRunSummary = (output, context) => {
|
|
1005
|
-
return (0, smithy_client_1.take)(output, {
|
|
1006
|
-
applicationId: smithy_client_1.expectString,
|
|
1007
|
-
arn: smithy_client_1.expectString,
|
|
1008
|
-
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1009
|
-
createdBy: smithy_client_1.expectString,
|
|
1010
|
-
executionRole: smithy_client_1.expectString,
|
|
1011
|
-
id: smithy_client_1.expectString,
|
|
1012
|
-
name: smithy_client_1.expectString,
|
|
1013
|
-
releaseLabel: smithy_client_1.expectString,
|
|
1014
|
-
state: smithy_client_1.expectString,
|
|
1015
|
-
stateDetails: smithy_client_1.expectString,
|
|
1016
|
-
type: smithy_client_1.expectString,
|
|
1017
|
-
updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1018
|
-
});
|
|
1019
|
-
};
|
|
1020
|
-
const de_ResourceUtilization = (output, context) => {
|
|
1021
|
-
return (0, smithy_client_1.take)(output, {
|
|
1022
|
-
memoryGBHour: smithy_client_1.limitedParseDouble,
|
|
1023
|
-
storageGBHour: smithy_client_1.limitedParseDouble,
|
|
1024
|
-
vCPUHour: smithy_client_1.limitedParseDouble,
|
|
1025
|
-
});
|
|
1026
|
-
};
|
|
1027
|
-
const de_TotalResourceUtilization = (output, context) => {
|
|
1028
|
-
return (0, smithy_client_1.take)(output, {
|
|
1029
|
-
memoryGBHour: smithy_client_1.limitedParseDouble,
|
|
1030
|
-
storageGBHour: smithy_client_1.limitedParseDouble,
|
|
1031
|
-
vCPUHour: smithy_client_1.limitedParseDouble,
|
|
1032
|
-
});
|
|
1033
|
-
};
|
|
1034
|
-
const deserializeMetadata = (output) => ({
|
|
1035
|
-
httpStatusCode: output.statusCode,
|
|
1036
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1037
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1038
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1039
|
-
});
|
|
1040
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1041
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1042
|
-
value !== null &&
|
|
1043
|
-
value !== "" &&
|
|
1044
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1045
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1046
|
-
const _cAA = "createdAtAfter";
|
|
1047
|
-
const _cAB = "createdAtBefore";
|
|
1048
|
-
const _mR = "maxResults";
|
|
1049
|
-
const _nT = "nextToken";
|
|
1050
|
-
const _s = "states";
|
|
1051
|
-
const _tK = "tagKeys";
|
|
1052
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1053
|
-
if (encoded.length) {
|
|
1054
|
-
return JSON.parse(encoded);
|
|
1055
|
-
}
|
|
1056
|
-
return {};
|
|
1057
|
-
});
|
|
1058
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1059
|
-
const value = await parseBody(errorBody, context);
|
|
1060
|
-
value.message = value.message ?? value.Message;
|
|
1061
|
-
return value;
|
|
1062
|
-
};
|
|
1063
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1064
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1065
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1066
|
-
let cleanValue = rawValue;
|
|
1067
|
-
if (typeof cleanValue === "number") {
|
|
1068
|
-
cleanValue = cleanValue.toString();
|
|
1069
|
-
}
|
|
1070
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1071
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1072
|
-
}
|
|
1073
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1074
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1075
|
-
}
|
|
1076
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1077
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1078
|
-
}
|
|
1079
|
-
return cleanValue;
|
|
1080
|
-
};
|
|
1081
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1082
|
-
if (headerKey !== undefined) {
|
|
1083
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1084
|
-
}
|
|
1085
|
-
if (data.code !== undefined) {
|
|
1086
|
-
return sanitizeErrorCode(data.code);
|
|
1087
|
-
}
|
|
1088
|
-
if (data["__type"] !== undefined) {
|
|
1089
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1090
|
-
}
|
|
1091
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|