@aws-sdk/client-firehose 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
@@ -757,7 +757,7 @@ var se_UpdateDestinationCommand = /* @__PURE__ */ __name(async (input, context)
757
757
  }, "se_UpdateDestinationCommand");
758
758
  var de_CreateDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
759
759
  if (output.statusCode >= 300) {
760
- return de_CreateDeliveryStreamCommandError(output, context);
760
+ return de_CommandError(output, context);
761
761
  }
762
762
  const data = await parseBody(output.body, context);
763
763
  let contents = {};
@@ -768,37 +768,9 @@ var de_CreateDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, conte
768
768
  };
769
769
  return response;
770
770
  }, "de_CreateDeliveryStreamCommand");
771
- var de_CreateDeliveryStreamCommandError = /* @__PURE__ */ __name(async (output, context) => {
772
- const parsedOutput = {
773
- ...output,
774
- body: await parseErrorBody(output.body, context)
775
- };
776
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
777
- switch (errorCode) {
778
- case "InvalidArgumentException":
779
- case "com.amazonaws.firehose#InvalidArgumentException":
780
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
781
- case "InvalidKMSResourceException":
782
- case "com.amazonaws.firehose#InvalidKMSResourceException":
783
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
784
- case "LimitExceededException":
785
- case "com.amazonaws.firehose#LimitExceededException":
786
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
787
- case "ResourceInUseException":
788
- case "com.amazonaws.firehose#ResourceInUseException":
789
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
790
- default:
791
- const parsedBody = parsedOutput.body;
792
- return throwDefaultError({
793
- output,
794
- parsedBody,
795
- errorCode
796
- });
797
- }
798
- }, "de_CreateDeliveryStreamCommandError");
799
771
  var de_DeleteDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
800
772
  if (output.statusCode >= 300) {
801
- return de_DeleteDeliveryStreamCommandError(output, context);
773
+ return de_CommandError(output, context);
802
774
  }
803
775
  const data = await parseBody(output.body, context);
804
776
  let contents = {};
@@ -809,31 +781,9 @@ var de_DeleteDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, conte
809
781
  };
810
782
  return response;
811
783
  }, "de_DeleteDeliveryStreamCommand");
812
- var de_DeleteDeliveryStreamCommandError = /* @__PURE__ */ __name(async (output, context) => {
813
- const parsedOutput = {
814
- ...output,
815
- body: await parseErrorBody(output.body, context)
816
- };
817
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
818
- switch (errorCode) {
819
- case "ResourceInUseException":
820
- case "com.amazonaws.firehose#ResourceInUseException":
821
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
822
- case "ResourceNotFoundException":
823
- case "com.amazonaws.firehose#ResourceNotFoundException":
824
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
825
- default:
826
- const parsedBody = parsedOutput.body;
827
- return throwDefaultError({
828
- output,
829
- parsedBody,
830
- errorCode
831
- });
832
- }
833
- }, "de_DeleteDeliveryStreamCommandError");
834
784
  var de_DescribeDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
835
785
  if (output.statusCode >= 300) {
836
- return de_DescribeDeliveryStreamCommandError(output, context);
786
+ return de_CommandError(output, context);
837
787
  }
838
788
  const data = await parseBody(output.body, context);
839
789
  let contents = {};
@@ -844,28 +794,9 @@ var de_DescribeDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, con
844
794
  };
845
795
  return response;
846
796
  }, "de_DescribeDeliveryStreamCommand");
847
- var de_DescribeDeliveryStreamCommandError = /* @__PURE__ */ __name(async (output, context) => {
848
- const parsedOutput = {
849
- ...output,
850
- body: await parseErrorBody(output.body, context)
851
- };
852
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
853
- switch (errorCode) {
854
- case "ResourceNotFoundException":
855
- case "com.amazonaws.firehose#ResourceNotFoundException":
856
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
857
- default:
858
- const parsedBody = parsedOutput.body;
859
- return throwDefaultError({
860
- output,
861
- parsedBody,
862
- errorCode
863
- });
864
- }
865
- }, "de_DescribeDeliveryStreamCommandError");
866
797
  var de_ListDeliveryStreamsCommand = /* @__PURE__ */ __name(async (output, context) => {
867
798
  if (output.statusCode >= 300) {
868
- return de_ListDeliveryStreamsCommandError(output, context);
799
+ return de_CommandError(output, context);
869
800
  }
870
801
  const data = await parseBody(output.body, context);
871
802
  let contents = {};
@@ -876,22 +807,9 @@ var de_ListDeliveryStreamsCommand = /* @__PURE__ */ __name(async (output, contex
876
807
  };
877
808
  return response;
878
809
  }, "de_ListDeliveryStreamsCommand");
879
- var de_ListDeliveryStreamsCommandError = /* @__PURE__ */ __name(async (output, context) => {
880
- const parsedOutput = {
881
- ...output,
882
- body: await parseErrorBody(output.body, context)
883
- };
884
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
885
- const parsedBody = parsedOutput.body;
886
- return throwDefaultError({
887
- output,
888
- parsedBody,
889
- errorCode
890
- });
891
- }, "de_ListDeliveryStreamsCommandError");
892
810
  var de_ListTagsForDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
893
811
  if (output.statusCode >= 300) {
894
- return de_ListTagsForDeliveryStreamCommandError(output, context);
812
+ return de_CommandError(output, context);
895
813
  }
896
814
  const data = await parseBody(output.body, context);
897
815
  let contents = {};
@@ -902,34 +820,9 @@ var de_ListTagsForDeliveryStreamCommand = /* @__PURE__ */ __name(async (output,
902
820
  };
903
821
  return response;
904
822
  }, "de_ListTagsForDeliveryStreamCommand");
