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