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