905
- var de_ListTagsForDeliveryStreamCommandError = /* @__PURE__ */ __name(async (output, context) => {
906
- const parsedOutput = {
907
- ...output,
908
- body: await parseErrorBody(output.body, context)
909
- };
910
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
911
- switch (errorCode) {
912
- case "InvalidArgumentException":
913
- case "com.amazonaws.firehose#InvalidArgumentException":
914
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
915
- case "LimitExceededException":
916
- case "com.amazonaws.firehose#LimitExceededException":
917
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
918
- case "ResourceNotFoundException":
919
- case "com.amazonaws.firehose#ResourceNotFoundException":
920
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
921
- default:
922
- const parsedBody = parsedOutput.body;
923
- return throwDefaultError({
924
- output,
925
- parsedBody,
926
- errorCode
927
- });
928
- }
929
- }, "de_ListTagsForDeliveryStreamCommandError");
930
823
  var de_PutRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
931
824
  if (output.statusCode >= 300) {
932
- return de_PutRecordCommandError(output, context);
825
+ return de_CommandError(output, context);
933
826
  }
934
827
  const data = await parseBody(output.body, context);
935
828
  let contents = {};
@@ -940,40 +833,9 @@ var de_PutRecordCommand = /* @__PURE__ */ __name(async (output, context) => {
940
833
  };
941
834
  return response;
942
835
  }, "de_PutRecordCommand");
943
- var de_PutRecordCommandError = /* @__PURE__ */ __name(async (output, context) => {
944
- const parsedOutput = {
945
- ...output,
946
- body: await parseErrorBody(output.body, context)
947
- };
948
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
949
- switch (errorCode) {
950
- case "InvalidArgumentException":
951
- case "com.amazonaws.firehose#InvalidArgumentException":
952
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
953
- case "InvalidKMSResourceException":
954
- case "com.amazonaws.firehose#InvalidKMSResourceException":
955
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
956
- case "InvalidSourceException":
957
- case "com.amazonaws.firehose#InvalidSourceException":
958
- throw await de_InvalidSourceExceptionRes(parsedOutput, context);
959
- case "ResourceNotFoundException":
960
- case "com.amazonaws.firehose#ResourceNotFoundException":
961
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
962
- case "ServiceUnavailableException":
963
- case "com.amazonaws.firehose#ServiceUnavailableException":
964
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
965
- default:
966
- const parsedBody = parsedOutput.body;
967
- return throwDefaultError({
968
- output,
969
- parsedBody,
970
- errorCode
971
- });
972
- }
973
- }, "de_PutRecordCommandError");
974
836
  var de_PutRecordBatchCommand = /* @__PURE__ */ __name(async (output, context) => {
975
837
  if (output.statusCode >= 300) {
976
- return de_PutRecordBatchCommandError(output, context);
838
+ return de_CommandError(output, context);
977
839
  }
978
840
  const data = await parseBody(output.body, context);
979
841
  let contents = {};
@@ -984,40 +846,9 @@ var de_PutRecordBatchCommand = /* @__PURE__ */ __name(async (output, context) =>
984
846
  };
985
847
  return response;
986
848
  }, "de_PutRecordBatchCommand");
