@aws-sdk/client-eks 3.504.0 → 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.
@@ -796,7 +796,7 @@ export const se_UpdatePodIdentityAssociationCommand = async (input, context) =>
796
796
  };
797
797
  export const de_AssociateAccessPolicyCommand = async (output, context) => {
798
798
  if (output.statusCode !== 200 && output.statusCode >= 300) {
799
- return de_AssociateAccessPolicyCommandError(output, context);
799
+ return de_CommandError(output, context);
800
800
  }
801
801
  const contents = map({
802
802
  $metadata: deserializeMetadata(output),
@@ -810,37 +810,9 @@ export const de_AssociateAccessPolicyCommand = async (output, context) => {
810
810
  Object.assign(contents, doc);
811
811
  return contents;
812
812
  };
813
- const de_AssociateAccessPolicyCommandError = async (output, context) => {
814
- const parsedOutput = {
815
- ...output,
816
- body: await parseErrorBody(output.body, context),
817
- };
818
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
819
- switch (errorCode) {
820
- case "InvalidParameterException":
821
- case "com.amazonaws.eks#InvalidParameterException":
822
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
823
- case "InvalidRequestException":
824
- case "com.amazonaws.eks#InvalidRequestException":
825
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
826
- case "ResourceNotFoundException":
827
- case "com.amazonaws.eks#ResourceNotFoundException":
828
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
829
- case "ServerException":
830
- case "com.amazonaws.eks#ServerException":
831
- throw await de_ServerExceptionRes(parsedOutput, context);
832
- default:
833
- const parsedBody = parsedOutput.body;
834
- return throwDefaultError({
835
- output,
836
- parsedBody,
837
- errorCode,
838
- });
839
- }
840
- };
841
813
  export const de_AssociateEncryptionConfigCommand = async (output, context) => {
842
814
  if (output.statusCode !== 200 && output.statusCode >= 300) {
843
- return de_AssociateEncryptionConfigCommandError(output, context);
815
+ return de_CommandError(output, context);
844
816
  }
845
817
  const contents = map({
846
818
  $metadata: deserializeMetadata(output),
@@ -852,43 +824,9 @@ export const de_AssociateEncryptionConfigCommand = async (output, context) => {
852
824
  Object.assign(contents, doc);
853
825
  return contents;
854
826
  };
855
- const de_AssociateEncryptionConfigCommandError = async (output, context) => {
856
- const parsedOutput = {
857
- ...output,
858
- body: await parseErrorBody(output.body, context),
859
- };
860
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
861
- switch (errorCode) {
862
- case "ClientException":
863
- case "com.amazonaws.eks#ClientException":
864
- throw await de_ClientExceptionRes(parsedOutput, context);
865
- case "InvalidParameterException":
866
- case "com.amazonaws.eks#InvalidParameterException":
867
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
868
- case "InvalidRequestException":
869
- case "com.amazonaws.eks#InvalidRequestException":
870
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
871
- case "ResourceInUseException":
872
- case "com.amazonaws.eks#ResourceInUseException":
873
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
874
- case "ResourceNotFoundException":
875
- case "com.amazonaws.eks#ResourceNotFoundException":
876
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
877
- case "ServerException":
878
- case "com.amazonaws.eks#ServerException":
879
- throw await de_ServerExceptionRes(parsedOutput, context);
880
- default:
881
- const parsedBody = parsedOutput.body;
882
- return throwDefaultError({
883
- output,
884
- parsedBody,
885
- errorCode,
886
- });
887
- }
888
- };
889
827
  export const de_AssociateIdentityProviderConfigCommand = async (output, context) => {
890
828
  if (output.statusCode !== 200 && output.statusCode >= 300) {
891
- return de_AssociateIdentityProviderConfigCommandError(output, context);
829
+ return de_CommandError(output, context);
892
830
  }
893
831
  const contents = map({
894
832
  $metadata: deserializeMetadata(output),
@@ -901,43 +839,9 @@ export const de_AssociateIdentityProviderConfigCommand = async (output, context)
901
839
  Object.assign(contents, doc);
902
840
  return contents;
903
841
  };
904
- const de_AssociateIdentityProviderConfigCommandError = async (output, context) => {
905
- const parsedOutput = {
906
- ...output,
907
- body: await parseErrorBody(output.body, context),
908
- };
909
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
910
- switch (errorCode) {
911
- case "ClientException":
912
- case "com.amazonaws.eks#ClientException":
913
- throw await de_ClientExceptionRes(parsedOutput, context);
914
- case "InvalidParameterException":
915
- case "com.amazonaws.eks#InvalidParameterException":
916
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
917
- case "InvalidRequestException":
918
- case "com.amazonaws.eks#InvalidRequestException":
919
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
920
- case "ResourceInUseException":
921
- case "com.amazonaws.eks#ResourceInUseException":
922
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
923
- case "ResourceNotFoundException":
924
- case "com.amazonaws.eks#ResourceNotFoundException":
925
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
926
- case "ServerException":
927
- case "com.amazonaws.eks#ServerException":
928
- throw await de_ServerExceptionRes(parsedOutput, context);
929
- default:
930
- const parsedBody = parsedOutput.body;
931
- return throwDefaultError({
932
- output,
933
- parsedBody,
934
- errorCode,
935
- });
936
- }
937
- };
938
842
  export const de_CreateAccessEntryCommand = async (output, context) => {
939
843
  if (output.statusCode !== 200 && output.statusCode >= 300) {
940
- return de_CreateAccessEntryCommandError(output, context);
844
+ return de_CommandError(output, context);
941
845
  }
942
846
  const contents = map({
943
847
  $metadata: deserializeMetadata(output),
@@ -949,43 +853,9 @@ export const de_CreateAccessEntryCommand = async (output, context) => {
949
853
  Object.assign(contents, doc);
950
854
  return contents;
951
855
  };
952
- const de_CreateAccessEntryCommandError = async (output, context) => {
953
- const parsedOutput = {
954
- ...output,
955
- body: await parseErrorBody(output.body, context),
956
- };
957
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
958
- switch (errorCode) {
959
- case "InvalidParameterException":
960
- case "com.amazonaws.eks#InvalidParameterException":
961
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
962
- case "InvalidRequestException":
963
- case "com.amazonaws.eks#InvalidRequestException":
964
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
965
- case "ResourceInUseException":
966
- case "com.amazonaws.eks#ResourceInUseException":
967
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
968
- case "ResourceLimitExceededException":
969
- case "com.amazonaws.eks#ResourceLimitExceededException":
970
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
971
- case "ResourceNotFoundException":
972
- case "com.amazonaws.eks#ResourceNotFoundException":
973
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
974
- case "ServerException":
975
- case "com.amazonaws.eks#ServerException":
976
- throw await de_ServerExceptionRes(parsedOutput, context);
977
- default:
978
- const parsedBody = parsedOutput.body;
979
- return throwDefaultError({
980
- output,
981
- parsedBody,
982
- errorCode,
983
- });
984
- }
985
- };
986
856
  export const de_CreateAddonCommand = async (output, context) => {
987
857
  if (output.statusCode !== 200 && output.statusCode >= 300) {
988
- return de_CreateAddonCommandError(output, context);
858
+ return de_CommandError(output, context);
989
859
  }
990
860
  const contents = map({
991
861
  $metadata: deserializeMetadata(output),
@@ -997,43 +867,9 @@ export const de_CreateAddonCommand = async (output, context) => {
997
867
  Object.assign(contents, doc);
998
868
  return contents;
999
869
  };
1000
- const de_CreateAddonCommandError = async (output, context) => {
1001
- const parsedOutput = {
1002
- ...output,
1003
- body: await parseErrorBody(output.body, context),
1004
- };
1005
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1006
- switch (errorCode) {
1007
- case "ClientException":
1008
- case "com.amazonaws.eks#ClientException":
1009
- throw await de_ClientExceptionRes(parsedOutput, context);
1010
- case "InvalidParameterException":
1011
- case "com.amazonaws.eks#InvalidParameterException":
1012
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1013
- case "InvalidRequestException":
1014
- case "com.amazonaws.eks#InvalidRequestException":
1015
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1016
- case "ResourceInUseException":
1017
- case "com.amazonaws.eks#ResourceInUseException":
1018
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1019
- case "ResourceNotFoundException":
1020
- case "com.amazonaws.eks#ResourceNotFoundException":
1021
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1022
- case "ServerException":
1023
- case "com.amazonaws.eks#ServerException":
1024
- throw await de_ServerExceptionRes(parsedOutput, context);
1025
- default:
1026
- const parsedBody = parsedOutput.body;
1027
- return throwDefaultError({
1028
- output,
1029
- parsedBody,
1030
- errorCode,
1031
- });
1032
- }
1033
- };
1034
870
  export const de_CreateClusterCommand = async (output, context) => {
1035
871
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1036
- return de_CreateClusterCommandError(output, context);
872
+ return de_CommandError(output, context);
1037
873
  }
1038
874
  const contents = map({
1039
875
  $metadata: deserializeMetadata(output),
@@ -1045,46 +881,9 @@ export const de_CreateClusterCommand = async (output, context) => {
1045
881
  Object.assign(contents, doc);
1046
882
  return contents;
1047
883
  };
1048
- const de_CreateClusterCommandError = async (output, context) => {
1049
- const parsedOutput = {
1050
- ...output,
1051
- body: await parseErrorBody(output.body, context),
1052
- };
1053
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1054
- switch (errorCode) {
1055
- case "ClientException":
1056
- case "com.amazonaws.eks#ClientException":
1057
- throw await de_ClientExceptionRes(parsedOutput, context);
1058
- case "InvalidParameterException":
1059
- case "com.amazonaws.eks#InvalidParameterException":
1060
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1061
- case "ResourceInUseException":
1062
- case "com.amazonaws.eks#ResourceInUseException":
1063
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1064
- case "ResourceLimitExceededException":
1065
- case "com.amazonaws.eks#ResourceLimitExceededException":
1066
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
1067
- case "ServerException":
1068
- case "com.amazonaws.eks#ServerException":
1069
- throw await de_ServerExceptionRes(parsedOutput, context);
1070
- case "ServiceUnavailableException":
1071
- case "com.amazonaws.eks#ServiceUnavailableException":
1072
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1073
- case "UnsupportedAvailabilityZoneException":
1074
- case "com.amazonaws.eks#UnsupportedAvailabilityZoneException":
1075
- throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
1076
- default:
1077
- const parsedBody = parsedOutput.body;
1078
- return throwDefaultError({
1079
- output,
1080
- parsedBody,
1081
- errorCode,
1082
- });
1083
- }
1084
- };
1085
884
  export const de_CreateEksAnywhereSubscriptionCommand = async (output, context) => {
1086
885
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1087
- return de_CreateEksAnywhereSubscriptionCommandError(output, context);
886
+ return de_CommandError(output, context);
1088
887
  }
1089
888
  const contents = map({
1090
889
  $metadata: deserializeMetadata(output),
@@ -1096,40 +895,9 @@ export const de_CreateEksAnywhereSubscriptionCommand = async (output, context) =
1096
895
  Object.assign(contents, doc);
1097
896
  return contents;
1098
897
  };
1099
- const de_CreateEksAnywhereSubscriptionCommandError = async (output, context) => {
1100
- const parsedOutput = {
1101
- ...output,
1102
- body: await parseErrorBody(output.body, context),
1103
- };
1104
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1105
- switch (errorCode) {
1106
- case "ClientException":
1107
- case "com.amazonaws.eks#ClientException":
1108
- throw await de_ClientExceptionRes(parsedOutput, context);
1109
- case "InvalidParameterException":
1110
- case "com.amazonaws.eks#InvalidParameterException":
1111
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1112
- case "ResourceLimitExceededException":
1113
- case "com.amazonaws.eks#ResourceLimitExceededException":
1114
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
1115
- case "ServerException":
1116
- case "com.amazonaws.eks#ServerException":
1117
- throw await de_ServerExceptionRes(parsedOutput, context);
1118
- case "ServiceUnavailableException":
1119
- case "com.amazonaws.eks#ServiceUnavailableException":
1120
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1121
- default:
1122
- const parsedBody = parsedOutput.body;
1123
- return throwDefaultError({
1124
- output,
1125
- parsedBody,
1126
- errorCode,
1127
- });
1128
- }
1129
- };
1130
898
  export const de_CreateFargateProfileCommand = async (output, context) => {
1131
899
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1132
- return de_CreateFargateProfileCommandError(output, context);
900
+ return de_CommandError(output, context);
1133
901
  }
1134
902
  const contents = map({
1135
903
  $metadata: deserializeMetadata(output),
@@ -1141,43 +909,9 @@ export const de_CreateFargateProfileCommand = async (output, context) => {
1141
909
  Object.assign(contents, doc);
1142
910
  return contents;
1143
911
  };
1144
- const de_CreateFargateProfileCommandError = async (output, context) => {
1145
- const parsedOutput = {
1146
- ...output,
1147
- body: await parseErrorBody(output.body, context),
1148
- };
1149
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1150
- switch (errorCode) {
1151
- case "ClientException":
1152
- case "com.amazonaws.eks#ClientException":
1153
- throw await de_ClientExceptionRes(parsedOutput, context);
1154
- case "InvalidParameterException":
1155
- case "com.amazonaws.eks#InvalidParameterException":
1156
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1157
- case "InvalidRequestException":
1158
- case "com.amazonaws.eks#InvalidRequestException":
1159
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1160
- case "ResourceLimitExceededException":
1161
- case "com.amazonaws.eks#ResourceLimitExceededException":
1162
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
1163
- case "ServerException":
1164
- case "com.amazonaws.eks#ServerException":
1165
- throw await de_ServerExceptionRes(parsedOutput, context);
1166
- case "UnsupportedAvailabilityZoneException":
1167
- case "com.amazonaws.eks#UnsupportedAvailabilityZoneException":
1168
- throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
1169
- default:
1170
- const parsedBody = parsedOutput.body;
1171
- return throwDefaultError({
1172
- output,
1173
- parsedBody,
1174
- errorCode,
1175
- });
1176
- }
1177
- };
1178
912
  export const de_CreateNodegroupCommand = async (output, context) => {
1179
913
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1180
- return de_CreateNodegroupCommandError(output, context);
914
+ return de_CommandError(output, context);
1181
915
  }
1182
916
  const contents = map({
1183
917
  $metadata: deserializeMetadata(output),
@@ -1189,46 +923,9 @@ export const de_CreateNodegroupCommand = async (output, context) => {
1189
923
  Object.assign(contents, doc);
1190
924
  return contents;
1191
925
  };
1192
- const de_CreateNodegroupCommandError = async (output, context) => {
1193
- const parsedOutput = {
1194
- ...output,
1195
- body: await parseErrorBody(output.body, context),
1196
- };
1197
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1198
- switch (errorCode) {
1199
- case "ClientException":
1200
- case "com.amazonaws.eks#ClientException":
1201
- throw await de_ClientExceptionRes(parsedOutput, context);
1202
- case "InvalidParameterException":
1203
- case "com.amazonaws.eks#InvalidParameterException":
1204
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1205
- case "InvalidRequestException":
1206
- case "com.amazonaws.eks#InvalidRequestException":
1207
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1208
- case "ResourceInUseException":
1209
- case "com.amazonaws.eks#ResourceInUseException":
1210
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1211
- case "ResourceLimitExceededException":
1212
- case "com.amazonaws.eks#ResourceLimitExceededException":
1213
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
1214
- case "ServerException":
1215
- case "com.amazonaws.eks#ServerException":
1216
- throw await de_ServerExceptionRes(parsedOutput, context);
1217
- case "ServiceUnavailableException":
1218
- case "com.amazonaws.eks#ServiceUnavailableException":
1219
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1220
- default:
1221
- const parsedBody = parsedOutput.body;
1222
- return throwDefaultError({
1223
- output,
1224
- parsedBody,
1225
- errorCode,
1226
- });
1227
- }
1228
- };
1229
926
  export const de_CreatePodIdentityAssociationCommand = async (output, context) => {
1230
927
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1231
- return de_CreatePodIdentityAssociationCommandError(output, context);
928
+ return de_CommandError(output, context);
1232
929
  }
1233
930
  const contents = map({
1234
931
  $metadata: deserializeMetadata(output),
@@ -1240,43 +937,9 @@ export const de_CreatePodIdentityAssociationCommand = async (output, context) =>
1240
937
  Object.assign(contents, doc);
1241
938
  return contents;
1242
939
  };
1243
- const de_CreatePodIdentityAssociationCommandError = async (output, context) => {
1244
- const parsedOutput = {
1245
- ...output,
1246
- body: await parseErrorBody(output.body, context),
1247
- };
1248
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1249
- switch (errorCode) {
1250
- case "InvalidParameterException":
1251
- case "com.amazonaws.eks#InvalidParameterException":
1252
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1253
- case "InvalidRequestException":
1254
- case "com.amazonaws.eks#InvalidRequestException":
1255
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1256
- case "ResourceInUseException":
1257
- case "com.amazonaws.eks#ResourceInUseException":
1258
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1259
- case "ResourceLimitExceededException":
1260
- case "com.amazonaws.eks#ResourceLimitExceededException":
1261
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
1262
- case "ResourceNotFoundException":
1263
- case "com.amazonaws.eks#ResourceNotFoundException":
1264
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1265
- case "ServerException":
1266
- case "com.amazonaws.eks#ServerException":
1267
- throw await de_ServerExceptionRes(parsedOutput, context);
1268
- default:
1269
- const parsedBody = parsedOutput.body;
1270
- return throwDefaultError({
1271
- output,
1272
- parsedBody,
1273
- errorCode,
1274
- });
1275
- }
1276
- };
1277
940
  export const de_DeleteAccessEntryCommand = async (output, context) => {
1278
941
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1279
- return de_DeleteAccessEntryCommandError(output, context);
942
+ return de_CommandError(output, context);
1280
943
  }
1281
944
  const contents = map({
1282
945
  $metadata: deserializeMetadata(output),
@@ -1284,34 +947,9 @@ export const de_DeleteAccessEntryCommand = async (output, context) => {
1284
947
  await collectBody(output.body, context);
1285
948
  return contents;
1286
949
  };
1287
- const de_DeleteAccessEntryCommandError = async (output, context) => {
1288
- const parsedOutput = {
1289
- ...output,
1290
- body: await parseErrorBody(output.body, context),
1291
- };
1292
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1293
- switch (errorCode) {
1294
- case "InvalidRequestException":
1295
- case "com.amazonaws.eks#InvalidRequestException":
1296
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1297
- case "ResourceNotFoundException":
1298
- case "com.amazonaws.eks#ResourceNotFoundException":
1299
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1300
- case "ServerException":
1301
- case "com.amazonaws.eks#ServerException":
1302
- throw await de_ServerExceptionRes(parsedOutput, context);
1303
- default:
1304
- const parsedBody = parsedOutput.body;
1305
- return throwDefaultError({
1306
- output,
1307
- parsedBody,
1308
- errorCode,
1309
- });
1310
- }
1311
- };
1312
950
  export const de_DeleteAddonCommand = async (output, context) => {
1313
951
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1314
- return de_DeleteAddonCommandError(output, context);
952
+ return de_CommandError(output, context);
1315
953
  }
1316
954
  const contents = map({
1317
955
  $metadata: deserializeMetadata(output),
@@ -1323,40 +961,9 @@ export const de_DeleteAddonCommand = async (output, context) => {
1323
961
  Object.assign(contents, doc);
1324
962
  return contents;
1325
963
  };
1326
- const de_DeleteAddonCommandError = async (output, context) => {
1327
- const parsedOutput = {
1328
- ...output,
1329
- body: await parseErrorBody(output.body, context),
1330
- };
1331
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1332
- switch (errorCode) {
1333
- case "ClientException":
1334
- case "com.amazonaws.eks#ClientException":
1335
- throw await de_ClientExceptionRes(parsedOutput, context);
1336
- case "InvalidParameterException":
1337
- case "com.amazonaws.eks#InvalidParameterException":
1338
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1339
- case "InvalidRequestException":
1340
- case "com.amazonaws.eks#InvalidRequestException":
1341
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1342
- case "ResourceNotFoundException":
1343
- case "com.amazonaws.eks#ResourceNotFoundException":
1344
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1345
- case "ServerException":
1346
- case "com.amazonaws.eks#ServerException":
1347
- throw await de_ServerExceptionRes(parsedOutput, context);
1348
- default:
1349
- const parsedBody = parsedOutput.body;
1350
- return throwDefaultError({
1351
- output,
1352
- parsedBody,
1353
- errorCode,
1354
- });
1355
- }
1356
- };
1357
964
  export const de_DeleteClusterCommand = async (output, context) => {
1358
965
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1359
- return de_DeleteClusterCommandError(output, context);
966
+ return de_CommandError(output, context);
1360
967
  }
1361
968
  const contents = map({
1362
969
  $metadata: deserializeMetadata(output),
@@ -1368,40 +975,9 @@ export const de_DeleteClusterCommand = async (output, context) => {
1368
975
  Object.assign(contents, doc);
1369
976
  return contents;
1370
977
  };
1371
- const de_DeleteClusterCommandError = async (output, context) => {
1372
- const parsedOutput = {
1373
- ...output,
1374
- body: await parseErrorBody(output.body, context),
1375
- };
1376
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1377
- switch (errorCode) {
1378
- case "ClientException":
1379
- case "com.amazonaws.eks#ClientException":
1380
- throw await de_ClientExceptionRes(parsedOutput, context);
1381
- case "ResourceInUseException":
1382
- case "com.amazonaws.eks#ResourceInUseException":
1383
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1384
- case "ResourceNotFoundException":
1385
- case "com.amazonaws.eks#ResourceNotFoundException":
1386
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1387
- case "ServerException":
1388
- case "com.amazonaws.eks#ServerException":
1389
- throw await de_ServerExceptionRes(parsedOutput, context);
1390
- case "ServiceUnavailableException":
1391
- case "com.amazonaws.eks#ServiceUnavailableException":
1392
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1393
- default:
1394
- const parsedBody = parsedOutput.body;
1395
- return throwDefaultError({
1396
- output,
1397
- parsedBody,
1398
- errorCode,
1399
- });
1400
- }
1401
- };
1402
978
  export const de_DeleteEksAnywhereSubscriptionCommand = async (output, context) => {
1403
979
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1404
- return de_DeleteEksAnywhereSubscriptionCommandError(output, context);
980
+ return de_CommandError(output, context);
1405
981
  }
1406
982
  const contents = map({
1407
983
  $metadata: deserializeMetadata(output),
@@ -1413,37 +989,9 @@ export const de_DeleteEksAnywhereSubscriptionCommand = async (output, context) =
1413
989
  Object.assign(contents, doc);
1414
990
  return contents;
1415
991
  };
1416
- const de_DeleteEksAnywhereSubscriptionCommandError = async (output, context) => {
1417
- const parsedOutput = {
1418
- ...output,
1419
- body: await parseErrorBody(output.body, context),
1420
- };
1421
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1422
- switch (errorCode) {
1423
- case "ClientException":
1424
- case "com.amazonaws.eks#ClientException":
1425
- throw await de_ClientExceptionRes(parsedOutput, context);
1426
- case "InvalidRequestException":
1427
- case "com.amazonaws.eks#InvalidRequestException":
1428
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1429
- case "ResourceNotFoundException":
1430
- case "com.amazonaws.eks#ResourceNotFoundException":
1431
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1432
- case "ServerException":
1433
- case "com.amazonaws.eks#ServerException":
1434
- throw await de_ServerExceptionRes(parsedOutput, context);
1435
- default:
1436
- const parsedBody = parsedOutput.body;
1437
- return throwDefaultError({
1438
- output,
1439
- parsedBody,
1440
- errorCode,
1441
- });
1442
- }
1443
- };
1444
992
  export const de_DeleteFargateProfileCommand = async (output, context) => {
1445
993
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1446
- return de_DeleteFargateProfileCommandError(output, context);
994
+ return de_CommandError(output, context);
1447
995
  }
1448
996
  const contents = map({
1449
997
  $metadata: deserializeMetadata(output),
@@ -1455,37 +1003,9 @@ export const de_DeleteFargateProfileCommand = async (output, context) => {
1455
1003
  Object.assign(contents, doc);
1456
1004
  return contents;
1457
1005
  };
1458
- const de_DeleteFargateProfileCommandError = async (output, context) => {
1459
- const parsedOutput = {
1460
- ...output,
1461
- body: await parseErrorBody(output.body, context),
1462
- };
1463
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1464
- switch (errorCode) {
1465
- case "ClientException":
1466
- case "com.amazonaws.eks#ClientException":
1467
- throw await de_ClientExceptionRes(parsedOutput, context);
1468
- case "InvalidParameterException":
1469
- case "com.amazonaws.eks#InvalidParameterException":
1470
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1471
- case "ResourceNotFoundException":
1472
- case "com.amazonaws.eks#ResourceNotFoundException":
1473
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1474
- case "ServerException":
1475
- case "com.amazonaws.eks#ServerException":
1476
- throw await de_ServerExceptionRes(parsedOutput, context);
1477
- default:
1478
- const parsedBody = parsedOutput.body;
1479
- return throwDefaultError({
1480
- output,
1481
- parsedBody,
1482
- errorCode,
1483
- });
1484
- }
1485
- };
1486
1006
  export const de_DeleteNodegroupCommand = async (output, context) => {
1487
1007
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1488
- return de_DeleteNodegroupCommandError(output, context);
1008
+ return de_CommandError(output, context);
1489
1009
  }
1490
1010
  const contents = map({
1491
1011
  $metadata: deserializeMetadata(output),
@@ -1497,43 +1017,9 @@ export const de_DeleteNodegroupCommand = async (output, context) => {
1497
1017
  Object.assign(contents, doc);
1498
1018
  return contents;
1499
1019
  };
1500
- const de_DeleteNodegroupCommandError = async (output, context) => {
1501
- const parsedOutput = {
1502
- ...output,
1503
- body: await parseErrorBody(output.body, context),
1504
- };
1505
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1506
- switch (errorCode) {
1507
- case "ClientException":
1508
- case "com.amazonaws.eks#ClientException":
1509
- throw await de_ClientExceptionRes(parsedOutput, context);
1510
- case "InvalidParameterException":
1511
- case "com.amazonaws.eks#InvalidParameterException":
1512
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1513
- case "ResourceInUseException":
1514
- case "com.amazonaws.eks#ResourceInUseException":
1515
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1516
- case "ResourceNotFoundException":
1517
- case "com.amazonaws.eks#ResourceNotFoundException":
1518
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1519
- case "ServerException":
1520
- case "com.amazonaws.eks#ServerException":
1521
- throw await de_ServerExceptionRes(parsedOutput, context);
1522
- case "ServiceUnavailableException":
1523
- case "com.amazonaws.eks#ServiceUnavailableException":
1524
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1525
- default:
1526
- const parsedBody = parsedOutput.body;
1527
- return throwDefaultError({
1528
- output,
1529
- parsedBody,
1530
- errorCode,
1531
- });
1532
- }
1533
- };
1534
1020
  export const de_DeletePodIdentityAssociationCommand = async (output, context) => {
1535
1021
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1536
- return de_DeletePodIdentityAssociationCommandError(output, context);
1022
+ return de_CommandError(output, context);
1537
1023
  }
1538
1024
  const contents = map({
1539
1025
  $metadata: deserializeMetadata(output),
@@ -1545,37 +1031,9 @@ export const de_DeletePodIdentityAssociationCommand = async (output, context) =>
1545
1031
  Object.assign(contents, doc);
1546
1032
  return contents;
1547
1033
  };
1548
- const de_DeletePodIdentityAssociationCommandError = async (output, context) => {
1549
- const parsedOutput = {
1550
- ...output,
1551
- body: await parseErrorBody(output.body, context),
1552
- };
1553
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1554
- switch (errorCode) {
1555
- case "InvalidParameterException":
1556
- case "com.amazonaws.eks#InvalidParameterException":
1557
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1558
- case "InvalidRequestException":
1559
- case "com.amazonaws.eks#InvalidRequestException":
1560
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1561
- case "ResourceNotFoundException":
1562
- case "com.amazonaws.eks#ResourceNotFoundException":
1563
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1564
- case "ServerException":
1565
- case "com.amazonaws.eks#ServerException":
1566
- throw await de_ServerExceptionRes(parsedOutput, context);
1567
- default:
1568
- const parsedBody = parsedOutput.body;
1569
- return throwDefaultError({
1570
- output,
1571
- parsedBody,
1572
- errorCode,
1573
- });
1574
- }
1575
- };
1576
1034
  export const de_DeregisterClusterCommand = async (output, context) => {
1577
1035
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1578
- return de_DeregisterClusterCommandError(output, context);
1036
+ return de_CommandError(output, context);
1579
1037
  }
1580
1038
  const contents = map({
1581
1039
  $metadata: deserializeMetadata(output),
@@ -1587,43 +1045,9 @@ export const de_DeregisterClusterCommand = async (output, context) => {
1587
1045
  Object.assign(contents, doc);
1588
1046
  return contents;
1589
1047
  };
1590
- const de_DeregisterClusterCommandError = async (output, context) => {
1591
- const parsedOutput = {
1592
- ...output,
1593
- body: await parseErrorBody(output.body, context),
1594
- };
1595
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1596
- switch (errorCode) {
1597
- case "AccessDeniedException":
1598
- case "com.amazonaws.eks#AccessDeniedException":
1599
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1600
- case "ClientException":
1601
- case "com.amazonaws.eks#ClientException":
1602
- throw await de_ClientExceptionRes(parsedOutput, context);
1603
- case "ResourceInUseException":
1604
- case "com.amazonaws.eks#ResourceInUseException":
1605
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1606
- case "ResourceNotFoundException":
1607
- case "com.amazonaws.eks#ResourceNotFoundException":
1608
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1609
- case "ServerException":
1610
- case "com.amazonaws.eks#ServerException":
1611
- throw await de_ServerExceptionRes(parsedOutput, context);
1612
- case "ServiceUnavailableException":
1613
- case "com.amazonaws.eks#ServiceUnavailableException":
1614
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1615
- default:
1616
- const parsedBody = parsedOutput.body;
1617
- return throwDefaultError({
1618
- output,
1619
- parsedBody,
1620
- errorCode,
1621
- });
1622
- }
1623
- };
1624
1048
  export const de_DescribeAccessEntryCommand = async (output, context) => {
1625
1049
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1626
- return de_DescribeAccessEntryCommandError(output, context);
1050
+ return de_CommandError(output, context);
1627
1051
  }
1628
1052
  const contents = map({
1629
1053
  $metadata: deserializeMetadata(output),
@@ -1635,34 +1059,9 @@ export const de_DescribeAccessEntryCommand = async (output, context) => {
1635
1059
  Object.assign(contents, doc);
1636
1060
  return contents;
1637
1061
  };
1638
- const de_DescribeAccessEntryCommandError = async (output, context) => {
1639
- const parsedOutput = {
1640
- ...output,
1641
- body: await parseErrorBody(output.body, context),
1642
- };
1643
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1644
- switch (errorCode) {
1645
- case "InvalidRequestException":
1646
- case "com.amazonaws.eks#InvalidRequestException":
1647
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1648
- case "ResourceNotFoundException":
1649
- case "com.amazonaws.eks#ResourceNotFoundException":
1650
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1651
- case "ServerException":
1652
- case "com.amazonaws.eks#ServerException":
1653
- throw await de_ServerExceptionRes(parsedOutput, context);
1654
- default:
1655
- const parsedBody = parsedOutput.body;
1656
- return throwDefaultError({
1657
- output,
1658
- parsedBody,
1659
- errorCode,
1660
- });
1661
- }
1662
- };
1663
1062
  export const de_DescribeAddonCommand = async (output, context) => {
1664
1063
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1665
- return de_DescribeAddonCommandError(output, context);
1064
+ return de_CommandError(output, context);
1666
1065
  }
1667
1066
  const contents = map({
1668
1067
  $metadata: deserializeMetadata(output),
@@ -1674,40 +1073,9 @@ export const de_DescribeAddonCommand = async (output, context) => {
1674
1073
  Object.assign(contents, doc);
1675
1074
  return contents;
1676
1075
  };
1677
- const de_DescribeAddonCommandError = async (output, context) => {
1678
- const parsedOutput = {
1679
- ...output,
1680
- body: await parseErrorBody(output.body, context),
1681
- };
1682
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1683
- switch (errorCode) {
1684
- case "ClientException":
1685
- case "com.amazonaws.eks#ClientException":
1686
- throw await de_ClientExceptionRes(parsedOutput, context);
1687
- case "InvalidParameterException":
1688
- case "com.amazonaws.eks#InvalidParameterException":
1689
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1690
- case "InvalidRequestException":
1691
- case "com.amazonaws.eks#InvalidRequestException":
1692
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1693
- case "ResourceNotFoundException":
1694
- case "com.amazonaws.eks#ResourceNotFoundException":
1695
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1696
- case "ServerException":
1697
- case "com.amazonaws.eks#ServerException":
1698
- throw await de_ServerExceptionRes(parsedOutput, context);
1699
- default:
1700
- const parsedBody = parsedOutput.body;
1701
- return throwDefaultError({
1702
- output,
1703
- parsedBody,
1704
- errorCode,
1705
- });
1706
- }
1707
- };
1708
1076
  export const de_DescribeAddonConfigurationCommand = async (output, context) => {
1709
1077
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1710
- return de_DescribeAddonConfigurationCommandError(output, context);
1078
+ return de_CommandError(output, context);
1711
1079
  }
1712
1080
  const contents = map({
1713
1081
  $metadata: deserializeMetadata(output),
@@ -1721,34 +1089,9 @@ export const de_DescribeAddonConfigurationCommand = async (output, context) => {
1721
1089
  Object.assign(contents, doc);
1722
1090
  return contents;
1723
1091
  };
1724
- const de_DescribeAddonConfigurationCommandError = async (output, context) => {
1725
- const parsedOutput = {
1726
- ...output,
1727
- body: await parseErrorBody(output.body, context),
1728
- };
1729
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1730
- switch (errorCode) {
1731
- case "InvalidParameterException":
1732
- case "com.amazonaws.eks#InvalidParameterException":
1733
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1734
- case "ResourceNotFoundException":
1735
- case "com.amazonaws.eks#ResourceNotFoundException":
1736
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1737
- case "ServerException":
1738
- case "com.amazonaws.eks#ServerException":
1739
- throw await de_ServerExceptionRes(parsedOutput, context);
1740
- default:
1741
- const parsedBody = parsedOutput.body;
1742
- return throwDefaultError({
1743
- output,
1744
- parsedBody,
1745
- errorCode,
1746
- });
1747
- }
1748
- };
1749
1092
  export const de_DescribeAddonVersionsCommand = async (output, context) => {
1750
1093
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1751
- return de_DescribeAddonVersionsCommandError(output, context);
1094
+ return de_CommandError(output, context);
1752
1095
  }
1753
1096
  const contents = map({
1754
1097
  $metadata: deserializeMetadata(output),
@@ -1761,34 +1104,9 @@ export const de_DescribeAddonVersionsCommand = async (output, context) => {
1761
1104
  Object.assign(contents, doc);
1762
1105
  return contents;
1763
1106
  };
1764
- const de_DescribeAddonVersionsCommandError = async (output, context) => {
1765
- const parsedOutput = {
1766
- ...output,
1767
- body: await parseErrorBody(output.body, context),
1768
- };
1769
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1770
- switch (errorCode) {
1771
- case "InvalidParameterException":
1772
- case "com.amazonaws.eks#InvalidParameterException":
1773
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1774
- case "ResourceNotFoundException":
1775
- case "com.amazonaws.eks#ResourceNotFoundException":
1776
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1777
- case "ServerException":
1778
- case "com.amazonaws.eks#ServerException":
1779
- throw await de_ServerExceptionRes(parsedOutput, context);
1780
- default:
1781
- const parsedBody = parsedOutput.body;
1782
- return throwDefaultError({
1783
- output,
1784
- parsedBody,
1785
- errorCode,
1786
- });
1787
- }
1788
- };
1789
1107
  export const de_DescribeClusterCommand = async (output, context) => {
1790
1108
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1791
- return de_DescribeClusterCommandError(output, context);
1109
+ return de_CommandError(output, context);
1792
1110
  }
1793
1111
  const contents = map({
1794
1112
  $metadata: deserializeMetadata(output),
@@ -1800,37 +1118,9 @@ export const de_DescribeClusterCommand = async (output, context) => {
1800
1118
  Object.assign(contents, doc);
1801
1119
  return contents;
1802
1120
  };
1803
- const de_DescribeClusterCommandError = async (output, context) => {
1804
- const parsedOutput = {
1805
- ...output,
1806
- body: await parseErrorBody(output.body, context),
1807
- };
1808
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1809
- switch (errorCode) {
1810
- case "ClientException":
1811
- case "com.amazonaws.eks#ClientException":
1812
- throw await de_ClientExceptionRes(parsedOutput, context);
1813
- case "ResourceNotFoundException":
1814
- case "com.amazonaws.eks#ResourceNotFoundException":
1815
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1816
- case "ServerException":
1817
- case "com.amazonaws.eks#ServerException":
1818
- throw await de_ServerExceptionRes(parsedOutput, context);
1819
- case "ServiceUnavailableException":
1820
- case "com.amazonaws.eks#ServiceUnavailableException":
1821
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1822
- default:
1823
- const parsedBody = parsedOutput.body;
1824
- return throwDefaultError({
1825
- output,
1826
- parsedBody,
1827
- errorCode,
1828
- });
1829
- }
1830
- };
1831
1121
  export const de_DescribeEksAnywhereSubscriptionCommand = async (output, context) => {
1832
1122
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1833
- return de_DescribeEksAnywhereSubscriptionCommandError(output, context);
1123
+ return de_CommandError(output, context);
1834
1124
  }
1835
1125
  const contents = map({
1836
1126
  $metadata: deserializeMetadata(output),
@@ -1842,37 +1132,9 @@ export const de_DescribeEksAnywhereSubscriptionCommand = async (output, context)
1842
1132
  Object.assign(contents, doc);
1843
1133
  return contents;
1844
1134
  };
1845
- const de_DescribeEksAnywhereSubscriptionCommandError = async (output, context) => {
1846
- const parsedOutput = {
1847
- ...output,
1848
- body: await parseErrorBody(output.body, context),
1849
- };
1850
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1851
- switch (errorCode) {
1852
- case "ClientException":
1853
- case "com.amazonaws.eks#ClientException":
1854
- throw await de_ClientExceptionRes(parsedOutput, context);
1855
- case "ResourceNotFoundException":
1856
- case "com.amazonaws.eks#ResourceNotFoundException":
1857
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1858
- case "ServerException":
1859
- case "com.amazonaws.eks#ServerException":
1860
- throw await de_ServerExceptionRes(parsedOutput, context);
1861
- case "ServiceUnavailableException":
1862
- case "com.amazonaws.eks#ServiceUnavailableException":
1863
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1864
- default:
1865
- const parsedBody = parsedOutput.body;
1866
- return throwDefaultError({
1867
- output,
1868
- parsedBody,
1869
- errorCode,
1870
- });
1871
- }
1872
- };
1873
1135
  export const de_DescribeFargateProfileCommand = async (output, context) => {
1874
1136
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1875
- return de_DescribeFargateProfileCommandError(output, context);
1137
+ return de_CommandError(output, context);
1876
1138
  }
1877
1139
  const contents = map({
1878
1140
  $metadata: deserializeMetadata(output),
@@ -1884,37 +1146,9 @@ export const de_DescribeFargateProfileCommand = async (output, context) => {
1884
1146
  Object.assign(contents, doc);
1885
1147
  return contents;
1886
1148
  };
1887
- const de_DescribeFargateProfileCommandError = async (output, context) => {
1888
- const parsedOutput = {
1889
- ...output,
1890
- body: await parseErrorBody(output.body, context),
1891
- };
1892
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1893
- switch (errorCode) {
1894
- case "ClientException":
1895
- case "com.amazonaws.eks#ClientException":
1896
- throw await de_ClientExceptionRes(parsedOutput, context);
1897
- case "InvalidParameterException":
1898
- case "com.amazonaws.eks#InvalidParameterException":
1899
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1900
- case "ResourceNotFoundException":
1901
- case "com.amazonaws.eks#ResourceNotFoundException":
1902
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1903
- case "ServerException":
1904
- case "com.amazonaws.eks#ServerException":
1905
- throw await de_ServerExceptionRes(parsedOutput, context);
1906
- default:
1907
- const parsedBody = parsedOutput.body;
1908
- return throwDefaultError({
1909
- output,
1910
- parsedBody,
1911
- errorCode,
1912
- });
1913
- }
1914
- };
1915
1149
  export const de_DescribeIdentityProviderConfigCommand = async (output, context) => {
1916
1150
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1917
- return de_DescribeIdentityProviderConfigCommandError(output, context);
1151
+ return de_CommandError(output, context);
1918
1152
  }
1919
1153
  const contents = map({
1920
1154
  $metadata: deserializeMetadata(output),
@@ -1926,40 +1160,9 @@ export const de_DescribeIdentityProviderConfigCommand = async (output, context)
1926
1160
  Object.assign(contents, doc);
1927
1161
  return contents;
1928
1162
  };
1929
- const de_DescribeIdentityProviderConfigCommandError = async (output, context) => {
1930
- const parsedOutput = {
1931
- ...output,
1932
- body: await parseErrorBody(output.body, context),
1933
- };
1934
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1935
- switch (errorCode) {
1936
- case "ClientException":
1937
- case "com.amazonaws.eks#ClientException":
1938
- throw await de_ClientExceptionRes(parsedOutput, context);
1939
- case "InvalidParameterException":
1940
- case "com.amazonaws.eks#InvalidParameterException":
1941
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1942
- case "ResourceNotFoundException":
1943
- case "com.amazonaws.eks#ResourceNotFoundException":
1944
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1945
- case "ServerException":
1946
- case "com.amazonaws.eks#ServerException":
1947
- throw await de_ServerExceptionRes(parsedOutput, context);
1948
- case "ServiceUnavailableException":
1949
- case "com.amazonaws.eks#ServiceUnavailableException":
1950
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1951
- default:
1952
- const parsedBody = parsedOutput.body;
1953
- return throwDefaultError({
1954
- output,
1955
- parsedBody,
1956
- errorCode,
1957
- });
1958
- }
1959
- };
1960
1163
  export const de_DescribeInsightCommand = async (output, context) => {
1961
1164
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1962
- return de_DescribeInsightCommandError(output, context);
1165
+ return de_CommandError(output, context);
1963
1166
  }
1964
1167
  const contents = map({
1965
1168
  $metadata: deserializeMetadata(output),
@@ -1971,37 +1174,9 @@ export const de_DescribeInsightCommand = async (output, context) => {
1971
1174
  Object.assign(contents, doc);
1972
1175
  return contents;
1973
1176
  };
1974
- const de_DescribeInsightCommandError = async (output, context) => {
1975
- const parsedOutput = {
1976
- ...output,
1977
- body: await parseErrorBody(output.body, context),
1978
- };
1979
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1980
- switch (errorCode) {
1981
- case "InvalidParameterException":
1982
- case "com.amazonaws.eks#InvalidParameterException":
1983
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1984
- case "InvalidRequestException":
1985
- case "com.amazonaws.eks#InvalidRequestException":
1986
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
1987
- case "ResourceNotFoundException":
1988
- case "com.amazonaws.eks#ResourceNotFoundException":
1989
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1990
- case "ServerException":
1991
- case "com.amazonaws.eks#ServerException":
1992
- throw await de_ServerExceptionRes(parsedOutput, context);
1993
- default:
1994
- const parsedBody = parsedOutput.body;
1995
- return throwDefaultError({
1996
- output,
1997
- parsedBody,
1998
- errorCode,
1999
- });
2000
- }
2001
- };
2002
1177
  export const de_DescribeNodegroupCommand = async (output, context) => {
2003
1178
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2004
- return de_DescribeNodegroupCommandError(output, context);
1179
+ return de_CommandError(output, context);
2005
1180
  }
2006
1181
  const contents = map({
2007
1182
  $metadata: deserializeMetadata(output),
@@ -2013,40 +1188,9 @@ export const de_DescribeNodegroupCommand = async (output, context) => {
2013
1188
  Object.assign(contents, doc);
2014
1189
  return contents;
2015
1190
  };
2016
- const de_DescribeNodegroupCommandError = async (output, context) => {
2017
- const parsedOutput = {
2018
- ...output,
2019
- body: await parseErrorBody(output.body, context),
2020
- };
2021
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2022
- switch (errorCode) {
2023
- case "ClientException":
2024
- case "com.amazonaws.eks#ClientException":
2025
- throw await de_ClientExceptionRes(parsedOutput, context);
2026
- case "InvalidParameterException":
2027
- case "com.amazonaws.eks#InvalidParameterException":
2028
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2029
- case "ResourceNotFoundException":
2030
- case "com.amazonaws.eks#ResourceNotFoundException":
2031
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2032
- case "ServerException":
2033
- case "com.amazonaws.eks#ServerException":
2034
- throw await de_ServerExceptionRes(parsedOutput, context);
2035
- case "ServiceUnavailableException":
2036
- case "com.amazonaws.eks#ServiceUnavailableException":
2037
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2038
- default:
2039
- const parsedBody = parsedOutput.body;
2040
- return throwDefaultError({
2041
- output,
2042
- parsedBody,
2043
- errorCode,
2044
- });
2045
- }
2046
- };
2047
1191
  export const de_DescribePodIdentityAssociationCommand = async (output, context) => {
2048
1192
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2049
- return de_DescribePodIdentityAssociationCommandError(output, context);
1193
+ return de_CommandError(output, context);
2050
1194
  }
2051
1195
  const contents = map({
2052
1196
  $metadata: deserializeMetadata(output),
@@ -2056,81 +1200,25 @@ export const de_DescribePodIdentityAssociationCommand = async (output, context)
2056
1200
  association: (_) => de_PodIdentityAssociation(_, context),
2057
1201
  });
2058
1202
  Object.assign(contents, doc);
2059
- return contents;
2060
- };
2061
- const de_DescribePodIdentityAssociationCommandError = async (output, context) => {
2062
- const parsedOutput = {
2063
- ...output,
2064
- body: await parseErrorBody(output.body, context),
2065
- };
2066
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2067
- switch (errorCode) {
2068
- case "InvalidParameterException":
2069
- case "com.amazonaws.eks#InvalidParameterException":
2070
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2071
- case "InvalidRequestException":
2072
- case "com.amazonaws.eks#InvalidRequestException":
2073
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2074
- case "ResourceNotFoundException":
2075
- case "com.amazonaws.eks#ResourceNotFoundException":
2076
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2077
- case "ServerException":
2078
- case "com.amazonaws.eks#ServerException":
2079
- throw await de_ServerExceptionRes(parsedOutput, context);
2080
- default:
2081
- const parsedBody = parsedOutput.body;
2082
- return throwDefaultError({
2083
- output,
2084
- parsedBody,
2085
- errorCode,
2086
- });
2087
- }
2088
- };
2089
- export const de_DescribeUpdateCommand = async (output, context) => {
2090
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2091
- return de_DescribeUpdateCommandError(output, context);
2092
- }
2093
- const contents = map({
2094
- $metadata: deserializeMetadata(output),
2095
- });
2096
- const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2097
- const doc = take(data, {
2098
- update: (_) => de_Update(_, context),
2099
- });
2100
- Object.assign(contents, doc);
2101
- return contents;
2102
- };
2103
- const de_DescribeUpdateCommandError = async (output, context) => {
2104
- const parsedOutput = {
2105
- ...output,
2106
- body: await parseErrorBody(output.body, context),
2107
- };
2108
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2109
- switch (errorCode) {
2110
- case "ClientException":
2111
- case "com.amazonaws.eks#ClientException":
2112
- throw await de_ClientExceptionRes(parsedOutput, context);
2113
- case "InvalidParameterException":
2114
- case "com.amazonaws.eks#InvalidParameterException":
2115
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2116
- case "ResourceNotFoundException":
2117
- case "com.amazonaws.eks#ResourceNotFoundException":
2118
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2119
- case "ServerException":
2120
- case "com.amazonaws.eks#ServerException":
2121
- throw await de_ServerExceptionRes(parsedOutput, context);
2122
- default:
2123
- const parsedBody = parsedOutput.body;
2124
- return throwDefaultError({
2125
- output,
2126
- parsedBody,
2127
- errorCode,
2128
- });
1203
+ return contents;
1204
+ };
1205
+ export const de_DescribeUpdateCommand = async (output, context) => {
1206
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1207
+ return de_CommandError(output, context);
2129
1208
  }
1209
+ const contents = map({
1210
+ $metadata: deserializeMetadata(output),
1211
+ });
1212
+ const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
1213
+ const doc = take(data, {
1214
+ update: (_) => de_Update(_, context),
1215
+ });
1216
+ Object.assign(contents, doc);
1217
+ return contents;
2130
1218
  };
2131
1219
  export const de_DisassociateAccessPolicyCommand = async (output, context) => {
2132
1220
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2133
- return de_DisassociateAccessPolicyCommandError(output, context);
1221
+ return de_CommandError(output, context);
2134
1222
  }
2135
1223
  const contents = map({
2136
1224
  $metadata: deserializeMetadata(output),
@@ -2138,34 +1226,9 @@ export const de_DisassociateAccessPolicyCommand = async (output, context) => {
2138
1226
  await collectBody(output.body, context);
2139
1227
  return contents;
2140
1228
  };
2141
- const de_DisassociateAccessPolicyCommandError = async (output, context) => {
2142
- const parsedOutput = {
2143
- ...output,
2144
- body: await parseErrorBody(output.body, context),
2145
- };
2146
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2147
- switch (errorCode) {
2148
- case "InvalidRequestException":
2149
- case "com.amazonaws.eks#InvalidRequestException":
2150
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2151
- case "ResourceNotFoundException":
2152
- case "com.amazonaws.eks#ResourceNotFoundException":
2153
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2154
- case "ServerException":
2155
- case "com.amazonaws.eks#ServerException":
2156
- throw await de_ServerExceptionRes(parsedOutput, context);
2157
- default:
2158
- const parsedBody = parsedOutput.body;
2159
- return throwDefaultError({
2160
- output,
2161
- parsedBody,
2162
- errorCode,
2163
- });
2164
- }
2165
- };
2166
1229
  export const de_DisassociateIdentityProviderConfigCommand = async (output, context) => {
2167
1230
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2168
- return de_DisassociateIdentityProviderConfigCommandError(output, context);
1231
+ return de_CommandError(output, context);
2169
1232
  }
2170
1233
  const contents = map({
2171
1234
  $metadata: deserializeMetadata(output),
@@ -2177,43 +1240,9 @@ export const de_DisassociateIdentityProviderConfigCommand = async (output, conte
2177
1240
  Object.assign(contents, doc);
2178
1241
  return contents;
2179
1242
  };
2180
- const de_DisassociateIdentityProviderConfigCommandError = async (output, context) => {
2181
- const parsedOutput = {
2182
- ...output,
2183
- body: await parseErrorBody(output.body, context),
2184
- };
2185
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2186
- switch (errorCode) {
2187
- case "ClientException":
2188
- case "com.amazonaws.eks#ClientException":
2189
- throw await de_ClientExceptionRes(parsedOutput, context);
2190
- case "InvalidParameterException":
2191
- case "com.amazonaws.eks#InvalidParameterException":
2192
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2193
- case "InvalidRequestException":
2194
- case "com.amazonaws.eks#InvalidRequestException":
2195
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2196
- case "ResourceInUseException":
2197
- case "com.amazonaws.eks#ResourceInUseException":
2198
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2199
- case "ResourceNotFoundException":
2200
- case "com.amazonaws.eks#ResourceNotFoundException":
2201
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2202
- case "ServerException":
2203
- case "com.amazonaws.eks#ServerException":
2204
- throw await de_ServerExceptionRes(parsedOutput, context);
2205
- default:
2206
- const parsedBody = parsedOutput.body;
2207
- return throwDefaultError({
2208
- output,
2209
- parsedBody,
2210
- errorCode,
2211
- });
2212
- }
2213
- };
2214
1243
  export const de_ListAccessEntriesCommand = async (output, context) => {
2215
1244
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2216
- return de_ListAccessEntriesCommandError(output, context);
1245
+ return de_CommandError(output, context);
2217
1246
  }
2218
1247
  const contents = map({
2219
1248
  $metadata: deserializeMetadata(output),
@@ -2226,37 +1255,9 @@ export const de_ListAccessEntriesCommand = async (output, context) => {
2226
1255
  Object.assign(contents, doc);
2227
1256
  return contents;
2228
1257
  };
2229
- const de_ListAccessEntriesCommandError = async (output, context) => {
2230
- const parsedOutput = {
2231
- ...output,
2232
- body: await parseErrorBody(output.body, context),
2233
- };
2234
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2235
- switch (errorCode) {
2236
- case "InvalidParameterException":
2237
- case "com.amazonaws.eks#InvalidParameterException":
2238
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2239
- case "InvalidRequestException":
2240
- case "com.amazonaws.eks#InvalidRequestException":
2241
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2242
- case "ResourceNotFoundException":
2243
- case "com.amazonaws.eks#ResourceNotFoundException":
2244
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2245
- case "ServerException":
2246
- case "com.amazonaws.eks#ServerException":
2247
- throw await de_ServerExceptionRes(parsedOutput, context);
2248
- default:
2249
- const parsedBody = parsedOutput.body;
2250
- return throwDefaultError({
2251
- output,
2252
- parsedBody,
2253
- errorCode,
2254
- });
2255
- }
2256
- };
2257
1258
  export const de_ListAccessPoliciesCommand = async (output, context) => {
2258
1259
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2259
- return de_ListAccessPoliciesCommandError(output, context);
1260
+ return de_CommandError(output, context);
2260
1261
  }
2261
1262
  const contents = map({
2262
1263
  $metadata: deserializeMetadata(output),
@@ -2269,28 +1270,9 @@ export const de_ListAccessPoliciesCommand = async (output, context) => {
2269
1270
  Object.assign(contents, doc);
2270
1271
  return contents;
2271
1272
  };
2272
- const de_ListAccessPoliciesCommandError = async (output, context) => {
2273
- const parsedOutput = {
2274
- ...output,
2275
- body: await parseErrorBody(output.body, context),
2276
- };
2277
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2278
- switch (errorCode) {
2279
- case "ServerException":
2280
- case "com.amazonaws.eks#ServerException":
2281
- throw await de_ServerExceptionRes(parsedOutput, context);
2282
- default:
2283
- const parsedBody = parsedOutput.body;
2284
- return throwDefaultError({
2285
- output,
2286
- parsedBody,
2287
- errorCode,
2288
- });
2289
- }
2290
- };
2291
1273
  export const de_ListAddonsCommand = async (output, context) => {
2292
1274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2293
- return de_ListAddonsCommandError(output, context);
1275
+ return de_CommandError(output, context);
2294
1276
  }
2295
1277
  const contents = map({
2296
1278
  $metadata: deserializeMetadata(output),
@@ -2303,40 +1285,9 @@ export const de_ListAddonsCommand = async (output, context) => {
2303
1285
  Object.assign(contents, doc);
2304
1286
  return contents;
2305
1287
  };
2306
- const de_ListAddonsCommandError = async (output, context) => {
2307
- const parsedOutput = {
2308
- ...output,
2309
- body: await parseErrorBody(output.body, context),
2310
- };
2311
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2312
- switch (errorCode) {
2313
- case "ClientException":
2314
- case "com.amazonaws.eks#ClientException":
2315
- throw await de_ClientExceptionRes(parsedOutput, context);
2316
- case "InvalidParameterException":
2317
- case "com.amazonaws.eks#InvalidParameterException":
2318
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2319
- case "InvalidRequestException":
2320
- case "com.amazonaws.eks#InvalidRequestException":
2321
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2322
- case "ResourceNotFoundException":
2323
- case "com.amazonaws.eks#ResourceNotFoundException":
2324
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2325
- case "ServerException":
2326
- case "com.amazonaws.eks#ServerException":
2327
- throw await de_ServerExceptionRes(parsedOutput, context);
2328
- default:
2329
- const parsedBody = parsedOutput.body;
2330
- return throwDefaultError({
2331
- output,
2332
- parsedBody,
2333
- errorCode,
2334
- });
2335
- }
2336
- };
2337
1288
  export const de_ListAssociatedAccessPoliciesCommand = async (output, context) => {
2338
1289
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2339
- return de_ListAssociatedAccessPoliciesCommandError(output, context);
1290
+ return de_CommandError(output, context);
2340
1291
  }
2341
1292
  const contents = map({
2342
1293
  $metadata: deserializeMetadata(output),
@@ -2351,34 +1302,9 @@ export const de_ListAssociatedAccessPoliciesCommand = async (output, context) =>
2351
1302
  Object.assign(contents, doc);
2352
1303
  return contents;
2353
1304
  };
2354
- const de_ListAssociatedAccessPoliciesCommandError = async (output, context) => {
2355
- const parsedOutput = {
2356
- ...output,
2357
- body: await parseErrorBody(output.body, context),
2358
- };
2359
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2360
- switch (errorCode) {
2361
- case "InvalidRequestException":
2362
- case "com.amazonaws.eks#InvalidRequestException":
2363
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2364
- case "ResourceNotFoundException":
2365
- case "com.amazonaws.eks#ResourceNotFoundException":
2366
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2367
- case "ServerException":
2368
- case "com.amazonaws.eks#ServerException":
2369
- throw await de_ServerExceptionRes(parsedOutput, context);
2370
- default:
2371
- const parsedBody = parsedOutput.body;
2372
- return throwDefaultError({
2373
- output,
2374
- parsedBody,
2375
- errorCode,
2376
- });
2377
- }
2378
- };
2379
1305
  export const de_ListClustersCommand = async (output, context) => {
2380
1306
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2381
- return de_ListClustersCommandError(output, context);
1307
+ return de_CommandError(output, context);
2382
1308
  }
2383
1309
  const contents = map({
2384
1310
  $metadata: deserializeMetadata(output),
@@ -2391,37 +1317,9 @@ export const de_ListClustersCommand = async (output, context) => {
2391
1317
  Object.assign(contents, doc);
2392
1318
  return contents;
2393
1319
  };
2394
- const de_ListClustersCommandError = async (output, context) => {
2395
- const parsedOutput = {
2396
- ...output,
2397
- body: await parseErrorBody(output.body, context),
2398
- };
2399
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2400
- switch (errorCode) {
2401
- case "ClientException":
2402
- case "com.amazonaws.eks#ClientException":
2403
- throw await de_ClientExceptionRes(parsedOutput, context);
2404
- case "InvalidParameterException":
2405
- case "com.amazonaws.eks#InvalidParameterException":
2406
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2407
- case "ServerException":
2408
- case "com.amazonaws.eks#ServerException":
2409
- throw await de_ServerExceptionRes(parsedOutput, context);
2410
- case "ServiceUnavailableException":
2411
- case "com.amazonaws.eks#ServiceUnavailableException":
2412
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2413
- default:
2414
- const parsedBody = parsedOutput.body;
2415
- return throwDefaultError({
2416
- output,
2417
- parsedBody,
2418
- errorCode,
2419
- });
2420
- }
2421
- };
2422
1320
  export const de_ListEksAnywhereSubscriptionsCommand = async (output, context) => {
2423
1321
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2424
- return de_ListEksAnywhereSubscriptionsCommandError(output, context);
1322
+ return de_CommandError(output, context);
2425
1323
  }
2426
1324
  const contents = map({
2427
1325
  $metadata: deserializeMetadata(output),
@@ -2434,80 +1332,24 @@ export const de_ListEksAnywhereSubscriptionsCommand = async (output, context) =>
2434
1332
  Object.assign(contents, doc);
2435
1333
  return contents;
2436
1334
  };
2437
- const de_ListEksAnywhereSubscriptionsCommandError = async (output, context) => {
2438
- const parsedOutput = {
2439
- ...output,
2440
- body: await parseErrorBody(output.body, context),
2441
- };
2442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2443
- switch (errorCode) {
2444
- case "ClientException":
2445
- case "com.amazonaws.eks#ClientException":
2446
- throw await de_ClientExceptionRes(parsedOutput, context);
2447
- case "InvalidParameterException":
2448
- case "com.amazonaws.eks#InvalidParameterException":
2449
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2450
- case "ServerException":
2451
- case "com.amazonaws.eks#ServerException":
2452
- throw await de_ServerExceptionRes(parsedOutput, context);
2453
- case "ServiceUnavailableException":
2454
- case "com.amazonaws.eks#ServiceUnavailableException":
2455
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2456
- default:
2457
- const parsedBody = parsedOutput.body;
2458
- return throwDefaultError({
2459
- output,
2460
- parsedBody,
2461
- errorCode,
2462
- });
2463
- }
2464
- };
2465
1335
  export const de_ListFargateProfilesCommand = async (output, context) => {
2466
1336
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2467
- return de_ListFargateProfilesCommandError(output, context);
1337
+ return de_CommandError(output, context);
2468
1338
  }
2469
1339
  const contents = map({
2470
1340
  $metadata: deserializeMetadata(output),
2471
1341
  });
2472
1342
  const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
2473
- const doc = take(data, {
2474
- fargateProfileNames: _json,
2475
- nextToken: __expectString,
2476
- });
2477
- Object.assign(contents, doc);
2478
- return contents;
2479
- };
2480
- const de_ListFargateProfilesCommandError = async (output, context) => {
2481
- const parsedOutput = {
2482
- ...output,
2483
- body: await parseErrorBody(output.body, context),
2484
- };
2485
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2486
- switch (errorCode) {
2487
- case "ClientException":
2488
- case "com.amazonaws.eks#ClientException":
2489
- throw await de_ClientExceptionRes(parsedOutput, context);
2490
- case "InvalidParameterException":
2491
- case "com.amazonaws.eks#InvalidParameterException":
2492
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2493
- case "ResourceNotFoundException":
2494
- case "com.amazonaws.eks#ResourceNotFoundException":
2495
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2496
- case "ServerException":
2497
- case "com.amazonaws.eks#ServerException":
2498
- throw await de_ServerExceptionRes(parsedOutput, context);
2499
- default:
2500
- const parsedBody = parsedOutput.body;
2501
- return throwDefaultError({
2502
- output,
2503
- parsedBody,
2504
- errorCode,
2505
- });
2506
- }
1343
+ const doc = take(data, {
1344
+ fargateProfileNames: _json,
1345
+ nextToken: __expectString,
1346
+ });
1347
+ Object.assign(contents, doc);
1348
+ return contents;
2507
1349
  };
2508
1350
  export const de_ListIdentityProviderConfigsCommand = async (output, context) => {
2509
1351
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2510
- return de_ListIdentityProviderConfigsCommandError(output, context);
1352
+ return de_CommandError(output, context);
2511
1353
  }
2512
1354
  const contents = map({
2513
1355
  $metadata: deserializeMetadata(output),
@@ -2520,40 +1362,9 @@ export const de_ListIdentityProviderConfigsCommand = async (output, context) =>
2520
1362
  Object.assign(contents, doc);
2521
1363
  return contents;
2522
1364
  };
2523
- const de_ListIdentityProviderConfigsCommandError = async (output, context) => {
2524
- const parsedOutput = {
2525
- ...output,
2526
- body: await parseErrorBody(output.body, context),
2527
- };
2528
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2529
- switch (errorCode) {
2530
- case "ClientException":
2531
- case "com.amazonaws.eks#ClientException":
2532
- throw await de_ClientExceptionRes(parsedOutput, context);
2533
- case "InvalidParameterException":
2534
- case "com.amazonaws.eks#InvalidParameterException":
2535
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2536
- case "ResourceNotFoundException":
2537
- case "com.amazonaws.eks#ResourceNotFoundException":
2538
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2539
- case "ServerException":
2540
- case "com.amazonaws.eks#ServerException":
2541
- throw await de_ServerExceptionRes(parsedOutput, context);
2542
- case "ServiceUnavailableException":
2543
- case "com.amazonaws.eks#ServiceUnavailableException":
2544
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2545
- default:
2546
- const parsedBody = parsedOutput.body;
2547
- return throwDefaultError({
2548
- output,
2549
- parsedBody,
2550
- errorCode,
2551
- });
2552
- }
2553
- };
2554
1365
  export const de_ListInsightsCommand = async (output, context) => {
2555
1366
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2556
- return de_ListInsightsCommandError(output, context);
1367
+ return de_CommandError(output, context);
2557
1368
  }
2558
1369
  const contents = map({
2559
1370
  $metadata: deserializeMetadata(output),
@@ -2566,37 +1377,9 @@ export const de_ListInsightsCommand = async (output, context) => {
2566
1377
  Object.assign(contents, doc);
2567
1378
  return contents;
2568
1379
  };
2569
- const de_ListInsightsCommandError = async (output, context) => {
2570
- const parsedOutput = {
2571
- ...output,
2572
- body: await parseErrorBody(output.body, context),
2573
- };
2574
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2575
- switch (errorCode) {
2576
- case "InvalidParameterException":
2577
- case "com.amazonaws.eks#InvalidParameterException":
2578
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2579
- case "InvalidRequestException":
2580
- case "com.amazonaws.eks#InvalidRequestException":
2581
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2582
- case "ResourceNotFoundException":
2583
- case "com.amazonaws.eks#ResourceNotFoundException":
2584
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2585
- case "ServerException":
2586
- case "com.amazonaws.eks#ServerException":
2587
- throw await de_ServerExceptionRes(parsedOutput, context);
2588
- default:
2589
- const parsedBody = parsedOutput.body;
2590
- return throwDefaultError({
2591
- output,
2592
- parsedBody,
2593
- errorCode,
2594
- });
2595
- }
2596
- };
2597
1380
  export const de_ListNodegroupsCommand = async (output, context) => {
2598
1381
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2599
- return de_ListNodegroupsCommandError(output, context);
1382
+ return de_CommandError(output, context);
2600
1383
  }
2601
1384
  const contents = map({
2602
1385
  $metadata: deserializeMetadata(output),
@@ -2609,40 +1392,9 @@ export const de_ListNodegroupsCommand = async (output, context) => {
2609
1392
  Object.assign(contents, doc);
2610
1393
  return contents;
2611
1394
  };
2612
- const de_ListNodegroupsCommandError = async (output, context) => {
2613
- const parsedOutput = {
2614
- ...output,
2615
- body: await parseErrorBody(output.body, context),
2616
- };
2617
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2618
- switch (errorCode) {
2619
- case "ClientException":
2620
- case "com.amazonaws.eks#ClientException":
2621
- throw await de_ClientExceptionRes(parsedOutput, context);
2622
- case "InvalidParameterException":
2623
- case "com.amazonaws.eks#InvalidParameterException":
2624
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2625
- case "ResourceNotFoundException":
2626
- case "com.amazonaws.eks#ResourceNotFoundException":
2627
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2628
- case "ServerException":
2629
- case "com.amazonaws.eks#ServerException":
2630
- throw await de_ServerExceptionRes(parsedOutput, context);
2631
- case "ServiceUnavailableException":
2632
- case "com.amazonaws.eks#ServiceUnavailableException":
2633
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2634
- default:
2635
- const parsedBody = parsedOutput.body;
2636
- return throwDefaultError({
2637
- output,
2638
- parsedBody,
2639
- errorCode,
2640
- });
2641
- }
2642
- };
2643
1395
  export const de_ListPodIdentityAssociationsCommand = async (output, context) => {
2644
1396
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2645
- return de_ListPodIdentityAssociationsCommandError(output, context);
1397
+ return de_CommandError(output, context);
2646
1398
  }
2647
1399
  const contents = map({
2648
1400
  $metadata: deserializeMetadata(output),
@@ -2655,37 +1407,9 @@ export const de_ListPodIdentityAssociationsCommand = async (output, context) =>
2655
1407
  Object.assign(contents, doc);
2656
1408
  return contents;
2657
1409
  };
2658
- const de_ListPodIdentityAssociationsCommandError = async (output, context) => {
2659
- const parsedOutput = {
2660
- ...output,
2661
- body: await parseErrorBody(output.body, context),
2662
- };
2663
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2664
- switch (errorCode) {
2665
- case "InvalidParameterException":
2666
- case "com.amazonaws.eks#InvalidParameterException":
2667
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2668
- case "InvalidRequestException":
2669
- case "com.amazonaws.eks#InvalidRequestException":
2670
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2671
- case "ResourceNotFoundException":
2672
- case "com.amazonaws.eks#ResourceNotFoundException":
2673
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2674
- case "ServerException":
2675
- case "com.amazonaws.eks#ServerException":
2676
- throw await de_ServerExceptionRes(parsedOutput, context);
2677
- default:
2678
- const parsedBody = parsedOutput.body;
2679
- return throwDefaultError({
2680
- output,
2681
- parsedBody,
2682
- errorCode,
2683
- });
2684
- }
2685
- };
2686
1410
  export const de_ListTagsForResourceCommand = async (output, context) => {
2687
1411
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2688
- return de_ListTagsForResourceCommandError(output, context);
1412
+ return de_CommandError(output, context);
2689
1413
  }
2690
1414
  const contents = map({
2691
1415
  $metadata: deserializeMetadata(output),
@@ -2697,31 +1421,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
2697
1421
  Object.assign(contents, doc);
2698
1422
  return contents;
2699
1423
  };
2700
- const de_ListTagsForResourceCommandError = async (output, context) => {
2701
- const parsedOutput = {
2702
- ...output,
2703
- body: await parseErrorBody(output.body, context),
2704
- };
2705
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2706
- switch (errorCode) {
2707
- case "BadRequestException":
2708
- case "com.amazonaws.eks#BadRequestException":
2709
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2710
- case "NotFoundException":
2711
- case "com.amazonaws.eks#NotFoundException":
2712
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2713
- default:
2714
- const parsedBody = parsedOutput.body;
2715
- return throwDefaultError({
2716
- output,
2717
- parsedBody,
2718
- errorCode,
2719
- });
2720
- }
2721
- };
2722
1424
  export const de_ListUpdatesCommand = async (output, context) => {
2723
1425
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2724
- return de_ListUpdatesCommandError(output, context);
1426
+ return de_CommandError(output, context);
2725
1427
  }
2726
1428
  const contents = map({
2727
1429
  $metadata: deserializeMetadata(output),
@@ -2734,37 +1436,9 @@ export const de_ListUpdatesCommand = async (output, context) => {
2734
1436
  Object.assign(contents, doc);
2735
1437
  return contents;
2736
1438
  };
2737
- const de_ListUpdatesCommandError = async (output, context) => {
2738
- const parsedOutput = {
2739
- ...output,
2740
- body: await parseErrorBody(output.body, context),
2741
- };
2742
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2743
- switch (errorCode) {
2744
- case "ClientException":
2745
- case "com.amazonaws.eks#ClientException":
2746
- throw await de_ClientExceptionRes(parsedOutput, context);
2747
- case "InvalidParameterException":
2748
- case "com.amazonaws.eks#InvalidParameterException":
2749
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2750
- case "ResourceNotFoundException":
2751
- case "com.amazonaws.eks#ResourceNotFoundException":
2752
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2753
- case "ServerException":
2754
- case "com.amazonaws.eks#ServerException":
2755
- throw await de_ServerExceptionRes(parsedOutput, context);
2756
- default:
2757
- const parsedBody = parsedOutput.body;
2758
- return throwDefaultError({
2759
- output,
2760
- parsedBody,
2761
- errorCode,
2762
- });
2763
- }
2764
- };
2765
1439
  export const de_RegisterClusterCommand = async (output, context) => {
2766
1440
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2767
- return de_RegisterClusterCommandError(output, context);
1441
+ return de_CommandError(output, context);
2768
1442
  }
2769
1443
  const contents = map({
2770
1444
  $metadata: deserializeMetadata(output),
@@ -2776,81 +1450,9 @@ export const de_RegisterClusterCommand = async (output, context) => {
2776
1450
  Object.assign(contents, doc);
2777
1451
  return contents;
2778
1452
  };
2779
- const de_RegisterClusterCommandError = async (output, context) => {
2780
- const parsedOutput = {
2781
- ...output,
2782
- body: await parseErrorBody(output.body, context),
2783
- };
2784
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2785
- switch (errorCode) {
2786
- case "AccessDeniedException":
2787
- case "com.amazonaws.eks#AccessDeniedException":
2788
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2789
- case "ClientException":
2790
- case "com.amazonaws.eks#ClientException":
2791
- throw await de_ClientExceptionRes(parsedOutput, context);
2792
- case "InvalidParameterException":
2793
- case "com.amazonaws.eks#InvalidParameterException":
2794
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2795
- case "ResourceInUseException":
2796
- case "com.amazonaws.eks#ResourceInUseException":
2797
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2798
- case "ResourceLimitExceededException":
2799
- case "com.amazonaws.eks#ResourceLimitExceededException":
2800
- throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
2801
- case "ResourcePropagationDelayException":
2802
- case "com.amazonaws.eks#ResourcePropagationDelayException":
2803
- throw await de_ResourcePropagationDelayExceptionRes(parsedOutput, context);
2804
- case "ServerException":
2805
- case "com.amazonaws.eks#ServerException":
2806
- throw await de_ServerExceptionRes(parsedOutput, context);
2807
- case "ServiceUnavailableException":
2808
- case "com.amazonaws.eks#ServiceUnavailableException":
2809
- throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
2810
- default:
2811
- const parsedBody = parsedOutput.body;
2812
- return throwDefaultError({
2813
- output,
2814
- parsedBody,
2815
- errorCode,
2816
- });
2817
- }
2818
- };
2819
1453
  export const de_TagResourceCommand = async (output, context) => {
2820
1454
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2821
- return de_TagResourceCommandError(output, context);
2822
- }
2823
- const contents = map({
2824
- $metadata: deserializeMetadata(output),
2825
- });
2826
- await collectBody(output.body, context);
2827
- return contents;
2828
- };
2829
- const de_TagResourceCommandError = async (output, context) => {
2830
- const parsedOutput = {
2831
- ...output,
2832
- body: await parseErrorBody(output.body, context),
2833
- };
2834
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2835
- switch (errorCode) {
2836
- case "BadRequestException":
2837
- case "com.amazonaws.eks#BadRequestException":
2838
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2839
- case "NotFoundException":
2840
- case "com.amazonaws.eks#NotFoundException":
2841
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2842
- default:
2843
- const parsedBody = parsedOutput.body;
2844
- return throwDefaultError({
2845
- output,
2846
- parsedBody,
2847
- errorCode,
2848
- });
2849
- }
2850
- };
2851
- export const de_UntagResourceCommand = async (output, context) => {
2852
- if (output.statusCode !== 200 && output.statusCode >= 300) {
2853
- return de_UntagResourceCommandError(output, context);
1455
+ return de_CommandError(output, context);
2854
1456
  }
2855
1457
  const contents = map({
2856
1458
  $metadata: deserializeMetadata(output),
@@ -2858,31 +1460,19 @@ export const de_UntagResourceCommand = async (output, context) => {
2858
1460
  await collectBody(output.body, context);
2859
1461
  return contents;
2860
1462
  };
2861
- const de_UntagResourceCommandError = async (output, context) => {
2862
- const parsedOutput = {
2863
- ...output,
2864
- body: await parseErrorBody(output.body, context),
2865
- };
2866
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2867
- switch (errorCode) {
2868
- case "BadRequestException":
2869
- case "com.amazonaws.eks#BadRequestException":
2870
- throw await de_BadRequestExceptionRes(parsedOutput, context);
2871
- case "NotFoundException":
2872
- case "com.amazonaws.eks#NotFoundException":
2873
- throw await de_NotFoundExceptionRes(parsedOutput, context);
2874
- default:
2875
- const parsedBody = parsedOutput.body;
2876
- return throwDefaultError({
2877
- output,
2878
- parsedBody,
2879
- errorCode,
2880
- });
1463
+ export const de_UntagResourceCommand = async (output, context) => {
1464
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
1465
+ return de_CommandError(output, context);
2881
1466
  }
1467
+ const contents = map({
1468
+ $metadata: deserializeMetadata(output),
1469
+ });
1470
+ await collectBody(output.body, context);
1471
+ return contents;
2882
1472
  };
2883
1473
  export const de_UpdateAccessEntryCommand = async (output, context) => {
2884
1474
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2885
- return de_UpdateAccessEntryCommandError(output, context);
1475
+ return de_CommandError(output, context);
2886
1476
  }
2887
1477
  const contents = map({
2888
1478
  $metadata: deserializeMetadata(output),
@@ -2894,37 +1484,9 @@ export const de_UpdateAccessEntryCommand = async (output, context) => {
2894
1484
  Object.assign(contents, doc);
2895
1485
  return contents;
2896
1486
  };
2897
- const de_UpdateAccessEntryCommandError = async (output, context) => {
2898
- const parsedOutput = {
2899
- ...output,
2900
- body: await parseErrorBody(output.body, context),
2901
- };
2902
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2903
- switch (errorCode) {
2904
- case "InvalidParameterException":
2905
- case "com.amazonaws.eks#InvalidParameterException":
2906
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2907
- case "InvalidRequestException":
2908
- case "com.amazonaws.eks#InvalidRequestException":
2909
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2910
- case "ResourceNotFoundException":
2911
- case "com.amazonaws.eks#ResourceNotFoundException":
2912
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2913
- case "ServerException":
2914
- case "com.amazonaws.eks#ServerException":
2915
- throw await de_ServerExceptionRes(parsedOutput, context);
2916
- default:
2917
- const parsedBody = parsedOutput.body;
2918
- return throwDefaultError({
2919
- output,
2920
- parsedBody,
2921
- errorCode,
2922
- });
2923
- }
2924
- };
2925
1487
  export const de_UpdateAddonCommand = async (output, context) => {
2926
1488
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2927
- return de_UpdateAddonCommandError(output, context);
1489
+ return de_CommandError(output, context);
2928
1490
  }
2929
1491
  const contents = map({
2930
1492
  $metadata: deserializeMetadata(output),
@@ -2936,43 +1498,9 @@ export const de_UpdateAddonCommand = async (output, context) => {
2936
1498
  Object.assign(contents, doc);
2937
1499
  return contents;
2938
1500
  };
2939
- const de_UpdateAddonCommandError = async (output, context) => {
2940
- const parsedOutput = {
2941
- ...output,
2942
- body: await parseErrorBody(output.body, context),
2943
- };
2944
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2945
- switch (errorCode) {
2946
- case "ClientException":
2947
- case "com.amazonaws.eks#ClientException":
2948
- throw await de_ClientExceptionRes(parsedOutput, context);
2949
- case "InvalidParameterException":
2950
- case "com.amazonaws.eks#InvalidParameterException":
2951
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2952
- case "InvalidRequestException":
2953
- case "com.amazonaws.eks#InvalidRequestException":
2954
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
2955
- case "ResourceInUseException":
2956
- case "com.amazonaws.eks#ResourceInUseException":
2957
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
2958
- case "ResourceNotFoundException":
2959
- case "com.amazonaws.eks#ResourceNotFoundException":
2960
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2961
- case "ServerException":
2962
- case "com.amazonaws.eks#ServerException":
2963
- throw await de_ServerExceptionRes(parsedOutput, context);
2964
- default:
2965
- const parsedBody = parsedOutput.body;
2966
- return throwDefaultError({
2967
- output,
2968
- parsedBody,
2969
- errorCode,
2970
- });
2971
- }
2972
- };
2973
1501
  export const de_UpdateClusterConfigCommand = async (output, context) => {
2974
1502
  if (output.statusCode !== 200 && output.statusCode >= 300) {
2975
- return de_UpdateClusterConfigCommandError(output, context);
1503
+ return de_CommandError(output, context);
2976
1504
  }
2977
1505
  const contents = map({
2978
1506
  $metadata: deserializeMetadata(output),
@@ -2984,43 +1512,9 @@ export const de_UpdateClusterConfigCommand = async (output, context) => {
2984
1512
  Object.assign(contents, doc);
2985
1513
  return contents;
2986
1514
  };
2987
- const de_UpdateClusterConfigCommandError = async (output, context) => {
2988
- const parsedOutput = {
2989
- ...output,
2990
- body: await parseErrorBody(output.body, context),
2991
- };
2992
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2993
- switch (errorCode) {
2994
- case "ClientException":
2995
- case "com.amazonaws.eks#ClientException":
2996
- throw await de_ClientExceptionRes(parsedOutput, context);
2997
- case "InvalidParameterException":
2998
- case "com.amazonaws.eks#InvalidParameterException":
2999
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3000
- case "InvalidRequestException":
3001
- case "com.amazonaws.eks#InvalidRequestException":
3002
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
3003
- case "ResourceInUseException":
3004
- case "com.amazonaws.eks#ResourceInUseException":
3005
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3006
- case "ResourceNotFoundException":
3007
- case "com.amazonaws.eks#ResourceNotFoundException":
3008
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3009
- case "ServerException":
3010
- case "com.amazonaws.eks#ServerException":
3011
- throw await de_ServerExceptionRes(parsedOutput, context);
3012
- default:
3013
- const parsedBody = parsedOutput.body;
3014
- return throwDefaultError({
3015
- output,
3016
- parsedBody,
3017
- errorCode,
3018
- });
3019
- }
3020
- };
3021
1515
  export const de_UpdateClusterVersionCommand = async (output, context) => {
3022
1516
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3023
- return de_UpdateClusterVersionCommandError(output, context);
1517
+ return de_CommandError(output, context);
3024
1518
  }
3025
1519
  const contents = map({
3026
1520
  $metadata: deserializeMetadata(output),
@@ -3032,43 +1526,9 @@ export const de_UpdateClusterVersionCommand = async (output, context) => {
3032
1526
  Object.assign(contents, doc);
3033
1527
  return contents;
3034
1528
  };
3035
- const de_UpdateClusterVersionCommandError = async (output, context) => {
3036
- const parsedOutput = {
3037
- ...output,
3038
- body: await parseErrorBody(output.body, context),
3039
- };
3040
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3041
- switch (errorCode) {
3042
- case "ClientException":
3043
- case "com.amazonaws.eks#ClientException":
3044
- throw await de_ClientExceptionRes(parsedOutput, context);
3045
- case "InvalidParameterException":
3046
- case "com.amazonaws.eks#InvalidParameterException":
3047
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3048
- case "InvalidRequestException":
3049
- case "com.amazonaws.eks#InvalidRequestException":
3050
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
3051
- case "ResourceInUseException":
3052
- case "com.amazonaws.eks#ResourceInUseException":
3053
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3054
- case "ResourceNotFoundException":
3055
- case "com.amazonaws.eks#ResourceNotFoundException":
3056
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3057
- case "ServerException":
3058
- case "com.amazonaws.eks#ServerException":
3059
- throw await de_ServerExceptionRes(parsedOutput, context);
3060
- default:
3061
- const parsedBody = parsedOutput.body;
3062
- return throwDefaultError({
3063
- output,
3064
- parsedBody,
3065
- errorCode,
3066
- });
3067
- }
3068
- };
3069
1529
  export const de_UpdateEksAnywhereSubscriptionCommand = async (output, context) => {
3070
1530
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3071
- return de_UpdateEksAnywhereSubscriptionCommandError(output, context);
1531
+ return de_CommandError(output, context);
3072
1532
  }
3073
1533
  const contents = map({
3074
1534
  $metadata: deserializeMetadata(output),
@@ -3080,40 +1540,9 @@ export const de_UpdateEksAnywhereSubscriptionCommand = async (output, context) =
3080
1540
  Object.assign(contents, doc);
3081
1541
  return contents;
3082
1542
  };
3083
- const de_UpdateEksAnywhereSubscriptionCommandError = async (output, context) => {
3084
- const parsedOutput = {
3085
- ...output,
3086
- body: await parseErrorBody(output.body, context),
3087
- };
3088
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3089
- switch (errorCode) {
3090
- case "ClientException":
3091
- case "com.amazonaws.eks#ClientException":
3092
- throw await de_ClientExceptionRes(parsedOutput, context);
3093
- case "InvalidParameterException":
3094
- case "com.amazonaws.eks#InvalidParameterException":
3095
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3096
- case "InvalidRequestException":
3097
- case "com.amazonaws.eks#InvalidRequestException":
3098
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
3099
- case "ResourceNotFoundException":
3100
- case "com.amazonaws.eks#ResourceNotFoundException":
3101
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3102
- case "ServerException":
3103
- case "com.amazonaws.eks#ServerException":
3104
- throw await de_ServerExceptionRes(parsedOutput, context);
3105
- default:
3106
- const parsedBody = parsedOutput.body;
3107
- return throwDefaultError({
3108
- output,
3109
- parsedBody,
3110
- errorCode,
3111
- });
3112
- }
3113
- };
3114
1543
  export const de_UpdateNodegroupConfigCommand = async (output, context) => {
3115
1544
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3116
- return de_UpdateNodegroupConfigCommandError(output, context);
1545
+ return de_CommandError(output, context);
3117
1546
  }
3118
1547
  const contents = map({
3119
1548
  $metadata: deserializeMetadata(output),
@@ -3125,43 +1554,9 @@ export const de_UpdateNodegroupConfigCommand = async (output, context) => {
3125
1554
  Object.assign(contents, doc);
3126
1555
  return contents;
3127
1556
  };
3128
- const de_UpdateNodegroupConfigCommandError = async (output, context) => {
3129
- const parsedOutput = {
3130
- ...output,
3131
- body: await parseErrorBody(output.body, context),
3132
- };
3133
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3134
- switch (errorCode) {
3135
- case "ClientException":
3136
- case "com.amazonaws.eks#ClientException":
3137
- throw await de_ClientExceptionRes(parsedOutput, context);
3138
- case "InvalidParameterException":
3139
- case "com.amazonaws.eks#InvalidParameterException":
3140
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3141
- case "InvalidRequestException":
3142
- case "com.amazonaws.eks#InvalidRequestException":
3143
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
3144
- case "ResourceInUseException":
3145
- case "com.amazonaws.eks#ResourceInUseException":
3146
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3147
- case "ResourceNotFoundException":
3148
- case "com.amazonaws.eks#ResourceNotFoundException":
3149
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3150
- case "ServerException":
3151
- case "com.amazonaws.eks#ServerException":
3152
- throw await de_ServerExceptionRes(parsedOutput, context);
3153
- default:
3154
- const parsedBody = parsedOutput.body;
3155
- return throwDefaultError({
3156
- output,
3157
- parsedBody,
3158
- errorCode,
3159
- });
3160
- }
3161
- };
3162
1557
  export const de_UpdateNodegroupVersionCommand = async (output, context) => {
3163
1558
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3164
- return de_UpdateNodegroupVersionCommandError(output, context);
1559
+ return de_CommandError(output, context);
3165
1560
  }
3166
1561
  const contents = map({
3167
1562
  $metadata: deserializeMetadata(output),
@@ -3173,43 +1568,9 @@ export const de_UpdateNodegroupVersionCommand = async (output, context) => {
3173
1568
  Object.assign(contents, doc);
3174
1569
  return contents;
3175
1570
  };
3176
- const de_UpdateNodegroupVersionCommandError = async (output, context) => {
3177
- const parsedOutput = {
3178
- ...output,
3179
- body: await parseErrorBody(output.body, context),
3180
- };
3181
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3182
- switch (errorCode) {
3183
- case "ClientException":
3184
- case "com.amazonaws.eks#ClientException":
3185
- throw await de_ClientExceptionRes(parsedOutput, context);
3186
- case "InvalidParameterException":
3187
- case "com.amazonaws.eks#InvalidParameterException":
3188
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3189
- case "InvalidRequestException":
3190
- case "com.amazonaws.eks#InvalidRequestException":
3191
- throw await de_InvalidRequestExceptionRes(parsedOutput, context);
3192
- case "ResourceInUseException":
3193
- case "com.amazonaws.eks#ResourceInUseException":
3194
- throw await de_ResourceInUseExceptionRes(parsedOutput, context);
3195
- case "ResourceNotFoundException":
3196
- case "com.amazonaws.eks#ResourceNotFoundException":
3197
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3198
- case "ServerException":
3199
- case "com.amazonaws.eks#ServerException":
3200
- throw await de_ServerExceptionRes(parsedOutput, context);
3201
- default:
3202
- const parsedBody = parsedOutput.body;
3203
- return throwDefaultError({
3204
- output,
3205
- parsedBody,
3206
- errorCode,
3207
- });
3208
- }
3209
- };
3210
1571
  export const de_UpdatePodIdentityAssociationCommand = async (output, context) => {
3211
1572
  if (output.statusCode !== 200 && output.statusCode >= 300) {
3212
- return de_UpdatePodIdentityAssociationCommandError(output, context);
1573
+ return de_CommandError(output, context);
3213
1574
  }
3214
1575
  const contents = map({
3215
1576
  $metadata: deserializeMetadata(output),
@@ -3221,7 +1582,7 @@ export const de_UpdatePodIdentityAssociationCommand = async (output, context) =>
3221
1582
  Object.assign(contents, doc);
3222
1583
  return contents;
3223
1584
  };
3224
- const de_UpdatePodIdentityAssociationCommandError = async (output, context) => {
1585
+ const de_CommandError = async (output, context) => {
3225
1586
  const parsedOutput = {
3226
1587
  ...output,
3227
1588
  body: await parseErrorBody(output.body, context),
@@ -3240,6 +1601,33 @@ const de_UpdatePodIdentityAssociationCommandError = async (output, context) => {
3240
1601
  case "ServerException":
3241
1602
  case "com.amazonaws.eks#ServerException":
3242
1603
  throw await de_ServerExceptionRes(parsedOutput, context);
1604
+ case "ClientException":
1605
+ case "com.amazonaws.eks#ClientException":
1606
+ throw await de_ClientExceptionRes(parsedOutput, context);
1607
+ case "ResourceInUseException":
1608
+ case "com.amazonaws.eks#ResourceInUseException":
1609
+ throw await de_ResourceInUseExceptionRes(parsedOutput, context);
1610
+ case "ResourceLimitExceededException":
1611
+ case "com.amazonaws.eks#ResourceLimitExceededException":
1612
+ throw await de_ResourceLimitExceededExceptionRes(parsedOutput, context);
1613
+ case "ServiceUnavailableException":
1614
+ case "com.amazonaws.eks#ServiceUnavailableException":
1615
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
1616
+ case "UnsupportedAvailabilityZoneException":
1617
+ case "com.amazonaws.eks#UnsupportedAvailabilityZoneException":
1618
+ throw await de_UnsupportedAvailabilityZoneExceptionRes(parsedOutput, context);
1619
+ case "AccessDeniedException":
1620
+ case "com.amazonaws.eks#AccessDeniedException":
1621
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1622
+ case "BadRequestException":
1623
+ case "com.amazonaws.eks#BadRequestException":
1624
+ throw await de_BadRequestExceptionRes(parsedOutput, context);
1625
+ case "NotFoundException":
1626
+ case "com.amazonaws.eks#NotFoundException":
1627
+ throw await de_NotFoundExceptionRes(parsedOutput, context);
1628
+ case "ResourcePropagationDelayException":
1629
+ case "com.amazonaws.eks#ResourcePropagationDelayException":
1630
+ throw await de_ResourcePropagationDelayExceptionRes(parsedOutput, context);
3243
1631
  default:
3244
1632
  const parsedBody = parsedOutput.body;
3245
1633
  return throwDefaultError({