@aws-sdk/client-mwaa 3.35.0 → 3.36.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 +13 -0
- package/dist-cjs/MWAA.js +0 -1
- package/dist-cjs/MWAAClient.js +0 -1
- package/dist-cjs/commands/CreateCliTokenCommand.js +0 -1
- package/dist-cjs/commands/CreateEnvironmentCommand.js +0 -1
- package/dist-cjs/commands/CreateWebLoginTokenCommand.js +0 -1
- package/dist-cjs/commands/DeleteEnvironmentCommand.js +0 -1
- package/dist-cjs/commands/GetEnvironmentCommand.js +0 -1
- package/dist-cjs/commands/ListEnvironmentsCommand.js +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-cjs/commands/PublishMetricsCommand.js +0 -1
- package/dist-cjs/commands/TagResourceCommand.js +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js +0 -1
- package/dist-cjs/commands/UpdateEnvironmentCommand.js +0 -1
- package/dist-cjs/endpoints.js +0 -1
- package/dist-cjs/index.js +0 -1
- package/dist-cjs/models/index.js +0 -1
- package/dist-cjs/models/models_0.js +0 -1
- package/dist-cjs/pagination/Interfaces.js +0 -1
- package/dist-cjs/pagination/ListEnvironmentsPaginator.js +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js +0 -1
- package/dist-cjs/runtimeConfig.browser.js +2 -3
- package/dist-cjs/runtimeConfig.js +3 -4
- package/dist-cjs/runtimeConfig.native.js +0 -1
- package/dist-cjs/runtimeConfig.shared.js +0 -1
- package/dist-es/MWAA.js +0 -1
- package/dist-es/MWAAClient.js +0 -1
- package/dist-es/commands/CreateCliTokenCommand.js +0 -1
- package/dist-es/commands/CreateEnvironmentCommand.js +0 -1
- package/dist-es/commands/CreateWebLoginTokenCommand.js +0 -1
- package/dist-es/commands/DeleteEnvironmentCommand.js +0 -1
- package/dist-es/commands/GetEnvironmentCommand.js +0 -1
- package/dist-es/commands/ListEnvironmentsCommand.js +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js +0 -1
- package/dist-es/commands/PublishMetricsCommand.js +0 -1
- package/dist-es/commands/TagResourceCommand.js +0 -1
- package/dist-es/commands/UntagResourceCommand.js +0 -1
- package/dist-es/commands/UpdateEnvironmentCommand.js +0 -1
- package/dist-es/endpoints.js +0 -1
- package/dist-es/index.js +0 -1
- package/dist-es/models/index.js +0 -1
- package/dist-es/models/models_0.js +0 -1
- package/dist-es/pagination/Interfaces.js +0 -1
- package/dist-es/pagination/ListEnvironmentsPaginator.js +0 -1
- package/dist-es/protocols/Aws_restJson1.js +0 -1
- package/dist-es/runtimeConfig.browser.js +1 -2
- package/dist-es/runtimeConfig.js +2 -3
- package/dist-es/runtimeConfig.native.js +0 -1
- package/dist-es/runtimeConfig.shared.js +0 -1
- package/package.json +33 -30
- package/dist-cjs/MWAA.js.map +0 -1
- package/dist-cjs/MWAAClient.js.map +0 -1
- package/dist-cjs/commands/CreateCliTokenCommand.js.map +0 -1
- package/dist-cjs/commands/CreateEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/CreateWebLoginTokenCommand.js.map +0 -1
- package/dist-cjs/commands/DeleteEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/GetEnvironmentCommand.js.map +0 -1
- package/dist-cjs/commands/ListEnvironmentsCommand.js.map +0 -1
- package/dist-cjs/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-cjs/commands/PublishMetricsCommand.js.map +0 -1
- package/dist-cjs/commands/TagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UntagResourceCommand.js.map +0 -1
- package/dist-cjs/commands/UpdateEnvironmentCommand.js.map +0 -1
- package/dist-cjs/endpoints.js.map +0 -1
- package/dist-cjs/index.js.map +0 -1
- package/dist-cjs/models/index.js.map +0 -1
- package/dist-cjs/models/models_0.js.map +0 -1
- package/dist-cjs/pagination/Interfaces.js.map +0 -1
- package/dist-cjs/pagination/ListEnvironmentsPaginator.js.map +0 -1
- package/dist-cjs/protocols/Aws_restJson1.js.map +0 -1
- package/dist-cjs/runtimeConfig.browser.js.map +0 -1
- package/dist-cjs/runtimeConfig.js.map +0 -1
- package/dist-cjs/runtimeConfig.native.js.map +0 -1
- package/dist-cjs/runtimeConfig.shared.js.map +0 -1
- package/dist-es/MWAA.js.map +0 -1
- package/dist-es/MWAAClient.js.map +0 -1
- package/dist-es/commands/CreateCliTokenCommand.js.map +0 -1
- package/dist-es/commands/CreateEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/CreateWebLoginTokenCommand.js.map +0 -1
- package/dist-es/commands/DeleteEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/GetEnvironmentCommand.js.map +0 -1
- package/dist-es/commands/ListEnvironmentsCommand.js.map +0 -1
- package/dist-es/commands/ListTagsForResourceCommand.js.map +0 -1
- package/dist-es/commands/PublishMetricsCommand.js.map +0 -1
- package/dist-es/commands/TagResourceCommand.js.map +0 -1
- package/dist-es/commands/UntagResourceCommand.js.map +0 -1
- package/dist-es/commands/UpdateEnvironmentCommand.js.map +0 -1
- package/dist-es/endpoints.js.map +0 -1
- package/dist-es/index.js.map +0 -1
- package/dist-es/models/index.js.map +0 -1
- package/dist-es/models/models_0.js.map +0 -1
- package/dist-es/pagination/Interfaces.js.map +0 -1
- package/dist-es/pagination/ListEnvironmentsPaginator.js.map +0 -1
- package/dist-es/protocols/Aws_restJson1.js.map +0 -1
- package/dist-es/runtimeConfig.browser.js.map +0 -1
- package/dist-es/runtimeConfig.js.map +0 -1
- package/dist-es/runtimeConfig.native.js.map +0 -1
- package/dist-es/runtimeConfig.shared.js.map +0 -1
- package/jest.config.js +0 -4
- package/src/MWAA.ts +0 -406
- package/src/MWAAClient.ts +0 -276
- package/src/commands/CreateCliTokenCommand.ts +0 -95
- package/src/commands/CreateEnvironmentCommand.ts +0 -95
- package/src/commands/CreateWebLoginTokenCommand.ts +0 -95
- package/src/commands/DeleteEnvironmentCommand.ts +0 -95
- package/src/commands/GetEnvironmentCommand.ts +0 -95
- package/src/commands/ListEnvironmentsCommand.ts +0 -95
- package/src/commands/ListTagsForResourceCommand.ts +0 -95
- package/src/commands/PublishMetricsCommand.ts +0 -95
- package/src/commands/TagResourceCommand.ts +0 -95
- package/src/commands/UntagResourceCommand.ts +0 -95
- package/src/commands/UpdateEnvironmentCommand.ts +0 -95
- package/src/endpoints.ts +0 -57
- package/src/index.ts +0 -16
- package/src/models/index.ts +0 -1
- package/src/models/models_0.ts +0 -1206
- package/src/pagination/Interfaces.ts +0 -8
- package/src/pagination/ListEnvironmentsPaginator.ts +0 -59
- package/src/protocols/Aws_restJson1.ts +0 -1772
- package/src/runtimeConfig.browser.ts +0 -41
- package/src/runtimeConfig.native.ts +0 -17
- package/src/runtimeConfig.shared.ts +0 -17
- package/src/runtimeConfig.ts +0 -46
- package/tsconfig.es.json +0 -10
- package/tsconfig.json +0 -33
- package/tsconfig.types.json +0 -9
|
@@ -1,1772 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HttpRequest as __HttpRequest,
|
|
3
|
-
HttpResponse as __HttpResponse,
|
|
4
|
-
isValidHostname as __isValidHostname,
|
|
5
|
-
} from "@aws-sdk/protocol-http";
|
|
6
|
-
import {
|
|
7
|
-
expectBoolean as __expectBoolean,
|
|
8
|
-
expectInt32 as __expectInt32,
|
|
9
|
-
expectNonNull as __expectNonNull,
|
|
10
|
-
expectNumber as __expectNumber,
|
|
11
|
-
expectObject as __expectObject,
|
|
12
|
-
expectString as __expectString,
|
|
13
|
-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
|
|
14
|
-
parseEpochTimestamp as __parseEpochTimestamp,
|
|
15
|
-
serializeFloat as __serializeFloat,
|
|
16
|
-
} from "@aws-sdk/smithy-client";
|
|
17
|
-
import {
|
|
18
|
-
Endpoint as __Endpoint,
|
|
19
|
-
MetadataBearer as __MetadataBearer,
|
|
20
|
-
ResponseMetadata as __ResponseMetadata,
|
|
21
|
-
SerdeContext as __SerdeContext,
|
|
22
|
-
SmithyException as __SmithyException,
|
|
23
|
-
} from "@aws-sdk/types";
|
|
24
|
-
|
|
25
|
-
import { CreateCliTokenCommandInput, CreateCliTokenCommandOutput } from "../commands/CreateCliTokenCommand";
|
|
26
|
-
import { CreateEnvironmentCommandInput, CreateEnvironmentCommandOutput } from "../commands/CreateEnvironmentCommand";
|
|
27
|
-
import {
|
|
28
|
-
CreateWebLoginTokenCommandInput,
|
|
29
|
-
CreateWebLoginTokenCommandOutput,
|
|
30
|
-
} from "../commands/CreateWebLoginTokenCommand";
|
|
31
|
-
import { DeleteEnvironmentCommandInput, DeleteEnvironmentCommandOutput } from "../commands/DeleteEnvironmentCommand";
|
|
32
|
-
import { GetEnvironmentCommandInput, GetEnvironmentCommandOutput } from "../commands/GetEnvironmentCommand";
|
|
33
|
-
import { ListEnvironmentsCommandInput, ListEnvironmentsCommandOutput } from "../commands/ListEnvironmentsCommand";
|
|
34
|
-
import {
|
|
35
|
-
ListTagsForResourceCommandInput,
|
|
36
|
-
ListTagsForResourceCommandOutput,
|
|
37
|
-
} from "../commands/ListTagsForResourceCommand";
|
|
38
|
-
import { PublishMetricsCommandInput, PublishMetricsCommandOutput } from "../commands/PublishMetricsCommand";
|
|
39
|
-
import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand";
|
|
40
|
-
import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand";
|
|
41
|
-
import { UpdateEnvironmentCommandInput, UpdateEnvironmentCommandOutput } from "../commands/UpdateEnvironmentCommand";
|
|
42
|
-
import {
|
|
43
|
-
AccessDeniedException,
|
|
44
|
-
Dimension,
|
|
45
|
-
Environment,
|
|
46
|
-
InternalServerException,
|
|
47
|
-
LastUpdate,
|
|
48
|
-
LoggingConfiguration,
|
|
49
|
-
LoggingConfigurationInput,
|
|
50
|
-
MetricDatum,
|
|
51
|
-
ModuleLoggingConfiguration,
|
|
52
|
-
ModuleLoggingConfigurationInput,
|
|
53
|
-
NetworkConfiguration,
|
|
54
|
-
ResourceNotFoundException,
|
|
55
|
-
StatisticSet,
|
|
56
|
-
UpdateError,
|
|
57
|
-
UpdateNetworkConfigurationInput,
|
|
58
|
-
ValidationException,
|
|
59
|
-
} from "../models/models_0";
|
|
60
|
-
|
|
61
|
-
export const serializeAws_restJson1CreateCliTokenCommand = async (
|
|
62
|
-
input: CreateCliTokenCommandInput,
|
|
63
|
-
context: __SerdeContext
|
|
64
|
-
): Promise<__HttpRequest> => {
|
|
65
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
66
|
-
const headers: any = {};
|
|
67
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/clitoken/{Name}";
|
|
68
|
-
if (input.Name !== undefined) {
|
|
69
|
-
const labelValue: string = input.Name;
|
|
70
|
-
if (labelValue.length <= 0) {
|
|
71
|
-
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
72
|
-
}
|
|
73
|
-
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
74
|
-
} else {
|
|
75
|
-
throw new Error("No value provided for input HTTP label: Name.");
|
|
76
|
-
}
|
|
77
|
-
let body: any;
|
|
78
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
79
|
-
if (context.disableHostPrefix !== true) {
|
|
80
|
-
resolvedHostname = "env." + resolvedHostname;
|
|
81
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
82
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return new __HttpRequest({
|
|
86
|
-
protocol,
|
|
87
|
-
hostname: resolvedHostname,
|
|
88
|
-
port,
|
|
89
|
-
method: "POST",
|
|
90
|
-
headers,
|
|
91
|
-
path: resolvedPath,
|
|
92
|
-
body,
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export const serializeAws_restJson1CreateEnvironmentCommand = async (
|
|
97
|
-
input: CreateEnvironmentCommandInput,
|
|
98
|
-
context: __SerdeContext
|
|
99
|
-
): Promise<__HttpRequest> => {
|
|
100
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
101
|
-
const headers: any = {
|
|
102
|
-
"content-type": "application/json",
|
|
103
|
-
};
|
|
104
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
105
|
-
if (input.Name !== undefined) {
|
|
106
|
-
const labelValue: string = input.Name;
|
|
107
|
-
if (labelValue.length <= 0) {
|
|
108
|
-
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
109
|
-
}
|
|
110
|
-
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
111
|
-
} else {
|
|
112
|
-
throw new Error("No value provided for input HTTP label: Name.");
|
|
113
|
-
}
|
|
114
|
-
let body: any;
|
|
115
|
-
body = JSON.stringify({
|
|
116
|
-
...(input.AirflowConfigurationOptions !== undefined &&
|
|
117
|
-
input.AirflowConfigurationOptions !== null && {
|
|
118
|
-
AirflowConfigurationOptions: serializeAws_restJson1AirflowConfigurationOptions(
|
|
119
|
-
input.AirflowConfigurationOptions,
|
|
120
|
-
context
|
|
121
|
-
),
|
|
122
|
-
}),
|
|
123
|
-
...(input.AirflowVersion !== undefined &&
|
|
124
|
-
input.AirflowVersion !== null && { AirflowVersion: input.AirflowVersion }),
|
|
125
|
-
...(input.DagS3Path !== undefined && input.DagS3Path !== null && { DagS3Path: input.DagS3Path }),
|
|
126
|
-
...(input.EnvironmentClass !== undefined &&
|
|
127
|
-
input.EnvironmentClass !== null && { EnvironmentClass: input.EnvironmentClass }),
|
|
128
|
-
...(input.ExecutionRoleArn !== undefined &&
|
|
129
|
-
input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
130
|
-
...(input.KmsKey !== undefined && input.KmsKey !== null && { KmsKey: input.KmsKey }),
|
|
131
|
-
...(input.LoggingConfiguration !== undefined &&
|
|
132
|
-
input.LoggingConfiguration !== null && {
|
|
133
|
-
LoggingConfiguration: serializeAws_restJson1LoggingConfigurationInput(input.LoggingConfiguration, context),
|
|
134
|
-
}),
|
|
135
|
-
...(input.MaxWorkers !== undefined && input.MaxWorkers !== null && { MaxWorkers: input.MaxWorkers }),
|
|
136
|
-
...(input.MinWorkers !== undefined && input.MinWorkers !== null && { MinWorkers: input.MinWorkers }),
|
|
137
|
-
...(input.NetworkConfiguration !== undefined &&
|
|
138
|
-
input.NetworkConfiguration !== null && {
|
|
139
|
-
NetworkConfiguration: serializeAws_restJson1NetworkConfiguration(input.NetworkConfiguration, context),
|
|
140
|
-
}),
|
|
141
|
-
...(input.PluginsS3ObjectVersion !== undefined &&
|
|
142
|
-
input.PluginsS3ObjectVersion !== null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion }),
|
|
143
|
-
...(input.PluginsS3Path !== undefined && input.PluginsS3Path !== null && { PluginsS3Path: input.PluginsS3Path }),
|
|
144
|
-
...(input.RequirementsS3ObjectVersion !== undefined &&
|
|
145
|
-
input.RequirementsS3ObjectVersion !== null && { RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion }),
|
|
146
|
-
...(input.RequirementsS3Path !== undefined &&
|
|
147
|
-
input.RequirementsS3Path !== null && { RequirementsS3Path: input.RequirementsS3Path }),
|
|
148
|
-
...(input.Schedulers !== undefined && input.Schedulers !== null && { Schedulers: input.Schedulers }),
|
|
149
|
-
...(input.SourceBucketArn !== undefined &&
|
|
150
|
-
input.SourceBucketArn !== null && { SourceBucketArn: input.SourceBucketArn }),
|
|
151
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
152
|
-
...(input.WebserverAccessMode !== undefined &&
|
|
153
|
-
input.WebserverAccessMode !== null && { WebserverAccessMode: input.WebserverAccessMode }),
|
|
154
|
-
...(input.WeeklyMaintenanceWindowStart !== undefined &&
|
|
155
|
-
input.WeeklyMaintenanceWindowStart !== null && {
|
|
156
|
-
WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart,
|
|
157
|
-
}),
|
|
158
|
-
});
|
|
159
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
160
|
-
if (context.disableHostPrefix !== true) {
|
|
161
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
162
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
163
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return new __HttpRequest({
|
|
167
|
-
protocol,
|
|
168
|
-
hostname: resolvedHostname,
|
|
169
|
-
port,
|
|
170
|
-
method: "PUT",
|
|
171
|
-
headers,
|
|
172
|
-
path: resolvedPath,
|
|
173
|
-
body,
|
|
174
|
-
});
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
export const serializeAws_restJson1CreateWebLoginTokenCommand = async (
|
|
178
|
-
input: CreateWebLoginTokenCommandInput,
|
|
179
|
-
context: __SerdeContext
|
|
180
|
-
): Promise<__HttpRequest> => {
|
|
181
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
182
|
-
const headers: any = {};
|
|
183
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/webtoken/{Name}";
|
|
184
|
-
if (input.Name !== undefined) {
|
|
185
|
-
const labelValue: string = input.Name;
|
|
186
|
-
if (labelValue.length <= 0) {
|
|
187
|
-
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
188
|
-
}
|
|
189
|
-
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
190
|
-
} else {
|
|
191
|
-
throw new Error("No value provided for input HTTP label: Name.");
|
|
192
|
-
}
|
|
193
|
-
let body: any;
|
|
194
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
195
|
-
if (context.disableHostPrefix !== true) {
|
|
196
|
-
resolvedHostname = "env." + resolvedHostname;
|
|
197
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
198
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return new __HttpRequest({
|
|
202
|
-
protocol,
|
|
203
|
-
hostname: resolvedHostname,
|
|
204
|
-
port,
|
|
205
|
-
method: "POST",
|
|
206
|
-
headers,
|
|
207
|
-
path: resolvedPath,
|
|
208
|
-
body,
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
|
|
212
|
-
export const serializeAws_restJson1DeleteEnvironmentCommand = async (
|
|
213
|
-
input: DeleteEnvironmentCommandInput,
|
|
214
|
-
context: __SerdeContext
|
|
215
|
-
): Promise<__HttpRequest> => {
|
|
216
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
217
|
-
const headers: any = {};
|
|
218
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
219
|
-
if (input.Name !== undefined) {
|
|
220
|
-
const labelValue: string = input.Name;
|
|
221
|
-
if (labelValue.length <= 0) {
|
|
222
|
-
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
223
|
-
}
|
|
224
|
-
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
225
|
-
} else {
|
|
226
|
-
throw new Error("No value provided for input HTTP label: Name.");
|
|
227
|
-
}
|
|
228
|
-
let body: any;
|
|
229
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
230
|
-
if (context.disableHostPrefix !== true) {
|
|
231
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
232
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
233
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
return new __HttpRequest({
|
|
237
|
-
protocol,
|
|
238
|
-
hostname: resolvedHostname,
|
|
239
|
-
port,
|
|
240
|
-
method: "DELETE",
|
|
241
|
-
headers,
|
|
242
|
-
path: resolvedPath,
|
|
243
|
-
body,
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
export const serializeAws_restJson1GetEnvironmentCommand = async (
|
|
248
|
-
input: GetEnvironmentCommandInput,
|
|
249
|
-
context: __SerdeContext
|
|
250
|
-
): Promise<__HttpRequest> => {
|
|
251
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
252
|
-
const headers: any = {};
|
|
253
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
254
|
-
if (input.Name !== undefined) {
|
|
255
|
-
const labelValue: string = input.Name;
|
|
256
|
-
if (labelValue.length <= 0) {
|
|
257
|
-
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
258
|
-
}
|
|
259
|
-
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
260
|
-
} else {
|
|
261
|
-
throw new Error("No value provided for input HTTP label: Name.");
|
|
262
|
-
}
|
|
263
|
-
let body: any;
|
|
264
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
265
|
-
if (context.disableHostPrefix !== true) {
|
|
266
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
267
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
268
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
return new __HttpRequest({
|
|
272
|
-
protocol,
|
|
273
|
-
hostname: resolvedHostname,
|
|
274
|
-
port,
|
|
275
|
-
method: "GET",
|
|
276
|
-
headers,
|
|
277
|
-
path: resolvedPath,
|
|
278
|
-
body,
|
|
279
|
-
});
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
export const serializeAws_restJson1ListEnvironmentsCommand = async (
|
|
283
|
-
input: ListEnvironmentsCommandInput,
|
|
284
|
-
context: __SerdeContext
|
|
285
|
-
): Promise<__HttpRequest> => {
|
|
286
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
287
|
-
const headers: any = {};
|
|
288
|
-
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments";
|
|
289
|
-
const query: any = {
|
|
290
|
-
...(input.NextToken !== undefined && { NextToken: input.NextToken }),
|
|
291
|
-
...(input.MaxResults !== undefined && { MaxResults: input.MaxResults.toString() }),
|
|
292
|
-
};
|
|
293
|
-
let body: any;
|
|
294
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
295
|
-
if (context.disableHostPrefix !== true) {
|
|
296
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
297
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
298
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
return new __HttpRequest({
|
|
302
|
-
protocol,
|
|
303
|
-
hostname: resolvedHostname,
|
|
304
|
-
port,
|
|
305
|
-
method: "GET",
|
|
306
|
-
headers,
|
|
307
|
-
path: resolvedPath,
|
|
308
|
-
query,
|
|
309
|
-
body,
|
|
310
|
-
});
|
|
311
|
-
};
|
|
312
|
-
|
|
313
|
-
export const serializeAws_restJson1ListTagsForResourceCommand = async (
|
|
314
|
-
input: ListTagsForResourceCommandInput,
|
|
315
|
-
context: __SerdeContext
|
|
316
|
-
): Promise<__HttpRequest> => {
|
|
317
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
318
|
-
const headers: any = {};
|
|
319
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
320
|
-
if (input.ResourceArn !== undefined) {
|
|
321
|
-
const labelValue: string = input.ResourceArn;
|
|
322
|
-
if (labelValue.length <= 0) {
|
|
323
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
324
|
-
}
|
|
325
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
326
|
-
} else {
|
|
327
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
328
|
-
}
|
|
329
|
-
let body: any;
|
|
330
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
331
|
-
if (context.disableHostPrefix !== true) {
|
|
332
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
333
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
334
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return new __HttpRequest({
|
|
338
|
-
protocol,
|
|
339
|
-
hostname: resolvedHostname,
|
|
340
|
-
port,
|
|
341
|
-
method: "GET",
|
|
342
|
-
headers,
|
|
343
|
-
path: resolvedPath,
|
|
344
|
-
body,
|
|
345
|
-
});
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
export const serializeAws_restJson1PublishMetricsCommand = async (
|
|
349
|
-
input: PublishMetricsCommandInput,
|
|
350
|
-
context: __SerdeContext
|
|
351
|
-
): Promise<__HttpRequest> => {
|
|
352
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
353
|
-
const headers: any = {
|
|
354
|
-
"content-type": "application/json",
|
|
355
|
-
};
|
|
356
|
-
let resolvedPath =
|
|
357
|
-
`${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/metrics/environments/{EnvironmentName}";
|
|
358
|
-
if (input.EnvironmentName !== undefined) {
|
|
359
|
-
const labelValue: string = input.EnvironmentName;
|
|
360
|
-
if (labelValue.length <= 0) {
|
|
361
|
-
throw new Error("Empty value provided for input HTTP label: EnvironmentName.");
|
|
362
|
-
}
|
|
363
|
-
resolvedPath = resolvedPath.replace("{EnvironmentName}", __extendedEncodeURIComponent(labelValue));
|
|
364
|
-
} else {
|
|
365
|
-
throw new Error("No value provided for input HTTP label: EnvironmentName.");
|
|
366
|
-
}
|
|
367
|
-
let body: any;
|
|
368
|
-
body = JSON.stringify({
|
|
369
|
-
...(input.MetricData !== undefined &&
|
|
370
|
-
input.MetricData !== null && { MetricData: serializeAws_restJson1MetricData(input.MetricData, context) }),
|
|
371
|
-
});
|
|
372
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
373
|
-
if (context.disableHostPrefix !== true) {
|
|
374
|
-
resolvedHostname = "ops." + resolvedHostname;
|
|
375
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
376
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
return new __HttpRequest({
|
|
380
|
-
protocol,
|
|
381
|
-
hostname: resolvedHostname,
|
|
382
|
-
port,
|
|
383
|
-
method: "POST",
|
|
384
|
-
headers,
|
|
385
|
-
path: resolvedPath,
|
|
386
|
-
body,
|
|
387
|
-
});
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
export const serializeAws_restJson1TagResourceCommand = async (
|
|
391
|
-
input: TagResourceCommandInput,
|
|
392
|
-
context: __SerdeContext
|
|
393
|
-
): Promise<__HttpRequest> => {
|
|
394
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
395
|
-
const headers: any = {
|
|
396
|
-
"content-type": "application/json",
|
|
397
|
-
};
|
|
398
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
399
|
-
if (input.ResourceArn !== undefined) {
|
|
400
|
-
const labelValue: string = input.ResourceArn;
|
|
401
|
-
if (labelValue.length <= 0) {
|
|
402
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
403
|
-
}
|
|
404
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
405
|
-
} else {
|
|
406
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
407
|
-
}
|
|
408
|
-
let body: any;
|
|
409
|
-
body = JSON.stringify({
|
|
410
|
-
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
411
|
-
});
|
|
412
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
413
|
-
if (context.disableHostPrefix !== true) {
|
|
414
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
415
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
416
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
return new __HttpRequest({
|
|
420
|
-
protocol,
|
|
421
|
-
hostname: resolvedHostname,
|
|
422
|
-
port,
|
|
423
|
-
method: "POST",
|
|
424
|
-
headers,
|
|
425
|
-
path: resolvedPath,
|
|
426
|
-
body,
|
|
427
|
-
});
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
export const serializeAws_restJson1UntagResourceCommand = async (
|
|
431
|
-
input: UntagResourceCommandInput,
|
|
432
|
-
context: __SerdeContext
|
|
433
|
-
): Promise<__HttpRequest> => {
|
|
434
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
435
|
-
const headers: any = {};
|
|
436
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{ResourceArn}";
|
|
437
|
-
if (input.ResourceArn !== undefined) {
|
|
438
|
-
const labelValue: string = input.ResourceArn;
|
|
439
|
-
if (labelValue.length <= 0) {
|
|
440
|
-
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
441
|
-
}
|
|
442
|
-
resolvedPath = resolvedPath.replace("{ResourceArn}", __extendedEncodeURIComponent(labelValue));
|
|
443
|
-
} else {
|
|
444
|
-
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
445
|
-
}
|
|
446
|
-
const query: any = {
|
|
447
|
-
...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry as any) }),
|
|
448
|
-
};
|
|
449
|
-
let body: any;
|
|
450
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
451
|
-
if (context.disableHostPrefix !== true) {
|
|
452
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
453
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
454
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
return new __HttpRequest({
|
|
458
|
-
protocol,
|
|
459
|
-
hostname: resolvedHostname,
|
|
460
|
-
port,
|
|
461
|
-
method: "DELETE",
|
|
462
|
-
headers,
|
|
463
|
-
path: resolvedPath,
|
|
464
|
-
query,
|
|
465
|
-
body,
|
|
466
|
-
});
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
export const serializeAws_restJson1UpdateEnvironmentCommand = async (
|
|
470
|
-
input: UpdateEnvironmentCommandInput,
|
|
471
|
-
context: __SerdeContext
|
|
472
|
-
): Promise<__HttpRequest> => {
|
|
473
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
474
|
-
const headers: any = {
|
|
475
|
-
"content-type": "application/json",
|
|
476
|
-
};
|
|
477
|
-
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/environments/{Name}";
|
|
478
|
-
if (input.Name !== undefined) {
|
|
479
|
-
const labelValue: string = input.Name;
|
|
480
|
-
if (labelValue.length <= 0) {
|
|
481
|
-
throw new Error("Empty value provided for input HTTP label: Name.");
|
|
482
|
-
}
|
|
483
|
-
resolvedPath = resolvedPath.replace("{Name}", __extendedEncodeURIComponent(labelValue));
|
|
484
|
-
} else {
|
|
485
|
-
throw new Error("No value provided for input HTTP label: Name.");
|
|
486
|
-
}
|
|
487
|
-
let body: any;
|
|
488
|
-
body = JSON.stringify({
|
|
489
|
-
...(input.AirflowConfigurationOptions !== undefined &&
|
|
490
|
-
input.AirflowConfigurationOptions !== null && {
|
|
491
|
-
AirflowConfigurationOptions: serializeAws_restJson1AirflowConfigurationOptions(
|
|
492
|
-
input.AirflowConfigurationOptions,
|
|
493
|
-
context
|
|
494
|
-
),
|
|
495
|
-
}),
|
|
496
|
-
...(input.AirflowVersion !== undefined &&
|
|
497
|
-
input.AirflowVersion !== null && { AirflowVersion: input.AirflowVersion }),
|
|
498
|
-
...(input.DagS3Path !== undefined && input.DagS3Path !== null && { DagS3Path: input.DagS3Path }),
|
|
499
|
-
...(input.EnvironmentClass !== undefined &&
|
|
500
|
-
input.EnvironmentClass !== null && { EnvironmentClass: input.EnvironmentClass }),
|
|
501
|
-
...(input.ExecutionRoleArn !== undefined &&
|
|
502
|
-
input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
503
|
-
...(input.LoggingConfiguration !== undefined &&
|
|
504
|
-
input.LoggingConfiguration !== null && {
|
|
505
|
-
LoggingConfiguration: serializeAws_restJson1LoggingConfigurationInput(input.LoggingConfiguration, context),
|
|
506
|
-
}),
|
|
507
|
-
...(input.MaxWorkers !== undefined && input.MaxWorkers !== null && { MaxWorkers: input.MaxWorkers }),
|
|
508
|
-
...(input.MinWorkers !== undefined && input.MinWorkers !== null && { MinWorkers: input.MinWorkers }),
|
|
509
|
-
...(input.NetworkConfiguration !== undefined &&
|
|
510
|
-
input.NetworkConfiguration !== null && {
|
|
511
|
-
NetworkConfiguration: serializeAws_restJson1UpdateNetworkConfigurationInput(
|
|
512
|
-
input.NetworkConfiguration,
|
|
513
|
-
context
|
|
514
|
-
),
|
|
515
|
-
}),
|
|
516
|
-
...(input.PluginsS3ObjectVersion !== undefined &&
|
|
517
|
-
input.PluginsS3ObjectVersion !== null && { PluginsS3ObjectVersion: input.PluginsS3ObjectVersion }),
|
|
518
|
-
...(input.PluginsS3Path !== undefined && input.PluginsS3Path !== null && { PluginsS3Path: input.PluginsS3Path }),
|
|
519
|
-
...(input.RequirementsS3ObjectVersion !== undefined &&
|
|
520
|
-
input.RequirementsS3ObjectVersion !== null && { RequirementsS3ObjectVersion: input.RequirementsS3ObjectVersion }),
|
|
521
|
-
...(input.RequirementsS3Path !== undefined &&
|
|
522
|
-
input.RequirementsS3Path !== null && { RequirementsS3Path: input.RequirementsS3Path }),
|
|
523
|
-
...(input.Schedulers !== undefined && input.Schedulers !== null && { Schedulers: input.Schedulers }),
|
|
524
|
-
...(input.SourceBucketArn !== undefined &&
|
|
525
|
-
input.SourceBucketArn !== null && { SourceBucketArn: input.SourceBucketArn }),
|
|
526
|
-
...(input.WebserverAccessMode !== undefined &&
|
|
527
|
-
input.WebserverAccessMode !== null && { WebserverAccessMode: input.WebserverAccessMode }),
|
|
528
|
-
...(input.WeeklyMaintenanceWindowStart !== undefined &&
|
|
529
|
-
input.WeeklyMaintenanceWindowStart !== null && {
|
|
530
|
-
WeeklyMaintenanceWindowStart: input.WeeklyMaintenanceWindowStart,
|
|
531
|
-
}),
|
|
532
|
-
});
|
|
533
|
-
let { hostname: resolvedHostname } = await context.endpoint();
|
|
534
|
-
if (context.disableHostPrefix !== true) {
|
|
535
|
-
resolvedHostname = "api." + resolvedHostname;
|
|
536
|
-
if (!__isValidHostname(resolvedHostname)) {
|
|
537
|
-
throw new Error("ValidationError: prefixed hostname must be hostname compatible.");
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
return new __HttpRequest({
|
|
541
|
-
protocol,
|
|
542
|
-
hostname: resolvedHostname,
|
|
543
|
-
port,
|
|
544
|
-
method: "PATCH",
|
|
545
|
-
headers,
|
|
546
|
-
path: resolvedPath,
|
|
547
|
-
body,
|
|
548
|
-
});
|
|
549
|
-
};
|
|
550
|
-
|
|
551
|
-
export const deserializeAws_restJson1CreateCliTokenCommand = async (
|
|
552
|
-
output: __HttpResponse,
|
|
553
|
-
context: __SerdeContext
|
|
554
|
-
): Promise<CreateCliTokenCommandOutput> => {
|
|
555
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
556
|
-
return deserializeAws_restJson1CreateCliTokenCommandError(output, context);
|
|
557
|
-
}
|
|
558
|
-
const contents: CreateCliTokenCommandOutput = {
|
|
559
|
-
$metadata: deserializeMetadata(output),
|
|
560
|
-
CliToken: undefined,
|
|
561
|
-
WebServerHostname: undefined,
|
|
562
|
-
};
|
|
563
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
564
|
-
if (data.CliToken !== undefined && data.CliToken !== null) {
|
|
565
|
-
contents.CliToken = __expectString(data.CliToken);
|
|
566
|
-
}
|
|
567
|
-
if (data.WebServerHostname !== undefined && data.WebServerHostname !== null) {
|
|
568
|
-
contents.WebServerHostname = __expectString(data.WebServerHostname);
|
|
569
|
-
}
|
|
570
|
-
return Promise.resolve(contents);
|
|
571
|
-
};
|
|
572
|
-
|
|
573
|
-
const deserializeAws_restJson1CreateCliTokenCommandError = async (
|
|
574
|
-
output: __HttpResponse,
|
|
575
|
-
context: __SerdeContext
|
|
576
|
-
): Promise<CreateCliTokenCommandOutput> => {
|
|
577
|
-
const parsedOutput: any = {
|
|
578
|
-
...output,
|
|
579
|
-
body: await parseBody(output.body, context),
|
|
580
|
-
};
|
|
581
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
582
|
-
let errorCode = "UnknownError";
|
|
583
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
584
|
-
switch (errorCode) {
|
|
585
|
-
case "ResourceNotFoundException":
|
|
586
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
587
|
-
response = {
|
|
588
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
589
|
-
name: errorCode,
|
|
590
|
-
$metadata: deserializeMetadata(output),
|
|
591
|
-
};
|
|
592
|
-
break;
|
|
593
|
-
default:
|
|
594
|
-
const parsedBody = parsedOutput.body;
|
|
595
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
596
|
-
response = {
|
|
597
|
-
...parsedBody,
|
|
598
|
-
name: `${errorCode}`,
|
|
599
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
600
|
-
$fault: "client",
|
|
601
|
-
$metadata: deserializeMetadata(output),
|
|
602
|
-
} as any;
|
|
603
|
-
}
|
|
604
|
-
const message = response.message || response.Message || errorCode;
|
|
605
|
-
response.message = message;
|
|
606
|
-
delete response.Message;
|
|
607
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
export const deserializeAws_restJson1CreateEnvironmentCommand = async (
|
|
611
|
-
output: __HttpResponse,
|
|
612
|
-
context: __SerdeContext
|
|
613
|
-
): Promise<CreateEnvironmentCommandOutput> => {
|
|
614
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
615
|
-
return deserializeAws_restJson1CreateEnvironmentCommandError(output, context);
|
|
616
|
-
}
|
|
617
|
-
const contents: CreateEnvironmentCommandOutput = {
|
|
618
|
-
$metadata: deserializeMetadata(output),
|
|
619
|
-
Arn: undefined,
|
|
620
|
-
};
|
|
621
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
622
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
623
|
-
contents.Arn = __expectString(data.Arn);
|
|
624
|
-
}
|
|
625
|
-
return Promise.resolve(contents);
|
|
626
|
-
};
|
|
627
|
-
|
|
628
|
-
const deserializeAws_restJson1CreateEnvironmentCommandError = async (
|
|
629
|
-
output: __HttpResponse,
|
|
630
|
-
context: __SerdeContext
|
|
631
|
-
): Promise<CreateEnvironmentCommandOutput> => {
|
|
632
|
-
const parsedOutput: any = {
|
|
633
|
-
...output,
|
|
634
|
-
body: await parseBody(output.body, context),
|
|
635
|
-
};
|
|
636
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
637
|
-
let errorCode = "UnknownError";
|
|
638
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
639
|
-
switch (errorCode) {
|
|
640
|
-
case "InternalServerException":
|
|
641
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
642
|
-
response = {
|
|
643
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
644
|
-
name: errorCode,
|
|
645
|
-
$metadata: deserializeMetadata(output),
|
|
646
|
-
};
|
|
647
|
-
break;
|
|
648
|
-
case "ValidationException":
|
|
649
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
650
|
-
response = {
|
|
651
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
652
|
-
name: errorCode,
|
|
653
|
-
$metadata: deserializeMetadata(output),
|
|
654
|
-
};
|
|
655
|
-
break;
|
|
656
|
-
default:
|
|
657
|
-
const parsedBody = parsedOutput.body;
|
|
658
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
659
|
-
response = {
|
|
660
|
-
...parsedBody,
|
|
661
|
-
name: `${errorCode}`,
|
|
662
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
663
|
-
$fault: "client",
|
|
664
|
-
$metadata: deserializeMetadata(output),
|
|
665
|
-
} as any;
|
|
666
|
-
}
|
|
667
|
-
const message = response.message || response.Message || errorCode;
|
|
668
|
-
response.message = message;
|
|
669
|
-
delete response.Message;
|
|
670
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
671
|
-
};
|
|
672
|
-
|
|
673
|
-
export const deserializeAws_restJson1CreateWebLoginTokenCommand = async (
|
|
674
|
-
output: __HttpResponse,
|
|
675
|
-
context: __SerdeContext
|
|
676
|
-
): Promise<CreateWebLoginTokenCommandOutput> => {
|
|
677
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
678
|
-
return deserializeAws_restJson1CreateWebLoginTokenCommandError(output, context);
|
|
679
|
-
}
|
|
680
|
-
const contents: CreateWebLoginTokenCommandOutput = {
|
|
681
|
-
$metadata: deserializeMetadata(output),
|
|
682
|
-
WebServerHostname: undefined,
|
|
683
|
-
WebToken: undefined,
|
|
684
|
-
};
|
|
685
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
686
|
-
if (data.WebServerHostname !== undefined && data.WebServerHostname !== null) {
|
|
687
|
-
contents.WebServerHostname = __expectString(data.WebServerHostname);
|
|
688
|
-
}
|
|
689
|
-
if (data.WebToken !== undefined && data.WebToken !== null) {
|
|
690
|
-
contents.WebToken = __expectString(data.WebToken);
|
|
691
|
-
}
|
|
692
|
-
return Promise.resolve(contents);
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
const deserializeAws_restJson1CreateWebLoginTokenCommandError = async (
|
|
696
|
-
output: __HttpResponse,
|
|
697
|
-
context: __SerdeContext
|
|
698
|
-
): Promise<CreateWebLoginTokenCommandOutput> => {
|
|
699
|
-
const parsedOutput: any = {
|
|
700
|
-
...output,
|
|
701
|
-
body: await parseBody(output.body, context),
|
|
702
|
-
};
|
|
703
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
704
|
-
let errorCode = "UnknownError";
|
|
705
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
706
|
-
switch (errorCode) {
|
|
707
|
-
case "AccessDeniedException":
|
|
708
|
-
case "com.amazonaws.mwaa#AccessDeniedException":
|
|
709
|
-
response = {
|
|
710
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
711
|
-
name: errorCode,
|
|
712
|
-
$metadata: deserializeMetadata(output),
|
|
713
|
-
};
|
|
714
|
-
break;
|
|
715
|
-
case "InternalServerException":
|
|
716
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
717
|
-
response = {
|
|
718
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
719
|
-
name: errorCode,
|
|
720
|
-
$metadata: deserializeMetadata(output),
|
|
721
|
-
};
|
|
722
|
-
break;
|
|
723
|
-
case "ResourceNotFoundException":
|
|
724
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
725
|
-
response = {
|
|
726
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
727
|
-
name: errorCode,
|
|
728
|
-
$metadata: deserializeMetadata(output),
|
|
729
|
-
};
|
|
730
|
-
break;
|
|
731
|
-
case "ValidationException":
|
|
732
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
733
|
-
response = {
|
|
734
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
735
|
-
name: errorCode,
|
|
736
|
-
$metadata: deserializeMetadata(output),
|
|
737
|
-
};
|
|
738
|
-
break;
|
|
739
|
-
default:
|
|
740
|
-
const parsedBody = parsedOutput.body;
|
|
741
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
742
|
-
response = {
|
|
743
|
-
...parsedBody,
|
|
744
|
-
name: `${errorCode}`,
|
|
745
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
746
|
-
$fault: "client",
|
|
747
|
-
$metadata: deserializeMetadata(output),
|
|
748
|
-
} as any;
|
|
749
|
-
}
|
|
750
|
-
const message = response.message || response.Message || errorCode;
|
|
751
|
-
response.message = message;
|
|
752
|
-
delete response.Message;
|
|
753
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
754
|
-
};
|
|
755
|
-
|
|
756
|
-
export const deserializeAws_restJson1DeleteEnvironmentCommand = async (
|
|
757
|
-
output: __HttpResponse,
|
|
758
|
-
context: __SerdeContext
|
|
759
|
-
): Promise<DeleteEnvironmentCommandOutput> => {
|
|
760
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
761
|
-
return deserializeAws_restJson1DeleteEnvironmentCommandError(output, context);
|
|
762
|
-
}
|
|
763
|
-
const contents: DeleteEnvironmentCommandOutput = {
|
|
764
|
-
$metadata: deserializeMetadata(output),
|
|
765
|
-
};
|
|
766
|
-
await collectBody(output.body, context);
|
|
767
|
-
return Promise.resolve(contents);
|
|
768
|
-
};
|
|
769
|
-
|
|
770
|
-
const deserializeAws_restJson1DeleteEnvironmentCommandError = async (
|
|
771
|
-
output: __HttpResponse,
|
|
772
|
-
context: __SerdeContext
|
|
773
|
-
): Promise<DeleteEnvironmentCommandOutput> => {
|
|
774
|
-
const parsedOutput: any = {
|
|
775
|
-
...output,
|
|
776
|
-
body: await parseBody(output.body, context),
|
|
777
|
-
};
|
|
778
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
779
|
-
let errorCode = "UnknownError";
|
|
780
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
781
|
-
switch (errorCode) {
|
|
782
|
-
case "InternalServerException":
|
|
783
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
784
|
-
response = {
|
|
785
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
786
|
-
name: errorCode,
|
|
787
|
-
$metadata: deserializeMetadata(output),
|
|
788
|
-
};
|
|
789
|
-
break;
|
|
790
|
-
case "ResourceNotFoundException":
|
|
791
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
792
|
-
response = {
|
|
793
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
794
|
-
name: errorCode,
|
|
795
|
-
$metadata: deserializeMetadata(output),
|
|
796
|
-
};
|
|
797
|
-
break;
|
|
798
|
-
case "ValidationException":
|
|
799
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
800
|
-
response = {
|
|
801
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
802
|
-
name: errorCode,
|
|
803
|
-
$metadata: deserializeMetadata(output),
|
|
804
|
-
};
|
|
805
|
-
break;
|
|
806
|
-
default:
|
|
807
|
-
const parsedBody = parsedOutput.body;
|
|
808
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
809
|
-
response = {
|
|
810
|
-
...parsedBody,
|
|
811
|
-
name: `${errorCode}`,
|
|
812
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
813
|
-
$fault: "client",
|
|
814
|
-
$metadata: deserializeMetadata(output),
|
|
815
|
-
} as any;
|
|
816
|
-
}
|
|
817
|
-
const message = response.message || response.Message || errorCode;
|
|
818
|
-
response.message = message;
|
|
819
|
-
delete response.Message;
|
|
820
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
821
|
-
};
|
|
822
|
-
|
|
823
|
-
export const deserializeAws_restJson1GetEnvironmentCommand = async (
|
|
824
|
-
output: __HttpResponse,
|
|
825
|
-
context: __SerdeContext
|
|
826
|
-
): Promise<GetEnvironmentCommandOutput> => {
|
|
827
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
828
|
-
return deserializeAws_restJson1GetEnvironmentCommandError(output, context);
|
|
829
|
-
}
|
|
830
|
-
const contents: GetEnvironmentCommandOutput = {
|
|
831
|
-
$metadata: deserializeMetadata(output),
|
|
832
|
-
Environment: undefined,
|
|
833
|
-
};
|
|
834
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
835
|
-
if (data.Environment !== undefined && data.Environment !== null) {
|
|
836
|
-
contents.Environment = deserializeAws_restJson1Environment(data.Environment, context);
|
|
837
|
-
}
|
|
838
|
-
return Promise.resolve(contents);
|
|
839
|
-
};
|
|
840
|
-
|
|
841
|
-
const deserializeAws_restJson1GetEnvironmentCommandError = async (
|
|
842
|
-
output: __HttpResponse,
|
|
843
|
-
context: __SerdeContext
|
|
844
|
-
): Promise<GetEnvironmentCommandOutput> => {
|
|
845
|
-
const parsedOutput: any = {
|
|
846
|
-
...output,
|
|
847
|
-
body: await parseBody(output.body, context),
|
|
848
|
-
};
|
|
849
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
850
|
-
let errorCode = "UnknownError";
|
|
851
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
852
|
-
switch (errorCode) {
|
|
853
|
-
case "InternalServerException":
|
|
854
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
855
|
-
response = {
|
|
856
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
857
|
-
name: errorCode,
|
|
858
|
-
$metadata: deserializeMetadata(output),
|
|
859
|
-
};
|
|
860
|
-
break;
|
|
861
|
-
case "ResourceNotFoundException":
|
|
862
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
863
|
-
response = {
|
|
864
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
865
|
-
name: errorCode,
|
|
866
|
-
$metadata: deserializeMetadata(output),
|
|
867
|
-
};
|
|
868
|
-
break;
|
|
869
|
-
case "ValidationException":
|
|
870
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
871
|
-
response = {
|
|
872
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
873
|
-
name: errorCode,
|
|
874
|
-
$metadata: deserializeMetadata(output),
|
|
875
|
-
};
|
|
876
|
-
break;
|
|
877
|
-
default:
|
|
878
|
-
const parsedBody = parsedOutput.body;
|
|
879
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
880
|
-
response = {
|
|
881
|
-
...parsedBody,
|
|
882
|
-
name: `${errorCode}`,
|
|
883
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
884
|
-
$fault: "client",
|
|
885
|
-
$metadata: deserializeMetadata(output),
|
|
886
|
-
} as any;
|
|
887
|
-
}
|
|
888
|
-
const message = response.message || response.Message || errorCode;
|
|
889
|
-
response.message = message;
|
|
890
|
-
delete response.Message;
|
|
891
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
892
|
-
};
|
|
893
|
-
|
|
894
|
-
export const deserializeAws_restJson1ListEnvironmentsCommand = async (
|
|
895
|
-
output: __HttpResponse,
|
|
896
|
-
context: __SerdeContext
|
|
897
|
-
): Promise<ListEnvironmentsCommandOutput> => {
|
|
898
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
899
|
-
return deserializeAws_restJson1ListEnvironmentsCommandError(output, context);
|
|
900
|
-
}
|
|
901
|
-
const contents: ListEnvironmentsCommandOutput = {
|
|
902
|
-
$metadata: deserializeMetadata(output),
|
|
903
|
-
Environments: undefined,
|
|
904
|
-
NextToken: undefined,
|
|
905
|
-
};
|
|
906
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
907
|
-
if (data.Environments !== undefined && data.Environments !== null) {
|
|
908
|
-
contents.Environments = deserializeAws_restJson1EnvironmentList(data.Environments, context);
|
|
909
|
-
}
|
|
910
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
911
|
-
contents.NextToken = __expectString(data.NextToken);
|
|
912
|
-
}
|
|
913
|
-
return Promise.resolve(contents);
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
const deserializeAws_restJson1ListEnvironmentsCommandError = async (
|
|
917
|
-
output: __HttpResponse,
|
|
918
|
-
context: __SerdeContext
|
|
919
|
-
): Promise<ListEnvironmentsCommandOutput> => {
|
|
920
|
-
const parsedOutput: any = {
|
|
921
|
-
...output,
|
|
922
|
-
body: await parseBody(output.body, context),
|
|
923
|
-
};
|
|
924
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
925
|
-
let errorCode = "UnknownError";
|
|
926
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
927
|
-
switch (errorCode) {
|
|
928
|
-
case "InternalServerException":
|
|
929
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
930
|
-
response = {
|
|
931
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
932
|
-
name: errorCode,
|
|
933
|
-
$metadata: deserializeMetadata(output),
|
|
934
|
-
};
|
|
935
|
-
break;
|
|
936
|
-
case "ValidationException":
|
|
937
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
938
|
-
response = {
|
|
939
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
940
|
-
name: errorCode,
|
|
941
|
-
$metadata: deserializeMetadata(output),
|
|
942
|
-
};
|
|
943
|
-
break;
|
|
944
|
-
default:
|
|
945
|
-
const parsedBody = parsedOutput.body;
|
|
946
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
947
|
-
response = {
|
|
948
|
-
...parsedBody,
|
|
949
|
-
name: `${errorCode}`,
|
|
950
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
951
|
-
$fault: "client",
|
|
952
|
-
$metadata: deserializeMetadata(output),
|
|
953
|
-
} as any;
|
|
954
|
-
}
|
|
955
|
-
const message = response.message || response.Message || errorCode;
|
|
956
|
-
response.message = message;
|
|
957
|
-
delete response.Message;
|
|
958
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
export const deserializeAws_restJson1ListTagsForResourceCommand = async (
|
|
962
|
-
output: __HttpResponse,
|
|
963
|
-
context: __SerdeContext
|
|
964
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
965
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
966
|
-
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
967
|
-
}
|
|
968
|
-
const contents: ListTagsForResourceCommandOutput = {
|
|
969
|
-
$metadata: deserializeMetadata(output),
|
|
970
|
-
Tags: undefined,
|
|
971
|
-
};
|
|
972
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
973
|
-
if (data.Tags !== undefined && data.Tags !== null) {
|
|
974
|
-
contents.Tags = deserializeAws_restJson1TagMap(data.Tags, context);
|
|
975
|
-
}
|
|
976
|
-
return Promise.resolve(contents);
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
const deserializeAws_restJson1ListTagsForResourceCommandError = async (
|
|
980
|
-
output: __HttpResponse,
|
|
981
|
-
context: __SerdeContext
|
|
982
|
-
): Promise<ListTagsForResourceCommandOutput> => {
|
|
983
|
-
const parsedOutput: any = {
|
|
984
|
-
...output,
|
|
985
|
-
body: await parseBody(output.body, context),
|
|
986
|
-
};
|
|
987
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
988
|
-
let errorCode = "UnknownError";
|
|
989
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
990
|
-
switch (errorCode) {
|
|
991
|
-
case "InternalServerException":
|
|
992
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
993
|
-
response = {
|
|
994
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
995
|
-
name: errorCode,
|
|
996
|
-
$metadata: deserializeMetadata(output),
|
|
997
|
-
};
|
|
998
|
-
break;
|
|
999
|
-
case "ResourceNotFoundException":
|
|
1000
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
1001
|
-
response = {
|
|
1002
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1003
|
-
name: errorCode,
|
|
1004
|
-
$metadata: deserializeMetadata(output),
|
|
1005
|
-
};
|
|
1006
|
-
break;
|
|
1007
|
-
case "ValidationException":
|
|
1008
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
1009
|
-
response = {
|
|
1010
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1011
|
-
name: errorCode,
|
|
1012
|
-
$metadata: deserializeMetadata(output),
|
|
1013
|
-
};
|
|
1014
|
-
break;
|
|
1015
|
-
default:
|
|
1016
|
-
const parsedBody = parsedOutput.body;
|
|
1017
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1018
|
-
response = {
|
|
1019
|
-
...parsedBody,
|
|
1020
|
-
name: `${errorCode}`,
|
|
1021
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1022
|
-
$fault: "client",
|
|
1023
|
-
$metadata: deserializeMetadata(output),
|
|
1024
|
-
} as any;
|
|
1025
|
-
}
|
|
1026
|
-
const message = response.message || response.Message || errorCode;
|
|
1027
|
-
response.message = message;
|
|
1028
|
-
delete response.Message;
|
|
1029
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1030
|
-
};
|
|
1031
|
-
|
|
1032
|
-
export const deserializeAws_restJson1PublishMetricsCommand = async (
|
|
1033
|
-
output: __HttpResponse,
|
|
1034
|
-
context: __SerdeContext
|
|
1035
|
-
): Promise<PublishMetricsCommandOutput> => {
|
|
1036
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1037
|
-
return deserializeAws_restJson1PublishMetricsCommandError(output, context);
|
|
1038
|
-
}
|
|
1039
|
-
const contents: PublishMetricsCommandOutput = {
|
|
1040
|
-
$metadata: deserializeMetadata(output),
|
|
1041
|
-
};
|
|
1042
|
-
await collectBody(output.body, context);
|
|
1043
|
-
return Promise.resolve(contents);
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
const deserializeAws_restJson1PublishMetricsCommandError = async (
|
|
1047
|
-
output: __HttpResponse,
|
|
1048
|
-
context: __SerdeContext
|
|
1049
|
-
): Promise<PublishMetricsCommandOutput> => {
|
|
1050
|
-
const parsedOutput: any = {
|
|
1051
|
-
...output,
|
|
1052
|
-
body: await parseBody(output.body, context),
|
|
1053
|
-
};
|
|
1054
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1055
|
-
let errorCode = "UnknownError";
|
|
1056
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1057
|
-
switch (errorCode) {
|
|
1058
|
-
case "InternalServerException":
|
|
1059
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
1060
|
-
response = {
|
|
1061
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1062
|
-
name: errorCode,
|
|
1063
|
-
$metadata: deserializeMetadata(output),
|
|
1064
|
-
};
|
|
1065
|
-
break;
|
|
1066
|
-
case "ValidationException":
|
|
1067
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
1068
|
-
response = {
|
|
1069
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1070
|
-
name: errorCode,
|
|
1071
|
-
$metadata: deserializeMetadata(output),
|
|
1072
|
-
};
|
|
1073
|
-
break;
|
|
1074
|
-
default:
|
|
1075
|
-
const parsedBody = parsedOutput.body;
|
|
1076
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1077
|
-
response = {
|
|
1078
|
-
...parsedBody,
|
|
1079
|
-
name: `${errorCode}`,
|
|
1080
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1081
|
-
$fault: "client",
|
|
1082
|
-
$metadata: deserializeMetadata(output),
|
|
1083
|
-
} as any;
|
|
1084
|
-
}
|
|
1085
|
-
const message = response.message || response.Message || errorCode;
|
|
1086
|
-
response.message = message;
|
|
1087
|
-
delete response.Message;
|
|
1088
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1089
|
-
};
|
|
1090
|
-
|
|
1091
|
-
export const deserializeAws_restJson1TagResourceCommand = async (
|
|
1092
|
-
output: __HttpResponse,
|
|
1093
|
-
context: __SerdeContext
|
|
1094
|
-
): Promise<TagResourceCommandOutput> => {
|
|
1095
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1096
|
-
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
1097
|
-
}
|
|
1098
|
-
const contents: TagResourceCommandOutput = {
|
|
1099
|
-
$metadata: deserializeMetadata(output),
|
|
1100
|
-
};
|
|
1101
|
-
await collectBody(output.body, context);
|
|
1102
|
-
return Promise.resolve(contents);
|
|
1103
|
-
};
|
|
1104
|
-
|
|
1105
|
-
const deserializeAws_restJson1TagResourceCommandError = async (
|
|
1106
|
-
output: __HttpResponse,
|
|
1107
|
-
context: __SerdeContext
|
|
1108
|
-
): Promise<TagResourceCommandOutput> => {
|
|
1109
|
-
const parsedOutput: any = {
|
|
1110
|
-
...output,
|
|
1111
|
-
body: await parseBody(output.body, context),
|
|
1112
|
-
};
|
|
1113
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1114
|
-
let errorCode = "UnknownError";
|
|
1115
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1116
|
-
switch (errorCode) {
|
|
1117
|
-
case "InternalServerException":
|
|
1118
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
1119
|
-
response = {
|
|
1120
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1121
|
-
name: errorCode,
|
|
1122
|
-
$metadata: deserializeMetadata(output),
|
|
1123
|
-
};
|
|
1124
|
-
break;
|
|
1125
|
-
case "ResourceNotFoundException":
|
|
1126
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
1127
|
-
response = {
|
|
1128
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1129
|
-
name: errorCode,
|
|
1130
|
-
$metadata: deserializeMetadata(output),
|
|
1131
|
-
};
|
|
1132
|
-
break;
|
|
1133
|
-
case "ValidationException":
|
|
1134
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
1135
|
-
response = {
|
|
1136
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1137
|
-
name: errorCode,
|
|
1138
|
-
$metadata: deserializeMetadata(output),
|
|
1139
|
-
};
|
|
1140
|
-
break;
|
|
1141
|
-
default:
|
|
1142
|
-
const parsedBody = parsedOutput.body;
|
|
1143
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1144
|
-
response = {
|
|
1145
|
-
...parsedBody,
|
|
1146
|
-
name: `${errorCode}`,
|
|
1147
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1148
|
-
$fault: "client",
|
|
1149
|
-
$metadata: deserializeMetadata(output),
|
|
1150
|
-
} as any;
|
|
1151
|
-
}
|
|
1152
|
-
const message = response.message || response.Message || errorCode;
|
|
1153
|
-
response.message = message;
|
|
1154
|
-
delete response.Message;
|
|
1155
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1156
|
-
};
|
|
1157
|
-
|
|
1158
|
-
export const deserializeAws_restJson1UntagResourceCommand = async (
|
|
1159
|
-
output: __HttpResponse,
|
|
1160
|
-
context: __SerdeContext
|
|
1161
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
1162
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1163
|
-
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
1164
|
-
}
|
|
1165
|
-
const contents: UntagResourceCommandOutput = {
|
|
1166
|
-
$metadata: deserializeMetadata(output),
|
|
1167
|
-
};
|
|
1168
|
-
await collectBody(output.body, context);
|
|
1169
|
-
return Promise.resolve(contents);
|
|
1170
|
-
};
|
|
1171
|
-
|
|
1172
|
-
const deserializeAws_restJson1UntagResourceCommandError = async (
|
|
1173
|
-
output: __HttpResponse,
|
|
1174
|
-
context: __SerdeContext
|
|
1175
|
-
): Promise<UntagResourceCommandOutput> => {
|
|
1176
|
-
const parsedOutput: any = {
|
|
1177
|
-
...output,
|
|
1178
|
-
body: await parseBody(output.body, context),
|
|
1179
|
-
};
|
|
1180
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1181
|
-
let errorCode = "UnknownError";
|
|
1182
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1183
|
-
switch (errorCode) {
|
|
1184
|
-
case "InternalServerException":
|
|
1185
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
1186
|
-
response = {
|
|
1187
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1188
|
-
name: errorCode,
|
|
1189
|
-
$metadata: deserializeMetadata(output),
|
|
1190
|
-
};
|
|
1191
|
-
break;
|
|
1192
|
-
case "ResourceNotFoundException":
|
|
1193
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
1194
|
-
response = {
|
|
1195
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1196
|
-
name: errorCode,
|
|
1197
|
-
$metadata: deserializeMetadata(output),
|
|
1198
|
-
};
|
|
1199
|
-
break;
|
|
1200
|
-
case "ValidationException":
|
|
1201
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
1202
|
-
response = {
|
|
1203
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1204
|
-
name: errorCode,
|
|
1205
|
-
$metadata: deserializeMetadata(output),
|
|
1206
|
-
};
|
|
1207
|
-
break;
|
|
1208
|
-
default:
|
|
1209
|
-
const parsedBody = parsedOutput.body;
|
|
1210
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1211
|
-
response = {
|
|
1212
|
-
...parsedBody,
|
|
1213
|
-
name: `${errorCode}`,
|
|
1214
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1215
|
-
$fault: "client",
|
|
1216
|
-
$metadata: deserializeMetadata(output),
|
|
1217
|
-
} as any;
|
|
1218
|
-
}
|
|
1219
|
-
const message = response.message || response.Message || errorCode;
|
|
1220
|
-
response.message = message;
|
|
1221
|
-
delete response.Message;
|
|
1222
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1223
|
-
};
|
|
1224
|
-
|
|
1225
|
-
export const deserializeAws_restJson1UpdateEnvironmentCommand = async (
|
|
1226
|
-
output: __HttpResponse,
|
|
1227
|
-
context: __SerdeContext
|
|
1228
|
-
): Promise<UpdateEnvironmentCommandOutput> => {
|
|
1229
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1230
|
-
return deserializeAws_restJson1UpdateEnvironmentCommandError(output, context);
|
|
1231
|
-
}
|
|
1232
|
-
const contents: UpdateEnvironmentCommandOutput = {
|
|
1233
|
-
$metadata: deserializeMetadata(output),
|
|
1234
|
-
Arn: undefined,
|
|
1235
|
-
};
|
|
1236
|
-
const data: { [key: string]: any } = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1237
|
-
if (data.Arn !== undefined && data.Arn !== null) {
|
|
1238
|
-
contents.Arn = __expectString(data.Arn);
|
|
1239
|
-
}
|
|
1240
|
-
return Promise.resolve(contents);
|
|
1241
|
-
};
|
|
1242
|
-
|
|
1243
|
-
const deserializeAws_restJson1UpdateEnvironmentCommandError = async (
|
|
1244
|
-
output: __HttpResponse,
|
|
1245
|
-
context: __SerdeContext
|
|
1246
|
-
): Promise<UpdateEnvironmentCommandOutput> => {
|
|
1247
|
-
const parsedOutput: any = {
|
|
1248
|
-
...output,
|
|
1249
|
-
body: await parseBody(output.body, context),
|
|
1250
|
-
};
|
|
1251
|
-
let response: __SmithyException & __MetadataBearer & { [key: string]: any };
|
|
1252
|
-
let errorCode = "UnknownError";
|
|
1253
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1254
|
-
switch (errorCode) {
|
|
1255
|
-
case "InternalServerException":
|
|
1256
|
-
case "com.amazonaws.mwaa#InternalServerException":
|
|
1257
|
-
response = {
|
|
1258
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1259
|
-
name: errorCode,
|
|
1260
|
-
$metadata: deserializeMetadata(output),
|
|
1261
|
-
};
|
|
1262
|
-
break;
|
|
1263
|
-
case "ResourceNotFoundException":
|
|
1264
|
-
case "com.amazonaws.mwaa#ResourceNotFoundException":
|
|
1265
|
-
response = {
|
|
1266
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1267
|
-
name: errorCode,
|
|
1268
|
-
$metadata: deserializeMetadata(output),
|
|
1269
|
-
};
|
|
1270
|
-
break;
|
|
1271
|
-
case "ValidationException":
|
|
1272
|
-
case "com.amazonaws.mwaa#ValidationException":
|
|
1273
|
-
response = {
|
|
1274
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1275
|
-
name: errorCode,
|
|
1276
|
-
$metadata: deserializeMetadata(output),
|
|
1277
|
-
};
|
|
1278
|
-
break;
|
|
1279
|
-
default:
|
|
1280
|
-
const parsedBody = parsedOutput.body;
|
|
1281
|
-
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1282
|
-
response = {
|
|
1283
|
-
...parsedBody,
|
|
1284
|
-
name: `${errorCode}`,
|
|
1285
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1286
|
-
$fault: "client",
|
|
1287
|
-
$metadata: deserializeMetadata(output),
|
|
1288
|
-
} as any;
|
|
1289
|
-
}
|
|
1290
|
-
const message = response.message || response.Message || errorCode;
|
|
1291
|
-
response.message = message;
|
|
1292
|
-
delete response.Message;
|
|
1293
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1294
|
-
};
|
|
1295
|
-
|
|
1296
|
-
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (
|
|
1297
|
-
parsedOutput: any,
|
|
1298
|
-
context: __SerdeContext
|
|
1299
|
-
): Promise<AccessDeniedException> => {
|
|
1300
|
-
const contents: AccessDeniedException = {
|
|
1301
|
-
name: "AccessDeniedException",
|
|
1302
|
-
$fault: "client",
|
|
1303
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1304
|
-
Message: undefined,
|
|
1305
|
-
};
|
|
1306
|
-
const data: any = parsedOutput.body;
|
|
1307
|
-
if (data.Message !== undefined && data.Message !== null) {
|
|
1308
|
-
contents.Message = __expectString(data.Message);
|
|
1309
|
-
}
|
|
1310
|
-
return contents;
|
|
1311
|
-
};
|
|
1312
|
-
|
|
1313
|
-
const deserializeAws_restJson1InternalServerExceptionResponse = async (
|
|
1314
|
-
parsedOutput: any,
|
|
1315
|
-
context: __SerdeContext
|
|
1316
|
-
): Promise<InternalServerException> => {
|
|
1317
|
-
const contents: InternalServerException = {
|
|
1318
|
-
name: "InternalServerException",
|
|
1319
|
-
$fault: "server",
|
|
1320
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1321
|
-
message: undefined,
|
|
1322
|
-
};
|
|
1323
|
-
const data: any = parsedOutput.body;
|
|
1324
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1325
|
-
contents.message = __expectString(data.message);
|
|
1326
|
-
}
|
|
1327
|
-
return contents;
|
|
1328
|
-
};
|
|
1329
|
-
|
|
1330
|
-
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (
|
|
1331
|
-
parsedOutput: any,
|
|
1332
|
-
context: __SerdeContext
|
|
1333
|
-
): Promise<ResourceNotFoundException> => {
|
|
1334
|
-
const contents: ResourceNotFoundException = {
|
|
1335
|
-
name: "ResourceNotFoundException",
|
|
1336
|
-
$fault: "client",
|
|
1337
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1338
|
-
message: undefined,
|
|
1339
|
-
};
|
|
1340
|
-
const data: any = parsedOutput.body;
|
|
1341
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1342
|
-
contents.message = __expectString(data.message);
|
|
1343
|
-
}
|
|
1344
|
-
return contents;
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1347
|
-
const deserializeAws_restJson1ValidationExceptionResponse = async (
|
|
1348
|
-
parsedOutput: any,
|
|
1349
|
-
context: __SerdeContext
|
|
1350
|
-
): Promise<ValidationException> => {
|
|
1351
|
-
const contents: ValidationException = {
|
|
1352
|
-
name: "ValidationException",
|
|
1353
|
-
$fault: "client",
|
|
1354
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1355
|
-
message: undefined,
|
|
1356
|
-
};
|
|
1357
|
-
const data: any = parsedOutput.body;
|
|
1358
|
-
if (data.message !== undefined && data.message !== null) {
|
|
1359
|
-
contents.message = __expectString(data.message);
|
|
1360
|
-
}
|
|
1361
|
-
return contents;
|
|
1362
|
-
};
|
|
1363
|
-
|
|
1364
|
-
const serializeAws_restJson1AirflowConfigurationOptions = (
|
|
1365
|
-
input: { [key: string]: string },
|
|
1366
|
-
context: __SerdeContext
|
|
1367
|
-
): any => {
|
|
1368
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
1369
|
-
if (value === null) {
|
|
1370
|
-
return acc;
|
|
1371
|
-
}
|
|
1372
|
-
return {
|
|
1373
|
-
...acc,
|
|
1374
|
-
[key]: value,
|
|
1375
|
-
};
|
|
1376
|
-
}, {});
|
|
1377
|
-
};
|
|
1378
|
-
|
|
1379
|
-
const serializeAws_restJson1Dimension = (input: Dimension, context: __SerdeContext): any => {
|
|
1380
|
-
return {
|
|
1381
|
-
...(input.Name !== undefined && input.Name !== null && { Name: input.Name }),
|
|
1382
|
-
...(input.Value !== undefined && input.Value !== null && { Value: input.Value }),
|
|
1383
|
-
};
|
|
1384
|
-
};
|
|
1385
|
-
|
|
1386
|
-
const serializeAws_restJson1Dimensions = (input: Dimension[], context: __SerdeContext): any => {
|
|
1387
|
-
return input
|
|
1388
|
-
.filter((e: any) => e != null)
|
|
1389
|
-
.map((entry) => {
|
|
1390
|
-
if (entry === null) {
|
|
1391
|
-
return null as any;
|
|
1392
|
-
}
|
|
1393
|
-
return serializeAws_restJson1Dimension(entry, context);
|
|
1394
|
-
});
|
|
1395
|
-
};
|
|
1396
|
-
|
|
1397
|
-
const serializeAws_restJson1LoggingConfigurationInput = (
|
|
1398
|
-
input: LoggingConfigurationInput,
|
|
1399
|
-
context: __SerdeContext
|
|
1400
|
-
): any => {
|
|
1401
|
-
return {
|
|
1402
|
-
...(input.DagProcessingLogs !== undefined &&
|
|
1403
|
-
input.DagProcessingLogs !== null && {
|
|
1404
|
-
DagProcessingLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.DagProcessingLogs, context),
|
|
1405
|
-
}),
|
|
1406
|
-
...(input.SchedulerLogs !== undefined &&
|
|
1407
|
-
input.SchedulerLogs !== null && {
|
|
1408
|
-
SchedulerLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.SchedulerLogs, context),
|
|
1409
|
-
}),
|
|
1410
|
-
...(input.TaskLogs !== undefined &&
|
|
1411
|
-
input.TaskLogs !== null && {
|
|
1412
|
-
TaskLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.TaskLogs, context),
|
|
1413
|
-
}),
|
|
1414
|
-
...(input.WebserverLogs !== undefined &&
|
|
1415
|
-
input.WebserverLogs !== null && {
|
|
1416
|
-
WebserverLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.WebserverLogs, context),
|
|
1417
|
-
}),
|
|
1418
|
-
...(input.WorkerLogs !== undefined &&
|
|
1419
|
-
input.WorkerLogs !== null && {
|
|
1420
|
-
WorkerLogs: serializeAws_restJson1ModuleLoggingConfigurationInput(input.WorkerLogs, context),
|
|
1421
|
-
}),
|
|
1422
|
-
};
|
|
1423
|
-
};
|
|
1424
|
-
|
|
1425
|
-
const serializeAws_restJson1MetricData = (input: MetricDatum[], context: __SerdeContext): any => {
|
|
1426
|
-
return input
|
|
1427
|
-
.filter((e: any) => e != null)
|
|
1428
|
-
.map((entry) => {
|
|
1429
|
-
if (entry === null) {
|
|
1430
|
-
return null as any;
|
|
1431
|
-
}
|
|
1432
|
-
return serializeAws_restJson1MetricDatum(entry, context);
|
|
1433
|
-
});
|
|
1434
|
-
};
|
|
1435
|
-
|
|
1436
|
-
const serializeAws_restJson1MetricDatum = (input: MetricDatum, context: __SerdeContext): any => {
|
|
1437
|
-
return {
|
|
1438
|
-
...(input.Dimensions !== undefined &&
|
|
1439
|
-
input.Dimensions !== null && { Dimensions: serializeAws_restJson1Dimensions(input.Dimensions, context) }),
|
|
1440
|
-
...(input.MetricName !== undefined && input.MetricName !== null && { MetricName: input.MetricName }),
|
|
1441
|
-
...(input.StatisticValues !== undefined &&
|
|
1442
|
-
input.StatisticValues !== null && {
|
|
1443
|
-
StatisticValues: serializeAws_restJson1StatisticSet(input.StatisticValues, context),
|
|
1444
|
-
}),
|
|
1445
|
-
...(input.Timestamp !== undefined &&
|
|
1446
|
-
input.Timestamp !== null && { Timestamp: Math.round(input.Timestamp.getTime() / 1000) }),
|
|
1447
|
-
...(input.Unit !== undefined && input.Unit !== null && { Unit: input.Unit }),
|
|
1448
|
-
...(input.Value !== undefined && input.Value !== null && { Value: __serializeFloat(input.Value) }),
|
|
1449
|
-
};
|
|
1450
|
-
};
|
|
1451
|
-
|
|
1452
|
-
const serializeAws_restJson1ModuleLoggingConfigurationInput = (
|
|
1453
|
-
input: ModuleLoggingConfigurationInput,
|
|
1454
|
-
context: __SerdeContext
|
|
1455
|
-
): any => {
|
|
1456
|
-
return {
|
|
1457
|
-
...(input.Enabled !== undefined && input.Enabled !== null && { Enabled: input.Enabled }),
|
|
1458
|
-
...(input.LogLevel !== undefined && input.LogLevel !== null && { LogLevel: input.LogLevel }),
|
|
1459
|
-
};
|
|
1460
|
-
};
|
|
1461
|
-
|
|
1462
|
-
const serializeAws_restJson1NetworkConfiguration = (input: NetworkConfiguration, context: __SerdeContext): any => {
|
|
1463
|
-
return {
|
|
1464
|
-
...(input.SecurityGroupIds !== undefined &&
|
|
1465
|
-
input.SecurityGroupIds !== null && {
|
|
1466
|
-
SecurityGroupIds: serializeAws_restJson1SecurityGroupList(input.SecurityGroupIds, context),
|
|
1467
|
-
}),
|
|
1468
|
-
...(input.SubnetIds !== undefined &&
|
|
1469
|
-
input.SubnetIds !== null && { SubnetIds: serializeAws_restJson1SubnetList(input.SubnetIds, context) }),
|
|
1470
|
-
};
|
|
1471
|
-
};
|
|
1472
|
-
|
|
1473
|
-
const serializeAws_restJson1SecurityGroupList = (input: string[], context: __SerdeContext): any => {
|
|
1474
|
-
return input
|
|
1475
|
-
.filter((e: any) => e != null)
|
|
1476
|
-
.map((entry) => {
|
|
1477
|
-
if (entry === null) {
|
|
1478
|
-
return null as any;
|
|
1479
|
-
}
|
|
1480
|
-
return entry;
|
|
1481
|
-
});
|
|
1482
|
-
};
|
|
1483
|
-
|
|
1484
|
-
const serializeAws_restJson1StatisticSet = (input: StatisticSet, context: __SerdeContext): any => {
|
|
1485
|
-
return {
|
|
1486
|
-
...(input.Maximum !== undefined && input.Maximum !== null && { Maximum: __serializeFloat(input.Maximum) }),
|
|
1487
|
-
...(input.Minimum !== undefined && input.Minimum !== null && { Minimum: __serializeFloat(input.Minimum) }),
|
|
1488
|
-
...(input.SampleCount !== undefined && input.SampleCount !== null && { SampleCount: input.SampleCount }),
|
|
1489
|
-
...(input.Sum !== undefined && input.Sum !== null && { Sum: __serializeFloat(input.Sum) }),
|
|
1490
|
-
};
|
|
1491
|
-
};
|
|
1492
|
-
|
|
1493
|
-
const serializeAws_restJson1SubnetList = (input: string[], context: __SerdeContext): any => {
|
|
1494
|
-
return input
|
|
1495
|
-
.filter((e: any) => e != null)
|
|
1496
|
-
.map((entry) => {
|
|
1497
|
-
if (entry === null) {
|
|
1498
|
-
return null as any;
|
|
1499
|
-
}
|
|
1500
|
-
return entry;
|
|
1501
|
-
});
|
|
1502
|
-
};
|
|
1503
|
-
|
|
1504
|
-
const serializeAws_restJson1TagMap = (input: { [key: string]: string }, context: __SerdeContext): any => {
|
|
1505
|
-
return Object.entries(input).reduce((acc: { [key: string]: any }, [key, value]: [string, any]) => {
|
|
1506
|
-
if (value === null) {
|
|
1507
|
-
return acc;
|
|
1508
|
-
}
|
|
1509
|
-
return {
|
|
1510
|
-
...acc,
|
|
1511
|
-
[key]: value,
|
|
1512
|
-
};
|
|
1513
|
-
}, {});
|
|
1514
|
-
};
|
|
1515
|
-
|
|
1516
|
-
const serializeAws_restJson1UpdateNetworkConfigurationInput = (
|
|
1517
|
-
input: UpdateNetworkConfigurationInput,
|
|
1518
|
-
context: __SerdeContext
|
|
1519
|
-
): any => {
|
|
1520
|
-
return {
|
|
1521
|
-
...(input.SecurityGroupIds !== undefined &&
|
|
1522
|
-
input.SecurityGroupIds !== null && {
|
|
1523
|
-
SecurityGroupIds: serializeAws_restJson1SecurityGroupList(input.SecurityGroupIds, context),
|
|
1524
|
-
}),
|
|
1525
|
-
};
|
|
1526
|
-
};
|
|
1527
|
-
|
|
1528
|
-
const deserializeAws_restJson1AirflowConfigurationOptions = (
|
|
1529
|
-
output: any,
|
|
1530
|
-
context: __SerdeContext
|
|
1531
|
-
): { [key: string]: string } => {
|
|
1532
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
1533
|
-
if (value === null) {
|
|
1534
|
-
return acc;
|
|
1535
|
-
}
|
|
1536
|
-
return {
|
|
1537
|
-
...acc,
|
|
1538
|
-
[key]: __expectString(value) as any,
|
|
1539
|
-
};
|
|
1540
|
-
}, {});
|
|
1541
|
-
};
|
|
1542
|
-
|
|
1543
|
-
const deserializeAws_restJson1Environment = (output: any, context: __SerdeContext): Environment => {
|
|
1544
|
-
return {
|
|
1545
|
-
AirflowConfigurationOptions:
|
|
1546
|
-
output.AirflowConfigurationOptions !== undefined && output.AirflowConfigurationOptions !== null
|
|
1547
|
-
? deserializeAws_restJson1AirflowConfigurationOptions(output.AirflowConfigurationOptions, context)
|
|
1548
|
-
: undefined,
|
|
1549
|
-
AirflowVersion: __expectString(output.AirflowVersion),
|
|
1550
|
-
Arn: __expectString(output.Arn),
|
|
1551
|
-
CreatedAt:
|
|
1552
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1553
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1554
|
-
: undefined,
|
|
1555
|
-
DagS3Path: __expectString(output.DagS3Path),
|
|
1556
|
-
EnvironmentClass: __expectString(output.EnvironmentClass),
|
|
1557
|
-
ExecutionRoleArn: __expectString(output.ExecutionRoleArn),
|
|
1558
|
-
KmsKey: __expectString(output.KmsKey),
|
|
1559
|
-
LastUpdate:
|
|
1560
|
-
output.LastUpdate !== undefined && output.LastUpdate !== null
|
|
1561
|
-
? deserializeAws_restJson1LastUpdate(output.LastUpdate, context)
|
|
1562
|
-
: undefined,
|
|
1563
|
-
LoggingConfiguration:
|
|
1564
|
-
output.LoggingConfiguration !== undefined && output.LoggingConfiguration !== null
|
|
1565
|
-
? deserializeAws_restJson1LoggingConfiguration(output.LoggingConfiguration, context)
|
|
1566
|
-
: undefined,
|
|
1567
|
-
MaxWorkers: __expectInt32(output.MaxWorkers),
|
|
1568
|
-
MinWorkers: __expectInt32(output.MinWorkers),
|
|
1569
|
-
Name: __expectString(output.Name),
|
|
1570
|
-
NetworkConfiguration:
|
|
1571
|
-
output.NetworkConfiguration !== undefined && output.NetworkConfiguration !== null
|
|
1572
|
-
? deserializeAws_restJson1NetworkConfiguration(output.NetworkConfiguration, context)
|
|
1573
|
-
: undefined,
|
|
1574
|
-
PluginsS3ObjectVersion: __expectString(output.PluginsS3ObjectVersion),
|
|
1575
|
-
PluginsS3Path: __expectString(output.PluginsS3Path),
|
|
1576
|
-
RequirementsS3ObjectVersion: __expectString(output.RequirementsS3ObjectVersion),
|
|
1577
|
-
RequirementsS3Path: __expectString(output.RequirementsS3Path),
|
|
1578
|
-
Schedulers: __expectInt32(output.Schedulers),
|
|
1579
|
-
ServiceRoleArn: __expectString(output.ServiceRoleArn),
|
|
1580
|
-
SourceBucketArn: __expectString(output.SourceBucketArn),
|
|
1581
|
-
Status: __expectString(output.Status),
|
|
1582
|
-
Tags:
|
|
1583
|
-
output.Tags !== undefined && output.Tags !== null
|
|
1584
|
-
? deserializeAws_restJson1TagMap(output.Tags, context)
|
|
1585
|
-
: undefined,
|
|
1586
|
-
WebserverAccessMode: __expectString(output.WebserverAccessMode),
|
|
1587
|
-
WebserverUrl: __expectString(output.WebserverUrl),
|
|
1588
|
-
WeeklyMaintenanceWindowStart: __expectString(output.WeeklyMaintenanceWindowStart),
|
|
1589
|
-
} as any;
|
|
1590
|
-
};
|
|
1591
|
-
|
|
1592
|
-
const deserializeAws_restJson1EnvironmentList = (output: any, context: __SerdeContext): string[] => {
|
|
1593
|
-
return (output || [])
|
|
1594
|
-
.filter((e: any) => e != null)
|
|
1595
|
-
.map((entry: any) => {
|
|
1596
|
-
if (entry === null) {
|
|
1597
|
-
return null as any;
|
|
1598
|
-
}
|
|
1599
|
-
return __expectString(entry) as any;
|
|
1600
|
-
});
|
|
1601
|
-
};
|
|
1602
|
-
|
|
1603
|
-
const deserializeAws_restJson1LastUpdate = (output: any, context: __SerdeContext): LastUpdate => {
|
|
1604
|
-
return {
|
|
1605
|
-
CreatedAt:
|
|
1606
|
-
output.CreatedAt !== undefined && output.CreatedAt !== null
|
|
1607
|
-
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreatedAt)))
|
|
1608
|
-
: undefined,
|
|
1609
|
-
Error:
|
|
1610
|
-
output.Error !== undefined && output.Error !== null
|
|
1611
|
-
? deserializeAws_restJson1UpdateError(output.Error, context)
|
|
1612
|
-
: undefined,
|
|
1613
|
-
Status: __expectString(output.Status),
|
|
1614
|
-
} as any;
|
|
1615
|
-
};
|
|
1616
|
-
|
|
1617
|
-
const deserializeAws_restJson1LoggingConfiguration = (output: any, context: __SerdeContext): LoggingConfiguration => {
|
|
1618
|
-
return {
|
|
1619
|
-
DagProcessingLogs:
|
|
1620
|
-
output.DagProcessingLogs !== undefined && output.DagProcessingLogs !== null
|
|
1621
|
-
? deserializeAws_restJson1ModuleLoggingConfiguration(output.DagProcessingLogs, context)
|
|
1622
|
-
: undefined,
|
|
1623
|
-
SchedulerLogs:
|
|
1624
|
-
output.SchedulerLogs !== undefined && output.SchedulerLogs !== null
|
|
1625
|
-
? deserializeAws_restJson1ModuleLoggingConfiguration(output.SchedulerLogs, context)
|
|
1626
|
-
: undefined,
|
|
1627
|
-
TaskLogs:
|
|
1628
|
-
output.TaskLogs !== undefined && output.TaskLogs !== null
|
|
1629
|
-
? deserializeAws_restJson1ModuleLoggingConfiguration(output.TaskLogs, context)
|
|
1630
|
-
: undefined,
|
|
1631
|
-
WebserverLogs:
|
|
1632
|
-
output.WebserverLogs !== undefined && output.WebserverLogs !== null
|
|
1633
|
-
? deserializeAws_restJson1ModuleLoggingConfiguration(output.WebserverLogs, context)
|
|
1634
|
-
: undefined,
|
|
1635
|
-
WorkerLogs:
|
|
1636
|
-
output.WorkerLogs !== undefined && output.WorkerLogs !== null
|
|
1637
|
-
? deserializeAws_restJson1ModuleLoggingConfiguration(output.WorkerLogs, context)
|
|
1638
|
-
: undefined,
|
|
1639
|
-
} as any;
|
|
1640
|
-
};
|
|
1641
|
-
|
|
1642
|
-
const deserializeAws_restJson1ModuleLoggingConfiguration = (
|
|
1643
|
-
output: any,
|
|
1644
|
-
context: __SerdeContext
|
|
1645
|
-
): ModuleLoggingConfiguration => {
|
|
1646
|
-
return {
|
|
1647
|
-
CloudWatchLogGroupArn: __expectString(output.CloudWatchLogGroupArn),
|
|
1648
|
-
Enabled: __expectBoolean(output.Enabled),
|
|
1649
|
-
LogLevel: __expectString(output.LogLevel),
|
|
1650
|
-
} as any;
|
|
1651
|
-
};
|
|
1652
|
-
|
|
1653
|
-
const deserializeAws_restJson1NetworkConfiguration = (output: any, context: __SerdeContext): NetworkConfiguration => {
|
|
1654
|
-
return {
|
|
1655
|
-
SecurityGroupIds:
|
|
1656
|
-
output.SecurityGroupIds !== undefined && output.SecurityGroupIds !== null
|
|
1657
|
-
? deserializeAws_restJson1SecurityGroupList(output.SecurityGroupIds, context)
|
|
1658
|
-
: undefined,
|
|
1659
|
-
SubnetIds:
|
|
1660
|
-
output.SubnetIds !== undefined && output.SubnetIds !== null
|
|
1661
|
-
? deserializeAws_restJson1SubnetList(output.SubnetIds, context)
|
|
1662
|
-
: undefined,
|
|
1663
|
-
} as any;
|
|
1664
|
-
};
|
|
1665
|
-
|
|
1666
|
-
const deserializeAws_restJson1SecurityGroupList = (output: any, context: __SerdeContext): string[] => {
|
|
1667
|
-
return (output || [])
|
|
1668
|
-
.filter((e: any) => e != null)
|
|
1669
|
-
.map((entry: any) => {
|
|
1670
|
-
if (entry === null) {
|
|
1671
|
-
return null as any;
|
|
1672
|
-
}
|
|
1673
|
-
return __expectString(entry) as any;
|
|
1674
|
-
});
|
|
1675
|
-
};
|
|
1676
|
-
|
|
1677
|
-
const deserializeAws_restJson1SubnetList = (output: any, context: __SerdeContext): string[] => {
|
|
1678
|
-
return (output || [])
|
|
1679
|
-
.filter((e: any) => e != null)
|
|
1680
|
-
.map((entry: any) => {
|
|
1681
|
-
if (entry === null) {
|
|
1682
|
-
return null as any;
|
|
1683
|
-
}
|
|
1684
|
-
return __expectString(entry) as any;
|
|
1685
|
-
});
|
|
1686
|
-
};
|
|
1687
|
-
|
|
1688
|
-
const deserializeAws_restJson1TagMap = (output: any, context: __SerdeContext): { [key: string]: string } => {
|
|
1689
|
-
return Object.entries(output).reduce((acc: { [key: string]: string }, [key, value]: [string, any]) => {
|
|
1690
|
-
if (value === null) {
|
|
1691
|
-
return acc;
|
|
1692
|
-
}
|
|
1693
|
-
return {
|
|
1694
|
-
...acc,
|
|
1695
|
-
[key]: __expectString(value) as any,
|
|
1696
|
-
};
|
|
1697
|
-
}, {});
|
|
1698
|
-
};
|
|
1699
|
-
|
|
1700
|
-
const deserializeAws_restJson1UpdateError = (output: any, context: __SerdeContext): UpdateError => {
|
|
1701
|
-
return {
|
|
1702
|
-
ErrorCode: __expectString(output.ErrorCode),
|
|
1703
|
-
ErrorMessage: __expectString(output.ErrorMessage),
|
|
1704
|
-
} as any;
|
|
1705
|
-
};
|
|
1706
|
-
|
|
1707
|
-
const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({
|
|
1708
|
-
httpStatusCode: output.statusCode,
|
|
1709
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1710
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1711
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1712
|
-
});
|
|
1713
|
-
|
|
1714
|
-
// Collect low-level response body stream to Uint8Array.
|
|
1715
|
-
const collectBody = (streamBody: any = new Uint8Array(), context: __SerdeContext): Promise<Uint8Array> => {
|
|
1716
|
-
if (streamBody instanceof Uint8Array) {
|
|
1717
|
-
return Promise.resolve(streamBody);
|
|
1718
|
-
}
|
|
1719
|
-
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1720
|
-
};
|
|
1721
|
-
|
|
1722
|
-
// Encode Uint8Array data into string with utf-8.
|
|
1723
|
-
const collectBodyString = (streamBody: any, context: __SerdeContext): Promise<string> =>
|
|
1724
|
-
collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1725
|
-
|
|
1726
|
-
const isSerializableHeaderValue = (value: any): boolean =>
|
|
1727
|
-
value !== undefined &&
|
|
1728
|
-
value !== null &&
|
|
1729
|
-
value !== "" &&
|
|
1730
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1731
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1732
|
-
|
|
1733
|
-
const parseBody = (streamBody: any, context: __SerdeContext): any =>
|
|
1734
|
-
collectBodyString(streamBody, context).then((encoded) => {
|
|
1735
|
-
if (encoded.length) {
|
|
1736
|
-
return JSON.parse(encoded);
|
|
1737
|
-
}
|
|
1738
|
-
return {};
|
|
1739
|
-
});
|
|
1740
|
-
|
|
1741
|
-
/**
|
|
1742
|
-
* Load an error code for the aws.rest-json-1.1 protocol.
|
|
1743
|
-
*/
|
|
1744
|
-
const loadRestJsonErrorCode = (output: __HttpResponse, data: any): string => {
|
|
1745
|
-
const findKey = (object: any, key: string) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1746
|
-
|
|
1747
|
-
const sanitizeErrorCode = (rawValue: string): string => {
|
|
1748
|
-
let cleanValue = rawValue;
|
|
1749
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1750
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1751
|
-
}
|
|
1752
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1753
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1754
|
-
}
|
|
1755
|
-
return cleanValue;
|
|
1756
|
-
};
|
|
1757
|
-
|
|
1758
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1759
|
-
if (headerKey !== undefined) {
|
|
1760
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
if (data.code !== undefined) {
|
|
1764
|
-
return sanitizeErrorCode(data.code);
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
if (data["__type"] !== undefined) {
|
|
1768
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
return "";
|
|
1772
|
-
};
|