987
- var de_PutRecordBatchCommandError = /* @__PURE__ */ __name(async (output, context) => {
988
- const parsedOutput = {
989
- ...output,
990
- body: await parseErrorBody(output.body, context)
991
- };
992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
993
- switch (errorCode) {
994
- case "InvalidArgumentException":
995
- case "com.amazonaws.firehose#InvalidArgumentException":
996
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
997
- case "InvalidKMSResourceException":
998
- case "com.amazonaws.firehose#InvalidKMSResourceException":
999
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
1000
- case "InvalidSourceException":
1001
- case "com.amazonaws.firehose#InvalidSourceException":
1002
- throw await de_InvalidSourceExceptionRes(parsedOutput, context);
1003
- case "ResourceNotFoundException":
1004
- case "com.amazonaws.firehose#ResourceNotFoundException":
1005
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1006
- case "ServiceUnavailableException":
1007
- case "com.amazonaws.firehose#ServiceUnavailableException":
1008
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1009
- default:
1010
- const parsedBody = parsedOutput.body;
1011
- return throwDefaultError({
1012
- output,
1013
- parsedBody,
1014
- errorCode
1015
- });
1016
- }
1017
- }, "de_PutRecordBatchCommandError");
1018
849
  var de_StartDeliveryStreamEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => {
1019
850
  if (output.statusCode >= 300) {
1020
- return de_StartDeliveryStreamEncryptionCommandError(output, context);
851
+ return de_CommandError(output, context);
1021
852
  }
1022
853
  const data = await parseBody(output.body, context);
1023
854
  let contents = {};
@@ -1028,40 +859,9 @@ var de_StartDeliveryStreamEncryptionCommand = /* @__PURE__ */ __name(async (outp
1028
859
  };
1029
860
  return response;
1030
861
  }, "de_StartDeliveryStreamEncryptionCommand");
1031
- var de_StartDeliveryStreamEncryptionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1032
- const parsedOutput = {
1033
- ...output,
1034
- body: await parseErrorBody(output.body, context)
1035
- };
1036
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1037
- switch (errorCode) {
1038
- case "InvalidArgumentException":
1039
- case "com.amazonaws.firehose#InvalidArgumentException":
1040
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1041
- case "InvalidKMSResourceException":
1042
- case "com.amazonaws.firehose#InvalidKMSResourceException":
1043
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
1044
- case "LimitExceededException":
1045
- case "com.amazonaws.firehose#LimitExceededException":
1046
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1047
- case "ResourceInUseException":
1048
- case "com.amazonaws.firehose#ResourceInUseException":
1049
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1050
- case "ResourceNotFoundException":
1051
- case "com.amazonaws.firehose#ResourceNotFoundException":
1052
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1053
- default:
1054
- const parsedBody = parsedOutput.body;
1055
- return throwDefaultError({
1056
- output,
1057
- parsedBody,
1058
- errorCode
1059
- });
1060
- }
1061
- }, "de_StartDeliveryStreamEncryptionCommandError");
1062
862
  var de_StopDeliveryStreamEncryptionCommand = /* @__PURE__ */ __name(async (output, context) => {
1063
863
  if (output.statusCode >= 300) {
1064
- return de_StopDeliveryStreamEncryptionCommandError(output, context);
864
+ return de_CommandError(output, context);
1065
865
  }
1066
866
  const data = await parseBody(output.body, context);
1067
867
  let contents = {};
@@ -1072,37 +872,9 @@ var de_StopDeliveryStreamEncryptionCommand = /* @__PURE__ */ __name(async (outpu
1072
872
  };
1073
873
  return response;
1074
874
  }, "de_StopDeliveryStreamEncryptionCommand");
1075
- var de_StopDeliveryStreamEncryptionCommandError = /* @__PURE__ */ __name(async (output, context) => {
1076
- const parsedOutput = {
1077
- ...output,
1078
- body: await parseErrorBody(output.body, context)
1079
- };
1080
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1081
- switch (errorCode) {
1082
- case "InvalidArgumentException":
1083
- case "com.amazonaws.firehose#InvalidArgumentException":
1084
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1085
- case "LimitExceededException":
1086
- case "com.amazonaws.firehose#LimitExceededException":
1087
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1088
- case "ResourceInUseException":
1089
- case "com.amazonaws.firehose#ResourceInUseException":
1090
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1091
- case "ResourceNotFoundException":
1092
- case "com.amazonaws.firehose#ResourceNotFoundException":
1093
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1094
- default:
1095
- const parsedBody = parsedOutput.body;
1096
- return throwDefaultError({
1097
- output,
1098
- parsedBody,
1099
- errorCode
1100
- });
1101
- }
1102
- }, "de_StopDeliveryStreamEncryptionCommandError");
1103
875
  var de_TagDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
1104
876
  if (output.statusCode >= 300) {
1105
- return de_TagDeliveryStreamCommandError(output, context);
877
+ return de_CommandError(output, context);
1106
878
  }
1107
879
  const data = await parseBody(output.body, context);
1108
880
  let contents = {};
@@ -1113,37 +885,9 @@ var de_TagDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context)
1113
885
  };
