@aws-sdk/client-dlm 3.52.0 → 3.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/DLMServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +67 -1
- package/dist-cjs/protocols/Aws_restJson1.js +118 -290
- package/dist-es/index.js +1 -0
- package/dist-es/models/DLMServiceException.js +12 -0
- package/dist-es/models/models_0.js +63 -1
- package/dist-es/protocols/Aws_restJson1.js +201 -327
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/DLMServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +30 -13
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/DLMServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +22 -13
- package/package.json +25 -25
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_restJson1UpdateLifecyclePolicyCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1GetLifecyclePolicyCommand = exports.deserializeAws_restJson1GetLifecyclePoliciesCommand = exports.deserializeAws_restJson1DeleteLifecyclePolicyCommand = exports.deserializeAws_restJson1CreateLifecyclePolicyCommand = exports.serializeAws_restJson1UpdateLifecyclePolicyCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1GetLifecyclePolicyCommand = exports.serializeAws_restJson1GetLifecyclePoliciesCommand = exports.serializeAws_restJson1DeleteLifecyclePolicyCommand = exports.serializeAws_restJson1CreateLifecyclePolicyCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const DLMServiceException_1 = require("../models/DLMServiceException");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
6
8
|
const serializeAws_restJson1CreateLifecyclePolicyCommand = async (input, context) => {
|
|
7
9
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
10
|
const headers = {
|
|
@@ -261,43 +263,22 @@ const deserializeAws_restJson1CreateLifecyclePolicyCommandError = async (output,
|
|
|
261
263
|
switch (errorCode) {
|
|
262
264
|
case "InternalServerException":
|
|
263
265
|
case "com.amazonaws.dlm#InternalServerException":
|
|
264
|
-
|
|
265
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
266
|
-
name: errorCode,
|
|
267
|
-
$metadata: deserializeMetadata(output),
|
|
268
|
-
};
|
|
269
|
-
break;
|
|
266
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
270
267
|
case "InvalidRequestException":
|
|
271
268
|
case "com.amazonaws.dlm#InvalidRequestException":
|
|
272
|
-
|
|
273
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
274
|
-
name: errorCode,
|
|
275
|
-
$metadata: deserializeMetadata(output),
|
|
276
|
-
};
|
|
277
|
-
break;
|
|
269
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
278
270
|
case "LimitExceededException":
|
|
279
271
|
case "com.amazonaws.dlm#LimitExceededException":
|
|
280
|
-
|
|
281
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
282
|
-
name: errorCode,
|
|
283
|
-
$metadata: deserializeMetadata(output),
|
|
284
|
-
};
|
|
285
|
-
break;
|
|
272
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
286
273
|
default:
|
|
287
274
|
const parsedBody = parsedOutput.body;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
...parsedBody,
|
|
291
|
-
name: `${errorCode}`,
|
|
292
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
275
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
276
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
293
277
|
$fault: "client",
|
|
294
278
|
$metadata: deserializeMetadata(output),
|
|
295
|
-
};
|
|
279
|
+
});
|
|
280
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
296
281
|
}
|
|
297
|
-
const message = response.message || response.Message || errorCode;
|
|
298
|
-
response.message = message;
|
|
299
|
-
delete response.Message;
|
|
300
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
301
282
|
};
|
|
302
283
|
const deserializeAws_restJson1DeleteLifecyclePolicyCommand = async (output, context) => {
|
|
303
284
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -321,43 +302,22 @@ const deserializeAws_restJson1DeleteLifecyclePolicyCommandError = async (output,
|
|
|
321
302
|
switch (errorCode) {
|
|
322
303
|
case "InternalServerException":
|
|
323
304
|
case "com.amazonaws.dlm#InternalServerException":
|
|
324
|
-
|
|
325
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
326
|
-
name: errorCode,
|
|
327
|
-
$metadata: deserializeMetadata(output),
|
|
328
|
-
};
|
|
329
|
-
break;
|
|
305
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
330
306
|
case "LimitExceededException":
|
|
331
307
|
case "com.amazonaws.dlm#LimitExceededException":
|
|
332
|
-
|
|
333
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
334
|
-
name: errorCode,
|
|
335
|
-
$metadata: deserializeMetadata(output),
|
|
336
|
-
};
|
|
337
|
-
break;
|
|
308
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
338
309
|
case "ResourceNotFoundException":
|
|
339
310
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
340
|
-
|
|
341
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
342
|
-
name: errorCode,
|
|
343
|
-
$metadata: deserializeMetadata(output),
|
|
344
|
-
};
|
|
345
|
-
break;
|
|
311
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
346
312
|
default:
|
|
347
313
|
const parsedBody = parsedOutput.body;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
...parsedBody,
|
|
351
|
-
name: `${errorCode}`,
|
|
352
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
314
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
315
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
353
316
|
$fault: "client",
|
|
354
317
|
$metadata: deserializeMetadata(output),
|
|
355
|
-
};
|
|
318
|
+
});
|
|
319
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
356
320
|
}
|
|
357
|
-
const message = response.message || response.Message || errorCode;
|
|
358
|
-
response.message = message;
|
|
359
|
-
delete response.Message;
|
|
360
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
361
321
|
};
|
|
362
322
|
const deserializeAws_restJson1GetLifecyclePoliciesCommand = async (output, context) => {
|
|
363
323
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -385,51 +345,25 @@ const deserializeAws_restJson1GetLifecyclePoliciesCommandError = async (output,
|
|
|
385
345
|
switch (errorCode) {
|
|
386
346
|
case "InternalServerException":
|
|
387
347
|
case "com.amazonaws.dlm#InternalServerException":
|
|
388
|
-
|
|
389
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
390
|
-
name: errorCode,
|
|
391
|
-
$metadata: deserializeMetadata(output),
|
|
392
|
-
};
|
|
393
|
-
break;
|
|
348
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
394
349
|
case "InvalidRequestException":
|
|
395
350
|
case "com.amazonaws.dlm#InvalidRequestException":
|
|
396
|
-
|
|
397
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
398
|
-
name: errorCode,
|
|
399
|
-
$metadata: deserializeMetadata(output),
|
|
400
|
-
};
|
|
401
|
-
break;
|
|
351
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
402
352
|
case "LimitExceededException":
|
|
403
353
|
case "com.amazonaws.dlm#LimitExceededException":
|
|
404
|
-
|
|
405
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
406
|
-
name: errorCode,
|
|
407
|
-
$metadata: deserializeMetadata(output),
|
|
408
|
-
};
|
|
409
|
-
break;
|
|
354
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
410
355
|
case "ResourceNotFoundException":
|
|
411
356
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
412
|
-
|
|
413
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
414
|
-
name: errorCode,
|
|
415
|
-
$metadata: deserializeMetadata(output),
|
|
416
|
-
};
|
|
417
|
-
break;
|
|
357
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
418
358
|
default:
|
|
419
359
|
const parsedBody = parsedOutput.body;
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
...parsedBody,
|
|
423
|
-
name: `${errorCode}`,
|
|
424
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
360
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
361
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
425
362
|
$fault: "client",
|
|
426
363
|
$metadata: deserializeMetadata(output),
|
|
427
|
-
};
|
|
364
|
+
});
|
|
365
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
428
366
|
}
|
|
429
|
-
const message = response.message || response.Message || errorCode;
|
|
430
|
-
response.message = message;
|
|
431
|
-
delete response.Message;
|
|
432
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
433
367
|
};
|
|
434
368
|
const deserializeAws_restJson1GetLifecyclePolicyCommand = async (output, context) => {
|
|
435
369
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -457,43 +391,22 @@ const deserializeAws_restJson1GetLifecyclePolicyCommandError = async (output, co
|
|
|
457
391
|
switch (errorCode) {
|
|
458
392
|
case "InternalServerException":
|
|
459
393
|
case "com.amazonaws.dlm#InternalServerException":
|
|
460
|
-
|
|
461
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
462
|
-
name: errorCode,
|
|
463
|
-
$metadata: deserializeMetadata(output),
|
|
464
|
-
};
|
|
465
|
-
break;
|
|
394
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
466
395
|
case "LimitExceededException":
|
|
467
396
|
case "com.amazonaws.dlm#LimitExceededException":
|
|
468
|
-
|
|
469
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
470
|
-
name: errorCode,
|
|
471
|
-
$metadata: deserializeMetadata(output),
|
|
472
|
-
};
|
|
473
|
-
break;
|
|
397
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
474
398
|
case "ResourceNotFoundException":
|
|
475
399
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
476
|
-
|
|
477
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
478
|
-
name: errorCode,
|
|
479
|
-
$metadata: deserializeMetadata(output),
|
|
480
|
-
};
|
|
481
|
-
break;
|
|
400
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
482
401
|
default:
|
|
483
402
|
const parsedBody = parsedOutput.body;
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
...parsedBody,
|
|
487
|
-
name: `${errorCode}`,
|
|
488
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
403
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
404
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
489
405
|
$fault: "client",
|
|
490
406
|
$metadata: deserializeMetadata(output),
|
|
491
|
-
};
|
|
407
|
+
});
|
|
408
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
492
409
|
}
|
|
493
|
-
const message = response.message || response.Message || errorCode;
|
|
494
|
-
response.message = message;
|
|
495
|
-
delete response.Message;
|
|
496
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
497
410
|
};
|
|
498
411
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
499
412
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -521,43 +434,22 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
521
434
|
switch (errorCode) {
|
|
522
435
|
case "InternalServerException":
|
|
523
436
|
case "com.amazonaws.dlm#InternalServerException":
|
|
524
|
-
|
|
525
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
526
|
-
name: errorCode,
|
|
527
|
-
$metadata: deserializeMetadata(output),
|
|
528
|
-
};
|
|
529
|
-
break;
|
|
437
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
530
438
|
case "InvalidRequestException":
|
|
531
439
|
case "com.amazonaws.dlm#InvalidRequestException":
|
|
532
|
-
|
|
533
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
534
|
-
name: errorCode,
|
|
535
|
-
$metadata: deserializeMetadata(output),
|
|
536
|
-
};
|
|
537
|
-
break;
|
|
440
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
538
441
|
case "ResourceNotFoundException":
|
|
539
442
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
540
|
-
|
|
541
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
542
|
-
name: errorCode,
|
|
543
|
-
$metadata: deserializeMetadata(output),
|
|
544
|
-
};
|
|
545
|
-
break;
|
|
443
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
546
444
|
default:
|
|
547
445
|
const parsedBody = parsedOutput.body;
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
...parsedBody,
|
|
551
|
-
name: `${errorCode}`,
|
|
552
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
446
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
447
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
553
448
|
$fault: "client",
|
|
554
449
|
$metadata: deserializeMetadata(output),
|
|
555
|
-
};
|
|
450
|
+
});
|
|
451
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
556
452
|
}
|
|
557
|
-
const message = response.message || response.Message || errorCode;
|
|
558
|
-
response.message = message;
|
|
559
|
-
delete response.Message;
|
|
560
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
561
453
|
};
|
|
562
454
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
563
455
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -581,43 +473,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
581
473
|
switch (errorCode) {
|
|
582
474
|
case "InternalServerException":
|
|
583
475
|
case "com.amazonaws.dlm#InternalServerException":
|
|
584
|
-
|
|
585
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
586
|
-
name: errorCode,
|
|
587
|
-
$metadata: deserializeMetadata(output),
|
|
588
|
-
};
|
|
589
|
-
break;
|
|
476
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
590
477
|
case "InvalidRequestException":
|
|
591
478
|
case "com.amazonaws.dlm#InvalidRequestException":
|
|
592
|
-
|
|
593
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
594
|
-
name: errorCode,
|
|
595
|
-
$metadata: deserializeMetadata(output),
|
|
596
|
-
};
|
|
597
|
-
break;
|
|
479
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
598
480
|
case "ResourceNotFoundException":
|
|
599
481
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
600
|
-
|
|
601
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
602
|
-
name: errorCode,
|
|
603
|
-
$metadata: deserializeMetadata(output),
|
|
604
|
-
};
|
|
605
|
-
break;
|
|
482
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
606
483
|
default:
|
|
607
484
|
const parsedBody = parsedOutput.body;
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
...parsedBody,
|
|
611
|
-
name: `${errorCode}`,
|
|
612
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
485
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
486
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
613
487
|
$fault: "client",
|
|
614
488
|
$metadata: deserializeMetadata(output),
|
|
615
|
-
};
|
|
489
|
+
});
|
|
490
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
616
491
|
}
|
|
617
|
-
const message = response.message || response.Message || errorCode;
|
|
618
|
-
response.message = message;
|
|
619
|
-
delete response.Message;
|
|
620
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
621
492
|
};
|
|
622
493
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
623
494
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -641,43 +512,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
641
512
|
switch (errorCode) {
|
|
642
513
|
case "InternalServerException":
|
|
643
514
|
case "com.amazonaws.dlm#InternalServerException":
|
|
644
|
-
|
|
645
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
646
|
-
name: errorCode,
|
|
647
|
-
$metadata: deserializeMetadata(output),
|
|
648
|
-
};
|
|
649
|
-
break;
|
|
515
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
650
516
|
case "InvalidRequestException":
|
|
651
517
|
case "com.amazonaws.dlm#InvalidRequestException":
|
|
652
|
-
|
|
653
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
654
|
-
name: errorCode,
|
|
655
|
-
$metadata: deserializeMetadata(output),
|
|
656
|
-
};
|
|
657
|
-
break;
|
|
518
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
658
519
|
case "ResourceNotFoundException":
|
|
659
520
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
660
|
-
|
|
661
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
662
|
-
name: errorCode,
|
|
663
|
-
$metadata: deserializeMetadata(output),
|
|
664
|
-
};
|
|
665
|
-
break;
|
|
521
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
666
522
|
default:
|
|
667
523
|
const parsedBody = parsedOutput.body;
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
...parsedBody,
|
|
671
|
-
name: `${errorCode}`,
|
|
672
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
524
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
525
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
673
526
|
$fault: "client",
|
|
674
527
|
$metadata: deserializeMetadata(output),
|
|
675
|
-
};
|
|
528
|
+
});
|
|
529
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
676
530
|
}
|
|
677
|
-
const message = response.message || response.Message || errorCode;
|
|
678
|
-
response.message = message;
|
|
679
|
-
delete response.Message;
|
|
680
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
681
531
|
};
|
|
682
532
|
const deserializeAws_restJson1UpdateLifecyclePolicyCommand = async (output, context) => {
|
|
683
533
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -701,60 +551,28 @@ const deserializeAws_restJson1UpdateLifecyclePolicyCommandError = async (output,
|
|
|
701
551
|
switch (errorCode) {
|
|
702
552
|
case "InternalServerException":
|
|
703
553
|
case "com.amazonaws.dlm#InternalServerException":
|
|
704
|
-
|
|
705
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
706
|
-
name: errorCode,
|
|
707
|
-
$metadata: deserializeMetadata(output),
|
|
708
|
-
};
|
|
709
|
-
break;
|
|
554
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
710
555
|
case "InvalidRequestException":
|
|
711
556
|
case "com.amazonaws.dlm#InvalidRequestException":
|
|
712
|
-
|
|
713
|
-
...(await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
714
|
-
name: errorCode,
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
717
|
-
break;
|
|
557
|
+
throw await deserializeAws_restJson1InvalidRequestExceptionResponse(parsedOutput, context);
|
|
718
558
|
case "LimitExceededException":
|
|
719
559
|
case "com.amazonaws.dlm#LimitExceededException":
|
|
720
|
-
|
|
721
|
-
...(await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
722
|
-
name: errorCode,
|
|
723
|
-
$metadata: deserializeMetadata(output),
|
|
724
|
-
};
|
|
725
|
-
break;
|
|
560
|
+
throw await deserializeAws_restJson1LimitExceededExceptionResponse(parsedOutput, context);
|
|
726
561
|
case "ResourceNotFoundException":
|
|
727
562
|
case "com.amazonaws.dlm#ResourceNotFoundException":
|
|
728
|
-
|
|
729
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
730
|
-
name: errorCode,
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
};
|
|
733
|
-
break;
|
|
563
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
734
564
|
default:
|
|
735
565
|
const parsedBody = parsedOutput.body;
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
...parsedBody,
|
|
739
|
-
name: `${errorCode}`,
|
|
740
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
566
|
+
response = new DLMServiceException_1.DLMServiceException({
|
|
567
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
741
568
|
$fault: "client",
|
|
742
569
|
$metadata: deserializeMetadata(output),
|
|
743
|
-
};
|
|
570
|
+
});
|
|
571
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
744
572
|
}
|
|
745
|
-
const message = response.message || response.Message || errorCode;
|
|
746
|
-
response.message = message;
|
|
747
|
-
delete response.Message;
|
|
748
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
749
573
|
};
|
|
750
574
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
751
|
-
const contents = {
|
|
752
|
-
name: "InternalServerException",
|
|
753
|
-
$fault: "server",
|
|
754
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
755
|
-
Code: undefined,
|
|
756
|
-
Message: undefined,
|
|
757
|
-
};
|
|
575
|
+
const contents = {};
|
|
758
576
|
const data = parsedOutput.body;
|
|
759
577
|
if (data.Code !== undefined && data.Code !== null) {
|
|
760
578
|
contents.Code = smithy_client_1.expectString(data.Code);
|
|
@@ -762,18 +580,14 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
762
580
|
if (data.Message !== undefined && data.Message !== null) {
|
|
763
581
|
contents.Message = smithy_client_1.expectString(data.Message);
|
|
764
582
|
}
|
|
765
|
-
|
|
583
|
+
const exception = new models_0_1.InternalServerException({
|
|
584
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
585
|
+
...contents,
|
|
586
|
+
});
|
|
587
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
766
588
|
};
|
|
767
589
|
const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
768
|
-
const contents = {
|
|
769
|
-
name: "InvalidRequestException",
|
|
770
|
-
$fault: "client",
|
|
771
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
772
|
-
Code: undefined,
|
|
773
|
-
Message: undefined,
|
|
774
|
-
MutuallyExclusiveParameters: undefined,
|
|
775
|
-
RequiredParameters: undefined,
|
|
776
|
-
};
|
|
590
|
+
const contents = {};
|
|
777
591
|
const data = parsedOutput.body;
|
|
778
592
|
if (data.Code !== undefined && data.Code !== null) {
|
|
779
593
|
contents.Code = smithy_client_1.expectString(data.Code);
|
|
@@ -787,17 +601,14 @@ const deserializeAws_restJson1InvalidRequestExceptionResponse = async (parsedOut
|
|
|
787
601
|
if (data.RequiredParameters !== undefined && data.RequiredParameters !== null) {
|
|
788
602
|
contents.RequiredParameters = deserializeAws_restJson1ParameterList(data.RequiredParameters, context);
|
|
789
603
|
}
|
|
790
|
-
|
|
604
|
+
const exception = new models_0_1.InvalidRequestException({
|
|
605
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
606
|
+
...contents,
|
|
607
|
+
});
|
|
608
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
791
609
|
};
|
|
792
610
|
const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
793
|
-
const contents = {
|
|
794
|
-
name: "LimitExceededException",
|
|
795
|
-
$fault: "client",
|
|
796
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
797
|
-
Code: undefined,
|
|
798
|
-
Message: undefined,
|
|
799
|
-
ResourceType: undefined,
|
|
800
|
-
};
|
|
611
|
+
const contents = {};
|
|
801
612
|
const data = parsedOutput.body;
|
|
802
613
|
if (data.Code !== undefined && data.Code !== null) {
|
|
803
614
|
contents.Code = smithy_client_1.expectString(data.Code);
|
|
@@ -808,18 +619,14 @@ const deserializeAws_restJson1LimitExceededExceptionResponse = async (parsedOutp
|
|
|
808
619
|
if (data.ResourceType !== undefined && data.ResourceType !== null) {
|
|
809
620
|
contents.ResourceType = smithy_client_1.expectString(data.ResourceType);
|
|
810
621
|
}
|
|
811
|
-
|
|
622
|
+
const exception = new models_0_1.LimitExceededException({
|
|
623
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
624
|
+
...contents,
|
|
625
|
+
});
|
|
626
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
812
627
|
};
|
|
813
628
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
814
|
-
const contents = {
|
|
815
|
-
name: "ResourceNotFoundException",
|
|
816
|
-
$fault: "client",
|
|
817
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
818
|
-
Code: undefined,
|
|
819
|
-
Message: undefined,
|
|
820
|
-
ResourceIds: undefined,
|
|
821
|
-
ResourceType: undefined,
|
|
822
|
-
};
|
|
629
|
+
const contents = {};
|
|
823
630
|
const data = parsedOutput.body;
|
|
824
631
|
if (data.Code !== undefined && data.Code !== null) {
|
|
825
632
|
contents.Code = smithy_client_1.expectString(data.Code);
|
|
@@ -833,7 +640,11 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
833
640
|
if (data.ResourceType !== undefined && data.ResourceType !== null) {
|
|
834
641
|
contents.ResourceType = smithy_client_1.expectString(data.ResourceType);
|
|
835
642
|
}
|
|
836
|
-
|
|
643
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
644
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
645
|
+
...contents,
|
|
646
|
+
});
|
|
647
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
837
648
|
};
|
|
838
649
|
const serializeAws_restJson1Action = (input, context) => {
|
|
839
650
|
return {
|
|
@@ -1184,7 +995,7 @@ const deserializeAws_restJson1Action = (output, context) => {
|
|
|
1184
995
|
};
|
|
1185
996
|
};
|
|
1186
997
|
const deserializeAws_restJson1ActionList = (output, context) => {
|
|
1187
|
-
|
|
998
|
+
const retVal = (output || [])
|
|
1188
999
|
.filter((e) => e != null)
|
|
1189
1000
|
.map((entry) => {
|
|
1190
1001
|
if (entry === null) {
|
|
@@ -1192,9 +1003,10 @@ const deserializeAws_restJson1ActionList = (output, context) => {
|
|
|
1192
1003
|
}
|
|
1193
1004
|
return deserializeAws_restJson1Action(entry, context);
|
|
1194
1005
|
});
|
|
1006
|
+
return retVal;
|
|
1195
1007
|
};
|
|
1196
1008
|
const deserializeAws_restJson1AvailabilityZoneList = (output, context) => {
|
|
1197
|
-
|
|
1009
|
+
const retVal = (output || [])
|
|
1198
1010
|
.filter((e) => e != null)
|
|
1199
1011
|
.map((entry) => {
|
|
1200
1012
|
if (entry === null) {
|
|
@@ -1202,6 +1014,7 @@ const deserializeAws_restJson1AvailabilityZoneList = (output, context) => {
|
|
|
1202
1014
|
}
|
|
1203
1015
|
return smithy_client_1.expectString(entry);
|
|
1204
1016
|
});
|
|
1017
|
+
return retVal;
|
|
1205
1018
|
};
|
|
1206
1019
|
const deserializeAws_restJson1CreateRule = (output, context) => {
|
|
1207
1020
|
return {
|
|
@@ -1226,7 +1039,7 @@ const deserializeAws_restJson1CrossRegionCopyAction = (output, context) => {
|
|
|
1226
1039
|
};
|
|
1227
1040
|
};
|
|
1228
1041
|
const deserializeAws_restJson1CrossRegionCopyActionList = (output, context) => {
|
|
1229
|
-
|
|
1042
|
+
const retVal = (output || [])
|
|
1230
1043
|
.filter((e) => e != null)
|
|
1231
1044
|
.map((entry) => {
|
|
1232
1045
|
if (entry === null) {
|
|
@@ -1234,6 +1047,7 @@ const deserializeAws_restJson1CrossRegionCopyActionList = (output, context) => {
|
|
|
1234
1047
|
}
|
|
1235
1048
|
return deserializeAws_restJson1CrossRegionCopyAction(entry, context);
|
|
1236
1049
|
});
|
|
1050
|
+
return retVal;
|
|
1237
1051
|
};
|
|
1238
1052
|
const deserializeAws_restJson1CrossRegionCopyDeprecateRule = (output, context) => {
|
|
1239
1053
|
return {
|
|
@@ -1263,7 +1077,7 @@ const deserializeAws_restJson1CrossRegionCopyRule = (output, context) => {
|
|
|
1263
1077
|
};
|
|
1264
1078
|
};
|
|
1265
1079
|
const deserializeAws_restJson1CrossRegionCopyRules = (output, context) => {
|
|
1266
|
-
|
|
1080
|
+
const retVal = (output || [])
|
|
1267
1081
|
.filter((e) => e != null)
|
|
1268
1082
|
.map((entry) => {
|
|
1269
1083
|
if (entry === null) {
|
|
@@ -1271,6 +1085,7 @@ const deserializeAws_restJson1CrossRegionCopyRules = (output, context) => {
|
|
|
1271
1085
|
}
|
|
1272
1086
|
return deserializeAws_restJson1CrossRegionCopyRule(entry, context);
|
|
1273
1087
|
});
|
|
1088
|
+
return retVal;
|
|
1274
1089
|
};
|
|
1275
1090
|
const deserializeAws_restJson1DeprecateRule = (output, context) => {
|
|
1276
1091
|
return {
|
|
@@ -1346,7 +1161,7 @@ const deserializeAws_restJson1LifecyclePolicySummary = (output, context) => {
|
|
|
1346
1161
|
};
|
|
1347
1162
|
};
|
|
1348
1163
|
const deserializeAws_restJson1LifecyclePolicySummaryList = (output, context) => {
|
|
1349
|
-
|
|
1164
|
+
const retVal = (output || [])
|
|
1350
1165
|
.filter((e) => e != null)
|
|
1351
1166
|
.map((entry) => {
|
|
1352
1167
|
if (entry === null) {
|
|
@@ -1354,9 +1169,10 @@ const deserializeAws_restJson1LifecyclePolicySummaryList = (output, context) =>
|
|
|
1354
1169
|
}
|
|
1355
1170
|
return deserializeAws_restJson1LifecyclePolicySummary(entry, context);
|
|
1356
1171
|
});
|
|
1172
|
+
return retVal;
|
|
1357
1173
|
};
|
|
1358
1174
|
const deserializeAws_restJson1ParameterList = (output, context) => {
|
|
1359
|
-
|
|
1175
|
+
const retVal = (output || [])
|
|
1360
1176
|
.filter((e) => e != null)
|
|
1361
1177
|
.map((entry) => {
|
|
1362
1178
|
if (entry === null) {
|
|
@@ -1364,6 +1180,7 @@ const deserializeAws_restJson1ParameterList = (output, context) => {
|
|
|
1364
1180
|
}
|
|
1365
1181
|
return smithy_client_1.expectString(entry);
|
|
1366
1182
|
});
|
|
1183
|
+
return retVal;
|
|
1367
1184
|
};
|
|
1368
1185
|
const deserializeAws_restJson1_Parameters = (output, context) => {
|
|
1369
1186
|
return {
|
|
@@ -1398,7 +1215,7 @@ const deserializeAws_restJson1PolicyDetails = (output, context) => {
|
|
|
1398
1215
|
};
|
|
1399
1216
|
};
|
|
1400
1217
|
const deserializeAws_restJson1PolicyIdList = (output, context) => {
|
|
1401
|
-
|
|
1218
|
+
const retVal = (output || [])
|
|
1402
1219
|
.filter((e) => e != null)
|
|
1403
1220
|
.map((entry) => {
|
|
1404
1221
|
if (entry === null) {
|
|
@@ -1406,9 +1223,10 @@ const deserializeAws_restJson1PolicyIdList = (output, context) => {
|
|
|
1406
1223
|
}
|
|
1407
1224
|
return smithy_client_1.expectString(entry);
|
|
1408
1225
|
});
|
|
1226
|
+
return retVal;
|
|
1409
1227
|
};
|
|
1410
1228
|
const deserializeAws_restJson1ResourceLocationList = (output, context) => {
|
|
1411
|
-
|
|
1229
|
+
const retVal = (output || [])
|
|
1412
1230
|
.filter((e) => e != null)
|
|
1413
1231
|
.map((entry) => {
|
|
1414
1232
|
if (entry === null) {
|
|
@@ -1416,9 +1234,10 @@ const deserializeAws_restJson1ResourceLocationList = (output, context) => {
|
|
|
1416
1234
|
}
|
|
1417
1235
|
return smithy_client_1.expectString(entry);
|
|
1418
1236
|
});
|
|
1237
|
+
return retVal;
|
|
1419
1238
|
};
|
|
1420
1239
|
const deserializeAws_restJson1ResourceTypeValuesList = (output, context) => {
|
|
1421
|
-
|
|
1240
|
+
const retVal = (output || [])
|
|
1422
1241
|
.filter((e) => e != null)
|
|
1423
1242
|
.map((entry) => {
|
|
1424
1243
|
if (entry === null) {
|
|
@@ -1426,6 +1245,7 @@ const deserializeAws_restJson1ResourceTypeValuesList = (output, context) => {
|
|
|
1426
1245
|
}
|
|
1427
1246
|
return smithy_client_1.expectString(entry);
|
|
1428
1247
|
});
|
|
1248
|
+
return retVal;
|
|
1429
1249
|
};
|
|
1430
1250
|
const deserializeAws_restJson1RetainRule = (output, context) => {
|
|
1431
1251
|
return {
|
|
@@ -1465,7 +1285,7 @@ const deserializeAws_restJson1Schedule = (output, context) => {
|
|
|
1465
1285
|
};
|
|
1466
1286
|
};
|
|
1467
1287
|
const deserializeAws_restJson1ScheduleList = (output, context) => {
|
|
1468
|
-
|
|
1288
|
+
const retVal = (output || [])
|
|
1469
1289
|
.filter((e) => e != null)
|
|
1470
1290
|
.map((entry) => {
|
|
1471
1291
|
if (entry === null) {
|
|
@@ -1473,6 +1293,7 @@ const deserializeAws_restJson1ScheduleList = (output, context) => {
|
|
|
1473
1293
|
}
|
|
1474
1294
|
return deserializeAws_restJson1Schedule(entry, context);
|
|
1475
1295
|
});
|
|
1296
|
+
return retVal;
|
|
1476
1297
|
};
|
|
1477
1298
|
const deserializeAws_restJson1ShareRule = (output, context) => {
|
|
1478
1299
|
return {
|
|
@@ -1484,7 +1305,7 @@ const deserializeAws_restJson1ShareRule = (output, context) => {
|
|
|
1484
1305
|
};
|
|
1485
1306
|
};
|
|
1486
1307
|
const deserializeAws_restJson1ShareRules = (output, context) => {
|
|
1487
|
-
|
|
1308
|
+
const retVal = (output || [])
|
|
1488
1309
|
.filter((e) => e != null)
|
|
1489
1310
|
.map((entry) => {
|
|
1490
1311
|
if (entry === null) {
|
|
@@ -1492,9 +1313,10 @@ const deserializeAws_restJson1ShareRules = (output, context) => {
|
|
|
1492
1313
|
}
|
|
1493
1314
|
return deserializeAws_restJson1ShareRule(entry, context);
|
|
1494
1315
|
});
|
|
1316
|
+
return retVal;
|
|
1495
1317
|
};
|
|
1496
1318
|
const deserializeAws_restJson1ShareTargetAccountList = (output, context) => {
|
|
1497
|
-
|
|
1319
|
+
const retVal = (output || [])
|
|
1498
1320
|
.filter((e) => e != null)
|
|
1499
1321
|
.map((entry) => {
|
|
1500
1322
|
if (entry === null) {
|
|
@@ -1502,9 +1324,10 @@ const deserializeAws_restJson1ShareTargetAccountList = (output, context) => {
|
|
|
1502
1324
|
}
|
|
1503
1325
|
return smithy_client_1.expectString(entry);
|
|
1504
1326
|
});
|
|
1327
|
+
return retVal;
|
|
1505
1328
|
};
|
|
1506
1329
|
const deserializeAws_restJson1SnapshotOwnerList = (output, context) => {
|
|
1507
|
-
|
|
1330
|
+
const retVal = (output || [])
|
|
1508
1331
|
.filter((e) => e != null)
|
|
1509
1332
|
.map((entry) => {
|
|
1510
1333
|
if (entry === null) {
|
|
@@ -1512,6 +1335,7 @@ const deserializeAws_restJson1SnapshotOwnerList = (output, context) => {
|
|
|
1512
1335
|
}
|
|
1513
1336
|
return smithy_client_1.expectString(entry);
|
|
1514
1337
|
});
|
|
1338
|
+
return retVal;
|
|
1515
1339
|
};
|
|
1516
1340
|
const deserializeAws_restJson1Tag = (output, context) => {
|
|
1517
1341
|
return {
|
|
@@ -1531,7 +1355,7 @@ const deserializeAws_restJson1TagMap = (output, context) => {
|
|
|
1531
1355
|
}, {});
|
|
1532
1356
|
};
|
|
1533
1357
|
const deserializeAws_restJson1TagsToAddList = (output, context) => {
|
|
1534
|
-
|
|
1358
|
+
const retVal = (output || [])
|
|
1535
1359
|
.filter((e) => e != null)
|
|
1536
1360
|
.map((entry) => {
|
|
1537
1361
|
if (entry === null) {
|
|
@@ -1539,9 +1363,10 @@ const deserializeAws_restJson1TagsToAddList = (output, context) => {
|
|
|
1539
1363
|
}
|
|
1540
1364
|
return deserializeAws_restJson1Tag(entry, context);
|
|
1541
1365
|
});
|
|
1366
|
+
return retVal;
|
|
1542
1367
|
};
|
|
1543
1368
|
const deserializeAws_restJson1TargetTagList = (output, context) => {
|
|
1544
|
-
|
|
1369
|
+
const retVal = (output || [])
|
|
1545
1370
|
.filter((e) => e != null)
|
|
1546
1371
|
.map((entry) => {
|
|
1547
1372
|
if (entry === null) {
|
|
@@ -1549,9 +1374,10 @@ const deserializeAws_restJson1TargetTagList = (output, context) => {
|
|
|
1549
1374
|
}
|
|
1550
1375
|
return deserializeAws_restJson1Tag(entry, context);
|
|
1551
1376
|
});
|
|
1377
|
+
return retVal;
|
|
1552
1378
|
};
|
|
1553
1379
|
const deserializeAws_restJson1TimesList = (output, context) => {
|
|
1554
|
-
|
|
1380
|
+
const retVal = (output || [])
|
|
1555
1381
|
.filter((e) => e != null)
|
|
1556
1382
|
.map((entry) => {
|
|
1557
1383
|
if (entry === null) {
|
|
@@ -1559,9 +1385,10 @@ const deserializeAws_restJson1TimesList = (output, context) => {
|
|
|
1559
1385
|
}
|
|
1560
1386
|
return smithy_client_1.expectString(entry);
|
|
1561
1387
|
});
|
|
1388
|
+
return retVal;
|
|
1562
1389
|
};
|
|
1563
1390
|
const deserializeAws_restJson1VariableTagsList = (output, context) => {
|
|
1564
|
-
|
|
1391
|
+
const retVal = (output || [])
|
|
1565
1392
|
.filter((e) => e != null)
|
|
1566
1393
|
.map((entry) => {
|
|
1567
1394
|
if (entry === null) {
|
|
@@ -1569,6 +1396,7 @@ const deserializeAws_restJson1VariableTagsList = (output, context) => {
|
|
|
1569
1396
|
}
|
|
1570
1397
|
return deserializeAws_restJson1Tag(entry, context);
|
|
1571
1398
|
});
|
|
1399
|
+
return retVal;
|
|
1572
1400
|
};
|
|
1573
1401
|
const deserializeMetadata = (output) => {
|
|
1574
1402
|
var _a;
|