@aws-sdk/client-mwaa 3.186.0 → 3.190.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 +16 -0
- package/dist-es/MWAA.js +46 -53
- package/dist-es/MWAAClient.js +22 -28
- package/dist-es/commands/CreateCliTokenCommand.js +21 -28
- package/dist-es/commands/CreateEnvironmentCommand.js +21 -28
- package/dist-es/commands/CreateWebLoginTokenCommand.js +21 -28
- package/dist-es/commands/DeleteEnvironmentCommand.js +21 -28
- package/dist-es/commands/GetEnvironmentCommand.js +21 -28
- package/dist-es/commands/ListEnvironmentsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/PublishMetricsCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateEnvironmentCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/MWAAServiceException.js +5 -10
- package/dist-es/models/models_0.js +153 -80
- package/dist-es/pagination/ListEnvironmentsPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +897 -1192
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1211 +1,933 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest, isValidHostname as __isValidHostname, } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { AccessDeniedException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
5
4
|
import { MWAAServiceException as __BaseException } from "../models/MWAAServiceException";
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
case 2:
|
|
18
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
19
|
-
if (context.disableHostPrefix !== true) {
|
|
20
|
-
resolvedHostname = "env." + resolvedHostname;
|
|
21
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
22
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return [2, new __HttpRequest({
|
|
26
|
-
protocol: protocol,
|
|
27
|
-
hostname: resolvedHostname,
|
|
28
|
-
port: port,
|
|
29
|
-
method: "POST",
|
|
30
|
-
headers: headers,
|
|
31
|
-
path: resolvedPath,
|
|
32
|
-
body: body,
|
|
33
|
-
})];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}); };
|
|
37
|
-
export var serializeAws_restJson1CreateEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
38
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
39
|
-
return __generator(this, function (_c) {
|
|
40
|
-
switch (_c.label) {
|
|
41
|
-
case 0: return [4, context.endpoint()];
|
|
42
|
-
case 1:
|
|
43
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
44
|
-
headers = {
|
|
45
|
-
"content-type": "application/json",
|
|
46
|
-
};
|
|
47
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{Name}";
|
|
48
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
49
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AirflowConfigurationOptions != null && {
|
|
50
|
-
AirflowConfigurationOptions: serializeAws_restJson1AirflowConfigurationOptions(input.AirflowConfigurationOptions, context),
|
|
51
|
-
})), (input.AirflowVersion != null && { AirflowVersion: input.AirflowVersion })), (input.DagS3Path != null && { DagS3Path: input.DagS3Path })), (input.EnvironmentClass != null && { EnvironmentClass: input.EnvironmentClass })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.KmsKey != null && { KmsKey: input.KmsKey })), (input.LoggingConfiguration != null && {
|
|
52
|
-
LoggingConfiguration: serializeAws_restJson1LoggingConfigurationInput(input.LoggingConfiguration, context),
|
|
53
|
-
})), (input.MaxWorkers != null && { MaxWorkers: input.MaxWorkers })), (input.MinWorkers != null && { MinWorkers: input.MinWorkers })), (input.NetworkConfiguration != null && {
|
|
54
|
-
NetworkConfiguration: serializeAws_restJson1NetworkConfiguration(input.NetworkConfiguration, context),
|
|
55
|
-
})), (input.PluginsS3ObjectVersion != null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion })), (input.PluginsS3Path != null && { PluginsS3Path: input.PluginsS3Path })), (input.RequirementsS3ObjectVersion != null && {
|
|
56
|
-
RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion,
|
|
57
|
-
})), (input.RequirementsS3Path != null && { RequirementsS3Path: input.RequirementsS3Path })), (input.Schedulers != null && { Schedulers: input.Schedulers })), (input.SourceBucketArn != null && { SourceBucketArn: input.SourceBucketArn })), (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })), (input.WebserverAccessMode != null && { WebserverAccessMode: input.WebserverAccessMode })), (input.WeeklyMaintenanceWindowStart != null && {
|
|
58
|
-
WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart,
|
|
59
|
-
})));
|
|
60
|
-
return [4, context.endpoint()];
|
|
61
|
-
case 2:
|
|
62
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
63
|
-
if (context.disableHostPrefix !== true) {
|
|
64
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
65
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
66
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return [2, new __HttpRequest({
|
|
70
|
-
protocol: protocol,
|
|
71
|
-
hostname: resolvedHostname,
|
|
72
|
-
port: port,
|
|
73
|
-
method: "PUT",
|
|
74
|
-
headers: headers,
|
|
75
|
-
path: resolvedPath,
|
|
76
|
-
body: body,
|
|
77
|
-
})];
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}); };
|
|
81
|
-
export var serializeAws_restJson1CreateWebLoginTokenCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
82
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
83
|
-
return __generator(this, function (_c) {
|
|
84
|
-
switch (_c.label) {
|
|
85
|
-
case 0: return [4, context.endpoint()];
|
|
86
|
-
case 1:
|
|
87
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
88
|
-
headers = {};
|
|
89
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/webtoken/{Name}";
|
|
90
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
91
|
-
return [4, context.endpoint()];
|
|
92
|
-
case 2:
|
|
93
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
94
|
-
if (context.disableHostPrefix !== true) {
|
|
95
|
-
resolvedHostname = "env." + resolvedHostname;
|
|
96
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
97
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return [2, new __HttpRequest({
|
|
101
|
-
protocol: protocol,
|
|
102
|
-
hostname: resolvedHostname,
|
|
103
|
-
port: port,
|
|
104
|
-
method: "POST",
|
|
105
|
-
headers: headers,
|
|
106
|
-
path: resolvedPath,
|
|
107
|
-
body: body,
|
|
108
|
-
})];
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}); };
|
|
112
|
-
export var serializeAws_restJson1DeleteEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
113
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
114
|
-
return __generator(this, function (_c) {
|
|
115
|
-
switch (_c.label) {
|
|
116
|
-
case 0: return [4, context.endpoint()];
|
|
117
|
-
case 1:
|
|
118
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
119
|
-
headers = {};
|
|
120
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{Name}";
|
|
121
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
122
|
-
return [4, context.endpoint()];
|
|
123
|
-
case 2:
|
|
124
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
125
|
-
if (context.disableHostPrefix !== true) {
|
|
126
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
127
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
128
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
return [2, new __HttpRequest({
|
|
132
|
-
protocol: protocol,
|
|
133
|
-
hostname: resolvedHostname,
|
|
134
|
-
port: port,
|
|
135
|
-
method: "DELETE",
|
|
136
|
-
headers: headers,
|
|
137
|
-
path: resolvedPath,
|
|
138
|
-
body: body,
|
|
139
|
-
})];
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}); };
|
|
143
|
-
export var serializeAws_restJson1GetEnvironmentCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
144
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body, resolvedHostname;
|
|
145
|
-
return __generator(this, function (_c) {
|
|
146
|
-
switch (_c.label) {
|
|
147
|
-
case 0: return [4, context.endpoint()];
|
|
148
|
-
case 1:
|
|
149
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
150
|
-
headers = {};
|
|
151
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments/{Name}";
|
|
152
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
153
|
-
return [4, context.endpoint()];
|
|
154
|
-
case 2:
|
|
155
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
156
|
-
if (context.disableHostPrefix !== true) {
|
|
157
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
158
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
159
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
return [2, new __HttpRequest({
|
|
163
|
-
protocol: protocol,
|
|
164
|
-
hostname: resolvedHostname,
|
|
165
|
-
port: port,
|
|
166
|
-
method: "GET",
|
|
167
|
-
headers: headers,
|
|
168
|
-
path: resolvedPath,
|
|
169
|
-
body: body,
|
|
170
|
-
})];
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
}); };
|
|
174
|
-
export var serializeAws_restJson1ListEnvironmentsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
175
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body, resolvedHostname;
|
|
176
|
-
return __generator(this, function (_c) {
|
|
177
|
-
switch (_c.label) {
|
|
178
|
-
case 0: return [4, context.endpoint()];
|
|
179
|
-
case 1:
|
|
180
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
181
|
-
headers = {};
|
|
182
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/environments";
|
|
183
|
-
query = map({
|
|
184
|
-
NextToken: [, input.NextToken],
|
|
185
|
-
MaxResults: [function () { return input.MaxResults !== void 0; }, function () { return input.MaxResults.toString(); }],
|
|
186
|
-
});
|
|
187
|
-
return [4, context.endpoint()];
|
|
188
|
-
case 2:
|
|
189
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
190
|
-
if (context.disableHostPrefix !== true) {
|
|
191
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
192
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
193
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
return [2, new __HttpRequest({
|
|
197
|
-
protocol: protocol,
|
|
198
|
-
hostname: resolvedHostname,
|
|
199
|
-
port: port,
|
|
200
|
-
method: "GET",
|
|
201
|
-
headers: headers,
|
|
202
|
-
path: resolvedPath,
|
|
203
|
-
query: query,
|
|
204
|
-
body: body,
|
|
205
|
-
})];
|
|
5
|
+
export const serializeAws_restJson1CreateCliTokenCommand = async (input, context) => {
|
|
6
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
|
+
const headers = {};
|
|
8
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clitoken/{Name}";
|
|
9
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
10
|
+
let body;
|
|
11
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
12
|
+
if (context.disableHostPrefix !== true) {
|
|
13
|
+
resolvedHostname = "env." + resolvedHostname;
|
|
14
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
15
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
206
16
|
}
|
|
17
|
+
}
|
|
18
|
+
return new __HttpRequest({
|
|
19
|
+
protocol,
|
|
20
|
+
hostname: resolvedHostname,
|
|
21
|
+
port,
|
|
22
|
+
method: "POST",
|
|
23
|
+
headers,
|
|
24
|
+
path: resolvedPath,
|
|
25
|
+
body,
|
|
207
26
|
});
|
|
208
|
-
}
|
|
209
|
-
export
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
27
|
+
};
|
|
28
|
+
export const serializeAws_restJson1CreateEnvironmentCommand = async (input, context) => {
|
|
29
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
30
|
+
const headers = {
|
|
31
|
+
"content-type": "application/json",
|
|
32
|
+
};
|
|
33
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
34
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
35
|
+
let body;
|
|
36
|
+
body = JSON.stringify({
|
|
37
|
+
...(input.AirflowConfigurationOptions != null && {
|
|
38
|
+
AirflowConfigurationOptions: serializeAws_restJson1AirflowConfigurationOptions(input.AirflowConfigurationOptions, context),
|
|
39
|
+
}),
|
|
40
|
+
...(input.AirflowVersion != null && { AirflowVersion: input.AirflowVersion }),
|
|
41
|
+
...(input.DagS3Path != null && { DagS3Path: input.DagS3Path }),
|
|
42
|
+
...(input.EnvironmentClass != null && { EnvironmentClass: input.EnvironmentClass }),
|
|
43
|
+
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
44
|
+
...(input.KmsKey != null && { KmsKey: input.KmsKey }),
|
|
45
|
+
...(input.LoggingConfiguration != null && {
|
|
46
|
+
LoggingConfiguration: serializeAws_restJson1LoggingConfigurationInput(input.LoggingConfiguration, context),
|
|
47
|
+
}),
|
|
48
|
+
...(input.MaxWorkers != null && { MaxWorkers: input.MaxWorkers }),
|
|
49
|
+
...(input.MinWorkers != null && { MinWorkers: input.MinWorkers }),
|
|
50
|
+
...(input.NetworkConfiguration != null && {
|
|
51
|
+
NetworkConfiguration: serializeAws_restJson1NetworkConfiguration(input.NetworkConfiguration, context),
|
|
52
|
+
}),
|
|
53
|
+
...(input.PluginsS3ObjectVersion != null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion }),
|
|
54
|
+
...(input.PluginsS3Path != null && { PluginsS3Path: input.PluginsS3Path }),
|
|
55
|
+
...(input.RequirementsS3ObjectVersion != null && {
|
|
56
|
+
RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion,
|
|
57
|
+
}),
|
|
58
|
+
...(input.RequirementsS3Path != null && { RequirementsS3Path: input.RequirementsS3Path }),
|
|
59
|
+
...(input.Schedulers != null && { Schedulers: input.Schedulers }),
|
|
60
|
+
...(input.SourceBucketArn != null && { SourceBucketArn: input.SourceBucketArn }),
|
|
61
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
62
|
+
...(input.WebserverAccessMode != null && { WebserverAccessMode: input.WebserverAccessMode }),
|
|
63
|
+
...(input.WeeklyMaintenanceWindowStart != null && {
|
|
64
|
+
WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart,
|
|
65
|
+
}),
|
|
238
66
|
});
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
case 0: return [4, context.endpoint()];
|
|
245
|
-
case 1:
|
|
246
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
247
|
-
headers = {
|
|
248
|
-
"content-type": "application/json",
|
|
249
|
-
};
|
|
250
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/metrics/environments/{EnvironmentName}";
|
|
251
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentName", function () { return input.EnvironmentName; }, "{EnvironmentName}", false);
|
|
252
|
-
body = JSON.stringify(__assign({}, (input.MetricData != null && { MetricData: serializeAws_restJson1MetricData(input.MetricData, context) })));
|
|
253
|
-
return [4, context.endpoint()];
|
|
254
|
-
case 2:
|
|
255
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
256
|
-
if (context.disableHostPrefix !== true) {
|
|
257
|
-
resolvedHostname = "ops." + resolvedHostname;
|
|
258
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
259
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
return [2, new __HttpRequest({
|
|
263
|
-
protocol: protocol,
|
|
264
|
-
hostname: resolvedHostname,
|
|
265
|
-
port: port,
|
|
266
|
-
method: "POST",
|
|
267
|
-
headers: headers,
|
|
268
|
-
path: resolvedPath,
|
|
269
|
-
body: body,
|
|
270
|
-
})];
|
|
67
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
68
|
+
if (context.disableHostPrefix !== true) {
|
|
69
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
70
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
71
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
271
72
|
}
|
|
73
|
+
}
|
|
74
|
+
return new __HttpRequest({
|
|
75
|
+
protocol,
|
|
76
|
+
hostname: resolvedHostname,
|
|
77
|
+
port,
|
|
78
|
+
method: "PUT",
|
|
79
|
+
headers,
|
|
80
|
+
path: resolvedPath,
|
|
81
|
+
body,
|
|
272
82
|
});
|
|
273
|
-
}
|
|
274
|
-
export
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", function () { return input.ResourceArn; }, "{ResourceArn}", false);
|
|
286
|
-
body = JSON.stringify(__assign({}, (input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) })));
|
|
287
|
-
return [4, context.endpoint()];
|
|
288
|
-
case 2:
|
|
289
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
290
|
-
if (context.disableHostPrefix !== true) {
|
|
291
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
292
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
293
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return [2, new __HttpRequest({
|
|
297
|
-
protocol: protocol,
|
|
298
|
-
hostname: resolvedHostname,
|
|
299
|
-
port: port,
|
|
300
|
-
method: "POST",
|
|
301
|
-
headers: headers,
|
|
302
|
-
path: resolvedPath,
|
|
303
|
-
body: body,
|
|
304
|
-
})];
|
|
83
|
+
};
|
|
84
|
+
export const serializeAws_restJson1CreateWebLoginTokenCommand = async (input, context) => {
|
|
85
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
86
|
+
const headers = {};
|
|
87
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webtoken/{Name}";
|
|
88
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
89
|
+
let body;
|
|
90
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
91
|
+
if (context.disableHostPrefix !== true) {
|
|
92
|
+
resolvedHostname = "env." + resolvedHostname;
|
|
93
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
94
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
305
95
|
}
|
|
96
|
+
}
|
|
97
|
+
return new __HttpRequest({
|
|
98
|
+
protocol,
|
|
99
|
+
hostname: resolvedHostname,
|
|
100
|
+
port,
|
|
101
|
+
method: "POST",
|
|
102
|
+
headers,
|
|
103
|
+
path: resolvedPath,
|
|
104
|
+
body,
|
|
306
105
|
});
|
|
307
|
-
}
|
|
308
|
-
export
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
320
|
-
});
|
|
321
|
-
return [4, context.endpoint()];
|
|
322
|
-
case 2:
|
|
323
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
324
|
-
if (context.disableHostPrefix !== true) {
|
|
325
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
326
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
327
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
return [2, new __HttpRequest({
|
|
331
|
-
protocol: protocol,
|
|
332
|
-
hostname: resolvedHostname,
|
|
333
|
-
port: port,
|
|
334
|
-
method: "DELETE",
|
|
335
|
-
headers: headers,
|
|
336
|
-
path: resolvedPath,
|
|
337
|
-
query: query,
|
|
338
|
-
body: body,
|
|
339
|
-
})];
|
|
106
|
+
};
|
|
107
|
+
export const serializeAws_restJson1DeleteEnvironmentCommand = async (input, context) => {
|
|
108
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
109
|
+
const headers = {};
|
|
110
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
111
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
112
|
+
let body;
|
|
113
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
114
|
+
if (context.disableHostPrefix !== true) {
|
|
115
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
116
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
117
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
340
118
|
}
|
|
119
|
+
}
|
|
120
|
+
return new __HttpRequest({
|
|
121
|
+
protocol,
|
|
122
|
+
hostname: resolvedHostname,
|
|
123
|
+
port,
|
|
124
|
+
method: "DELETE",
|
|
125
|
+
headers,
|
|
126
|
+
path: resolvedPath,
|
|
127
|
+
body,
|
|
341
128
|
});
|
|
342
|
-
}
|
|
343
|
-
export
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "Name", function () { return input.Name; }, "{Name}", false);
|
|
355
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.AirflowConfigurationOptions != null && {
|
|
356
|
-
AirflowConfigurationOptions: serializeAws_restJson1AirflowConfigurationOptions(input.AirflowConfigurationOptions, context),
|
|
357
|
-
})), (input.AirflowVersion != null && { AirflowVersion: input.AirflowVersion })), (input.DagS3Path != null && { DagS3Path: input.DagS3Path })), (input.EnvironmentClass != null && { EnvironmentClass: input.EnvironmentClass })), (input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn })), (input.LoggingConfiguration != null && {
|
|
358
|
-
LoggingConfiguration: serializeAws_restJson1LoggingConfigurationInput(input.LoggingConfiguration, context),
|
|
359
|
-
})), (input.MaxWorkers != null && { MaxWorkers: input.MaxWorkers })), (input.MinWorkers != null && { MinWorkers: input.MinWorkers })), (input.NetworkConfiguration != null && {
|
|
360
|
-
NetworkConfiguration: serializeAws_restJson1UpdateNetworkConfigurationInput(input.NetworkConfiguration, context),
|
|
361
|
-
})), (input.PluginsS3ObjectVersion != null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion })), (input.PluginsS3Path != null && { PluginsS3Path: input.PluginsS3Path })), (input.RequirementsS3ObjectVersion != null && {
|
|
362
|
-
RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion,
|
|
363
|
-
})), (input.RequirementsS3Path != null && { RequirementsS3Path: input.RequirementsS3Path })), (input.Schedulers != null && { Schedulers: input.Schedulers })), (input.SourceBucketArn != null && { SourceBucketArn: input.SourceBucketArn })), (input.WebserverAccessMode != null && { WebserverAccessMode: input.WebserverAccessMode })), (input.WeeklyMaintenanceWindowStart != null && {
|
|
364
|
-
WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart,
|
|
365
|
-
})));
|
|
366
|
-
return [4, context.endpoint()];
|
|
367
|
-
case 2:
|
|
368
|
-
resolvedHostname = (_c.sent()).hostname;
|
|
369
|
-
if (context.disableHostPrefix !== true) {
|
|
370
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
371
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
372
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
return [2, new __HttpRequest({
|
|
376
|
-
protocol: protocol,
|
|
377
|
-
hostname: resolvedHostname,
|
|
378
|
-
port: port,
|
|
379
|
-
method: "PATCH",
|
|
380
|
-
headers: headers,
|
|
381
|
-
path: resolvedPath,
|
|
382
|
-
body: body,
|
|
383
|
-
})];
|
|
129
|
+
};
|
|
130
|
+
export const serializeAws_restJson1GetEnvironmentCommand = async (input, context) => {
|
|
131
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
132
|
+
const headers = {};
|
|
133
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
134
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
135
|
+
let body;
|
|
136
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
137
|
+
if (context.disableHostPrefix !== true) {
|
|
138
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
139
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
140
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
384
141
|
}
|
|
142
|
+
}
|
|
143
|
+
return new __HttpRequest({
|
|
144
|
+
protocol,
|
|
145
|
+
hostname: resolvedHostname,
|
|
146
|
+
port,
|
|
147
|
+
method: "GET",
|
|
148
|
+
headers,
|
|
149
|
+
path: resolvedPath,
|
|
150
|
+
body,
|
|
385
151
|
});
|
|
386
|
-
}
|
|
387
|
-
export
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
}
|
|
395
|
-
contents = map({
|
|
396
|
-
$metadata: deserializeMetadata(output),
|
|
397
|
-
});
|
|
398
|
-
_a = __expectNonNull;
|
|
399
|
-
_b = __expectObject;
|
|
400
|
-
return [4, parseBody(output.body, context)];
|
|
401
|
-
case 1:
|
|
402
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
403
|
-
if (data.CliToken != null) {
|
|
404
|
-
contents.CliToken = __expectString(data.CliToken);
|
|
405
|
-
}
|
|
406
|
-
if (data.WebServerHostname != null) {
|
|
407
|
-
contents.WebServerHostname = __expectString(data.WebServerHostname);
|
|
408
|
-
}
|
|
409
|
-
return [2, contents];
|
|
410
|
-
}
|
|
152
|
+
};
|
|
153
|
+
export const serializeAws_restJson1ListEnvironmentsCommand = async (input, context) => {
|
|
154
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
155
|
+
const headers = {};
|
|
156
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
|
|
157
|
+
const query = map({
|
|
158
|
+
NextToken: [, input.NextToken],
|
|
159
|
+
MaxResults: [() => input.MaxResults !== void 0, () => input.MaxResults.toString()],
|
|
411
160
|
});
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
case 0:
|
|
419
|
-
_a = [__assign({}, output)];
|
|
420
|
-
_c = {};
|
|
421
|
-
return [4, parseErrorBody(output.body, context)];
|
|
422
|
-
case 1:
|
|
423
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
424
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
425
|
-
_b = errorCode;
|
|
426
|
-
switch (_b) {
|
|
427
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
428
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException": return [3, 2];
|
|
429
|
-
}
|
|
430
|
-
return [3, 4];
|
|
431
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
432
|
-
case 3: throw _d.sent();
|
|
433
|
-
case 4:
|
|
434
|
-
parsedBody = parsedOutput.body;
|
|
435
|
-
throwDefaultError({
|
|
436
|
-
output: output,
|
|
437
|
-
parsedBody: parsedBody,
|
|
438
|
-
exceptionCtor: __BaseException,
|
|
439
|
-
errorCode: errorCode,
|
|
440
|
-
});
|
|
441
|
-
_d.label = 5;
|
|
442
|
-
case 5: return [2];
|
|
161
|
+
let body;
|
|
162
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
163
|
+
if (context.disableHostPrefix !== true) {
|
|
164
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
165
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
166
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
443
167
|
}
|
|
168
|
+
}
|
|
169
|
+
return new __HttpRequest({
|
|
170
|
+
protocol,
|
|
171
|
+
hostname: resolvedHostname,
|
|
172
|
+
port,
|
|
173
|
+
method: "GET",
|
|
174
|
+
headers,
|
|
175
|
+
path: resolvedPath,
|
|
176
|
+
query,
|
|
177
|
+
body,
|
|
444
178
|
});
|
|
445
|
-
}
|
|
446
|
-
export
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
_a = __expectNonNull;
|
|
458
|
-
_b = __expectObject;
|
|
459
|
-
return [4, parseBody(output.body, context)];
|
|
460
|
-
case 1:
|
|
461
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
462
|
-
if (data.Arn != null) {
|
|
463
|
-
contents.Arn = __expectString(data.Arn);
|
|
464
|
-
}
|
|
465
|
-
return [2, contents];
|
|
179
|
+
};
|
|
180
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
181
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
182
|
+
const headers = {};
|
|
183
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
184
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
185
|
+
let body;
|
|
186
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
187
|
+
if (context.disableHostPrefix !== true) {
|
|
188
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
189
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
190
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
466
191
|
}
|
|
192
|
+
}
|
|
193
|
+
return new __HttpRequest({
|
|
194
|
+
protocol,
|
|
195
|
+
hostname: resolvedHostname,
|
|
196
|
+
port,
|
|
197
|
+
method: "GET",
|
|
198
|
+
headers,
|
|
199
|
+
path: resolvedPath,
|
|
200
|
+
body,
|
|
467
201
|
});
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
480
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
481
|
-
_b = errorCode;
|
|
482
|
-
switch (_b) {
|
|
483
|
-
case "InternalServerException": return [3, 2];
|
|
484
|
-
case "com.amazonaws.mwaa#InternalServerException": return [3, 2];
|
|
485
|
-
case "ValidationException": return [3, 4];
|
|
486
|
-
case "com.amazonaws.mwaa#ValidationException": return [3, 4];
|
|
487
|
-
}
|
|
488
|
-
return [3, 6];
|
|
489
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
490
|
-
case 3: throw _d.sent();
|
|
491
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
492
|
-
case 5: throw _d.sent();
|
|
493
|
-
case 6:
|
|
494
|
-
parsedBody = parsedOutput.body;
|
|
495
|
-
throwDefaultError({
|
|
496
|
-
output: output,
|
|
497
|
-
parsedBody: parsedBody,
|
|
498
|
-
exceptionCtor: __BaseException,
|
|
499
|
-
errorCode: errorCode,
|
|
500
|
-
});
|
|
501
|
-
_d.label = 7;
|
|
502
|
-
case 7: return [2];
|
|
503
|
-
}
|
|
202
|
+
};
|
|
203
|
+
export const serializeAws_restJson1PublishMetricsCommand = async (input, context) => {
|
|
204
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
205
|
+
const headers = {
|
|
206
|
+
"content-type": "application/json",
|
|
207
|
+
};
|
|
208
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/environments/{EnvironmentName}";
|
|
209
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "EnvironmentName", () => input.EnvironmentName, "{EnvironmentName}", false);
|
|
210
|
+
let body;
|
|
211
|
+
body = JSON.stringify({
|
|
212
|
+
...(input.MetricData != null && { MetricData: serializeAws_restJson1MetricData(input.MetricData, context) }),
|
|
504
213
|
});
|
|
505
|
-
});
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
case 0:
|
|
511
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
512
|
-
return [2, deserializeAws_restJson1CreateWebLoginTokenCommandError(output, context)];
|
|
513
|
-
}
|
|
514
|
-
contents = map({
|
|
515
|
-
$metadata: deserializeMetadata(output),
|
|
516
|
-
});
|
|
517
|
-
_a = __expectNonNull;
|
|
518
|
-
_b = __expectObject;
|
|
519
|
-
return [4, parseBody(output.body, context)];
|
|
520
|
-
case 1:
|
|
521
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
522
|
-
if (data.WebServerHostname != null) {
|
|
523
|
-
contents.WebServerHostname = __expectString(data.WebServerHostname);
|
|
524
|
-
}
|
|
525
|
-
if (data.WebToken != null) {
|
|
526
|
-
contents.WebToken = __expectString(data.WebToken);
|
|
527
|
-
}
|
|
528
|
-
return [2, contents];
|
|
214
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
215
|
+
if (context.disableHostPrefix !== true) {
|
|
216
|
+
resolvedHostname = "ops." + resolvedHostname;
|
|
217
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
218
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
529
219
|
}
|
|
220
|
+
}
|
|
221
|
+
return new __HttpRequest({
|
|
222
|
+
protocol,
|
|
223
|
+
hostname: resolvedHostname,
|
|
224
|
+
port,
|
|
225
|
+
method: "POST",
|
|
226
|
+
headers,
|
|
227
|
+
path: resolvedPath,
|
|
228
|
+
body,
|
|
530
229
|
});
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
543
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
544
|
-
_b = errorCode;
|
|
545
|
-
switch (_b) {
|
|
546
|
-
case "AccessDeniedException": return [3, 2];
|
|
547
|
-
case "com.amazonaws.mwaa#AccessDeniedException": return [3, 2];
|
|
548
|
-
case "InternalServerException": return [3, 4];
|
|
549
|
-
case "com.amazonaws.mwaa#InternalServerException": return [3, 4];
|
|
550
|
-
case "ResourceNotFoundException": return [3, 6];
|
|
551
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException": return [3, 6];
|
|
552
|
-
case "ValidationException": return [3, 8];
|
|
553
|
-
case "com.amazonaws.mwaa#ValidationException": return [3, 8];
|
|
554
|
-
}
|
|
555
|
-
return [3, 10];
|
|
556
|
-
case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
|
|
557
|
-
case 3: throw _d.sent();
|
|
558
|
-
case 4: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
559
|
-
case 5: throw _d.sent();
|
|
560
|
-
case 6: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
561
|
-
case 7: throw _d.sent();
|
|
562
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
563
|
-
case 9: throw _d.sent();
|
|
564
|
-
case 10:
|
|
565
|
-
parsedBody = parsedOutput.body;
|
|
566
|
-
throwDefaultError({
|
|
567
|
-
output: output,
|
|
568
|
-
parsedBody: parsedBody,
|
|
569
|
-
exceptionCtor: __BaseException,
|
|
570
|
-
errorCode: errorCode,
|
|
571
|
-
});
|
|
572
|
-
_d.label = 11;
|
|
573
|
-
case 11: return [2];
|
|
574
|
-
}
|
|
230
|
+
};
|
|
231
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
232
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
233
|
+
const headers = {
|
|
234
|
+
"content-type": "application/json",
|
|
235
|
+
};
|
|
236
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
237
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
238
|
+
let body;
|
|
239
|
+
body = JSON.stringify({
|
|
240
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
575
241
|
});
|
|
576
|
-
});
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
case 0:
|
|
582
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
583
|
-
return [2, deserializeAws_restJson1DeleteEnvironmentCommandError(output, context)];
|
|
584
|
-
}
|
|
585
|
-
contents = map({
|
|
586
|
-
$metadata: deserializeMetadata(output),
|
|
587
|
-
});
|
|
588
|
-
return [4, collectBody(output.body, context)];
|
|
589
|
-
case 1:
|
|
590
|
-
_a.sent();
|
|
591
|
-
return [2, contents];
|
|
242
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
243
|
+
if (context.disableHostPrefix !== true) {
|
|
244
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
245
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
246
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
592
247
|
}
|
|
248
|
+
}
|
|
249
|
+
return new __HttpRequest({
|
|
250
|
+
protocol,
|
|
251
|
+
hostname: resolvedHostname,
|
|
252
|
+
port,
|
|
253
|
+
method: "POST",
|
|
254
|
+
headers,
|
|
255
|
+
path: resolvedPath,
|
|
256
|
+
body,
|
|
593
257
|
});
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
_c = {};
|
|
603
|
-
return [4, parseErrorBody(output.body, context)];
|
|
604
|
-
case 1:
|
|
605
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
606
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
607
|
-
_b = errorCode;
|
|
608
|
-
switch (_b) {
|
|
609
|
-
case "InternalServerException": return [3, 2];
|
|
610
|
-
case "com.amazonaws.mwaa#InternalServerException": return [3, 2];
|
|
611
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
612
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException": return [3, 4];
|
|
613
|
-
case "ValidationException": return [3, 6];
|
|
614
|
-
case "com.amazonaws.mwaa#ValidationException": return [3, 6];
|
|
615
|
-
}
|
|
616
|
-
return [3, 8];
|
|
617
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
618
|
-
case 3: throw _d.sent();
|
|
619
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
620
|
-
case 5: throw _d.sent();
|
|
621
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
622
|
-
case 7: throw _d.sent();
|
|
623
|
-
case 8:
|
|
624
|
-
parsedBody = parsedOutput.body;
|
|
625
|
-
throwDefaultError({
|
|
626
|
-
output: output,
|
|
627
|
-
parsedBody: parsedBody,
|
|
628
|
-
exceptionCtor: __BaseException,
|
|
629
|
-
errorCode: errorCode,
|
|
630
|
-
});
|
|
631
|
-
_d.label = 9;
|
|
632
|
-
case 9: return [2];
|
|
633
|
-
}
|
|
258
|
+
};
|
|
259
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
260
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
261
|
+
const headers = {};
|
|
262
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
263
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
264
|
+
const query = map({
|
|
265
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
634
266
|
});
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
642
|
-
return [2, deserializeAws_restJson1GetEnvironmentCommandError(output, context)];
|
|
643
|
-
}
|
|
644
|
-
contents = map({
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
});
|
|
647
|
-
_a = __expectNonNull;
|
|
648
|
-
_b = __expectObject;
|
|
649
|
-
return [4, parseBody(output.body, context)];
|
|
650
|
-
case 1:
|
|
651
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
652
|
-
if (data.Environment != null) {
|
|
653
|
-
contents.Environment = deserializeAws_restJson1Environment(data.Environment, context);
|
|
654
|
-
}
|
|
655
|
-
return [2, contents];
|
|
267
|
+
let body;
|
|
268
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
269
|
+
if (context.disableHostPrefix !== true) {
|
|
270
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
271
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
272
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
656
273
|
}
|
|
274
|
+
}
|
|
275
|
+
return new __HttpRequest({
|
|
276
|
+
protocol,
|
|
277
|
+
hostname: resolvedHostname,
|
|
278
|
+
port,
|
|
279
|
+
method: "DELETE",
|
|
280
|
+
headers,
|
|
281
|
+
path: resolvedPath,
|
|
282
|
+
query,
|
|
283
|
+
body,
|
|
657
284
|
});
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
_d.label = 9;
|
|
696
|
-
case 9: return [2];
|
|
697
|
-
}
|
|
285
|
+
};
|
|
286
|
+
export const serializeAws_restJson1UpdateEnvironmentCommand = async (input, context) => {
|
|
287
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
288
|
+
const headers = {
|
|
289
|
+
"content-type": "application/json",
|
|
290
|
+
};
|
|
291
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
292
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "Name", () => input.Name, "{Name}", false);
|
|
293
|
+
let body;
|
|
294
|
+
body = JSON.stringify({
|
|
295
|
+
...(input.AirflowConfigurationOptions != null && {
|
|
296
|
+
AirflowConfigurationOptions: serializeAws_restJson1AirflowConfigurationOptions(input.AirflowConfigurationOptions, context),
|
|
297
|
+
}),
|
|
298
|
+
...(input.AirflowVersion != null && { AirflowVersion: input.AirflowVersion }),
|
|
299
|
+
...(input.DagS3Path != null && { DagS3Path: input.DagS3Path }),
|
|
300
|
+
...(input.EnvironmentClass != null && { EnvironmentClass: input.EnvironmentClass }),
|
|
301
|
+
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
302
|
+
...(input.LoggingConfiguration != null && {
|
|
303
|
+
LoggingConfiguration: serializeAws_restJson1LoggingConfigurationInput(input.LoggingConfiguration, context),
|
|
304
|
+
}),
|
|
305
|
+
...(input.MaxWorkers != null && { MaxWorkers: input.MaxWorkers }),
|
|
306
|
+
...(input.MinWorkers != null && { MinWorkers: input.MinWorkers }),
|
|
307
|
+
...(input.NetworkConfiguration != null && {
|
|
308
|
+
NetworkConfiguration: serializeAws_restJson1UpdateNetworkConfigurationInput(input.NetworkConfiguration, context),
|
|
309
|
+
}),
|
|
310
|
+
...(input.PluginsS3ObjectVersion != null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion }),
|
|
311
|
+
...(input.PluginsS3Path != null && { PluginsS3Path: input.PluginsS3Path }),
|
|
312
|
+
...(input.RequirementsS3ObjectVersion != null && {
|
|
313
|
+
RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion,
|
|
314
|
+
}),
|
|
315
|
+
...(input.RequirementsS3Path != null && { RequirementsS3Path: input.RequirementsS3Path }),
|
|
316
|
+
...(input.Schedulers != null && { Schedulers: input.Schedulers }),
|
|
317
|
+
...(input.SourceBucketArn != null && { SourceBucketArn: input.SourceBucketArn }),
|
|
318
|
+
...(input.WebserverAccessMode != null && { WebserverAccessMode: input.WebserverAccessMode }),
|
|
319
|
+
...(input.WeeklyMaintenanceWindowStart != null && {
|
|
320
|
+
WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart,
|
|
321
|
+
}),
|
|
698
322
|
});
|
|
699
|
-
});
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
case 0:
|
|
705
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
706
|
-
return [2, deserializeAws_restJson1ListEnvironmentsCommandError(output, context)];
|
|
707
|
-
}
|
|
708
|
-
contents = map({
|
|
709
|
-
$metadata: deserializeMetadata(output),
|
|
710
|
-
});
|
|
711
|
-
_a = __expectNonNull;
|
|
712
|
-
_b = __expectObject;
|
|
713
|
-
return [4, parseBody(output.body, context)];
|
|
714
|
-
case 1:
|
|
715
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
716
|
-
if (data.Environments != null) {
|
|
717
|
-
contents.Environments = deserializeAws_restJson1EnvironmentList(data.Environments, context);
|
|
718
|
-
}
|
|
719
|
-
if (data.NextToken != null) {
|
|
720
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
721
|
-
}
|
|
722
|
-
return [2, contents];
|
|
323
|
+
let { hostname: resolvedHostname } = await context.endpoint();
|
|
324
|
+
if (context.disableHostPrefix !== true) {
|
|
325
|
+
resolvedHostname = "api." + resolvedHostname;
|
|
326
|
+
if (!__isValidHostname(resolvedHostname)) {
|
|
327
|
+
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
723
328
|
}
|
|
329
|
+
}
|
|
330
|
+
return new __HttpRequest({
|
|
331
|
+
protocol,
|
|
332
|
+
hostname: resolvedHostname,
|
|
333
|
+
port,
|
|
334
|
+
method: "PATCH",
|
|
335
|
+
headers,
|
|
336
|
+
path: resolvedPath,
|
|
337
|
+
body,
|
|
724
338
|
});
|
|
725
|
-
}
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
_a = [__assign({}, output)];
|
|
733
|
-
_c = {};
|
|
734
|
-
return [4, parseErrorBody(output.body, context)];
|
|
735
|
-
case 1:
|
|
736
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
737
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
738
|
-
_b = errorCode;
|
|
739
|
-
switch (_b) {
|
|
740
|
-
case "InternalServerException": return [3, 2];
|
|
741
|
-
case "com.amazonaws.mwaa#InternalServerException": return [3, 2];
|
|
742
|
-
case "ValidationException": return [3, 4];
|
|
743
|
-
case "com.amazonaws.mwaa#ValidationException": return [3, 4];
|
|
744
|
-
}
|
|
745
|
-
return [3, 6];
|
|
746
|
-
case 2: return [4, deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)];
|
|
747
|
-
case 3: throw _d.sent();
|
|
748
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
749
|
-
case 5: throw _d.sent();
|
|
750
|
-
case 6:
|
|
751
|
-
parsedBody = parsedOutput.body;
|
|
752
|
-
throwDefaultError({
|
|
753
|
-
output: output,
|
|
754
|
-
parsedBody: parsedBody,
|
|
755
|
-
exceptionCtor: __BaseException,
|
|
756
|
-
errorCode: errorCode,
|
|
757
|
-
});
|
|
758
|
-
_d.label = 7;
|
|
759
|
-
case 7: return [2];
|
|
760
|
-
}
|
|
339
|
+
};
|
|
340
|
+
export const deserializeAws_restJson1CreateCliTokenCommand = async (output, context) => {
|
|
341
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
342
|
+
return deserializeAws_restJson1CreateCliTokenCommandError(output, context);
|
|
343
|
+
}
|
|
344
|
+
const contents = map({
|
|
345
|
+
$metadata: deserializeMetadata(output),
|
|
761
346
|
});
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
347
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
348
|
+
if (data.CliToken != null) {
|
|
349
|
+
contents.CliToken = __expectString(data.CliToken);
|
|
350
|
+
}
|
|
351
|
+
if (data.WebServerHostname != null) {
|
|
352
|
+
contents.WebServerHostname = __expectString(data.WebServerHostname);
|
|
353
|
+
}
|
|
354
|
+
return contents;
|
|
355
|
+
};
|
|
356
|
+
const deserializeAws_restJson1CreateCliTokenCommandError = async (output, context) => {
|
|
357
|
+
const parsedOutput = {
|
|
358
|
+
...output,
|
|
359
|
+
body: await parseErrorBody(output.body, context),
|
|
360
|
+
};
|
|
361
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
362
|
+
switch (errorCode) {
|
|
363
|
+
case "ResourceNotFoundException":
|
|
364
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
365
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
366
|
+
default:
|
|
367
|
+
const parsedBody = parsedOutput.body;
|
|
368
|
+
throwDefaultError({
|
|
369
|
+
output,
|
|
370
|
+
parsedBody,
|
|
371
|
+
exceptionCtor: __BaseException,
|
|
372
|
+
errorCode,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
export const deserializeAws_restJson1CreateEnvironmentCommand = async (output, context) => {
|
|
377
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
378
|
+
return deserializeAws_restJson1CreateEnvironmentCommandError(output, context);
|
|
379
|
+
}
|
|
380
|
+
const contents = map({
|
|
381
|
+
$metadata: deserializeMetadata(output),
|
|
784
382
|
});
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
return
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
errorCode: errorCode,
|
|
821
|
-
});
|
|
822
|
-
_d.label = 9;
|
|
823
|
-
case 9: return [2];
|
|
824
|
-
}
|
|
383
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
384
|
+
if (data.Arn != null) {
|
|
385
|
+
contents.Arn = __expectString(data.Arn);
|
|
386
|
+
}
|
|
387
|
+
return contents;
|
|
388
|
+
};
|
|
389
|
+
const deserializeAws_restJson1CreateEnvironmentCommandError = async (output, context) => {
|
|
390
|
+
const parsedOutput = {
|
|
391
|
+
...output,
|
|
392
|
+
body: await parseErrorBody(output.body, context),
|
|
393
|
+
};
|
|
394
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
395
|
+
switch (errorCode) {
|
|
396
|
+
case "InternalServerException":
|
|
397
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
398
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
399
|
+
case "ValidationException":
|
|
400
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
401
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
402
|
+
default:
|
|
403
|
+
const parsedBody = parsedOutput.body;
|
|
404
|
+
throwDefaultError({
|
|
405
|
+
output,
|
|
406
|
+
parsedBody,
|
|
407
|
+
exceptionCtor: __BaseException,
|
|
408
|
+
errorCode,
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
export const deserializeAws_restJson1CreateWebLoginTokenCommand = async (output, context) => {
|
|
413
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
414
|
+
return deserializeAws_restJson1CreateWebLoginTokenCommandError(output, context);
|
|
415
|
+
}
|
|
416
|
+
const contents = map({
|
|
417
|
+
$metadata: deserializeMetadata(output),
|
|
825
418
|
});
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
419
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
420
|
+
if (data.WebServerHostname != null) {
|
|
421
|
+
contents.WebServerHostname = __expectString(data.WebServerHostname);
|
|
422
|
+
}
|
|
423
|
+
if (data.WebToken != null) {
|
|
424
|
+
contents.WebToken = __expectString(data.WebToken);
|
|
425
|
+
}
|
|
426
|
+
return contents;
|
|
427
|
+
};
|
|
428
|
+
const deserializeAws_restJson1CreateWebLoginTokenCommandError = async (output, context) => {
|
|
429
|
+
const parsedOutput = {
|
|
430
|
+
...output,
|
|
431
|
+
body: await parseErrorBody(output.body, context),
|
|
432
|
+
};
|
|
433
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
434
|
+
switch (errorCode) {
|
|
435
|
+
case "AccessDeniedException":
|
|
436
|
+
case "com.amazonaws.mwaa#AccessDeniedException":
|
|
437
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
438
|
+
case "InternalServerException":
|
|
439
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
440
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
441
|
+
case "ResourceNotFoundException":
|
|
442
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
443
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
444
|
+
case "ValidationException":
|
|
445
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
446
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
447
|
+
default:
|
|
448
|
+
const parsedBody = parsedOutput.body;
|
|
449
|
+
throwDefaultError({
|
|
450
|
+
output,
|
|
451
|
+
parsedBody,
|
|
452
|
+
exceptionCtor: __BaseException,
|
|
453
|
+
errorCode,
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
export const deserializeAws_restJson1DeleteEnvironmentCommand = async (output, context) => {
|
|
458
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
459
|
+
return deserializeAws_restJson1DeleteEnvironmentCommandError(output, context);
|
|
460
|
+
}
|
|
461
|
+
const contents = map({
|
|
462
|
+
$metadata: deserializeMetadata(output),
|
|
843
463
|
});
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
}
|
|
464
|
+
await collectBody(output.body, context);
|
|
465
|
+
return contents;
|
|
466
|
+
};
|
|
467
|
+
const deserializeAws_restJson1DeleteEnvironmentCommandError = async (output, context) => {
|
|
468
|
+
const parsedOutput = {
|
|
469
|
+
...output,
|
|
470
|
+
body: await parseErrorBody(output.body, context),
|
|
471
|
+
};
|
|
472
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
473
|
+
switch (errorCode) {
|
|
474
|
+
case "InternalServerException":
|
|
475
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
476
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
477
|
+
case "ResourceNotFoundException":
|
|
478
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
479
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
480
|
+
case "ValidationException":
|
|
481
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
482
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
483
|
+
default:
|
|
484
|
+
const parsedBody = parsedOutput.body;
|
|
485
|
+
throwDefaultError({
|
|
486
|
+
output,
|
|
487
|
+
parsedBody,
|
|
488
|
+
exceptionCtor: __BaseException,
|
|
489
|
+
errorCode,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
};
|
|
493
|
+
export const deserializeAws_restJson1GetEnvironmentCommand = async (output, context) => {
|
|
494
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
495
|
+
return deserializeAws_restJson1GetEnvironmentCommandError(output, context);
|
|
496
|
+
}
|
|
497
|
+
const contents = map({
|
|
498
|
+
$metadata: deserializeMetadata(output),
|
|
880
499
|
});
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
500
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
501
|
+
if (data.Environment != null) {
|
|
502
|
+
contents.Environment = deserializeAws_restJson1Environment(data.Environment, context);
|
|
503
|
+
}
|
|
504
|
+
return contents;
|
|
505
|
+
};
|
|
506
|
+
const deserializeAws_restJson1GetEnvironmentCommandError = async (output, context) => {
|
|
507
|
+
const parsedOutput = {
|
|
508
|
+
...output,
|
|
509
|
+
body: await parseErrorBody(output.body, context),
|
|
510
|
+
};
|
|
511
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
512
|
+
switch (errorCode) {
|
|
513
|
+
case "InternalServerException":
|
|
514
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
515
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
516
|
+
case "ResourceNotFoundException":
|
|
517
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
518
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
519
|
+
case "ValidationException":
|
|
520
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
521
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
522
|
+
default:
|
|
523
|
+
const parsedBody = parsedOutput.body;
|
|
524
|
+
throwDefaultError({
|
|
525
|
+
output,
|
|
526
|
+
parsedBody,
|
|
527
|
+
exceptionCtor: __BaseException,
|
|
528
|
+
errorCode,
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
export const deserializeAws_restJson1ListEnvironmentsCommand = async (output, context) => {
|
|
533
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
534
|
+
return deserializeAws_restJson1ListEnvironmentsCommandError(output, context);
|
|
535
|
+
}
|
|
536
|
+
const contents = map({
|
|
537
|
+
$metadata: deserializeMetadata(output),
|
|
898
538
|
});
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
case 9: return [2];
|
|
938
|
-
}
|
|
539
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
540
|
+
if (data.Environments != null) {
|
|
541
|
+
contents.Environments = deserializeAws_restJson1EnvironmentList(data.Environments, context);
|
|
542
|
+
}
|
|
543
|
+
if (data.NextToken != null) {
|
|
544
|
+
contents.NextToken = __expectString(data.NextToken);
|
|
545
|
+
}
|
|
546
|
+
return contents;
|
|
547
|
+
};
|
|
548
|
+
const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, context) => {
|
|
549
|
+
const parsedOutput = {
|
|
550
|
+
...output,
|
|
551
|
+
body: await parseErrorBody(output.body, context),
|
|
552
|
+
};
|
|
553
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
554
|
+
switch (errorCode) {
|
|
555
|
+
case "InternalServerException":
|
|
556
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
557
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
558
|
+
case "ValidationException":
|
|
559
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
560
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
561
|
+
default:
|
|
562
|
+
const parsedBody = parsedOutput.body;
|
|
563
|
+
throwDefaultError({
|
|
564
|
+
output,
|
|
565
|
+
parsedBody,
|
|
566
|
+
exceptionCtor: __BaseException,
|
|
567
|
+
errorCode,
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
};
|
|
571
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
572
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
573
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
574
|
+
}
|
|
575
|
+
const contents = map({
|
|
576
|
+
$metadata: deserializeMetadata(output),
|
|
939
577
|
});
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
578
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
579
|
+
if (data.Tags != null) {
|
|
580
|
+
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
581
|
+
}
|
|
582
|
+
return contents;
|
|
583
|
+
};
|
|
584
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
585
|
+
const parsedOutput = {
|
|
586
|
+
...output,
|
|
587
|
+
body: await parseErrorBody(output.body, context),
|
|
588
|
+
};
|
|
589
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
590
|
+
switch (errorCode) {
|
|
591
|
+
case "InternalServerException":
|
|
592
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
593
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
594
|
+
case "ResourceNotFoundException":
|
|
595
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
596
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
597
|
+
case "ValidationException":
|
|
598
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
599
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
600
|
+
default:
|
|
601
|
+
const parsedBody = parsedOutput.body;
|
|
602
|
+
throwDefaultError({
|
|
603
|
+
output,
|
|
604
|
+
parsedBody,
|
|
605
|
+
exceptionCtor: __BaseException,
|
|
606
|
+
errorCode,
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
};
|
|
610
|
+
export const deserializeAws_restJson1PublishMetricsCommand = async (output, context) => {
|
|
611
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
612
|
+
return deserializeAws_restJson1PublishMetricsCommandError(output, context);
|
|
613
|
+
}
|
|
614
|
+
const contents = map({
|
|
615
|
+
$metadata: deserializeMetadata(output),
|
|
957
616
|
});
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
output: output,
|
|
991
|
-
parsedBody: parsedBody,
|
|
992
|
-
exceptionCtor: __BaseException,
|
|
993
|
-
errorCode: errorCode,
|
|
994
|
-
});
|
|
995
|
-
_d.label = 9;
|
|
996
|
-
case 9: return [2];
|
|
997
|
-
}
|
|
617
|
+
await collectBody(output.body, context);
|
|
618
|
+
return contents;
|
|
619
|
+
};
|
|
620
|
+
const deserializeAws_restJson1PublishMetricsCommandError = async (output, context) => {
|
|
621
|
+
const parsedOutput = {
|
|
622
|
+
...output,
|
|
623
|
+
body: await parseErrorBody(output.body, context),
|
|
624
|
+
};
|
|
625
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
626
|
+
switch (errorCode) {
|
|
627
|
+
case "InternalServerException":
|
|
628
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
629
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
630
|
+
case "ValidationException":
|
|
631
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
632
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
633
|
+
default:
|
|
634
|
+
const parsedBody = parsedOutput.body;
|
|
635
|
+
throwDefaultError({
|
|
636
|
+
output,
|
|
637
|
+
parsedBody,
|
|
638
|
+
exceptionCtor: __BaseException,
|
|
639
|
+
errorCode,
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
644
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
645
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
646
|
+
}
|
|
647
|
+
const contents = map({
|
|
648
|
+
$metadata: deserializeMetadata(output),
|
|
998
649
|
});
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
650
|
+
await collectBody(output.body, context);
|
|
651
|
+
return contents;
|
|
652
|
+
};
|
|
653
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
654
|
+
const parsedOutput = {
|
|
655
|
+
...output,
|
|
656
|
+
body: await parseErrorBody(output.body, context),
|
|
657
|
+
};
|
|
658
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
659
|
+
switch (errorCode) {
|
|
660
|
+
case "InternalServerException":
|
|
661
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
662
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
663
|
+
case "ResourceNotFoundException":
|
|
664
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
665
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
666
|
+
case "ValidationException":
|
|
667
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
668
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
669
|
+
default:
|
|
670
|
+
const parsedBody = parsedOutput.body;
|
|
671
|
+
throwDefaultError({
|
|
672
|
+
output,
|
|
673
|
+
parsedBody,
|
|
674
|
+
exceptionCtor: __BaseException,
|
|
675
|
+
errorCode,
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
680
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
681
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
682
|
+
}
|
|
683
|
+
const contents = map({
|
|
684
|
+
$metadata: deserializeMetadata(output),
|
|
1021
685
|
});
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
errorCode: errorCode,
|
|
1058
|
-
});
|
|
1059
|
-
_d.label = 9;
|
|
1060
|
-
case 9: return [2];
|
|
1061
|
-
}
|
|
686
|
+
await collectBody(output.body, context);
|
|
687
|
+
return contents;
|
|
688
|
+
};
|
|
689
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
690
|
+
const parsedOutput = {
|
|
691
|
+
...output,
|
|
692
|
+
body: await parseErrorBody(output.body, context),
|
|
693
|
+
};
|
|
694
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
695
|
+
switch (errorCode) {
|
|
696
|
+
case "InternalServerException":
|
|
697
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
698
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
699
|
+
case "ResourceNotFoundException":
|
|
700
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
701
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
702
|
+
case "ValidationException":
|
|
703
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
704
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
705
|
+
default:
|
|
706
|
+
const parsedBody = parsedOutput.body;
|
|
707
|
+
throwDefaultError({
|
|
708
|
+
output,
|
|
709
|
+
parsedBody,
|
|
710
|
+
exceptionCtor: __BaseException,
|
|
711
|
+
errorCode,
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
};
|
|
715
|
+
export const deserializeAws_restJson1UpdateEnvironmentCommand = async (output, context) => {
|
|
716
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
717
|
+
return deserializeAws_restJson1UpdateEnvironmentCommandError(output, context);
|
|
718
|
+
}
|
|
719
|
+
const contents = map({
|
|
720
|
+
$metadata: deserializeMetadata(output),
|
|
1062
721
|
});
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
return
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
722
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
723
|
+
if (data.Arn != null) {
|
|
724
|
+
contents.Arn = __expectString(data.Arn);
|
|
725
|
+
}
|
|
726
|
+
return contents;
|
|
727
|
+
};
|
|
728
|
+
const deserializeAws_restJson1UpdateEnvironmentCommandError = async (output, context) => {
|
|
729
|
+
const parsedOutput = {
|
|
730
|
+
...output,
|
|
731
|
+
body: await parseErrorBody(output.body, context),
|
|
732
|
+
};
|
|
733
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
734
|
+
switch (errorCode) {
|
|
735
|
+
case "InternalServerException":
|
|
736
|
+
case "com.amazonaws.mwaa#InternalServerException":
|
|
737
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
738
|
+
case "ResourceNotFoundException":
|
|
739
|
+
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
740
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
741
|
+
case "ValidationException":
|
|
742
|
+
case "com.amazonaws.mwaa#ValidationException":
|
|
743
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
744
|
+
default:
|
|
745
|
+
const parsedBody = parsedOutput.body;
|
|
746
|
+
throwDefaultError({
|
|
747
|
+
output,
|
|
748
|
+
parsedBody,
|
|
749
|
+
exceptionCtor: __BaseException,
|
|
750
|
+
errorCode,
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
const map = __map;
|
|
755
|
+
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
756
|
+
const contents = map({});
|
|
757
|
+
const data = parsedOutput.body;
|
|
758
|
+
if (data.Message != null) {
|
|
759
|
+
contents.Message = __expectString(data.Message);
|
|
760
|
+
}
|
|
761
|
+
const exception = new AccessDeniedException({
|
|
762
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
763
|
+
...contents,
|
|
1075
764
|
});
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
765
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
766
|
+
};
|
|
767
|
+
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
768
|
+
const contents = map({});
|
|
769
|
+
const data = parsedOutput.body;
|
|
770
|
+
if (data.message != null) {
|
|
771
|
+
contents.message = __expectString(data.message);
|
|
772
|
+
}
|
|
773
|
+
const exception = new InternalServerException({
|
|
774
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
775
|
+
...contents,
|
|
1087
776
|
});
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
777
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
778
|
+
};
|
|
779
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
780
|
+
const contents = map({});
|
|
781
|
+
const data = parsedOutput.body;
|
|
782
|
+
if (data.message != null) {
|
|
783
|
+
contents.message = __expectString(data.message);
|
|
784
|
+
}
|
|
785
|
+
const exception = new ResourceNotFoundException({
|
|
786
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
787
|
+
...contents,
|
|
1099
788
|
});
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
789
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
790
|
+
};
|
|
791
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
792
|
+
const contents = map({});
|
|
793
|
+
const data = parsedOutput.body;
|
|
794
|
+
if (data.message != null) {
|
|
795
|
+
contents.message = __expectString(data.message);
|
|
796
|
+
}
|
|
797
|
+
const exception = new ValidationException({
|
|
798
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
799
|
+
...contents,
|
|
1111
800
|
});
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
801
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
802
|
+
};
|
|
803
|
+
const serializeAws_restJson1AirflowConfigurationOptions = (input, context) => {
|
|
804
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1117
805
|
if (value === null) {
|
|
1118
806
|
return acc;
|
|
1119
807
|
}
|
|
1120
|
-
return
|
|
808
|
+
return {
|
|
809
|
+
...acc,
|
|
810
|
+
[key]: value,
|
|
811
|
+
};
|
|
1121
812
|
}, {});
|
|
1122
813
|
};
|
|
1123
|
-
|
|
1124
|
-
return
|
|
814
|
+
const serializeAws_restJson1Dimension = (input, context) => {
|
|
815
|
+
return {
|
|
816
|
+
...(input.Name != null && { Name: input.Name }),
|
|
817
|
+
...(input.Value != null && { Value: input.Value }),
|
|
818
|
+
};
|
|
1125
819
|
};
|
|
1126
|
-
|
|
820
|
+
const serializeAws_restJson1Dimensions = (input, context) => {
|
|
1127
821
|
return input
|
|
1128
|
-
.filter(
|
|
1129
|
-
.map(
|
|
822
|
+
.filter((e) => e != null)
|
|
823
|
+
.map((entry) => {
|
|
1130
824
|
return serializeAws_restJson1Dimension(entry, context);
|
|
1131
825
|
});
|
|
1132
826
|
};
|
|
1133
|
-
|
|
1134
|
-
return
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
827
|
+
const serializeAws_restJson1LoggingConfigurationInput = (input, context) => {
|
|
828
|
+
return {
|
|
829
|
+
...(input.DagProcessingLogs != null && {
|
|
830
|
+
DagProcessingLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.DagProcessingLogs, context),
|
|
831
|
+
}),
|
|
832
|
+
...(input.SchedulerLogs != null && {
|
|
833
|
+
SchedulerLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.SchedulerLogs, context),
|
|
834
|
+
}),
|
|
835
|
+
...(input.TaskLogs != null && {
|
|
836
|
+
TaskLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.TaskLogs, context),
|
|
837
|
+
}),
|
|
838
|
+
...(input.WebserverLogs != null && {
|
|
839
|
+
WebserverLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.WebserverLogs, context),
|
|
840
|
+
}),
|
|
841
|
+
...(input.WorkerLogs != null && {
|
|
842
|
+
WorkerLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.WorkerLogs, context),
|
|
843
|
+
}),
|
|
844
|
+
};
|
|
845
|
+
};
|
|
846
|
+
const serializeAws_restJson1MetricData = (input, context) => {
|
|
1147
847
|
return input
|
|
1148
|
-
.filter(
|
|
1149
|
-
.map(
|
|
848
|
+
.filter((e) => e != null)
|
|
849
|
+
.map((entry) => {
|
|
1150
850
|
return serializeAws_restJson1MetricDatum(entry, context);
|
|
1151
851
|
});
|
|
1152
852
|
};
|
|
1153
|
-
|
|
1154
|
-
return
|
|
1155
|
-
|
|
1156
|
-
|
|
853
|
+
const serializeAws_restJson1MetricDatum = (input, context) => {
|
|
854
|
+
return {
|
|
855
|
+
...(input.Dimensions != null && { Dimensions: serializeAws_restJson1Dimensions(input.Dimensions, context) }),
|
|
856
|
+
...(input.MetricName != null && { MetricName: input.MetricName }),
|
|
857
|
+
...(input.StatisticValues != null && {
|
|
858
|
+
StatisticValues: serializeAws_restJson1StatisticSet(input.StatisticValues, context),
|
|
859
|
+
}),
|
|
860
|
+
...(input.Timestamp != null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
|
|
861
|
+
...(input.Unit != null && { Unit: input.Unit }),
|
|
862
|
+
...(input.Value != null && { Value: __serializeFloat(input.Value) }),
|
|
863
|
+
};
|
|
1157
864
|
};
|
|
1158
|
-
|
|
1159
|
-
return
|
|
865
|
+
const serializeAws_restJson1ModuleLoggingConfigurationInput = (input, context) => {
|
|
866
|
+
return {
|
|
867
|
+
...(input.Enabled != null && { Enabled: input.Enabled }),
|
|
868
|
+
...(input.LogLevel != null && { LogLevel: input.LogLevel }),
|
|
869
|
+
};
|
|
1160
870
|
};
|
|
1161
|
-
|
|
1162
|
-
return
|
|
1163
|
-
|
|
1164
|
-
|
|
871
|
+
const serializeAws_restJson1NetworkConfiguration = (input, context) => {
|
|
872
|
+
return {
|
|
873
|
+
...(input.SecurityGroupIds != null && {
|
|
874
|
+
SecurityGroupIds: serializeAws_restJson1SecurityGroupList(input.SecurityGroupIds, context),
|
|
875
|
+
}),
|
|
876
|
+
...(input.SubnetIds != null && { SubnetIds: serializeAws_restJson1SubnetList(input.SubnetIds, context) }),
|
|
877
|
+
};
|
|
1165
878
|
};
|
|
1166
|
-
|
|
879
|
+
const serializeAws_restJson1SecurityGroupList = (input, context) => {
|
|
1167
880
|
return input
|
|
1168
|
-
.filter(
|
|
1169
|
-
.map(
|
|
881
|
+
.filter((e) => e != null)
|
|
882
|
+
.map((entry) => {
|
|
1170
883
|
return entry;
|
|
1171
884
|
});
|
|
1172
885
|
};
|
|
1173
|
-
|
|
1174
|
-
return
|
|
886
|
+
const serializeAws_restJson1StatisticSet = (input, context) => {
|
|
887
|
+
return {
|
|
888
|
+
...(input.Maximum != null && { Maximum: __serializeFloat(input.Maximum) }),
|
|
889
|
+
...(input.Minimum != null && { Minimum: __serializeFloat(input.Minimum) }),
|
|
890
|
+
...(input.SampleCount != null && { SampleCount: input.SampleCount }),
|
|
891
|
+
...(input.Sum != null && { Sum: __serializeFloat(input.Sum) }),
|
|
892
|
+
};
|
|
1175
893
|
};
|
|
1176
|
-
|
|
894
|
+
const serializeAws_restJson1SubnetList = (input, context) => {
|
|
1177
895
|
return input
|
|
1178
|
-
.filter(
|
|
1179
|
-
.map(
|
|
896
|
+
.filter((e) => e != null)
|
|
897
|
+
.map((entry) => {
|
|
1180
898
|
return entry;
|
|
1181
899
|
});
|
|
1182
900
|
};
|
|
1183
|
-
|
|
1184
|
-
return Object.entries(input).reduce(
|
|
1185
|
-
var _b;
|
|
1186
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
901
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
902
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1187
903
|
if (value === null) {
|
|
1188
904
|
return acc;
|
|
1189
905
|
}
|
|
1190
|
-
return
|
|
906
|
+
return {
|
|
907
|
+
...acc,
|
|
908
|
+
[key]: value,
|
|
909
|
+
};
|
|
1191
910
|
}, {});
|
|
1192
911
|
};
|
|
1193
|
-
|
|
1194
|
-
return
|
|
1195
|
-
|
|
1196
|
-
|
|
912
|
+
const serializeAws_restJson1UpdateNetworkConfigurationInput = (input, context) => {
|
|
913
|
+
return {
|
|
914
|
+
...(input.SecurityGroupIds != null && {
|
|
915
|
+
SecurityGroupIds: serializeAws_restJson1SecurityGroupList(input.SecurityGroupIds, context),
|
|
916
|
+
}),
|
|
917
|
+
};
|
|
1197
918
|
};
|
|
1198
|
-
|
|
1199
|
-
return Object.entries(output).reduce(
|
|
1200
|
-
var _b;
|
|
1201
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
919
|
+
const deserializeAws_restJson1AirflowConfigurationOptions = (output, context) => {
|
|
920
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1202
921
|
if (value === null) {
|
|
1203
922
|
return acc;
|
|
1204
923
|
}
|
|
1205
|
-
return
|
|
924
|
+
return {
|
|
925
|
+
...acc,
|
|
926
|
+
[key]: __expectString(value),
|
|
927
|
+
};
|
|
1206
928
|
}, {});
|
|
1207
929
|
};
|
|
1208
|
-
|
|
930
|
+
const deserializeAws_restJson1Environment = (output, context) => {
|
|
1209
931
|
return {
|
|
1210
932
|
AirflowConfigurationOptions: output.AirflowConfigurationOptions != null
|
|
1211
933
|
? deserializeAws_restJson1AirflowConfigurationOptions(output.AirflowConfigurationOptions, context)
|
|
@@ -1241,10 +963,10 @@ var deserializeAws_restJson1Environment = function (output, context) {
|
|
|
1241
963
|
WeeklyMaintenanceWindowStart: __expectString(output.WeeklyMaintenanceWindowStart),
|
|
1242
964
|
};
|
|
1243
965
|
};
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
.filter(
|
|
1247
|
-
.map(
|
|
966
|
+
const deserializeAws_restJson1EnvironmentList = (output, context) => {
|
|
967
|
+
const retVal = (output || [])
|
|
968
|
+
.filter((e) => e != null)
|
|
969
|
+
.map((entry) => {
|
|
1248
970
|
if (entry === null) {
|
|
1249
971
|
return null;
|
|
1250
972
|
}
|
|
@@ -1252,7 +974,7 @@ var deserializeAws_restJson1EnvironmentList = function (output, context) {
|
|
|
1252
974
|
});
|
|
1253
975
|
return retVal;
|
|
1254
976
|
};
|
|
1255
|
-
|
|
977
|
+
const deserializeAws_restJson1LastUpdate = (output, context) => {
|
|
1256
978
|
return {
|
|
1257
979
|
CreatedAt: output.CreatedAt != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt))) : undefined,
|
|
1258
980
|
Error: output.Error != null ? deserializeAws_restJson1UpdateError(output.Error, context) : undefined,
|
|
@@ -1260,7 +982,7 @@ var deserializeAws_restJson1LastUpdate = function (output, context) {
|
|
|
1260
982
|
Status: __expectString(output.Status),
|
|
1261
983
|
};
|
|
1262
984
|
};
|
|
1263
|
-
|
|
985
|
+
const deserializeAws_restJson1LoggingConfiguration = (output, context) => {
|
|
1264
986
|
return {
|
|
1265
987
|
DagProcessingLogs: output.DagProcessingLogs != null
|
|
1266
988
|
? deserializeAws_restJson1ModuleLoggingConfiguration(output.DagProcessingLogs, context)
|
|
@@ -1279,14 +1001,14 @@ var deserializeAws_restJson1LoggingConfiguration = function (output, context) {
|
|
|
1279
1001
|
: undefined,
|
|
1280
1002
|
};
|
|
1281
1003
|
};
|
|
1282
|
-
|
|
1004
|
+
const deserializeAws_restJson1ModuleLoggingConfiguration = (output, context) => {
|
|
1283
1005
|
return {
|
|
1284
1006
|
CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn),
|
|
1285
1007
|
Enabled: __expectBoolean(output.Enabled),
|
|
1286
1008
|
LogLevel: __expectString(output.LogLevel),
|
|
1287
1009
|
};
|
|
1288
1010
|
};
|
|
1289
|
-
|
|
1011
|
+
const deserializeAws_restJson1NetworkConfiguration = (output, context) => {
|
|
1290
1012
|
return {
|
|
1291
1013
|
SecurityGroupIds: output.SecurityGroupIds != null
|
|
1292
1014
|
? deserializeAws_restJson1SecurityGroupList(output.SecurityGroupIds, context)
|
|
@@ -1294,10 +1016,10 @@ var deserializeAws_restJson1NetworkConfiguration = function (output, context) {
|
|
|
1294
1016
|
SubnetIds: output.SubnetIds != null ? deserializeAws_restJson1SubnetList(output.SubnetIds, context) : undefined,
|
|
1295
1017
|
};
|
|
1296
1018
|
};
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
.filter(
|
|
1300
|
-
.map(
|
|
1019
|
+
const deserializeAws_restJson1SecurityGroupList = (output, context) => {
|
|
1020
|
+
const retVal = (output || [])
|
|
1021
|
+
.filter((e) => e != null)
|
|
1022
|
+
.map((entry) => {
|
|
1301
1023
|
if (entry === null) {
|
|
1302
1024
|
return null;
|
|
1303
1025
|
}
|
|
@@ -1305,10 +1027,10 @@ var deserializeAws_restJson1SecurityGroupList = function (output, context) {
|
|
|
1305
1027
|
});
|
|
1306
1028
|
return retVal;
|
|
1307
1029
|
};
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
.filter(
|
|
1311
|
-
.map(
|
|
1030
|
+
const deserializeAws_restJson1SubnetList = (output, context) => {
|
|
1031
|
+
const retVal = (output || [])
|
|
1032
|
+
.filter((e) => e != null)
|
|
1033
|
+
.map((entry) => {
|
|
1312
1034
|
if (entry === null) {
|
|
1313
1035
|
return null;
|
|
1314
1036
|
}
|
|
@@ -1316,73 +1038,56 @@ var deserializeAws_restJson1SubnetList = function (output, context) {
|
|
|
1316
1038
|
});
|
|
1317
1039
|
return retVal;
|
|
1318
1040
|
};
|
|
1319
|
-
|
|
1320
|
-
return Object.entries(output).reduce(
|
|
1321
|
-
var _b;
|
|
1322
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1041
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1042
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1323
1043
|
if (value === null) {
|
|
1324
1044
|
return acc;
|
|
1325
1045
|
}
|
|
1326
|
-
return
|
|
1046
|
+
return {
|
|
1047
|
+
...acc,
|
|
1048
|
+
[key]: __expectString(value),
|
|
1049
|
+
};
|
|
1327
1050
|
}, {});
|
|
1328
1051
|
};
|
|
1329
|
-
|
|
1052
|
+
const deserializeAws_restJson1UpdateError = (output, context) => {
|
|
1330
1053
|
return {
|
|
1331
1054
|
ErrorCode: __expectString(output.ErrorCode),
|
|
1332
1055
|
ErrorMessage: __expectString(output.ErrorMessage),
|
|
1333
1056
|
};
|
|
1334
1057
|
};
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
});
|
|
1343
|
-
};
|
|
1344
|
-
var collectBody = function (streamBody, context) {
|
|
1345
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1058
|
+
const deserializeMetadata = (output) => ({
|
|
1059
|
+
httpStatusCode: output.statusCode,
|
|
1060
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1061
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1062
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1063
|
+
});
|
|
1064
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1346
1065
|
if (streamBody instanceof Uint8Array) {
|
|
1347
1066
|
return Promise.resolve(streamBody);
|
|
1348
1067
|
}
|
|
1349
1068
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1350
1069
|
};
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
});
|
|
1070
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1071
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1072
|
+
value !== null &&
|
|
1073
|
+
value !== "" &&
|
|
1074
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1075
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1076
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1077
|
+
if (encoded.length) {
|
|
1078
|
+
return JSON.parse(encoded);
|
|
1079
|
+
}
|
|
1080
|
+
return {};
|
|
1081
|
+
});
|
|
1082
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1083
|
+
const value = await parseBody(errorBody, context);
|
|
1084
|
+
value.message = value.message ?? value.Message;
|
|
1085
|
+
return value;
|
|
1368
1086
|
};
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
switch (_b.label) {
|
|
1374
|
-
case 0: return [4, parseBody(errorBody, context)];
|
|
1375
|
-
case 1:
|
|
1376
|
-
value = _b.sent();
|
|
1377
|
-
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1378
|
-
return [2, value];
|
|
1379
|
-
}
|
|
1380
|
-
});
|
|
1381
|
-
}); };
|
|
1382
|
-
var loadRestJsonErrorCode = function (output, data) {
|
|
1383
|
-
var findKey = function (object, key) { return Object.keys(object).find(function (k) { return k.toLowerCase() === key.toLowerCase(); }); };
|
|
1384
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1385
|
-
var cleanValue = rawValue;
|
|
1087
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1088
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1089
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1090
|
+
let cleanValue = rawValue;
|
|
1386
1091
|
if (typeof cleanValue === "number") {
|
|
1387
1092
|
cleanValue = cleanValue.toString();
|
|
1388
1093
|
}
|
|
@@ -1397,7 +1102,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1397
1102
|
}
|
|
1398
1103
|
return cleanValue;
|
|
1399
1104
|
};
|
|
1400
|
-
|
|
1105
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1401
1106
|
if (headerKey !== undefined) {
|
|
1402
1107
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1403
1108
|
}
|