1114
886
  return response;
1115
887
  }, "de_TagDeliveryStreamCommand");
1116
- var de_TagDeliveryStreamCommandError = /* @__PURE__ */ __name(async (output, context) => {
1117
- const parsedOutput = {
1118
- ...output,
1119
- body: await parseErrorBody(output.body, context)
1120
- };
1121
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1122
- switch (errorCode) {
1123
- case "InvalidArgumentException":
1124
- case "com.amazonaws.firehose#InvalidArgumentException":
1125
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1126
- case "LimitExceededException":
1127
- case "com.amazonaws.firehose#LimitExceededException":
1128
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1129
- case "ResourceInUseException":
1130
- case "com.amazonaws.firehose#ResourceInUseException":
1131
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1132
- case "ResourceNotFoundException":
1133
- case "com.amazonaws.firehose#ResourceNotFoundException":
1134
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1135
- default:
1136
- const parsedBody = parsedOutput.body;
1137
- return throwDefaultError({
1138
- output,
1139
- parsedBody,
1140
- errorCode
1141
- });
1142
- }
1143
- }, "de_TagDeliveryStreamCommandError");
1144
888
  var de_UntagDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, context) => {
1145
889
  if (output.statusCode >= 300) {
1146
- return de_UntagDeliveryStreamCommandError(output, context);
890
+ return de_CommandError(output, context);
1147
891
  }
1148
892
  const data = await parseBody(output.body, context);
1149
893
  let contents = {};
@@ -1154,37 +898,9 @@ var de_UntagDeliveryStreamCommand = /* @__PURE__ */ __name(async (output, contex
1154
898
  };
1155
899
  return response;
1156
900
  }, "de_UntagDeliveryStreamCommand");
1157
- var de_UntagDeliveryStreamCommandError = /* @__PURE__ */ __name(async (output, context) => {
1158
- const parsedOutput = {
1159
- ...output,
1160
- body: await parseErrorBody(output.body, context)
1161
- };
1162
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1163
- switch (errorCode) {
1164
- case "InvalidArgumentException":
1165
- case "com.amazonaws.firehose#InvalidArgumentException":
1166
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
1167
- case "LimitExceededException":
1168
- case "com.amazonaws.firehose#LimitExceededException":
1169
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1170
- case "ResourceInUseException":
1171
- case "com.amazonaws.firehose#ResourceInUseException":
1172
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1173
- case "ResourceNotFoundException":
1174
- case "com.amazonaws.firehose#ResourceNotFoundException":
1175
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1176
- default:
1177
- const parsedBody = parsedOutput.body;
1178
- return throwDefaultError({
1179
- output,
1180
- parsedBody,
1181
- errorCode
1182
- });
1183
- }
1184
- }, "de_UntagDeliveryStreamCommandError");
1185
901
  var de_UpdateDestinationCommand = /* @__PURE__ */ __name(async (output, context) => {
1186
902
  if (output.statusCode >= 300) {
1187
- return de_UpdateDestinationCommandError(output, context);
903
+ return de_CommandError(output, context);
1188
904
  }
1189
905
  const data = await parseBody(output.body, context);
1190
906
  let contents = {};
@@ -1195,25 +911,37 @@ var de_UpdateDestinationCommand = /* @__PURE__ */ __name(async (output, context)
1195
911
  };
1196
912
  return response;
1197
913
  }, "de_UpdateDestinationCommand");
1198
- var de_UpdateDestinationCommandError = /* @__PURE__ */ __name(async (output, context) => {
914
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1199
915
  const parsedOutput = {
1200
916
  ...output,
1201
917
  body: await parseErrorBody(output.body, context)
1202
918
  };
1203
919
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1204
920
  switch (errorCode) {
1205
- case "ConcurrentModificationException":
1206
- case "com.amazonaws.firehose#ConcurrentModificationException":
1207
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1208
921
  case "InvalidArgumentException":
1209
922
  case "com.amazonaws.firehose#InvalidArgumentException":
1210
923
  throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
924
+ case "InvalidKMSResourceException":
925
+ case "com.amazonaws.firehose#InvalidKMSResourceException":
926
+ throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
927
+ case "LimitExceededException":
928
+ case "com.amazonaws.firehose#LimitExceededException":
929
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
1211
930
  case "ResourceInUseException":
1212
931
  case "com.amazonaws.firehose#ResourceInUseException":
1213
932
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1214
933
  case "ResourceNotFoundException":
1215
934
  case "com.amazonaws.firehose#ResourceNotFoundException":
1216
935
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
936
+ case "InvalidSourceException":
937
+ case "com.amazonaws.firehose#InvalidSourceException":
938
+ throw await de_InvalidSourceExceptionRes(parsedOutput, context);
939
+ case "ServiceUnavailableException":
940
+ case "com.amazonaws.firehose#ServiceUnavailableException":
941
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
942
+ case "ConcurrentModificationException":
943
+ case "com.amazonaws.firehose#ConcurrentModificationException":
944
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
1217
945
  default:
1218
946
  const parsedBody = parsedOutput.body;
1219
947
  return throwDefaultError({
@@ -1222,7 +950,7 @@ var de_UpdateDestinationCommandError = /* @__PURE__ */ __name(async (output, con
1222
950
  errorCode
1223
951
  });
1224
952
  }
1225
- }, "de_UpdateDestinationCommandError");
953
+ }, "de_CommandError");
1226
954
  var de_ConcurrentModificationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1227
