@aws-sdk/client-account 3.303.0 → 3.309.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/commands/DeleteAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/DisableRegionCommand.js +2 -2
- package/dist-cjs/commands/EnableRegionCommand.js +2 -2
- package/dist-cjs/commands/GetAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/GetContactInformationCommand.js +2 -2
- package/dist-cjs/commands/GetRegionOptStatusCommand.js +2 -2
- package/dist-cjs/commands/ListRegionsCommand.js +2 -2
- package/dist-cjs/commands/PutAlternateContactCommand.js +2 -2
- package/dist-cjs/commands/PutContactInformationCommand.js +2 -2
- package/dist-cjs/protocols/Aws_restJson1.js +118 -118
- package/dist-es/commands/DeleteAlternateContactCommand.js +3 -3
- package/dist-es/commands/DisableRegionCommand.js +3 -3
- package/dist-es/commands/EnableRegionCommand.js +3 -3
- package/dist-es/commands/GetAlternateContactCommand.js +3 -3
- package/dist-es/commands/GetContactInformationCommand.js +3 -3
- package/dist-es/commands/GetRegionOptStatusCommand.js +3 -3
- package/dist-es/commands/ListRegionsCommand.js +3 -3
- package/dist-es/commands/PutAlternateContactCommand.js +3 -3
- package/dist-es/commands/PutContactInformationCommand.js +3 -3
- package/dist-es/protocols/Aws_restJson1.js +99 -99
- package/dist-types/protocols/Aws_restJson1.d.ts +72 -18
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +18 -18
- package/package.json +29 -29
|
@@ -2,7 +2,7 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
|
2
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, map as __map, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
3
3
|
import { AccountServiceException as __BaseException } from "../models/AccountServiceException";
|
|
4
4
|
import { AccessDeniedException, ConflictException, InternalServerException, ResourceNotFoundException, TooManyRequestsException, ValidationException, } from "../models/models_0";
|
|
5
|
-
export const
|
|
5
|
+
export const se_DeleteAlternateContactCommand = async (input, context) => {
|
|
6
6
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
7
7
|
const headers = {
|
|
8
8
|
"content-type": "application/json",
|
|
@@ -23,7 +23,7 @@ export const serializeAws_restJson1DeleteAlternateContactCommand = async (input,
|
|
|
23
23
|
body,
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
export const
|
|
26
|
+
export const se_DisableRegionCommand = async (input, context) => {
|
|
27
27
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
28
28
|
const headers = {
|
|
29
29
|
"content-type": "application/json",
|
|
@@ -44,7 +44,7 @@ export const serializeAws_restJson1DisableRegionCommand = async (input, context)
|
|
|
44
44
|
body,
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
|
-
export const
|
|
47
|
+
export const se_EnableRegionCommand = async (input, context) => {
|
|
48
48
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
49
49
|
const headers = {
|
|
50
50
|
"content-type": "application/json",
|
|
@@ -65,7 +65,7 @@ export const serializeAws_restJson1EnableRegionCommand = async (input, context)
|
|
|
65
65
|
body,
|
|
66
66
|
});
|
|
67
67
|
};
|
|
68
|
-
export const
|
|
68
|
+
export const se_GetAlternateContactCommand = async (input, context) => {
|
|
69
69
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
70
70
|
const headers = {
|
|
71
71
|
"content-type": "application/json",
|
|
@@ -86,7 +86,7 @@ export const serializeAws_restJson1GetAlternateContactCommand = async (input, co
|
|
|
86
86
|
body,
|
|
87
87
|
});
|
|
88
88
|
};
|
|
89
|
-
export const
|
|
89
|
+
export const se_GetContactInformationCommand = async (input, context) => {
|
|
90
90
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
91
91
|
const headers = {
|
|
92
92
|
"content-type": "application/json",
|
|
@@ -106,7 +106,7 @@ export const serializeAws_restJson1GetContactInformationCommand = async (input,
|
|
|
106
106
|
body,
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
|
-
export const
|
|
109
|
+
export const se_GetRegionOptStatusCommand = async (input, context) => {
|
|
110
110
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
111
111
|
const headers = {
|
|
112
112
|
"content-type": "application/json",
|
|
@@ -127,7 +127,7 @@ export const serializeAws_restJson1GetRegionOptStatusCommand = async (input, con
|
|
|
127
127
|
body,
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
|
-
export const
|
|
130
|
+
export const se_ListRegionsCommand = async (input, context) => {
|
|
131
131
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
132
132
|
const headers = {
|
|
133
133
|
"content-type": "application/json",
|
|
@@ -139,7 +139,7 @@ export const serializeAws_restJson1ListRegionsCommand = async (input, context) =
|
|
|
139
139
|
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
140
140
|
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
141
141
|
...(input.RegionOptStatusContains != null && {
|
|
142
|
-
RegionOptStatusContains:
|
|
142
|
+
RegionOptStatusContains: se_RegionOptStatusList(input.RegionOptStatusContains, context),
|
|
143
143
|
}),
|
|
144
144
|
});
|
|
145
145
|
return new __HttpRequest({
|
|
@@ -152,7 +152,7 @@ export const serializeAws_restJson1ListRegionsCommand = async (input, context) =
|
|
|
152
152
|
body,
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
|
-
export const
|
|
155
|
+
export const se_PutAlternateContactCommand = async (input, context) => {
|
|
156
156
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
157
157
|
const headers = {
|
|
158
158
|
"content-type": "application/json",
|
|
@@ -177,7 +177,7 @@ export const serializeAws_restJson1PutAlternateContactCommand = async (input, co
|
|
|
177
177
|
body,
|
|
178
178
|
});
|
|
179
179
|
};
|
|
180
|
-
export const
|
|
180
|
+
export const se_PutContactInformationCommand = async (input, context) => {
|
|
181
181
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
182
182
|
const headers = {
|
|
183
183
|
"content-type": "application/json",
|
|
@@ -187,7 +187,7 @@ export const serializeAws_restJson1PutContactInformationCommand = async (input,
|
|
|
187
187
|
body = JSON.stringify({
|
|
188
188
|
...(input.AccountId != null && { AccountId: input.AccountId }),
|
|
189
189
|
...(input.ContactInformation != null && {
|
|
190
|
-
ContactInformation:
|
|
190
|
+
ContactInformation: se_ContactInformation(input.ContactInformation, context),
|
|
191
191
|
}),
|
|
192
192
|
});
|
|
193
193
|
return new __HttpRequest({
|
|
@@ -200,9 +200,9 @@ export const serializeAws_restJson1PutContactInformationCommand = async (input,
|
|
|
200
200
|
body,
|
|
201
201
|
});
|
|
202
202
|
};
|
|
203
|
-
export const
|
|
203
|
+
export const de_DeleteAlternateContactCommand = async (output, context) => {
|
|
204
204
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
205
|
-
return
|
|
205
|
+
return de_DeleteAlternateContactCommandError(output, context);
|
|
206
206
|
}
|
|
207
207
|
const contents = map({
|
|
208
208
|
$metadata: deserializeMetadata(output),
|
|
@@ -210,7 +210,7 @@ export const deserializeAws_restJson1DeleteAlternateContactCommand = async (outp
|
|
|
210
210
|
await collectBody(output.body, context);
|
|
211
211
|
return contents;
|
|
212
212
|
};
|
|
213
|
-
const
|
|
213
|
+
const de_DeleteAlternateContactCommandError = async (output, context) => {
|
|
214
214
|
const parsedOutput = {
|
|
215
215
|
...output,
|
|
216
216
|
body: await parseErrorBody(output.body, context),
|
|
@@ -219,19 +219,19 @@ const deserializeAws_restJson1DeleteAlternateContactCommandError = async (output
|
|
|
219
219
|
switch (errorCode) {
|
|
220
220
|
case "AccessDeniedException":
|
|
221
221
|
case "com.amazonaws.account#AccessDeniedException":
|
|
222
|
-
throw await
|
|
222
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
223
223
|
case "InternalServerException":
|
|
224
224
|
case "com.amazonaws.account#InternalServerException":
|
|
225
|
-
throw await
|
|
225
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
226
226
|
case "ResourceNotFoundException":
|
|
227
227
|
case "com.amazonaws.account#ResourceNotFoundException":
|
|
228
|
-
throw await
|
|
228
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
229
229
|
case "TooManyRequestsException":
|
|
230
230
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
231
|
-
throw await
|
|
231
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
232
232
|
case "ValidationException":
|
|
233
233
|
case "com.amazonaws.account#ValidationException":
|
|
234
|
-
throw await
|
|
234
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
235
235
|
default:
|
|
236
236
|
const parsedBody = parsedOutput.body;
|
|
237
237
|
throwDefaultError({
|
|
@@ -242,9 +242,9 @@ const deserializeAws_restJson1DeleteAlternateContactCommandError = async (output
|
|
|
242
242
|
});
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
|
-
export const
|
|
245
|
+
export const de_DisableRegionCommand = async (output, context) => {
|
|
246
246
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
247
|
-
return
|
|
247
|
+
return de_DisableRegionCommandError(output, context);
|
|
248
248
|
}
|
|
249
249
|
const contents = map({
|
|
250
250
|
$metadata: deserializeMetadata(output),
|
|
@@ -252,7 +252,7 @@ export const deserializeAws_restJson1DisableRegionCommand = async (output, conte
|
|
|
252
252
|
await collectBody(output.body, context);
|
|
253
253
|
return contents;
|
|
254
254
|
};
|
|
255
|
-
const
|
|
255
|
+
const de_DisableRegionCommandError = async (output, context) => {
|
|
256
256
|
const parsedOutput = {
|
|
257
257
|
...output,
|
|
258
258
|
body: await parseErrorBody(output.body, context),
|
|
@@ -261,19 +261,19 @@ const deserializeAws_restJson1DisableRegionCommandError = async (output, context
|
|
|
261
261
|
switch (errorCode) {
|
|
262
262
|
case "AccessDeniedException":
|
|
263
263
|
case "com.amazonaws.account#AccessDeniedException":
|
|
264
|
-
throw await
|
|
264
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
265
265
|
case "ConflictException":
|
|
266
266
|
case "com.amazonaws.account#ConflictException":
|
|
267
|
-
throw await
|
|
267
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
268
268
|
case "InternalServerException":
|
|
269
269
|
case "com.amazonaws.account#InternalServerException":
|
|
270
|
-
throw await
|
|
270
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
271
271
|
case "TooManyRequestsException":
|
|
272
272
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
273
|
-
throw await
|
|
273
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
274
274
|
case "ValidationException":
|
|
275
275
|
case "com.amazonaws.account#ValidationException":
|
|
276
|
-
throw await
|
|
276
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
277
277
|
default:
|
|
278
278
|
const parsedBody = parsedOutput.body;
|
|
279
279
|
throwDefaultError({
|
|
@@ -284,9 +284,9 @@ const deserializeAws_restJson1DisableRegionCommandError = async (output, context
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
|
-
export const
|
|
287
|
+
export const de_EnableRegionCommand = async (output, context) => {
|
|
288
288
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
289
|
-
return
|
|
289
|
+
return de_EnableRegionCommandError(output, context);
|
|
290
290
|
}
|
|
291
291
|
const contents = map({
|
|
292
292
|
$metadata: deserializeMetadata(output),
|
|
@@ -294,7 +294,7 @@ export const deserializeAws_restJson1EnableRegionCommand = async (output, contex
|
|
|
294
294
|
await collectBody(output.body, context);
|
|
295
295
|
return contents;
|
|
296
296
|
};
|
|
297
|
-
const
|
|
297
|
+
const de_EnableRegionCommandError = async (output, context) => {
|
|
298
298
|
const parsedOutput = {
|
|
299
299
|
...output,
|
|
300
300
|
body: await parseErrorBody(output.body, context),
|
|
@@ -303,19 +303,19 @@ const deserializeAws_restJson1EnableRegionCommandError = async (output, context)
|
|
|
303
303
|
switch (errorCode) {
|
|
304
304
|
case "AccessDeniedException":
|
|
305
305
|
case "com.amazonaws.account#AccessDeniedException":
|
|
306
|
-
throw await
|
|
306
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
307
307
|
case "ConflictException":
|
|
308
308
|
case "com.amazonaws.account#ConflictException":
|
|
309
|
-
throw await
|
|
309
|
+
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
310
310
|
case "InternalServerException":
|
|
311
311
|
case "com.amazonaws.account#InternalServerException":
|
|
312
|
-
throw await
|
|
312
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
313
313
|
case "TooManyRequestsException":
|
|
314
314
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
315
|
-
throw await
|
|
315
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
316
316
|
case "ValidationException":
|
|
317
317
|
case "com.amazonaws.account#ValidationException":
|
|
318
|
-
throw await
|
|
318
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
319
319
|
default:
|
|
320
320
|
const parsedBody = parsedOutput.body;
|
|
321
321
|
throwDefaultError({
|
|
@@ -326,20 +326,20 @@ const deserializeAws_restJson1EnableRegionCommandError = async (output, context)
|
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
};
|
|
329
|
-
export const
|
|
329
|
+
export const de_GetAlternateContactCommand = async (output, context) => {
|
|
330
330
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
331
|
-
return
|
|
331
|
+
return de_GetAlternateContactCommandError(output, context);
|
|
332
332
|
}
|
|
333
333
|
const contents = map({
|
|
334
334
|
$metadata: deserializeMetadata(output),
|
|
335
335
|
});
|
|
336
336
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
337
337
|
if (data.AlternateContact != null) {
|
|
338
|
-
contents.AlternateContact =
|
|
338
|
+
contents.AlternateContact = de_AlternateContact(data.AlternateContact, context);
|
|
339
339
|
}
|
|
340
340
|
return contents;
|
|
341
341
|
};
|
|
342
|
-
const
|
|
342
|
+
const de_GetAlternateContactCommandError = async (output, context) => {
|
|
343
343
|
const parsedOutput = {
|
|
344
344
|
...output,
|
|
345
345
|
body: await parseErrorBody(output.body, context),
|
|
@@ -348,19 +348,19 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
|
|
|
348
348
|
switch (errorCode) {
|
|
349
349
|
case "AccessDeniedException":
|
|
350
350
|
case "com.amazonaws.account#AccessDeniedException":
|
|
351
|
-
throw await
|
|
351
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
352
352
|
case "InternalServerException":
|
|
353
353
|
case "com.amazonaws.account#InternalServerException":
|
|
354
|
-
throw await
|
|
354
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
355
355
|
case "ResourceNotFoundException":
|
|
356
356
|
case "com.amazonaws.account#ResourceNotFoundException":
|
|
357
|
-
throw await
|
|
357
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
358
358
|
case "TooManyRequestsException":
|
|
359
359
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
360
|
-
throw await
|
|
360
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
361
361
|
case "ValidationException":
|
|
362
362
|
case "com.amazonaws.account#ValidationException":
|
|
363
|
-
throw await
|
|
363
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
364
364
|
default:
|
|
365
365
|
const parsedBody = parsedOutput.body;
|
|
366
366
|
throwDefaultError({
|
|
@@ -371,20 +371,20 @@ const deserializeAws_restJson1GetAlternateContactCommandError = async (output, c
|
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
};
|
|
374
|
-
export const
|
|
374
|
+
export const de_GetContactInformationCommand = async (output, context) => {
|
|
375
375
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
376
|
-
return
|
|
376
|
+
return de_GetContactInformationCommandError(output, context);
|
|
377
377
|
}
|
|
378
378
|
const contents = map({
|
|
379
379
|
$metadata: deserializeMetadata(output),
|
|
380
380
|
});
|
|
381
381
|
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
382
382
|
if (data.ContactInformation != null) {
|
|
383
|
-
contents.ContactInformation =
|
|
383
|
+
contents.ContactInformation = de_ContactInformation(data.ContactInformation, context);
|
|
384
384
|
}
|
|
385
385
|
return contents;
|
|
386
386
|
};
|
|
387
|
-
const
|
|
387
|
+
const de_GetContactInformationCommandError = async (output, context) => {
|
|
388
388
|
const parsedOutput = {
|
|
389
389
|
...output,
|
|
390
390
|
body: await parseErrorBody(output.body, context),
|
|
@@ -393,19 +393,19 @@ const deserializeAws_restJson1GetContactInformationCommandError = async (output,
|
|
|
393
393
|
switch (errorCode) {
|
|
394
394
|
case "AccessDeniedException":
|
|
395
395
|
case "com.amazonaws.account#AccessDeniedException":
|
|
396
|
-
throw await
|
|
396
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
397
397
|
case "InternalServerException":
|
|
398
398
|
case "com.amazonaws.account#InternalServerException":
|
|
399
|
-
throw await
|
|
399
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
400
400
|
case "ResourceNotFoundException":
|
|
401
401
|
case "com.amazonaws.account#ResourceNotFoundException":
|
|
402
|
-
throw await
|
|
402
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
403
403
|
case "TooManyRequestsException":
|
|
404
404
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
405
|
-
throw await
|
|
405
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
406
406
|
case "ValidationException":
|
|
407
407
|
case "com.amazonaws.account#ValidationException":
|
|
408
|
-
throw await
|
|
408
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
409
409
|
default:
|
|
410
410
|
const parsedBody = parsedOutput.body;
|
|
411
411
|
throwDefaultError({
|
|
@@ -416,9 +416,9 @@ const deserializeAws_restJson1GetContactInformationCommandError = async (output,
|
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
};
|
|
419
|
-
export const
|
|
419
|
+
export const de_GetRegionOptStatusCommand = async (output, context) => {
|
|
420
420
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
421
|
-
return
|
|
421
|
+
return de_GetRegionOptStatusCommandError(output, context);
|
|
422
422
|
}
|
|
423
423
|
const contents = map({
|
|
424
424
|
$metadata: deserializeMetadata(output),
|
|
@@ -432,7 +432,7 @@ export const deserializeAws_restJson1GetRegionOptStatusCommand = async (output,
|
|
|
432
432
|
}
|
|
433
433
|
return contents;
|
|
434
434
|
};
|
|
435
|
-
const
|
|
435
|
+
const de_GetRegionOptStatusCommandError = async (output, context) => {
|
|
436
436
|
const parsedOutput = {
|
|
437
437
|
...output,
|
|
438
438
|
body: await parseErrorBody(output.body, context),
|
|
@@ -441,16 +441,16 @@ const deserializeAws_restJson1GetRegionOptStatusCommandError = async (output, co
|
|
|
441
441
|
switch (errorCode) {
|
|
442
442
|
case "AccessDeniedException":
|
|
443
443
|
case "com.amazonaws.account#AccessDeniedException":
|
|
444
|
-
throw await
|
|
444
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
445
445
|
case "InternalServerException":
|
|
446
446
|
case "com.amazonaws.account#InternalServerException":
|
|
447
|
-
throw await
|
|
447
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
448
448
|
case "TooManyRequestsException":
|
|
449
449
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
450
|
-
throw await
|
|
450
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
451
451
|
case "ValidationException":
|
|
452
452
|
case "com.amazonaws.account#ValidationException":
|
|
453
|
-
throw await
|
|
453
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
454
454
|
default:
|
|
455
455
|
const parsedBody = parsedOutput.body;
|
|
456
456
|
throwDefaultError({
|
|
@@ -461,9 +461,9 @@ const deserializeAws_restJson1GetRegionOptStatusCommandError = async (output, co
|
|
|
461
461
|
});
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
|
-
export const
|
|
464
|
+
export const de_ListRegionsCommand = async (output, context) => {
|
|
465
465
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
466
|
-
return
|
|
466
|
+
return de_ListRegionsCommandError(output, context);
|
|
467
467
|
}
|
|
468
468
|
const contents = map({
|
|
469
469
|
$metadata: deserializeMetadata(output),
|
|
@@ -473,11 +473,11 @@ export const deserializeAws_restJson1ListRegionsCommand = async (output, context
|
|
|
473
473
|
contents.NextToken = __expectString(data.NextToken);
|
|
474
474
|
}
|
|
475
475
|
if (data.Regions != null) {
|
|
476
|
-
contents.Regions =
|
|
476
|
+
contents.Regions = de_RegionOptList(data.Regions, context);
|
|
477
477
|
}
|
|
478
478
|
return contents;
|
|
479
479
|
};
|
|
480
|
-
const
|
|
480
|
+
const de_ListRegionsCommandError = async (output, context) => {
|
|
481
481
|
const parsedOutput = {
|
|
482
482
|
...output,
|
|
483
483
|
body: await parseErrorBody(output.body, context),
|
|
@@ -486,16 +486,16 @@ const deserializeAws_restJson1ListRegionsCommandError = async (output, context)
|
|
|
486
486
|
switch (errorCode) {
|
|
487
487
|
case "AccessDeniedException":
|
|
488
488
|
case "com.amazonaws.account#AccessDeniedException":
|
|
489
|
-
throw await
|
|
489
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
490
490
|
case "InternalServerException":
|
|
491
491
|
case "com.amazonaws.account#InternalServerException":
|
|
492
|
-
throw await
|
|
492
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
493
493
|
case "TooManyRequestsException":
|
|
494
494
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
495
|
-
throw await
|
|
495
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
496
496
|
case "ValidationException":
|
|
497
497
|
case "com.amazonaws.account#ValidationException":
|
|
498
|
-
throw await
|
|
498
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
499
499
|
default:
|
|
500
500
|
const parsedBody = parsedOutput.body;
|
|
501
501
|
throwDefaultError({
|
|
@@ -506,9 +506,9 @@ const deserializeAws_restJson1ListRegionsCommandError = async (output, context)
|
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
|
-
export const
|
|
509
|
+
export const de_PutAlternateContactCommand = async (output, context) => {
|
|
510
510
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
511
|
-
return
|
|
511
|
+
return de_PutAlternateContactCommandError(output, context);
|
|
512
512
|
}
|
|
513
513
|
const contents = map({
|
|
514
514
|
$metadata: deserializeMetadata(output),
|
|
@@ -516,7 +516,7 @@ export const deserializeAws_restJson1PutAlternateContactCommand = async (output,
|
|
|
516
516
|
await collectBody(output.body, context);
|
|
517
517
|
return contents;
|
|
518
518
|
};
|
|
519
|
-
const
|
|
519
|
+
const de_PutAlternateContactCommandError = async (output, context) => {
|
|
520
520
|
const parsedOutput = {
|
|
521
521
|
...output,
|
|
522
522
|
body: await parseErrorBody(output.body, context),
|
|
@@ -525,16 +525,16 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
|
|
|
525
525
|
switch (errorCode) {
|
|
526
526
|
case "AccessDeniedException":
|
|
527
527
|
case "com.amazonaws.account#AccessDeniedException":
|
|
528
|
-
throw await
|
|
528
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
529
529
|
case "InternalServerException":
|
|
530
530
|
case "com.amazonaws.account#InternalServerException":
|
|
531
|
-
throw await
|
|
531
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
532
532
|
case "TooManyRequestsException":
|
|
533
533
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
534
|
-
throw await
|
|
534
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
535
535
|
case "ValidationException":
|
|
536
536
|
case "com.amazonaws.account#ValidationException":
|
|
537
|
-
throw await
|
|
537
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
538
538
|
default:
|
|
539
539
|
const parsedBody = parsedOutput.body;
|
|
540
540
|
throwDefaultError({
|
|
@@ -545,9 +545,9 @@ const deserializeAws_restJson1PutAlternateContactCommandError = async (output, c
|
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
|
-
export const
|
|
548
|
+
export const de_PutContactInformationCommand = async (output, context) => {
|
|
549
549
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
550
|
-
return
|
|
550
|
+
return de_PutContactInformationCommandError(output, context);
|
|
551
551
|
}
|
|
552
552
|
const contents = map({
|
|
553
553
|
$metadata: deserializeMetadata(output),
|
|
@@ -555,7 +555,7 @@ export const deserializeAws_restJson1PutContactInformationCommand = async (outpu
|
|
|
555
555
|
await collectBody(output.body, context);
|
|
556
556
|
return contents;
|
|
557
557
|
};
|
|
558
|
-
const
|
|
558
|
+
const de_PutContactInformationCommandError = async (output, context) => {
|
|
559
559
|
const parsedOutput = {
|
|
560
560
|
...output,
|
|
561
561
|
body: await parseErrorBody(output.body, context),
|
|
@@ -564,16 +564,16 @@ const deserializeAws_restJson1PutContactInformationCommandError = async (output,
|
|
|
564
564
|
switch (errorCode) {
|
|
565
565
|
case "AccessDeniedException":
|
|
566
566
|
case "com.amazonaws.account#AccessDeniedException":
|
|
567
|
-
throw await
|
|
567
|
+
throw await de_AccessDeniedExceptionRes(parsedOutput, context);
|
|
568
568
|
case "InternalServerException":
|
|
569
569
|
case "com.amazonaws.account#InternalServerException":
|
|
570
|
-
throw await
|
|
570
|
+
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
571
571
|
case "TooManyRequestsException":
|
|
572
572
|
case "com.amazonaws.account#TooManyRequestsException":
|
|
573
|
-
throw await
|
|
573
|
+
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
574
574
|
case "ValidationException":
|
|
575
575
|
case "com.amazonaws.account#ValidationException":
|
|
576
|
-
throw await
|
|
576
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
577
577
|
default:
|
|
578
578
|
const parsedBody = parsedOutput.body;
|
|
579
579
|
throwDefaultError({
|
|
@@ -585,7 +585,7 @@ const deserializeAws_restJson1PutContactInformationCommandError = async (output,
|
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
587
|
const map = __map;
|
|
588
|
-
const
|
|
588
|
+
const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
|
|
589
589
|
const contents = map({});
|
|
590
590
|
const data = parsedOutput.body;
|
|
591
591
|
if (data.message != null) {
|
|
@@ -597,7 +597,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
|
|
|
597
597
|
});
|
|
598
598
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
599
599
|
};
|
|
600
|
-
const
|
|
600
|
+
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
601
601
|
const contents = map({});
|
|
602
602
|
const data = parsedOutput.body;
|
|
603
603
|
if (data.message != null) {
|
|
@@ -609,7 +609,7 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
609
609
|
});
|
|
610
610
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
611
611
|
};
|
|
612
|
-
const
|
|
612
|
+
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
613
613
|
const contents = map({});
|
|
614
614
|
const data = parsedOutput.body;
|
|
615
615
|
if (data.message != null) {
|
|
@@ -621,7 +621,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
621
621
|
});
|
|
622
622
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
623
623
|
};
|
|
624
|
-
const
|
|
624
|
+
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
625
625
|
const contents = map({});
|
|
626
626
|
const data = parsedOutput.body;
|
|
627
627
|
if (data.message != null) {
|
|
@@ -633,7 +633,7 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
633
633
|
});
|
|
634
634
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
635
635
|
};
|
|
636
|
-
const
|
|
636
|
+
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
637
637
|
const contents = map({});
|
|
638
638
|
const data = parsedOutput.body;
|
|
639
639
|
if (data.message != null) {
|
|
@@ -645,11 +645,11 @@ const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOu
|
|
|
645
645
|
});
|
|
646
646
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
647
647
|
};
|
|
648
|
-
const
|
|
648
|
+
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
649
649
|
const contents = map({});
|
|
650
650
|
const data = parsedOutput.body;
|
|
651
651
|
if (data.fieldList != null) {
|
|
652
|
-
contents.fieldList =
|
|
652
|
+
contents.fieldList = de_ValidationExceptionFieldList(data.fieldList, context);
|
|
653
653
|
}
|
|
654
654
|
if (data.message != null) {
|
|
655
655
|
contents.message = __expectString(data.message);
|
|
@@ -663,7 +663,7 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
663
663
|
});
|
|
664
664
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
665
665
|
};
|
|
666
|
-
const
|
|
666
|
+
const se_ContactInformation = (input, context) => {
|
|
667
667
|
return {
|
|
668
668
|
...(input.AddressLine1 != null && { AddressLine1: input.AddressLine1 }),
|
|
669
669
|
...(input.AddressLine2 != null && { AddressLine2: input.AddressLine2 }),
|
|
@@ -679,14 +679,14 @@ const serializeAws_restJson1ContactInformation = (input, context) => {
|
|
|
679
679
|
...(input.WebsiteUrl != null && { WebsiteUrl: input.WebsiteUrl }),
|
|
680
680
|
};
|
|
681
681
|
};
|
|
682
|
-
const
|
|
682
|
+
const se_RegionOptStatusList = (input, context) => {
|
|
683
683
|
return input
|
|
684
684
|
.filter((e) => e != null)
|
|
685
685
|
.map((entry) => {
|
|
686
686
|
return entry;
|
|
687
687
|
});
|
|
688
688
|
};
|
|
689
|
-
const
|
|
689
|
+
const de_AlternateContact = (output, context) => {
|
|
690
690
|
return {
|
|
691
691
|
AlternateContactType: __expectString(output.AlternateContactType),
|
|
692
692
|
EmailAddress: __expectString(output.EmailAddress),
|
|
@@ -695,7 +695,7 @@ const deserializeAws_restJson1AlternateContact = (output, context) => {
|
|
|
695
695
|
Title: __expectString(output.Title),
|
|
696
696
|
};
|
|
697
697
|
};
|
|
698
|
-
const
|
|
698
|
+
const de_ContactInformation = (output, context) => {
|
|
699
699
|
return {
|
|
700
700
|
AddressLine1: __expectString(output.AddressLine1),
|
|
701
701
|
AddressLine2: __expectString(output.AddressLine2),
|
|
@@ -711,37 +711,37 @@ const deserializeAws_restJson1ContactInformation = (output, context) => {
|
|
|
711
711
|
WebsiteUrl: __expectString(output.WebsiteUrl),
|
|
712
712
|
};
|
|
713
713
|
};
|
|
714
|
-
const
|
|
714
|
+
const de_Region = (output, context) => {
|
|
715
715
|
return {
|
|
716
716
|
RegionName: __expectString(output.RegionName),
|
|
717
717
|
RegionOptStatus: __expectString(output.RegionOptStatus),
|
|
718
718
|
};
|
|
719
719
|
};
|
|
720
|
-
const
|
|
720
|
+
const de_RegionOptList = (output, context) => {
|
|
721
721
|
const retVal = (output || [])
|
|
722
722
|
.filter((e) => e != null)
|
|
723
723
|
.map((entry) => {
|
|
724
724
|
if (entry === null) {
|
|
725
725
|
return null;
|
|
726
726
|
}
|
|
727
|
-
return
|
|
727
|
+
return de_Region(entry, context);
|
|
728
728
|
});
|
|
729
729
|
return retVal;
|
|
730
730
|
};
|
|
731
|
-
const
|
|
731
|
+
const de_ValidationExceptionField = (output, context) => {
|
|
732
732
|
return {
|
|
733
733
|
message: __expectString(output.message),
|
|
734
734
|
name: __expectString(output.name),
|
|
735
735
|
};
|
|
736
736
|
};
|
|
737
|
-
const
|
|
737
|
+
const de_ValidationExceptionFieldList = (output, context) => {
|
|
738
738
|
const retVal = (output || [])
|
|
739
739
|
.filter((e) => e != null)
|
|
740
740
|
.map((entry) => {
|
|
741
741
|
if (entry === null) {
|
|
742
742
|
return null;
|
|
743
743
|
}
|
|
744
|
-
return
|
|
744
|
+
return de_ValidationExceptionField(entry, context);
|
|
745
745
|
});
|
|
746
746
|
return retVal;
|
|
747
747
|
};
|