@aws-sdk/client-emr-serverless 3.180.0 → 3.183.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/CHANGELOG.md +25 -0
- package/dist-cjs/EMRServerless.js +15 -0
- package/dist-cjs/commands/GetDashboardForJobRunCommand.js +36 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +10 -2
- package/dist-cjs/protocols/Aws_restJson1.js +82 -23
- package/dist-es/EMRServerless.js +72 -64
- package/dist-es/EMRServerlessClient.js +22 -28
- package/dist-es/commands/CancelJobRunCommand.js +21 -28
- package/dist-es/commands/CreateApplicationCommand.js +21 -28
- package/dist-es/commands/DeleteApplicationCommand.js +21 -28
- package/dist-es/commands/GetApplicationCommand.js +21 -28
- package/dist-es/commands/GetDashboardForJobRunCommand.js +32 -0
- package/dist-es/commands/GetJobRunCommand.js +21 -28
- package/dist-es/commands/ListApplicationsCommand.js +21 -28
- package/dist-es/commands/ListJobRunsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/StartApplicationCommand.js +21 -28
- package/dist-es/commands/StartJobRunCommand.js +21 -28
- package/dist-es/commands/StopApplicationCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateApplicationCommand.js +21 -28
- package/dist-es/commands/index.js +1 -0
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/EMRServerlessServiceException.js +5 -10
- package/dist-es/models/models_0.js +224 -114
- package/dist-es/pagination/ListApplicationsPaginator.js +25 -68
- package/dist-es/pagination/ListJobRunsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1150 -1455
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-types/EMRServerless.d.ts +7 -0
- package/dist-types/EMRServerlessClient.d.ts +3 -2
- package/dist-types/commands/GetDashboardForJobRunCommand.d.ts +35 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +68 -22
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/EMRServerless.d.ts +17 -0
- package/dist-types/ts3.4/EMRServerlessClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/GetDashboardForJobRunCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +13 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +33 -33
|
@@ -1,1462 +1,1159 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { EMRServerlessServiceException as __BaseException } from "../models/EMRServerlessServiceException";
|
|
6
5
|
import { ConflictException, InternalServerException, JobDriver, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
method: "DELETE",
|
|
24
|
-
headers: headers,
|
|
25
|
-
path: resolvedPath,
|
|
26
|
-
body: body,
|
|
27
|
-
})];
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}); };
|
|
31
|
-
export var serializeAws_restJson1CreateApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
32
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
33
|
-
var _c;
|
|
34
|
-
return __generator(this, function (_d) {
|
|
35
|
-
switch (_d.label) {
|
|
36
|
-
case 0: return [4, context.endpoint()];
|
|
37
|
-
case 1:
|
|
38
|
-
_a = _d.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
39
|
-
headers = {
|
|
40
|
-
"content-type": "application/json",
|
|
41
|
-
};
|
|
42
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
43
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.autoStartConfiguration != null && {
|
|
44
|
-
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
45
|
-
})), (input.autoStopConfiguration != null && {
|
|
46
|
-
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
47
|
-
})), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.initialCapacity != null && {
|
|
48
|
-
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
49
|
-
})), (input.maximumCapacity != null && {
|
|
50
|
-
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
51
|
-
})), (input.name != null && { name: input.name })), (input.networkConfiguration != null && {
|
|
52
|
-
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
53
|
-
})), (input.releaseLabel != null && { releaseLabel: input.releaseLabel })), (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })), (input.type != null && { type: input.type })));
|
|
54
|
-
return [2, new __HttpRequest({
|
|
55
|
-
protocol: protocol,
|
|
56
|
-
hostname: hostname,
|
|
57
|
-
port: port,
|
|
58
|
-
method: "POST",
|
|
59
|
-
headers: headers,
|
|
60
|
-
path: resolvedPath,
|
|
61
|
-
body: body,
|
|
62
|
-
})];
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}); };
|
|
66
|
-
export var serializeAws_restJson1DeleteApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
67
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
68
|
-
return __generator(this, function (_c) {
|
|
69
|
-
switch (_c.label) {
|
|
70
|
-
case 0: return [4, context.endpoint()];
|
|
71
|
-
case 1:
|
|
72
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
73
|
-
headers = {};
|
|
74
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
75
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
76
|
-
return [2, new __HttpRequest({
|
|
77
|
-
protocol: protocol,
|
|
78
|
-
hostname: hostname,
|
|
79
|
-
port: port,
|
|
80
|
-
method: "DELETE",
|
|
81
|
-
headers: headers,
|
|
82
|
-
path: resolvedPath,
|
|
83
|
-
body: body,
|
|
84
|
-
})];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}); };
|
|
88
|
-
export var serializeAws_restJson1GetApplicationCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
90
|
-
return __generator(this, function (_c) {
|
|
91
|
-
switch (_c.label) {
|
|
92
|
-
case 0: return [4, context.endpoint()];
|
|
93
|
-
case 1:
|
|
94
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
95
|
-
headers = {};
|
|
96
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}";
|
|
97
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
98
|
-
return [2, new __HttpRequest({
|
|
99
|
-
protocol: protocol,
|
|
100
|
-
hostname: hostname,
|
|
101
|
-
port: port,
|
|
102
|
-
method: "GET",
|
|
103
|
-
headers: headers,
|
|
104
|
-
path: resolvedPath,
|
|
105
|
-
body: body,
|
|
106
|
-
})];
|
|
107
|
-
}
|
|
6
|
+
export const serializeAws_restJson1CancelJobRunCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {};
|
|
9
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
10
|
+
"/applications/{applicationId}/jobruns/{jobRunId}";
|
|
11
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
12
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
13
|
+
let body;
|
|
14
|
+
return new __HttpRequest({
|
|
15
|
+
protocol,
|
|
16
|
+
hostname,
|
|
17
|
+
port,
|
|
18
|
+
method: "DELETE",
|
|
19
|
+
headers,
|
|
20
|
+
path: resolvedPath,
|
|
21
|
+
body,
|
|
108
22
|
});
|
|
109
|
-
}
|
|
110
|
-
export
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
case 0: return [4, context.endpoint()];
|
|
139
|
-
case 1:
|
|
140
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
141
|
-
headers = {};
|
|
142
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications";
|
|
143
|
-
query = map({
|
|
144
|
-
nextToken: [, input.nextToken],
|
|
145
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
146
|
-
states: [
|
|
147
|
-
function () { return input.states !== void 0; },
|
|
148
|
-
function () { return (Array.from(input.states.values()) || []).map(function (_entry) { return _entry; }); },
|
|
149
|
-
],
|
|
150
|
-
});
|
|
151
|
-
return [2, new __HttpRequest({
|
|
152
|
-
protocol: protocol,
|
|
153
|
-
hostname: hostname,
|
|
154
|
-
port: port,
|
|
155
|
-
method: "GET",
|
|
156
|
-
headers: headers,
|
|
157
|
-
path: resolvedPath,
|
|
158
|
-
query: query,
|
|
159
|
-
body: body,
|
|
160
|
-
})];
|
|
161
|
-
}
|
|
23
|
+
};
|
|
24
|
+
export const serializeAws_restJson1CreateApplicationCommand = async (input, context) => {
|
|
25
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
26
|
+
const headers = {
|
|
27
|
+
"content-type": "application/json",
|
|
28
|
+
};
|
|
29
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
30
|
+
let body;
|
|
31
|
+
body = JSON.stringify({
|
|
32
|
+
...(input.autoStartConfiguration != null && {
|
|
33
|
+
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
34
|
+
}),
|
|
35
|
+
...(input.autoStopConfiguration != null && {
|
|
36
|
+
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
37
|
+
}),
|
|
38
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
39
|
+
...(input.initialCapacity != null && {
|
|
40
|
+
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
41
|
+
}),
|
|
42
|
+
...(input.maximumCapacity != null && {
|
|
43
|
+
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
44
|
+
}),
|
|
45
|
+
...(input.name != null && { name: input.name }),
|
|
46
|
+
...(input.networkConfiguration != null && {
|
|
47
|
+
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
48
|
+
}),
|
|
49
|
+
...(input.releaseLabel != null && { releaseLabel: input.releaseLabel }),
|
|
50
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
51
|
+
...(input.type != null && { type: input.type }),
|
|
162
52
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
headers = {};
|
|
172
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/applications/{applicationId}/jobruns";
|
|
173
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", function () { return input.applicationId; }, "{applicationId}", false);
|
|
174
|
-
query = map({
|
|
175
|
-
nextToken: [, input.nextToken],
|
|
176
|
-
maxResults: [function () { return input.maxResults !== void 0; }, function () { return input.maxResults.toString(); }],
|
|
177
|
-
createdAtAfter: [
|
|
178
|
-
function () { return input.createdAtAfter !== void 0; },
|
|
179
|
-
function () { return (input.createdAtAfter.toISOString().split(".")[0] + "Z").toString(); },
|
|
180
|
-
],
|
|
181
|
-
createdAtBefore: [
|
|
182
|
-
function () { return input.createdAtBefore !== void 0; },
|
|
183
|
-
function () { return (input.createdAtBefore.toISOString().split(".")[0] + "Z").toString(); },
|
|
184
|
-
],
|
|
185
|
-
states: [
|
|
186
|
-
function () { return input.states !== void 0; },
|
|
187
|
-
function () { return (Array.from(input.states.values()) || []).map(function (_entry) { return _entry; }); },
|
|
188
|
-
],
|
|
189
|
-
});
|
|
190
|
-
return [2, new __HttpRequest({
|
|
191
|
-
protocol: protocol,
|
|
192
|
-
hostname: hostname,
|
|
193
|
-
port: port,
|
|
194
|
-
method: "GET",
|
|
195
|
-
headers: headers,
|
|
196
|
-
path: resolvedPath,
|
|
197
|
-
query: query,
|
|
198
|
-
body: body,
|
|
199
|
-
})];
|
|
200
|
-
}
|
|
53
|
+
return new __HttpRequest({
|
|
54
|
+
protocol,
|
|
55
|
+
hostname,
|
|
56
|
+
port,
|
|
57
|
+
method: "POST",
|
|
58
|
+
headers,
|
|
59
|
+
path: resolvedPath,
|
|
60
|
+
body,
|
|
201
61
|
});
|
|
202
|
-
}
|
|
203
|
-
export
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
method: "GET",
|
|
218
|
-
headers: headers,
|
|
219
|
-
path: resolvedPath,
|
|
220
|
-
body: body,
|
|
221
|
-
})];
|
|
222
|
-
}
|
|
62
|
+
};
|
|
63
|
+
export const serializeAws_restJson1DeleteApplicationCommand = async (input, context) => {
|
|
64
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
65
|
+
const headers = {};
|
|
66
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
|
|
67
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
68
|
+
let body;
|
|
69
|
+
return new __HttpRequest({
|
|
70
|
+
protocol,
|
|
71
|
+
hostname,
|
|
72
|
+
port,
|
|
73
|
+
method: "DELETE",
|
|
74
|
+
headers,
|
|
75
|
+
path: resolvedPath,
|
|
76
|
+
body,
|
|
223
77
|
});
|
|
224
|
-
}
|
|
225
|
-
export
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
method: "POST",
|
|
240
|
-
headers: headers,
|
|
241
|
-
path: resolvedPath,
|
|
242
|
-
body: body,
|
|
243
|
-
})];
|
|
244
|
-
}
|
|
78
|
+
};
|
|
79
|
+
export const serializeAws_restJson1GetApplicationCommand = async (input, context) => {
|
|
80
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
81
|
+
const headers = {};
|
|
82
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
|
|
83
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
84
|
+
let body;
|
|
85
|
+
return new __HttpRequest({
|
|
86
|
+
protocol,
|
|
87
|
+
hostname,
|
|
88
|
+
port,
|
|
89
|
+
method: "GET",
|
|
90
|
+
headers,
|
|
91
|
+
path: resolvedPath,
|
|
92
|
+
body,
|
|
245
93
|
});
|
|
246
|
-
}
|
|
247
|
-
export
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
return [2, new __HttpRequest({
|
|
264
|
-
protocol: protocol,
|
|
265
|
-
hostname: hostname,
|
|
266
|
-
port: port,
|
|
267
|
-
method: "POST",
|
|
268
|
-
headers: headers,
|
|
269
|
-
path: resolvedPath,
|
|
270
|
-
body: body,
|
|
271
|
-
})];
|
|
272
|
-
}
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_restJson1GetDashboardForJobRunCommand = async (input, context) => {
|
|
96
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
97
|
+
const headers = {};
|
|
98
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
99
|
+
"/applications/{applicationId}/jobruns/{jobRunId}/dashboard";
|
|
100
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
101
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
102
|
+
let body;
|
|
103
|
+
return new __HttpRequest({
|
|
104
|
+
protocol,
|
|
105
|
+
hostname,
|
|
106
|
+
port,
|
|
107
|
+
method: "GET",
|
|
108
|
+
headers,
|
|
109
|
+
path: resolvedPath,
|
|
110
|
+
body,
|
|
273
111
|
});
|
|
274
|
-
}
|
|
275
|
-
export
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
path: resolvedPath,
|
|
292
|
-
body: body,
|
|
293
|
-
})];
|
|
294
|
-
}
|
|
112
|
+
};
|
|
113
|
+
export const serializeAws_restJson1GetJobRunCommand = async (input, context) => {
|
|
114
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
115
|
+
const headers = {};
|
|
116
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` +
|
|
117
|
+
"/applications/{applicationId}/jobruns/{jobRunId}";
|
|
118
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
119
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "jobRunId", () => input.jobRunId, "{jobRunId}", false);
|
|
120
|
+
let body;
|
|
121
|
+
return new __HttpRequest({
|
|
122
|
+
protocol,
|
|
123
|
+
hostname,
|
|
124
|
+
port,
|
|
125
|
+
method: "GET",
|
|
126
|
+
headers,
|
|
127
|
+
path: resolvedPath,
|
|
128
|
+
body,
|
|
295
129
|
});
|
|
296
|
-
}
|
|
297
|
-
export
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
"content-type": "application/json",
|
|
306
|
-
};
|
|
307
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
308
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
309
|
-
body = JSON.stringify(__assign({}, (input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) })));
|
|
310
|
-
return [2, new __HttpRequest({
|
|
311
|
-
protocol: protocol,
|
|
312
|
-
hostname: hostname,
|
|
313
|
-
port: port,
|
|
314
|
-
method: "POST",
|
|
315
|
-
headers: headers,
|
|
316
|
-
path: resolvedPath,
|
|
317
|
-
body: body,
|
|
318
|
-
})];
|
|
319
|
-
}
|
|
130
|
+
};
|
|
131
|
+
export const serializeAws_restJson1ListApplicationsCommand = async (input, context) => {
|
|
132
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
133
|
+
const headers = {};
|
|
134
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications";
|
|
135
|
+
const query = map({
|
|
136
|
+
nextToken: [, input.nextToken],
|
|
137
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
138
|
+
states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
|
|
320
139
|
});
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
332
|
-
query = map({
|
|
333
|
-
tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
334
|
-
});
|
|
335
|
-
return [2, new __HttpRequest({
|
|
336
|
-
protocol: protocol,
|
|
337
|
-
hostname: hostname,
|
|
338
|
-
port: port,
|
|
339
|
-
method: "DELETE",
|
|
340
|
-
headers: headers,
|
|
341
|
-
path: resolvedPath,
|
|
342
|
-
query: query,
|
|
343
|
-
body: body,
|
|
344
|
-
})];
|
|
345
|
-
}
|
|
140
|
+
let body;
|
|
141
|
+
return new __HttpRequest({
|
|
142
|
+
protocol,
|
|
143
|
+
hostname,
|
|
144
|
+
port,
|
|
145
|
+
method: "GET",
|
|
146
|
+
headers,
|
|
147
|
+
path: resolvedPath,
|
|
148
|
+
query,
|
|
149
|
+
body,
|
|
346
150
|
});
|
|
347
|
-
}
|
|
348
|
-
export
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
})), { clientToken: (_c = input.clientToken) !== null && _c !== void 0 ? _c : generateIdempotencyToken() }), (input.initialCapacity != null && {
|
|
366
|
-
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
367
|
-
})), (input.maximumCapacity != null && {
|
|
368
|
-
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
369
|
-
})), (input.networkConfiguration != null && {
|
|
370
|
-
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
371
|
-
})));
|
|
372
|
-
return [2, new __HttpRequest({
|
|
373
|
-
protocol: protocol,
|
|
374
|
-
hostname: hostname,
|
|
375
|
-
port: port,
|
|
376
|
-
method: "PATCH",
|
|
377
|
-
headers: headers,
|
|
378
|
-
path: resolvedPath,
|
|
379
|
-
body: body,
|
|
380
|
-
})];
|
|
381
|
-
}
|
|
151
|
+
};
|
|
152
|
+
export const serializeAws_restJson1ListJobRunsCommand = async (input, context) => {
|
|
153
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
154
|
+
const headers = {};
|
|
155
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/jobruns";
|
|
156
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
157
|
+
const query = map({
|
|
158
|
+
nextToken: [, input.nextToken],
|
|
159
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
160
|
+
createdAtAfter: [
|
|
161
|
+
() => input.createdAtAfter !== void 0,
|
|
162
|
+
() => (input.createdAtAfter.toISOString().split(".")[0] + "Z").toString(),
|
|
163
|
+
],
|
|
164
|
+
createdAtBefore: [
|
|
165
|
+
() => input.createdAtBefore !== void 0,
|
|
166
|
+
() => (input.createdAtBefore.toISOString().split(".")[0] + "Z").toString(),
|
|
167
|
+
],
|
|
168
|
+
states: [() => input.states !== void 0, () => (input.states || []).map((_entry) => _entry)],
|
|
382
169
|
});
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
$metadata: deserializeMetadata(output),
|
|
394
|
-
});
|
|
395
|
-
_a = __expectNonNull;
|
|
396
|
-
_b = __expectObject;
|
|
397
|
-
return [4, parseBody(output.body, context)];
|
|
398
|
-
case 1:
|
|
399
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
400
|
-
if (data.applicationId != null) {
|
|
401
|
-
contents.applicationId = __expectString(data.applicationId);
|
|
402
|
-
}
|
|
403
|
-
if (data.jobRunId != null) {
|
|
404
|
-
contents.jobRunId = __expectString(data.jobRunId);
|
|
405
|
-
}
|
|
406
|
-
return [2, contents];
|
|
407
|
-
}
|
|
170
|
+
let body;
|
|
171
|
+
return new __HttpRequest({
|
|
172
|
+
protocol,
|
|
173
|
+
hostname,
|
|
174
|
+
port,
|
|
175
|
+
method: "GET",
|
|
176
|
+
headers,
|
|
177
|
+
path: resolvedPath,
|
|
178
|
+
query,
|
|
179
|
+
body,
|
|
408
180
|
});
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
case "InternalServerException": return [3, 2];
|
|
425
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
426
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
427
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
428
|
-
case "ValidationException": return [3, 6];
|
|
429
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
430
|
-
}
|
|
431
|
-
return [3, 8];
|
|
432
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
433
|
-
case 3: throw _d.sent();
|
|
434
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
435
|
-
case 5: throw _d.sent();
|
|
436
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
437
|
-
case 7: throw _d.sent();
|
|
438
|
-
case 8:
|
|
439
|
-
parsedBody = parsedOutput.body;
|
|
440
|
-
throwDefaultError({
|
|
441
|
-
output: output,
|
|
442
|
-
parsedBody: parsedBody,
|
|
443
|
-
exceptionCtor: __BaseException,
|
|
444
|
-
errorCode: errorCode,
|
|
445
|
-
});
|
|
446
|
-
_d.label = 9;
|
|
447
|
-
case 9: return [2];
|
|
448
|
-
}
|
|
181
|
+
};
|
|
182
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
183
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
184
|
+
const headers = {};
|
|
185
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
186
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
187
|
+
let body;
|
|
188
|
+
return new __HttpRequest({
|
|
189
|
+
protocol,
|
|
190
|
+
hostname,
|
|
191
|
+
port,
|
|
192
|
+
method: "GET",
|
|
193
|
+
headers,
|
|
194
|
+
path: resolvedPath,
|
|
195
|
+
body,
|
|
449
196
|
});
|
|
450
|
-
}
|
|
451
|
-
export
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
case 1:
|
|
466
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
467
|
-
if (data.applicationId != null) {
|
|
468
|
-
contents.applicationId = __expectString(data.applicationId);
|
|
469
|
-
}
|
|
470
|
-
if (data.arn != null) {
|
|
471
|
-
contents.arn = __expectString(data.arn);
|
|
472
|
-
}
|
|
473
|
-
if (data.name != null) {
|
|
474
|
-
contents.name = __expectString(data.name);
|
|
475
|
-
}
|
|
476
|
-
return [2, contents];
|
|
477
|
-
}
|
|
197
|
+
};
|
|
198
|
+
export const serializeAws_restJson1StartApplicationCommand = async (input, context) => {
|
|
199
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
200
|
+
const headers = {};
|
|
201
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/start";
|
|
202
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
203
|
+
let body;
|
|
204
|
+
return new __HttpRequest({
|
|
205
|
+
protocol,
|
|
206
|
+
hostname,
|
|
207
|
+
port,
|
|
208
|
+
method: "POST",
|
|
209
|
+
headers,
|
|
210
|
+
path: resolvedPath,
|
|
211
|
+
body,
|
|
478
212
|
});
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
case "ValidationException": return [3, 6];
|
|
499
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
500
|
-
}
|
|
501
|
-
return [3, 8];
|
|
502
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
503
|
-
case 3: throw _d.sent();
|
|
504
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
505
|
-
case 5: throw _d.sent();
|
|
506
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
507
|
-
case 7: throw _d.sent();
|
|
508
|
-
case 8:
|
|
509
|
-
parsedBody = parsedOutput.body;
|
|
510
|
-
throwDefaultError({
|
|
511
|
-
output: output,
|
|
512
|
-
parsedBody: parsedBody,
|
|
513
|
-
exceptionCtor: __BaseException,
|
|
514
|
-
errorCode: errorCode,
|
|
515
|
-
});
|
|
516
|
-
_d.label = 9;
|
|
517
|
-
case 9: return [2];
|
|
518
|
-
}
|
|
213
|
+
};
|
|
214
|
+
export const serializeAws_restJson1StartJobRunCommand = async (input, context) => {
|
|
215
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
216
|
+
const headers = {
|
|
217
|
+
"content-type": "application/json",
|
|
218
|
+
};
|
|
219
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/jobruns";
|
|
220
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
221
|
+
let body;
|
|
222
|
+
body = JSON.stringify({
|
|
223
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
224
|
+
...(input.configurationOverrides != null && {
|
|
225
|
+
configurationOverrides: serializeAws_restJson1ConfigurationOverrides(input.configurationOverrides, context),
|
|
226
|
+
}),
|
|
227
|
+
...(input.executionRoleArn != null && { executionRoleArn: input.executionRoleArn }),
|
|
228
|
+
...(input.executionTimeoutMinutes != null && { executionTimeoutMinutes: input.executionTimeoutMinutes }),
|
|
229
|
+
...(input.jobDriver != null && { jobDriver: serializeAws_restJson1JobDriver(input.jobDriver, context) }),
|
|
230
|
+
...(input.name != null && { name: input.name }),
|
|
231
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
519
232
|
});
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}
|
|
529
|
-
contents = map({
|
|
530
|
-
$metadata: deserializeMetadata(output),
|
|
531
|
-
});
|
|
532
|
-
return [4, collectBody(output.body, context)];
|
|
533
|
-
case 1:
|
|
534
|
-
_a.sent();
|
|
535
|
-
return [2, contents];
|
|
536
|
-
}
|
|
233
|
+
return new __HttpRequest({
|
|
234
|
+
protocol,
|
|
235
|
+
hostname,
|
|
236
|
+
port,
|
|
237
|
+
method: "POST",
|
|
238
|
+
headers,
|
|
239
|
+
path: resolvedPath,
|
|
240
|
+
body,
|
|
537
241
|
});
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
case "InternalServerException": return [3, 2];
|
|
554
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
555
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
556
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
557
|
-
case "ValidationException": return [3, 6];
|
|
558
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
559
|
-
}
|
|
560
|
-
return [3, 8];
|
|
561
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
562
|
-
case 3: throw _d.sent();
|
|
563
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
564
|
-
case 5: throw _d.sent();
|
|
565
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
566
|
-
case 7: throw _d.sent();
|
|
567
|
-
case 8:
|
|
568
|
-
parsedBody = parsedOutput.body;
|
|
569
|
-
throwDefaultError({
|
|
570
|
-
output: output,
|
|
571
|
-
parsedBody: parsedBody,
|
|
572
|
-
exceptionCtor: __BaseException,
|
|
573
|
-
errorCode: errorCode,
|
|
574
|
-
});
|
|
575
|
-
_d.label = 9;
|
|
576
|
-
case 9: return [2];
|
|
577
|
-
}
|
|
242
|
+
};
|
|
243
|
+
export const serializeAws_restJson1StopApplicationCommand = async (input, context) => {
|
|
244
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
245
|
+
const headers = {};
|
|
246
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}/stop";
|
|
247
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
248
|
+
let body;
|
|
249
|
+
return new __HttpRequest({
|
|
250
|
+
protocol,
|
|
251
|
+
hostname,
|
|
252
|
+
port,
|
|
253
|
+
method: "POST",
|
|
254
|
+
headers,
|
|
255
|
+
path: resolvedPath,
|
|
256
|
+
body,
|
|
578
257
|
});
|
|
579
|
-
}
|
|
580
|
-
export
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
});
|
|
591
|
-
_a = __expectNonNull;
|
|
592
|
-
_b = __expectObject;
|
|
593
|
-
return [4, parseBody(output.body, context)];
|
|
594
|
-
case 1:
|
|
595
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
596
|
-
if (data.application != null) {
|
|
597
|
-
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
598
|
-
}
|
|
599
|
-
return [2, contents];
|
|
600
|
-
}
|
|
258
|
+
};
|
|
259
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
260
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
261
|
+
const headers = {
|
|
262
|
+
"content-type": "application/json",
|
|
263
|
+
};
|
|
264
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
265
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
266
|
+
let body;
|
|
267
|
+
body = JSON.stringify({
|
|
268
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
601
269
|
});
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
_c = {};
|
|
611
|
-
return [4, parseBody(output.body, context)];
|
|
612
|
-
case 1:
|
|
613
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
614
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
615
|
-
_b = errorCode;
|
|
616
|
-
switch (_b) {
|
|
617
|
-
case "InternalServerException": return [3, 2];
|
|
618
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
619
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
620
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
621
|
-
case "ValidationException": return [3, 6];
|
|
622
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
623
|
-
}
|
|
624
|
-
return [3, 8];
|
|
625
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
626
|
-
case 3: throw _d.sent();
|
|
627
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
628
|
-
case 5: throw _d.sent();
|
|
629
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
630
|
-
case 7: throw _d.sent();
|
|
631
|
-
case 8:
|
|
632
|
-
parsedBody = parsedOutput.body;
|
|
633
|
-
throwDefaultError({
|
|
634
|
-
output: output,
|
|
635
|
-
parsedBody: parsedBody,
|
|
636
|
-
exceptionCtor: __BaseException,
|
|
637
|
-
errorCode: errorCode,
|
|
638
|
-
});
|
|
639
|
-
_d.label = 9;
|
|
640
|
-
case 9: return [2];
|
|
641
|
-
}
|
|
270
|
+
return new __HttpRequest({
|
|
271
|
+
protocol,
|
|
272
|
+
hostname,
|
|
273
|
+
port,
|
|
274
|
+
method: "POST",
|
|
275
|
+
headers,
|
|
276
|
+
path: resolvedPath,
|
|
277
|
+
body,
|
|
642
278
|
});
|
|
643
|
-
}
|
|
644
|
-
export
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
}
|
|
652
|
-
contents = map({
|
|
653
|
-
$metadata: deserializeMetadata(output),
|
|
654
|
-
});
|
|
655
|
-
_a = __expectNonNull;
|
|
656
|
-
_b = __expectObject;
|
|
657
|
-
return [4, parseBody(output.body, context)];
|
|
658
|
-
case 1:
|
|
659
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
660
|
-
if (data.jobRun != null) {
|
|
661
|
-
contents.jobRun = deserializeAws_restJson1JobRun(data.jobRun, context);
|
|
662
|
-
}
|
|
663
|
-
return [2, contents];
|
|
664
|
-
}
|
|
279
|
+
};
|
|
280
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
281
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
282
|
+
const headers = {};
|
|
283
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
284
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
285
|
+
const query = map({
|
|
286
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
665
287
|
});
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
case 1:
|
|
677
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
678
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
679
|
-
_b = errorCode;
|
|
680
|
-
switch (_b) {
|
|
681
|
-
case "InternalServerException": return [3, 2];
|
|
682
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
683
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
684
|
-
case "com.amazonaws.emrserverless#ResourceNotFoundException": return [3, 4];
|
|
685
|
-
case "ValidationException": return [3, 6];
|
|
686
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 6];
|
|
687
|
-
}
|
|
688
|
-
return [3, 8];
|
|
689
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
690
|
-
case 3: throw _d.sent();
|
|
691
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
692
|
-
case 5: throw _d.sent();
|
|
693
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
694
|
-
case 7: throw _d.sent();
|
|
695
|
-
case 8:
|
|
696
|
-
parsedBody = parsedOutput.body;
|
|
697
|
-
throwDefaultError({
|
|
698
|
-
output: output,
|
|
699
|
-
parsedBody: parsedBody,
|
|
700
|
-
exceptionCtor: __BaseException,
|
|
701
|
-
errorCode: errorCode,
|
|
702
|
-
});
|
|
703
|
-
_d.label = 9;
|
|
704
|
-
case 9: return [2];
|
|
705
|
-
}
|
|
288
|
+
let body;
|
|
289
|
+
return new __HttpRequest({
|
|
290
|
+
protocol,
|
|
291
|
+
hostname,
|
|
292
|
+
port,
|
|
293
|
+
method: "DELETE",
|
|
294
|
+
headers,
|
|
295
|
+
path: resolvedPath,
|
|
296
|
+
query,
|
|
297
|
+
body,
|
|
706
298
|
});
|
|
707
|
-
}
|
|
708
|
-
export
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
299
|
+
};
|
|
300
|
+
export const serializeAws_restJson1UpdateApplicationCommand = async (input, context) => {
|
|
301
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
302
|
+
const headers = {
|
|
303
|
+
"content-type": "application/json",
|
|
304
|
+
};
|
|
305
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/applications/{applicationId}";
|
|
306
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "applicationId", () => input.applicationId, "{applicationId}", false);
|
|
307
|
+
let body;
|
|
308
|
+
body = JSON.stringify({
|
|
309
|
+
...(input.autoStartConfiguration != null && {
|
|
310
|
+
autoStartConfiguration: serializeAws_restJson1AutoStartConfig(input.autoStartConfiguration, context),
|
|
311
|
+
}),
|
|
312
|
+
...(input.autoStopConfiguration != null && {
|
|
313
|
+
autoStopConfiguration: serializeAws_restJson1AutoStopConfig(input.autoStopConfiguration, context),
|
|
314
|
+
}),
|
|
315
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
316
|
+
...(input.initialCapacity != null && {
|
|
317
|
+
initialCapacity: serializeAws_restJson1InitialCapacityConfigMap(input.initialCapacity, context),
|
|
318
|
+
}),
|
|
319
|
+
...(input.maximumCapacity != null && {
|
|
320
|
+
maximumCapacity: serializeAws_restJson1MaximumAllowedResources(input.maximumCapacity, context),
|
|
321
|
+
}),
|
|
322
|
+
...(input.networkConfiguration != null && {
|
|
323
|
+
networkConfiguration: serializeAws_restJson1NetworkConfiguration(input.networkConfiguration, context),
|
|
324
|
+
}),
|
|
732
325
|
});
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
_c = {};
|
|
742
|
-
return [4, parseBody(output.body, context)];
|
|
743
|
-
case 1:
|
|
744
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
745
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
746
|
-
_b = errorCode;
|
|
747
|
-
switch (_b) {
|
|
748
|
-
case "InternalServerException": return [3, 2];
|
|
749
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
750
|
-
case "ValidationException": return [3, 4];
|
|
751
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 4];
|
|
752
|
-
}
|
|
753
|
-
return [3, 6];
|
|
754
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
755
|
-
case 3: throw _d.sent();
|
|
756
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
757
|
-
case 5: throw _d.sent();
|
|
758
|
-
case 6:
|
|
759
|
-
parsedBody = parsedOutput.body;
|
|
760
|
-
throwDefaultError({
|
|
761
|
-
output: output,
|
|
762
|
-
parsedBody: parsedBody,
|
|
763
|
-
exceptionCtor: __BaseException,
|
|
764
|
-
errorCode: errorCode,
|
|
765
|
-
});
|
|
766
|
-
_d.label = 7;
|
|
767
|
-
case 7: return [2];
|
|
768
|
-
}
|
|
326
|
+
return new __HttpRequest({
|
|
327
|
+
protocol,
|
|
328
|
+
hostname,
|
|
329
|
+
port,
|
|
330
|
+
method: "PATCH",
|
|
331
|
+
headers,
|
|
332
|
+
path: resolvedPath,
|
|
333
|
+
body,
|
|
769
334
|
});
|
|
770
|
-
}
|
|
771
|
-
export
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
return [2, deserializeAws_restJson1ListJobRunsCommandError(output, context)];
|
|
778
|
-
}
|
|
779
|
-
contents = map({
|
|
780
|
-
$metadata: deserializeMetadata(output),
|
|
781
|
-
});
|
|
782
|
-
_a = __expectNonNull;
|
|
783
|
-
_b = __expectObject;
|
|
784
|
-
return [4, parseBody(output.body, context)];
|
|
785
|
-
case 1:
|
|
786
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
787
|
-
if (data.jobRuns != null) {
|
|
788
|
-
contents.jobRuns = deserializeAws_restJson1JobRuns(data.jobRuns, context);
|
|
789
|
-
}
|
|
790
|
-
if (data.nextToken != null) {
|
|
791
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
792
|
-
}
|
|
793
|
-
return [2, contents];
|
|
794
|
-
}
|
|
795
|
-
});
|
|
796
|
-
}); };
|
|
797
|
-
var deserializeAws_restJson1ListJobRunsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
798
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
799
|
-
var _c;
|
|
800
|
-
return __generator(this, function (_d) {
|
|
801
|
-
switch (_d.label) {
|
|
802
|
-
case 0:
|
|
803
|
-
_a = [__assign({}, output)];
|
|
804
|
-
_c = {};
|
|
805
|
-
return [4, parseBody(output.body, context)];
|
|
806
|
-
case 1:
|
|
807
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
808
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
809
|
-
_b = errorCode;
|
|
810
|
-
switch (_b) {
|
|
811
|
-
case "InternalServerException": return [3, 2];
|
|
812
|
-
case "com.amazonaws.emrserverless#InternalServerException": return [3, 2];
|
|
813
|
-
case "ValidationException": return [3, 4];
|
|
814
|
-
case "com.amazonaws.emrserverless#ValidationException": return [3, 4];
|
|
815
|
-
}
|
|
816
|
-
return [3, 6];
|
|
817
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
818
|
-
case 3: throw _d.sent();
|
|
819
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
820
|
-
case 5: throw _d.sent();
|
|
821
|
-
case 6:
|
|
822
|
-
parsedBody = parsedOutput.body;
|
|
823
|
-
throwDefaultError({
|
|
824
|
-
output: output,
|
|
825
|
-
parsedBody: parsedBody,
|
|
826
|
-
exceptionCtor: __BaseException,
|
|
827
|
-
errorCode: errorCode,
|
|
828
|
-
});
|
|
829
|
-
_d.label = 7;
|
|
830
|
-
case 7: return [2];
|
|
831
|
-
}
|
|
335
|
+
};
|
|
336
|
+
export const deserializeAws_restJson1CancelJobRunCommand = async (output, context) => {
|
|
337
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
338
|
+
return deserializeAws_restJson1CancelJobRunCommandError(output, context);
|
|
339
|
+
}
|
|
340
|
+
const contents = map({
|
|
341
|
+
$metadata: deserializeMetadata(output),
|
|
832
342
|
});
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
343
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
344
|
+
if (data.applicationId != null) {
|
|
345
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
346
|
+
}
|
|
347
|
+
if (data.jobRunId != null) {
|
|
348
|
+
contents.jobRunId = __expectString(data.jobRunId);
|
|
349
|
+
}
|
|
350
|
+
return contents;
|
|
351
|
+
};
|
|
352
|
+
const deserializeAws_restJson1CancelJobRunCommandError = async (output, context) => {
|
|
353
|
+
const parsedOutput = {
|
|
354
|
+
...output,
|
|
355
|
+
body: await parseErrorBody(output.body, context),
|
|
356
|
+
};
|
|
357
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
358
|
+
switch (errorCode) {
|
|
359
|
+
case "InternalServerException":
|
|
360
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
361
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
362
|
+
case "ResourceNotFoundException":
|
|
363
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
364
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
365
|
+
case "ValidationException":
|
|
366
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
367
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
368
|
+
default:
|
|
369
|
+
const parsedBody = parsedOutput.body;
|
|
370
|
+
throwDefaultError({
|
|
371
|
+
output,
|
|
372
|
+
parsedBody,
|
|
373
|
+
exceptionCtor: __BaseException,
|
|
374
|
+
errorCode,
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
export const deserializeAws_restJson1CreateApplicationCommand = async (output, context) => {
|
|
379
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
380
|
+
return deserializeAws_restJson1CreateApplicationCommandError(output, context);
|
|
381
|
+
}
|
|
382
|
+
const contents = map({
|
|
383
|
+
$metadata: deserializeMetadata(output),
|
|
855
384
|
});
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
385
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
386
|
+
if (data.applicationId != null) {
|
|
387
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
388
|
+
}
|
|
389
|
+
if (data.arn != null) {
|
|
390
|
+
contents.arn = __expectString(data.arn);
|
|
391
|
+
}
|
|
392
|
+
if (data.name != null) {
|
|
393
|
+
contents.name = __expectString(data.name);
|
|
394
|
+
}
|
|
395
|
+
return contents;
|
|
396
|
+
};
|
|
397
|
+
const deserializeAws_restJson1CreateApplicationCommandError = async (output, context) => {
|
|
398
|
+
const parsedOutput = {
|
|
399
|
+
...output,
|
|
400
|
+
body: await parseErrorBody(output.body, context),
|
|
401
|
+
};
|
|
402
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
403
|
+
switch (errorCode) {
|
|
404
|
+
case "ConflictException":
|
|
405
|
+
case "com.amazonaws.emrserverless#ConflictException":
|
|
406
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
407
|
+
case "InternalServerException":
|
|
408
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
409
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
410
|
+
case "ValidationException":
|
|
411
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
412
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
413
|
+
default:
|
|
414
|
+
const parsedBody = parsedOutput.body;
|
|
415
|
+
throwDefaultError({
|
|
416
|
+
output,
|
|
417
|
+
parsedBody,
|
|
418
|
+
exceptionCtor: __BaseException,
|
|
419
|
+
errorCode,
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
};
|
|
423
|
+
export const deserializeAws_restJson1DeleteApplicationCommand = async (output, context) => {
|
|
424
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
425
|
+
return deserializeAws_restJson1DeleteApplicationCommandError(output, context);
|
|
426
|
+
}
|
|
427
|
+
const contents = map({
|
|
428
|
+
$metadata: deserializeMetadata(output),
|
|
896
429
|
});
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
430
|
+
await collectBody(output.body, context);
|
|
431
|
+
return contents;
|
|
432
|
+
};
|
|
433
|
+
const deserializeAws_restJson1DeleteApplicationCommandError = async (output, context) => {
|
|
434
|
+
const parsedOutput = {
|
|
435
|
+
...output,
|
|
436
|
+
body: await parseErrorBody(output.body, context),
|
|
437
|
+
};
|
|
438
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
439
|
+
switch (errorCode) {
|
|
440
|
+
case "InternalServerException":
|
|
441
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
442
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
443
|
+
case "ResourceNotFoundException":
|
|
444
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
445
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
446
|
+
case "ValidationException":
|
|
447
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
448
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
449
|
+
default:
|
|
450
|
+
const parsedBody = parsedOutput.body;
|
|
451
|
+
throwDefaultError({
|
|
452
|
+
output,
|
|
453
|
+
parsedBody,
|
|
454
|
+
exceptionCtor: __BaseException,
|
|
455
|
+
errorCode,
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
};
|
|
459
|
+
export const deserializeAws_restJson1GetApplicationCommand = async (output, context) => {
|
|
460
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
461
|
+
return deserializeAws_restJson1GetApplicationCommandError(output, context);
|
|
462
|
+
}
|
|
463
|
+
const contents = map({
|
|
464
|
+
$metadata: deserializeMetadata(output),
|
|
914
465
|
});
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
return
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
exceptionCtor: __BaseException,
|
|
954
|
-
errorCode: errorCode,
|
|
955
|
-
});
|
|
956
|
-
_d.label = 11;
|
|
957
|
-
case 11: return [2];
|
|
958
|
-
}
|
|
466
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
467
|
+
if (data.application != null) {
|
|
468
|
+
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
469
|
+
}
|
|
470
|
+
return contents;
|
|
471
|
+
};
|
|
472
|
+
const deserializeAws_restJson1GetApplicationCommandError = async (output, context) => {
|
|
473
|
+
const parsedOutput = {
|
|
474
|
+
...output,
|
|
475
|
+
body: await parseErrorBody(output.body, context),
|
|
476
|
+
};
|
|
477
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
478
|
+
switch (errorCode) {
|
|
479
|
+
case "InternalServerException":
|
|
480
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
481
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "ResourceNotFoundException":
|
|
483
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
484
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
485
|
+
case "ValidationException":
|
|
486
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
487
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
488
|
+
default:
|
|
489
|
+
const parsedBody = parsedOutput.body;
|
|
490
|
+
throwDefaultError({
|
|
491
|
+
output,
|
|
492
|
+
parsedBody,
|
|
493
|
+
exceptionCtor: __BaseException,
|
|
494
|
+
errorCode,
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
export const deserializeAws_restJson1GetDashboardForJobRunCommand = async (output, context) => {
|
|
499
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
500
|
+
return deserializeAws_restJson1GetDashboardForJobRunCommandError(output, context);
|
|
501
|
+
}
|
|
502
|
+
const contents = map({
|
|
503
|
+
$metadata: deserializeMetadata(output),
|
|
959
504
|
});
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
505
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
506
|
+
if (data.url != null) {
|
|
507
|
+
contents.url = __expectString(data.url);
|
|
508
|
+
}
|
|
509
|
+
return contents;
|
|
510
|
+
};
|
|
511
|
+
const deserializeAws_restJson1GetDashboardForJobRunCommandError = async (output, context) => {
|
|
512
|
+
const parsedOutput = {
|
|
513
|
+
...output,
|
|
514
|
+
body: await parseErrorBody(output.body, context),
|
|
515
|
+
};
|
|
516
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
517
|
+
switch (errorCode) {
|
|
518
|
+
case "InternalServerException":
|
|
519
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
520
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
521
|
+
case "ResourceNotFoundException":
|
|
522
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
523
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
524
|
+
case "ValidationException":
|
|
525
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
526
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
527
|
+
default:
|
|
528
|
+
const parsedBody = parsedOutput.body;
|
|
529
|
+
throwDefaultError({
|
|
530
|
+
output,
|
|
531
|
+
parsedBody,
|
|
532
|
+
exceptionCtor: __BaseException,
|
|
533
|
+
errorCode,
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
export const deserializeAws_restJson1GetJobRunCommand = async (output, context) => {
|
|
538
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
539
|
+
return deserializeAws_restJson1GetJobRunCommandError(output, context);
|
|
540
|
+
}
|
|
541
|
+
const contents = map({
|
|
542
|
+
$metadata: deserializeMetadata(output),
|
|
988
543
|
});
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
return
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
exceptionCtor: __BaseException,
|
|
1028
|
-
errorCode: errorCode,
|
|
1029
|
-
});
|
|
1030
|
-
_d.label = 11;
|
|
1031
|
-
case 11: return [2];
|
|
1032
|
-
}
|
|
544
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
545
|
+
if (data.jobRun != null) {
|
|
546
|
+
contents.jobRun = deserializeAws_restJson1JobRun(data.jobRun, context);
|
|
547
|
+
}
|
|
548
|
+
return contents;
|
|
549
|
+
};
|
|
550
|
+
const deserializeAws_restJson1GetJobRunCommandError = async (output, context) => {
|
|
551
|
+
const parsedOutput = {
|
|
552
|
+
...output,
|
|
553
|
+
body: await parseErrorBody(output.body, context),
|
|
554
|
+
};
|
|
555
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
556
|
+
switch (errorCode) {
|
|
557
|
+
case "InternalServerException":
|
|
558
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
559
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
560
|
+
case "ResourceNotFoundException":
|
|
561
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
562
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
563
|
+
case "ValidationException":
|
|
564
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
565
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
566
|
+
default:
|
|
567
|
+
const parsedBody = parsedOutput.body;
|
|
568
|
+
throwDefaultError({
|
|
569
|
+
output,
|
|
570
|
+
parsedBody,
|
|
571
|
+
exceptionCtor: __BaseException,
|
|
572
|
+
errorCode,
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
};
|
|
576
|
+
export const deserializeAws_restJson1ListApplicationsCommand = async (output, context) => {
|
|
577
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
578
|
+
return deserializeAws_restJson1ListApplicationsCommandError(output, context);
|
|
579
|
+
}
|
|
580
|
+
const contents = map({
|
|
581
|
+
$metadata: deserializeMetadata(output),
|
|
1033
582
|
});
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
583
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
584
|
+
if (data.applications != null) {
|
|
585
|
+
contents.applications = deserializeAws_restJson1ApplicationList(data.applications, context);
|
|
586
|
+
}
|
|
587
|
+
if (data.nextToken != null) {
|
|
588
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
589
|
+
}
|
|
590
|
+
return contents;
|
|
591
|
+
};
|
|
592
|
+
const deserializeAws_restJson1ListApplicationsCommandError = async (output, context) => {
|
|
593
|
+
const parsedOutput = {
|
|
594
|
+
...output,
|
|
595
|
+
body: await parseErrorBody(output.body, context),
|
|
596
|
+
};
|
|
597
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
598
|
+
switch (errorCode) {
|
|
599
|
+
case "InternalServerException":
|
|
600
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
601
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
602
|
+
case "ValidationException":
|
|
603
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
604
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
605
|
+
default:
|
|
606
|
+
const parsedBody = parsedOutput.body;
|
|
607
|
+
throwDefaultError({
|
|
608
|
+
output,
|
|
609
|
+
parsedBody,
|
|
610
|
+
exceptionCtor: __BaseException,
|
|
611
|
+
errorCode,
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
};
|
|
615
|
+
export const deserializeAws_restJson1ListJobRunsCommand = async (output, context) => {
|
|
616
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
617
|
+
return deserializeAws_restJson1ListJobRunsCommandError(output, context);
|
|
618
|
+
}
|
|
619
|
+
const contents = map({
|
|
620
|
+
$metadata: deserializeMetadata(output),
|
|
1051
621
|
});
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
case 9: return [2];
|
|
1091
|
-
}
|
|
622
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
623
|
+
if (data.jobRuns != null) {
|
|
624
|
+
contents.jobRuns = deserializeAws_restJson1JobRuns(data.jobRuns, context);
|
|
625
|
+
}
|
|
626
|
+
if (data.nextToken != null) {
|
|
627
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
628
|
+
}
|
|
629
|
+
return contents;
|
|
630
|
+
};
|
|
631
|
+
const deserializeAws_restJson1ListJobRunsCommandError = async (output, context) => {
|
|
632
|
+
const parsedOutput = {
|
|
633
|
+
...output,
|
|
634
|
+
body: await parseErrorBody(output.body, context),
|
|
635
|
+
};
|
|
636
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
+
switch (errorCode) {
|
|
638
|
+
case "InternalServerException":
|
|
639
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
640
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
641
|
+
case "ValidationException":
|
|
642
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
643
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
644
|
+
default:
|
|
645
|
+
const parsedBody = parsedOutput.body;
|
|
646
|
+
throwDefaultError({
|
|
647
|
+
output,
|
|
648
|
+
parsedBody,
|
|
649
|
+
exceptionCtor: __BaseException,
|
|
650
|
+
errorCode,
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
655
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
656
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
657
|
+
}
|
|
658
|
+
const contents = map({
|
|
659
|
+
$metadata: deserializeMetadata(output),
|
|
1092
660
|
});
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
661
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
662
|
+
if (data.tags != null) {
|
|
663
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
664
|
+
}
|
|
665
|
+
return contents;
|
|
666
|
+
};
|
|
667
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
668
|
+
const parsedOutput = {
|
|
669
|
+
...output,
|
|
670
|
+
body: await parseErrorBody(output.body, context),
|
|
671
|
+
};
|
|
672
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
673
|
+
switch (errorCode) {
|
|
674
|
+
case "InternalServerException":
|
|
675
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
676
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
677
|
+
case "ResourceNotFoundException":
|
|
678
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
679
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
680
|
+
case "ValidationException":
|
|
681
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
682
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
683
|
+
default:
|
|
684
|
+
const parsedBody = parsedOutput.body;
|
|
685
|
+
throwDefaultError({
|
|
686
|
+
output,
|
|
687
|
+
parsedBody,
|
|
688
|
+
exceptionCtor: __BaseException,
|
|
689
|
+
errorCode,
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
};
|
|
693
|
+
export const deserializeAws_restJson1StartApplicationCommand = async (output, context) => {
|
|
694
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
695
|
+
return deserializeAws_restJson1StartApplicationCommandError(output, context);
|
|
696
|
+
}
|
|
697
|
+
const contents = map({
|
|
698
|
+
$metadata: deserializeMetadata(output),
|
|
1110
699
|
});
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
case 9: return [2];
|
|
1150
|
-
}
|
|
700
|
+
await collectBody(output.body, context);
|
|
701
|
+
return contents;
|
|
702
|
+
};
|
|
703
|
+
const deserializeAws_restJson1StartApplicationCommandError = async (output, context) => {
|
|
704
|
+
const parsedOutput = {
|
|
705
|
+
...output,
|
|
706
|
+
body: await parseErrorBody(output.body, context),
|
|
707
|
+
};
|
|
708
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
709
|
+
switch (errorCode) {
|
|
710
|
+
case "InternalServerException":
|
|
711
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
712
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
713
|
+
case "ResourceNotFoundException":
|
|
714
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
715
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
716
|
+
case "ServiceQuotaExceededException":
|
|
717
|
+
case "com.amazonaws.emrserverless#ServiceQuotaExceededException":
|
|
718
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
719
|
+
case "ValidationException":
|
|
720
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
721
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
722
|
+
default:
|
|
723
|
+
const parsedBody = parsedOutput.body;
|
|
724
|
+
throwDefaultError({
|
|
725
|
+
output,
|
|
726
|
+
parsedBody,
|
|
727
|
+
exceptionCtor: __BaseException,
|
|
728
|
+
errorCode,
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
export const deserializeAws_restJson1StartJobRunCommand = async (output, context) => {
|
|
733
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
734
|
+
return deserializeAws_restJson1StartJobRunCommandError(output, context);
|
|
735
|
+
}
|
|
736
|
+
const contents = map({
|
|
737
|
+
$metadata: deserializeMetadata(output),
|
|
1151
738
|
});
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
739
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
740
|
+
if (data.applicationId != null) {
|
|
741
|
+
contents.applicationId = __expectString(data.applicationId);
|
|
742
|
+
}
|
|
743
|
+
if (data.arn != null) {
|
|
744
|
+
contents.arn = __expectString(data.arn);
|
|
745
|
+
}
|
|
746
|
+
if (data.jobRunId != null) {
|
|
747
|
+
contents.jobRunId = __expectString(data.jobRunId);
|
|
748
|
+
}
|
|
749
|
+
return contents;
|
|
750
|
+
};
|
|
751
|
+
const deserializeAws_restJson1StartJobRunCommandError = async (output, context) => {
|
|
752
|
+
const parsedOutput = {
|
|
753
|
+
...output,
|
|
754
|
+
body: await parseErrorBody(output.body, context),
|
|
755
|
+
};
|
|
756
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
757
|
+
switch (errorCode) {
|
|
758
|
+
case "ConflictException":
|
|
759
|
+
case "com.amazonaws.emrserverless#ConflictException":
|
|
760
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
761
|
+
case "InternalServerException":
|
|
762
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
763
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
764
|
+
case "ResourceNotFoundException":
|
|
765
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
766
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
767
|
+
case "ValidationException":
|
|
768
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
769
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
770
|
+
default:
|
|
771
|
+
const parsedBody = parsedOutput.body;
|
|
772
|
+
throwDefaultError({
|
|
773
|
+
output,
|
|
774
|
+
parsedBody,
|
|
775
|
+
exceptionCtor: __BaseException,
|
|
776
|
+
errorCode,
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
};
|
|
780
|
+
export const deserializeAws_restJson1StopApplicationCommand = async (output, context) => {
|
|
781
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
782
|
+
return deserializeAws_restJson1StopApplicationCommandError(output, context);
|
|
783
|
+
}
|
|
784
|
+
const contents = map({
|
|
785
|
+
$metadata: deserializeMetadata(output),
|
|
1169
786
|
});
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
errorCode: errorCode,
|
|
1206
|
-
});
|
|
1207
|
-
_d.label = 9;
|
|
1208
|
-
case 9: return [2];
|
|
1209
|
-
}
|
|
787
|
+
await collectBody(output.body, context);
|
|
788
|
+
return contents;
|
|
789
|
+
};
|
|
790
|
+
const deserializeAws_restJson1StopApplicationCommandError = async (output, context) => {
|
|
791
|
+
const parsedOutput = {
|
|
792
|
+
...output,
|
|
793
|
+
body: await parseErrorBody(output.body, context),
|
|
794
|
+
};
|
|
795
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
796
|
+
switch (errorCode) {
|
|
797
|
+
case "InternalServerException":
|
|
798
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
799
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
800
|
+
case "ResourceNotFoundException":
|
|
801
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
802
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
803
|
+
case "ValidationException":
|
|
804
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
805
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
806
|
+
default:
|
|
807
|
+
const parsedBody = parsedOutput.body;
|
|
808
|
+
throwDefaultError({
|
|
809
|
+
output,
|
|
810
|
+
parsedBody,
|
|
811
|
+
exceptionCtor: __BaseException,
|
|
812
|
+
errorCode,
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
};
|
|
816
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
817
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
818
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
819
|
+
}
|
|
820
|
+
const contents = map({
|
|
821
|
+
$metadata: deserializeMetadata(output),
|
|
1210
822
|
});
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
823
|
+
await collectBody(output.body, context);
|
|
824
|
+
return contents;
|
|
825
|
+
};
|
|
826
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
827
|
+
const parsedOutput = {
|
|
828
|
+
...output,
|
|
829
|
+
body: await parseErrorBody(output.body, context),
|
|
830
|
+
};
|
|
831
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
832
|
+
switch (errorCode) {
|
|
833
|
+
case "InternalServerException":
|
|
834
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
835
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
836
|
+
case "ResourceNotFoundException":
|
|
837
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
838
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
839
|
+
case "ValidationException":
|
|
840
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
841
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
842
|
+
default:
|
|
843
|
+
const parsedBody = parsedOutput.body;
|
|
844
|
+
throwDefaultError({
|
|
845
|
+
output,
|
|
846
|
+
parsedBody,
|
|
847
|
+
exceptionCtor: __BaseException,
|
|
848
|
+
errorCode,
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
};
|
|
852
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
853
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
854
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
855
|
+
}
|
|
856
|
+
const contents = map({
|
|
857
|
+
$metadata: deserializeMetadata(output),
|
|
1233
858
|
});
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
errorCode: errorCode,
|
|
1270
|
-
});
|
|
1271
|
-
_d.label = 9;
|
|
1272
|
-
case 9: return [2];
|
|
1273
|
-
}
|
|
859
|
+
await collectBody(output.body, context);
|
|
860
|
+
return contents;
|
|
861
|
+
};
|
|
862
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
863
|
+
const parsedOutput = {
|
|
864
|
+
...output,
|
|
865
|
+
body: await parseErrorBody(output.body, context),
|
|
866
|
+
};
|
|
867
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
868
|
+
switch (errorCode) {
|
|
869
|
+
case "InternalServerException":
|
|
870
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
871
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
872
|
+
case "ResourceNotFoundException":
|
|
873
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
874
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
875
|
+
case "ValidationException":
|
|
876
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
877
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
878
|
+
default:
|
|
879
|
+
const parsedBody = parsedOutput.body;
|
|
880
|
+
throwDefaultError({
|
|
881
|
+
output,
|
|
882
|
+
parsedBody,
|
|
883
|
+
exceptionCtor: __BaseException,
|
|
884
|
+
errorCode,
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
export const deserializeAws_restJson1UpdateApplicationCommand = async (output, context) => {
|
|
889
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
890
|
+
return deserializeAws_restJson1UpdateApplicationCommandError(output, context);
|
|
891
|
+
}
|
|
892
|
+
const contents = map({
|
|
893
|
+
$metadata: deserializeMetadata(output),
|
|
1274
894
|
});
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
return
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
895
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
896
|
+
if (data.application != null) {
|
|
897
|
+
contents.application = deserializeAws_restJson1Application(data.application, context);
|
|
898
|
+
}
|
|
899
|
+
return contents;
|
|
900
|
+
};
|
|
901
|
+
const deserializeAws_restJson1UpdateApplicationCommandError = async (output, context) => {
|
|
902
|
+
const parsedOutput = {
|
|
903
|
+
...output,
|
|
904
|
+
body: await parseErrorBody(output.body, context),
|
|
905
|
+
};
|
|
906
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
907
|
+
switch (errorCode) {
|
|
908
|
+
case "InternalServerException":
|
|
909
|
+
case "com.amazonaws.emrserverless#InternalServerException":
|
|
910
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
911
|
+
case "ResourceNotFoundException":
|
|
912
|
+
case "com.amazonaws.emrserverless#ResourceNotFoundException":
|
|
913
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
914
|
+
case "ValidationException":
|
|
915
|
+
case "com.amazonaws.emrserverless#ValidationException":
|
|
916
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
917
|
+
default:
|
|
918
|
+
const parsedBody = parsedOutput.body;
|
|
919
|
+
throwDefaultError({
|
|
920
|
+
output,
|
|
921
|
+
parsedBody,
|
|
922
|
+
exceptionCtor: __BaseException,
|
|
923
|
+
errorCode,
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
const map = __map;
|
|
928
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
929
|
+
const contents = map({});
|
|
930
|
+
const data = parsedOutput.body;
|
|
931
|
+
if (data.message != null) {
|
|
932
|
+
contents.message = __expectString(data.message);
|
|
933
|
+
}
|
|
934
|
+
const exception = new ConflictException({
|
|
935
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
936
|
+
...contents,
|
|
1287
937
|
});
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
938
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
939
|
+
};
|
|
940
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
941
|
+
const contents = map({});
|
|
942
|
+
const data = parsedOutput.body;
|
|
943
|
+
if (data.message != null) {
|
|
944
|
+
contents.message = __expectString(data.message);
|
|
945
|
+
}
|
|
946
|
+
const exception = new InternalServerException({
|
|
947
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
948
|
+
...contents,
|
|
1299
949
|
});
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
950
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
951
|
+
};
|
|
952
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
953
|
+
const contents = map({});
|
|
954
|
+
const data = parsedOutput.body;
|
|
955
|
+
if (data.message != null) {
|
|
956
|
+
contents.message = __expectString(data.message);
|
|
957
|
+
}
|
|
958
|
+
const exception = new ResourceNotFoundException({
|
|
959
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
960
|
+
...contents,
|
|
1311
961
|
});
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
962
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
963
|
+
};
|
|
964
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
965
|
+
const contents = map({});
|
|
966
|
+
const data = parsedOutput.body;
|
|
967
|
+
if (data.message != null) {
|
|
968
|
+
contents.message = __expectString(data.message);
|
|
969
|
+
}
|
|
970
|
+
const exception = new ServiceQuotaExceededException({
|
|
971
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
972
|
+
...contents,
|
|
1323
973
|
});
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
974
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
975
|
+
};
|
|
976
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
977
|
+
const contents = map({});
|
|
978
|
+
const data = parsedOutput.body;
|
|
979
|
+
if (data.message != null) {
|
|
980
|
+
contents.message = __expectString(data.message);
|
|
981
|
+
}
|
|
982
|
+
const exception = new ValidationException({
|
|
983
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
984
|
+
...contents,
|
|
1335
985
|
});
|
|
1336
|
-
|
|
1337
|
-
var serializeAws_restJson1AutoStartConfig = function (input, context) {
|
|
1338
|
-
return __assign({}, (input.enabled != null && { enabled: input.enabled }));
|
|
986
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
1339
987
|
};
|
|
1340
|
-
|
|
1341
|
-
return
|
|
988
|
+
const serializeAws_restJson1AutoStartConfig = (input, context) => {
|
|
989
|
+
return {
|
|
990
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
991
|
+
};
|
|
1342
992
|
};
|
|
1343
|
-
|
|
1344
|
-
return
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
}));
|
|
993
|
+
const serializeAws_restJson1AutoStopConfig = (input, context) => {
|
|
994
|
+
return {
|
|
995
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
996
|
+
...(input.idleTimeoutMinutes != null && { idleTimeoutMinutes: input.idleTimeoutMinutes }),
|
|
997
|
+
};
|
|
1349
998
|
};
|
|
1350
|
-
|
|
999
|
+
const serializeAws_restJson1Configuration = (input, context) => {
|
|
1000
|
+
return {
|
|
1001
|
+
...(input.classification != null && { classification: input.classification }),
|
|
1002
|
+
...(input.configurations != null && {
|
|
1003
|
+
configurations: serializeAws_restJson1ConfigurationList(input.configurations, context),
|
|
1004
|
+
}),
|
|
1005
|
+
...(input.properties != null && {
|
|
1006
|
+
properties: serializeAws_restJson1SensitivePropertiesMap(input.properties, context),
|
|
1007
|
+
}),
|
|
1008
|
+
};
|
|
1009
|
+
};
|
|
1010
|
+
const serializeAws_restJson1ConfigurationList = (input, context) => {
|
|
1351
1011
|
return input
|
|
1352
|
-
.filter(
|
|
1353
|
-
.map(
|
|
1012
|
+
.filter((e) => e != null)
|
|
1013
|
+
.map((entry) => {
|
|
1354
1014
|
return serializeAws_restJson1Configuration(entry, context);
|
|
1355
1015
|
});
|
|
1356
1016
|
};
|
|
1357
|
-
|
|
1358
|
-
return
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1017
|
+
const serializeAws_restJson1ConfigurationOverrides = (input, context) => {
|
|
1018
|
+
return {
|
|
1019
|
+
...(input.applicationConfiguration != null && {
|
|
1020
|
+
applicationConfiguration: serializeAws_restJson1ConfigurationList(input.applicationConfiguration, context),
|
|
1021
|
+
}),
|
|
1022
|
+
...(input.monitoringConfiguration != null && {
|
|
1023
|
+
monitoringConfiguration: serializeAws_restJson1MonitoringConfiguration(input.monitoringConfiguration, context),
|
|
1024
|
+
}),
|
|
1025
|
+
};
|
|
1363
1026
|
};
|
|
1364
|
-
|
|
1027
|
+
const serializeAws_restJson1EntryPointArguments = (input, context) => {
|
|
1365
1028
|
return input
|
|
1366
|
-
.filter(
|
|
1367
|
-
.map(
|
|
1029
|
+
.filter((e) => e != null)
|
|
1030
|
+
.map((entry) => {
|
|
1368
1031
|
return entry;
|
|
1369
1032
|
});
|
|
1370
1033
|
};
|
|
1371
|
-
|
|
1372
|
-
return
|
|
1034
|
+
const serializeAws_restJson1Hive = (input, context) => {
|
|
1035
|
+
return {
|
|
1036
|
+
...(input.initQueryFile != null && { initQueryFile: input.initQueryFile }),
|
|
1037
|
+
...(input.parameters != null && { parameters: input.parameters }),
|
|
1038
|
+
...(input.query != null && { query: input.query }),
|
|
1039
|
+
};
|
|
1373
1040
|
};
|
|
1374
|
-
|
|
1375
|
-
return
|
|
1376
|
-
|
|
1377
|
-
|
|
1041
|
+
const serializeAws_restJson1InitialCapacityConfig = (input, context) => {
|
|
1042
|
+
return {
|
|
1043
|
+
...(input.workerConfiguration != null && {
|
|
1044
|
+
workerConfiguration: serializeAws_restJson1WorkerResourceConfig(input.workerConfiguration, context),
|
|
1045
|
+
}),
|
|
1046
|
+
...(input.workerCount != null && { workerCount: input.workerCount }),
|
|
1047
|
+
};
|
|
1378
1048
|
};
|
|
1379
|
-
|
|
1380
|
-
return Object.entries(input).reduce(
|
|
1381
|
-
var _b;
|
|
1382
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1049
|
+
const serializeAws_restJson1InitialCapacityConfigMap = (input, context) => {
|
|
1050
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1383
1051
|
if (value === null) {
|
|
1384
1052
|
return acc;
|
|
1385
1053
|
}
|
|
1386
|
-
return
|
|
1054
|
+
return {
|
|
1055
|
+
...acc,
|
|
1056
|
+
[key]: serializeAws_restJson1InitialCapacityConfig(value, context),
|
|
1057
|
+
};
|
|
1387
1058
|
}, {});
|
|
1388
1059
|
};
|
|
1389
|
-
|
|
1060
|
+
const serializeAws_restJson1JobDriver = (input, context) => {
|
|
1390
1061
|
return JobDriver.visit(input, {
|
|
1391
|
-
hive:
|
|
1392
|
-
sparkSubmit:
|
|
1393
|
-
_:
|
|
1062
|
+
hive: (value) => ({ hive: serializeAws_restJson1Hive(value, context) }),
|
|
1063
|
+
sparkSubmit: (value) => ({ sparkSubmit: serializeAws_restJson1SparkSubmit(value, context) }),
|
|
1064
|
+
_: (name, value) => ({ name: value }),
|
|
1394
1065
|
});
|
|
1395
1066
|
};
|
|
1396
|
-
|
|
1397
|
-
return
|
|
1067
|
+
const serializeAws_restJson1ManagedPersistenceMonitoringConfiguration = (input, context) => {
|
|
1068
|
+
return {
|
|
1069
|
+
...(input.enabled != null && { enabled: input.enabled }),
|
|
1070
|
+
...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }),
|
|
1071
|
+
};
|
|
1398
1072
|
};
|
|
1399
|
-
|
|
1400
|
-
return
|
|
1073
|
+
const serializeAws_restJson1MaximumAllowedResources = (input, context) => {
|
|
1074
|
+
return {
|
|
1075
|
+
...(input.cpu != null && { cpu: input.cpu }),
|
|
1076
|
+
...(input.disk != null && { disk: input.disk }),
|
|
1077
|
+
...(input.memory != null && { memory: input.memory }),
|
|
1078
|
+
};
|
|
1401
1079
|
};
|
|
1402
|
-
|
|
1403
|
-
return
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1080
|
+
const serializeAws_restJson1MonitoringConfiguration = (input, context) => {
|
|
1081
|
+
return {
|
|
1082
|
+
...(input.managedPersistenceMonitoringConfiguration != null && {
|
|
1083
|
+
managedPersistenceMonitoringConfiguration: serializeAws_restJson1ManagedPersistenceMonitoringConfiguration(input.managedPersistenceMonitoringConfiguration, context),
|
|
1084
|
+
}),
|
|
1085
|
+
...(input.s3MonitoringConfiguration != null && {
|
|
1086
|
+
s3MonitoringConfiguration: serializeAws_restJson1S3MonitoringConfiguration(input.s3MonitoringConfiguration, context),
|
|
1087
|
+
}),
|
|
1088
|
+
};
|
|
1408
1089
|
};
|
|
1409
|
-
|
|
1410
|
-
return
|
|
1411
|
-
|
|
1412
|
-
|
|
1090
|
+
const serializeAws_restJson1NetworkConfiguration = (input, context) => {
|
|
1091
|
+
return {
|
|
1092
|
+
...(input.securityGroupIds != null && {
|
|
1093
|
+
securityGroupIds: serializeAws_restJson1SecurityGroupIds(input.securityGroupIds, context),
|
|
1094
|
+
}),
|
|
1095
|
+
...(input.subnetIds != null && { subnetIds: serializeAws_restJson1SubnetIds(input.subnetIds, context) }),
|
|
1096
|
+
};
|
|
1413
1097
|
};
|
|
1414
|
-
|
|
1415
|
-
return
|
|
1098
|
+
const serializeAws_restJson1S3MonitoringConfiguration = (input, context) => {
|
|
1099
|
+
return {
|
|
1100
|
+
...(input.encryptionKeyArn != null && { encryptionKeyArn: input.encryptionKeyArn }),
|
|
1101
|
+
...(input.logUri != null && { logUri: input.logUri }),
|
|
1102
|
+
};
|
|
1416
1103
|
};
|
|
1417
|
-
|
|
1104
|
+
const serializeAws_restJson1SecurityGroupIds = (input, context) => {
|
|
1418
1105
|
return input
|
|
1419
|
-
.filter(
|
|
1420
|
-
.map(
|
|
1106
|
+
.filter((e) => e != null)
|
|
1107
|
+
.map((entry) => {
|
|
1421
1108
|
return entry;
|
|
1422
1109
|
});
|
|
1423
1110
|
};
|
|
1424
|
-
|
|
1425
|
-
return Object.entries(input).reduce(
|
|
1426
|
-
var _b;
|
|
1427
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1111
|
+
const serializeAws_restJson1SensitivePropertiesMap = (input, context) => {
|
|
1112
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1428
1113
|
if (value === null) {
|
|
1429
1114
|
return acc;
|
|
1430
1115
|
}
|
|
1431
|
-
return
|
|
1116
|
+
return {
|
|
1117
|
+
...acc,
|
|
1118
|
+
[key]: value,
|
|
1119
|
+
};
|
|
1432
1120
|
}, {});
|
|
1433
1121
|
};
|
|
1434
|
-
|
|
1435
|
-
return
|
|
1436
|
-
|
|
1437
|
-
|
|
1122
|
+
const serializeAws_restJson1SparkSubmit = (input, context) => {
|
|
1123
|
+
return {
|
|
1124
|
+
...(input.entryPoint != null && { entryPoint: input.entryPoint }),
|
|
1125
|
+
...(input.entryPointArguments != null && {
|
|
1126
|
+
entryPointArguments: serializeAws_restJson1EntryPointArguments(input.entryPointArguments, context),
|
|
1127
|
+
}),
|
|
1128
|
+
...(input.sparkSubmitParameters != null && { sparkSubmitParameters: input.sparkSubmitParameters }),
|
|
1129
|
+
};
|
|
1438
1130
|
};
|
|
1439
|
-
|
|
1131
|
+
const serializeAws_restJson1SubnetIds = (input, context) => {
|
|
1440
1132
|
return input
|
|
1441
|
-
.filter(
|
|
1442
|
-
.map(
|
|
1133
|
+
.filter((e) => e != null)
|
|
1134
|
+
.map((entry) => {
|
|
1443
1135
|
return entry;
|
|
1444
1136
|
});
|
|
1445
1137
|
};
|
|
1446
|
-
|
|
1447
|
-
return Object.entries(input).reduce(
|
|
1448
|
-
var _b;
|
|
1449
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1138
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1139
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1450
1140
|
if (value === null) {
|
|
1451
1141
|
return acc;
|
|
1452
1142
|
}
|
|
1453
|
-
return
|
|
1143
|
+
return {
|
|
1144
|
+
...acc,
|
|
1145
|
+
[key]: value,
|
|
1146
|
+
};
|
|
1454
1147
|
}, {});
|
|
1455
1148
|
};
|
|
1456
|
-
|
|
1457
|
-
return
|
|
1149
|
+
const serializeAws_restJson1WorkerResourceConfig = (input, context) => {
|
|
1150
|
+
return {
|
|
1151
|
+
...(input.cpu != null && { cpu: input.cpu }),
|
|
1152
|
+
...(input.disk != null && { disk: input.disk }),
|
|
1153
|
+
...(input.memory != null && { memory: input.memory }),
|
|
1154
|
+
};
|
|
1458
1155
|
};
|
|
1459
|
-
|
|
1156
|
+
const deserializeAws_restJson1Application = (output, context) => {
|
|
1460
1157
|
return {
|
|
1461
1158
|
applicationId: __expectString(output.applicationId),
|
|
1462
1159
|
arn: __expectString(output.arn),
|
|
@@ -1485,10 +1182,10 @@ var deserializeAws_restJson1Application = function (output, context) {
|
|
|
1485
1182
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1486
1183
|
};
|
|
1487
1184
|
};
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
.filter(
|
|
1491
|
-
.map(
|
|
1185
|
+
const deserializeAws_restJson1ApplicationList = (output, context) => {
|
|
1186
|
+
const retVal = (output || [])
|
|
1187
|
+
.filter((e) => e != null)
|
|
1188
|
+
.map((entry) => {
|
|
1492
1189
|
if (entry === null) {
|
|
1493
1190
|
return null;
|
|
1494
1191
|
}
|
|
@@ -1496,7 +1193,7 @@ var deserializeAws_restJson1ApplicationList = function (output, context) {
|
|
|
1496
1193
|
});
|
|
1497
1194
|
return retVal;
|
|
1498
1195
|
};
|
|
1499
|
-
|
|
1196
|
+
const deserializeAws_restJson1ApplicationSummary = (output, context) => {
|
|
1500
1197
|
return {
|
|
1501
1198
|
arn: __expectString(output.arn),
|
|
1502
1199
|
createdAt: output.createdAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.createdAt))) : undefined,
|
|
@@ -1509,18 +1206,18 @@ var deserializeAws_restJson1ApplicationSummary = function (output, context) {
|
|
|
1509
1206
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1510
1207
|
};
|
|
1511
1208
|
};
|
|
1512
|
-
|
|
1209
|
+
const deserializeAws_restJson1AutoStartConfig = (output, context) => {
|
|
1513
1210
|
return {
|
|
1514
1211
|
enabled: __expectBoolean(output.enabled),
|
|
1515
1212
|
};
|
|
1516
1213
|
};
|
|
1517
|
-
|
|
1214
|
+
const deserializeAws_restJson1AutoStopConfig = (output, context) => {
|
|
1518
1215
|
return {
|
|
1519
1216
|
enabled: __expectBoolean(output.enabled),
|
|
1520
1217
|
idleTimeoutMinutes: __expectInt32(output.idleTimeoutMinutes),
|
|
1521
1218
|
};
|
|
1522
1219
|
};
|
|
1523
|
-
|
|
1220
|
+
const deserializeAws_restJson1Configuration = (output, context) => {
|
|
1524
1221
|
return {
|
|
1525
1222
|
classification: __expectString(output.classification),
|
|
1526
1223
|
configurations: output.configurations != null
|
|
@@ -1531,10 +1228,10 @@ var deserializeAws_restJson1Configuration = function (output, context) {
|
|
|
1531
1228
|
: undefined,
|
|
1532
1229
|
};
|
|
1533
1230
|
};
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
.filter(
|
|
1537
|
-
.map(
|
|
1231
|
+
const deserializeAws_restJson1ConfigurationList = (output, context) => {
|
|
1232
|
+
const retVal = (output || [])
|
|
1233
|
+
.filter((e) => e != null)
|
|
1234
|
+
.map((entry) => {
|
|
1538
1235
|
if (entry === null) {
|
|
1539
1236
|
return null;
|
|
1540
1237
|
}
|
|
@@ -1542,7 +1239,7 @@ var deserializeAws_restJson1ConfigurationList = function (output, context) {
|
|
|
1542
1239
|
});
|
|
1543
1240
|
return retVal;
|
|
1544
1241
|
};
|
|
1545
|
-
|
|
1242
|
+
const deserializeAws_restJson1ConfigurationOverrides = (output, context) => {
|
|
1546
1243
|
return {
|
|
1547
1244
|
applicationConfiguration: output.applicationConfiguration != null
|
|
1548
1245
|
? deserializeAws_restJson1ConfigurationList(output.applicationConfiguration, context)
|
|
@@ -1552,10 +1249,10 @@ var deserializeAws_restJson1ConfigurationOverrides = function (output, context)
|
|
|
1552
1249
|
: undefined,
|
|
1553
1250
|
};
|
|
1554
1251
|
};
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
.filter(
|
|
1558
|
-
.map(
|
|
1252
|
+
const deserializeAws_restJson1EntryPointArguments = (output, context) => {
|
|
1253
|
+
const retVal = (output || [])
|
|
1254
|
+
.filter((e) => e != null)
|
|
1255
|
+
.map((entry) => {
|
|
1559
1256
|
if (entry === null) {
|
|
1560
1257
|
return null;
|
|
1561
1258
|
}
|
|
@@ -1563,14 +1260,14 @@ var deserializeAws_restJson1EntryPointArguments = function (output, context) {
|
|
|
1563
1260
|
});
|
|
1564
1261
|
return retVal;
|
|
1565
1262
|
};
|
|
1566
|
-
|
|
1263
|
+
const deserializeAws_restJson1Hive = (output, context) => {
|
|
1567
1264
|
return {
|
|
1568
1265
|
initQueryFile: __expectString(output.initQueryFile),
|
|
1569
1266
|
parameters: __expectString(output.parameters),
|
|
1570
1267
|
query: __expectString(output.query),
|
|
1571
1268
|
};
|
|
1572
1269
|
};
|
|
1573
|
-
|
|
1270
|
+
const deserializeAws_restJson1InitialCapacityConfig = (output, context) => {
|
|
1574
1271
|
return {
|
|
1575
1272
|
workerConfiguration: output.workerConfiguration != null
|
|
1576
1273
|
? deserializeAws_restJson1WorkerResourceConfig(output.workerConfiguration, context)
|
|
@@ -1578,17 +1275,18 @@ var deserializeAws_restJson1InitialCapacityConfig = function (output, context) {
|
|
|
1578
1275
|
workerCount: __expectLong(output.workerCount),
|
|
1579
1276
|
};
|
|
1580
1277
|
};
|
|
1581
|
-
|
|
1582
|
-
return Object.entries(output).reduce(
|
|
1583
|
-
var _b;
|
|
1584
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1278
|
+
const deserializeAws_restJson1InitialCapacityConfigMap = (output, context) => {
|
|
1279
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1585
1280
|
if (value === null) {
|
|
1586
1281
|
return acc;
|
|
1587
1282
|
}
|
|
1588
|
-
return
|
|
1283
|
+
return {
|
|
1284
|
+
...acc,
|
|
1285
|
+
[key]: deserializeAws_restJson1InitialCapacityConfig(value, context),
|
|
1286
|
+
};
|
|
1589
1287
|
}, {});
|
|
1590
1288
|
};
|
|
1591
|
-
|
|
1289
|
+
const deserializeAws_restJson1JobDriver = (output, context) => {
|
|
1592
1290
|
if (output.hive != null) {
|
|
1593
1291
|
return {
|
|
1594
1292
|
hive: deserializeAws_restJson1Hive(output.hive, context),
|
|
@@ -1601,7 +1299,7 @@ var deserializeAws_restJson1JobDriver = function (output, context) {
|
|
|
1601
1299
|
}
|
|
1602
1300
|
return { $unknown: Object.entries(output)[0] };
|
|
1603
1301
|
};
|
|
1604
|
-
|
|
1302
|
+
const deserializeAws_restJson1JobRun = (output, context) => {
|
|
1605
1303
|
return {
|
|
1606
1304
|
applicationId: __expectString(output.applicationId),
|
|
1607
1305
|
arn: __expectString(output.arn),
|
|
@@ -1630,10 +1328,10 @@ var deserializeAws_restJson1JobRun = function (output, context) {
|
|
|
1630
1328
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1631
1329
|
};
|
|
1632
1330
|
};
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
.filter(
|
|
1636
|
-
.map(
|
|
1331
|
+
const deserializeAws_restJson1JobRuns = (output, context) => {
|
|
1332
|
+
const retVal = (output || [])
|
|
1333
|
+
.filter((e) => e != null)
|
|
1334
|
+
.map((entry) => {
|
|
1637
1335
|
if (entry === null) {
|
|
1638
1336
|
return null;
|
|
1639
1337
|
}
|
|
@@ -1641,7 +1339,7 @@ var deserializeAws_restJson1JobRuns = function (output, context) {
|
|
|
1641
1339
|
});
|
|
1642
1340
|
return retVal;
|
|
1643
1341
|
};
|
|
1644
|
-
|
|
1342
|
+
const deserializeAws_restJson1JobRunSummary = (output, context) => {
|
|
1645
1343
|
return {
|
|
1646
1344
|
applicationId: __expectString(output.applicationId),
|
|
1647
1345
|
arn: __expectString(output.arn),
|
|
@@ -1657,20 +1355,20 @@ var deserializeAws_restJson1JobRunSummary = function (output, context) {
|
|
|
1657
1355
|
updatedAt: output.updatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.updatedAt))) : undefined,
|
|
1658
1356
|
};
|
|
1659
1357
|
};
|
|
1660
|
-
|
|
1358
|
+
const deserializeAws_restJson1ManagedPersistenceMonitoringConfiguration = (output, context) => {
|
|
1661
1359
|
return {
|
|
1662
1360
|
enabled: __expectBoolean(output.enabled),
|
|
1663
1361
|
encryptionKeyArn: __expectString(output.encryptionKeyArn),
|
|
1664
1362
|
};
|
|
1665
1363
|
};
|
|
1666
|
-
|
|
1364
|
+
const deserializeAws_restJson1MaximumAllowedResources = (output, context) => {
|
|
1667
1365
|
return {
|
|
1668
1366
|
cpu: __expectString(output.cpu),
|
|
1669
1367
|
disk: __expectString(output.disk),
|
|
1670
1368
|
memory: __expectString(output.memory),
|
|
1671
1369
|
};
|
|
1672
1370
|
};
|
|
1673
|
-
|
|
1371
|
+
const deserializeAws_restJson1MonitoringConfiguration = (output, context) => {
|
|
1674
1372
|
return {
|
|
1675
1373
|
managedPersistenceMonitoringConfiguration: output.managedPersistenceMonitoringConfiguration != null
|
|
1676
1374
|
? deserializeAws_restJson1ManagedPersistenceMonitoringConfiguration(output.managedPersistenceMonitoringConfiguration, context)
|
|
@@ -1680,7 +1378,7 @@ var deserializeAws_restJson1MonitoringConfiguration = function (output, context)
|
|
|
1680
1378
|
: undefined,
|
|
1681
1379
|
};
|
|
1682
1380
|
};
|
|
1683
|
-
|
|
1381
|
+
const deserializeAws_restJson1NetworkConfiguration = (output, context) => {
|
|
1684
1382
|
return {
|
|
1685
1383
|
securityGroupIds: output.securityGroupIds != null
|
|
1686
1384
|
? deserializeAws_restJson1SecurityGroupIds(output.securityGroupIds, context)
|
|
@@ -1688,16 +1386,16 @@ var deserializeAws_restJson1NetworkConfiguration = function (output, context) {
|
|
|
1688
1386
|
subnetIds: output.subnetIds != null ? deserializeAws_restJson1SubnetIds(output.subnetIds, context) : undefined,
|
|
1689
1387
|
};
|
|
1690
1388
|
};
|
|
1691
|
-
|
|
1389
|
+
const deserializeAws_restJson1S3MonitoringConfiguration = (output, context) => {
|
|
1692
1390
|
return {
|
|
1693
1391
|
encryptionKeyArn: __expectString(output.encryptionKeyArn),
|
|
1694
1392
|
logUri: __expectString(output.logUri),
|
|
1695
1393
|
};
|
|
1696
1394
|
};
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
.filter(
|
|
1700
|
-
.map(
|
|
1395
|
+
const deserializeAws_restJson1SecurityGroupIds = (output, context) => {
|
|
1396
|
+
const retVal = (output || [])
|
|
1397
|
+
.filter((e) => e != null)
|
|
1398
|
+
.map((entry) => {
|
|
1701
1399
|
if (entry === null) {
|
|
1702
1400
|
return null;
|
|
1703
1401
|
}
|
|
@@ -1705,17 +1403,18 @@ var deserializeAws_restJson1SecurityGroupIds = function (output, context) {
|
|
|
1705
1403
|
});
|
|
1706
1404
|
return retVal;
|
|
1707
1405
|
};
|
|
1708
|
-
|
|
1709
|
-
return Object.entries(output).reduce(
|
|
1710
|
-
var _b;
|
|
1711
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1406
|
+
const deserializeAws_restJson1SensitivePropertiesMap = (output, context) => {
|
|
1407
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1712
1408
|
if (value === null) {
|
|
1713
1409
|
return acc;
|
|
1714
1410
|
}
|
|
1715
|
-
return
|
|
1411
|
+
return {
|
|
1412
|
+
...acc,
|
|
1413
|
+
[key]: __expectString(value),
|
|
1414
|
+
};
|
|
1716
1415
|
}, {});
|
|
1717
1416
|
};
|
|
1718
|
-
|
|
1417
|
+
const deserializeAws_restJson1SparkSubmit = (output, context) => {
|
|
1719
1418
|
return {
|
|
1720
1419
|
entryPoint: __expectString(output.entryPoint),
|
|
1721
1420
|
entryPointArguments: output.entryPointArguments != null
|
|
@@ -1724,10 +1423,10 @@ var deserializeAws_restJson1SparkSubmit = function (output, context) {
|
|
|
1724
1423
|
sparkSubmitParameters: __expectString(output.sparkSubmitParameters),
|
|
1725
1424
|
};
|
|
1726
1425
|
};
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
.filter(
|
|
1730
|
-
.map(
|
|
1426
|
+
const deserializeAws_restJson1SubnetIds = (output, context) => {
|
|
1427
|
+
const retVal = (output || [])
|
|
1428
|
+
.filter((e) => e != null)
|
|
1429
|
+
.map((entry) => {
|
|
1731
1430
|
if (entry === null) {
|
|
1732
1431
|
return null;
|
|
1733
1432
|
}
|
|
@@ -1735,68 +1434,64 @@ var deserializeAws_restJson1SubnetIds = function (output, context) {
|
|
|
1735
1434
|
});
|
|
1736
1435
|
return retVal;
|
|
1737
1436
|
};
|
|
1738
|
-
|
|
1739
|
-
return Object.entries(output).reduce(
|
|
1740
|
-
var _b;
|
|
1741
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1437
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1438
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1742
1439
|
if (value === null) {
|
|
1743
1440
|
return acc;
|
|
1744
1441
|
}
|
|
1745
|
-
return
|
|
1442
|
+
return {
|
|
1443
|
+
...acc,
|
|
1444
|
+
[key]: __expectString(value),
|
|
1445
|
+
};
|
|
1746
1446
|
}, {});
|
|
1747
1447
|
};
|
|
1748
|
-
|
|
1448
|
+
const deserializeAws_restJson1TotalResourceUtilization = (output, context) => {
|
|
1749
1449
|
return {
|
|
1750
1450
|
memoryGBHour: __limitedParseDouble(output.memoryGBHour),
|
|
1751
1451
|
storageGBHour: __limitedParseDouble(output.storageGBHour),
|
|
1752
1452
|
vCPUHour: __limitedParseDouble(output.vCPUHour),
|
|
1753
1453
|
};
|
|
1754
1454
|
};
|
|
1755
|
-
|
|
1455
|
+
const deserializeAws_restJson1WorkerResourceConfig = (output, context) => {
|
|
1756
1456
|
return {
|
|
1757
1457
|
cpu: __expectString(output.cpu),
|
|
1758
1458
|
disk: __expectString(output.disk),
|
|
1759
1459
|
memory: __expectString(output.memory),
|
|
1760
1460
|
};
|
|
1761
1461
|
};
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
});
|
|
1770
|
-
};
|
|
1771
|
-
var collectBody = function (streamBody, context) {
|
|
1772
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1462
|
+
const deserializeMetadata = (output) => ({
|
|
1463
|
+
httpStatusCode: output.statusCode,
|
|
1464
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1465
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1466
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1467
|
+
});
|
|
1468
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1773
1469
|
if (streamBody instanceof Uint8Array) {
|
|
1774
1470
|
return Promise.resolve(streamBody);
|
|
1775
1471
|
}
|
|
1776
1472
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1777
1473
|
};
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
});
|
|
1474
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1475
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1476
|
+
value !== null &&
|
|
1477
|
+
value !== "" &&
|
|
1478
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1479
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1480
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1481
|
+
if (encoded.length) {
|
|
1482
|
+
return JSON.parse(encoded);
|
|
1483
|
+
}
|
|
1484
|
+
return {};
|
|
1485
|
+
});
|
|
1486
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1487
|
+
const value = await parseBody(errorBody, context);
|
|
1488
|
+
value.message = value.message ?? value.Message;
|
|
1489
|
+
return value;
|
|
1795
1490
|
};
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1491
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1492
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1493
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1494
|
+
let cleanValue = rawValue;
|
|
1800
1495
|
if (typeof cleanValue === "number") {
|
|
1801
1496
|
cleanValue = cleanValue.toString();
|
|
1802
1497
|
}
|
|
@@ -1811,7 +1506,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1811
1506
|
}
|
|
1812
1507
|
return cleanValue;
|
|
1813
1508
|
};
|
|
1814
|
-
|
|
1509
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1815
1510
|
if (headerKey !== undefined) {
|
|
1816
1511
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1817
1512
|
}
|