955
  const body = parsedOutput.body;
1228
956
  const deserialized = (0, import_smithy_client._json)(body);
@@ -76,7 +76,7 @@ export const se_UpdateDestinationCommand = async (input, context) => {
76
76
  };
77
77
  export const de_CreateDeliveryStreamCommand = async (output, context) => {
78
78
  if (output.statusCode >= 300) {
79
- return de_CreateDeliveryStreamCommandError(output, context);
79
+ return de_CommandError(output, context);
80
80
  }
81
81
  const data = await parseBody(output.body, context);
82
82
  let contents = {};
@@ -87,37 +87,9 @@ export const de_CreateDeliveryStreamCommand = async (output, context) => {
87
87
  };
88
88
  return response;
89
89
  };
90
- const de_CreateDeliveryStreamCommandError = async (output, context) => {
91
- const parsedOutput = {
92
- ...output,
93
- body: await parseErrorBody(output.body, context),
94
- };
95
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
96
- switch (errorCode) {
97
- case "InvalidArgumentException":
98
- case "com.amazonaws.firehose#InvalidArgumentException":
99
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
100
- case "InvalidKMSResourceException":
101
- case "com.amazonaws.firehose#InvalidKMSResourceException":
102
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
103
- case "LimitExceededException":
104
- case "com.amazonaws.firehose#LimitExceededException":
105
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
106
- case "ResourceInUseException":
107
- case "com.amazonaws.firehose#ResourceInUseException":
108
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
109
- default:
110
- const parsedBody = parsedOutput.body;
111
- return throwDefaultError({
112
- output,
113
- parsedBody,
114
- errorCode,
115
- });
116
- }
117
- };
118
90
  export const de_DeleteDeliveryStreamCommand = async (output, context) => {
119
91
  if (output.statusCode >= 300) {
120
- return de_DeleteDeliveryStreamCommandError(output, context);
92
+ return de_CommandError(output, context);
121
93
  }
122
94
  const data = await parseBody(output.body, context);
123
95
  let contents = {};
@@ -128,31 +100,9 @@ export const de_DeleteDeliveryStreamCommand = async (output, context) => {
128
100
  };
129
101
  return response;
130
102
  };
131
- const de_DeleteDeliveryStreamCommandError = async (output, context) => {
132
- const parsedOutput = {
133
- ...output,
134
- body: await parseErrorBody(output.body, context),
135
- };
136
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
137
- switch (errorCode) {
138
- case "ResourceInUseException":
139
- case "com.amazonaws.firehose#ResourceInUseException":
140
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
141
- case "ResourceNotFoundException":
142
- case "com.amazonaws.firehose#ResourceNotFoundException":
143
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
144
- default:
145
- const parsedBody = parsedOutput.body;
146
- return throwDefaultError({
147
- output,
148
- parsedBody,
149
- errorCode,
150
- });
151
- }
152
- };
153
103
  export const de_DescribeDeliveryStreamCommand = async (output, context) => {
154
104
  if (output.statusCode >= 300) {
155
- return de_DescribeDeliveryStreamCommandError(output, context);
105
+ return de_CommandError(output, context);
156
106
  }
157
107
  const data = await parseBody(output.body, context);
158
108
  let contents = {};
@@ -163,28 +113,9 @@ export const de_DescribeDeliveryStreamCommand = async (output, context) => {
163
113
  };
164
114
  return response;
165
115
  };
