@aws-sdk/client-shield 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/ShieldServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +179 -3
- package/dist-cjs/protocols/Aws_json1_1.js +365 -1296
- package/dist-es/index.js +1 -0
- package/dist-es/models/ShieldServiceException.js +12 -0
- package/dist-es/models/models_0.js +164 -1
- package/dist-es/protocols/Aws_json1_1.js +796 -1415
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/ShieldServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +93 -53
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/ShieldServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +67 -53
- package/package.json +25 -25
|
@@ -4,6 +4,8 @@ exports.deserializeAws_json1_1DescribeEmergencyContactSettingsCommand = exports.
|
|
|
4
4
|
exports.deserializeAws_json1_1UpdateSubscriptionCommand = exports.deserializeAws_json1_1UpdateProtectionGroupCommand = exports.deserializeAws_json1_1UpdateEmergencyContactSettingsCommand = exports.deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListResourcesInProtectionGroupCommand = exports.deserializeAws_json1_1ListProtectionsCommand = exports.deserializeAws_json1_1ListProtectionGroupsCommand = exports.deserializeAws_json1_1ListAttacksCommand = exports.deserializeAws_json1_1GetSubscriptionStateCommand = exports.deserializeAws_json1_1EnableProactiveEngagementCommand = exports.deserializeAws_json1_1EnableApplicationLayerAutomaticResponseCommand = exports.deserializeAws_json1_1DisassociateHealthCheckCommand = exports.deserializeAws_json1_1DisassociateDRTRoleCommand = exports.deserializeAws_json1_1DisassociateDRTLogBucketCommand = exports.deserializeAws_json1_1DisableProactiveEngagementCommand = exports.deserializeAws_json1_1DisableApplicationLayerAutomaticResponseCommand = exports.deserializeAws_json1_1DescribeSubscriptionCommand = exports.deserializeAws_json1_1DescribeProtectionGroupCommand = exports.deserializeAws_json1_1DescribeProtectionCommand = void 0;
|
|
5
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const ShieldServiceException_1 = require("../models/ShieldServiceException");
|
|
7
9
|
const serializeAws_json1_1AssociateDRTLogBucketCommand = async (input, context) => {
|
|
8
10
|
const headers = {
|
|
9
11
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -389,83 +391,37 @@ const deserializeAws_json1_1AssociateDRTLogBucketCommandError = async (output, c
|
|
|
389
391
|
switch (errorCode) {
|
|
390
392
|
case "AccessDeniedForDependencyException":
|
|
391
393
|
case "com.amazonaws.shield#AccessDeniedForDependencyException":
|
|
392
|
-
|
|
393
|
-
...(await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context)),
|
|
394
|
-
name: errorCode,
|
|
395
|
-
$metadata: deserializeMetadata(output),
|
|
396
|
-
};
|
|
397
|
-
break;
|
|
394
|
+
throw await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context);
|
|
398
395
|
case "InternalErrorException":
|
|
399
396
|
case "com.amazonaws.shield#InternalErrorException":
|
|
400
|
-
|
|
401
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
402
|
-
name: errorCode,
|
|
403
|
-
$metadata: deserializeMetadata(output),
|
|
404
|
-
};
|
|
405
|
-
break;
|
|
397
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
406
398
|
case "InvalidOperationException":
|
|
407
399
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
408
|
-
|
|
409
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
410
|
-
name: errorCode,
|
|
411
|
-
$metadata: deserializeMetadata(output),
|
|
412
|
-
};
|
|
413
|
-
break;
|
|
400
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
414
401
|
case "InvalidParameterException":
|
|
415
402
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
416
|
-
|
|
417
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
418
|
-
name: errorCode,
|
|
419
|
-
$metadata: deserializeMetadata(output),
|
|
420
|
-
};
|
|
421
|
-
break;
|
|
403
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
422
404
|
case "LimitsExceededException":
|
|
423
405
|
case "com.amazonaws.shield#LimitsExceededException":
|
|
424
|
-
|
|
425
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
426
|
-
name: errorCode,
|
|
427
|
-
$metadata: deserializeMetadata(output),
|
|
428
|
-
};
|
|
429
|
-
break;
|
|
406
|
+
throw await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context);
|
|
430
407
|
case "NoAssociatedRoleException":
|
|
431
408
|
case "com.amazonaws.shield#NoAssociatedRoleException":
|
|
432
|
-
|
|
433
|
-
...(await deserializeAws_json1_1NoAssociatedRoleExceptionResponse(parsedOutput, context)),
|
|
434
|
-
name: errorCode,
|
|
435
|
-
$metadata: deserializeMetadata(output),
|
|
436
|
-
};
|
|
437
|
-
break;
|
|
409
|
+
throw await deserializeAws_json1_1NoAssociatedRoleExceptionResponse(parsedOutput, context);
|
|
438
410
|
case "OptimisticLockException":
|
|
439
411
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
440
|
-
|
|
441
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
442
|
-
name: errorCode,
|
|
443
|
-
$metadata: deserializeMetadata(output),
|
|
444
|
-
};
|
|
445
|
-
break;
|
|
412
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
446
413
|
case "ResourceNotFoundException":
|
|
447
414
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
448
|
-
|
|
449
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
450
|
-
name: errorCode,
|
|
451
|
-
$metadata: deserializeMetadata(output),
|
|
452
|
-
};
|
|
453
|
-
break;
|
|
415
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
454
416
|
default:
|
|
455
417
|
const parsedBody = parsedOutput.body;
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
...parsedBody,
|
|
459
|
-
name: `${errorCode}`,
|
|
460
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
418
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
419
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
461
420
|
$fault: "client",
|
|
462
421
|
$metadata: deserializeMetadata(output),
|
|
463
|
-
};
|
|
422
|
+
});
|
|
423
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
464
424
|
}
|
|
465
|
-
const message = response.message || response.Message || errorCode;
|
|
466
|
-
response.message = message;
|
|
467
|
-
delete response.Message;
|
|
468
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
469
425
|
};
|
|
470
426
|
const deserializeAws_json1_1AssociateDRTRoleCommand = async (output, context) => {
|
|
471
427
|
if (output.statusCode >= 300) {
|
|
@@ -492,67 +448,31 @@ const deserializeAws_json1_1AssociateDRTRoleCommandError = async (output, contex
|
|
|
492
448
|
switch (errorCode) {
|
|
493
449
|
case "AccessDeniedForDependencyException":
|
|
494
450
|
case "com.amazonaws.shield#AccessDeniedForDependencyException":
|
|
495
|
-
|
|
496
|
-
...(await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context)),
|
|
497
|
-
name: errorCode,
|
|
498
|
-
$metadata: deserializeMetadata(output),
|
|
499
|
-
};
|
|
500
|
-
break;
|
|
451
|
+
throw await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context);
|
|
501
452
|
case "InternalErrorException":
|
|
502
453
|
case "com.amazonaws.shield#InternalErrorException":
|
|
503
|
-
|
|
504
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
505
|
-
name: errorCode,
|
|
506
|
-
$metadata: deserializeMetadata(output),
|
|
507
|
-
};
|
|
508
|
-
break;
|
|
454
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
509
455
|
case "InvalidOperationException":
|
|
510
456
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
511
|
-
|
|
512
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
513
|
-
name: errorCode,
|
|
514
|
-
$metadata: deserializeMetadata(output),
|
|
515
|
-
};
|
|
516
|
-
break;
|
|
457
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
517
458
|
case "InvalidParameterException":
|
|
518
459
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
519
|
-
|
|
520
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
521
|
-
name: errorCode,
|
|
522
|
-
$metadata: deserializeMetadata(output),
|
|
523
|
-
};
|
|
524
|
-
break;
|
|
460
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
525
461
|
case "OptimisticLockException":
|
|
526
462
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
527
|
-
|
|
528
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
529
|
-
name: errorCode,
|
|
530
|
-
$metadata: deserializeMetadata(output),
|
|
531
|
-
};
|
|
532
|
-
break;
|
|
463
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
533
464
|
case "ResourceNotFoundException":
|
|
534
465
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
535
|
-
|
|
536
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
537
|
-
name: errorCode,
|
|
538
|
-
$metadata: deserializeMetadata(output),
|
|
539
|
-
};
|
|
540
|
-
break;
|
|
466
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
541
467
|
default:
|
|
542
468
|
const parsedBody = parsedOutput.body;
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
...parsedBody,
|
|
546
|
-
name: `${errorCode}`,
|
|
547
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
469
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
470
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
548
471
|
$fault: "client",
|
|
549
472
|
$metadata: deserializeMetadata(output),
|
|
550
|
-
};
|
|
473
|
+
});
|
|
474
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
551
475
|
}
|
|
552
|
-
const message = response.message || response.Message || errorCode;
|
|
553
|
-
response.message = message;
|
|
554
|
-
delete response.Message;
|
|
555
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
556
476
|
};
|
|
557
477
|
const deserializeAws_json1_1AssociateHealthCheckCommand = async (output, context) => {
|
|
558
478
|
if (output.statusCode >= 300) {
|
|
@@ -579,67 +499,31 @@ const deserializeAws_json1_1AssociateHealthCheckCommandError = async (output, co
|
|
|
579
499
|
switch (errorCode) {
|
|
580
500
|
case "InternalErrorException":
|
|
581
501
|
case "com.amazonaws.shield#InternalErrorException":
|
|
582
|
-
|
|
583
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
584
|
-
name: errorCode,
|
|
585
|
-
$metadata: deserializeMetadata(output),
|
|
586
|
-
};
|
|
587
|
-
break;
|
|
502
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
588
503
|
case "InvalidParameterException":
|
|
589
504
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
590
|
-
|
|
591
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
592
|
-
name: errorCode,
|
|
593
|
-
$metadata: deserializeMetadata(output),
|
|
594
|
-
};
|
|
595
|
-
break;
|
|
505
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
596
506
|
case "InvalidResourceException":
|
|
597
507
|
case "com.amazonaws.shield#InvalidResourceException":
|
|
598
|
-
|
|
599
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
600
|
-
name: errorCode,
|
|
601
|
-
$metadata: deserializeMetadata(output),
|
|
602
|
-
};
|
|
603
|
-
break;
|
|
508
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
604
509
|
case "LimitsExceededException":
|
|
605
510
|
case "com.amazonaws.shield#LimitsExceededException":
|
|
606
|
-
|
|
607
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
608
|
-
name: errorCode,
|
|
609
|
-
$metadata: deserializeMetadata(output),
|
|
610
|
-
};
|
|
611
|
-
break;
|
|
511
|
+
throw await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context);
|
|
612
512
|
case "OptimisticLockException":
|
|
613
513
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
614
|
-
|
|
615
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
616
|
-
name: errorCode,
|
|
617
|
-
$metadata: deserializeMetadata(output),
|
|
618
|
-
};
|
|
619
|
-
break;
|
|
514
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
620
515
|
case "ResourceNotFoundException":
|
|
621
516
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
622
|
-
|
|
623
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
624
|
-
name: errorCode,
|
|
625
|
-
$metadata: deserializeMetadata(output),
|
|
626
|
-
};
|
|
627
|
-
break;
|
|
517
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
628
518
|
default:
|
|
629
519
|
const parsedBody = parsedOutput.body;
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
...parsedBody,
|
|
633
|
-
name: `${errorCode}`,
|
|
634
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
520
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
521
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
635
522
|
$fault: "client",
|
|
636
523
|
$metadata: deserializeMetadata(output),
|
|
637
|
-
};
|
|
524
|
+
});
|
|
525
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
638
526
|
}
|
|
639
|
-
const message = response.message || response.Message || errorCode;
|
|
640
|
-
response.message = message;
|
|
641
|
-
delete response.Message;
|
|
642
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
643
527
|
};
|
|
644
528
|
const deserializeAws_json1_1AssociateProactiveEngagementDetailsCommand = async (output, context) => {
|
|
645
529
|
if (output.statusCode >= 300) {
|
|
@@ -666,59 +550,28 @@ const deserializeAws_json1_1AssociateProactiveEngagementDetailsCommandError = as
|
|
|
666
550
|
switch (errorCode) {
|
|
667
551
|
case "InternalErrorException":
|
|
668
552
|
case "com.amazonaws.shield#InternalErrorException":
|
|
669
|
-
|
|
670
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
671
|
-
name: errorCode,
|
|
672
|
-
$metadata: deserializeMetadata(output),
|
|
673
|
-
};
|
|
674
|
-
break;
|
|
553
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
675
554
|
case "InvalidOperationException":
|
|
676
555
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
677
|
-
|
|
678
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
679
|
-
name: errorCode,
|
|
680
|
-
$metadata: deserializeMetadata(output),
|
|
681
|
-
};
|
|
682
|
-
break;
|
|
556
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
683
557
|
case "InvalidParameterException":
|
|
684
558
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
685
|
-
|
|
686
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
687
|
-
name: errorCode,
|
|
688
|
-
$metadata: deserializeMetadata(output),
|
|
689
|
-
};
|
|
690
|
-
break;
|
|
559
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
691
560
|
case "OptimisticLockException":
|
|
692
561
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
693
|
-
|
|
694
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
695
|
-
name: errorCode,
|
|
696
|
-
$metadata: deserializeMetadata(output),
|
|
697
|
-
};
|
|
698
|
-
break;
|
|
562
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
699
563
|
case "ResourceNotFoundException":
|
|
700
564
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
701
|
-
|
|
702
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
703
|
-
name: errorCode,
|
|
704
|
-
$metadata: deserializeMetadata(output),
|
|
705
|
-
};
|
|
706
|
-
break;
|
|
565
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
707
566
|
default:
|
|
708
567
|
const parsedBody = parsedOutput.body;
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
...parsedBody,
|
|
712
|
-
name: `${errorCode}`,
|
|
713
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
568
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
569
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
714
570
|
$fault: "client",
|
|
715
571
|
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
572
|
+
});
|
|
573
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
717
574
|
}
|
|
718
|
-
const message = response.message || response.Message || errorCode;
|
|
719
|
-
response.message = message;
|
|
720
|
-
delete response.Message;
|
|
721
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
722
575
|
};
|
|
723
576
|
const deserializeAws_json1_1CreateProtectionCommand = async (output, context) => {
|
|
724
577
|
if (output.statusCode >= 300) {
|
|
@@ -745,83 +598,37 @@ const deserializeAws_json1_1CreateProtectionCommandError = async (output, contex
|
|
|
745
598
|
switch (errorCode) {
|
|
746
599
|
case "InternalErrorException":
|
|
747
600
|
case "com.amazonaws.shield#InternalErrorException":
|
|
748
|
-
|
|
749
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
750
|
-
name: errorCode,
|
|
751
|
-
$metadata: deserializeMetadata(output),
|
|
752
|
-
};
|
|
753
|
-
break;
|
|
601
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
754
602
|
case "InvalidOperationException":
|
|
755
603
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
756
|
-
|
|
757
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
758
|
-
name: errorCode,
|
|
759
|
-
$metadata: deserializeMetadata(output),
|
|
760
|
-
};
|
|
761
|
-
break;
|
|
604
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
762
605
|
case "InvalidParameterException":
|
|
763
606
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
764
|
-
|
|
765
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
766
|
-
name: errorCode,
|
|
767
|
-
$metadata: deserializeMetadata(output),
|
|
768
|
-
};
|
|
769
|
-
break;
|
|
607
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
770
608
|
case "InvalidResourceException":
|
|
771
609
|
case "com.amazonaws.shield#InvalidResourceException":
|
|
772
|
-
|
|
773
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
774
|
-
name: errorCode,
|
|
775
|
-
$metadata: deserializeMetadata(output),
|
|
776
|
-
};
|
|
777
|
-
break;
|
|
610
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
778
611
|
case "LimitsExceededException":
|
|
779
612
|
case "com.amazonaws.shield#LimitsExceededException":
|
|
780
|
-
|
|
781
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
782
|
-
name: errorCode,
|
|
783
|
-
$metadata: deserializeMetadata(output),
|
|
784
|
-
};
|
|
785
|
-
break;
|
|
613
|
+
throw await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context);
|
|
786
614
|
case "OptimisticLockException":
|
|
787
615
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
788
|
-
|
|
789
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
790
|
-
name: errorCode,
|
|
791
|
-
$metadata: deserializeMetadata(output),
|
|
792
|
-
};
|
|
793
|
-
break;
|
|
616
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
794
617
|
case "ResourceAlreadyExistsException":
|
|
795
618
|
case "com.amazonaws.shield#ResourceAlreadyExistsException":
|
|
796
|
-
|
|
797
|
-
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
798
|
-
name: errorCode,
|
|
799
|
-
$metadata: deserializeMetadata(output),
|
|
800
|
-
};
|
|
801
|
-
break;
|
|
619
|
+
throw await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
802
620
|
case "ResourceNotFoundException":
|
|
803
621
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
804
|
-
|
|
805
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
806
|
-
name: errorCode,
|
|
807
|
-
$metadata: deserializeMetadata(output),
|
|
808
|
-
};
|
|
809
|
-
break;
|
|
622
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
810
623
|
default:
|
|
811
624
|
const parsedBody = parsedOutput.body;
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
...parsedBody,
|
|
815
|
-
name: `${errorCode}`,
|
|
816
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
625
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
626
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
817
627
|
$fault: "client",
|
|
818
628
|
$metadata: deserializeMetadata(output),
|
|
819
|
-
};
|
|
629
|
+
});
|
|
630
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
820
631
|
}
|
|
821
|
-
const message = response.message || response.Message || errorCode;
|
|
822
|
-
response.message = message;
|
|
823
|
-
delete response.Message;
|
|
824
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
825
632
|
};
|
|
826
633
|
const deserializeAws_json1_1CreateProtectionGroupCommand = async (output, context) => {
|
|
827
634
|
if (output.statusCode >= 300) {
|
|
@@ -848,67 +655,31 @@ const deserializeAws_json1_1CreateProtectionGroupCommandError = async (output, c
|
|
|
848
655
|
switch (errorCode) {
|
|
849
656
|
case "InternalErrorException":
|
|
850
657
|
case "com.amazonaws.shield#InternalErrorException":
|
|
851
|
-
|
|
852
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
853
|
-
name: errorCode,
|
|
854
|
-
$metadata: deserializeMetadata(output),
|
|
855
|
-
};
|
|
856
|
-
break;
|
|
658
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
857
659
|
case "InvalidParameterException":
|
|
858
660
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
859
|
-
|
|
860
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
861
|
-
name: errorCode,
|
|
862
|
-
$metadata: deserializeMetadata(output),
|
|
863
|
-
};
|
|
864
|
-
break;
|
|
661
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
865
662
|
case "LimitsExceededException":
|
|
866
663
|
case "com.amazonaws.shield#LimitsExceededException":
|
|
867
|
-
|
|
868
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
869
|
-
name: errorCode,
|
|
870
|
-
$metadata: deserializeMetadata(output),
|
|
871
|
-
};
|
|
872
|
-
break;
|
|
664
|
+
throw await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context);
|
|
873
665
|
case "OptimisticLockException":
|
|
874
666
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
875
|
-
|
|
876
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
877
|
-
name: errorCode,
|
|
878
|
-
$metadata: deserializeMetadata(output),
|
|
879
|
-
};
|
|
880
|
-
break;
|
|
667
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
881
668
|
case "ResourceAlreadyExistsException":
|
|
882
669
|
case "com.amazonaws.shield#ResourceAlreadyExistsException":
|
|
883
|
-
|
|
884
|
-
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
885
|
-
name: errorCode,
|
|
886
|
-
$metadata: deserializeMetadata(output),
|
|
887
|
-
};
|
|
888
|
-
break;
|
|
670
|
+
throw await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
889
671
|
case "ResourceNotFoundException":
|
|
890
672
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
891
|
-
|
|
892
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
893
|
-
name: errorCode,
|
|
894
|
-
$metadata: deserializeMetadata(output),
|
|
895
|
-
};
|
|
896
|
-
break;
|
|
673
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
897
674
|
default:
|
|
898
675
|
const parsedBody = parsedOutput.body;
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
...parsedBody,
|
|
902
|
-
name: `${errorCode}`,
|
|
903
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
676
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
677
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
904
678
|
$fault: "client",
|
|
905
679
|
$metadata: deserializeMetadata(output),
|
|
906
|
-
};
|
|
680
|
+
});
|
|
681
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
907
682
|
}
|
|
908
|
-
const message = response.message || response.Message || errorCode;
|
|
909
|
-
response.message = message;
|
|
910
|
-
delete response.Message;
|
|
911
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
912
683
|
};
|
|
913
684
|
const deserializeAws_json1_1CreateSubscriptionCommand = async (output, context) => {
|
|
914
685
|
if (output.statusCode >= 300) {
|
|
@@ -935,35 +706,19 @@ const deserializeAws_json1_1CreateSubscriptionCommandError = async (output, cont
|
|
|
935
706
|
switch (errorCode) {
|
|
936
707
|
case "InternalErrorException":
|
|
937
708
|
case "com.amazonaws.shield#InternalErrorException":
|
|
938
|
-
|
|
939
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
940
|
-
name: errorCode,
|
|
941
|
-
$metadata: deserializeMetadata(output),
|
|
942
|
-
};
|
|
943
|
-
break;
|
|
709
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
944
710
|
case "ResourceAlreadyExistsException":
|
|
945
711
|
case "com.amazonaws.shield#ResourceAlreadyExistsException":
|
|
946
|
-
|
|
947
|
-
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
948
|
-
name: errorCode,
|
|
949
|
-
$metadata: deserializeMetadata(output),
|
|
950
|
-
};
|
|
951
|
-
break;
|
|
712
|
+
throw await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context);
|
|
952
713
|
default:
|
|
953
714
|
const parsedBody = parsedOutput.body;
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
...parsedBody,
|
|
957
|
-
name: `${errorCode}`,
|
|
958
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
715
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
716
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
959
717
|
$fault: "client",
|
|
960
718
|
$metadata: deserializeMetadata(output),
|
|
961
|
-
};
|
|
719
|
+
});
|
|
720
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
962
721
|
}
|
|
963
|
-
const message = response.message || response.Message || errorCode;
|
|
964
|
-
response.message = message;
|
|
965
|
-
delete response.Message;
|
|
966
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
967
722
|
};
|
|
968
723
|
const deserializeAws_json1_1DeleteProtectionCommand = async (output, context) => {
|
|
969
724
|
if (output.statusCode >= 300) {
|
|
@@ -990,43 +745,22 @@ const deserializeAws_json1_1DeleteProtectionCommandError = async (output, contex
|
|
|
990
745
|
switch (errorCode) {
|
|
991
746
|
case "InternalErrorException":
|
|
992
747
|
case "com.amazonaws.shield#InternalErrorException":
|
|
993
|
-
|
|
994
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
995
|
-
name: errorCode,
|
|
996
|
-
$metadata: deserializeMetadata(output),
|
|
997
|
-
};
|
|
998
|
-
break;
|
|
748
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
999
749
|
case "OptimisticLockException":
|
|
1000
750
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1001
|
-
|
|
1002
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1003
|
-
name: errorCode,
|
|
1004
|
-
$metadata: deserializeMetadata(output),
|
|
1005
|
-
};
|
|
1006
|
-
break;
|
|
751
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1007
752
|
case "ResourceNotFoundException":
|
|
1008
753
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1009
|
-
|
|
1010
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1011
|
-
name: errorCode,
|
|
1012
|
-
$metadata: deserializeMetadata(output),
|
|
1013
|
-
};
|
|
1014
|
-
break;
|
|
754
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1015
755
|
default:
|
|
1016
756
|
const parsedBody = parsedOutput.body;
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
...parsedBody,
|
|
1020
|
-
name: `${errorCode}`,
|
|
1021
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
757
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
758
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1022
759
|
$fault: "client",
|
|
1023
760
|
$metadata: deserializeMetadata(output),
|
|
1024
|
-
};
|
|
761
|
+
});
|
|
762
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1025
763
|
}
|
|
1026
|
-
const message = response.message || response.Message || errorCode;
|
|
1027
|
-
response.message = message;
|
|
1028
|
-
delete response.Message;
|
|
1029
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1030
764
|
};
|
|
1031
765
|
const deserializeAws_json1_1DeleteProtectionGroupCommand = async (output, context) => {
|
|
1032
766
|
if (output.statusCode >= 300) {
|
|
@@ -1053,43 +787,22 @@ const deserializeAws_json1_1DeleteProtectionGroupCommandError = async (output, c
|
|
|
1053
787
|
switch (errorCode) {
|
|
1054
788
|
case "InternalErrorException":
|
|
1055
789
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1056
|
-
|
|
1057
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1058
|
-
name: errorCode,
|
|
1059
|
-
$metadata: deserializeMetadata(output),
|
|
1060
|
-
};
|
|
1061
|
-
break;
|
|
790
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1062
791
|
case "OptimisticLockException":
|
|
1063
792
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1064
|
-
|
|
1065
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1066
|
-
name: errorCode,
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
};
|
|
1069
|
-
break;
|
|
793
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1070
794
|
case "ResourceNotFoundException":
|
|
1071
795
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1072
|
-
|
|
1073
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1074
|
-
name: errorCode,
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
};
|
|
1077
|
-
break;
|
|
796
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1078
797
|
default:
|
|
1079
798
|
const parsedBody = parsedOutput.body;
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
...parsedBody,
|
|
1083
|
-
name: `${errorCode}`,
|
|
1084
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
799
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
800
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1085
801
|
$fault: "client",
|
|
1086
802
|
$metadata: deserializeMetadata(output),
|
|
1087
|
-
};
|
|
803
|
+
});
|
|
804
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1088
805
|
}
|
|
1089
|
-
const message = response.message || response.Message || errorCode;
|
|
1090
|
-
response.message = message;
|
|
1091
|
-
delete response.Message;
|
|
1092
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1093
806
|
};
|
|
1094
807
|
const deserializeAws_json1_1DeleteSubscriptionCommand = async (output, context) => {
|
|
1095
808
|
if (output.statusCode >= 300) {
|
|
@@ -1116,43 +829,22 @@ const deserializeAws_json1_1DeleteSubscriptionCommandError = async (output, cont
|
|
|
1116
829
|
switch (errorCode) {
|
|
1117
830
|
case "InternalErrorException":
|
|
1118
831
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1119
|
-
|
|
1120
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1121
|
-
name: errorCode,
|
|
1122
|
-
$metadata: deserializeMetadata(output),
|
|
1123
|
-
};
|
|
1124
|
-
break;
|
|
832
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1125
833
|
case "LockedSubscriptionException":
|
|
1126
834
|
case "com.amazonaws.shield#LockedSubscriptionException":
|
|
1127
|
-
|
|
1128
|
-
...(await deserializeAws_json1_1LockedSubscriptionExceptionResponse(parsedOutput, context)),
|
|
1129
|
-
name: errorCode,
|
|
1130
|
-
$metadata: deserializeMetadata(output),
|
|
1131
|
-
};
|
|
1132
|
-
break;
|
|
835
|
+
throw await deserializeAws_json1_1LockedSubscriptionExceptionResponse(parsedOutput, context);
|
|
1133
836
|
case "ResourceNotFoundException":
|
|
1134
837
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1135
|
-
|
|
1136
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1137
|
-
name: errorCode,
|
|
1138
|
-
$metadata: deserializeMetadata(output),
|
|
1139
|
-
};
|
|
1140
|
-
break;
|
|
838
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1141
839
|
default:
|
|
1142
840
|
const parsedBody = parsedOutput.body;
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
...parsedBody,
|
|
1146
|
-
name: `${errorCode}`,
|
|
1147
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
841
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
842
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1148
843
|
$fault: "client",
|
|
1149
844
|
$metadata: deserializeMetadata(output),
|
|
1150
|
-
};
|
|
845
|
+
});
|
|
846
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1151
847
|
}
|
|
1152
|
-
const message = response.message || response.Message || errorCode;
|
|
1153
|
-
response.message = message;
|
|
1154
|
-
delete response.Message;
|
|
1155
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1156
848
|
};
|
|
1157
849
|
const deserializeAws_json1_1DescribeAttackCommand = async (output, context) => {
|
|
1158
850
|
if (output.statusCode >= 300) {
|
|
@@ -1179,35 +871,19 @@ const deserializeAws_json1_1DescribeAttackCommandError = async (output, context)
|
|
|
1179
871
|
switch (errorCode) {
|
|
1180
872
|
case "AccessDeniedException":
|
|
1181
873
|
case "com.amazonaws.shield#AccessDeniedException":
|
|
1182
|
-
|
|
1183
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1184
|
-
name: errorCode,
|
|
1185
|
-
$metadata: deserializeMetadata(output),
|
|
1186
|
-
};
|
|
1187
|
-
break;
|
|
874
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1188
875
|
case "InternalErrorException":
|
|
1189
876
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1190
|
-
|
|
1191
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1192
|
-
name: errorCode,
|
|
1193
|
-
$metadata: deserializeMetadata(output),
|
|
1194
|
-
};
|
|
1195
|
-
break;
|
|
877
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1196
878
|
default:
|
|
1197
879
|
const parsedBody = parsedOutput.body;
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
...parsedBody,
|
|
1201
|
-
name: `${errorCode}`,
|
|
1202
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
880
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
881
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1203
882
|
$fault: "client",
|
|
1204
883
|
$metadata: deserializeMetadata(output),
|
|
1205
|
-
};
|
|
884
|
+
});
|
|
885
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1206
886
|
}
|
|
1207
|
-
const message = response.message || response.Message || errorCode;
|
|
1208
|
-
response.message = message;
|
|
1209
|
-
delete response.Message;
|
|
1210
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1211
887
|
};
|
|
1212
888
|
const deserializeAws_json1_1DescribeAttackStatisticsCommand = async (output, context) => {
|
|
1213
889
|
if (output.statusCode >= 300) {
|
|
@@ -1234,27 +910,16 @@ const deserializeAws_json1_1DescribeAttackStatisticsCommandError = async (output
|
|
|
1234
910
|
switch (errorCode) {
|
|
1235
911
|
case "InternalErrorException":
|
|
1236
912
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1237
|
-
|
|
1238
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1239
|
-
name: errorCode,
|
|
1240
|
-
$metadata: deserializeMetadata(output),
|
|
1241
|
-
};
|
|
1242
|
-
break;
|
|
913
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1243
914
|
default:
|
|
1244
915
|
const parsedBody = parsedOutput.body;
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
...parsedBody,
|
|
1248
|
-
name: `${errorCode}`,
|
|
1249
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
916
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
917
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1250
918
|
$fault: "client",
|
|
1251
919
|
$metadata: deserializeMetadata(output),
|
|
1252
|
-
};
|
|
920
|
+
});
|
|
921
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1253
922
|
}
|
|
1254
|
-
const message = response.message || response.Message || errorCode;
|
|
1255
|
-
response.message = message;
|
|
1256
|
-
delete response.Message;
|
|
1257
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1258
923
|
};
|
|
1259
924
|
const deserializeAws_json1_1DescribeDRTAccessCommand = async (output, context) => {
|
|
1260
925
|
if (output.statusCode >= 300) {
|
|
@@ -1281,35 +946,19 @@ const deserializeAws_json1_1DescribeDRTAccessCommandError = async (output, conte
|
|
|
1281
946
|
switch (errorCode) {
|
|
1282
947
|
case "InternalErrorException":
|
|
1283
948
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1284
|
-
|
|
1285
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1286
|
-
name: errorCode,
|
|
1287
|
-
$metadata: deserializeMetadata(output),
|
|
1288
|
-
};
|
|
1289
|
-
break;
|
|
949
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1290
950
|
case "ResourceNotFoundException":
|
|
1291
951
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1292
|
-
|
|
1293
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1294
|
-
name: errorCode,
|
|
1295
|
-
$metadata: deserializeMetadata(output),
|
|
1296
|
-
};
|
|
1297
|
-
break;
|
|
952
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1298
953
|
default:
|
|
1299
954
|
const parsedBody = parsedOutput.body;
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
...parsedBody,
|
|
1303
|
-
name: `${errorCode}`,
|
|
1304
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
955
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
956
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1305
957
|
$fault: "client",
|
|
1306
958
|
$metadata: deserializeMetadata(output),
|
|
1307
|
-
};
|
|
959
|
+
});
|
|
960
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1308
961
|
}
|
|
1309
|
-
const message = response.message || response.Message || errorCode;
|
|
1310
|
-
response.message = message;
|
|
1311
|
-
delete response.Message;
|
|
1312
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1313
962
|
};
|
|
1314
963
|
const deserializeAws_json1_1DescribeEmergencyContactSettingsCommand = async (output, context) => {
|
|
1315
964
|
if (output.statusCode >= 300) {
|
|
@@ -1336,35 +985,19 @@ const deserializeAws_json1_1DescribeEmergencyContactSettingsCommandError = async
|
|
|
1336
985
|
switch (errorCode) {
|
|
1337
986
|
case "InternalErrorException":
|
|
1338
987
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1339
|
-
|
|
1340
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1341
|
-
name: errorCode,
|
|
1342
|
-
$metadata: deserializeMetadata(output),
|
|
1343
|
-
};
|
|
1344
|
-
break;
|
|
988
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1345
989
|
case "ResourceNotFoundException":
|
|
1346
990
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1347
|
-
|
|
1348
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1349
|
-
name: errorCode,
|
|
1350
|
-
$metadata: deserializeMetadata(output),
|
|
1351
|
-
};
|
|
1352
|
-
break;
|
|
991
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1353
992
|
default:
|
|
1354
993
|
const parsedBody = parsedOutput.body;
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
...parsedBody,
|
|
1358
|
-
name: `${errorCode}`,
|
|
1359
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
994
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
995
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1360
996
|
$fault: "client",
|
|
1361
997
|
$metadata: deserializeMetadata(output),
|
|
1362
|
-
};
|
|
998
|
+
});
|
|
999
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1363
1000
|
}
|
|
1364
|
-
const message = response.message || response.Message || errorCode;
|
|
1365
|
-
response.message = message;
|
|
1366
|
-
delete response.Message;
|
|
1367
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1368
1001
|
};
|
|
1369
1002
|
const deserializeAws_json1_1DescribeProtectionCommand = async (output, context) => {
|
|
1370
1003
|
if (output.statusCode >= 300) {
|
|
@@ -1391,43 +1024,22 @@ const deserializeAws_json1_1DescribeProtectionCommandError = async (output, cont
|
|
|
1391
1024
|
switch (errorCode) {
|
|
1392
1025
|
case "InternalErrorException":
|
|
1393
1026
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1394
|
-
|
|
1395
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1396
|
-
name: errorCode,
|
|
1397
|
-
$metadata: deserializeMetadata(output),
|
|
1398
|
-
};
|
|
1399
|
-
break;
|
|
1027
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1400
1028
|
case "InvalidParameterException":
|
|
1401
1029
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
1402
|
-
|
|
1403
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1404
|
-
name: errorCode,
|
|
1405
|
-
$metadata: deserializeMetadata(output),
|
|
1406
|
-
};
|
|
1407
|
-
break;
|
|
1030
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1408
1031
|
case "ResourceNotFoundException":
|
|
1409
1032
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1410
|
-
|
|
1411
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1412
|
-
name: errorCode,
|
|
1413
|
-
$metadata: deserializeMetadata(output),
|
|
1414
|
-
};
|
|
1415
|
-
break;
|
|
1033
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1416
1034
|
default:
|
|
1417
1035
|
const parsedBody = parsedOutput.body;
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
...parsedBody,
|
|
1421
|
-
name: `${errorCode}`,
|
|
1422
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1036
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1037
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1423
1038
|
$fault: "client",
|
|
1424
1039
|
$metadata: deserializeMetadata(output),
|
|
1425
|
-
};
|
|
1040
|
+
});
|
|
1041
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1426
1042
|
}
|
|
1427
|
-
const message = response.message || response.Message || errorCode;
|
|
1428
|
-
response.message = message;
|
|
1429
|
-
delete response.Message;
|
|
1430
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1431
1043
|
};
|
|
1432
1044
|
const deserializeAws_json1_1DescribeProtectionGroupCommand = async (output, context) => {
|
|
1433
1045
|
if (output.statusCode >= 300) {
|
|
@@ -1454,35 +1066,19 @@ const deserializeAws_json1_1DescribeProtectionGroupCommandError = async (output,
|
|
|
1454
1066
|
switch (errorCode) {
|
|
1455
1067
|
case "InternalErrorException":
|
|
1456
1068
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1457
|
-
|
|
1458
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1459
|
-
name: errorCode,
|
|
1460
|
-
$metadata: deserializeMetadata(output),
|
|
1461
|
-
};
|
|
1462
|
-
break;
|
|
1069
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1463
1070
|
case "ResourceNotFoundException":
|
|
1464
1071
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1465
|
-
|
|
1466
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1467
|
-
name: errorCode,
|
|
1468
|
-
$metadata: deserializeMetadata(output),
|
|
1469
|
-
};
|
|
1470
|
-
break;
|
|
1072
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1471
1073
|
default:
|
|
1472
1074
|
const parsedBody = parsedOutput.body;
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
...parsedBody,
|
|
1476
|
-
name: `${errorCode}`,
|
|
1477
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1075
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1076
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1478
1077
|
$fault: "client",
|
|
1479
1078
|
$metadata: deserializeMetadata(output),
|
|
1480
|
-
};
|
|
1079
|
+
});
|
|
1080
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1481
1081
|
}
|
|
1482
|
-
const message = response.message || response.Message || errorCode;
|
|
1483
|
-
response.message = message;
|
|
1484
|
-
delete response.Message;
|
|
1485
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1486
1082
|
};
|
|
1487
1083
|
const deserializeAws_json1_1DescribeSubscriptionCommand = async (output, context) => {
|
|
1488
1084
|
if (output.statusCode >= 300) {
|
|
@@ -1509,35 +1105,19 @@ const deserializeAws_json1_1DescribeSubscriptionCommandError = async (output, co
|
|
|
1509
1105
|
switch (errorCode) {
|
|
1510
1106
|
case "InternalErrorException":
|
|
1511
1107
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1512
|
-
|
|
1513
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1514
|
-
name: errorCode,
|
|
1515
|
-
$metadata: deserializeMetadata(output),
|
|
1516
|
-
};
|
|
1517
|
-
break;
|
|
1108
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1518
1109
|
case "ResourceNotFoundException":
|
|
1519
1110
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1520
|
-
|
|
1521
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1522
|
-
name: errorCode,
|
|
1523
|
-
$metadata: deserializeMetadata(output),
|
|
1524
|
-
};
|
|
1525
|
-
break;
|
|
1111
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1526
1112
|
default:
|
|
1527
1113
|
const parsedBody = parsedOutput.body;
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
...parsedBody,
|
|
1531
|
-
name: `${errorCode}`,
|
|
1532
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1114
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1115
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1533
1116
|
$fault: "client",
|
|
1534
1117
|
$metadata: deserializeMetadata(output),
|
|
1535
|
-
};
|
|
1118
|
+
});
|
|
1119
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1536
1120
|
}
|
|
1537
|
-
const message = response.message || response.Message || errorCode;
|
|
1538
|
-
response.message = message;
|
|
1539
|
-
delete response.Message;
|
|
1540
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1541
1121
|
};
|
|
1542
1122
|
const deserializeAws_json1_1DisableApplicationLayerAutomaticResponseCommand = async (output, context) => {
|
|
1543
1123
|
if (output.statusCode >= 300) {
|
|
@@ -1564,59 +1144,28 @@ const deserializeAws_json1_1DisableApplicationLayerAutomaticResponseCommandError
|
|
|
1564
1144
|
switch (errorCode) {
|
|
1565
1145
|
case "InternalErrorException":
|
|
1566
1146
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1567
|
-
|
|
1568
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1569
|
-
name: errorCode,
|
|
1570
|
-
$metadata: deserializeMetadata(output),
|
|
1571
|
-
};
|
|
1572
|
-
break;
|
|
1147
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1573
1148
|
case "InvalidOperationException":
|
|
1574
1149
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
1575
|
-
|
|
1576
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1577
|
-
name: errorCode,
|
|
1578
|
-
$metadata: deserializeMetadata(output),
|
|
1579
|
-
};
|
|
1580
|
-
break;
|
|
1150
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
1581
1151
|
case "InvalidParameterException":
|
|
1582
1152
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
1583
|
-
|
|
1584
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1585
|
-
name: errorCode,
|
|
1586
|
-
$metadata: deserializeMetadata(output),
|
|
1587
|
-
};
|
|
1588
|
-
break;
|
|
1153
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1589
1154
|
case "OptimisticLockException":
|
|
1590
1155
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1591
|
-
|
|
1592
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1593
|
-
name: errorCode,
|
|
1594
|
-
$metadata: deserializeMetadata(output),
|
|
1595
|
-
};
|
|
1596
|
-
break;
|
|
1156
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1597
1157
|
case "ResourceNotFoundException":
|
|
1598
1158
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1599
|
-
|
|
1600
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1601
|
-
name: errorCode,
|
|
1602
|
-
$metadata: deserializeMetadata(output),
|
|
1603
|
-
};
|
|
1604
|
-
break;
|
|
1159
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1605
1160
|
default:
|
|
1606
1161
|
const parsedBody = parsedOutput.body;
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
...parsedBody,
|
|
1610
|
-
name: `${errorCode}`,
|
|
1611
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1162
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1163
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1612
1164
|
$fault: "client",
|
|
1613
1165
|
$metadata: deserializeMetadata(output),
|
|
1614
|
-
};
|
|
1166
|
+
});
|
|
1167
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1615
1168
|
}
|
|
1616
|
-
const message = response.message || response.Message || errorCode;
|
|
1617
|
-
response.message = message;
|
|
1618
|
-
delete response.Message;
|
|
1619
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1620
1169
|
};
|
|
1621
1170
|
const deserializeAws_json1_1DisableProactiveEngagementCommand = async (output, context) => {
|
|
1622
1171
|
if (output.statusCode >= 300) {
|
|
@@ -1643,59 +1192,28 @@ const deserializeAws_json1_1DisableProactiveEngagementCommandError = async (outp
|
|
|
1643
1192
|
switch (errorCode) {
|
|
1644
1193
|
case "InternalErrorException":
|
|
1645
1194
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1646
|
-
|
|
1647
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1648
|
-
name: errorCode,
|
|
1649
|
-
$metadata: deserializeMetadata(output),
|
|
1650
|
-
};
|
|
1651
|
-
break;
|
|
1195
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1652
1196
|
case "InvalidOperationException":
|
|
1653
1197
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
1654
|
-
|
|
1655
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1656
|
-
name: errorCode,
|
|
1657
|
-
$metadata: deserializeMetadata(output),
|
|
1658
|
-
};
|
|
1659
|
-
break;
|
|
1198
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
1660
1199
|
case "InvalidParameterException":
|
|
1661
1200
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
1662
|
-
|
|
1663
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1664
|
-
name: errorCode,
|
|
1665
|
-
$metadata: deserializeMetadata(output),
|
|
1666
|
-
};
|
|
1667
|
-
break;
|
|
1201
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1668
1202
|
case "OptimisticLockException":
|
|
1669
1203
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1670
|
-
|
|
1671
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1672
|
-
name: errorCode,
|
|
1673
|
-
$metadata: deserializeMetadata(output),
|
|
1674
|
-
};
|
|
1675
|
-
break;
|
|
1204
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1676
1205
|
case "ResourceNotFoundException":
|
|
1677
1206
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1678
|
-
|
|
1679
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1680
|
-
name: errorCode,
|
|
1681
|
-
$metadata: deserializeMetadata(output),
|
|
1682
|
-
};
|
|
1683
|
-
break;
|
|
1207
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1684
1208
|
default:
|
|
1685
1209
|
const parsedBody = parsedOutput.body;
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
...parsedBody,
|
|
1689
|
-
name: `${errorCode}`,
|
|
1690
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1210
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1211
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1691
1212
|
$fault: "client",
|
|
1692
1213
|
$metadata: deserializeMetadata(output),
|
|
1693
|
-
};
|
|
1214
|
+
});
|
|
1215
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1694
1216
|
}
|
|
1695
|
-
const message = response.message || response.Message || errorCode;
|
|
1696
|
-
response.message = message;
|
|
1697
|
-
delete response.Message;
|
|
1698
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1699
1217
|
};
|
|
1700
1218
|
const deserializeAws_json1_1DisassociateDRTLogBucketCommand = async (output, context) => {
|
|
1701
1219
|
if (output.statusCode >= 300) {
|
|
@@ -1722,67 +1240,31 @@ const deserializeAws_json1_1DisassociateDRTLogBucketCommandError = async (output
|
|
|
1722
1240
|
switch (errorCode) {
|
|
1723
1241
|
case "AccessDeniedForDependencyException":
|
|
1724
1242
|
case "com.amazonaws.shield#AccessDeniedForDependencyException":
|
|
1725
|
-
|
|
1726
|
-
...(await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context)),
|
|
1727
|
-
name: errorCode,
|
|
1728
|
-
$metadata: deserializeMetadata(output),
|
|
1729
|
-
};
|
|
1730
|
-
break;
|
|
1243
|
+
throw await deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse(parsedOutput, context);
|
|
1731
1244
|
case "InternalErrorException":
|
|
1732
1245
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1733
|
-
|
|
1734
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1735
|
-
name: errorCode,
|
|
1736
|
-
$metadata: deserializeMetadata(output),
|
|
1737
|
-
};
|
|
1738
|
-
break;
|
|
1246
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1739
1247
|
case "InvalidOperationException":
|
|
1740
1248
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
1741
|
-
|
|
1742
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1743
|
-
name: errorCode,
|
|
1744
|
-
$metadata: deserializeMetadata(output),
|
|
1745
|
-
};
|
|
1746
|
-
break;
|
|
1249
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
1747
1250
|
case "NoAssociatedRoleException":
|
|
1748
1251
|
case "com.amazonaws.shield#NoAssociatedRoleException":
|
|
1749
|
-
|
|
1750
|
-
...(await deserializeAws_json1_1NoAssociatedRoleExceptionResponse(parsedOutput, context)),
|
|
1751
|
-
name: errorCode,
|
|
1752
|
-
$metadata: deserializeMetadata(output),
|
|
1753
|
-
};
|
|
1754
|
-
break;
|
|
1252
|
+
throw await deserializeAws_json1_1NoAssociatedRoleExceptionResponse(parsedOutput, context);
|
|
1755
1253
|
case "OptimisticLockException":
|
|
1756
1254
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1757
|
-
|
|
1758
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1759
|
-
name: errorCode,
|
|
1760
|
-
$metadata: deserializeMetadata(output),
|
|
1761
|
-
};
|
|
1762
|
-
break;
|
|
1255
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1763
1256
|
case "ResourceNotFoundException":
|
|
1764
1257
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1765
|
-
|
|
1766
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1767
|
-
name: errorCode,
|
|
1768
|
-
$metadata: deserializeMetadata(output),
|
|
1769
|
-
};
|
|
1770
|
-
break;
|
|
1258
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1771
1259
|
default:
|
|
1772
1260
|
const parsedBody = parsedOutput.body;
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
...parsedBody,
|
|
1776
|
-
name: `${errorCode}`,
|
|
1777
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1261
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1262
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1778
1263
|
$fault: "client",
|
|
1779
1264
|
$metadata: deserializeMetadata(output),
|
|
1780
|
-
};
|
|
1265
|
+
});
|
|
1266
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1781
1267
|
}
|
|
1782
|
-
const message = response.message || response.Message || errorCode;
|
|
1783
|
-
response.message = message;
|
|
1784
|
-
delete response.Message;
|
|
1785
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1786
1268
|
};
|
|
1787
1269
|
const deserializeAws_json1_1DisassociateDRTRoleCommand = async (output, context) => {
|
|
1788
1270
|
if (output.statusCode >= 300) {
|
|
@@ -1809,51 +1291,25 @@ const deserializeAws_json1_1DisassociateDRTRoleCommandError = async (output, con
|
|
|
1809
1291
|
switch (errorCode) {
|
|
1810
1292
|
case "InternalErrorException":
|
|
1811
1293
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1812
|
-
|
|
1813
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1814
|
-
name: errorCode,
|
|
1815
|
-
$metadata: deserializeMetadata(output),
|
|
1816
|
-
};
|
|
1817
|
-
break;
|
|
1294
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1818
1295
|
case "InvalidOperationException":
|
|
1819
1296
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
1820
|
-
|
|
1821
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1822
|
-
name: errorCode,
|
|
1823
|
-
$metadata: deserializeMetadata(output),
|
|
1824
|
-
};
|
|
1825
|
-
break;
|
|
1297
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
1826
1298
|
case "OptimisticLockException":
|
|
1827
1299
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1828
|
-
|
|
1829
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1830
|
-
name: errorCode,
|
|
1831
|
-
$metadata: deserializeMetadata(output),
|
|
1832
|
-
};
|
|
1833
|
-
break;
|
|
1300
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1834
1301
|
case "ResourceNotFoundException":
|
|
1835
1302
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1836
|
-
|
|
1837
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1838
|
-
name: errorCode,
|
|
1839
|
-
$metadata: deserializeMetadata(output),
|
|
1840
|
-
};
|
|
1841
|
-
break;
|
|
1303
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1842
1304
|
default:
|
|
1843
1305
|
const parsedBody = parsedOutput.body;
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
...parsedBody,
|
|
1847
|
-
name: `${errorCode}`,
|
|
1848
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1306
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1307
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1849
1308
|
$fault: "client",
|
|
1850
1309
|
$metadata: deserializeMetadata(output),
|
|
1851
|
-
};
|
|
1310
|
+
});
|
|
1311
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1852
1312
|
}
|
|
1853
|
-
const message = response.message || response.Message || errorCode;
|
|
1854
|
-
response.message = message;
|
|
1855
|
-
delete response.Message;
|
|
1856
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1857
1313
|
};
|
|
1858
1314
|
const deserializeAws_json1_1DisassociateHealthCheckCommand = async (output, context) => {
|
|
1859
1315
|
if (output.statusCode >= 300) {
|
|
@@ -1880,59 +1336,28 @@ const deserializeAws_json1_1DisassociateHealthCheckCommandError = async (output,
|
|
|
1880
1336
|
switch (errorCode) {
|
|
1881
1337
|
case "InternalErrorException":
|
|
1882
1338
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1883
|
-
|
|
1884
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1885
|
-
name: errorCode,
|
|
1886
|
-
$metadata: deserializeMetadata(output),
|
|
1887
|
-
};
|
|
1888
|
-
break;
|
|
1339
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1889
1340
|
case "InvalidParameterException":
|
|
1890
1341
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
1891
|
-
|
|
1892
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1893
|
-
name: errorCode,
|
|
1894
|
-
$metadata: deserializeMetadata(output),
|
|
1895
|
-
};
|
|
1896
|
-
break;
|
|
1342
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1897
1343
|
case "InvalidResourceException":
|
|
1898
1344
|
case "com.amazonaws.shield#InvalidResourceException":
|
|
1899
|
-
|
|
1900
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
1901
|
-
name: errorCode,
|
|
1902
|
-
$metadata: deserializeMetadata(output),
|
|
1903
|
-
};
|
|
1904
|
-
break;
|
|
1345
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
1905
1346
|
case "OptimisticLockException":
|
|
1906
1347
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1907
|
-
|
|
1908
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1909
|
-
name: errorCode,
|
|
1910
|
-
$metadata: deserializeMetadata(output),
|
|
1911
|
-
};
|
|
1912
|
-
break;
|
|
1348
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
1913
1349
|
case "ResourceNotFoundException":
|
|
1914
1350
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
1915
|
-
|
|
1916
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1917
|
-
name: errorCode,
|
|
1918
|
-
$metadata: deserializeMetadata(output),
|
|
1919
|
-
};
|
|
1920
|
-
break;
|
|
1351
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1921
1352
|
default:
|
|
1922
1353
|
const parsedBody = parsedOutput.body;
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
...parsedBody,
|
|
1926
|
-
name: `${errorCode}`,
|
|
1927
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1354
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1355
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1928
1356
|
$fault: "client",
|
|
1929
1357
|
$metadata: deserializeMetadata(output),
|
|
1930
|
-
};
|
|
1358
|
+
});
|
|
1359
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1931
1360
|
}
|
|
1932
|
-
const message = response.message || response.Message || errorCode;
|
|
1933
|
-
response.message = message;
|
|
1934
|
-
delete response.Message;
|
|
1935
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1936
1361
|
};
|
|
1937
1362
|
const deserializeAws_json1_1EnableApplicationLayerAutomaticResponseCommand = async (output, context) => {
|
|
1938
1363
|
if (output.statusCode >= 300) {
|
|
@@ -1959,67 +1384,31 @@ const deserializeAws_json1_1EnableApplicationLayerAutomaticResponseCommandError
|
|
|
1959
1384
|
switch (errorCode) {
|
|
1960
1385
|
case "InternalErrorException":
|
|
1961
1386
|
case "com.amazonaws.shield#InternalErrorException":
|
|
1962
|
-
|
|
1963
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
1964
|
-
name: errorCode,
|
|
1965
|
-
$metadata: deserializeMetadata(output),
|
|
1966
|
-
};
|
|
1967
|
-
break;
|
|
1387
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
1968
1388
|
case "InvalidOperationException":
|
|
1969
1389
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
1970
|
-
|
|
1971
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
1972
|
-
name: errorCode,
|
|
1973
|
-
$metadata: deserializeMetadata(output),
|
|
1974
|
-
};
|
|
1975
|
-
break;
|
|
1390
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
1976
1391
|
case "InvalidParameterException":
|
|
1977
1392
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
1978
|
-
|
|
1979
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1980
|
-
name: errorCode,
|
|
1981
|
-
$metadata: deserializeMetadata(output),
|
|
1982
|
-
};
|
|
1983
|
-
break;
|
|
1393
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1984
1394
|
case "LimitsExceededException":
|
|
1985
1395
|
case "com.amazonaws.shield#LimitsExceededException":
|
|
1986
|
-
|
|
1987
|
-
...(await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context)),
|
|
1988
|
-
name: errorCode,
|
|
1989
|
-
$metadata: deserializeMetadata(output),
|
|
1990
|
-
};
|
|
1991
|
-
break;
|
|
1396
|
+
throw await deserializeAws_json1_1LimitsExceededExceptionResponse(parsedOutput, context);
|
|
1992
1397
|
case "OptimisticLockException":
|
|
1993
1398
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
1994
|
-
|
|
1995
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
1996
|
-
name: errorCode,
|
|
1997
|
-
$metadata: deserializeMetadata(output),
|
|
1998
|
-
};
|
|
1999
|
-
break;
|
|
1399
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
2000
1400
|
case "ResourceNotFoundException":
|
|
2001
1401
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2002
|
-
|
|
2003
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2004
|
-
name: errorCode,
|
|
2005
|
-
$metadata: deserializeMetadata(output),
|
|
2006
|
-
};
|
|
2007
|
-
break;
|
|
1402
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2008
1403
|
default:
|
|
2009
1404
|
const parsedBody = parsedOutput.body;
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
...parsedBody,
|
|
2013
|
-
name: `${errorCode}`,
|
|
2014
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1405
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1406
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2015
1407
|
$fault: "client",
|
|
2016
1408
|
$metadata: deserializeMetadata(output),
|
|
2017
|
-
};
|
|
1409
|
+
});
|
|
1410
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2018
1411
|
}
|
|
2019
|
-
const message = response.message || response.Message || errorCode;
|
|
2020
|
-
response.message = message;
|
|
2021
|
-
delete response.Message;
|
|
2022
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2023
1412
|
};
|
|
2024
1413
|
const deserializeAws_json1_1EnableProactiveEngagementCommand = async (output, context) => {
|
|
2025
1414
|
if (output.statusCode >= 300) {
|
|
@@ -2046,59 +1435,28 @@ const deserializeAws_json1_1EnableProactiveEngagementCommandError = async (outpu
|
|
|
2046
1435
|
switch (errorCode) {
|
|
2047
1436
|
case "InternalErrorException":
|
|
2048
1437
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2049
|
-
|
|
2050
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2051
|
-
name: errorCode,
|
|
2052
|
-
$metadata: deserializeMetadata(output),
|
|
2053
|
-
};
|
|
2054
|
-
break;
|
|
1438
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2055
1439
|
case "InvalidOperationException":
|
|
2056
1440
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
2057
|
-
|
|
2058
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2059
|
-
name: errorCode,
|
|
2060
|
-
$metadata: deserializeMetadata(output),
|
|
2061
|
-
};
|
|
2062
|
-
break;
|
|
1441
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
2063
1442
|
case "InvalidParameterException":
|
|
2064
1443
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2065
|
-
|
|
2066
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2067
|
-
name: errorCode,
|
|
2068
|
-
$metadata: deserializeMetadata(output),
|
|
2069
|
-
};
|
|
2070
|
-
break;
|
|
1444
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2071
1445
|
case "OptimisticLockException":
|
|
2072
1446
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
2073
|
-
|
|
2074
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2075
|
-
name: errorCode,
|
|
2076
|
-
$metadata: deserializeMetadata(output),
|
|
2077
|
-
};
|
|
2078
|
-
break;
|
|
1447
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
2079
1448
|
case "ResourceNotFoundException":
|
|
2080
1449
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2081
|
-
|
|
2082
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2083
|
-
name: errorCode,
|
|
2084
|
-
$metadata: deserializeMetadata(output),
|
|
2085
|
-
};
|
|
2086
|
-
break;
|
|
1450
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2087
1451
|
default:
|
|
2088
1452
|
const parsedBody = parsedOutput.body;
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
...parsedBody,
|
|
2092
|
-
name: `${errorCode}`,
|
|
2093
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1453
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1454
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2094
1455
|
$fault: "client",
|
|
2095
1456
|
$metadata: deserializeMetadata(output),
|
|
2096
|
-
};
|
|
1457
|
+
});
|
|
1458
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2097
1459
|
}
|
|
2098
|
-
const message = response.message || response.Message || errorCode;
|
|
2099
|
-
response.message = message;
|
|
2100
|
-
delete response.Message;
|
|
2101
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2102
1460
|
};
|
|
2103
1461
|
const deserializeAws_json1_1GetSubscriptionStateCommand = async (output, context) => {
|
|
2104
1462
|
if (output.statusCode >= 300) {
|
|
@@ -2125,27 +1483,16 @@ const deserializeAws_json1_1GetSubscriptionStateCommandError = async (output, co
|
|
|
2125
1483
|
switch (errorCode) {
|
|
2126
1484
|
case "InternalErrorException":
|
|
2127
1485
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2128
|
-
|
|
2129
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2130
|
-
name: errorCode,
|
|
2131
|
-
$metadata: deserializeMetadata(output),
|
|
2132
|
-
};
|
|
2133
|
-
break;
|
|
1486
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2134
1487
|
default:
|
|
2135
1488
|
const parsedBody = parsedOutput.body;
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
...parsedBody,
|
|
2139
|
-
name: `${errorCode}`,
|
|
2140
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1489
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1490
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2141
1491
|
$fault: "client",
|
|
2142
1492
|
$metadata: deserializeMetadata(output),
|
|
2143
|
-
};
|
|
1493
|
+
});
|
|
1494
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2144
1495
|
}
|
|
2145
|
-
const message = response.message || response.Message || errorCode;
|
|
2146
|
-
response.message = message;
|
|
2147
|
-
delete response.Message;
|
|
2148
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2149
1496
|
};
|
|
2150
1497
|
const deserializeAws_json1_1ListAttacksCommand = async (output, context) => {
|
|
2151
1498
|
if (output.statusCode >= 300) {
|
|
@@ -2172,43 +1519,22 @@ const deserializeAws_json1_1ListAttacksCommandError = async (output, context) =>
|
|
|
2172
1519
|
switch (errorCode) {
|
|
2173
1520
|
case "InternalErrorException":
|
|
2174
1521
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2175
|
-
|
|
2176
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2177
|
-
name: errorCode,
|
|
2178
|
-
$metadata: deserializeMetadata(output),
|
|
2179
|
-
};
|
|
2180
|
-
break;
|
|
1522
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2181
1523
|
case "InvalidOperationException":
|
|
2182
1524
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
2183
|
-
|
|
2184
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2185
|
-
name: errorCode,
|
|
2186
|
-
$metadata: deserializeMetadata(output),
|
|
2187
|
-
};
|
|
2188
|
-
break;
|
|
1525
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
2189
1526
|
case "InvalidParameterException":
|
|
2190
1527
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2191
|
-
|
|
2192
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2193
|
-
name: errorCode,
|
|
2194
|
-
$metadata: deserializeMetadata(output),
|
|
2195
|
-
};
|
|
2196
|
-
break;
|
|
1528
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2197
1529
|
default:
|
|
2198
1530
|
const parsedBody = parsedOutput.body;
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
...parsedBody,
|
|
2202
|
-
name: `${errorCode}`,
|
|
2203
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1531
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1532
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2204
1533
|
$fault: "client",
|
|
2205
1534
|
$metadata: deserializeMetadata(output),
|
|
2206
|
-
};
|
|
1535
|
+
});
|
|
1536
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2207
1537
|
}
|
|
2208
|
-
const message = response.message || response.Message || errorCode;
|
|
2209
|
-
response.message = message;
|
|
2210
|
-
delete response.Message;
|
|
2211
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2212
1538
|
};
|
|
2213
1539
|
const deserializeAws_json1_1ListProtectionGroupsCommand = async (output, context) => {
|
|
2214
1540
|
if (output.statusCode >= 300) {
|
|
@@ -2235,43 +1561,22 @@ const deserializeAws_json1_1ListProtectionGroupsCommandError = async (output, co
|
|
|
2235
1561
|
switch (errorCode) {
|
|
2236
1562
|
case "InternalErrorException":
|
|
2237
1563
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2238
|
-
|
|
2239
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2240
|
-
name: errorCode,
|
|
2241
|
-
$metadata: deserializeMetadata(output),
|
|
2242
|
-
};
|
|
2243
|
-
break;
|
|
1564
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2244
1565
|
case "InvalidPaginationTokenException":
|
|
2245
1566
|
case "com.amazonaws.shield#InvalidPaginationTokenException":
|
|
2246
|
-
|
|
2247
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
2248
|
-
name: errorCode,
|
|
2249
|
-
$metadata: deserializeMetadata(output),
|
|
2250
|
-
};
|
|
2251
|
-
break;
|
|
1567
|
+
throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
|
|
2252
1568
|
case "ResourceNotFoundException":
|
|
2253
1569
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2254
|
-
|
|
2255
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2256
|
-
name: errorCode,
|
|
2257
|
-
$metadata: deserializeMetadata(output),
|
|
2258
|
-
};
|
|
2259
|
-
break;
|
|
1570
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2260
1571
|
default:
|
|
2261
1572
|
const parsedBody = parsedOutput.body;
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
...parsedBody,
|
|
2265
|
-
name: `${errorCode}`,
|
|
2266
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1573
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1574
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2267
1575
|
$fault: "client",
|
|
2268
1576
|
$metadata: deserializeMetadata(output),
|
|
2269
|
-
};
|
|
1577
|
+
});
|
|
1578
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2270
1579
|
}
|
|
2271
|
-
const message = response.message || response.Message || errorCode;
|
|
2272
|
-
response.message = message;
|
|
2273
|
-
delete response.Message;
|
|
2274
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2275
1580
|
};
|
|
2276
1581
|
const deserializeAws_json1_1ListProtectionsCommand = async (output, context) => {
|
|
2277
1582
|
if (output.statusCode >= 300) {
|
|
@@ -2298,43 +1603,22 @@ const deserializeAws_json1_1ListProtectionsCommandError = async (output, context
|
|
|
2298
1603
|
switch (errorCode) {
|
|
2299
1604
|
case "InternalErrorException":
|
|
2300
1605
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2301
|
-
|
|
2302
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2303
|
-
name: errorCode,
|
|
2304
|
-
$metadata: deserializeMetadata(output),
|
|
2305
|
-
};
|
|
2306
|
-
break;
|
|
1606
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2307
1607
|
case "InvalidPaginationTokenException":
|
|
2308
1608
|
case "com.amazonaws.shield#InvalidPaginationTokenException":
|
|
2309
|
-
|
|
2310
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
2311
|
-
name: errorCode,
|
|
2312
|
-
$metadata: deserializeMetadata(output),
|
|
2313
|
-
};
|
|
2314
|
-
break;
|
|
1609
|
+
throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
|
|
2315
1610
|
case "ResourceNotFoundException":
|
|
2316
1611
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2317
|
-
|
|
2318
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2319
|
-
name: errorCode,
|
|
2320
|
-
$metadata: deserializeMetadata(output),
|
|
2321
|
-
};
|
|
2322
|
-
break;
|
|
1612
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2323
1613
|
default:
|
|
2324
1614
|
const parsedBody = parsedOutput.body;
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
...parsedBody,
|
|
2328
|
-
name: `${errorCode}`,
|
|
2329
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1615
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1616
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2330
1617
|
$fault: "client",
|
|
2331
1618
|
$metadata: deserializeMetadata(output),
|
|
2332
|
-
};
|
|
1619
|
+
});
|
|
1620
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2333
1621
|
}
|
|
2334
|
-
const message = response.message || response.Message || errorCode;
|
|
2335
|
-
response.message = message;
|
|
2336
|
-
delete response.Message;
|
|
2337
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2338
1622
|
};
|
|
2339
1623
|
const deserializeAws_json1_1ListResourcesInProtectionGroupCommand = async (output, context) => {
|
|
2340
1624
|
if (output.statusCode >= 300) {
|
|
@@ -2361,43 +1645,22 @@ const deserializeAws_json1_1ListResourcesInProtectionGroupCommandError = async (
|
|
|
2361
1645
|
switch (errorCode) {
|
|
2362
1646
|
case "InternalErrorException":
|
|
2363
1647
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2364
|
-
|
|
2365
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2366
|
-
name: errorCode,
|
|
2367
|
-
$metadata: deserializeMetadata(output),
|
|
2368
|
-
};
|
|
2369
|
-
break;
|
|
1648
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2370
1649
|
case "InvalidPaginationTokenException":
|
|
2371
1650
|
case "com.amazonaws.shield#InvalidPaginationTokenException":
|
|
2372
|
-
|
|
2373
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
2374
|
-
name: errorCode,
|
|
2375
|
-
$metadata: deserializeMetadata(output),
|
|
2376
|
-
};
|
|
2377
|
-
break;
|
|
1651
|
+
throw await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context);
|
|
2378
1652
|
case "ResourceNotFoundException":
|
|
2379
1653
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2380
|
-
|
|
2381
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2382
|
-
name: errorCode,
|
|
2383
|
-
$metadata: deserializeMetadata(output),
|
|
2384
|
-
};
|
|
2385
|
-
break;
|
|
1654
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2386
1655
|
default:
|
|
2387
1656
|
const parsedBody = parsedOutput.body;
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
...parsedBody,
|
|
2391
|
-
name: `${errorCode}`,
|
|
2392
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1657
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1658
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2393
1659
|
$fault: "client",
|
|
2394
1660
|
$metadata: deserializeMetadata(output),
|
|
2395
|
-
};
|
|
1661
|
+
});
|
|
1662
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2396
1663
|
}
|
|
2397
|
-
const message = response.message || response.Message || errorCode;
|
|
2398
|
-
response.message = message;
|
|
2399
|
-
delete response.Message;
|
|
2400
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2401
1664
|
};
|
|
2402
1665
|
const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
|
|
2403
1666
|
if (output.statusCode >= 300) {
|
|
@@ -2424,43 +1687,22 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
|
|
|
2424
1687
|
switch (errorCode) {
|
|
2425
1688
|
case "InternalErrorException":
|
|
2426
1689
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2427
|
-
|
|
2428
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2429
|
-
name: errorCode,
|
|
2430
|
-
$metadata: deserializeMetadata(output),
|
|
2431
|
-
};
|
|
2432
|
-
break;
|
|
1690
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2433
1691
|
case "InvalidResourceException":
|
|
2434
1692
|
case "com.amazonaws.shield#InvalidResourceException":
|
|
2435
|
-
|
|
2436
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
2437
|
-
name: errorCode,
|
|
2438
|
-
$metadata: deserializeMetadata(output),
|
|
2439
|
-
};
|
|
2440
|
-
break;
|
|
1693
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
2441
1694
|
case "ResourceNotFoundException":
|
|
2442
1695
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2443
|
-
|
|
2444
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2445
|
-
name: errorCode,
|
|
2446
|
-
$metadata: deserializeMetadata(output),
|
|
2447
|
-
};
|
|
2448
|
-
break;
|
|
1696
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2449
1697
|
default:
|
|
2450
1698
|
const parsedBody = parsedOutput.body;
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
...parsedBody,
|
|
2454
|
-
name: `${errorCode}`,
|
|
2455
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1699
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1700
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2456
1701
|
$fault: "client",
|
|
2457
1702
|
$metadata: deserializeMetadata(output),
|
|
2458
|
-
};
|
|
1703
|
+
});
|
|
1704
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2459
1705
|
}
|
|
2460
|
-
const message = response.message || response.Message || errorCode;
|
|
2461
|
-
response.message = message;
|
|
2462
|
-
delete response.Message;
|
|
2463
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2464
1706
|
};
|
|
2465
1707
|
const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
2466
1708
|
if (output.statusCode >= 300) {
|
|
@@ -2487,51 +1729,25 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
|
|
|
2487
1729
|
switch (errorCode) {
|
|
2488
1730
|
case "InternalErrorException":
|
|
2489
1731
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2490
|
-
|
|
2491
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2492
|
-
name: errorCode,
|
|
2493
|
-
$metadata: deserializeMetadata(output),
|
|
2494
|
-
};
|
|
2495
|
-
break;
|
|
1732
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2496
1733
|
case "InvalidParameterException":
|
|
2497
1734
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2498
|
-
|
|
2499
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2500
|
-
name: errorCode,
|
|
2501
|
-
$metadata: deserializeMetadata(output),
|
|
2502
|
-
};
|
|
2503
|
-
break;
|
|
1735
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2504
1736
|
case "InvalidResourceException":
|
|
2505
1737
|
case "com.amazonaws.shield#InvalidResourceException":
|
|
2506
|
-
|
|
2507
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
2508
|
-
name: errorCode,
|
|
2509
|
-
$metadata: deserializeMetadata(output),
|
|
2510
|
-
};
|
|
2511
|
-
break;
|
|
1738
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
2512
1739
|
case "ResourceNotFoundException":
|
|
2513
1740
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2514
|
-
|
|
2515
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2516
|
-
name: errorCode,
|
|
2517
|
-
$metadata: deserializeMetadata(output),
|
|
2518
|
-
};
|
|
2519
|
-
break;
|
|
1741
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2520
1742
|
default:
|
|
2521
1743
|
const parsedBody = parsedOutput.body;
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
...parsedBody,
|
|
2525
|
-
name: `${errorCode}`,
|
|
2526
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1744
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1745
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2527
1746
|
$fault: "client",
|
|
2528
1747
|
$metadata: deserializeMetadata(output),
|
|
2529
|
-
};
|
|
1748
|
+
});
|
|
1749
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2530
1750
|
}
|
|
2531
|
-
const message = response.message || response.Message || errorCode;
|
|
2532
|
-
response.message = message;
|
|
2533
|
-
delete response.Message;
|
|
2534
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2535
1751
|
};
|
|
2536
1752
|
const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
2537
1753
|
if (output.statusCode >= 300) {
|
|
@@ -2558,51 +1774,25 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
|
|
|
2558
1774
|
switch (errorCode) {
|
|
2559
1775
|
case "InternalErrorException":
|
|
2560
1776
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2561
|
-
|
|
2562
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2563
|
-
name: errorCode,
|
|
2564
|
-
$metadata: deserializeMetadata(output),
|
|
2565
|
-
};
|
|
2566
|
-
break;
|
|
1777
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2567
1778
|
case "InvalidParameterException":
|
|
2568
1779
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2569
|
-
|
|
2570
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2571
|
-
name: errorCode,
|
|
2572
|
-
$metadata: deserializeMetadata(output),
|
|
2573
|
-
};
|
|
2574
|
-
break;
|
|
1780
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2575
1781
|
case "InvalidResourceException":
|
|
2576
1782
|
case "com.amazonaws.shield#InvalidResourceException":
|
|
2577
|
-
|
|
2578
|
-
...(await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context)),
|
|
2579
|
-
name: errorCode,
|
|
2580
|
-
$metadata: deserializeMetadata(output),
|
|
2581
|
-
};
|
|
2582
|
-
break;
|
|
1783
|
+
throw await deserializeAws_json1_1InvalidResourceExceptionResponse(parsedOutput, context);
|
|
2583
1784
|
case "ResourceNotFoundException":
|
|
2584
1785
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2585
|
-
|
|
2586
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2587
|
-
name: errorCode,
|
|
2588
|
-
$metadata: deserializeMetadata(output),
|
|
2589
|
-
};
|
|
2590
|
-
break;
|
|
1786
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2591
1787
|
default:
|
|
2592
1788
|
const parsedBody = parsedOutput.body;
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
...parsedBody,
|
|
2596
|
-
name: `${errorCode}`,
|
|
2597
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1789
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1790
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2598
1791
|
$fault: "client",
|
|
2599
1792
|
$metadata: deserializeMetadata(output),
|
|
2600
|
-
};
|
|
1793
|
+
});
|
|
1794
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2601
1795
|
}
|
|
2602
|
-
const message = response.message || response.Message || errorCode;
|
|
2603
|
-
response.message = message;
|
|
2604
|
-
delete response.Message;
|
|
2605
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2606
1796
|
};
|
|
2607
1797
|
const deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommand = async (output, context) => {
|
|
2608
1798
|
if (output.statusCode >= 300) {
|
|
@@ -2629,59 +1819,28 @@ const deserializeAws_json1_1UpdateApplicationLayerAutomaticResponseCommandError
|
|
|
2629
1819
|
switch (errorCode) {
|
|
2630
1820
|
case "InternalErrorException":
|
|
2631
1821
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2632
|
-
|
|
2633
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2634
|
-
name: errorCode,
|
|
2635
|
-
$metadata: deserializeMetadata(output),
|
|
2636
|
-
};
|
|
2637
|
-
break;
|
|
1822
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2638
1823
|
case "InvalidOperationException":
|
|
2639
1824
|
case "com.amazonaws.shield#InvalidOperationException":
|
|
2640
|
-
|
|
2641
|
-
...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
|
|
2642
|
-
name: errorCode,
|
|
2643
|
-
$metadata: deserializeMetadata(output),
|
|
2644
|
-
};
|
|
2645
|
-
break;
|
|
1825
|
+
throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
|
|
2646
1826
|
case "InvalidParameterException":
|
|
2647
1827
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2648
|
-
|
|
2649
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2650
|
-
name: errorCode,
|
|
2651
|
-
$metadata: deserializeMetadata(output),
|
|
2652
|
-
};
|
|
2653
|
-
break;
|
|
1828
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2654
1829
|
case "OptimisticLockException":
|
|
2655
1830
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
2656
|
-
|
|
2657
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2658
|
-
name: errorCode,
|
|
2659
|
-
$metadata: deserializeMetadata(output),
|
|
2660
|
-
};
|
|
2661
|
-
break;
|
|
1831
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
2662
1832
|
case "ResourceNotFoundException":
|
|
2663
1833
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2664
|
-
|
|
2665
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2666
|
-
name: errorCode,
|
|
2667
|
-
$metadata: deserializeMetadata(output),
|
|
2668
|
-
};
|
|
2669
|
-
break;
|
|
1834
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2670
1835
|
default:
|
|
2671
1836
|
const parsedBody = parsedOutput.body;
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
...parsedBody,
|
|
2675
|
-
name: `${errorCode}`,
|
|
2676
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1837
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1838
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2677
1839
|
$fault: "client",
|
|
2678
1840
|
$metadata: deserializeMetadata(output),
|
|
2679
|
-
};
|
|
1841
|
+
});
|
|
1842
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2680
1843
|
}
|
|
2681
|
-
const message = response.message || response.Message || errorCode;
|
|
2682
|
-
response.message = message;
|
|
2683
|
-
delete response.Message;
|
|
2684
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2685
1844
|
};
|
|
2686
1845
|
const deserializeAws_json1_1UpdateEmergencyContactSettingsCommand = async (output, context) => {
|
|
2687
1846
|
if (output.statusCode >= 300) {
|
|
@@ -2708,51 +1867,25 @@ const deserializeAws_json1_1UpdateEmergencyContactSettingsCommandError = async (
|
|
|
2708
1867
|
switch (errorCode) {
|
|
2709
1868
|
case "InternalErrorException":
|
|
2710
1869
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2711
|
-
|
|
2712
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2713
|
-
name: errorCode,
|
|
2714
|
-
$metadata: deserializeMetadata(output),
|
|
2715
|
-
};
|
|
2716
|
-
break;
|
|
1870
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2717
1871
|
case "InvalidParameterException":
|
|
2718
1872
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2719
|
-
|
|
2720
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2721
|
-
name: errorCode,
|
|
2722
|
-
$metadata: deserializeMetadata(output),
|
|
2723
|
-
};
|
|
2724
|
-
break;
|
|
1873
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2725
1874
|
case "OptimisticLockException":
|
|
2726
1875
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
2727
|
-
|
|
2728
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2729
|
-
name: errorCode,
|
|
2730
|
-
$metadata: deserializeMetadata(output),
|
|
2731
|
-
};
|
|
2732
|
-
break;
|
|
1876
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
2733
1877
|
case "ResourceNotFoundException":
|
|
2734
1878
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2735
|
-
|
|
2736
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2737
|
-
name: errorCode,
|
|
2738
|
-
$metadata: deserializeMetadata(output),
|
|
2739
|
-
};
|
|
2740
|
-
break;
|
|
1879
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2741
1880
|
default:
|
|
2742
1881
|
const parsedBody = parsedOutput.body;
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
...parsedBody,
|
|
2746
|
-
name: `${errorCode}`,
|
|
2747
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1882
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1883
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2748
1884
|
$fault: "client",
|
|
2749
1885
|
$metadata: deserializeMetadata(output),
|
|
2750
|
-
};
|
|
1886
|
+
});
|
|
1887
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2751
1888
|
}
|
|
2752
|
-
const message = response.message || response.Message || errorCode;
|
|
2753
|
-
response.message = message;
|
|
2754
|
-
delete response.Message;
|
|
2755
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2756
1889
|
};
|
|
2757
1890
|
const deserializeAws_json1_1UpdateProtectionGroupCommand = async (output, context) => {
|
|
2758
1891
|
if (output.statusCode >= 300) {
|
|
@@ -2779,51 +1912,25 @@ const deserializeAws_json1_1UpdateProtectionGroupCommandError = async (output, c
|
|
|
2779
1912
|
switch (errorCode) {
|
|
2780
1913
|
case "InternalErrorException":
|
|
2781
1914
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2782
|
-
|
|
2783
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2784
|
-
name: errorCode,
|
|
2785
|
-
$metadata: deserializeMetadata(output),
|
|
2786
|
-
};
|
|
2787
|
-
break;
|
|
1915
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2788
1916
|
case "InvalidParameterException":
|
|
2789
1917
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2790
|
-
|
|
2791
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2792
|
-
name: errorCode,
|
|
2793
|
-
$metadata: deserializeMetadata(output),
|
|
2794
|
-
};
|
|
2795
|
-
break;
|
|
1918
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2796
1919
|
case "OptimisticLockException":
|
|
2797
1920
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
2798
|
-
|
|
2799
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2800
|
-
name: errorCode,
|
|
2801
|
-
$metadata: deserializeMetadata(output),
|
|
2802
|
-
};
|
|
2803
|
-
break;
|
|
1921
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
2804
1922
|
case "ResourceNotFoundException":
|
|
2805
1923
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2806
|
-
|
|
2807
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2808
|
-
name: errorCode,
|
|
2809
|
-
$metadata: deserializeMetadata(output),
|
|
2810
|
-
};
|
|
2811
|
-
break;
|
|
1924
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2812
1925
|
default:
|
|
2813
1926
|
const parsedBody = parsedOutput.body;
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
...parsedBody,
|
|
2817
|
-
name: `${errorCode}`,
|
|
2818
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1927
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1928
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2819
1929
|
$fault: "client",
|
|
2820
1930
|
$metadata: deserializeMetadata(output),
|
|
2821
|
-
};
|
|
1931
|
+
});
|
|
1932
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2822
1933
|
}
|
|
2823
|
-
const message = response.message || response.Message || errorCode;
|
|
2824
|
-
response.message = message;
|
|
2825
|
-
delete response.Message;
|
|
2826
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2827
1934
|
};
|
|
2828
1935
|
const deserializeAws_json1_1UpdateSubscriptionCommand = async (output, context) => {
|
|
2829
1936
|
if (output.statusCode >= 300) {
|
|
@@ -2850,202 +1957,145 @@ const deserializeAws_json1_1UpdateSubscriptionCommandError = async (output, cont
|
|
|
2850
1957
|
switch (errorCode) {
|
|
2851
1958
|
case "InternalErrorException":
|
|
2852
1959
|
case "com.amazonaws.shield#InternalErrorException":
|
|
2853
|
-
|
|
2854
|
-
...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
|
|
2855
|
-
name: errorCode,
|
|
2856
|
-
$metadata: deserializeMetadata(output),
|
|
2857
|
-
};
|
|
2858
|
-
break;
|
|
1960
|
+
throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
|
|
2859
1961
|
case "InvalidParameterException":
|
|
2860
1962
|
case "com.amazonaws.shield#InvalidParameterException":
|
|
2861
|
-
|
|
2862
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2863
|
-
name: errorCode,
|
|
2864
|
-
$metadata: deserializeMetadata(output),
|
|
2865
|
-
};
|
|
2866
|
-
break;
|
|
1963
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
2867
1964
|
case "LockedSubscriptionException":
|
|
2868
1965
|
case "com.amazonaws.shield#LockedSubscriptionException":
|
|
2869
|
-
|
|
2870
|
-
...(await deserializeAws_json1_1LockedSubscriptionExceptionResponse(parsedOutput, context)),
|
|
2871
|
-
name: errorCode,
|
|
2872
|
-
$metadata: deserializeMetadata(output),
|
|
2873
|
-
};
|
|
2874
|
-
break;
|
|
1966
|
+
throw await deserializeAws_json1_1LockedSubscriptionExceptionResponse(parsedOutput, context);
|
|
2875
1967
|
case "OptimisticLockException":
|
|
2876
1968
|
case "com.amazonaws.shield#OptimisticLockException":
|
|
2877
|
-
|
|
2878
|
-
...(await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context)),
|
|
2879
|
-
name: errorCode,
|
|
2880
|
-
$metadata: deserializeMetadata(output),
|
|
2881
|
-
};
|
|
2882
|
-
break;
|
|
1969
|
+
throw await deserializeAws_json1_1OptimisticLockExceptionResponse(parsedOutput, context);
|
|
2883
1970
|
case "ResourceNotFoundException":
|
|
2884
1971
|
case "com.amazonaws.shield#ResourceNotFoundException":
|
|
2885
|
-
|
|
2886
|
-
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2887
|
-
name: errorCode,
|
|
2888
|
-
$metadata: deserializeMetadata(output),
|
|
2889
|
-
};
|
|
2890
|
-
break;
|
|
1972
|
+
throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
2891
1973
|
default:
|
|
2892
1974
|
const parsedBody = parsedOutput.body;
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
...parsedBody,
|
|
2896
|
-
name: `${errorCode}`,
|
|
2897
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1975
|
+
response = new ShieldServiceException_1.ShieldServiceException({
|
|
1976
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2898
1977
|
$fault: "client",
|
|
2899
1978
|
$metadata: deserializeMetadata(output),
|
|
2900
|
-
};
|
|
1979
|
+
});
|
|
1980
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2901
1981
|
}
|
|
2902
|
-
const message = response.message || response.Message || errorCode;
|
|
2903
|
-
response.message = message;
|
|
2904
|
-
delete response.Message;
|
|
2905
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2906
1982
|
};
|
|
2907
1983
|
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
2908
1984
|
const body = parsedOutput.body;
|
|
2909
1985
|
const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
2910
|
-
const
|
|
2911
|
-
name: "AccessDeniedException",
|
|
2912
|
-
$fault: "client",
|
|
1986
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
2913
1987
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2914
1988
|
...deserialized,
|
|
2915
|
-
};
|
|
2916
|
-
return
|
|
1989
|
+
});
|
|
1990
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2917
1991
|
};
|
|
2918
1992
|
const deserializeAws_json1_1AccessDeniedForDependencyExceptionResponse = async (parsedOutput, context) => {
|
|
2919
1993
|
const body = parsedOutput.body;
|
|
2920
1994
|
const deserialized = deserializeAws_json1_1AccessDeniedForDependencyException(body, context);
|
|
2921
|
-
const
|
|
2922
|
-
name: "AccessDeniedForDependencyException",
|
|
2923
|
-
$fault: "client",
|
|
1995
|
+
const exception = new models_0_1.AccessDeniedForDependencyException({
|
|
2924
1996
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2925
1997
|
...deserialized,
|
|
2926
|
-
};
|
|
2927
|
-
return
|
|
1998
|
+
});
|
|
1999
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2928
2000
|
};
|
|
2929
2001
|
const deserializeAws_json1_1InternalErrorExceptionResponse = async (parsedOutput, context) => {
|
|
2930
2002
|
const body = parsedOutput.body;
|
|
2931
2003
|
const deserialized = deserializeAws_json1_1InternalErrorException(body, context);
|
|
2932
|
-
const
|
|
2933
|
-
name: "InternalErrorException",
|
|
2934
|
-
$fault: "server",
|
|
2004
|
+
const exception = new models_0_1.InternalErrorException({
|
|
2935
2005
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2936
2006
|
...deserialized,
|
|
2937
|
-
};
|
|
2938
|
-
return
|
|
2007
|
+
});
|
|
2008
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2939
2009
|
};
|
|
2940
2010
|
const deserializeAws_json1_1InvalidOperationExceptionResponse = async (parsedOutput, context) => {
|
|
2941
2011
|
const body = parsedOutput.body;
|
|
2942
2012
|
const deserialized = deserializeAws_json1_1InvalidOperationException(body, context);
|
|
2943
|
-
const
|
|
2944
|
-
name: "InvalidOperationException",
|
|
2945
|
-
$fault: "client",
|
|
2013
|
+
const exception = new models_0_1.InvalidOperationException({
|
|
2946
2014
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2947
2015
|
...deserialized,
|
|
2948
|
-
};
|
|
2949
|
-
return
|
|
2016
|
+
});
|
|
2017
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2950
2018
|
};
|
|
2951
2019
|
const deserializeAws_json1_1InvalidPaginationTokenExceptionResponse = async (parsedOutput, context) => {
|
|
2952
2020
|
const body = parsedOutput.body;
|
|
2953
2021
|
const deserialized = deserializeAws_json1_1InvalidPaginationTokenException(body, context);
|
|
2954
|
-
const
|
|
2955
|
-
name: "InvalidPaginationTokenException",
|
|
2956
|
-
$fault: "client",
|
|
2022
|
+
const exception = new models_0_1.InvalidPaginationTokenException({
|
|
2957
2023
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2958
2024
|
...deserialized,
|
|
2959
|
-
};
|
|
2960
|
-
return
|
|
2025
|
+
});
|
|
2026
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2961
2027
|
};
|
|
2962
2028
|
const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
|
|
2963
2029
|
const body = parsedOutput.body;
|
|
2964
2030
|
const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
|
|
2965
|
-
const
|
|
2966
|
-
name: "InvalidParameterException",
|
|
2967
|
-
$fault: "client",
|
|
2031
|
+
const exception = new models_0_1.InvalidParameterException({
|
|
2968
2032
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2969
2033
|
...deserialized,
|
|
2970
|
-
};
|
|
2971
|
-
return
|
|
2034
|
+
});
|
|
2035
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2972
2036
|
};
|
|
2973
2037
|
const deserializeAws_json1_1InvalidResourceExceptionResponse = async (parsedOutput, context) => {
|
|
2974
2038
|
const body = parsedOutput.body;
|
|
2975
2039
|
const deserialized = deserializeAws_json1_1InvalidResourceException(body, context);
|
|
2976
|
-
const
|
|
2977
|
-
name: "InvalidResourceException",
|
|
2978
|
-
$fault: "client",
|
|
2040
|
+
const exception = new models_0_1.InvalidResourceException({
|
|
2979
2041
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2980
2042
|
...deserialized,
|
|
2981
|
-
};
|
|
2982
|
-
return
|
|
2043
|
+
});
|
|
2044
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2983
2045
|
};
|
|
2984
2046
|
const deserializeAws_json1_1LimitsExceededExceptionResponse = async (parsedOutput, context) => {
|
|
2985
2047
|
const body = parsedOutput.body;
|
|
2986
2048
|
const deserialized = deserializeAws_json1_1LimitsExceededException(body, context);
|
|
2987
|
-
const
|
|
2988
|
-
name: "LimitsExceededException",
|
|
2989
|
-
$fault: "client",
|
|
2049
|
+
const exception = new models_0_1.LimitsExceededException({
|
|
2990
2050
|
$metadata: deserializeMetadata(parsedOutput),
|
|
2991
2051
|
...deserialized,
|
|
2992
|
-
};
|
|
2993
|
-
return
|
|
2052
|
+
});
|
|
2053
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
2994
2054
|
};
|
|
2995
2055
|
const deserializeAws_json1_1LockedSubscriptionExceptionResponse = async (parsedOutput, context) => {
|
|
2996
2056
|
const body = parsedOutput.body;
|
|
2997
2057
|
const deserialized = deserializeAws_json1_1LockedSubscriptionException(body, context);
|
|
2998
|
-
const
|
|
2999
|
-
name: "LockedSubscriptionException",
|
|
3000
|
-
$fault: "client",
|
|
2058
|
+
const exception = new models_0_1.LockedSubscriptionException({
|
|
3001
2059
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3002
2060
|
...deserialized,
|
|
3003
|
-
};
|
|
3004
|
-
return
|
|
2061
|
+
});
|
|
2062
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
3005
2063
|
};
|
|
3006
2064
|
const deserializeAws_json1_1NoAssociatedRoleExceptionResponse = async (parsedOutput, context) => {
|
|
3007
2065
|
const body = parsedOutput.body;
|
|
3008
2066
|
const deserialized = deserializeAws_json1_1NoAssociatedRoleException(body, context);
|
|
3009
|
-
const
|
|
3010
|
-
name: "NoAssociatedRoleException",
|
|
3011
|
-
$fault: "client",
|
|
2067
|
+
const exception = new models_0_1.NoAssociatedRoleException({
|
|
3012
2068
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3013
2069
|
...deserialized,
|
|
3014
|
-
};
|
|
3015
|
-
return
|
|
2070
|
+
});
|
|
2071
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
3016
2072
|
};
|
|
3017
2073
|
const deserializeAws_json1_1OptimisticLockExceptionResponse = async (parsedOutput, context) => {
|
|
3018
2074
|
const body = parsedOutput.body;
|
|
3019
2075
|
const deserialized = deserializeAws_json1_1OptimisticLockException(body, context);
|
|
3020
|
-
const
|
|
3021
|
-
name: "OptimisticLockException",
|
|
3022
|
-
$fault: "client",
|
|
2076
|
+
const exception = new models_0_1.OptimisticLockException({
|
|
3023
2077
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3024
2078
|
...deserialized,
|
|
3025
|
-
};
|
|
3026
|
-
return
|
|
2079
|
+
});
|
|
2080
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
3027
2081
|
};
|
|
3028
2082
|
const deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse = async (parsedOutput, context) => {
|
|
3029
2083
|
const body = parsedOutput.body;
|
|
3030
2084
|
const deserialized = deserializeAws_json1_1ResourceAlreadyExistsException(body, context);
|
|
3031
|
-
const
|
|
3032
|
-
name: "ResourceAlreadyExistsException",
|
|
3033
|
-
$fault: "client",
|
|
2085
|
+
const exception = new models_0_1.ResourceAlreadyExistsException({
|
|
3034
2086
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3035
2087
|
...deserialized,
|
|
3036
|
-
};
|
|
3037
|
-
return
|
|
2088
|
+
});
|
|
2089
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
3038
2090
|
};
|
|
3039
2091
|
const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
3040
2092
|
const body = parsedOutput.body;
|
|
3041
2093
|
const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
|
|
3042
|
-
const
|
|
3043
|
-
name: "ResourceNotFoundException",
|
|
3044
|
-
$fault: "client",
|
|
2094
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
3045
2095
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3046
2096
|
...deserialized,
|
|
3047
|
-
};
|
|
3048
|
-
return
|
|
2097
|
+
});
|
|
2098
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
3049
2099
|
};
|
|
3050
2100
|
const serializeAws_json1_1AssociateDRTLogBucketRequest = (input, context) => {
|
|
3051
2101
|
return {
|
|
@@ -3396,7 +2446,7 @@ const deserializeAws_json1_1AttackDetail = (output, context) => {
|
|
|
3396
2446
|
};
|
|
3397
2447
|
};
|
|
3398
2448
|
const deserializeAws_json1_1AttackProperties = (output, context) => {
|
|
3399
|
-
|
|
2449
|
+
const retVal = (output || [])
|
|
3400
2450
|
.filter((e) => e != null)
|
|
3401
2451
|
.map((entry) => {
|
|
3402
2452
|
if (entry === null) {
|
|
@@ -3404,6 +2454,7 @@ const deserializeAws_json1_1AttackProperties = (output, context) => {
|
|
|
3404
2454
|
}
|
|
3405
2455
|
return deserializeAws_json1_1AttackProperty(entry, context);
|
|
3406
2456
|
});
|
|
2457
|
+
return retVal;
|
|
3407
2458
|
};
|
|
3408
2459
|
const deserializeAws_json1_1AttackProperty = (output, context) => {
|
|
3409
2460
|
return {
|
|
@@ -3425,7 +2476,7 @@ const deserializeAws_json1_1AttackStatisticsDataItem = (output, context) => {
|
|
|
3425
2476
|
};
|
|
3426
2477
|
};
|
|
3427
2478
|
const deserializeAws_json1_1AttackStatisticsDataList = (output, context) => {
|
|
3428
|
-
|
|
2479
|
+
const retVal = (output || [])
|
|
3429
2480
|
.filter((e) => e != null)
|
|
3430
2481
|
.map((entry) => {
|
|
3431
2482
|
if (entry === null) {
|
|
@@ -3433,9 +2484,10 @@ const deserializeAws_json1_1AttackStatisticsDataList = (output, context) => {
|
|
|
3433
2484
|
}
|
|
3434
2485
|
return deserializeAws_json1_1AttackStatisticsDataItem(entry, context);
|
|
3435
2486
|
});
|
|
2487
|
+
return retVal;
|
|
3436
2488
|
};
|
|
3437
2489
|
const deserializeAws_json1_1AttackSummaries = (output, context) => {
|
|
3438
|
-
|
|
2490
|
+
const retVal = (output || [])
|
|
3439
2491
|
.filter((e) => e != null)
|
|
3440
2492
|
.map((entry) => {
|
|
3441
2493
|
if (entry === null) {
|
|
@@ -3443,6 +2495,7 @@ const deserializeAws_json1_1AttackSummaries = (output, context) => {
|
|
|
3443
2495
|
}
|
|
3444
2496
|
return deserializeAws_json1_1AttackSummary(entry, context);
|
|
3445
2497
|
});
|
|
2498
|
+
return retVal;
|
|
3446
2499
|
};
|
|
3447
2500
|
const deserializeAws_json1_1AttackSummary = (output, context) => {
|
|
3448
2501
|
return {
|
|
@@ -3465,7 +2518,7 @@ const deserializeAws_json1_1AttackVectorDescription = (output, context) => {
|
|
|
3465
2518
|
};
|
|
3466
2519
|
};
|
|
3467
2520
|
const deserializeAws_json1_1AttackVectorDescriptionList = (output, context) => {
|
|
3468
|
-
|
|
2521
|
+
const retVal = (output || [])
|
|
3469
2522
|
.filter((e) => e != null)
|
|
3470
2523
|
.map((entry) => {
|
|
3471
2524
|
if (entry === null) {
|
|
@@ -3473,6 +2526,7 @@ const deserializeAws_json1_1AttackVectorDescriptionList = (output, context) => {
|
|
|
3473
2526
|
}
|
|
3474
2527
|
return deserializeAws_json1_1AttackVectorDescription(entry, context);
|
|
3475
2528
|
});
|
|
2529
|
+
return retVal;
|
|
3476
2530
|
};
|
|
3477
2531
|
const deserializeAws_json1_1AttackVolume = (output, context) => {
|
|
3478
2532
|
return {
|
|
@@ -3600,7 +2654,7 @@ const deserializeAws_json1_1EmergencyContact = (output, context) => {
|
|
|
3600
2654
|
};
|
|
3601
2655
|
};
|
|
3602
2656
|
const deserializeAws_json1_1EmergencyContactList = (output, context) => {
|
|
3603
|
-
|
|
2657
|
+
const retVal = (output || [])
|
|
3604
2658
|
.filter((e) => e != null)
|
|
3605
2659
|
.map((entry) => {
|
|
3606
2660
|
if (entry === null) {
|
|
@@ -3608,6 +2662,7 @@ const deserializeAws_json1_1EmergencyContactList = (output, context) => {
|
|
|
3608
2662
|
}
|
|
3609
2663
|
return deserializeAws_json1_1EmergencyContact(entry, context);
|
|
3610
2664
|
});
|
|
2665
|
+
return retVal;
|
|
3611
2666
|
};
|
|
3612
2667
|
const deserializeAws_json1_1EnableApplicationLayerAutomaticResponseResponse = (output, context) => {
|
|
3613
2668
|
return {};
|
|
@@ -3621,7 +2676,7 @@ const deserializeAws_json1_1GetSubscriptionStateResponse = (output, context) =>
|
|
|
3621
2676
|
};
|
|
3622
2677
|
};
|
|
3623
2678
|
const deserializeAws_json1_1HealthCheckIds = (output, context) => {
|
|
3624
|
-
|
|
2679
|
+
const retVal = (output || [])
|
|
3625
2680
|
.filter((e) => e != null)
|
|
3626
2681
|
.map((entry) => {
|
|
3627
2682
|
if (entry === null) {
|
|
@@ -3629,6 +2684,7 @@ const deserializeAws_json1_1HealthCheckIds = (output, context) => {
|
|
|
3629
2684
|
}
|
|
3630
2685
|
return smithy_client_1.expectString(entry);
|
|
3631
2686
|
});
|
|
2687
|
+
return retVal;
|
|
3632
2688
|
};
|
|
3633
2689
|
const deserializeAws_json1_1InternalErrorException = (output, context) => {
|
|
3634
2690
|
return {
|
|
@@ -3666,7 +2722,7 @@ const deserializeAws_json1_1Limit = (output, context) => {
|
|
|
3666
2722
|
};
|
|
3667
2723
|
};
|
|
3668
2724
|
const deserializeAws_json1_1Limits = (output, context) => {
|
|
3669
|
-
|
|
2725
|
+
const retVal = (output || [])
|
|
3670
2726
|
.filter((e) => e != null)
|
|
3671
2727
|
.map((entry) => {
|
|
3672
2728
|
if (entry === null) {
|
|
@@ -3674,6 +2730,7 @@ const deserializeAws_json1_1Limits = (output, context) => {
|
|
|
3674
2730
|
}
|
|
3675
2731
|
return deserializeAws_json1_1Limit(entry, context);
|
|
3676
2732
|
});
|
|
2733
|
+
return retVal;
|
|
3677
2734
|
};
|
|
3678
2735
|
const deserializeAws_json1_1LimitsExceededException = (output, context) => {
|
|
3679
2736
|
return {
|
|
@@ -3727,7 +2784,7 @@ const deserializeAws_json1_1LockedSubscriptionException = (output, context) => {
|
|
|
3727
2784
|
};
|
|
3728
2785
|
};
|
|
3729
2786
|
const deserializeAws_json1_1LogBucketList = (output, context) => {
|
|
3730
|
-
|
|
2787
|
+
const retVal = (output || [])
|
|
3731
2788
|
.filter((e) => e != null)
|
|
3732
2789
|
.map((entry) => {
|
|
3733
2790
|
if (entry === null) {
|
|
@@ -3735,6 +2792,7 @@ const deserializeAws_json1_1LogBucketList = (output, context) => {
|
|
|
3735
2792
|
}
|
|
3736
2793
|
return smithy_client_1.expectString(entry);
|
|
3737
2794
|
});
|
|
2795
|
+
return retVal;
|
|
3738
2796
|
};
|
|
3739
2797
|
const deserializeAws_json1_1Mitigation = (output, context) => {
|
|
3740
2798
|
return {
|
|
@@ -3742,7 +2800,7 @@ const deserializeAws_json1_1Mitigation = (output, context) => {
|
|
|
3742
2800
|
};
|
|
3743
2801
|
};
|
|
3744
2802
|
const deserializeAws_json1_1MitigationList = (output, context) => {
|
|
3745
|
-
|
|
2803
|
+
const retVal = (output || [])
|
|
3746
2804
|
.filter((e) => e != null)
|
|
3747
2805
|
.map((entry) => {
|
|
3748
2806
|
if (entry === null) {
|
|
@@ -3750,6 +2808,7 @@ const deserializeAws_json1_1MitigationList = (output, context) => {
|
|
|
3750
2808
|
}
|
|
3751
2809
|
return deserializeAws_json1_1Mitigation(entry, context);
|
|
3752
2810
|
});
|
|
2811
|
+
return retVal;
|
|
3753
2812
|
};
|
|
3754
2813
|
const deserializeAws_json1_1NoAssociatedRoleException = (output, context) => {
|
|
3755
2814
|
return {
|
|
@@ -3802,7 +2861,7 @@ const deserializeAws_json1_1ProtectionGroupLimits = (output, context) => {
|
|
|
3802
2861
|
};
|
|
3803
2862
|
};
|
|
3804
2863
|
const deserializeAws_json1_1ProtectionGroupMembers = (output, context) => {
|
|
3805
|
-
|
|
2864
|
+
const retVal = (output || [])
|
|
3806
2865
|
.filter((e) => e != null)
|
|
3807
2866
|
.map((entry) => {
|
|
3808
2867
|
if (entry === null) {
|
|
@@ -3810,6 +2869,7 @@ const deserializeAws_json1_1ProtectionGroupMembers = (output, context) => {
|
|
|
3810
2869
|
}
|
|
3811
2870
|
return smithy_client_1.expectString(entry);
|
|
3812
2871
|
});
|
|
2872
|
+
return retVal;
|
|
3813
2873
|
};
|
|
3814
2874
|
const deserializeAws_json1_1ProtectionGroupPatternTypeLimits = (output, context) => {
|
|
3815
2875
|
return {
|
|
@@ -3819,7 +2879,7 @@ const deserializeAws_json1_1ProtectionGroupPatternTypeLimits = (output, context)
|
|
|
3819
2879
|
};
|
|
3820
2880
|
};
|
|
3821
2881
|
const deserializeAws_json1_1ProtectionGroups = (output, context) => {
|
|
3822
|
-
|
|
2882
|
+
const retVal = (output || [])
|
|
3823
2883
|
.filter((e) => e != null)
|
|
3824
2884
|
.map((entry) => {
|
|
3825
2885
|
if (entry === null) {
|
|
@@ -3827,6 +2887,7 @@ const deserializeAws_json1_1ProtectionGroups = (output, context) => {
|
|
|
3827
2887
|
}
|
|
3828
2888
|
return deserializeAws_json1_1ProtectionGroup(entry, context);
|
|
3829
2889
|
});
|
|
2890
|
+
return retVal;
|
|
3830
2891
|
};
|
|
3831
2892
|
const deserializeAws_json1_1ProtectionLimits = (output, context) => {
|
|
3832
2893
|
return {
|
|
@@ -3836,7 +2897,7 @@ const deserializeAws_json1_1ProtectionLimits = (output, context) => {
|
|
|
3836
2897
|
};
|
|
3837
2898
|
};
|
|
3838
2899
|
const deserializeAws_json1_1Protections = (output, context) => {
|
|
3839
|
-
|
|
2900
|
+
const retVal = (output || [])
|
|
3840
2901
|
.filter((e) => e != null)
|
|
3841
2902
|
.map((entry) => {
|
|
3842
2903
|
if (entry === null) {
|
|
@@ -3844,6 +2905,7 @@ const deserializeAws_json1_1Protections = (output, context) => {
|
|
|
3844
2905
|
}
|
|
3845
2906
|
return deserializeAws_json1_1Protection(entry, context);
|
|
3846
2907
|
});
|
|
2908
|
+
return retVal;
|
|
3847
2909
|
};
|
|
3848
2910
|
const deserializeAws_json1_1ResourceAlreadyExistsException = (output, context) => {
|
|
3849
2911
|
return {
|
|
@@ -3852,7 +2914,7 @@ const deserializeAws_json1_1ResourceAlreadyExistsException = (output, context) =
|
|
|
3852
2914
|
};
|
|
3853
2915
|
};
|
|
3854
2916
|
const deserializeAws_json1_1ResourceArnList = (output, context) => {
|
|
3855
|
-
|
|
2917
|
+
const retVal = (output || [])
|
|
3856
2918
|
.filter((e) => e != null)
|
|
3857
2919
|
.map((entry) => {
|
|
3858
2920
|
if (entry === null) {
|
|
@@ -3860,6 +2922,7 @@ const deserializeAws_json1_1ResourceArnList = (output, context) => {
|
|
|
3860
2922
|
}
|
|
3861
2923
|
return smithy_client_1.expectString(entry);
|
|
3862
2924
|
});
|
|
2925
|
+
return retVal;
|
|
3863
2926
|
};
|
|
3864
2927
|
const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
|
|
3865
2928
|
return {
|
|
@@ -3890,7 +2953,7 @@ const deserializeAws_json1_1SubResourceSummary = (output, context) => {
|
|
|
3890
2953
|
};
|
|
3891
2954
|
};
|
|
3892
2955
|
const deserializeAws_json1_1SubResourceSummaryList = (output, context) => {
|
|
3893
|
-
|
|
2956
|
+
const retVal = (output || [])
|
|
3894
2957
|
.filter((e) => e != null)
|
|
3895
2958
|
.map((entry) => {
|
|
3896
2959
|
if (entry === null) {
|
|
@@ -3898,6 +2961,7 @@ const deserializeAws_json1_1SubResourceSummaryList = (output, context) => {
|
|
|
3898
2961
|
}
|
|
3899
2962
|
return deserializeAws_json1_1SubResourceSummary(entry, context);
|
|
3900
2963
|
});
|
|
2964
|
+
return retVal;
|
|
3901
2965
|
};
|
|
3902
2966
|
const deserializeAws_json1_1Subscription = (output, context) => {
|
|
3903
2967
|
return {
|
|
@@ -3938,7 +3002,7 @@ const deserializeAws_json1_1SummarizedAttackVector = (output, context) => {
|
|
|
3938
3002
|
};
|
|
3939
3003
|
};
|
|
3940
3004
|
const deserializeAws_json1_1SummarizedAttackVectorList = (output, context) => {
|
|
3941
|
-
|
|
3005
|
+
const retVal = (output || [])
|
|
3942
3006
|
.filter((e) => e != null)
|
|
3943
3007
|
.map((entry) => {
|
|
3944
3008
|
if (entry === null) {
|
|
@@ -3946,6 +3010,7 @@ const deserializeAws_json1_1SummarizedAttackVectorList = (output, context) => {
|
|
|
3946
3010
|
}
|
|
3947
3011
|
return deserializeAws_json1_1SummarizedAttackVector(entry, context);
|
|
3948
3012
|
});
|
|
3013
|
+
return retVal;
|
|
3949
3014
|
};
|
|
3950
3015
|
const deserializeAws_json1_1SummarizedCounter = (output, context) => {
|
|
3951
3016
|
return {
|
|
@@ -3958,7 +3023,7 @@ const deserializeAws_json1_1SummarizedCounter = (output, context) => {
|
|
|
3958
3023
|
};
|
|
3959
3024
|
};
|
|
3960
3025
|
const deserializeAws_json1_1SummarizedCounterList = (output, context) => {
|
|
3961
|
-
|
|
3026
|
+
const retVal = (output || [])
|
|
3962
3027
|
.filter((e) => e != null)
|
|
3963
3028
|
.map((entry) => {
|
|
3964
3029
|
if (entry === null) {
|
|
@@ -3966,6 +3031,7 @@ const deserializeAws_json1_1SummarizedCounterList = (output, context) => {
|
|
|
3966
3031
|
}
|
|
3967
3032
|
return deserializeAws_json1_1SummarizedCounter(entry, context);
|
|
3968
3033
|
});
|
|
3034
|
+
return retVal;
|
|
3969
3035
|
};
|
|
3970
3036
|
const deserializeAws_json1_1Tag = (output, context) => {
|
|
3971
3037
|
return {
|
|
@@ -3974,7 +3040,7 @@ const deserializeAws_json1_1Tag = (output, context) => {
|
|
|
3974
3040
|
};
|
|
3975
3041
|
};
|
|
3976
3042
|
const deserializeAws_json1_1TagList = (output, context) => {
|
|
3977
|
-
|
|
3043
|
+
const retVal = (output || [])
|
|
3978
3044
|
.filter((e) => e != null)
|
|
3979
3045
|
.map((entry) => {
|
|
3980
3046
|
if (entry === null) {
|
|
@@ -3982,6 +3048,7 @@ const deserializeAws_json1_1TagList = (output, context) => {
|
|
|
3982
3048
|
}
|
|
3983
3049
|
return deserializeAws_json1_1Tag(entry, context);
|
|
3984
3050
|
});
|
|
3051
|
+
return retVal;
|
|
3985
3052
|
};
|
|
3986
3053
|
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
|
|
3987
3054
|
return {};
|
|
@@ -3997,7 +3064,7 @@ const deserializeAws_json1_1TimeRange = (output, context) => {
|
|
|
3997
3064
|
};
|
|
3998
3065
|
};
|
|
3999
3066
|
const deserializeAws_json1_1TopContributors = (output, context) => {
|
|
4000
|
-
|
|
3067
|
+
const retVal = (output || [])
|
|
4001
3068
|
.filter((e) => e != null)
|
|
4002
3069
|
.map((entry) => {
|
|
4003
3070
|
if (entry === null) {
|
|
@@ -4005,6 +3072,7 @@ const deserializeAws_json1_1TopContributors = (output, context) => {
|
|
|
4005
3072
|
}
|
|
4006
3073
|
return deserializeAws_json1_1Contributor(entry, context);
|
|
4007
3074
|
});
|
|
3075
|
+
return retVal;
|
|
4008
3076
|
};
|
|
4009
3077
|
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
|
|
4010
3078
|
return {};
|
|
@@ -4028,7 +3096,7 @@ const deserializeAws_json1_1ValidationExceptionField = (output, context) => {
|
|
|
4028
3096
|
};
|
|
4029
3097
|
};
|
|
4030
3098
|
const deserializeAws_json1_1ValidationExceptionFieldList = (output, context) => {
|
|
4031
|
-
|
|
3099
|
+
const retVal = (output || [])
|
|
4032
3100
|
.filter((e) => e != null)
|
|
4033
3101
|
.map((entry) => {
|
|
4034
3102
|
if (entry === null) {
|
|
@@ -4036,6 +3104,7 @@ const deserializeAws_json1_1ValidationExceptionFieldList = (output, context) =>
|
|
|
4036
3104
|
}
|
|
4037
3105
|
return deserializeAws_json1_1ValidationExceptionField(entry, context);
|
|
4038
3106
|
});
|
|
3107
|
+
return retVal;
|
|
4039
3108
|
};
|
|
4040
3109
|
const deserializeMetadata = (output) => {
|
|
4041
3110
|
var _a;
|