@aws-sdk/client-sns 3.504.0 → 3.509.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +140 -1372
- package/dist-es/protocols/Aws_query.js +241 -1473
- package/package.json +3 -3
|
@@ -425,7 +425,7 @@ export const se_VerifySMSSandboxPhoneNumberCommand = async (input, context) => {
|
|
|
425
425
|
};
|
|
426
426
|
export const de_AddPermissionCommand = async (output, context) => {
|
|
427
427
|
if (output.statusCode >= 300) {
|
|
428
|
-
return
|
|
428
|
+
return de_CommandError(output, context);
|
|
429
429
|
}
|
|
430
430
|
await collectBody(output.body, context);
|
|
431
431
|
const response = {
|
|
@@ -433,37 +433,9 @@ export const de_AddPermissionCommand = async (output, context) => {
|
|
|
433
433
|
};
|
|
434
434
|
return response;
|
|
435
435
|
};
|
|
436
|
-
const de_AddPermissionCommandError = async (output, context) => {
|
|
437
|
-
const parsedOutput = {
|
|
438
|
-
...output,
|
|
439
|
-
body: await parseErrorBody(output.body, context),
|
|
440
|
-
};
|
|
441
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
442
|
-
switch (errorCode) {
|
|
443
|
-
case "AuthorizationError":
|
|
444
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
445
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
446
|
-
case "InternalError":
|
|
447
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
448
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
449
|
-
case "InvalidParameter":
|
|
450
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
451
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
452
|
-
case "NotFound":
|
|
453
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
454
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
455
|
-
default:
|
|
456
|
-
const parsedBody = parsedOutput.body;
|
|
457
|
-
return throwDefaultError({
|
|
458
|
-
output,
|
|
459
|
-
parsedBody: parsedBody.Error,
|
|
460
|
-
errorCode,
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
};
|
|
464
436
|
export const de_CheckIfPhoneNumberIsOptedOutCommand = async (output, context) => {
|
|
465
437
|
if (output.statusCode >= 300) {
|
|
466
|
-
return
|
|
438
|
+
return de_CommandError(output, context);
|
|
467
439
|
}
|
|
468
440
|
const data = await parseBody(output.body, context);
|
|
469
441
|
let contents = {};
|
|
@@ -474,37 +446,9 @@ export const de_CheckIfPhoneNumberIsOptedOutCommand = async (output, context) =>
|
|
|
474
446
|
};
|
|
475
447
|
return response;
|
|
476
448
|
};
|
|
477
|
-
const de_CheckIfPhoneNumberIsOptedOutCommandError = async (output, context) => {
|
|
478
|
-
const parsedOutput = {
|
|
479
|
-
...output,
|
|
480
|
-
body: await parseErrorBody(output.body, context),
|
|
481
|
-
};
|
|
482
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
483
|
-
switch (errorCode) {
|
|
484
|
-
case "AuthorizationError":
|
|
485
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
486
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
487
|
-
case "InternalError":
|
|
488
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
489
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
490
|
-
case "InvalidParameter":
|
|
491
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
492
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
493
|
-
case "Throttled":
|
|
494
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
495
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
496
|
-
default:
|
|
497
|
-
const parsedBody = parsedOutput.body;
|
|
498
|
-
return throwDefaultError({
|
|
499
|
-
output,
|
|
500
|
-
parsedBody: parsedBody.Error,
|
|
501
|
-
errorCode,
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
449
|
export const de_ConfirmSubscriptionCommand = async (output, context) => {
|
|
506
450
|
if (output.statusCode >= 300) {
|
|
507
|
-
return
|
|
451
|
+
return de_CommandError(output, context);
|
|
508
452
|
}
|
|
509
453
|
const data = await parseBody(output.body, context);
|
|
510
454
|
let contents = {};
|
|
@@ -515,46 +459,9 @@ export const de_ConfirmSubscriptionCommand = async (output, context) => {
|
|
|
515
459
|
};
|
|
516
460
|
return response;
|
|
517
461
|
};
|
|
518
|
-
const de_ConfirmSubscriptionCommandError = async (output, context) => {
|
|
519
|
-
const parsedOutput = {
|
|
520
|
-
...output,
|
|
521
|
-
body: await parseErrorBody(output.body, context),
|
|
522
|
-
};
|
|
523
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
524
|
-
switch (errorCode) {
|
|
525
|
-
case "AuthorizationError":
|
|
526
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
527
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
528
|
-
case "FilterPolicyLimitExceeded":
|
|
529
|
-
case "com.amazonaws.sns#FilterPolicyLimitExceededException":
|
|
530
|
-
throw await de_FilterPolicyLimitExceededExceptionRes(parsedOutput, context);
|
|
531
|
-
case "InternalError":
|
|
532
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
533
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
534
|
-
case "InvalidParameter":
|
|
535
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
536
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
537
|
-
case "NotFound":
|
|
538
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
539
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
540
|
-
case "ReplayLimitExceeded":
|
|
541
|
-
case "com.amazonaws.sns#ReplayLimitExceededException":
|
|
542
|
-
throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context);
|
|
543
|
-
case "SubscriptionLimitExceeded":
|
|
544
|
-
case "com.amazonaws.sns#SubscriptionLimitExceededException":
|
|
545
|
-
throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context);
|
|
546
|
-
default:
|
|
547
|
-
const parsedBody = parsedOutput.body;
|
|
548
|
-
return throwDefaultError({
|
|
549
|
-
output,
|
|
550
|
-
parsedBody: parsedBody.Error,
|
|
551
|
-
errorCode,
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
462
|
export const de_CreatePlatformApplicationCommand = async (output, context) => {
|
|
556
463
|
if (output.statusCode >= 300) {
|
|
557
|
-
return
|
|
464
|
+
return de_CommandError(output, context);
|
|
558
465
|
}
|
|
559
466
|
const data = await parseBody(output.body, context);
|
|
560
467
|
let contents = {};
|
|
@@ -565,34 +472,9 @@ export const de_CreatePlatformApplicationCommand = async (output, context) => {
|
|
|
565
472
|
};
|
|
566
473
|
return response;
|
|
567
474
|
};
|
|
568
|
-
const de_CreatePlatformApplicationCommandError = async (output, context) => {
|
|
569
|
-
const parsedOutput = {
|
|
570
|
-
...output,
|
|
571
|
-
body: await parseErrorBody(output.body, context),
|
|
572
|
-
};
|
|
573
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
574
|
-
switch (errorCode) {
|
|
575
|
-
case "AuthorizationError":
|
|
576
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
577
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
578
|
-
case "InternalError":
|
|
579
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
580
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
581
|
-
case "InvalidParameter":
|
|
582
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
583
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
584
|
-
default:
|
|
585
|
-
const parsedBody = parsedOutput.body;
|
|
586
|
-
return throwDefaultError({
|
|
587
|
-
output,
|
|
588
|
-
parsedBody: parsedBody.Error,
|
|
589
|
-
errorCode,
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
|
-
};
|
|
593
475
|
export const de_CreatePlatformEndpointCommand = async (output, context) => {
|
|
594
476
|
if (output.statusCode >= 300) {
|
|
595
|
-
return
|
|
477
|
+
return de_CommandError(output, context);
|
|
596
478
|
}
|
|
597
479
|
const data = await parseBody(output.body, context);
|
|
598
480
|
let contents = {};
|
|
@@ -603,37 +485,9 @@ export const de_CreatePlatformEndpointCommand = async (output, context) => {
|
|
|
603
485
|
};
|
|
604
486
|
return response;
|
|
605
487
|
};
|
|
606
|
-
const de_CreatePlatformEndpointCommandError = async (output, context) => {
|
|
607
|
-
const parsedOutput = {
|
|
608
|
-
...output,
|
|
609
|
-
body: await parseErrorBody(output.body, context),
|
|
610
|
-
};
|
|
611
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
612
|
-
switch (errorCode) {
|
|
613
|
-
case "AuthorizationError":
|
|
614
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
615
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
616
|
-
case "InternalError":
|
|
617
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
618
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
619
|
-
case "InvalidParameter":
|
|
620
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
621
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
622
|
-
case "NotFound":
|
|
623
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
624
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
625
|
-
default:
|
|
626
|
-
const parsedBody = parsedOutput.body;
|
|
627
|
-
return throwDefaultError({
|
|
628
|
-
output,
|
|
629
|
-
parsedBody: parsedBody.Error,
|
|
630
|
-
errorCode,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
488
|
export const de_CreateSMSSandboxPhoneNumberCommand = async (output, context) => {
|
|
635
489
|
if (output.statusCode >= 300) {
|
|
636
|
-
return
|
|
490
|
+
return de_CommandError(output, context);
|
|
637
491
|
}
|
|
638
492
|
const data = await parseBody(output.body, context);
|
|
639
493
|
let contents = {};
|
|
@@ -644,43 +498,9 @@ export const de_CreateSMSSandboxPhoneNumberCommand = async (output, context) =>
|
|
|
644
498
|
};
|
|
645
499
|
return response;
|
|
646
500
|
};
|
|
647
|
-
const de_CreateSMSSandboxPhoneNumberCommandError = async (output, context) => {
|
|
648
|
-
const parsedOutput = {
|
|
649
|
-
...output,
|
|
650
|
-
body: await parseErrorBody(output.body, context),
|
|
651
|
-
};
|
|
652
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
653
|
-
switch (errorCode) {
|
|
654
|
-
case "AuthorizationError":
|
|
655
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
656
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
657
|
-
case "InternalError":
|
|
658
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
659
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
660
|
-
case "InvalidParameter":
|
|
661
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
662
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
663
|
-
case "OptedOut":
|
|
664
|
-
case "com.amazonaws.sns#OptedOutException":
|
|
665
|
-
throw await de_OptedOutExceptionRes(parsedOutput, context);
|
|
666
|
-
case "Throttled":
|
|
667
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
668
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
669
|
-
case "UserError":
|
|
670
|
-
case "com.amazonaws.sns#UserErrorException":
|
|
671
|
-
throw await de_UserErrorExceptionRes(parsedOutput, context);
|
|
672
|
-
default:
|
|
673
|
-
const parsedBody = parsedOutput.body;
|
|
674
|
-
return throwDefaultError({
|
|
675
|
-
output,
|
|
676
|
-
parsedBody: parsedBody.Error,
|
|
677
|
-
errorCode,
|
|
678
|
-
});
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
501
|
export const de_CreateTopicCommand = async (output, context) => {
|
|
682
502
|
if (output.statusCode >= 300) {
|
|
683
|
-
return
|
|
503
|
+
return de_CommandError(output, context);
|
|
684
504
|
}
|
|
685
505
|
const data = await parseBody(output.body, context);
|
|
686
506
|
let contents = {};
|
|
@@ -691,52 +511,9 @@ export const de_CreateTopicCommand = async (output, context) => {
|
|
|
691
511
|
};
|
|
692
512
|
return response;
|
|
693
513
|
};
|
|
694
|
-
const de_CreateTopicCommandError = async (output, context) => {
|
|
695
|
-
const parsedOutput = {
|
|
696
|
-
...output,
|
|
697
|
-
body: await parseErrorBody(output.body, context),
|
|
698
|
-
};
|
|
699
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
700
|
-
switch (errorCode) {
|
|
701
|
-
case "AuthorizationError":
|
|
702
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
703
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
704
|
-
case "ConcurrentAccess":
|
|
705
|
-
case "com.amazonaws.sns#ConcurrentAccessException":
|
|
706
|
-
throw await de_ConcurrentAccessExceptionRes(parsedOutput, context);
|
|
707
|
-
case "InternalError":
|
|
708
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
709
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
710
|
-
case "InvalidParameter":
|
|
711
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
712
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
713
|
-
case "InvalidSecurity":
|
|
714
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
715
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
716
|
-
case "StaleTag":
|
|
717
|
-
case "com.amazonaws.sns#StaleTagException":
|
|
718
|
-
throw await de_StaleTagExceptionRes(parsedOutput, context);
|
|
719
|
-
case "TagLimitExceeded":
|
|
720
|
-
case "com.amazonaws.sns#TagLimitExceededException":
|
|
721
|
-
throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
|
|
722
|
-
case "TagPolicy":
|
|
723
|
-
case "com.amazonaws.sns#TagPolicyException":
|
|
724
|
-
throw await de_TagPolicyExceptionRes(parsedOutput, context);
|
|
725
|
-
case "TopicLimitExceeded":
|
|
726
|
-
case "com.amazonaws.sns#TopicLimitExceededException":
|
|
727
|
-
throw await de_TopicLimitExceededExceptionRes(parsedOutput, context);
|
|
728
|
-
default:
|
|
729
|
-
const parsedBody = parsedOutput.body;
|
|
730
|
-
return throwDefaultError({
|
|
731
|
-
output,
|
|
732
|
-
parsedBody: parsedBody.Error,
|
|
733
|
-
errorCode,
|
|
734
|
-
});
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
514
|
export const de_DeleteEndpointCommand = async (output, context) => {
|
|
738
515
|
if (output.statusCode >= 300) {
|
|
739
|
-
return
|
|
516
|
+
return de_CommandError(output, context);
|
|
740
517
|
}
|
|
741
518
|
await collectBody(output.body, context);
|
|
742
519
|
const response = {
|
|
@@ -744,34 +521,9 @@ export const de_DeleteEndpointCommand = async (output, context) => {
|
|
|
744
521
|
};
|
|
745
522
|
return response;
|
|
746
523
|
};
|
|
747
|
-
const de_DeleteEndpointCommandError = async (output, context) => {
|
|
748
|
-
const parsedOutput = {
|
|
749
|
-
...output,
|
|
750
|
-
body: await parseErrorBody(output.body, context),
|
|
751
|
-
};
|
|
752
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
753
|
-
switch (errorCode) {
|
|
754
|
-
case "AuthorizationError":
|
|
755
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
756
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
757
|
-
case "InternalError":
|
|
758
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
759
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
760
|
-
case "InvalidParameter":
|
|
761
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
762
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
763
|
-
default:
|
|
764
|
-
const parsedBody = parsedOutput.body;
|
|
765
|
-
return throwDefaultError({
|
|
766
|
-
output,
|
|
767
|
-
parsedBody: parsedBody.Error,
|
|
768
|
-
errorCode,
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
};
|
|
772
524
|
export const de_DeletePlatformApplicationCommand = async (output, context) => {
|
|
773
525
|
if (output.statusCode >= 300) {
|
|
774
|
-
return
|
|
526
|
+
return de_CommandError(output, context);
|
|
775
527
|
}
|
|
776
528
|
await collectBody(output.body, context);
|
|
777
529
|
const response = {
|
|
@@ -779,81 +531,22 @@ export const de_DeletePlatformApplicationCommand = async (output, context) => {
|
|
|
779
531
|
};
|
|
780
532
|
return response;
|
|
781
533
|
};
|
|
782
|
-
const
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
case "InternalError":
|
|
793
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
794
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
795
|
-
case "InvalidParameter":
|
|
796
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
797
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
798
|
-
default:
|
|
799
|
-
const parsedBody = parsedOutput.body;
|
|
800
|
-
return throwDefaultError({
|
|
801
|
-
output,
|
|
802
|
-
parsedBody: parsedBody.Error,
|
|
803
|
-
errorCode,
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
};
|
|
807
|
-
export const de_DeleteSMSSandboxPhoneNumberCommand = async (output, context) => {
|
|
808
|
-
if (output.statusCode >= 300) {
|
|
809
|
-
return de_DeleteSMSSandboxPhoneNumberCommandError(output, context);
|
|
810
|
-
}
|
|
811
|
-
const data = await parseBody(output.body, context);
|
|
812
|
-
let contents = {};
|
|
813
|
-
contents = de_DeleteSMSSandboxPhoneNumberResult(data.DeleteSMSSandboxPhoneNumberResult, context);
|
|
814
|
-
const response = {
|
|
815
|
-
$metadata: deserializeMetadata(output),
|
|
816
|
-
...contents,
|
|
534
|
+
export const de_DeleteSMSSandboxPhoneNumberCommand = async (output, context) => {
|
|
535
|
+
if (output.statusCode >= 300) {
|
|
536
|
+
return de_CommandError(output, context);
|
|
537
|
+
}
|
|
538
|
+
const data = await parseBody(output.body, context);
|
|
539
|
+
let contents = {};
|
|
540
|
+
contents = de_DeleteSMSSandboxPhoneNumberResult(data.DeleteSMSSandboxPhoneNumberResult, context);
|
|
541
|
+
const response = {
|
|
542
|
+
$metadata: deserializeMetadata(output),
|
|
543
|
+
...contents,
|
|
817
544
|
};
|
|
818
545
|
return response;
|
|
819
546
|
};
|
|
820
|
-
const de_DeleteSMSSandboxPhoneNumberCommandError = async (output, context) => {
|
|
821
|
-
const parsedOutput = {
|
|
822
|
-
...output,
|
|
823
|
-
body: await parseErrorBody(output.body, context),
|
|
824
|
-
};
|
|
825
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
826
|
-
switch (errorCode) {
|
|
827
|
-
case "AuthorizationError":
|
|
828
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
829
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
830
|
-
case "InternalError":
|
|
831
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
832
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
833
|
-
case "InvalidParameter":
|
|
834
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
835
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
836
|
-
case "ResourceNotFound":
|
|
837
|
-
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
838
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
839
|
-
case "Throttled":
|
|
840
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
841
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
842
|
-
case "UserError":
|
|
843
|
-
case "com.amazonaws.sns#UserErrorException":
|
|
844
|
-
throw await de_UserErrorExceptionRes(parsedOutput, context);
|
|
845
|
-
default:
|
|
846
|
-
const parsedBody = parsedOutput.body;
|
|
847
|
-
return throwDefaultError({
|
|
848
|
-
output,
|
|
849
|
-
parsedBody: parsedBody.Error,
|
|
850
|
-
errorCode,
|
|
851
|
-
});
|
|
852
|
-
}
|
|
853
|
-
};
|
|
854
547
|
export const de_DeleteTopicCommand = async (output, context) => {
|
|
855
548
|
if (output.statusCode >= 300) {
|
|
856
|
-
return
|
|
549
|
+
return de_CommandError(output, context);
|
|
857
550
|
}
|
|
858
551
|
await collectBody(output.body, context);
|
|
859
552
|
const response = {
|
|
@@ -861,49 +554,9 @@ export const de_DeleteTopicCommand = async (output, context) => {
|
|
|
861
554
|
};
|
|
862
555
|
return response;
|
|
863
556
|
};
|
|
864
|
-
const de_DeleteTopicCommandError = async (output, context) => {
|
|
865
|
-
const parsedOutput = {
|
|
866
|
-
...output,
|
|
867
|
-
body: await parseErrorBody(output.body, context),
|
|
868
|
-
};
|
|
869
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
870
|
-
switch (errorCode) {
|
|
871
|
-
case "AuthorizationError":
|
|
872
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
873
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
874
|
-
case "ConcurrentAccess":
|
|
875
|
-
case "com.amazonaws.sns#ConcurrentAccessException":
|
|
876
|
-
throw await de_ConcurrentAccessExceptionRes(parsedOutput, context);
|
|
877
|
-
case "InternalError":
|
|
878
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
879
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
880
|
-
case "InvalidParameter":
|
|
881
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
882
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
883
|
-
case "InvalidState":
|
|
884
|
-
case "com.amazonaws.sns#InvalidStateException":
|
|
885
|
-
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
886
|
-
case "NotFound":
|
|
887
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
888
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
889
|
-
case "StaleTag":
|
|
890
|
-
case "com.amazonaws.sns#StaleTagException":
|
|
891
|
-
throw await de_StaleTagExceptionRes(parsedOutput, context);
|
|
892
|
-
case "TagPolicy":
|
|
893
|
-
case "com.amazonaws.sns#TagPolicyException":
|
|
894
|
-
throw await de_TagPolicyExceptionRes(parsedOutput, context);
|
|
895
|
-
default:
|
|
896
|
-
const parsedBody = parsedOutput.body;
|
|
897
|
-
return throwDefaultError({
|
|
898
|
-
output,
|
|
899
|
-
parsedBody: parsedBody.Error,
|
|
900
|
-
errorCode,
|
|
901
|
-
});
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
557
|
export const de_GetDataProtectionPolicyCommand = async (output, context) => {
|
|
905
558
|
if (output.statusCode >= 300) {
|
|
906
|
-
return
|
|
559
|
+
return de_CommandError(output, context);
|
|
907
560
|
}
|
|
908
561
|
const data = await parseBody(output.body, context);
|
|
909
562
|
let contents = {};
|
|
@@ -914,40 +567,9 @@ export const de_GetDataProtectionPolicyCommand = async (output, context) => {
|
|
|
914
567
|
};
|
|
915
568
|
return response;
|
|
916
569
|
};
|
|
917
|
-
const de_GetDataProtectionPolicyCommandError = async (output, context) => {
|
|
918
|
-
const parsedOutput = {
|
|
919
|
-
...output,
|
|
920
|
-
body: await parseErrorBody(output.body, context),
|
|
921
|
-
};
|
|
922
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
923
|
-
switch (errorCode) {
|
|
924
|
-
case "AuthorizationError":
|
|
925
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
926
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
927
|
-
case "InternalError":
|
|
928
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
929
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
930
|
-
case "InvalidParameter":
|
|
931
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
932
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
933
|
-
case "InvalidSecurity":
|
|
934
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
935
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
936
|
-
case "NotFound":
|
|
937
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
938
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
939
|
-
default:
|
|
940
|
-
const parsedBody = parsedOutput.body;
|
|
941
|
-
return throwDefaultError({
|
|
942
|
-
output,
|
|
943
|
-
parsedBody: parsedBody.Error,
|
|
944
|
-
errorCode,
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
};
|
|
948
570
|
export const de_GetEndpointAttributesCommand = async (output, context) => {
|
|
949
571
|
if (output.statusCode >= 300) {
|
|
950
|
-
return
|
|
572
|
+
return de_CommandError(output, context);
|
|
951
573
|
}
|
|
952
574
|
const data = await parseBody(output.body, context);
|
|
953
575
|
let contents = {};
|
|
@@ -958,37 +580,9 @@ export const de_GetEndpointAttributesCommand = async (output, context) => {
|
|
|
958
580
|
};
|
|
959
581
|
return response;
|
|
960
582
|
};
|
|
961
|
-
const de_GetEndpointAttributesCommandError = async (output, context) => {
|
|
962
|
-
const parsedOutput = {
|
|
963
|
-
...output,
|
|
964
|
-
body: await parseErrorBody(output.body, context),
|
|
965
|
-
};
|
|
966
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
967
|
-
switch (errorCode) {
|
|
968
|
-
case "AuthorizationError":
|
|
969
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
970
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
971
|
-
case "InternalError":
|
|
972
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
973
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
974
|
-
case "InvalidParameter":
|
|
975
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
976
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
977
|
-
case "NotFound":
|
|
978
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
979
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
980
|
-
default:
|
|
981
|
-
const parsedBody = parsedOutput.body;
|
|
982
|
-
return throwDefaultError({
|
|
983
|
-
output,
|
|
984
|
-
parsedBody: parsedBody.Error,
|
|
985
|
-
errorCode,
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
};
|
|
989
583
|
export const de_GetPlatformApplicationAttributesCommand = async (output, context) => {
|
|
990
584
|
if (output.statusCode >= 300) {
|
|
991
|
-
return
|
|
585
|
+
return de_CommandError(output, context);
|
|
992
586
|
}
|
|
993
587
|
const data = await parseBody(output.body, context);
|
|
994
588
|
let contents = {};
|
|
@@ -999,37 +593,9 @@ export const de_GetPlatformApplicationAttributesCommand = async (output, context
|
|
|
999
593
|
};
|
|
1000
594
|
return response;
|
|
1001
595
|
};
|
|
1002
|
-
const de_GetPlatformApplicationAttributesCommandError = async (output, context) => {
|
|
1003
|
-
const parsedOutput = {
|
|
1004
|
-
...output,
|
|
1005
|
-
body: await parseErrorBody(output.body, context),
|
|
1006
|
-
};
|
|
1007
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1008
|
-
switch (errorCode) {
|
|
1009
|
-
case "AuthorizationError":
|
|
1010
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1011
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1012
|
-
case "InternalError":
|
|
1013
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1014
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1015
|
-
case "InvalidParameter":
|
|
1016
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1017
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1018
|
-
case "NotFound":
|
|
1019
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1020
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1021
|
-
default:
|
|
1022
|
-
const parsedBody = parsedOutput.body;
|
|
1023
|
-
return throwDefaultError({
|
|
1024
|
-
output,
|
|
1025
|
-
parsedBody: parsedBody.Error,
|
|
1026
|
-
errorCode,
|
|
1027
|
-
});
|
|
1028
|
-
}
|
|
1029
|
-
};
|
|
1030
596
|
export const de_GetSMSAttributesCommand = async (output, context) => {
|
|
1031
597
|
if (output.statusCode >= 300) {
|
|
1032
|
-
return
|
|
598
|
+
return de_CommandError(output, context);
|
|
1033
599
|
}
|
|
1034
600
|
const data = await parseBody(output.body, context);
|
|
1035
601
|
let contents = {};
|
|
@@ -1040,37 +606,9 @@ export const de_GetSMSAttributesCommand = async (output, context) => {
|
|
|
1040
606
|
};
|
|
1041
607
|
return response;
|
|
1042
608
|
};
|
|
1043
|
-
const de_GetSMSAttributesCommandError = async (output, context) => {
|
|
1044
|
-
const parsedOutput = {
|
|
1045
|
-
...output,
|
|
1046
|
-
body: await parseErrorBody(output.body, context),
|
|
1047
|
-
};
|
|
1048
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1049
|
-
switch (errorCode) {
|
|
1050
|
-
case "AuthorizationError":
|
|
1051
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1052
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1053
|
-
case "InternalError":
|
|
1054
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1055
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1056
|
-
case "InvalidParameter":
|
|
1057
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1058
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1059
|
-
case "Throttled":
|
|
1060
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1061
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1062
|
-
default:
|
|
1063
|
-
const parsedBody = parsedOutput.body;
|
|
1064
|
-
return throwDefaultError({
|
|
1065
|
-
output,
|
|
1066
|
-
parsedBody: parsedBody.Error,
|
|
1067
|
-
errorCode,
|
|
1068
|
-
});
|
|
1069
|
-
}
|
|
1070
|
-
};
|
|
1071
609
|
export const de_GetSMSSandboxAccountStatusCommand = async (output, context) => {
|
|
1072
610
|
if (output.statusCode >= 300) {
|
|
1073
|
-
return
|
|
611
|
+
return de_CommandError(output, context);
|
|
1074
612
|
}
|
|
1075
613
|
const data = await parseBody(output.body, context);
|
|
1076
614
|
let contents = {};
|
|
@@ -1081,34 +619,9 @@ export const de_GetSMSSandboxAccountStatusCommand = async (output, context) => {
|
|
|
1081
619
|
};
|
|
1082
620
|
return response;
|
|
1083
621
|
};
|
|
1084
|
-
const de_GetSMSSandboxAccountStatusCommandError = async (output, context) => {
|
|
1085
|
-
const parsedOutput = {
|
|
1086
|
-
...output,
|
|
1087
|
-
body: await parseErrorBody(output.body, context),
|
|
1088
|
-
};
|
|
1089
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1090
|
-
switch (errorCode) {
|
|
1091
|
-
case "AuthorizationError":
|
|
1092
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1093
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1094
|
-
case "InternalError":
|
|
1095
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1096
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1097
|
-
case "Throttled":
|
|
1098
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1099
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1100
|
-
default:
|
|
1101
|
-
const parsedBody = parsedOutput.body;
|
|
1102
|
-
return throwDefaultError({
|
|
1103
|
-
output,
|
|
1104
|
-
parsedBody: parsedBody.Error,
|
|
1105
|
-
errorCode,
|
|
1106
|
-
});
|
|
1107
|
-
}
|
|
1108
|
-
};
|
|
1109
622
|
export const de_GetSubscriptionAttributesCommand = async (output, context) => {
|
|
1110
623
|
if (output.statusCode >= 300) {
|
|
1111
|
-
return
|
|
624
|
+
return de_CommandError(output, context);
|
|
1112
625
|
}
|
|
1113
626
|
const data = await parseBody(output.body, context);
|
|
1114
627
|
let contents = {};
|
|
@@ -1119,81 +632,22 @@ export const de_GetSubscriptionAttributesCommand = async (output, context) => {
|
|
|
1119
632
|
};
|
|
1120
633
|
return response;
|
|
1121
634
|
};
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
case "InternalError":
|
|
1133
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1134
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1135
|
-
case "InvalidParameter":
|
|
1136
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1137
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1138
|
-
case "NotFound":
|
|
1139
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1140
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1141
|
-
default:
|
|
1142
|
-
const parsedBody = parsedOutput.body;
|
|
1143
|
-
return throwDefaultError({
|
|
1144
|
-
output,
|
|
1145
|
-
parsedBody: parsedBody.Error,
|
|
1146
|
-
errorCode,
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
};
|
|
1150
|
-
export const de_GetTopicAttributesCommand = async (output, context) => {
|
|
1151
|
-
if (output.statusCode >= 300) {
|
|
1152
|
-
return de_GetTopicAttributesCommandError(output, context);
|
|
1153
|
-
}
|
|
1154
|
-
const data = await parseBody(output.body, context);
|
|
1155
|
-
let contents = {};
|
|
1156
|
-
contents = de_GetTopicAttributesResponse(data.GetTopicAttributesResult, context);
|
|
1157
|
-
const response = {
|
|
1158
|
-
$metadata: deserializeMetadata(output),
|
|
1159
|
-
...contents,
|
|
635
|
+
export const de_GetTopicAttributesCommand = async (output, context) => {
|
|
636
|
+
if (output.statusCode >= 300) {
|
|
637
|
+
return de_CommandError(output, context);
|
|
638
|
+
}
|
|
639
|
+
const data = await parseBody(output.body, context);
|
|
640
|
+
let contents = {};
|
|
641
|
+
contents = de_GetTopicAttributesResponse(data.GetTopicAttributesResult, context);
|
|
642
|
+
const response = {
|
|
643
|
+
$metadata: deserializeMetadata(output),
|
|
644
|
+
...contents,
|
|
1160
645
|
};
|
|
1161
646
|
return response;
|
|
1162
647
|
};
|
|
1163
|
-
const de_GetTopicAttributesCommandError = async (output, context) => {
|
|
1164
|
-
const parsedOutput = {
|
|
1165
|
-
...output,
|
|
1166
|
-
body: await parseErrorBody(output.body, context),
|
|
1167
|
-
};
|
|
1168
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1169
|
-
switch (errorCode) {
|
|
1170
|
-
case "AuthorizationError":
|
|
1171
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1172
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1173
|
-
case "InternalError":
|
|
1174
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1175
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1176
|
-
case "InvalidParameter":
|
|
1177
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1178
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1179
|
-
case "InvalidSecurity":
|
|
1180
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
1181
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
1182
|
-
case "NotFound":
|
|
1183
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1184
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1185
|
-
default:
|
|
1186
|
-
const parsedBody = parsedOutput.body;
|
|
1187
|
-
return throwDefaultError({
|
|
1188
|
-
output,
|
|
1189
|
-
parsedBody: parsedBody.Error,
|
|
1190
|
-
errorCode,
|
|
1191
|
-
});
|
|
1192
|
-
}
|
|
1193
|
-
};
|
|
1194
648
|
export const de_ListEndpointsByPlatformApplicationCommand = async (output, context) => {
|
|
1195
649
|
if (output.statusCode >= 300) {
|
|
1196
|
-
return
|
|
650
|
+
return de_CommandError(output, context);
|
|
1197
651
|
}
|
|
1198
652
|
const data = await parseBody(output.body, context);
|
|
1199
653
|
let contents = {};
|
|
@@ -1204,37 +658,9 @@ export const de_ListEndpointsByPlatformApplicationCommand = async (output, conte
|
|
|
1204
658
|
};
|
|
1205
659
|
return response;
|
|
1206
660
|
};
|
|
1207
|
-
const de_ListEndpointsByPlatformApplicationCommandError = async (output, context) => {
|
|
1208
|
-
const parsedOutput = {
|
|
1209
|
-
...output,
|
|
1210
|
-
body: await parseErrorBody(output.body, context),
|
|
1211
|
-
};
|
|
1212
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1213
|
-
switch (errorCode) {
|
|
1214
|
-
case "AuthorizationError":
|
|
1215
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1216
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1217
|
-
case "InternalError":
|
|
1218
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1219
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1220
|
-
case "InvalidParameter":
|
|
1221
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1222
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1223
|
-
case "NotFound":
|
|
1224
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1225
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1226
|
-
default:
|
|
1227
|
-
const parsedBody = parsedOutput.body;
|
|
1228
|
-
return throwDefaultError({
|
|
1229
|
-
output,
|
|
1230
|
-
parsedBody: parsedBody.Error,
|
|
1231
|
-
errorCode,
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
};
|
|
1235
661
|
export const de_ListOriginationNumbersCommand = async (output, context) => {
|
|
1236
662
|
if (output.statusCode >= 300) {
|
|
1237
|
-
return
|
|
663
|
+
return de_CommandError(output, context);
|
|
1238
664
|
}
|
|
1239
665
|
const data = await parseBody(output.body, context);
|
|
1240
666
|
let contents = {};
|
|
@@ -1245,40 +671,9 @@ export const de_ListOriginationNumbersCommand = async (output, context) => {
|
|
|
1245
671
|
};
|
|
1246
672
|
return response;
|
|
1247
673
|
};
|
|
1248
|
-
const de_ListOriginationNumbersCommandError = async (output, context) => {
|
|
1249
|
-
const parsedOutput = {
|
|
1250
|
-
...output,
|
|
1251
|
-
body: await parseErrorBody(output.body, context),
|
|
1252
|
-
};
|
|
1253
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1254
|
-
switch (errorCode) {
|
|
1255
|
-
case "AuthorizationError":
|
|
1256
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1257
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1258
|
-
case "InternalError":
|
|
1259
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1260
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1261
|
-
case "InvalidParameter":
|
|
1262
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1263
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1264
|
-
case "Throttled":
|
|
1265
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1266
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1267
|
-
case "ValidationException":
|
|
1268
|
-
case "com.amazonaws.sns#ValidationException":
|
|
1269
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1270
|
-
default:
|
|
1271
|
-
const parsedBody = parsedOutput.body;
|
|
1272
|
-
return throwDefaultError({
|
|
1273
|
-
output,
|
|
1274
|
-
parsedBody: parsedBody.Error,
|
|
1275
|
-
errorCode,
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
|
-
};
|
|
1279
674
|
export const de_ListPhoneNumbersOptedOutCommand = async (output, context) => {
|
|
1280
675
|
if (output.statusCode >= 300) {
|
|
1281
|
-
return
|
|
676
|
+
return de_CommandError(output, context);
|
|
1282
677
|
}
|
|
1283
678
|
const data = await parseBody(output.body, context);
|
|
1284
679
|
let contents = {};
|
|
@@ -1289,37 +684,9 @@ export const de_ListPhoneNumbersOptedOutCommand = async (output, context) => {
|
|
|
1289
684
|
};
|
|
1290
685
|
return response;
|
|
1291
686
|
};
|
|
1292
|
-
const de_ListPhoneNumbersOptedOutCommandError = async (output, context) => {
|
|
1293
|
-
const parsedOutput = {
|
|
1294
|
-
...output,
|
|
1295
|
-
body: await parseErrorBody(output.body, context),
|
|
1296
|
-
};
|
|
1297
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1298
|
-
switch (errorCode) {
|
|
1299
|
-
case "AuthorizationError":
|
|
1300
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1301
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1302
|
-
case "InternalError":
|
|
1303
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1304
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1305
|
-
case "InvalidParameter":
|
|
1306
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1307
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1308
|
-
case "Throttled":
|
|
1309
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1310
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1311
|
-
default:
|
|
1312
|
-
const parsedBody = parsedOutput.body;
|
|
1313
|
-
return throwDefaultError({
|
|
1314
|
-
output,
|
|
1315
|
-
parsedBody: parsedBody.Error,
|
|
1316
|
-
errorCode,
|
|
1317
|
-
});
|
|
1318
|
-
}
|
|
1319
|
-
};
|
|
1320
687
|
export const de_ListPlatformApplicationsCommand = async (output, context) => {
|
|
1321
688
|
if (output.statusCode >= 300) {
|
|
1322
|
-
return
|
|
689
|
+
return de_CommandError(output, context);
|
|
1323
690
|
}
|
|
1324
691
|
const data = await parseBody(output.body, context);
|
|
1325
692
|
let contents = {};
|
|
@@ -1330,34 +697,9 @@ export const de_ListPlatformApplicationsCommand = async (output, context) => {
|
|
|
1330
697
|
};
|
|
1331
698
|
return response;
|
|
1332
699
|
};
|
|
1333
|
-
const de_ListPlatformApplicationsCommandError = async (output, context) => {
|
|
1334
|
-
const parsedOutput = {
|
|
1335
|
-
...output,
|
|
1336
|
-
body: await parseErrorBody(output.body, context),
|
|
1337
|
-
};
|
|
1338
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1339
|
-
switch (errorCode) {
|
|
1340
|
-
case "AuthorizationError":
|
|
1341
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1342
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1343
|
-
case "InternalError":
|
|
1344
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1345
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1346
|
-
case "InvalidParameter":
|
|
1347
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1348
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1349
|
-
default:
|
|
1350
|
-
const parsedBody = parsedOutput.body;
|
|
1351
|
-
return throwDefaultError({
|
|
1352
|
-
output,
|
|
1353
|
-
parsedBody: parsedBody.Error,
|
|
1354
|
-
errorCode,
|
|
1355
|
-
});
|
|
1356
|
-
}
|
|
1357
|
-
};
|
|
1358
700
|
export const de_ListSMSSandboxPhoneNumbersCommand = async (output, context) => {
|
|
1359
701
|
if (output.statusCode >= 300) {
|
|
1360
|
-
return
|
|
702
|
+
return de_CommandError(output, context);
|
|
1361
703
|
}
|
|
1362
704
|
const data = await parseBody(output.body, context);
|
|
1363
705
|
let contents = {};
|
|
@@ -1368,40 +710,9 @@ export const de_ListSMSSandboxPhoneNumbersCommand = async (output, context) => {
|
|
|
1368
710
|
};
|
|
1369
711
|
return response;
|
|
1370
712
|
};
|
|
1371
|
-
const de_ListSMSSandboxPhoneNumbersCommandError = async (output, context) => {
|
|
1372
|
-
const parsedOutput = {
|
|
1373
|
-
...output,
|
|
1374
|
-
body: await parseErrorBody(output.body, context),
|
|
1375
|
-
};
|
|
1376
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1377
|
-
switch (errorCode) {
|
|
1378
|
-
case "AuthorizationError":
|
|
1379
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1380
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1381
|
-
case "InternalError":
|
|
1382
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1383
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1384
|
-
case "InvalidParameter":
|
|
1385
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1386
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1387
|
-
case "ResourceNotFound":
|
|
1388
|
-
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
1389
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1390
|
-
case "Throttled":
|
|
1391
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1392
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1393
|
-
default:
|
|
1394
|
-
const parsedBody = parsedOutput.body;
|
|
1395
|
-
return throwDefaultError({
|
|
1396
|
-
output,
|
|
1397
|
-
parsedBody: parsedBody.Error,
|
|
1398
|
-
errorCode,
|
|
1399
|
-
});
|
|
1400
|
-
}
|
|
1401
|
-
};
|
|
1402
713
|
export const de_ListSubscriptionsCommand = async (output, context) => {
|
|
1403
714
|
if (output.statusCode >= 300) {
|
|
1404
|
-
return
|
|
715
|
+
return de_CommandError(output, context);
|
|
1405
716
|
}
|
|
1406
717
|
const data = await parseBody(output.body, context);
|
|
1407
718
|
let contents = {};
|
|
@@ -1412,34 +723,9 @@ export const de_ListSubscriptionsCommand = async (output, context) => {
|
|
|
1412
723
|
};
|
|
1413
724
|
return response;
|
|
1414
725
|
};
|
|
1415
|
-
const de_ListSubscriptionsCommandError = async (output, context) => {
|
|
1416
|
-
const parsedOutput = {
|
|
1417
|
-
...output,
|
|
1418
|
-
body: await parseErrorBody(output.body, context),
|
|
1419
|
-
};
|
|
1420
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1421
|
-
switch (errorCode) {
|
|
1422
|
-
case "AuthorizationError":
|
|
1423
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1424
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1425
|
-
case "InternalError":
|
|
1426
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1427
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1428
|
-
case "InvalidParameter":
|
|
1429
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1430
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1431
|
-
default:
|
|
1432
|
-
const parsedBody = parsedOutput.body;
|
|
1433
|
-
return throwDefaultError({
|
|
1434
|
-
output,
|
|
1435
|
-
parsedBody: parsedBody.Error,
|
|
1436
|
-
errorCode,
|
|
1437
|
-
});
|
|
1438
|
-
}
|
|
1439
|
-
};
|
|
1440
726
|
export const de_ListSubscriptionsByTopicCommand = async (output, context) => {
|
|
1441
727
|
if (output.statusCode >= 300) {
|
|
1442
|
-
return
|
|
728
|
+
return de_CommandError(output, context);
|
|
1443
729
|
}
|
|
1444
730
|
const data = await parseBody(output.body, context);
|
|
1445
731
|
let contents = {};
|
|
@@ -1450,37 +736,9 @@ export const de_ListSubscriptionsByTopicCommand = async (output, context) => {
|
|
|
1450
736
|
};
|
|
1451
737
|
return response;
|
|
1452
738
|
};
|
|
1453
|
-
const de_ListSubscriptionsByTopicCommandError = async (output, context) => {
|
|
1454
|
-
const parsedOutput = {
|
|
1455
|
-
...output,
|
|
1456
|
-
body: await parseErrorBody(output.body, context),
|
|
1457
|
-
};
|
|
1458
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1459
|
-
switch (errorCode) {
|
|
1460
|
-
case "AuthorizationError":
|
|
1461
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1462
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1463
|
-
case "InternalError":
|
|
1464
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1465
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1466
|
-
case "InvalidParameter":
|
|
1467
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1468
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1469
|
-
case "NotFound":
|
|
1470
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1471
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1472
|
-
default:
|
|
1473
|
-
const parsedBody = parsedOutput.body;
|
|
1474
|
-
return throwDefaultError({
|
|
1475
|
-
output,
|
|
1476
|
-
parsedBody: parsedBody.Error,
|
|
1477
|
-
errorCode,
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1481
739
|
export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
1482
740
|
if (output.statusCode >= 300) {
|
|
1483
|
-
return
|
|
741
|
+
return de_CommandError(output, context);
|
|
1484
742
|
}
|
|
1485
743
|
const data = await parseBody(output.body, context);
|
|
1486
744
|
let contents = {};
|
|
@@ -1491,130 +749,194 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
|
|
|
1491
749
|
};
|
|
1492
750
|
return response;
|
|
1493
751
|
};
|
|
1494
|
-
const
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
752
|
+
export const de_ListTopicsCommand = async (output, context) => {
|
|
753
|
+
if (output.statusCode >= 300) {
|
|
754
|
+
return de_CommandError(output, context);
|
|
755
|
+
}
|
|
756
|
+
const data = await parseBody(output.body, context);
|
|
757
|
+
let contents = {};
|
|
758
|
+
contents = de_ListTopicsResponse(data.ListTopicsResult, context);
|
|
759
|
+
const response = {
|
|
760
|
+
$metadata: deserializeMetadata(output),
|
|
761
|
+
...contents,
|
|
1498
762
|
};
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
case "ConcurrentAccess":
|
|
1505
|
-
case "com.amazonaws.sns#ConcurrentAccessException":
|
|
1506
|
-
throw await de_ConcurrentAccessExceptionRes(parsedOutput, context);
|
|
1507
|
-
case "InvalidParameter":
|
|
1508
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1509
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1510
|
-
case "ResourceNotFound":
|
|
1511
|
-
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
1512
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1513
|
-
case "TagPolicy":
|
|
1514
|
-
case "com.amazonaws.sns#TagPolicyException":
|
|
1515
|
-
throw await de_TagPolicyExceptionRes(parsedOutput, context);
|
|
1516
|
-
default:
|
|
1517
|
-
const parsedBody = parsedOutput.body;
|
|
1518
|
-
return throwDefaultError({
|
|
1519
|
-
output,
|
|
1520
|
-
parsedBody: parsedBody.Error,
|
|
1521
|
-
errorCode,
|
|
1522
|
-
});
|
|
763
|
+
return response;
|
|
764
|
+
};
|
|
765
|
+
export const de_OptInPhoneNumberCommand = async (output, context) => {
|
|
766
|
+
if (output.statusCode >= 300) {
|
|
767
|
+
return de_CommandError(output, context);
|
|
1523
768
|
}
|
|
769
|
+
const data = await parseBody(output.body, context);
|
|
770
|
+
let contents = {};
|
|
771
|
+
contents = de_OptInPhoneNumberResponse(data.OptInPhoneNumberResult, context);
|
|
772
|
+
const response = {
|
|
773
|
+
$metadata: deserializeMetadata(output),
|
|
774
|
+
...contents,
|
|
775
|
+
};
|
|
776
|
+
return response;
|
|
1524
777
|
};
|
|
1525
|
-
export const
|
|
778
|
+
export const de_PublishCommand = async (output, context) => {
|
|
1526
779
|
if (output.statusCode >= 300) {
|
|
1527
|
-
return
|
|
780
|
+
return de_CommandError(output, context);
|
|
1528
781
|
}
|
|
1529
782
|
const data = await parseBody(output.body, context);
|
|
1530
783
|
let contents = {};
|
|
1531
|
-
contents =
|
|
784
|
+
contents = de_PublishResponse(data.PublishResult, context);
|
|
1532
785
|
const response = {
|
|
1533
786
|
$metadata: deserializeMetadata(output),
|
|
1534
787
|
...contents,
|
|
1535
788
|
};
|
|
1536
789
|
return response;
|
|
1537
790
|
};
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
791
|
+
export const de_PublishBatchCommand = async (output, context) => {
|
|
792
|
+
if (output.statusCode >= 300) {
|
|
793
|
+
return de_CommandError(output, context);
|
|
794
|
+
}
|
|
795
|
+
const data = await parseBody(output.body, context);
|
|
796
|
+
let contents = {};
|
|
797
|
+
contents = de_PublishBatchResponse(data.PublishBatchResult, context);
|
|
798
|
+
const response = {
|
|
799
|
+
$metadata: deserializeMetadata(output),
|
|
800
|
+
...contents,
|
|
1542
801
|
};
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
case "InternalError":
|
|
1549
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1550
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1551
|
-
case "InvalidParameter":
|
|
1552
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1553
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1554
|
-
default:
|
|
1555
|
-
const parsedBody = parsedOutput.body;
|
|
1556
|
-
return throwDefaultError({
|
|
1557
|
-
output,
|
|
1558
|
-
parsedBody: parsedBody.Error,
|
|
1559
|
-
errorCode,
|
|
1560
|
-
});
|
|
802
|
+
return response;
|
|
803
|
+
};
|
|
804
|
+
export const de_PutDataProtectionPolicyCommand = async (output, context) => {
|
|
805
|
+
if (output.statusCode >= 300) {
|
|
806
|
+
return de_CommandError(output, context);
|
|
1561
807
|
}
|
|
808
|
+
await collectBody(output.body, context);
|
|
809
|
+
const response = {
|
|
810
|
+
$metadata: deserializeMetadata(output),
|
|
811
|
+
};
|
|
812
|
+
return response;
|
|
1562
813
|
};
|
|
1563
|
-
export const
|
|
814
|
+
export const de_RemovePermissionCommand = async (output, context) => {
|
|
815
|
+
if (output.statusCode >= 300) {
|
|
816
|
+
return de_CommandError(output, context);
|
|
817
|
+
}
|
|
818
|
+
await collectBody(output.body, context);
|
|
819
|
+
const response = {
|
|
820
|
+
$metadata: deserializeMetadata(output),
|
|
821
|
+
};
|
|
822
|
+
return response;
|
|
823
|
+
};
|
|
824
|
+
export const de_SetEndpointAttributesCommand = async (output, context) => {
|
|
825
|
+
if (output.statusCode >= 300) {
|
|
826
|
+
return de_CommandError(output, context);
|
|
827
|
+
}
|
|
828
|
+
await collectBody(output.body, context);
|
|
829
|
+
const response = {
|
|
830
|
+
$metadata: deserializeMetadata(output),
|
|
831
|
+
};
|
|
832
|
+
return response;
|
|
833
|
+
};
|
|
834
|
+
export const de_SetPlatformApplicationAttributesCommand = async (output, context) => {
|
|
1564
835
|
if (output.statusCode >= 300) {
|
|
1565
|
-
return
|
|
836
|
+
return de_CommandError(output, context);
|
|
837
|
+
}
|
|
838
|
+
await collectBody(output.body, context);
|
|
839
|
+
const response = {
|
|
840
|
+
$metadata: deserializeMetadata(output),
|
|
841
|
+
};
|
|
842
|
+
return response;
|
|
843
|
+
};
|
|
844
|
+
export const de_SetSMSAttributesCommand = async (output, context) => {
|
|
845
|
+
if (output.statusCode >= 300) {
|
|
846
|
+
return de_CommandError(output, context);
|
|
1566
847
|
}
|
|
1567
848
|
const data = await parseBody(output.body, context);
|
|
1568
849
|
let contents = {};
|
|
1569
|
-
contents =
|
|
850
|
+
contents = de_SetSMSAttributesResponse(data.SetSMSAttributesResult, context);
|
|
1570
851
|
const response = {
|
|
1571
852
|
$metadata: deserializeMetadata(output),
|
|
1572
853
|
...contents,
|
|
1573
854
|
};
|
|
1574
855
|
return response;
|
|
1575
856
|
};
|
|
1576
|
-
const
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
857
|
+
export const de_SetSubscriptionAttributesCommand = async (output, context) => {
|
|
858
|
+
if (output.statusCode >= 300) {
|
|
859
|
+
return de_CommandError(output, context);
|
|
860
|
+
}
|
|
861
|
+
await collectBody(output.body, context);
|
|
862
|
+
const response = {
|
|
863
|
+
$metadata: deserializeMetadata(output),
|
|
1580
864
|
};
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
case "InternalError":
|
|
1587
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1588
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1589
|
-
case "InvalidParameter":
|
|
1590
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1591
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1592
|
-
case "Throttled":
|
|
1593
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1594
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1595
|
-
default:
|
|
1596
|
-
const parsedBody = parsedOutput.body;
|
|
1597
|
-
return throwDefaultError({
|
|
1598
|
-
output,
|
|
1599
|
-
parsedBody: parsedBody.Error,
|
|
1600
|
-
errorCode,
|
|
1601
|
-
});
|
|
865
|
+
return response;
|
|
866
|
+
};
|
|
867
|
+
export const de_SetTopicAttributesCommand = async (output, context) => {
|
|
868
|
+
if (output.statusCode >= 300) {
|
|
869
|
+
return de_CommandError(output, context);
|
|
1602
870
|
}
|
|
871
|
+
await collectBody(output.body, context);
|
|
872
|
+
const response = {
|
|
873
|
+
$metadata: deserializeMetadata(output),
|
|
874
|
+
};
|
|
875
|
+
return response;
|
|
1603
876
|
};
|
|
1604
|
-
export const
|
|
877
|
+
export const de_SubscribeCommand = async (output, context) => {
|
|
1605
878
|
if (output.statusCode >= 300) {
|
|
1606
|
-
return
|
|
879
|
+
return de_CommandError(output, context);
|
|
1607
880
|
}
|
|
1608
881
|
const data = await parseBody(output.body, context);
|
|
1609
882
|
let contents = {};
|
|
1610
|
-
contents =
|
|
883
|
+
contents = de_SubscribeResponse(data.SubscribeResult, context);
|
|
884
|
+
const response = {
|
|
885
|
+
$metadata: deserializeMetadata(output),
|
|
886
|
+
...contents,
|
|
887
|
+
};
|
|
888
|
+
return response;
|
|
889
|
+
};
|
|
890
|
+
export const de_TagResourceCommand = async (output, context) => {
|
|
891
|
+
if (output.statusCode >= 300) {
|
|
892
|
+
return de_CommandError(output, context);
|
|
893
|
+
}
|
|
894
|
+
const data = await parseBody(output.body, context);
|
|
895
|
+
let contents = {};
|
|
896
|
+
contents = de_TagResourceResponse(data.TagResourceResult, context);
|
|
897
|
+
const response = {
|
|
898
|
+
$metadata: deserializeMetadata(output),
|
|
899
|
+
...contents,
|
|
900
|
+
};
|
|
901
|
+
return response;
|
|
902
|
+
};
|
|
903
|
+
export const de_UnsubscribeCommand = async (output, context) => {
|
|
904
|
+
if (output.statusCode >= 300) {
|
|
905
|
+
return de_CommandError(output, context);
|
|
906
|
+
}
|
|
907
|
+
await collectBody(output.body, context);
|
|
908
|
+
const response = {
|
|
909
|
+
$metadata: deserializeMetadata(output),
|
|
910
|
+
};
|
|
911
|
+
return response;
|
|
912
|
+
};
|
|
913
|
+
export const de_UntagResourceCommand = async (output, context) => {
|
|
914
|
+
if (output.statusCode >= 300) {
|
|
915
|
+
return de_CommandError(output, context);
|
|
916
|
+
}
|
|
917
|
+
const data = await parseBody(output.body, context);
|
|
918
|
+
let contents = {};
|
|
919
|
+
contents = de_UntagResourceResponse(data.UntagResourceResult, context);
|
|
920
|
+
const response = {
|
|
921
|
+
$metadata: deserializeMetadata(output),
|
|
922
|
+
...contents,
|
|
923
|
+
};
|
|
924
|
+
return response;
|
|
925
|
+
};
|
|
926
|
+
export const de_VerifySMSSandboxPhoneNumberCommand = async (output, context) => {
|
|
927
|
+
if (output.statusCode >= 300) {
|
|
928
|
+
return de_CommandError(output, context);
|
|
929
|
+
}
|
|
930
|
+
const data = await parseBody(output.body, context);
|
|
931
|
+
let contents = {};
|
|
932
|
+
contents = de_VerifySMSSandboxPhoneNumberResult(data.VerifySMSSandboxPhoneNumberResult, context);
|
|
1611
933
|
const response = {
|
|
1612
934
|
$metadata: deserializeMetadata(output),
|
|
1613
935
|
...contents,
|
|
1614
936
|
};
|
|
1615
937
|
return response;
|
|
1616
938
|
};
|
|
1617
|
-
const
|
|
939
|
+
const de_CommandError = async (output, context) => {
|
|
1618
940
|
const parsedOutput = {
|
|
1619
941
|
...output,
|
|
1620
942
|
body: await parseErrorBody(output.body, context),
|
|
@@ -1624,18 +946,63 @@ const de_PublishCommandError = async (output, context) => {
|
|
|
1624
946
|
case "AuthorizationError":
|
|
1625
947
|
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1626
948
|
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1627
|
-
case "EndpointDisabled":
|
|
1628
|
-
case "com.amazonaws.sns#EndpointDisabledException":
|
|
1629
|
-
throw await de_EndpointDisabledExceptionRes(parsedOutput, context);
|
|
1630
949
|
case "InternalError":
|
|
1631
950
|
case "com.amazonaws.sns#InternalErrorException":
|
|
1632
951
|
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1633
952
|
case "InvalidParameter":
|
|
1634
953
|
case "com.amazonaws.sns#InvalidParameterException":
|
|
1635
954
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
955
|
+
case "NotFound":
|
|
956
|
+
case "com.amazonaws.sns#NotFoundException":
|
|
957
|
+
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
958
|
+
case "Throttled":
|
|
959
|
+
case "com.amazonaws.sns#ThrottledException":
|
|
960
|
+
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
961
|
+
case "FilterPolicyLimitExceeded":
|
|
962
|
+
case "com.amazonaws.sns#FilterPolicyLimitExceededException":
|
|
963
|
+
throw await de_FilterPolicyLimitExceededExceptionRes(parsedOutput, context);
|
|
964
|
+
case "ReplayLimitExceeded":
|
|
965
|
+
case "com.amazonaws.sns#ReplayLimitExceededException":
|
|
966
|
+
throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context);
|
|
967
|
+
case "SubscriptionLimitExceeded":
|
|
968
|
+
case "com.amazonaws.sns#SubscriptionLimitExceededException":
|
|
969
|
+
throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context);
|
|
970
|
+
case "OptedOut":
|
|
971
|
+
case "com.amazonaws.sns#OptedOutException":
|
|
972
|
+
throw await de_OptedOutExceptionRes(parsedOutput, context);
|
|
973
|
+
case "UserError":
|
|
974
|
+
case "com.amazonaws.sns#UserErrorException":
|
|
975
|
+
throw await de_UserErrorExceptionRes(parsedOutput, context);
|
|
976
|
+
case "ConcurrentAccess":
|
|
977
|
+
case "com.amazonaws.sns#ConcurrentAccessException":
|
|
978
|
+
throw await de_ConcurrentAccessExceptionRes(parsedOutput, context);
|
|
1636
979
|
case "InvalidSecurity":
|
|
1637
980
|
case "com.amazonaws.sns#InvalidSecurityException":
|
|
1638
981
|
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
982
|
+
case "StaleTag":
|
|
983
|
+
case "com.amazonaws.sns#StaleTagException":
|
|
984
|
+
throw await de_StaleTagExceptionRes(parsedOutput, context);
|
|
985
|
+
case "TagLimitExceeded":
|
|
986
|
+
case "com.amazonaws.sns#TagLimitExceededException":
|
|
987
|
+
throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
|
|
988
|
+
case "TagPolicy":
|
|
989
|
+
case "com.amazonaws.sns#TagPolicyException":
|
|
990
|
+
throw await de_TagPolicyExceptionRes(parsedOutput, context);
|
|
991
|
+
case "TopicLimitExceeded":
|
|
992
|
+
case "com.amazonaws.sns#TopicLimitExceededException":
|
|
993
|
+
throw await de_TopicLimitExceededExceptionRes(parsedOutput, context);
|
|
994
|
+
case "ResourceNotFound":
|
|
995
|
+
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
996
|
+
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
997
|
+
case "InvalidState":
|
|
998
|
+
case "com.amazonaws.sns#InvalidStateException":
|
|
999
|
+
throw await de_InvalidStateExceptionRes(parsedOutput, context);
|
|
1000
|
+
case "ValidationException":
|
|
1001
|
+
case "com.amazonaws.sns#ValidationException":
|
|
1002
|
+
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1003
|
+
case "EndpointDisabled":
|
|
1004
|
+
case "com.amazonaws.sns#EndpointDisabledException":
|
|
1005
|
+
throw await de_EndpointDisabledExceptionRes(parsedOutput, context);
|
|
1639
1006
|
case "KMSAccessDenied":
|
|
1640
1007
|
case "com.amazonaws.sns#KMSAccessDeniedException":
|
|
1641
1008
|
throw await de_KMSAccessDeniedExceptionRes(parsedOutput, context);
|
|
@@ -1654,50 +1021,12 @@ const de_PublishCommandError = async (output, context) => {
|
|
|
1654
1021
|
case "KMSThrottling":
|
|
1655
1022
|
case "com.amazonaws.sns#KMSThrottlingException":
|
|
1656
1023
|
throw await de_KMSThrottlingExceptionRes(parsedOutput, context);
|
|
1657
|
-
case "NotFound":
|
|
1658
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1659
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1660
1024
|
case "ParameterValueInvalid":
|
|
1661
1025
|
case "com.amazonaws.sns#InvalidParameterValueException":
|
|
1662
1026
|
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1663
1027
|
case "PlatformApplicationDisabled":
|
|
1664
1028
|
case "com.amazonaws.sns#PlatformApplicationDisabledException":
|
|
1665
1029
|
throw await de_PlatformApplicationDisabledExceptionRes(parsedOutput, context);
|
|
1666
|
-
case "ValidationException":
|
|
1667
|
-
case "com.amazonaws.sns#ValidationException":
|
|
1668
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1669
|
-
default:
|
|
1670
|
-
const parsedBody = parsedOutput.body;
|
|
1671
|
-
return throwDefaultError({
|
|
1672
|
-
output,
|
|
1673
|
-
parsedBody: parsedBody.Error,
|
|
1674
|
-
errorCode,
|
|
1675
|
-
});
|
|
1676
|
-
}
|
|
1677
|
-
};
|
|
1678
|
-
export const de_PublishBatchCommand = async (output, context) => {
|
|
1679
|
-
if (output.statusCode >= 300) {
|
|
1680
|
-
return de_PublishBatchCommandError(output, context);
|
|
1681
|
-
}
|
|
1682
|
-
const data = await parseBody(output.body, context);
|
|
1683
|
-
let contents = {};
|
|
1684
|
-
contents = de_PublishBatchResponse(data.PublishBatchResult, context);
|
|
1685
|
-
const response = {
|
|
1686
|
-
$metadata: deserializeMetadata(output),
|
|
1687
|
-
...contents,
|
|
1688
|
-
};
|
|
1689
|
-
return response;
|
|
1690
|
-
};
|
|
1691
|
-
const de_PublishBatchCommandError = async (output, context) => {
|
|
1692
|
-
const parsedOutput = {
|
|
1693
|
-
...output,
|
|
1694
|
-
body: await parseErrorBody(output.body, context),
|
|
1695
|
-
};
|
|
1696
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1697
|
-
switch (errorCode) {
|
|
1698
|
-
case "AuthorizationError":
|
|
1699
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1700
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1701
1030
|
case "BatchEntryIdsNotDistinct":
|
|
1702
1031
|
case "com.amazonaws.sns#BatchEntryIdsNotDistinctException":
|
|
1703
1032
|
throw await de_BatchEntryIdsNotDistinctExceptionRes(parsedOutput, context);
|
|
@@ -1707,573 +1036,12 @@ const de_PublishBatchCommandError = async (output, context) => {
|
|
|
1707
1036
|
case "EmptyBatchRequest":
|
|
1708
1037
|
case "com.amazonaws.sns#EmptyBatchRequestException":
|
|
1709
1038
|
throw await de_EmptyBatchRequestExceptionRes(parsedOutput, context);
|
|
1710
|
-
case "EndpointDisabled":
|
|
1711
|
-
case "com.amazonaws.sns#EndpointDisabledException":
|
|
1712
|
-
throw await de_EndpointDisabledExceptionRes(parsedOutput, context);
|
|
1713
|
-
case "InternalError":
|
|
1714
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1715
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1716
1039
|
case "InvalidBatchEntryId":
|
|
1717
1040
|
case "com.amazonaws.sns#InvalidBatchEntryIdException":
|
|
1718
1041
|
throw await de_InvalidBatchEntryIdExceptionRes(parsedOutput, context);
|
|
1719
|
-
case "InvalidParameter":
|
|
1720
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1721
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1722
|
-
case "InvalidSecurity":
|
|
1723
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
1724
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
1725
|
-
case "KMSAccessDenied":
|
|
1726
|
-
case "com.amazonaws.sns#KMSAccessDeniedException":
|
|
1727
|
-
throw await de_KMSAccessDeniedExceptionRes(parsedOutput, context);
|
|
1728
|
-
case "KMSDisabled":
|
|
1729
|
-
case "com.amazonaws.sns#KMSDisabledException":
|
|
1730
|
-
throw await de_KMSDisabledExceptionRes(parsedOutput, context);
|
|
1731
|
-
case "KMSInvalidState":
|
|
1732
|
-
case "com.amazonaws.sns#KMSInvalidStateException":
|
|
1733
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1734
|
-
case "KMSNotFound":
|
|
1735
|
-
case "com.amazonaws.sns#KMSNotFoundException":
|
|
1736
|
-
throw await de_KMSNotFoundExceptionRes(parsedOutput, context);
|
|
1737
|
-
case "KMSOptInRequired":
|
|
1738
|
-
case "com.amazonaws.sns#KMSOptInRequired":
|
|
1739
|
-
throw await de_KMSOptInRequiredRes(parsedOutput, context);
|
|
1740
|
-
case "KMSThrottling":
|
|
1741
|
-
case "com.amazonaws.sns#KMSThrottlingException":
|
|
1742
|
-
throw await de_KMSThrottlingExceptionRes(parsedOutput, context);
|
|
1743
|
-
case "NotFound":
|
|
1744
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1745
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1746
|
-
case "ParameterValueInvalid":
|
|
1747
|
-
case "com.amazonaws.sns#InvalidParameterValueException":
|
|
1748
|
-
throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
|
|
1749
|
-
case "PlatformApplicationDisabled":
|
|
1750
|
-
case "com.amazonaws.sns#PlatformApplicationDisabledException":
|
|
1751
|
-
throw await de_PlatformApplicationDisabledExceptionRes(parsedOutput, context);
|
|
1752
1042
|
case "TooManyEntriesInBatchRequest":
|
|
1753
1043
|
case "com.amazonaws.sns#TooManyEntriesInBatchRequestException":
|
|
1754
1044
|
throw await de_TooManyEntriesInBatchRequestExceptionRes(parsedOutput, context);
|
|
1755
|
-
case "ValidationException":
|
|
1756
|
-
case "com.amazonaws.sns#ValidationException":
|
|
1757
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1758
|
-
default:
|
|
1759
|
-
const parsedBody = parsedOutput.body;
|
|
1760
|
-
return throwDefaultError({
|
|
1761
|
-
output,
|
|
1762
|
-
parsedBody: parsedBody.Error,
|
|
1763
|
-
errorCode,
|
|
1764
|
-
});
|
|
1765
|
-
}
|
|
1766
|
-
};
|
|
1767
|
-
export const de_PutDataProtectionPolicyCommand = async (output, context) => {
|
|
1768
|
-
if (output.statusCode >= 300) {
|
|
1769
|
-
return de_PutDataProtectionPolicyCommandError(output, context);
|
|
1770
|
-
}
|
|
1771
|
-
await collectBody(output.body, context);
|
|
1772
|
-
const response = {
|
|
1773
|
-
$metadata: deserializeMetadata(output),
|
|
1774
|
-
};
|
|
1775
|
-
return response;
|
|
1776
|
-
};
|
|
1777
|
-
const de_PutDataProtectionPolicyCommandError = async (output, context) => {
|
|
1778
|
-
const parsedOutput = {
|
|
1779
|
-
...output,
|
|
1780
|
-
body: await parseErrorBody(output.body, context),
|
|
1781
|
-
};
|
|
1782
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1783
|
-
switch (errorCode) {
|
|
1784
|
-
case "AuthorizationError":
|
|
1785
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1786
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1787
|
-
case "InternalError":
|
|
1788
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1789
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1790
|
-
case "InvalidParameter":
|
|
1791
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1792
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1793
|
-
case "InvalidSecurity":
|
|
1794
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
1795
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
1796
|
-
case "NotFound":
|
|
1797
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1798
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1799
|
-
default:
|
|
1800
|
-
const parsedBody = parsedOutput.body;
|
|
1801
|
-
return throwDefaultError({
|
|
1802
|
-
output,
|
|
1803
|
-
parsedBody: parsedBody.Error,
|
|
1804
|
-
errorCode,
|
|
1805
|
-
});
|
|
1806
|
-
}
|
|
1807
|
-
};
|
|
1808
|
-
export const de_RemovePermissionCommand = async (output, context) => {
|
|
1809
|
-
if (output.statusCode >= 300) {
|
|
1810
|
-
return de_RemovePermissionCommandError(output, context);
|
|
1811
|
-
}
|
|
1812
|
-
await collectBody(output.body, context);
|
|
1813
|
-
const response = {
|
|
1814
|
-
$metadata: deserializeMetadata(output),
|
|
1815
|
-
};
|
|
1816
|
-
return response;
|
|
1817
|
-
};
|
|
1818
|
-
const de_RemovePermissionCommandError = async (output, context) => {
|
|
1819
|
-
const parsedOutput = {
|
|
1820
|
-
...output,
|
|
1821
|
-
body: await parseErrorBody(output.body, context),
|
|
1822
|
-
};
|
|
1823
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1824
|
-
switch (errorCode) {
|
|
1825
|
-
case "AuthorizationError":
|
|
1826
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1827
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1828
|
-
case "InternalError":
|
|
1829
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1830
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1831
|
-
case "InvalidParameter":
|
|
1832
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1833
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1834
|
-
case "NotFound":
|
|
1835
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1836
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1837
|
-
default:
|
|
1838
|
-
const parsedBody = parsedOutput.body;
|
|
1839
|
-
return throwDefaultError({
|
|
1840
|
-
output,
|
|
1841
|
-
parsedBody: parsedBody.Error,
|
|
1842
|
-
errorCode,
|
|
1843
|
-
});
|
|
1844
|
-
}
|
|
1845
|
-
};
|
|
1846
|
-
export const de_SetEndpointAttributesCommand = async (output, context) => {
|
|
1847
|
-
if (output.statusCode >= 300) {
|
|
1848
|
-
return de_SetEndpointAttributesCommandError(output, context);
|
|
1849
|
-
}
|
|
1850
|
-
await collectBody(output.body, context);
|
|
1851
|
-
const response = {
|
|
1852
|
-
$metadata: deserializeMetadata(output),
|
|
1853
|
-
};
|
|
1854
|
-
return response;
|
|
1855
|
-
};
|
|
1856
|
-
const de_SetEndpointAttributesCommandError = async (output, context) => {
|
|
1857
|
-
const parsedOutput = {
|
|
1858
|
-
...output,
|
|
1859
|
-
body: await parseErrorBody(output.body, context),
|
|
1860
|
-
};
|
|
1861
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1862
|
-
switch (errorCode) {
|
|
1863
|
-
case "AuthorizationError":
|
|
1864
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1865
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1866
|
-
case "InternalError":
|
|
1867
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1868
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1869
|
-
case "InvalidParameter":
|
|
1870
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1871
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1872
|
-
case "NotFound":
|
|
1873
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1874
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1875
|
-
default:
|
|
1876
|
-
const parsedBody = parsedOutput.body;
|
|
1877
|
-
return throwDefaultError({
|
|
1878
|
-
output,
|
|
1879
|
-
parsedBody: parsedBody.Error,
|
|
1880
|
-
errorCode,
|
|
1881
|
-
});
|
|
1882
|
-
}
|
|
1883
|
-
};
|
|
1884
|
-
export const de_SetPlatformApplicationAttributesCommand = async (output, context) => {
|
|
1885
|
-
if (output.statusCode >= 300) {
|
|
1886
|
-
return de_SetPlatformApplicationAttributesCommandError(output, context);
|
|
1887
|
-
}
|
|
1888
|
-
await collectBody(output.body, context);
|
|
1889
|
-
const response = {
|
|
1890
|
-
$metadata: deserializeMetadata(output),
|
|
1891
|
-
};
|
|
1892
|
-
return response;
|
|
1893
|
-
};
|
|
1894
|
-
const de_SetPlatformApplicationAttributesCommandError = async (output, context) => {
|
|
1895
|
-
const parsedOutput = {
|
|
1896
|
-
...output,
|
|
1897
|
-
body: await parseErrorBody(output.body, context),
|
|
1898
|
-
};
|
|
1899
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1900
|
-
switch (errorCode) {
|
|
1901
|
-
case "AuthorizationError":
|
|
1902
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1903
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1904
|
-
case "InternalError":
|
|
1905
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1906
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1907
|
-
case "InvalidParameter":
|
|
1908
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1909
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1910
|
-
case "NotFound":
|
|
1911
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1912
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1913
|
-
default:
|
|
1914
|
-
const parsedBody = parsedOutput.body;
|
|
1915
|
-
return throwDefaultError({
|
|
1916
|
-
output,
|
|
1917
|
-
parsedBody: parsedBody.Error,
|
|
1918
|
-
errorCode,
|
|
1919
|
-
});
|
|
1920
|
-
}
|
|
1921
|
-
};
|
|
1922
|
-
export const de_SetSMSAttributesCommand = async (output, context) => {
|
|
1923
|
-
if (output.statusCode >= 300) {
|
|
1924
|
-
return de_SetSMSAttributesCommandError(output, context);
|
|
1925
|
-
}
|
|
1926
|
-
const data = await parseBody(output.body, context);
|
|
1927
|
-
let contents = {};
|
|
1928
|
-
contents = de_SetSMSAttributesResponse(data.SetSMSAttributesResult, context);
|
|
1929
|
-
const response = {
|
|
1930
|
-
$metadata: deserializeMetadata(output),
|
|
1931
|
-
...contents,
|
|
1932
|
-
};
|
|
1933
|
-
return response;
|
|
1934
|
-
};
|
|
1935
|
-
const de_SetSMSAttributesCommandError = async (output, context) => {
|
|
1936
|
-
const parsedOutput = {
|
|
1937
|
-
...output,
|
|
1938
|
-
body: await parseErrorBody(output.body, context),
|
|
1939
|
-
};
|
|
1940
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1941
|
-
switch (errorCode) {
|
|
1942
|
-
case "AuthorizationError":
|
|
1943
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1944
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1945
|
-
case "InternalError":
|
|
1946
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1947
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1948
|
-
case "InvalidParameter":
|
|
1949
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1950
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1951
|
-
case "Throttled":
|
|
1952
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
1953
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
1954
|
-
default:
|
|
1955
|
-
const parsedBody = parsedOutput.body;
|
|
1956
|
-
return throwDefaultError({
|
|
1957
|
-
output,
|
|
1958
|
-
parsedBody: parsedBody.Error,
|
|
1959
|
-
errorCode,
|
|
1960
|
-
});
|
|
1961
|
-
}
|
|
1962
|
-
};
|
|
1963
|
-
export const de_SetSubscriptionAttributesCommand = async (output, context) => {
|
|
1964
|
-
if (output.statusCode >= 300) {
|
|
1965
|
-
return de_SetSubscriptionAttributesCommandError(output, context);
|
|
1966
|
-
}
|
|
1967
|
-
await collectBody(output.body, context);
|
|
1968
|
-
const response = {
|
|
1969
|
-
$metadata: deserializeMetadata(output),
|
|
1970
|
-
};
|
|
1971
|
-
return response;
|
|
1972
|
-
};
|
|
1973
|
-
const de_SetSubscriptionAttributesCommandError = async (output, context) => {
|
|
1974
|
-
const parsedOutput = {
|
|
1975
|
-
...output,
|
|
1976
|
-
body: await parseErrorBody(output.body, context),
|
|
1977
|
-
};
|
|
1978
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
1979
|
-
switch (errorCode) {
|
|
1980
|
-
case "AuthorizationError":
|
|
1981
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
1982
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
1983
|
-
case "FilterPolicyLimitExceeded":
|
|
1984
|
-
case "com.amazonaws.sns#FilterPolicyLimitExceededException":
|
|
1985
|
-
throw await de_FilterPolicyLimitExceededExceptionRes(parsedOutput, context);
|
|
1986
|
-
case "InternalError":
|
|
1987
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
1988
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
1989
|
-
case "InvalidParameter":
|
|
1990
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
1991
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
1992
|
-
case "NotFound":
|
|
1993
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
1994
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1995
|
-
case "ReplayLimitExceeded":
|
|
1996
|
-
case "com.amazonaws.sns#ReplayLimitExceededException":
|
|
1997
|
-
throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context);
|
|
1998
|
-
default:
|
|
1999
|
-
const parsedBody = parsedOutput.body;
|
|
2000
|
-
return throwDefaultError({
|
|
2001
|
-
output,
|
|
2002
|
-
parsedBody: parsedBody.Error,
|
|
2003
|
-
errorCode,
|
|
2004
|
-
});
|
|
2005
|
-
}
|
|
2006
|
-
};
|
|
2007
|
-
export const de_SetTopicAttributesCommand = async (output, context) => {
|
|
2008
|
-
if (output.statusCode >= 300) {
|
|
2009
|
-
return de_SetTopicAttributesCommandError(output, context);
|
|
2010
|
-
}
|
|
2011
|
-
await collectBody(output.body, context);
|
|
2012
|
-
const response = {
|
|
2013
|
-
$metadata: deserializeMetadata(output),
|
|
2014
|
-
};
|
|
2015
|
-
return response;
|
|
2016
|
-
};
|
|
2017
|
-
const de_SetTopicAttributesCommandError = async (output, context) => {
|
|
2018
|
-
const parsedOutput = {
|
|
2019
|
-
...output,
|
|
2020
|
-
body: await parseErrorBody(output.body, context),
|
|
2021
|
-
};
|
|
2022
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
2023
|
-
switch (errorCode) {
|
|
2024
|
-
case "AuthorizationError":
|
|
2025
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
2026
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
2027
|
-
case "InternalError":
|
|
2028
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
2029
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
2030
|
-
case "InvalidParameter":
|
|
2031
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
2032
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2033
|
-
case "InvalidSecurity":
|
|
2034
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
2035
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
2036
|
-
case "NotFound":
|
|
2037
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
2038
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2039
|
-
default:
|
|
2040
|
-
const parsedBody = parsedOutput.body;
|
|
2041
|
-
return throwDefaultError({
|
|
2042
|
-
output,
|
|
2043
|
-
parsedBody: parsedBody.Error,
|
|
2044
|
-
errorCode,
|
|
2045
|
-
});
|
|
2046
|
-
}
|
|
2047
|
-
};
|
|
2048
|
-
export const de_SubscribeCommand = async (output, context) => {
|
|
2049
|
-
if (output.statusCode >= 300) {
|
|
2050
|
-
return de_SubscribeCommandError(output, context);
|
|
2051
|
-
}
|
|
2052
|
-
const data = await parseBody(output.body, context);
|
|
2053
|
-
let contents = {};
|
|
2054
|
-
contents = de_SubscribeResponse(data.SubscribeResult, context);
|
|
2055
|
-
const response = {
|
|
2056
|
-
$metadata: deserializeMetadata(output),
|
|
2057
|
-
...contents,
|
|
2058
|
-
};
|
|
2059
|
-
return response;
|
|
2060
|
-
};
|
|
2061
|
-
const de_SubscribeCommandError = async (output, context) => {
|
|
2062
|
-
const parsedOutput = {
|
|
2063
|
-
...output,
|
|
2064
|
-
body: await parseErrorBody(output.body, context),
|
|
2065
|
-
};
|
|
2066
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
2067
|
-
switch (errorCode) {
|
|
2068
|
-
case "AuthorizationError":
|
|
2069
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
2070
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
2071
|
-
case "FilterPolicyLimitExceeded":
|
|
2072
|
-
case "com.amazonaws.sns#FilterPolicyLimitExceededException":
|
|
2073
|
-
throw await de_FilterPolicyLimitExceededExceptionRes(parsedOutput, context);
|
|
2074
|
-
case "InternalError":
|
|
2075
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
2076
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
2077
|
-
case "InvalidParameter":
|
|
2078
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
2079
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2080
|
-
case "InvalidSecurity":
|
|
2081
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
2082
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
2083
|
-
case "NotFound":
|
|
2084
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
2085
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2086
|
-
case "ReplayLimitExceeded":
|
|
2087
|
-
case "com.amazonaws.sns#ReplayLimitExceededException":
|
|
2088
|
-
throw await de_ReplayLimitExceededExceptionRes(parsedOutput, context);
|
|
2089
|
-
case "SubscriptionLimitExceeded":
|
|
2090
|
-
case "com.amazonaws.sns#SubscriptionLimitExceededException":
|
|
2091
|
-
throw await de_SubscriptionLimitExceededExceptionRes(parsedOutput, context);
|
|
2092
|
-
default:
|
|
2093
|
-
const parsedBody = parsedOutput.body;
|
|
2094
|
-
return throwDefaultError({
|
|
2095
|
-
output,
|
|
2096
|
-
parsedBody: parsedBody.Error,
|
|
2097
|
-
errorCode,
|
|
2098
|
-
});
|
|
2099
|
-
}
|
|
2100
|
-
};
|
|
2101
|
-
export const de_TagResourceCommand = async (output, context) => {
|
|
2102
|
-
if (output.statusCode >= 300) {
|
|
2103
|
-
return de_TagResourceCommandError(output, context);
|
|
2104
|
-
}
|
|
2105
|
-
const data = await parseBody(output.body, context);
|
|
2106
|
-
let contents = {};
|
|
2107
|
-
contents = de_TagResourceResponse(data.TagResourceResult, context);
|
|
2108
|
-
const response = {
|
|
2109
|
-
$metadata: deserializeMetadata(output),
|
|
2110
|
-
...contents,
|
|
2111
|
-
};
|
|
2112
|
-
return response;
|
|
2113
|
-
};
|
|
2114
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
2115
|
-
const parsedOutput = {
|
|
2116
|
-
...output,
|
|
2117
|
-
body: await parseErrorBody(output.body, context),
|
|
2118
|
-
};
|
|
2119
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
2120
|
-
switch (errorCode) {
|
|
2121
|
-
case "AuthorizationError":
|
|
2122
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
2123
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
2124
|
-
case "ConcurrentAccess":
|
|
2125
|
-
case "com.amazonaws.sns#ConcurrentAccessException":
|
|
2126
|
-
throw await de_ConcurrentAccessExceptionRes(parsedOutput, context);
|
|
2127
|
-
case "InvalidParameter":
|
|
2128
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
2129
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2130
|
-
case "ResourceNotFound":
|
|
2131
|
-
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
2132
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2133
|
-
case "StaleTag":
|
|
2134
|
-
case "com.amazonaws.sns#StaleTagException":
|
|
2135
|
-
throw await de_StaleTagExceptionRes(parsedOutput, context);
|
|
2136
|
-
case "TagLimitExceeded":
|
|
2137
|
-
case "com.amazonaws.sns#TagLimitExceededException":
|
|
2138
|
-
throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
|
|
2139
|
-
case "TagPolicy":
|
|
2140
|
-
case "com.amazonaws.sns#TagPolicyException":
|
|
2141
|
-
throw await de_TagPolicyExceptionRes(parsedOutput, context);
|
|
2142
|
-
default:
|
|
2143
|
-
const parsedBody = parsedOutput.body;
|
|
2144
|
-
return throwDefaultError({
|
|
2145
|
-
output,
|
|
2146
|
-
parsedBody: parsedBody.Error,
|
|
2147
|
-
errorCode,
|
|
2148
|
-
});
|
|
2149
|
-
}
|
|
2150
|
-
};
|
|
2151
|
-
export const de_UnsubscribeCommand = async (output, context) => {
|
|
2152
|
-
if (output.statusCode >= 300) {
|
|
2153
|
-
return de_UnsubscribeCommandError(output, context);
|
|
2154
|
-
}
|
|
2155
|
-
await collectBody(output.body, context);
|
|
2156
|
-
const response = {
|
|
2157
|
-
$metadata: deserializeMetadata(output),
|
|
2158
|
-
};
|
|
2159
|
-
return response;
|
|
2160
|
-
};
|
|
2161
|
-
const de_UnsubscribeCommandError = async (output, context) => {
|
|
2162
|
-
const parsedOutput = {
|
|
2163
|
-
...output,
|
|
2164
|
-
body: await parseErrorBody(output.body, context),
|
|
2165
|
-
};
|
|
2166
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
2167
|
-
switch (errorCode) {
|
|
2168
|
-
case "AuthorizationError":
|
|
2169
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
2170
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
2171
|
-
case "InternalError":
|
|
2172
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
2173
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
2174
|
-
case "InvalidParameter":
|
|
2175
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
2176
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2177
|
-
case "InvalidSecurity":
|
|
2178
|
-
case "com.amazonaws.sns#InvalidSecurityException":
|
|
2179
|
-
throw await de_InvalidSecurityExceptionRes(parsedOutput, context);
|
|
2180
|
-
case "NotFound":
|
|
2181
|
-
case "com.amazonaws.sns#NotFoundException":
|
|
2182
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2183
|
-
default:
|
|
2184
|
-
const parsedBody = parsedOutput.body;
|
|
2185
|
-
return throwDefaultError({
|
|
2186
|
-
output,
|
|
2187
|
-
parsedBody: parsedBody.Error,
|
|
2188
|
-
errorCode,
|
|
2189
|
-
});
|
|
2190
|
-
}
|
|
2191
|
-
};
|
|
2192
|
-
export const de_UntagResourceCommand = async (output, context) => {
|
|
2193
|
-
if (output.statusCode >= 300) {
|
|
2194
|
-
return de_UntagResourceCommandError(output, context);
|
|
2195
|
-
}
|
|
2196
|
-
const data = await parseBody(output.body, context);
|
|
2197
|
-
let contents = {};
|
|
2198
|
-
contents = de_UntagResourceResponse(data.UntagResourceResult, context);
|
|
2199
|
-
const response = {
|
|
2200
|
-
$metadata: deserializeMetadata(output),
|
|
2201
|
-
...contents,
|
|
2202
|
-
};
|
|
2203
|
-
return response;
|
|
2204
|
-
};
|
|
2205
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
2206
|
-
const parsedOutput = {
|
|
2207
|
-
...output,
|
|
2208
|
-
body: await parseErrorBody(output.body, context),
|
|
2209
|
-
};
|
|
2210
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
2211
|
-
switch (errorCode) {
|
|
2212
|
-
case "AuthorizationError":
|
|
2213
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
2214
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
2215
|
-
case "ConcurrentAccess":
|
|
2216
|
-
case "com.amazonaws.sns#ConcurrentAccessException":
|
|
2217
|
-
throw await de_ConcurrentAccessExceptionRes(parsedOutput, context);
|
|
2218
|
-
case "InvalidParameter":
|
|
2219
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
2220
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2221
|
-
case "ResourceNotFound":
|
|
2222
|
-
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
2223
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2224
|
-
case "StaleTag":
|
|
2225
|
-
case "com.amazonaws.sns#StaleTagException":
|
|
2226
|
-
throw await de_StaleTagExceptionRes(parsedOutput, context);
|
|
2227
|
-
case "TagLimitExceeded":
|
|
2228
|
-
case "com.amazonaws.sns#TagLimitExceededException":
|
|
2229
|
-
throw await de_TagLimitExceededExceptionRes(parsedOutput, context);
|
|
2230
|
-
case "TagPolicy":
|
|
2231
|
-
case "com.amazonaws.sns#TagPolicyException":
|
|
2232
|
-
throw await de_TagPolicyExceptionRes(parsedOutput, context);
|
|
2233
|
-
default:
|
|
2234
|
-
const parsedBody = parsedOutput.body;
|
|
2235
|
-
return throwDefaultError({
|
|
2236
|
-
output,
|
|
2237
|
-
parsedBody: parsedBody.Error,
|
|
2238
|
-
errorCode,
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
};
|
|
2242
|
-
export const de_VerifySMSSandboxPhoneNumberCommand = async (output, context) => {
|
|
2243
|
-
if (output.statusCode >= 300) {
|
|
2244
|
-
return de_VerifySMSSandboxPhoneNumberCommandError(output, context);
|
|
2245
|
-
}
|
|
2246
|
-
const data = await parseBody(output.body, context);
|
|
2247
|
-
let contents = {};
|
|
2248
|
-
contents = de_VerifySMSSandboxPhoneNumberResult(data.VerifySMSSandboxPhoneNumberResult, context);
|
|
2249
|
-
const response = {
|
|
2250
|
-
$metadata: deserializeMetadata(output),
|
|
2251
|
-
...contents,
|
|
2252
|
-
};
|
|
2253
|
-
return response;
|
|
2254
|
-
};
|
|
2255
|
-
const de_VerifySMSSandboxPhoneNumberCommandError = async (output, context) => {
|
|
2256
|
-
const parsedOutput = {
|
|
2257
|
-
...output,
|
|
2258
|
-
body: await parseErrorBody(output.body, context),
|
|
2259
|
-
};
|
|
2260
|
-
const errorCode = loadQueryErrorCode(output, parsedOutput.body);
|
|
2261
|
-
switch (errorCode) {
|
|
2262
|
-
case "AuthorizationError":
|
|
2263
|
-
case "com.amazonaws.sns#AuthorizationErrorException":
|
|
2264
|
-
throw await de_AuthorizationErrorExceptionRes(parsedOutput, context);
|
|
2265
|
-
case "InternalError":
|
|
2266
|
-
case "com.amazonaws.sns#InternalErrorException":
|
|
2267
|
-
throw await de_InternalErrorExceptionRes(parsedOutput, context);
|
|
2268
|
-
case "InvalidParameter":
|
|
2269
|
-
case "com.amazonaws.sns#InvalidParameterException":
|
|
2270
|
-
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
2271
|
-
case "ResourceNotFound":
|
|
2272
|
-
case "com.amazonaws.sns#ResourceNotFoundException":
|
|
2273
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
2274
|
-
case "Throttled":
|
|
2275
|
-
case "com.amazonaws.sns#ThrottledException":
|
|
2276
|
-
throw await de_ThrottledExceptionRes(parsedOutput, context);
|
|
2277
1045
|
case "VerificationException":
|
|
2278
1046
|
case "com.amazonaws.sns#VerificationException":
|
|
2279
1047
|
throw await de_VerificationExceptionRes(parsedOutput, context);
|