@aws-sdk/client-controltower 3.489.0 → 3.495.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/dist-cjs/ControlTower.js +1 -43
- package/dist-cjs/ControlTowerClient.js +1 -43
- package/dist-cjs/commands/CreateLandingZoneCommand.js +1 -28
- package/dist-cjs/commands/DeleteLandingZoneCommand.js +1 -28
- package/dist-cjs/commands/DisableControlCommand.js +1 -28
- package/dist-cjs/commands/EnableControlCommand.js +1 -28
- package/dist-cjs/commands/GetControlOperationCommand.js +1 -28
- package/dist-cjs/commands/GetEnabledControlCommand.js +1 -28
- package/dist-cjs/commands/GetLandingZoneCommand.js +1 -28
- package/dist-cjs/commands/GetLandingZoneOperationCommand.js +1 -28
- package/dist-cjs/commands/ListEnabledControlsCommand.js +1 -28
- package/dist-cjs/commands/ListLandingZonesCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/ResetLandingZoneCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateEnabledControlCommand.js +1 -28
- package/dist-cjs/commands/UpdateLandingZoneCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -19
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +1877 -11
- package/dist-cjs/models/ControlTowerServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -143
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListEnabledControlsPaginator.js +1 -7
- package/dist-cjs/pagination/ListLandingZonesPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -6
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1209
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1209 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateLandingZoneCommand = exports.de_UpdateEnabledControlCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_ResetLandingZoneCommand = exports.de_ListTagsForResourceCommand = exports.de_ListLandingZonesCommand = exports.de_ListEnabledControlsCommand = exports.de_GetLandingZoneOperationCommand = exports.de_GetLandingZoneCommand = exports.de_GetEnabledControlCommand = exports.de_GetControlOperationCommand = exports.de_EnableControlCommand = exports.de_DisableControlCommand = exports.de_DeleteLandingZoneCommand = exports.de_CreateLandingZoneCommand = exports.se_UpdateLandingZoneCommand = exports.se_UpdateEnabledControlCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_ResetLandingZoneCommand = exports.se_ListTagsForResourceCommand = exports.se_ListLandingZonesCommand = exports.se_ListEnabledControlsCommand = exports.se_GetLandingZoneOperationCommand = exports.se_GetLandingZoneCommand = exports.se_GetEnabledControlCommand = exports.se_GetControlOperationCommand = exports.se_EnableControlCommand = exports.se_DisableControlCommand = exports.se_DeleteLandingZoneCommand = exports.se_CreateLandingZoneCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const ControlTowerServiceException_1 = require("../models/ControlTowerServiceException");
|
|
7
|
-
const models_0_1 = require("../models/models_0");
|
|
8
|
-
const se_CreateLandingZoneCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/create-landingzone");
|
|
14
|
-
let body;
|
|
15
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
16
|
-
manifest: (_) => se_Manifest(_, context),
|
|
17
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
18
|
-
version: [],
|
|
19
|
-
}));
|
|
20
|
-
b.m("POST").h(headers).b(body);
|
|
21
|
-
return b.build();
|
|
22
|
-
};
|
|
23
|
-
exports.se_CreateLandingZoneCommand = se_CreateLandingZoneCommand;
|
|
24
|
-
const se_DeleteLandingZoneCommand = async (input, context) => {
|
|
25
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
26
|
-
const headers = {
|
|
27
|
-
"content-type": "application/json",
|
|
28
|
-
};
|
|
29
|
-
b.bp("/delete-landingzone");
|
|
30
|
-
let body;
|
|
31
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
32
|
-
landingZoneIdentifier: [],
|
|
33
|
-
}));
|
|
34
|
-
b.m("POST").h(headers).b(body);
|
|
35
|
-
return b.build();
|
|
36
|
-
};
|
|
37
|
-
exports.se_DeleteLandingZoneCommand = se_DeleteLandingZoneCommand;
|
|
38
|
-
const se_DisableControlCommand = async (input, context) => {
|
|
39
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
40
|
-
const headers = {
|
|
41
|
-
"content-type": "application/json",
|
|
42
|
-
};
|
|
43
|
-
b.bp("/disable-control");
|
|
44
|
-
let body;
|
|
45
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
46
|
-
controlIdentifier: [],
|
|
47
|
-
targetIdentifier: [],
|
|
48
|
-
}));
|
|
49
|
-
b.m("POST").h(headers).b(body);
|
|
50
|
-
return b.build();
|
|
51
|
-
};
|
|
52
|
-
exports.se_DisableControlCommand = se_DisableControlCommand;
|
|
53
|
-
const se_EnableControlCommand = async (input, context) => {
|
|
54
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
55
|
-
const headers = {
|
|
56
|
-
"content-type": "application/json",
|
|
57
|
-
};
|
|
58
|
-
b.bp("/enable-control");
|
|
59
|
-
let body;
|
|
60
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
61
|
-
controlIdentifier: [],
|
|
62
|
-
parameters: (_) => se_EnabledControlParameters(_, context),
|
|
63
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
64
|
-
targetIdentifier: [],
|
|
65
|
-
}));
|
|
66
|
-
b.m("POST").h(headers).b(body);
|
|
67
|
-
return b.build();
|
|
68
|
-
};
|
|
69
|
-
exports.se_EnableControlCommand = se_EnableControlCommand;
|
|
70
|
-
const se_GetControlOperationCommand = async (input, context) => {
|
|
71
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
72
|
-
const headers = {
|
|
73
|
-
"content-type": "application/json",
|
|
74
|
-
};
|
|
75
|
-
b.bp("/get-control-operation");
|
|
76
|
-
let body;
|
|
77
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
78
|
-
operationIdentifier: [],
|
|
79
|
-
}));
|
|
80
|
-
b.m("POST").h(headers).b(body);
|
|
81
|
-
return b.build();
|
|
82
|
-
};
|
|
83
|
-
exports.se_GetControlOperationCommand = se_GetControlOperationCommand;
|
|
84
|
-
const se_GetEnabledControlCommand = async (input, context) => {
|
|
85
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
86
|
-
const headers = {
|
|
87
|
-
"content-type": "application/json",
|
|
88
|
-
};
|
|
89
|
-
b.bp("/get-enabled-control");
|
|
90
|
-
let body;
|
|
91
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
92
|
-
enabledControlIdentifier: [],
|
|
93
|
-
}));
|
|
94
|
-
b.m("POST").h(headers).b(body);
|
|
95
|
-
return b.build();
|
|
96
|
-
};
|
|
97
|
-
exports.se_GetEnabledControlCommand = se_GetEnabledControlCommand;
|
|
98
|
-
const se_GetLandingZoneCommand = async (input, context) => {
|
|
99
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
100
|
-
const headers = {
|
|
101
|
-
"content-type": "application/json",
|
|
102
|
-
};
|
|
103
|
-
b.bp("/get-landingzone");
|
|
104
|
-
let body;
|
|
105
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
106
|
-
landingZoneIdentifier: [],
|
|
107
|
-
}));
|
|
108
|
-
b.m("POST").h(headers).b(body);
|
|
109
|
-
return b.build();
|
|
110
|
-
};
|
|
111
|
-
exports.se_GetLandingZoneCommand = se_GetLandingZoneCommand;
|
|
112
|
-
const se_GetLandingZoneOperationCommand = async (input, context) => {
|
|
113
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
114
|
-
const headers = {
|
|
115
|
-
"content-type": "application/json",
|
|
116
|
-
};
|
|
117
|
-
b.bp("/get-landingzone-operation");
|
|
118
|
-
let body;
|
|
119
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
120
|
-
operationIdentifier: [],
|
|
121
|
-
}));
|
|
122
|
-
b.m("POST").h(headers).b(body);
|
|
123
|
-
return b.build();
|
|
124
|
-
};
|
|
125
|
-
exports.se_GetLandingZoneOperationCommand = se_GetLandingZoneOperationCommand;
|
|
126
|
-
const se_ListEnabledControlsCommand = async (input, context) => {
|
|
127
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
128
|
-
const headers = {
|
|
129
|
-
"content-type": "application/json",
|
|
130
|
-
};
|
|
131
|
-
b.bp("/list-enabled-controls");
|
|
132
|
-
let body;
|
|
133
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
134
|
-
maxResults: [],
|
|
135
|
-
nextToken: [],
|
|
136
|
-
targetIdentifier: [],
|
|
137
|
-
}));
|
|
138
|
-
b.m("POST").h(headers).b(body);
|
|
139
|
-
return b.build();
|
|
140
|
-
};
|
|
141
|
-
exports.se_ListEnabledControlsCommand = se_ListEnabledControlsCommand;
|
|
142
|
-
const se_ListLandingZonesCommand = async (input, context) => {
|
|
143
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
144
|
-
const headers = {
|
|
145
|
-
"content-type": "application/json",
|
|
146
|
-
};
|
|
147
|
-
b.bp("/list-landingzones");
|
|
148
|
-
let body;
|
|
149
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
150
|
-
maxResults: [],
|
|
151
|
-
nextToken: [],
|
|
152
|
-
}));
|
|
153
|
-
b.m("POST").h(headers).b(body);
|
|
154
|
-
return b.build();
|
|
155
|
-
};
|
|
156
|
-
exports.se_ListLandingZonesCommand = se_ListLandingZonesCommand;
|
|
157
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
158
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
159
|
-
const headers = {};
|
|
160
|
-
b.bp("/tags/{resourceArn}");
|
|
161
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
162
|
-
let body;
|
|
163
|
-
b.m("GET").h(headers).b(body);
|
|
164
|
-
return b.build();
|
|
165
|
-
};
|
|
166
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
167
|
-
const se_ResetLandingZoneCommand = async (input, context) => {
|
|
168
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
169
|
-
const headers = {
|
|
170
|
-
"content-type": "application/json",
|
|
171
|
-
};
|
|
172
|
-
b.bp("/reset-landingzone");
|
|
173
|
-
let body;
|
|
174
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
175
|
-
landingZoneIdentifier: [],
|
|
176
|
-
}));
|
|
177
|
-
b.m("POST").h(headers).b(body);
|
|
178
|
-
return b.build();
|
|
179
|
-
};
|
|
180
|
-
exports.se_ResetLandingZoneCommand = se_ResetLandingZoneCommand;
|
|
181
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
182
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
183
|
-
const headers = {
|
|
184
|
-
"content-type": "application/json",
|
|
185
|
-
};
|
|
186
|
-
b.bp("/tags/{resourceArn}");
|
|
187
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
188
|
-
let body;
|
|
189
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
190
|
-
tags: (_) => (0, smithy_client_1._json)(_),
|
|
191
|
-
}));
|
|
192
|
-
b.m("POST").h(headers).b(body);
|
|
193
|
-
return b.build();
|
|
194
|
-
};
|
|
195
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
196
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
197
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
198
|
-
const headers = {};
|
|
199
|
-
b.bp("/tags/{resourceArn}");
|
|
200
|
-
b.p("resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
201
|
-
const query = (0, smithy_client_1.map)({
|
|
202
|
-
[_tK]: [
|
|
203
|
-
(0, smithy_client_1.expectNonNull)(input.tagKeys, `tagKeys`) != null,
|
|
204
|
-
() => (input[_tK] || []).map((_entry) => _entry),
|
|
205
|
-
],
|
|
206
|
-
});
|
|
207
|
-
let body;
|
|
208
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
209
|
-
return b.build();
|
|
210
|
-
};
|
|
211
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
212
|
-
const se_UpdateEnabledControlCommand = async (input, context) => {
|
|
213
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
214
|
-
const headers = {
|
|
215
|
-
"content-type": "application/json",
|
|
216
|
-
};
|
|
217
|
-
b.bp("/update-enabled-control");
|
|
218
|
-
let body;
|
|
219
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
220
|
-
enabledControlIdentifier: [],
|
|
221
|
-
parameters: (_) => se_EnabledControlParameters(_, context),
|
|
222
|
-
}));
|
|
223
|
-
b.m("POST").h(headers).b(body);
|
|
224
|
-
return b.build();
|
|
225
|
-
};
|
|
226
|
-
exports.se_UpdateEnabledControlCommand = se_UpdateEnabledControlCommand;
|
|
227
|
-
const se_UpdateLandingZoneCommand = async (input, context) => {
|
|
228
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
229
|
-
const headers = {
|
|
230
|
-
"content-type": "application/json",
|
|
231
|
-
};
|
|
232
|
-
b.bp("/update-landingzone");
|
|
233
|
-
let body;
|
|
234
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
235
|
-
landingZoneIdentifier: [],
|
|
236
|
-
manifest: (_) => se_Manifest(_, context),
|
|
237
|
-
version: [],
|
|
238
|
-
}));
|
|
239
|
-
b.m("POST").h(headers).b(body);
|
|
240
|
-
return b.build();
|
|
241
|
-
};
|
|
242
|
-
exports.se_UpdateLandingZoneCommand = se_UpdateLandingZoneCommand;
|
|
243
|
-
const de_CreateLandingZoneCommand = async (output, context) => {
|
|
244
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
245
|
-
return de_CreateLandingZoneCommandError(output, context);
|
|
246
|
-
}
|
|
247
|
-
const contents = (0, smithy_client_1.map)({
|
|
248
|
-
$metadata: deserializeMetadata(output),
|
|
249
|
-
});
|
|
250
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
251
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
252
|
-
arn: smithy_client_1.expectString,
|
|
253
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
254
|
-
});
|
|
255
|
-
Object.assign(contents, doc);
|
|
256
|
-
return contents;
|
|
257
|
-
};
|
|
258
|
-
exports.de_CreateLandingZoneCommand = de_CreateLandingZoneCommand;
|
|
259
|
-
const de_CreateLandingZoneCommandError = async (output, context) => {
|
|
260
|
-
const parsedOutput = {
|
|
261
|
-
...output,
|
|
262
|
-
body: await parseErrorBody(output.body, context),
|
|
263
|
-
};
|
|
264
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
265
|
-
switch (errorCode) {
|
|
266
|
-
case "AccessDeniedException":
|
|
267
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
268
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
269
|
-
case "ConflictException":
|
|
270
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
271
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
272
|
-
case "InternalServerException":
|
|
273
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
274
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
275
|
-
case "ThrottlingException":
|
|
276
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
277
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
278
|
-
case "ValidationException":
|
|
279
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
280
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
281
|
-
default:
|
|
282
|
-
const parsedBody = parsedOutput.body;
|
|
283
|
-
return throwDefaultError({
|
|
284
|
-
output,
|
|
285
|
-
parsedBody,
|
|
286
|
-
errorCode,
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
};
|
|
290
|
-
const de_DeleteLandingZoneCommand = async (output, context) => {
|
|
291
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
292
|
-
return de_DeleteLandingZoneCommandError(output, context);
|
|
293
|
-
}
|
|
294
|
-
const contents = (0, smithy_client_1.map)({
|
|
295
|
-
$metadata: deserializeMetadata(output),
|
|
296
|
-
});
|
|
297
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
298
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
299
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
300
|
-
});
|
|
301
|
-
Object.assign(contents, doc);
|
|
302
|
-
return contents;
|
|
303
|
-
};
|
|
304
|
-
exports.de_DeleteLandingZoneCommand = de_DeleteLandingZoneCommand;
|
|
305
|
-
const de_DeleteLandingZoneCommandError = async (output, context) => {
|
|
306
|
-
const parsedOutput = {
|
|
307
|
-
...output,
|
|
308
|
-
body: await parseErrorBody(output.body, context),
|
|
309
|
-
};
|
|
310
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
311
|
-
switch (errorCode) {
|
|
312
|
-
case "AccessDeniedException":
|
|
313
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
314
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
315
|
-
case "ConflictException":
|
|
316
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
317
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
318
|
-
case "InternalServerException":
|
|
319
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
320
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
321
|
-
case "ResourceNotFoundException":
|
|
322
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
323
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
324
|
-
case "ThrottlingException":
|
|
325
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
326
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
327
|
-
case "ValidationException":
|
|
328
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
329
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
330
|
-
default:
|
|
331
|
-
const parsedBody = parsedOutput.body;
|
|
332
|
-
return throwDefaultError({
|
|
333
|
-
output,
|
|
334
|
-
parsedBody,
|
|
335
|
-
errorCode,
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
const de_DisableControlCommand = async (output, context) => {
|
|
340
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
341
|
-
return de_DisableControlCommandError(output, context);
|
|
342
|
-
}
|
|
343
|
-
const contents = (0, smithy_client_1.map)({
|
|
344
|
-
$metadata: deserializeMetadata(output),
|
|
345
|
-
});
|
|
346
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
347
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
348
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
349
|
-
});
|
|
350
|
-
Object.assign(contents, doc);
|
|
351
|
-
return contents;
|
|
352
|
-
};
|
|
353
|
-
exports.de_DisableControlCommand = de_DisableControlCommand;
|
|
354
|
-
const de_DisableControlCommandError = async (output, context) => {
|
|
355
|
-
const parsedOutput = {
|
|
356
|
-
...output,
|
|
357
|
-
body: await parseErrorBody(output.body, context),
|
|
358
|
-
};
|
|
359
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
360
|
-
switch (errorCode) {
|
|
361
|
-
case "AccessDeniedException":
|
|
362
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
363
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
364
|
-
case "ConflictException":
|
|
365
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
366
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
367
|
-
case "InternalServerException":
|
|
368
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
369
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
370
|
-
case "ResourceNotFoundException":
|
|
371
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
372
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
373
|
-
case "ServiceQuotaExceededException":
|
|
374
|
-
case "com.amazonaws.controltower#ServiceQuotaExceededException":
|
|
375
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
376
|
-
case "ThrottlingException":
|
|
377
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
378
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
379
|
-
case "ValidationException":
|
|
380
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
381
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
382
|
-
default:
|
|
383
|
-
const parsedBody = parsedOutput.body;
|
|
384
|
-
return throwDefaultError({
|
|
385
|
-
output,
|
|
386
|
-
parsedBody,
|
|
387
|
-
errorCode,
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
const de_EnableControlCommand = async (output, context) => {
|
|
392
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
393
|
-
return de_EnableControlCommandError(output, context);
|
|
394
|
-
}
|
|
395
|
-
const contents = (0, smithy_client_1.map)({
|
|
396
|
-
$metadata: deserializeMetadata(output),
|
|
397
|
-
});
|
|
398
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
399
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
400
|
-
arn: smithy_client_1.expectString,
|
|
401
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
402
|
-
});
|
|
403
|
-
Object.assign(contents, doc);
|
|
404
|
-
return contents;
|
|
405
|
-
};
|
|
406
|
-
exports.de_EnableControlCommand = de_EnableControlCommand;
|
|
407
|
-
const de_EnableControlCommandError = async (output, context) => {
|
|
408
|
-
const parsedOutput = {
|
|
409
|
-
...output,
|
|
410
|
-
body: await parseErrorBody(output.body, context),
|
|
411
|
-
};
|
|
412
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
413
|
-
switch (errorCode) {
|
|
414
|
-
case "AccessDeniedException":
|
|
415
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
416
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
417
|
-
case "ConflictException":
|
|
418
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
419
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
420
|
-
case "InternalServerException":
|
|
421
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
422
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
423
|
-
case "ResourceNotFoundException":
|
|
424
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
425
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
426
|
-
case "ServiceQuotaExceededException":
|
|
427
|
-
case "com.amazonaws.controltower#ServiceQuotaExceededException":
|
|
428
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
429
|
-
case "ThrottlingException":
|
|
430
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
431
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
432
|
-
case "ValidationException":
|
|
433
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
434
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
435
|
-
default:
|
|
436
|
-
const parsedBody = parsedOutput.body;
|
|
437
|
-
return throwDefaultError({
|
|
438
|
-
output,
|
|
439
|
-
parsedBody,
|
|
440
|
-
errorCode,
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
const de_GetControlOperationCommand = async (output, context) => {
|
|
445
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
446
|
-
return de_GetControlOperationCommandError(output, context);
|
|
447
|
-
}
|
|
448
|
-
const contents = (0, smithy_client_1.map)({
|
|
449
|
-
$metadata: deserializeMetadata(output),
|
|
450
|
-
});
|
|
451
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
452
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
453
|
-
controlOperation: (_) => de_ControlOperation(_, context),
|
|
454
|
-
});
|
|
455
|
-
Object.assign(contents, doc);
|
|
456
|
-
return contents;
|
|
457
|
-
};
|
|
458
|
-
exports.de_GetControlOperationCommand = de_GetControlOperationCommand;
|
|
459
|
-
const de_GetControlOperationCommandError = async (output, context) => {
|
|
460
|
-
const parsedOutput = {
|
|
461
|
-
...output,
|
|
462
|
-
body: await parseErrorBody(output.body, context),
|
|
463
|
-
};
|
|
464
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
465
|
-
switch (errorCode) {
|
|
466
|
-
case "AccessDeniedException":
|
|
467
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
468
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
469
|
-
case "InternalServerException":
|
|
470
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
471
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
472
|
-
case "ResourceNotFoundException":
|
|
473
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
474
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
475
|
-
case "ThrottlingException":
|
|
476
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
477
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
478
|
-
case "ValidationException":
|
|
479
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
480
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
481
|
-
default:
|
|
482
|
-
const parsedBody = parsedOutput.body;
|
|
483
|
-
return throwDefaultError({
|
|
484
|
-
output,
|
|
485
|
-
parsedBody,
|
|
486
|
-
errorCode,
|
|
487
|
-
});
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
const de_GetEnabledControlCommand = async (output, context) => {
|
|
491
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
492
|
-
return de_GetEnabledControlCommandError(output, context);
|
|
493
|
-
}
|
|
494
|
-
const contents = (0, smithy_client_1.map)({
|
|
495
|
-
$metadata: deserializeMetadata(output),
|
|
496
|
-
});
|
|
497
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
498
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
499
|
-
enabledControlDetails: (_) => de_EnabledControlDetails(_, context),
|
|
500
|
-
});
|
|
501
|
-
Object.assign(contents, doc);
|
|
502
|
-
return contents;
|
|
503
|
-
};
|
|
504
|
-
exports.de_GetEnabledControlCommand = de_GetEnabledControlCommand;
|
|
505
|
-
const de_GetEnabledControlCommandError = async (output, context) => {
|
|
506
|
-
const parsedOutput = {
|
|
507
|
-
...output,
|
|
508
|
-
body: await parseErrorBody(output.body, context),
|
|
509
|
-
};
|
|
510
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
511
|
-
switch (errorCode) {
|
|
512
|
-
case "AccessDeniedException":
|
|
513
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
514
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
515
|
-
case "InternalServerException":
|
|
516
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
517
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
518
|
-
case "ResourceNotFoundException":
|
|
519
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
520
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
521
|
-
case "ThrottlingException":
|
|
522
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
523
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
524
|
-
case "ValidationException":
|
|
525
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
526
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
527
|
-
default:
|
|
528
|
-
const parsedBody = parsedOutput.body;
|
|
529
|
-
return throwDefaultError({
|
|
530
|
-
output,
|
|
531
|
-
parsedBody,
|
|
532
|
-
errorCode,
|
|
533
|
-
});
|
|
534
|
-
}
|
|
535
|
-
};
|
|
536
|
-
const de_GetLandingZoneCommand = async (output, context) => {
|
|
537
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
538
|
-
return de_GetLandingZoneCommandError(output, context);
|
|
539
|
-
}
|
|
540
|
-
const contents = (0, smithy_client_1.map)({
|
|
541
|
-
$metadata: deserializeMetadata(output),
|
|
542
|
-
});
|
|
543
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
544
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
545
|
-
landingZone: (_) => de_LandingZoneDetail(_, context),
|
|
546
|
-
});
|
|
547
|
-
Object.assign(contents, doc);
|
|
548
|
-
return contents;
|
|
549
|
-
};
|
|
550
|
-
exports.de_GetLandingZoneCommand = de_GetLandingZoneCommand;
|
|
551
|
-
const de_GetLandingZoneCommandError = async (output, context) => {
|
|
552
|
-
const parsedOutput = {
|
|
553
|
-
...output,
|
|
554
|
-
body: await parseErrorBody(output.body, context),
|
|
555
|
-
};
|
|
556
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
557
|
-
switch (errorCode) {
|
|
558
|
-
case "AccessDeniedException":
|
|
559
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
560
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
561
|
-
case "InternalServerException":
|
|
562
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
563
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
564
|
-
case "ResourceNotFoundException":
|
|
565
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
566
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
567
|
-
case "ThrottlingException":
|
|
568
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
569
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
570
|
-
case "ValidationException":
|
|
571
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
572
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
573
|
-
default:
|
|
574
|
-
const parsedBody = parsedOutput.body;
|
|
575
|
-
return throwDefaultError({
|
|
576
|
-
output,
|
|
577
|
-
parsedBody,
|
|
578
|
-
errorCode,
|
|
579
|
-
});
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
const de_GetLandingZoneOperationCommand = async (output, context) => {
|
|
583
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
584
|
-
return de_GetLandingZoneOperationCommandError(output, context);
|
|
585
|
-
}
|
|
586
|
-
const contents = (0, smithy_client_1.map)({
|
|
587
|
-
$metadata: deserializeMetadata(output),
|
|
588
|
-
});
|
|
589
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
590
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
591
|
-
operationDetails: (_) => de_LandingZoneOperationDetail(_, context),
|
|
592
|
-
});
|
|
593
|
-
Object.assign(contents, doc);
|
|
594
|
-
return contents;
|
|
595
|
-
};
|
|
596
|
-
exports.de_GetLandingZoneOperationCommand = de_GetLandingZoneOperationCommand;
|
|
597
|
-
const de_GetLandingZoneOperationCommandError = async (output, context) => {
|
|
598
|
-
const parsedOutput = {
|
|
599
|
-
...output,
|
|
600
|
-
body: await parseErrorBody(output.body, context),
|
|
601
|
-
};
|
|
602
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
603
|
-
switch (errorCode) {
|
|
604
|
-
case "AccessDeniedException":
|
|
605
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
606
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
607
|
-
case "InternalServerException":
|
|
608
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
609
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
610
|
-
case "ResourceNotFoundException":
|
|
611
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
612
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
613
|
-
case "ThrottlingException":
|
|
614
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
615
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
616
|
-
case "ValidationException":
|
|
617
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
618
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
619
|
-
default:
|
|
620
|
-
const parsedBody = parsedOutput.body;
|
|
621
|
-
return throwDefaultError({
|
|
622
|
-
output,
|
|
623
|
-
parsedBody,
|
|
624
|
-
errorCode,
|
|
625
|
-
});
|
|
626
|
-
}
|
|
627
|
-
};
|
|
628
|
-
const de_ListEnabledControlsCommand = async (output, context) => {
|
|
629
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
630
|
-
return de_ListEnabledControlsCommandError(output, context);
|
|
631
|
-
}
|
|
632
|
-
const contents = (0, smithy_client_1.map)({
|
|
633
|
-
$metadata: deserializeMetadata(output),
|
|
634
|
-
});
|
|
635
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
636
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
637
|
-
enabledControls: smithy_client_1._json,
|
|
638
|
-
nextToken: smithy_client_1.expectString,
|
|
639
|
-
});
|
|
640
|
-
Object.assign(contents, doc);
|
|
641
|
-
return contents;
|
|
642
|
-
};
|
|
643
|
-
exports.de_ListEnabledControlsCommand = de_ListEnabledControlsCommand;
|
|
644
|
-
const de_ListEnabledControlsCommandError = async (output, context) => {
|
|
645
|
-
const parsedOutput = {
|
|
646
|
-
...output,
|
|
647
|
-
body: await parseErrorBody(output.body, context),
|
|
648
|
-
};
|
|
649
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
650
|
-
switch (errorCode) {
|
|
651
|
-
case "AccessDeniedException":
|
|
652
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
653
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
654
|
-
case "InternalServerException":
|
|
655
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
656
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
657
|
-
case "ResourceNotFoundException":
|
|
658
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
659
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
660
|
-
case "ThrottlingException":
|
|
661
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
662
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
663
|
-
case "ValidationException":
|
|
664
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
665
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
666
|
-
default:
|
|
667
|
-
const parsedBody = parsedOutput.body;
|
|
668
|
-
return throwDefaultError({
|
|
669
|
-
output,
|
|
670
|
-
parsedBody,
|
|
671
|
-
errorCode,
|
|
672
|
-
});
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
const de_ListLandingZonesCommand = async (output, context) => {
|
|
676
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
677
|
-
return de_ListLandingZonesCommandError(output, context);
|
|
678
|
-
}
|
|
679
|
-
const contents = (0, smithy_client_1.map)({
|
|
680
|
-
$metadata: deserializeMetadata(output),
|
|
681
|
-
});
|
|
682
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
683
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
684
|
-
landingZones: smithy_client_1._json,
|
|
685
|
-
nextToken: smithy_client_1.expectString,
|
|
686
|
-
});
|
|
687
|
-
Object.assign(contents, doc);
|
|
688
|
-
return contents;
|
|
689
|
-
};
|
|
690
|
-
exports.de_ListLandingZonesCommand = de_ListLandingZonesCommand;
|
|
691
|
-
const de_ListLandingZonesCommandError = async (output, context) => {
|
|
692
|
-
const parsedOutput = {
|
|
693
|
-
...output,
|
|
694
|
-
body: await parseErrorBody(output.body, context),
|
|
695
|
-
};
|
|
696
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
697
|
-
switch (errorCode) {
|
|
698
|
-
case "AccessDeniedException":
|
|
699
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
700
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
701
|
-
case "InternalServerException":
|
|
702
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
703
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
704
|
-
case "ThrottlingException":
|
|
705
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
706
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
707
|
-
case "ValidationException":
|
|
708
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
709
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
710
|
-
default:
|
|
711
|
-
const parsedBody = parsedOutput.body;
|
|
712
|
-
return throwDefaultError({
|
|
713
|
-
output,
|
|
714
|
-
parsedBody,
|
|
715
|
-
errorCode,
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
720
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
721
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
722
|
-
}
|
|
723
|
-
const contents = (0, smithy_client_1.map)({
|
|
724
|
-
$metadata: deserializeMetadata(output),
|
|
725
|
-
});
|
|
726
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
727
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
728
|
-
tags: smithy_client_1._json,
|
|
729
|
-
});
|
|
730
|
-
Object.assign(contents, doc);
|
|
731
|
-
return contents;
|
|
732
|
-
};
|
|
733
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
734
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
735
|
-
const parsedOutput = {
|
|
736
|
-
...output,
|
|
737
|
-
body: await parseErrorBody(output.body, context),
|
|
738
|
-
};
|
|
739
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
740
|
-
switch (errorCode) {
|
|
741
|
-
case "InternalServerException":
|
|
742
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
743
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
744
|
-
case "ResourceNotFoundException":
|
|
745
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
746
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
747
|
-
case "ValidationException":
|
|
748
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
749
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
750
|
-
default:
|
|
751
|
-
const parsedBody = parsedOutput.body;
|
|
752
|
-
return throwDefaultError({
|
|
753
|
-
output,
|
|
754
|
-
parsedBody,
|
|
755
|
-
errorCode,
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
};
|
|
759
|
-
const de_ResetLandingZoneCommand = async (output, context) => {
|
|
760
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
761
|
-
return de_ResetLandingZoneCommandError(output, context);
|
|
762
|
-
}
|
|
763
|
-
const contents = (0, smithy_client_1.map)({
|
|
764
|
-
$metadata: deserializeMetadata(output),
|
|
765
|
-
});
|
|
766
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
767
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
768
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
769
|
-
});
|
|
770
|
-
Object.assign(contents, doc);
|
|
771
|
-
return contents;
|
|
772
|
-
};
|
|
773
|
-
exports.de_ResetLandingZoneCommand = de_ResetLandingZoneCommand;
|
|
774
|
-
const de_ResetLandingZoneCommandError = async (output, context) => {
|
|
775
|
-
const parsedOutput = {
|
|
776
|
-
...output,
|
|
777
|
-
body: await parseErrorBody(output.body, context),
|
|
778
|
-
};
|
|
779
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
780
|
-
switch (errorCode) {
|
|
781
|
-
case "AccessDeniedException":
|
|
782
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
783
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
784
|
-
case "ConflictException":
|
|
785
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
786
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
787
|
-
case "InternalServerException":
|
|
788
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
789
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
790
|
-
case "ResourceNotFoundException":
|
|
791
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
792
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
793
|
-
case "ThrottlingException":
|
|
794
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
795
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
796
|
-
case "ValidationException":
|
|
797
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
798
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
799
|
-
default:
|
|
800
|
-
const parsedBody = parsedOutput.body;
|
|
801
|
-
return throwDefaultError({
|
|
802
|
-
output,
|
|
803
|
-
parsedBody,
|
|
804
|
-
errorCode,
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
};
|
|
808
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
809
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
810
|
-
return de_TagResourceCommandError(output, context);
|
|
811
|
-
}
|
|
812
|
-
const contents = (0, smithy_client_1.map)({
|
|
813
|
-
$metadata: deserializeMetadata(output),
|
|
814
|
-
});
|
|
815
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
816
|
-
return contents;
|
|
817
|
-
};
|
|
818
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
819
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
820
|
-
const parsedOutput = {
|
|
821
|
-
...output,
|
|
822
|
-
body: await parseErrorBody(output.body, context),
|
|
823
|
-
};
|
|
824
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
825
|
-
switch (errorCode) {
|
|
826
|
-
case "InternalServerException":
|
|
827
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
828
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
829
|
-
case "ResourceNotFoundException":
|
|
830
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
831
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
832
|
-
case "ValidationException":
|
|
833
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
834
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
835
|
-
default:
|
|
836
|
-
const parsedBody = parsedOutput.body;
|
|
837
|
-
return throwDefaultError({
|
|
838
|
-
output,
|
|
839
|
-
parsedBody,
|
|
840
|
-
errorCode,
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
845
|
-
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
846
|
-
return de_UntagResourceCommandError(output, context);
|
|
847
|
-
}
|
|
848
|
-
const contents = (0, smithy_client_1.map)({
|
|
849
|
-
$metadata: deserializeMetadata(output),
|
|
850
|
-
});
|
|
851
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
852
|
-
return contents;
|
|
853
|
-
};
|
|
854
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
855
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
856
|
-
const parsedOutput = {
|
|
857
|
-
...output,
|
|
858
|
-
body: await parseErrorBody(output.body, context),
|
|
859
|
-
};
|
|
860
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
861
|
-
switch (errorCode) {
|
|
862
|
-
case "InternalServerException":
|
|
863
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
864
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
865
|
-
case "ResourceNotFoundException":
|
|
866
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
867
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
868
|
-
case "ValidationException":
|
|
869
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
870
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
871
|
-
default:
|
|
872
|
-
const parsedBody = parsedOutput.body;
|
|
873
|
-
return throwDefaultError({
|
|
874
|
-
output,
|
|
875
|
-
parsedBody,
|
|
876
|
-
errorCode,
|
|
877
|
-
});
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
const de_UpdateEnabledControlCommand = async (output, context) => {
|
|
881
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
882
|
-
return de_UpdateEnabledControlCommandError(output, context);
|
|
883
|
-
}
|
|
884
|
-
const contents = (0, smithy_client_1.map)({
|
|
885
|
-
$metadata: deserializeMetadata(output),
|
|
886
|
-
});
|
|
887
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
888
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
889
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
890
|
-
});
|
|
891
|
-
Object.assign(contents, doc);
|
|
892
|
-
return contents;
|
|
893
|
-
};
|
|
894
|
-
exports.de_UpdateEnabledControlCommand = de_UpdateEnabledControlCommand;
|
|
895
|
-
const de_UpdateEnabledControlCommandError = async (output, context) => {
|
|
896
|
-
const parsedOutput = {
|
|
897
|
-
...output,
|
|
898
|
-
body: await parseErrorBody(output.body, context),
|
|
899
|
-
};
|
|
900
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
901
|
-
switch (errorCode) {
|
|
902
|
-
case "AccessDeniedException":
|
|
903
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
904
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
905
|
-
case "ConflictException":
|
|
906
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
907
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
908
|
-
case "InternalServerException":
|
|
909
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
910
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
911
|
-
case "ResourceNotFoundException":
|
|
912
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
913
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
914
|
-
case "ServiceQuotaExceededException":
|
|
915
|
-
case "com.amazonaws.controltower#ServiceQuotaExceededException":
|
|
916
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
917
|
-
case "ThrottlingException":
|
|
918
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
919
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
920
|
-
case "ValidationException":
|
|
921
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
922
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
923
|
-
default:
|
|
924
|
-
const parsedBody = parsedOutput.body;
|
|
925
|
-
return throwDefaultError({
|
|
926
|
-
output,
|
|
927
|
-
parsedBody,
|
|
928
|
-
errorCode,
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
};
|
|
932
|
-
const de_UpdateLandingZoneCommand = async (output, context) => {
|
|
933
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
934
|
-
return de_UpdateLandingZoneCommandError(output, context);
|
|
935
|
-
}
|
|
936
|
-
const contents = (0, smithy_client_1.map)({
|
|
937
|
-
$metadata: deserializeMetadata(output),
|
|
938
|
-
});
|
|
939
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
940
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
941
|
-
operationIdentifier: smithy_client_1.expectString,
|
|
942
|
-
});
|
|
943
|
-
Object.assign(contents, doc);
|
|
944
|
-
return contents;
|
|
945
|
-
};
|
|
946
|
-
exports.de_UpdateLandingZoneCommand = de_UpdateLandingZoneCommand;
|
|
947
|
-
const de_UpdateLandingZoneCommandError = async (output, context) => {
|
|
948
|
-
const parsedOutput = {
|
|
949
|
-
...output,
|
|
950
|
-
body: await parseErrorBody(output.body, context),
|
|
951
|
-
};
|
|
952
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
953
|
-
switch (errorCode) {
|
|
954
|
-
case "AccessDeniedException":
|
|
955
|
-
case "com.amazonaws.controltower#AccessDeniedException":
|
|
956
|
-
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
957
|
-
case "ConflictException":
|
|
958
|
-
case "com.amazonaws.controltower#ConflictException":
|
|
959
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
960
|
-
case "InternalServerException":
|
|
961
|
-
case "com.amazonaws.controltower#InternalServerException":
|
|
962
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
963
|
-
case "ResourceNotFoundException":
|
|
964
|
-
case "com.amazonaws.controltower#ResourceNotFoundException":
|
|
965
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
966
|
-
case "ThrottlingException":
|
|
967
|
-
case "com.amazonaws.controltower#ThrottlingException":
|
|
968
|
-
throw await de_ThrottlingExceptionRes(parsedOutput, context);
|
|
969
|
-
case "ValidationException":
|
|
970
|
-
case "com.amazonaws.controltower#ValidationException":
|
|
971
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
972
|
-
default:
|
|
973
|
-
const parsedBody = parsedOutput.body;
|
|
974
|
-
return throwDefaultError({
|
|
975
|
-
output,
|
|
976
|
-
parsedBody,
|
|
977
|
-
errorCode,
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
};
|
|
981
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(ControlTowerServiceException_1.ControlTowerServiceException);
|
|
982
|
-
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
983
|
-
const contents = (0, smithy_client_1.map)({});
|
|
984
|
-
const data = parsedOutput.body;
|
|
985
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
986
|
-
message: smithy_client_1.expectString,
|
|
987
|
-
});
|
|
988
|
-
Object.assign(contents, doc);
|
|
989
|
-
const exception = new models_0_1.AccessDeniedException({
|
|
990
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
991
|
-
...contents,
|
|
992
|
-
});
|
|
993
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
994
|
-
};
|
|
995
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
996
|
-
const contents = (0, smithy_client_1.map)({});
|
|
997
|
-
const data = parsedOutput.body;
|
|
998
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
999
|
-
message: smithy_client_1.expectString,
|
|
1000
|
-
});
|
|
1001
|
-
Object.assign(contents, doc);
|
|
1002
|
-
const exception = new models_0_1.ConflictException({
|
|
1003
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1004
|
-
...contents,
|
|
1005
|
-
});
|
|
1006
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1007
|
-
};
|
|
1008
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1009
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1010
|
-
const data = parsedOutput.body;
|
|
1011
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1012
|
-
message: smithy_client_1.expectString,
|
|
1013
|
-
});
|
|
1014
|
-
Object.assign(contents, doc);
|
|
1015
|
-
const exception = new models_0_1.InternalServerException({
|
|
1016
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1017
|
-
...contents,
|
|
1018
|
-
});
|
|
1019
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1020
|
-
};
|
|
1021
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1022
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1023
|
-
const data = parsedOutput.body;
|
|
1024
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1025
|
-
message: smithy_client_1.expectString,
|
|
1026
|
-
});
|
|
1027
|
-
Object.assign(contents, doc);
|
|
1028
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1029
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1030
|
-
...contents,
|
|
1031
|
-
});
|
|
1032
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1033
|
-
};
|
|
1034
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1035
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1036
|
-
const data = parsedOutput.body;
|
|
1037
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1038
|
-
message: smithy_client_1.expectString,
|
|
1039
|
-
});
|
|
1040
|
-
Object.assign(contents, doc);
|
|
1041
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1042
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1043
|
-
...contents,
|
|
1044
|
-
});
|
|
1045
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1046
|
-
};
|
|
1047
|
-
const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
|
|
1048
|
-
const contents = (0, smithy_client_1.map)({
|
|
1049
|
-
[_rAS]: [() => void 0 !== parsedOutput.headers[_ra], () => (0, smithy_client_1.strictParseInt32)(parsedOutput.headers[_ra])],
|
|
1050
|
-
});
|
|
1051
|
-
const data = parsedOutput.body;
|
|
1052
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1053
|
-
message: smithy_client_1.expectString,
|
|
1054
|
-
quotaCode: smithy_client_1.expectString,
|
|
1055
|
-
serviceCode: smithy_client_1.expectString,
|
|
1056
|
-
});
|
|
1057
|
-
Object.assign(contents, doc);
|
|
1058
|
-
const exception = new models_0_1.ThrottlingException({
|
|
1059
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1060
|
-
...contents,
|
|
1061
|
-
});
|
|
1062
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1063
|
-
};
|
|
1064
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1065
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1066
|
-
const data = parsedOutput.body;
|
|
1067
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1068
|
-
message: smithy_client_1.expectString,
|
|
1069
|
-
});
|
|
1070
|
-
Object.assign(contents, doc);
|
|
1071
|
-
const exception = new models_0_1.ValidationException({
|
|
1072
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1073
|
-
...contents,
|
|
1074
|
-
});
|
|
1075
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1076
|
-
};
|
|
1077
|
-
const se_EnabledControlParameter = (input, context) => {
|
|
1078
|
-
return (0, smithy_client_1.take)(input, {
|
|
1079
|
-
key: [],
|
|
1080
|
-
value: (_) => se_Document(_, context),
|
|
1081
|
-
});
|
|
1082
|
-
};
|
|
1083
|
-
const se_EnabledControlParameters = (input, context) => {
|
|
1084
|
-
return input
|
|
1085
|
-
.filter((e) => e != null)
|
|
1086
|
-
.map((entry) => {
|
|
1087
|
-
return se_EnabledControlParameter(entry, context);
|
|
1088
|
-
});
|
|
1089
|
-
};
|
|
1090
|
-
const se_Manifest = (input, context) => {
|
|
1091
|
-
return input;
|
|
1092
|
-
};
|
|
1093
|
-
const se_Document = (input, context) => {
|
|
1094
|
-
return input;
|
|
1095
|
-
};
|
|
1096
|
-
const de_ControlOperation = (output, context) => {
|
|
1097
|
-
return (0, smithy_client_1.take)(output, {
|
|
1098
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1099
|
-
operationType: smithy_client_1.expectString,
|
|
1100
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1101
|
-
status: smithy_client_1.expectString,
|
|
1102
|
-
statusMessage: smithy_client_1.expectString,
|
|
1103
|
-
});
|
|
1104
|
-
};
|
|
1105
|
-
const de_EnabledControlDetails = (output, context) => {
|
|
1106
|
-
return (0, smithy_client_1.take)(output, {
|
|
1107
|
-
arn: smithy_client_1.expectString,
|
|
1108
|
-
controlIdentifier: smithy_client_1.expectString,
|
|
1109
|
-
driftStatusSummary: smithy_client_1._json,
|
|
1110
|
-
parameters: (_) => de_EnabledControlParameterSummaries(_, context),
|
|
1111
|
-
statusSummary: smithy_client_1._json,
|
|
1112
|
-
targetIdentifier: smithy_client_1.expectString,
|
|
1113
|
-
targetRegions: smithy_client_1._json,
|
|
1114
|
-
});
|
|
1115
|
-
};
|
|
1116
|
-
const de_EnabledControlParameterSummaries = (output, context) => {
|
|
1117
|
-
const retVal = (output || [])
|
|
1118
|
-
.filter((e) => e != null)
|
|
1119
|
-
.map((entry) => {
|
|
1120
|
-
return de_EnabledControlParameterSummary(entry, context);
|
|
1121
|
-
});
|
|
1122
|
-
return retVal;
|
|
1123
|
-
};
|
|
1124
|
-
const de_EnabledControlParameterSummary = (output, context) => {
|
|
1125
|
-
return (0, smithy_client_1.take)(output, {
|
|
1126
|
-
key: smithy_client_1.expectString,
|
|
1127
|
-
value: (_) => de_Document(_, context),
|
|
1128
|
-
});
|
|
1129
|
-
};
|
|
1130
|
-
const de_LandingZoneDetail = (output, context) => {
|
|
1131
|
-
return (0, smithy_client_1.take)(output, {
|
|
1132
|
-
arn: smithy_client_1.expectString,
|
|
1133
|
-
driftStatus: smithy_client_1._json,
|
|
1134
|
-
latestAvailableVersion: smithy_client_1.expectString,
|
|
1135
|
-
manifest: (_) => de_Manifest(_, context),
|
|
1136
|
-
status: smithy_client_1.expectString,
|
|
1137
|
-
version: smithy_client_1.expectString,
|
|
1138
|
-
});
|
|
1139
|
-
};
|
|
1140
|
-
const de_LandingZoneOperationDetail = (output, context) => {
|
|
1141
|
-
return (0, smithy_client_1.take)(output, {
|
|
1142
|
-
endTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1143
|
-
operationType: smithy_client_1.expectString,
|
|
1144
|
-
startTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseRfc3339DateTimeWithOffset)(_)),
|
|
1145
|
-
status: smithy_client_1.expectString,
|
|
1146
|
-
statusMessage: smithy_client_1.expectString,
|
|
1147
|
-
});
|
|
1148
|
-
};
|
|
1149
|
-
const de_Manifest = (output, context) => {
|
|
1150
|
-
return output;
|
|
1151
|
-
};
|
|
1152
|
-
const de_Document = (output, context) => {
|
|
1153
|
-
return output;
|
|
1154
|
-
};
|
|
1155
|
-
const deserializeMetadata = (output) => ({
|
|
1156
|
-
httpStatusCode: output.statusCode,
|
|
1157
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1158
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1159
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1160
|
-
});
|
|
1161
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1162
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1163
|
-
value !== null &&
|
|
1164
|
-
value !== "" &&
|
|
1165
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1166
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1167
|
-
const _rAS = "retryAfterSeconds";
|
|
1168
|
-
const _ra = "retry-after";
|
|
1169
|
-
const _tK = "tagKeys";
|
|
1170
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1171
|
-
if (encoded.length) {
|
|
1172
|
-
return JSON.parse(encoded);
|
|
1173
|
-
}
|
|
1174
|
-
return {};
|
|
1175
|
-
});
|
|
1176
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1177
|
-
const value = await parseBody(errorBody, context);
|
|
1178
|
-
value.message = value.message ?? value.Message;
|
|
1179
|
-
return value;
|
|
1180
|
-
};
|
|
1181
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1182
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1183
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1184
|
-
let cleanValue = rawValue;
|
|
1185
|
-
if (typeof cleanValue === "number") {
|
|
1186
|
-
cleanValue = cleanValue.toString();
|
|
1187
|
-
}
|
|
1188
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1189
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1190
|
-
}
|
|
1191
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1192
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1193
|
-
}
|
|
1194
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1195
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1196
|
-
}
|
|
1197
|
-
return cleanValue;
|
|
1198
|
-
};
|
|
1199
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1200
|
-
if (headerKey !== undefined) {
|
|
1201
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1202
|
-
}
|
|
1203
|
-
if (data.code !== undefined) {
|
|
1204
|
-
return sanitizeErrorCode(data.code);
|
|
1205
|
-
}
|
|
1206
|
-
if (data["__type"] !== undefined) {
|
|
1207
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1208
|
-
}
|
|
1209
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|