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