166
- const de_DescribeDeliveryStreamCommandError = async (output, context) => {
167
- const parsedOutput = {
168
- ...output,
169
- body: await parseErrorBody(output.body, context),
170
- };
171
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
172
- switch (errorCode) {
173
- case "ResourceNotFoundException":
174
- case "com.amazonaws.firehose#ResourceNotFoundException":
175
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
176
- default:
177
- const parsedBody = parsedOutput.body;
178
- return throwDefaultError({
179
- output,
180
- parsedBody,
181
- errorCode,
182
- });
183
- }
184
- };
185
116
  export const de_ListDeliveryStreamsCommand = async (output, context) => {
186
117
  if (output.statusCode >= 300) {
187
- return de_ListDeliveryStreamsCommandError(output, context);
118
+ return de_CommandError(output, context);
188
119
  }
189
120
  const data = await parseBody(output.body, context);
190
121
  let contents = {};
@@ -195,22 +126,9 @@ export const de_ListDeliveryStreamsCommand = async (output, context) => {
195
126
  };
196
127
  return response;
197
128
  };
198
- const de_ListDeliveryStreamsCommandError = async (output, context) => {
199
- const parsedOutput = {
200
- ...output,
201
- body: await parseErrorBody(output.body, context),
202
- };
203
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
204
- const parsedBody = parsedOutput.body;
205
- return throwDefaultError({
206
- output,
207
- parsedBody,
208
- errorCode,
209
- });
210
- };
211
129
  export const de_ListTagsForDeliveryStreamCommand = async (output, context) => {
212
130
  if (output.statusCode >= 300) {
213
- return de_ListTagsForDeliveryStreamCommandError(output, context);
131
+ return de_CommandError(output, context);
214
132
  }
215
133
  const data = await parseBody(output.body, context);
216
134
  let contents = {};
@@ -221,34 +139,9 @@ export const de_ListTagsForDeliveryStreamCommand = async (output, context) => {
221
139
  };
222
140
  return response;
223
141
  };
224
- const de_ListTagsForDeliveryStreamCommandError = async (output, context) => {
225
- const parsedOutput = {
226
- ...output,
227
- body: await parseErrorBody(output.body, context),
228
- };
229
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
230
- switch (errorCode) {
231
- case "InvalidArgumentException":
232
- case "com.amazonaws.firehose#InvalidArgumentException":
233
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
234
- case "LimitExceededException":
235
- case "com.amazonaws.firehose#LimitExceededException":
236
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
237
- case "ResourceNotFoundException":
238
- case "com.amazonaws.firehose#ResourceNotFoundException":
239
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
240
- default:
241
- const parsedBody = parsedOutput.body;
242
- return throwDefaultError({
243
- output,
244
- parsedBody,
245
- errorCode,
246
- });
247
- }
248
- };
249
142
  export const de_PutRecordCommand = async (output, context) => {
250
143
  if (output.statusCode >= 300) {
251
- return de_PutRecordCommandError(output, context);
144
+ return de_CommandError(output, context);
252
145
  }
253
146
  const data = await parseBody(output.body, context);
254
147
  let contents = {};
@@ -259,40 +152,9 @@ export const de_PutRecordCommand = async (output, context) => {
259
152
  };
260
153
  return response;
261
154
  };
262
- const de_PutRecordCommandError = async (output, context) => {
263
- const parsedOutput = {
264
- ...output,
265
- body: await parseErrorBody(output.body, context),
266
- };
267
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
268
- switch (errorCode) {
269
- case "InvalidArgumentException":
270
- case "com.amazonaws.firehose#InvalidArgumentException":
271
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
272
- case "InvalidKMSResourceException":
273
- case "com.amazonaws.firehose#InvalidKMSResourceException":
274
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
275
- case "InvalidSourceException":
276
- case "com.amazonaws.firehose#InvalidSourceException":
277
- throw await de_InvalidSourceExceptionRes(parsedOutput, context);
278
- case "ResourceNotFoundException":
279
- case "com.amazonaws.firehose#ResourceNotFoundException":
280
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
281
- case "ServiceUnavailableException":
282
- case "com.amazonaws.firehose#ServiceUnavailableException":
283
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
284
- default:
285
- const parsedBody = parsedOutput.body;
286
- return throwDefaultError({
287
- output,
288
- parsedBody,
289
- errorCode,
290
- });
291
- }
292
- };
293
155
  export const de_PutRecordBatchCommand = async (output, context) => {
294
156
  if (output.statusCode >= 300) {
295
- return de_PutRecordBatchCommandError(output, context);
157
+ return de_CommandError(output, context);
296
158
  }
297
159
  const data = await parseBody(output.body, context);
298
160
  let contents = {};
@@ -303,40 +165,9 @@ export const de_PutRecordBatchCommand = async (output, context) => {
303
165
  };
304
166
  return response;
305
167
  };
