@aws-sdk/client-oam 3.503.1 → 3.507.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 CHANGED
@@ -556,7 +556,7 @@ var se_UpdateLinkCommand = /* @__PURE__ */ __name(async (input, context) => {
556
556
  }, "se_UpdateLinkCommand");
557
557
  var de_CreateLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
558
558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
559
- return de_CreateLinkCommandError(output, context);
559
+ return de_CommandError(output, context);
560
560
  }
561
561
  const contents = (0, import_smithy_client.map)({
562
562
  $metadata: deserializeMetadata(output)
@@ -574,40 +574,9 @@ var de_CreateLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
574
574
  Object.assign(contents, doc);
575
575
  return contents;
576
576
  }, "de_CreateLinkCommand");
577
- var de_CreateLinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
578
- const parsedOutput = {
579
- ...output,
580
- body: await parseErrorBody(output.body, context)
581
- };
582
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
583
- switch (errorCode) {
584
- case "ConflictException":
585
- case "com.amazonaws.oam#ConflictException":
586
- throw await de_ConflictExceptionRes(parsedOutput, context);
587
- case "InternalServiceFault":
588
- case "com.amazonaws.oam#InternalServiceFault":
589
- throw await de_InternalServiceFaultRes(parsedOutput, context);
590
- case "InvalidParameterException":
591
- case "com.amazonaws.oam#InvalidParameterException":
592
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
593
- case "MissingRequiredParameterException":
594
- case "com.amazonaws.oam#MissingRequiredParameterException":
595
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
596
- case "ServiceQuotaExceededException":
597
- case "com.amazonaws.oam#ServiceQuotaExceededException":
598
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
599
- default:
600
- const parsedBody = parsedOutput.body;
601
- return throwDefaultError({
602
- output,
603
- parsedBody,
604
- errorCode
605
- });
606
- }
607
- }, "de_CreateLinkCommandError");
608
577
  var de_CreateSinkCommand = /* @__PURE__ */ __name(async (output, context) => {
609
578
  if (output.statusCode !== 200 && output.statusCode >= 300) {
610
- return de_CreateSinkCommandError(output, context);
579
+ return de_CommandError(output, context);
611
580
  }
612
581
  const contents = (0, import_smithy_client.map)({
613
582
  $metadata: deserializeMetadata(output)
@@ -622,40 +591,9 @@ var de_CreateSinkCommand = /* @__PURE__ */ __name(async (output, context) => {
622
591
  Object.assign(contents, doc);
623
592
  return contents;
624
593
  }, "de_CreateSinkCommand");
625
- var de_CreateSinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
626
- const parsedOutput = {
627
- ...output,
628
- body: await parseErrorBody(output.body, context)
629
- };
630
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
631
- switch (errorCode) {
632
- case "ConflictException":
633
- case "com.amazonaws.oam#ConflictException":
634
- throw await de_ConflictExceptionRes(parsedOutput, context);
635
- case "InternalServiceFault":
636
- case "com.amazonaws.oam#InternalServiceFault":
637
- throw await de_InternalServiceFaultRes(parsedOutput, context);
638
- case "InvalidParameterException":
639
- case "com.amazonaws.oam#InvalidParameterException":
640
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
641
- case "MissingRequiredParameterException":
642
- case "com.amazonaws.oam#MissingRequiredParameterException":
643
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
644
- case "ServiceQuotaExceededException":
645
- case "com.amazonaws.oam#ServiceQuotaExceededException":
646
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
647
- default:
648
- const parsedBody = parsedOutput.body;
649
- return throwDefaultError({
650
- output,
651
- parsedBody,
652
- errorCode
653
- });
654
- }
655
- }, "de_CreateSinkCommandError");
656
594
  var de_DeleteLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
657
595
  if (output.statusCode !== 200 && output.statusCode >= 300) {
658
- return de_DeleteLinkCommandError(output, context);
596
+ return de_CommandError(output, context);
659
597
  }
660
598
  const contents = (0, import_smithy_client.map)({
661
599
  $metadata: deserializeMetadata(output)
@@ -663,37 +601,9 @@ var de_DeleteLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
663
601
  await (0, import_smithy_client.collectBody)(output.body, context);
664
602
  return contents;
665
603
  }, "de_DeleteLinkCommand");
666
- var de_DeleteLinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
667
- const parsedOutput = {
668
- ...output,
669
- body: await parseErrorBody(output.body, context)
670
- };
671
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
672
- switch (errorCode) {
673
- case "InternalServiceFault":
674
- case "com.amazonaws.oam#InternalServiceFault":
675
- throw await de_InternalServiceFaultRes(parsedOutput, context);
676
- case "InvalidParameterException":
677
- case "com.amazonaws.oam#InvalidParameterException":
678
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
679
- case "MissingRequiredParameterException":
680
- case "com.amazonaws.oam#MissingRequiredParameterException":
681
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
682
- case "ResourceNotFoundException":
683
- case "com.amazonaws.oam#ResourceNotFoundException":
684
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
685
- default:
686
- const parsedBody = parsedOutput.body;
687
- return throwDefaultError({
688
- output,
689
- parsedBody,
690
- errorCode
691
- });
692
- }
693
- }, "de_DeleteLinkCommandError");
694
604
  var de_DeleteSinkCommand = /* @__PURE__ */ __name(async (output, context) => {
695
605
  if (output.statusCode !== 200 && output.statusCode >= 300) {
696
- return de_DeleteSinkCommandError(output, context);
606
+ return de_CommandError(output, context);
697
607
  }
698
608
  const contents = (0, import_smithy_client.map)({
699
609
  $metadata: deserializeMetadata(output)
@@ -701,40 +611,9 @@ var de_DeleteSinkCommand = /* @__PURE__ */ __name(async (output, context) => {
701
611
  await (0, import_smithy_client.collectBody)(output.body, context);
702
612
  return contents;
703
613
  }, "de_DeleteSinkCommand");
704
- var de_DeleteSinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
705
- const parsedOutput = {
706
- ...output,
707
- body: await parseErrorBody(output.body, context)
708
- };
709
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
710
- switch (errorCode) {
711
- case "ConflictException":
712
- case "com.amazonaws.oam#ConflictException":
713
- throw await de_ConflictExceptionRes(parsedOutput, context);
714
- case "InternalServiceFault":
715
- case "com.amazonaws.oam#InternalServiceFault":
716
- throw await de_InternalServiceFaultRes(parsedOutput, context);
717
- case "InvalidParameterException":
718
- case "com.amazonaws.oam#InvalidParameterException":
719
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
720
- case "MissingRequiredParameterException":
721
- case "com.amazonaws.oam#MissingRequiredParameterException":
722
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
723
- case "ResourceNotFoundException":
724
- case "com.amazonaws.oam#ResourceNotFoundException":
725
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
726
- default:
727
- const parsedBody = parsedOutput.body;
728
- return throwDefaultError({
729
- output,
730
- parsedBody,
731
- errorCode
732
- });
733
- }
734
- }, "de_DeleteSinkCommandError");
735
614
  var de_GetLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
736
615
  if (output.statusCode !== 200 && output.statusCode >= 300) {
737
- return de_GetLinkCommandError(output, context);
616
+ return de_CommandError(output, context);
738
617
  }
739
618
  const contents = (0, import_smithy_client.map)({
740
619
  $metadata: deserializeMetadata(output)
@@ -752,37 +631,9 @@ var de_GetLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
752
631
  Object.assign(contents, doc);
753
632
  return contents;
754
633
  }, "de_GetLinkCommand");
755
- var de_GetLinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
756
- const parsedOutput = {
757
- ...output,
758
- body: await parseErrorBody(output.body, context)
759
- };
760
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
761
- switch (errorCode) {
762
- case "InternalServiceFault":
763
- case "com.amazonaws.oam#InternalServiceFault":
764
- throw await de_InternalServiceFaultRes(parsedOutput, context);
765
- case "InvalidParameterException":
766
- case "com.amazonaws.oam#InvalidParameterException":
767
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
768
- case "MissingRequiredParameterException":
769
- case "com.amazonaws.oam#MissingRequiredParameterException":
770
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
771
- case "ResourceNotFoundException":
772
- case "com.amazonaws.oam#ResourceNotFoundException":
773
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
774
- default:
775
- const parsedBody = parsedOutput.body;
776
- return throwDefaultError({
777
- output,
778
- parsedBody,
779
- errorCode
780
- });
781
- }
782
- }, "de_GetLinkCommandError");
783
634
  var de_GetSinkCommand = /* @__PURE__ */ __name(async (output, context) => {
784
635
  if (output.statusCode !== 200 && output.statusCode >= 300) {
785
- return de_GetSinkCommandError(output, context);
636
+ return de_CommandError(output, context);
786
637
  }
787
638
  const contents = (0, import_smithy_client.map)({
788
639
  $metadata: deserializeMetadata(output)
@@ -797,37 +648,9 @@ var de_GetSinkCommand = /* @__PURE__ */ __name(async (output, context) => {
797
648
  Object.assign(contents, doc);
798
649
  return contents;
799
650
  }, "de_GetSinkCommand");
800
- var de_GetSinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
801
- const parsedOutput = {
802
- ...output,
803
- body: await parseErrorBody(output.body, context)
804
- };
805
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
806
- switch (errorCode) {
807
- case "InternalServiceFault":
808
- case "com.amazonaws.oam#InternalServiceFault":
809
- throw await de_InternalServiceFaultRes(parsedOutput, context);
810
- case "InvalidParameterException":
811
- case "com.amazonaws.oam#InvalidParameterException":
812
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
813
- case "MissingRequiredParameterException":
814
- case "com.amazonaws.oam#MissingRequiredParameterException":
815
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
816
- case "ResourceNotFoundException":
817
- case "com.amazonaws.oam#ResourceNotFoundException":
818
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
819
- default:
820
- const parsedBody = parsedOutput.body;
821
- return throwDefaultError({
822
- output,
823
- parsedBody,
824
- errorCode
825
- });
826
- }
827
- }, "de_GetSinkCommandError");
828
651
  var de_GetSinkPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
829
652
  if (output.statusCode !== 200 && output.statusCode >= 300) {
830
- return de_GetSinkPolicyCommandError(output, context);
653
+ return de_CommandError(output, context);
831
654
  }
832
655
  const contents = (0, import_smithy_client.map)({
833
656
  $metadata: deserializeMetadata(output)
@@ -841,37 +664,9 @@ var de_GetSinkPolicyCommand = /* @__PURE__ */ __name(async (output, context) =>
841
664
  Object.assign(contents, doc);
842
665
  return contents;
843
666
  }, "de_GetSinkPolicyCommand");
844
- var de_GetSinkPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
845
- const parsedOutput = {
846
- ...output,
847
- body: await parseErrorBody(output.body, context)
848
- };
849
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
850
- switch (errorCode) {
851
- case "InternalServiceFault":
852
- case "com.amazonaws.oam#InternalServiceFault":
853
- throw await de_InternalServiceFaultRes(parsedOutput, context);
854
- case "InvalidParameterException":
855
- case "com.amazonaws.oam#InvalidParameterException":
856
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
857
- case "MissingRequiredParameterException":
858
- case "com.amazonaws.oam#MissingRequiredParameterException":
859
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
860
- case "ResourceNotFoundException":
861
- case "com.amazonaws.oam#ResourceNotFoundException":
862
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
863
- default:
864
- const parsedBody = parsedOutput.body;
865
- return throwDefaultError({
866
- output,
867
- parsedBody,
868
- errorCode
869
- });
870
- }
871
- }, "de_GetSinkPolicyCommandError");
872
667
  var de_ListAttachedLinksCommand = /* @__PURE__ */ __name(async (output, context) => {
873
668
  if (output.statusCode !== 200 && output.statusCode >= 300) {
874
- return de_ListAttachedLinksCommandError(output, context);
669
+ return de_CommandError(output, context);
875
670
  }
876
671
  const contents = (0, import_smithy_client.map)({
877
672
  $metadata: deserializeMetadata(output)
@@ -884,37 +679,9 @@ var de_ListAttachedLinksCommand = /* @__PURE__ */ __name(async (output, context)
884
679
  Object.assign(contents, doc);
885
680
  return contents;
886
681
  }, "de_ListAttachedLinksCommand");
887
- var de_ListAttachedLinksCommandError = /* @__PURE__ */ __name(async (output, context) => {
888
- const parsedOutput = {
889
- ...output,
890
- body: await parseErrorBody(output.body, context)
891
- };
892
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
893
- switch (errorCode) {
894
- case "InternalServiceFault":
895
- case "com.amazonaws.oam#InternalServiceFault":
896
- throw await de_InternalServiceFaultRes(parsedOutput, context);
897
- case "InvalidParameterException":
898
- case "com.amazonaws.oam#InvalidParameterException":
899
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
900
- case "MissingRequiredParameterException":
901
- case "com.amazonaws.oam#MissingRequiredParameterException":
902
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
903
- case "ResourceNotFoundException":
904
- case "com.amazonaws.oam#ResourceNotFoundException":
905
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
906
- default:
907
- const parsedBody = parsedOutput.body;
908
- return throwDefaultError({
909
- output,
910
- parsedBody,
911
- errorCode
912
- });
913
- }
914
- }, "de_ListAttachedLinksCommandError");
915
682
  var de_ListLinksCommand = /* @__PURE__ */ __name(async (output, context) => {
916
683
  if (output.statusCode !== 200 && output.statusCode >= 300) {
917
- return de_ListLinksCommandError(output, context);
684
+ return de_CommandError(output, context);
918
685
  }
919
686
  const contents = (0, import_smithy_client.map)({
920
687
  $metadata: deserializeMetadata(output)
@@ -927,34 +694,9 @@ var de_ListLinksCommand = /* @__PURE__ */ __name(async (output, context) => {
927
694
  Object.assign(contents, doc);
928
695
  return contents;
929
696
  }, "de_ListLinksCommand");
930
- var de_ListLinksCommandError = /* @__PURE__ */ __name(async (output, context) => {
931
- const parsedOutput = {
932
- ...output,
933
- body: await parseErrorBody(output.body, context)
934
- };
935
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
936
- switch (errorCode) {
937
- case "InternalServiceFault":
938
- case "com.amazonaws.oam#InternalServiceFault":
939
- throw await de_InternalServiceFaultRes(parsedOutput, context);
940
- case "InvalidParameterException":
941
- case "com.amazonaws.oam#InvalidParameterException":
942
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
943
- case "ResourceNotFoundException":
944
- case "com.amazonaws.oam#ResourceNotFoundException":
945
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
946
- default:
947
- const parsedBody = parsedOutput.body;
948
- return throwDefaultError({
949
- output,
950
- parsedBody,
951
- errorCode
952
- });
953
- }
954
- }, "de_ListLinksCommandError");
955
697
  var de_ListSinksCommand = /* @__PURE__ */ __name(async (output, context) => {
956
698
  if (output.statusCode !== 200 && output.statusCode >= 300) {
957
- return de_ListSinksCommandError(output, context);
699
+ return de_CommandError(output, context);
958
700
  }
959
701
  const contents = (0, import_smithy_client.map)({
960
702
  $metadata: deserializeMetadata(output)
@@ -967,34 +709,9 @@ var de_ListSinksCommand = /* @__PURE__ */ __name(async (output, context) => {
967
709
  Object.assign(contents, doc);
968
710
  return contents;
969
711
  }, "de_ListSinksCommand");
970
- var de_ListSinksCommandError = /* @__PURE__ */ __name(async (output, context) => {
971
- const parsedOutput = {
972
- ...output,
973
- body: await parseErrorBody(output.body, context)
974
- };
975
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
976
- switch (errorCode) {
977
- case "InternalServiceFault":
978
- case "com.amazonaws.oam#InternalServiceFault":
979
- throw await de_InternalServiceFaultRes(parsedOutput, context);
980
- case "InvalidParameterException":
981
- case "com.amazonaws.oam#InvalidParameterException":
982
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
983
- case "ResourceNotFoundException":
984
- case "com.amazonaws.oam#ResourceNotFoundException":
985
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
986
- default:
987
- const parsedBody = parsedOutput.body;
988
- return throwDefaultError({
989
- output,
990
- parsedBody,
991
- errorCode
992
- });
993
- }
994
- }, "de_ListSinksCommandError");
995
712
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
996
713
  if (output.statusCode !== 200 && output.statusCode >= 300) {
997
- return de_ListTagsForResourceCommandError(output, context);
714
+ return de_CommandError(output, context);
998
715
  }
999
716
  const contents = (0, import_smithy_client.map)({
1000
717
  $metadata: deserializeMetadata(output)
@@ -1006,31 +723,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
1006
723
  Object.assign(contents, doc);
1007
724
  return contents;
1008
725
  }, "de_ListTagsForResourceCommand");
1009
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1010
- const parsedOutput = {
1011
- ...output,
1012
- body: await parseErrorBody(output.body, context)
1013
- };
1014
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1015
- switch (errorCode) {
1016
- case "ResourceNotFoundException":
1017
- case "com.amazonaws.oam#ResourceNotFoundException":
1018
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1019
- case "ValidationException":
1020
- case "com.amazonaws.oam#ValidationException":
1021
- throw await de_ValidationExceptionRes(parsedOutput, context);
1022
- default:
1023
- const parsedBody = parsedOutput.body;
1024
- return throwDefaultError({
1025
- output,
1026
- parsedBody,
1027
- errorCode
1028
- });
1029
- }
1030
- }, "de_ListTagsForResourceCommandError");
1031
726
  var de_PutSinkPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {
1032
727
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1033
- return de_PutSinkPolicyCommandError(output, context);
728
+ return de_CommandError(output, context);
1034
729
  }
1035
730
  const contents = (0, import_smithy_client.map)({
1036
731
  $metadata: deserializeMetadata(output)
@@ -1044,37 +739,9 @@ var de_PutSinkPolicyCommand = /* @__PURE__ */ __name(async (output, context) =>
1044
739
  Object.assign(contents, doc);
1045
740
  return contents;
1046
741
  }, "de_PutSinkPolicyCommand");
1047
- var de_PutSinkPolicyCommandError = /* @__PURE__ */ __name(async (output, context) => {
1048
- const parsedOutput = {
1049
- ...output,
1050
- body: await parseErrorBody(output.body, context)
1051
- };
1052
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1053
- switch (errorCode) {
1054
- case "InternalServiceFault":
1055
- case "com.amazonaws.oam#InternalServiceFault":
1056
- throw await de_InternalServiceFaultRes(parsedOutput, context);
1057
- case "InvalidParameterException":
1058
- case "com.amazonaws.oam#InvalidParameterException":
1059
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1060
- case "MissingRequiredParameterException":
1061
- case "com.amazonaws.oam#MissingRequiredParameterException":
1062
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1063
- case "ResourceNotFoundException":
1064
- case "com.amazonaws.oam#ResourceNotFoundException":
1065
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1066
- default:
1067
- const parsedBody = parsedOutput.body;
1068
- return throwDefaultError({
1069
- output,
1070
- parsedBody,
1071
- errorCode
1072
- });
1073
- }
1074
- }, "de_PutSinkPolicyCommandError");
1075
742
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1076
743
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1077
- return de_TagResourceCommandError(output, context);
744
+ return de_CommandError(output, context);
1078
745
  }
1079
746
  const contents = (0, import_smithy_client.map)({
1080
747
  $metadata: deserializeMetadata(output)
@@ -1082,34 +749,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1082
749
  await (0, import_smithy_client.collectBody)(output.body, context);
1083
750
  return contents;
1084
751
  }, "de_TagResourceCommand");
1085
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1086
- const parsedOutput = {
1087
- ...output,
1088
- body: await parseErrorBody(output.body, context)
1089
- };
1090
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1091
- switch (errorCode) {
1092
- case "ResourceNotFoundException":
1093
- case "com.amazonaws.oam#ResourceNotFoundException":
1094
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1095
- case "TooManyTagsException":
1096
- case "com.amazonaws.oam#TooManyTagsException":
1097
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1098
- case "ValidationException":
1099
- case "com.amazonaws.oam#ValidationException":
1100
- throw await de_ValidationExceptionRes(parsedOutput, context);
1101
- default:
1102
- const parsedBody = parsedOutput.body;
1103
- return throwDefaultError({
1104
- output,
1105
- parsedBody,
1106
- errorCode
1107
- });
1108
- }
1109
- }, "de_TagResourceCommandError");
1110
752
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1111
753
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1112
- return de_UntagResourceCommandError(output, context);
754
+ return de_CommandError(output, context);
1113
755
  }
1114
756
  const contents = (0, import_smithy_client.map)({
1115
757
  $metadata: deserializeMetadata(output)
@@ -1117,31 +759,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
1117
759
  await (0, import_smithy_client.collectBody)(output.body, context);
1118
760
  return contents;
1119
761
  }, "de_UntagResourceCommand");
1120
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1121
- const parsedOutput = {
1122
- ...output,
1123
- body: await parseErrorBody(output.body, context)
1124
- };
1125
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1126
- switch (errorCode) {
1127
- case "ResourceNotFoundException":
1128
- case "com.amazonaws.oam#ResourceNotFoundException":
1129
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1130
- case "ValidationException":
1131
- case "com.amazonaws.oam#ValidationException":
1132
- throw await de_ValidationExceptionRes(parsedOutput, context);
1133
- default:
1134
- const parsedBody = parsedOutput.body;
1135
- return throwDefaultError({
1136
- output,
1137
- parsedBody,
1138
- errorCode
1139
- });
1140
- }
1141
- }, "de_UntagResourceCommandError");
1142
762
  var de_UpdateLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
1143
763
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1144
- return de_UpdateLinkCommandError(output, context);
764
+ return de_CommandError(output, context);
1145
765
  }
1146
766
  const contents = (0, import_smithy_client.map)({
1147
767
  $metadata: deserializeMetadata(output)
@@ -1159,13 +779,16 @@ var de_UpdateLinkCommand = /* @__PURE__ */ __name(async (output, context) => {
1159
779
  Object.assign(contents, doc);
1160
780
  return contents;
1161
781
  }, "de_UpdateLinkCommand");
1162
- var de_UpdateLinkCommandError = /* @__PURE__ */ __name(async (output, context) => {
782
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1163
783
  const parsedOutput = {
1164
784
  ...output,
1165
785
  body: await parseErrorBody(output.body, context)
1166
786
  };
1167
787
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1168
788
  switch (errorCode) {
789
+ case "ConflictException":
790
+ case "com.amazonaws.oam#ConflictException":
791
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1169
792
  case "InternalServiceFault":
1170
793
  case "com.amazonaws.oam#InternalServiceFault":
1171
794
  throw await de_InternalServiceFaultRes(parsedOutput, context);
@@ -1175,9 +798,18 @@ var de_UpdateLinkCommandError = /* @__PURE__ */ __name(async (output, context) =
1175
798
  case "MissingRequiredParameterException":
1176
799
  case "com.amazonaws.oam#MissingRequiredParameterException":
1177
800
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
801
+ case "ServiceQuotaExceededException":
802
+ case "com.amazonaws.oam#ServiceQuotaExceededException":
803
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1178
804
  case "ResourceNotFoundException":
1179
805
  case "com.amazonaws.oam#ResourceNotFoundException":
1180
806
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
807
+ case "ValidationException":
808
+ case "com.amazonaws.oam#ValidationException":
809
+ throw await de_ValidationExceptionRes(parsedOutput, context);
810
+ case "TooManyTagsException":
811
+ case "com.amazonaws.oam#TooManyTagsException":
812
+ throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1181
813
  default:
1182
814
  const parsedBody = parsedOutput.body;
1183
815
  return throwDefaultError({
@@ -1186,7 +818,7 @@ var de_UpdateLinkCommandError = /* @__PURE__ */ __name(async (output, context) =
1186
818
  errorCode
1187
819
  });
1188
820
  }
1189
- }, "de_UpdateLinkCommandError");
821
+ }, "de_CommandError");
1190
822
  var throwDefaultError = (0, import_smithy_client.withBaseException)(OAMServiceException);
1191
823
  var de_ConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1192
824
  const contents = (0, import_smithy_client.map)({
@@ -208,7 +208,7 @@ export const se_UpdateLinkCommand = async (input, context) => {
208
208
  };
209
209
  export const de_CreateLinkCommand = async (output, context) => {
210
210
  if (output.statusCode !== 200 && output.statusCode >= 300) {
211
- return de_CreateLinkCommandError(output, context);
211
+ return de_CommandError(output, context);
212
212
  }
213
213
  const contents = map({
214
214
  $metadata: deserializeMetadata(output),
@@ -226,40 +226,9 @@ export const de_CreateLinkCommand = async (output, context) => {
226
226
  Object.assign(contents, doc);
227
227
  return contents;
228
228
  };
229
- const de_CreateLinkCommandError = async (output, context) => {
230
- const parsedOutput = {
231
- ...output,
232
- body: await parseErrorBody(output.body, context),
233
- };
234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
235
- switch (errorCode) {
236
- case "ConflictException":
237
- case "com.amazonaws.oam#ConflictException":
238
- throw await de_ConflictExceptionRes(parsedOutput, context);
239
- case "InternalServiceFault":
240
- case "com.amazonaws.oam#InternalServiceFault":
241
- throw await de_InternalServiceFaultRes(parsedOutput, context);
242
- case "InvalidParameterException":
243
- case "com.amazonaws.oam#InvalidParameterException":
244
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
245
- case "MissingRequiredParameterException":
246
- case "com.amazonaws.oam#MissingRequiredParameterException":
247
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
248
- case "ServiceQuotaExceededException":
249
- case "com.amazonaws.oam#ServiceQuotaExceededException":
250
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
251
- default:
252
- const parsedBody = parsedOutput.body;
253
- return throwDefaultError({
254
- output,
255
- parsedBody,
256
- errorCode,
257
- });
258
- }
259
- };
260
229
  export const de_CreateSinkCommand = async (output, context) => {
261
230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
262
- return de_CreateSinkCommandError(output, context);
231
+ return de_CommandError(output, context);
263
232
  }
264
233
  const contents = map({
265
234
  $metadata: deserializeMetadata(output),
@@ -274,40 +243,9 @@ export const de_CreateSinkCommand = async (output, context) => {
274
243
  Object.assign(contents, doc);
275
244
  return contents;
276
245
  };
277
- const de_CreateSinkCommandError = async (output, context) => {
278
- const parsedOutput = {
279
- ...output,
280
- body: await parseErrorBody(output.body, context),
281
- };
282
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
283
- switch (errorCode) {
284
- case "ConflictException":
285
- case "com.amazonaws.oam#ConflictException":
286
- throw await de_ConflictExceptionRes(parsedOutput, context);
287
- case "InternalServiceFault":
288
- case "com.amazonaws.oam#InternalServiceFault":
289
- throw await de_InternalServiceFaultRes(parsedOutput, context);
290
- case "InvalidParameterException":
291
- case "com.amazonaws.oam#InvalidParameterException":
292
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
293
- case "MissingRequiredParameterException":
294
- case "com.amazonaws.oam#MissingRequiredParameterException":
295
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
296
- case "ServiceQuotaExceededException":
297
- case "com.amazonaws.oam#ServiceQuotaExceededException":
298
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
299
- default:
300
- const parsedBody = parsedOutput.body;
301
- return throwDefaultError({
302
- output,
303
- parsedBody,
304
- errorCode,
305
- });
306
- }
307
- };
308
246
  export const de_DeleteLinkCommand = async (output, context) => {
309
247
  if (output.statusCode !== 200 && output.statusCode >= 300) {
310
- return de_DeleteLinkCommandError(output, context);
248
+ return de_CommandError(output, context);
311
249
  }
312
250
  const contents = map({
313
251
  $metadata: deserializeMetadata(output),
@@ -315,37 +253,9 @@ export const de_DeleteLinkCommand = async (output, context) => {
315
253
  await collectBody(output.body, context);
316
254
  return contents;
317
255
  };
318
- const de_DeleteLinkCommandError = async (output, context) => {
319
- const parsedOutput = {
320
- ...output,
321
- body: await parseErrorBody(output.body, context),
322
- };
323
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
324
- switch (errorCode) {
325
- case "InternalServiceFault":
326
- case "com.amazonaws.oam#InternalServiceFault":
327
- throw await de_InternalServiceFaultRes(parsedOutput, context);
328
- case "InvalidParameterException":
329
- case "com.amazonaws.oam#InvalidParameterException":
330
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
331
- case "MissingRequiredParameterException":
332
- case "com.amazonaws.oam#MissingRequiredParameterException":
333
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
334
- case "ResourceNotFoundException":
335
- case "com.amazonaws.oam#ResourceNotFoundException":
336
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
337
- default:
338
- const parsedBody = parsedOutput.body;
339
- return throwDefaultError({
340
- output,
341
- parsedBody,
342
- errorCode,
343
- });
344
- }
345
- };
346
256
  export const de_DeleteSinkCommand = async (output, context) => {
347
257
  if (output.statusCode !== 200 && output.statusCode >= 300) {
348
- return de_DeleteSinkCommandError(output, context);
258
+ return de_CommandError(output, context);
349
259
  }
350
260
  const contents = map({
351
261
  $metadata: deserializeMetadata(output),
@@ -353,40 +263,9 @@ export const de_DeleteSinkCommand = async (output, context) => {
353
263
  await collectBody(output.body, context);
354
264
  return contents;
355
265
  };
356
- const de_DeleteSinkCommandError = async (output, context) => {
357
- const parsedOutput = {
358
- ...output,
359
- body: await parseErrorBody(output.body, context),
360
- };
361
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
362
- switch (errorCode) {
363
- case "ConflictException":
364
- case "com.amazonaws.oam#ConflictException":
365
- throw await de_ConflictExceptionRes(parsedOutput, context);
366
- case "InternalServiceFault":
367
- case "com.amazonaws.oam#InternalServiceFault":
368
- throw await de_InternalServiceFaultRes(parsedOutput, context);
369
- case "InvalidParameterException":
370
- case "com.amazonaws.oam#InvalidParameterException":
371
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
372
- case "MissingRequiredParameterException":
373
- case "com.amazonaws.oam#MissingRequiredParameterException":
374
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
375
- case "ResourceNotFoundException":
376
- case "com.amazonaws.oam#ResourceNotFoundException":
377
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
378
- default:
379
- const parsedBody = parsedOutput.body;
380
- return throwDefaultError({
381
- output,
382
- parsedBody,
383
- errorCode,
384
- });
385
- }
386
- };
387
266
  export const de_GetLinkCommand = async (output, context) => {
388
267
  if (output.statusCode !== 200 && output.statusCode >= 300) {
389
- return de_GetLinkCommandError(output, context);
268
+ return de_CommandError(output, context);
390
269
  }
391
270
  const contents = map({
392
271
  $metadata: deserializeMetadata(output),
@@ -404,37 +283,9 @@ export const de_GetLinkCommand = async (output, context) => {
404
283
  Object.assign(contents, doc);
405
284
  return contents;
406
285
  };
407
- const de_GetLinkCommandError = async (output, context) => {
408
- const parsedOutput = {
409
- ...output,
410
- body: await parseErrorBody(output.body, context),
411
- };
412
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
413
- switch (errorCode) {
414
- case "InternalServiceFault":
415
- case "com.amazonaws.oam#InternalServiceFault":
416
- throw await de_InternalServiceFaultRes(parsedOutput, context);
417
- case "InvalidParameterException":
418
- case "com.amazonaws.oam#InvalidParameterException":
419
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
420
- case "MissingRequiredParameterException":
421
- case "com.amazonaws.oam#MissingRequiredParameterException":
422
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
423
- case "ResourceNotFoundException":
424
- case "com.amazonaws.oam#ResourceNotFoundException":
425
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
426
- default:
427
- const parsedBody = parsedOutput.body;
428
- return throwDefaultError({
429
- output,
430
- parsedBody,
431
- errorCode,
432
- });
433
- }
434
- };
435
286
  export const de_GetSinkCommand = async (output, context) => {
436
287
  if (output.statusCode !== 200 && output.statusCode >= 300) {
437
- return de_GetSinkCommandError(output, context);
288
+ return de_CommandError(output, context);
438
289
  }
439
290
  const contents = map({
440
291
  $metadata: deserializeMetadata(output),
@@ -449,37 +300,9 @@ export const de_GetSinkCommand = async (output, context) => {
449
300
  Object.assign(contents, doc);
450
301
  return contents;
451
302
  };
452
- const de_GetSinkCommandError = async (output, context) => {
453
- const parsedOutput = {
454
- ...output,
455
- body: await parseErrorBody(output.body, context),
456
- };
457
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
458
- switch (errorCode) {
459
- case "InternalServiceFault":
460
- case "com.amazonaws.oam#InternalServiceFault":
461
- throw await de_InternalServiceFaultRes(parsedOutput, context);
462
- case "InvalidParameterException":
463
- case "com.amazonaws.oam#InvalidParameterException":
464
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
465
- case "MissingRequiredParameterException":
466
- case "com.amazonaws.oam#MissingRequiredParameterException":
467
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
468
- case "ResourceNotFoundException":
469
- case "com.amazonaws.oam#ResourceNotFoundException":
470
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
471
- default:
472
- const parsedBody = parsedOutput.body;
473
- return throwDefaultError({
474
- output,
475
- parsedBody,
476
- errorCode,
477
- });
478
- }
479
- };
480
303
  export const de_GetSinkPolicyCommand = async (output, context) => {
481
304
  if (output.statusCode !== 200 && output.statusCode >= 300) {
482
- return de_GetSinkPolicyCommandError(output, context);
305
+ return de_CommandError(output, context);
483
306
  }
484
307
  const contents = map({
485
308
  $metadata: deserializeMetadata(output),
@@ -493,37 +316,9 @@ export const de_GetSinkPolicyCommand = async (output, context) => {
493
316
  Object.assign(contents, doc);
494
317
  return contents;
495
318
  };
496
- const de_GetSinkPolicyCommandError = async (output, context) => {
497
- const parsedOutput = {
498
- ...output,
499
- body: await parseErrorBody(output.body, context),
500
- };
501
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
502
- switch (errorCode) {
503
- case "InternalServiceFault":
504
- case "com.amazonaws.oam#InternalServiceFault":
505
- throw await de_InternalServiceFaultRes(parsedOutput, context);
506
- case "InvalidParameterException":
507
- case "com.amazonaws.oam#InvalidParameterException":
508
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
509
- case "MissingRequiredParameterException":
510
- case "com.amazonaws.oam#MissingRequiredParameterException":
511
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
512
- case "ResourceNotFoundException":
513
- case "com.amazonaws.oam#ResourceNotFoundException":
514
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
515
- default:
516
- const parsedBody = parsedOutput.body;
517
- return throwDefaultError({
518
- output,
519
- parsedBody,
520
- errorCode,
521
- });
522
- }
523
- };
524
319
  export const de_ListAttachedLinksCommand = async (output, context) => {
525
320
  if (output.statusCode !== 200 && output.statusCode >= 300) {
526
- return de_ListAttachedLinksCommandError(output, context);
321
+ return de_CommandError(output, context);
527
322
  }
528
323
  const contents = map({
529
324
  $metadata: deserializeMetadata(output),
@@ -536,37 +331,9 @@ export const de_ListAttachedLinksCommand = async (output, context) => {
536
331
  Object.assign(contents, doc);
537
332
  return contents;
538
333
  };
539
- const de_ListAttachedLinksCommandError = async (output, context) => {
540
- const parsedOutput = {
541
- ...output,
542
- body: await parseErrorBody(output.body, context),
543
- };
544
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
545
- switch (errorCode) {
546
- case "InternalServiceFault":
547
- case "com.amazonaws.oam#InternalServiceFault":
548
- throw await de_InternalServiceFaultRes(parsedOutput, context);
549
- case "InvalidParameterException":
550
- case "com.amazonaws.oam#InvalidParameterException":
551
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
552
- case "MissingRequiredParameterException":
553
- case "com.amazonaws.oam#MissingRequiredParameterException":
554
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
555
- case "ResourceNotFoundException":
556
- case "com.amazonaws.oam#ResourceNotFoundException":
557
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
558
- default:
559
- const parsedBody = parsedOutput.body;
560
- return throwDefaultError({
561
- output,
562
- parsedBody,
563
- errorCode,
564
- });
565
- }
566
- };
567
334
  export const de_ListLinksCommand = async (output, context) => {
568
335
  if (output.statusCode !== 200 && output.statusCode >= 300) {
569
- return de_ListLinksCommandError(output, context);
336
+ return de_CommandError(output, context);
570
337
  }
571
338
  const contents = map({
572
339
  $metadata: deserializeMetadata(output),
@@ -579,34 +346,9 @@ export const de_ListLinksCommand = async (output, context) => {
579
346
  Object.assign(contents, doc);
580
347
  return contents;
581
348
  };
582
- const de_ListLinksCommandError = async (output, context) => {
583
- const parsedOutput = {
584
- ...output,
585
- body: await parseErrorBody(output.body, context),
586
- };
587
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
588
- switch (errorCode) {
589
- case "InternalServiceFault":
590
- case "com.amazonaws.oam#InternalServiceFault":
591
- throw await de_InternalServiceFaultRes(parsedOutput, context);
592
- case "InvalidParameterException":
593
- case "com.amazonaws.oam#InvalidParameterException":
594
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
595
- case "ResourceNotFoundException":
596
- case "com.amazonaws.oam#ResourceNotFoundException":
597
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
598
- default:
599
- const parsedBody = parsedOutput.body;
600
- return throwDefaultError({
601
- output,
602
- parsedBody,
603
- errorCode,
604
- });
605
- }
606
- };
607
349
  export const de_ListSinksCommand = async (output, context) => {
608
350
  if (output.statusCode !== 200 && output.statusCode >= 300) {
609
- return de_ListSinksCommandError(output, context);
351
+ return de_CommandError(output, context);
610
352
  }
611
353
  const contents = map({
612
354
  $metadata: deserializeMetadata(output),
@@ -619,34 +361,9 @@ export const de_ListSinksCommand = async (output, context) => {
619
361
  Object.assign(contents, doc);
620
362
  return contents;
621
363
  };
622
- const de_ListSinksCommandError = async (output, context) => {
623
- const parsedOutput = {
624
- ...output,
625
- body: await parseErrorBody(output.body, context),
626
- };
627
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
628
- switch (errorCode) {
629
- case "InternalServiceFault":
630
- case "com.amazonaws.oam#InternalServiceFault":
631
- throw await de_InternalServiceFaultRes(parsedOutput, context);
632
- case "InvalidParameterException":
633
- case "com.amazonaws.oam#InvalidParameterException":
634
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
635
- case "ResourceNotFoundException":
636
- case "com.amazonaws.oam#ResourceNotFoundException":
637
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
638
- default:
639
- const parsedBody = parsedOutput.body;
640
- return throwDefaultError({
641
- output,
642
- parsedBody,
643
- errorCode,
644
- });
645
- }
646
- };
647
364
  export const de_ListTagsForResourceCommand = async (output, context) => {
648
365
  if (output.statusCode !== 200 && output.statusCode >= 300) {
649
- return de_ListTagsForResourceCommandError(output, context);
366
+ return de_CommandError(output, context);
650
367
  }
651
368
  const contents = map({
652
369
  $metadata: deserializeMetadata(output),
@@ -658,31 +375,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
658
375
  Object.assign(contents, doc);
659
376
  return contents;
660
377
  };
661
- const de_ListTagsForResourceCommandError = async (output, context) => {
662
- const parsedOutput = {
663
- ...output,
664
- body: await parseErrorBody(output.body, context),
665
- };
666
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
667
- switch (errorCode) {
668
- case "ResourceNotFoundException":
669
- case "com.amazonaws.oam#ResourceNotFoundException":
670
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
671
- case "ValidationException":
672
- case "com.amazonaws.oam#ValidationException":
673
- throw await de_ValidationExceptionRes(parsedOutput, context);
674
- default:
675
- const parsedBody = parsedOutput.body;
676
- return throwDefaultError({
677
- output,
678
- parsedBody,
679
- errorCode,
680
- });
681
- }
682
- };
683
378
  export const de_PutSinkPolicyCommand = async (output, context) => {
684
379
  if (output.statusCode !== 200 && output.statusCode >= 300) {
685
- return de_PutSinkPolicyCommandError(output, context);
380
+ return de_CommandError(output, context);
686
381
  }
687
382
  const contents = map({
688
383
  $metadata: deserializeMetadata(output),
@@ -696,37 +391,9 @@ export const de_PutSinkPolicyCommand = async (output, context) => {
696
391
  Object.assign(contents, doc);
697
392
  return contents;
698
393
  };
699
- const de_PutSinkPolicyCommandError = async (output, context) => {
700
- const parsedOutput = {
701
- ...output,
702
- body: await parseErrorBody(output.body, context),
703
- };
704
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
705
- switch (errorCode) {
706
- case "InternalServiceFault":
707
- case "com.amazonaws.oam#InternalServiceFault":
708
- throw await de_InternalServiceFaultRes(parsedOutput, context);
709
- case "InvalidParameterException":
710
- case "com.amazonaws.oam#InvalidParameterException":
711
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
712
- case "MissingRequiredParameterException":
713
- case "com.amazonaws.oam#MissingRequiredParameterException":
714
- throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
715
- case "ResourceNotFoundException":
716
- case "com.amazonaws.oam#ResourceNotFoundException":
717
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
718
- default:
719
- const parsedBody = parsedOutput.body;
720
- return throwDefaultError({
721
- output,
722
- parsedBody,
723
- errorCode,
724
- });
725
- }
726
- };
727
394
  export const de_TagResourceCommand = async (output, context) => {
728
395
  if (output.statusCode !== 200 && output.statusCode >= 300) {
729
- return de_TagResourceCommandError(output, context);
396
+ return de_CommandError(output, context);
730
397
  }
731
398
  const contents = map({
732
399
  $metadata: deserializeMetadata(output),
@@ -734,34 +401,9 @@ export const de_TagResourceCommand = async (output, context) => {
734
401
  await collectBody(output.body, context);
735
402
  return contents;
736
403
  };
737
- const de_TagResourceCommandError = async (output, context) => {
738
- const parsedOutput = {
739
- ...output,
740
- body: await parseErrorBody(output.body, context),
741
- };
742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
743
- switch (errorCode) {
744
- case "ResourceNotFoundException":
745
- case "com.amazonaws.oam#ResourceNotFoundException":
746
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
747
- case "TooManyTagsException":
748
- case "com.amazonaws.oam#TooManyTagsException":
749
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
750
- case "ValidationException":
751
- case "com.amazonaws.oam#ValidationException":
752
- throw await de_ValidationExceptionRes(parsedOutput, context);
753
- default:
754
- const parsedBody = parsedOutput.body;
755
- return throwDefaultError({
756
- output,
757
- parsedBody,
758
- errorCode,
759
- });
760
- }
761
- };
762
404
  export const de_UntagResourceCommand = async (output, context) => {
763
405
  if (output.statusCode !== 200 && output.statusCode >= 300) {
764
- return de_UntagResourceCommandError(output, context);
406
+ return de_CommandError(output, context);
765
407
  }
766
408
  const contents = map({
767
409
  $metadata: deserializeMetadata(output),
@@ -769,31 +411,9 @@ export const de_UntagResourceCommand = async (output, context) => {
769
411
  await collectBody(output.body, context);
770
412
  return contents;
771
413
  };
772
- const de_UntagResourceCommandError = async (output, context) => {
773
- const parsedOutput = {
774
- ...output,
775
- body: await parseErrorBody(output.body, context),
776
- };
777
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
778
- switch (errorCode) {
779
- case "ResourceNotFoundException":
780
- case "com.amazonaws.oam#ResourceNotFoundException":
781
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
782
- case "ValidationException":
783
- case "com.amazonaws.oam#ValidationException":
784
- throw await de_ValidationExceptionRes(parsedOutput, context);
785
- default:
786
- const parsedBody = parsedOutput.body;
787
- return throwDefaultError({
788
- output,
789
- parsedBody,
790
- errorCode,
791
- });
792
- }
793
- };
794
414
  export const de_UpdateLinkCommand = async (output, context) => {
795
415
  if (output.statusCode !== 200 && output.statusCode >= 300) {
796
- return de_UpdateLinkCommandError(output, context);
416
+ return de_CommandError(output, context);
797
417
  }
798
418
  const contents = map({
799
419
  $metadata: deserializeMetadata(output),
@@ -811,13 +431,16 @@ export const de_UpdateLinkCommand = async (output, context) => {
811
431
  Object.assign(contents, doc);
812
432
  return contents;
813
433
  };
814
- const de_UpdateLinkCommandError = async (output, context) => {
434
+ const de_CommandError = async (output, context) => {
815
435
  const parsedOutput = {
816
436
  ...output,
817
437
  body: await parseErrorBody(output.body, context),
818
438
  };
819
439
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
820
440
  switch (errorCode) {
441
+ case "ConflictException":
442
+ case "com.amazonaws.oam#ConflictException":
443
+ throw await de_ConflictExceptionRes(parsedOutput, context);
821
444
  case "InternalServiceFault":
822
445
  case "com.amazonaws.oam#InternalServiceFault":
823
446
  throw await de_InternalServiceFaultRes(parsedOutput, context);
@@ -827,9 +450,18 @@ const de_UpdateLinkCommandError = async (output, context) => {
827
450
  case "MissingRequiredParameterException":
828
451
  case "com.amazonaws.oam#MissingRequiredParameterException":
829
452
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
453
+ case "ServiceQuotaExceededException":
454
+ case "com.amazonaws.oam#ServiceQuotaExceededException":
455
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
830
456
  case "ResourceNotFoundException":
831
457
  case "com.amazonaws.oam#ResourceNotFoundException":
832
458
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
459
+ case "ValidationException":
460
+ case "com.amazonaws.oam#ValidationException":
461
+ throw await de_ValidationExceptionRes(parsedOutput, context);
462
+ case "TooManyTagsException":
463
+ case "com.amazonaws.oam#TooManyTagsException":
464
+ throw await de_TooManyTagsExceptionRes(parsedOutput, context);
833
465
  default:
834
466
  const parsedBody = parsedOutput.body;
835
467
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-oam",
3
3
  "description": "AWS SDK for JavaScript Oam Client for Node.js, Browser and React Native",
4
- "version": "3.503.1",
4
+ "version": "3.507.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-oam",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.502.0",
23
+ "@aws-sdk/client-sts": "3.507.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.503.1",
25
+ "@aws-sdk/credential-provider-node": "3.507.0",
26
26
  "@aws-sdk/middleware-host-header": "3.502.0",
27
27
  "@aws-sdk/middleware-logger": "3.502.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.502.0",