306
- const de_PutRecordBatchCommandError = async (output, context) => {
307
- const parsedOutput = {
308
- ...output,
309
- body: await parseErrorBody(output.body, context),
310
- };
311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
312
- switch (errorCode) {
313
- case "InvalidArgumentException":
314
- case "com.amazonaws.firehose#InvalidArgumentException":
315
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
316
- case "InvalidKMSResourceException":
317
- case "com.amazonaws.firehose#InvalidKMSResourceException":
318
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
319
- case "InvalidSourceException":
320
- case "com.amazonaws.firehose#InvalidSourceException":
321
- throw await de_InvalidSourceExceptionRes(parsedOutput, context);
322
- case "ResourceNotFoundException":
323
- case "com.amazonaws.firehose#ResourceNotFoundException":
324
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
325
- case "ServiceUnavailableException":
326
- case "com.amazonaws.firehose#ServiceUnavailableException":
327
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
328
- default:
329
- const parsedBody = parsedOutput.body;
330
- return throwDefaultError({
331
- output,
332
- parsedBody,
333
- errorCode,
334
- });
335
- }
336
- };
337
168
  export const de_StartDeliveryStreamEncryptionCommand = async (output, context) => {
338
169
  if (output.statusCode >= 300) {
339
- return de_StartDeliveryStreamEncryptionCommandError(output, context);
170
+ return de_CommandError(output, context);
340
171
  }
341
172
  const data = await parseBody(output.body, context);
342
173
  let contents = {};
@@ -347,40 +178,9 @@ export const de_StartDeliveryStreamEncryptionCommand = async (output, context) =
347
178
  };
348
179
  return response;
349
180
  };
350
- const de_StartDeliveryStreamEncryptionCommandError = async (output, context) => {
351
- const parsedOutput = {
352
- ...output,
353
- body: await parseErrorBody(output.body, context),
354
- };
355
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
356
- switch (errorCode) {
357
- case "InvalidArgumentException":
358
- case "com.amazonaws.firehose#InvalidArgumentException":
359
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
360
- case "InvalidKMSResourceException":
361
- case "com.amazonaws.firehose#InvalidKMSResourceException":
362
- throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
363
- case "LimitExceededException":
364
- case "com.amazonaws.firehose#LimitExceededException":
365
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
366
- case "ResourceInUseException":
367
- case "com.amazonaws.firehose#ResourceInUseException":
368
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
369
- case "ResourceNotFoundException":
370
- case "com.amazonaws.firehose#ResourceNotFoundException":
371
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
372
- default:
373
- const parsedBody = parsedOutput.body;
374
- return throwDefaultError({
375
- output,
376
- parsedBody,
377
- errorCode,
378
- });
379
- }
380
- };
381
181
  export const de_StopDeliveryStreamEncryptionCommand = async (output, context) => {
382
182
  if (output.statusCode >= 300) {
383
- return de_StopDeliveryStreamEncryptionCommandError(output, context);
183
+ return de_CommandError(output, context);
384
184
  }
385
185
  const data = await parseBody(output.body, context);
386
186
  let contents = {};
@@ -391,37 +191,9 @@ export const de_StopDeliveryStreamEncryptionCommand = async (output, context) =>
391
191
  };
392
192
  return response;
393
193
  };
394
- const de_StopDeliveryStreamEncryptionCommandError = async (output, context) => {
395
- const parsedOutput = {
396
- ...output,
397
- body: await parseErrorBody(output.body, context),
398
- };
399
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
400
- switch (errorCode) {
401
- case "InvalidArgumentException":
402
- case "com.amazonaws.firehose#InvalidArgumentException":
403
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
404
- case "LimitExceededException":
405
- case "com.amazonaws.firehose#LimitExceededException":
406
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
407
- case "ResourceInUseException":
408
- case "com.amazonaws.firehose#ResourceInUseException":
409
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
410
- case "ResourceNotFoundException":
411
- case "com.amazonaws.firehose#ResourceNotFoundException":
412
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
413
- default:
414
- const parsedBody = parsedOutput.body;
415
- return throwDefaultError({
416
- output,
417
- parsedBody,
418
- errorCode,
419
- });
420
- }
421
- };
422
194
  export const de_TagDeliveryStreamCommand = async (output, context) => {
423
195
  if (output.statusCode >= 300) {
424
- return de_TagDeliveryStreamCommandError(output, context);
196
+ return de_CommandError(output, context);
425
197
  }
426
198
  const data = await parseBody(output.body, context);
427
199
  let contents = {};
@@ -432,37 +204,9 @@ export const de_TagDeliveryStreamCommand = async (output, context) => {
432
204
  };
433
205
  return response;
434
206
  };
435
- const de_TagDeliveryStreamCommandError = async (output, context) => {
436
- const parsedOutput = {
437
- ...output,
438
- body: await parseErrorBody(output.body, context),
439
- };
440
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
441
- switch (errorCode) {
442
- case "InvalidArgumentException":
443
- case "com.amazonaws.firehose#InvalidArgumentException":
444
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
445
- case "LimitExceededException":
446
- case "com.amazonaws.firehose#LimitExceededException":
447
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
448
- case "ResourceInUseException":
449
- case "com.amazonaws.firehose#ResourceInUseException":
450
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
451
- case "ResourceNotFoundException":
452
- case "com.amazonaws.firehose#ResourceNotFoundException":
453
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
454
- default:
455
- const parsedBody = parsedOutput.body;
456
- return throwDefaultError({
457
- output,
458
- parsedBody,
459
- errorCode,
460
- });
461
- }
462
- };
463
207
  export const de_UntagDeliveryStreamCommand = async (output, context) => {
464
208
  if (output.statusCode >= 300) {
465
- return de_UntagDeliveryStreamCommandError(output, context);
209
+ return de_CommandError(output, context);
466
210
  }
467
211
  const data = await parseBody(output.body, context);
468
212
  let contents = {};
@@ -473,37 +217,9 @@ export const de_UntagDeliveryStreamCommand = async (output, context) => {
473
217
  };
474
218
  return response;
475
219
  };
476
- const de_UntagDeliveryStreamCommandError = async (output, context) => {
477
- const parsedOutput = {
478
- ...output,
479
- body: await parseErrorBody(output.body, context),
480
- };
481
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
482
- switch (errorCode) {
483
- case "InvalidArgumentException":
484
- case "com.amazonaws.firehose#InvalidArgumentException":
485
- throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
486
- case "LimitExceededException":
487
- case "com.amazonaws.firehose#LimitExceededException":
488
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
489
- case "ResourceInUseException":
490
- case "com.amazonaws.firehose#ResourceInUseException":
491
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
492
- case "ResourceNotFoundException":
493
- case "com.amazonaws.firehose#ResourceNotFoundException":
494
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
495
- default:
496
- const parsedBody = parsedOutput.body;
497
- return throwDefaultError({
498
- output,
499
- parsedBody,
500
- errorCode,
501
- });
502
- }
503
- };
504
220
  export const de_UpdateDestinationCommand = async (output, context) => {
505
221
  if (output.statusCode >= 300) {
506
- return de_UpdateDestinationCommandError(output, context);
222
+ return de_CommandError(output, context);
507
223
  }
508
224
  const data = await parseBody(output.body, context);
509
225
  let contents = {};
@@ -514,25 +230,37 @@ export const de_UpdateDestinationCommand = async (output, context) => {
514
230
  };
515
231
  return response;
516
232
  };
517
- const de_UpdateDestinationCommandError = async (output, context) => {
233
+ const de_CommandError = async (output, context) => {
518
234
  const parsedOutput = {
519
235
  ...output,
520
236
  body: await parseErrorBody(output.body, context),
521
237
  };
522
238
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
523
239
  switch (errorCode) {
524
- case "ConcurrentModificationException":
525
- case "com.amazonaws.firehose#ConcurrentModificationException":
526
- throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
527
240
  case "InvalidArgumentException":
528
241
  case "com.amazonaws.firehose#InvalidArgumentException":
529
242
  throw await de_InvalidArgumentExceptionRes(parsedOutput, context);
243
+ case "InvalidKMSResourceException":
244
+ case "com.amazonaws.firehose#InvalidKMSResourceException":
245
+ throw await de_InvalidKMSResourceExceptionRes(parsedOutput, context);
246
+ case "LimitExceededException":
247
+ case "com.amazonaws.firehose#LimitExceededException":
248
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
530
249
  case "ResourceInUseException":
531
250
  case "com.amazonaws.firehose#ResourceInUseException":
532
251
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
533
252
  case "ResourceNotFoundException":
534
253
  case "com.amazonaws.firehose#ResourceNotFoundException":
535
254
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
255
+ case "InvalidSourceException":
256
+ case "com.amazonaws.firehose#InvalidSourceException":
257
+ throw await de_InvalidSourceExceptionRes(parsedOutput, context);
258
+ case "ServiceUnavailableException":
259
+ case "com.amazonaws.firehose#ServiceUnavailableException":
260
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
261
+ case "ConcurrentModificationException":
262
+ case "com.amazonaws.firehose#ConcurrentModificationException":
263
+ throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);
536
264
  default:
537
265
  const parsedBody = parsedOutput.body;
538
266
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-firehose",
3
3
  "description": "AWS SDK for JavaScript Firehose 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-firehose",
@@ -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",