@aws-sdk/client-elastic-load-balancing-v2 3.312.0 → 3.316.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectString as __expectString, extendedEncodeURIComponent as __extendedEncodeURIComponent, getArrayIfSingleItem as __getArrayIfSingleItem, getValueFromTextNode as __getValueFromTextNode, parseBoolean as __parseBoolean, parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { XMLParser } from "fast-xml-parser";
4
4
  import { ElasticLoadBalancingV2ServiceException as __BaseException } from "../models/ElasticLoadBalancingV2ServiceException";
5
5
  import { AllocationIdNotFoundException, ALPNPolicyNotSupportedException, AvailabilityZoneNotSupportedException, CertificateNotFoundException, DuplicateListenerException, DuplicateLoadBalancerNameException, DuplicateTagKeysException, DuplicateTargetGroupNameException, HealthUnavailableException, IncompatibleProtocolsException, InvalidConfigurationRequestException, InvalidLoadBalancerActionException, InvalidSchemeException, InvalidSecurityGroupException, InvalidSubnetException, InvalidTargetException, ListenerNotFoundException, LoadBalancerNotFoundException, OperationNotPermittedException, PriorityInUseException, ResourceInUseException, RuleNotFoundException, SSLPolicyNotFoundException, SubnetNotFoundException, TargetGroupAssociationLimitException, TargetGroupNotFoundException, TooManyActionsException, TooManyCertificatesException, TooManyListenersException, TooManyLoadBalancersException, TooManyRegistrationsForTargetIdException, TooManyRulesException, TooManyTagsException, TooManyTargetGroupsException, TooManyTargetsException, TooManyUniqueTargetGroupsPerLoadBalancerException, UnsupportedProtocolException, } from "../models/models_0";
@@ -354,7 +354,7 @@ export const de_AddListenerCertificatesCommand = async (output, context) => {
354
354
  $metadata: deserializeMetadata(output),
355
355
  ...contents,
356
356
  };
357
- return Promise.resolve(response);
357
+ return response;
358
358
  };
359
359
  const de_AddListenerCertificatesCommandError = async (output, context) => {
360
360
  const parsedOutput = {
@@ -374,10 +374,9 @@ const de_AddListenerCertificatesCommandError = async (output, context) => {
374
374
  throw await de_TooManyCertificatesExceptionRes(parsedOutput, context);
375
375
  default:
376
376
  const parsedBody = parsedOutput.body;
377
- throwDefaultError({
377
+ return throwDefaultError({
378
378
  output,
379
379
  parsedBody: parsedBody.Error,
380
- exceptionCtor: __BaseException,
381
380
  errorCode,
382
381
  });
383
382
  }
@@ -393,7 +392,7 @@ export const de_AddTagsCommand = async (output, context) => {
393
392
  $metadata: deserializeMetadata(output),
394
393
  ...contents,
395
394
  };
396
- return Promise.resolve(response);
395
+ return response;
397
396
  };
398
397
  const de_AddTagsCommandError = async (output, context) => {
399
398
  const parsedOutput = {
@@ -422,10 +421,9 @@ const de_AddTagsCommandError = async (output, context) => {
422
421
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
423
422
  default:
424
423
  const parsedBody = parsedOutput.body;
425
- throwDefaultError({
424
+ return throwDefaultError({
426
425
  output,
427
426
  parsedBody: parsedBody.Error,
428
- exceptionCtor: __BaseException,
429
427
  errorCode,
430
428
  });
431
429
  }
@@ -441,7 +439,7 @@ export const de_CreateListenerCommand = async (output, context) => {
441
439
  $metadata: deserializeMetadata(output),
442
440
  ...contents,
443
441
  };
444
- return Promise.resolve(response);
442
+ return response;
445
443
  };
446
444
  const de_CreateListenerCommandError = async (output, context) => {
447
445
  const parsedOutput = {
@@ -506,10 +504,9 @@ const de_CreateListenerCommandError = async (output, context) => {
506
504
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
507
505
  default:
508
506
  const parsedBody = parsedOutput.body;
509
- throwDefaultError({
507
+ return throwDefaultError({
510
508
  output,
511
509
  parsedBody: parsedBody.Error,
512
- exceptionCtor: __BaseException,
513
510
  errorCode,
514
511
  });
515
512
  }
@@ -525,7 +522,7 @@ export const de_CreateLoadBalancerCommand = async (output, context) => {
525
522
  $metadata: deserializeMetadata(output),
526
523
  ...contents,
527
524
  };
528
- return Promise.resolve(response);
525
+ return response;
529
526
  };
530
527
  const de_CreateLoadBalancerCommandError = async (output, context) => {
531
528
  const parsedOutput = {
@@ -575,10 +572,9 @@ const de_CreateLoadBalancerCommandError = async (output, context) => {
575
572
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
576
573
  default:
577
574
  const parsedBody = parsedOutput.body;
578
- throwDefaultError({
575
+ return throwDefaultError({
579
576
  output,
580
577
  parsedBody: parsedBody.Error,
581
- exceptionCtor: __BaseException,
582
578
  errorCode,
583
579
  });
584
580
  }
@@ -594,7 +590,7 @@ export const de_CreateRuleCommand = async (output, context) => {
594
590
  $metadata: deserializeMetadata(output),
595
591
  ...contents,
596
592
  };
597
- return Promise.resolve(response);
593
+ return response;
598
594
  };
599
595
  const de_CreateRuleCommandError = async (output, context) => {
600
596
  const parsedOutput = {
@@ -650,10 +646,9 @@ const de_CreateRuleCommandError = async (output, context) => {
650
646
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
651
647
  default:
652
648
  const parsedBody = parsedOutput.body;
653
- throwDefaultError({
649
+ return throwDefaultError({
654
650
  output,
655
651
  parsedBody: parsedBody.Error,
656
- exceptionCtor: __BaseException,
657
652
  errorCode,
658
653
  });
659
654
  }
@@ -669,7 +664,7 @@ export const de_CreateTargetGroupCommand = async (output, context) => {
669
664
  $metadata: deserializeMetadata(output),
670
665
  ...contents,
671
666
  };
672
- return Promise.resolve(response);
667
+ return response;
673
668
  };
674
669
  const de_CreateTargetGroupCommandError = async (output, context) => {
675
670
  const parsedOutput = {
@@ -692,10 +687,9 @@ const de_CreateTargetGroupCommandError = async (output, context) => {
692
687
  throw await de_TooManyTargetGroupsExceptionRes(parsedOutput, context);
693
688
  default:
694
689
  const parsedBody = parsedOutput.body;
695
- throwDefaultError({
690
+ return throwDefaultError({
696
691
  output,
697
692
  parsedBody: parsedBody.Error,
698
- exceptionCtor: __BaseException,
699
693
  errorCode,
700
694
  });
701
695
  }
@@ -711,7 +705,7 @@ export const de_DeleteListenerCommand = async (output, context) => {
711
705
  $metadata: deserializeMetadata(output),
712
706
  ...contents,
713
707
  };
714
- return Promise.resolve(response);
708
+ return response;
715
709
  };
716
710
  const de_DeleteListenerCommandError = async (output, context) => {
717
711
  const parsedOutput = {
@@ -728,10 +722,9 @@ const de_DeleteListenerCommandError = async (output, context) => {
728
722
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
729
723
  default:
730
724
  const parsedBody = parsedOutput.body;
731
- throwDefaultError({
725
+ return throwDefaultError({
732
726
  output,
733
727
  parsedBody: parsedBody.Error,
734
- exceptionCtor: __BaseException,
735
728
  errorCode,
736
729
  });
737
730
  }
@@ -747,7 +740,7 @@ export const de_DeleteLoadBalancerCommand = async (output, context) => {
747
740
  $metadata: deserializeMetadata(output),
748
741
  ...contents,
749
742
  };
750
- return Promise.resolve(response);
743
+ return response;
751
744
  };
752
745
  const de_DeleteLoadBalancerCommandError = async (output, context) => {
753
746
  const parsedOutput = {
@@ -767,10 +760,9 @@ const de_DeleteLoadBalancerCommandError = async (output, context) => {
767
760
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
768
761
  default:
769
762
  const parsedBody = parsedOutput.body;
770
- throwDefaultError({
763
+ return throwDefaultError({
771
764
  output,
772
765
  parsedBody: parsedBody.Error,
773
- exceptionCtor: __BaseException,
774
766
  errorCode,
775
767
  });
776
768
  }
@@ -786,7 +778,7 @@ export const de_DeleteRuleCommand = async (output, context) => {
786
778
  $metadata: deserializeMetadata(output),
787
779
  ...contents,
788
780
  };
789
- return Promise.resolve(response);
781
+ return response;
790
782
  };
791
783
  const de_DeleteRuleCommandError = async (output, context) => {
792
784
  const parsedOutput = {
@@ -803,10 +795,9 @@ const de_DeleteRuleCommandError = async (output, context) => {
803
795
  throw await de_RuleNotFoundExceptionRes(parsedOutput, context);
804
796
  default:
805
797
  const parsedBody = parsedOutput.body;
806
- throwDefaultError({
798
+ return throwDefaultError({
807
799
  output,
808
800
  parsedBody: parsedBody.Error,
809
- exceptionCtor: __BaseException,
810
801
  errorCode,
811
802
  });
812
803
  }
@@ -822,7 +813,7 @@ export const de_DeleteTargetGroupCommand = async (output, context) => {
822
813
  $metadata: deserializeMetadata(output),
823
814
  ...contents,
824
815
  };
825
- return Promise.resolve(response);
816
+ return response;
826
817
  };
827
818
  const de_DeleteTargetGroupCommandError = async (output, context) => {
828
819
  const parsedOutput = {
@@ -836,10 +827,9 @@ const de_DeleteTargetGroupCommandError = async (output, context) => {
836
827
  throw await de_ResourceInUseExceptionRes(parsedOutput, context);
837
828
  default:
838
829
  const parsedBody = parsedOutput.body;
839
- throwDefaultError({
830
+ return throwDefaultError({
840
831
  output,
841
832
  parsedBody: parsedBody.Error,
842
- exceptionCtor: __BaseException,
843
833
  errorCode,
844
834
  });
845
835
  }
@@ -855,7 +845,7 @@ export const de_DeregisterTargetsCommand = async (output, context) => {
855
845
  $metadata: deserializeMetadata(output),
856
846
  ...contents,
857
847
  };
858
- return Promise.resolve(response);
848
+ return response;
859
849
  };
860
850
  const de_DeregisterTargetsCommandError = async (output, context) => {
861
851
  const parsedOutput = {
@@ -872,10 +862,9 @@ const de_DeregisterTargetsCommandError = async (output, context) => {
872
862
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
873
863
  default:
874
864
  const parsedBody = parsedOutput.body;
875
- throwDefaultError({
865
+ return throwDefaultError({
876
866
  output,
877
867
  parsedBody: parsedBody.Error,
878
- exceptionCtor: __BaseException,
879
868
  errorCode,
880
869
  });
881
870
  }
@@ -891,7 +880,7 @@ export const de_DescribeAccountLimitsCommand = async (output, context) => {
891
880
  $metadata: deserializeMetadata(output),
892
881
  ...contents,
893
882
  };
894
- return Promise.resolve(response);
883
+ return response;
895
884
  };
896
885
  const de_DescribeAccountLimitsCommandError = async (output, context) => {
897
886
  const parsedOutput = {
@@ -900,10 +889,9 @@ const de_DescribeAccountLimitsCommandError = async (output, context) => {
900
889
  };
901
890
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
902
891
  const parsedBody = parsedOutput.body;
903
- throwDefaultError({
892
+ return throwDefaultError({
904
893
  output,
905
894
  parsedBody: parsedBody.Error,
906
- exceptionCtor: __BaseException,
907
895
  errorCode,
908
896
  });
909
897
  };
@@ -918,7 +906,7 @@ export const de_DescribeListenerCertificatesCommand = async (output, context) =>
918
906
  $metadata: deserializeMetadata(output),
919
907
  ...contents,
920
908
  };
921
- return Promise.resolve(response);
909
+ return response;
922
910
  };
923
911
  const de_DescribeListenerCertificatesCommandError = async (output, context) => {
924
912
  const parsedOutput = {
@@ -932,10 +920,9 @@ const de_DescribeListenerCertificatesCommandError = async (output, context) => {
932
920
  throw await de_ListenerNotFoundExceptionRes(parsedOutput, context);
933
921
  default:
934
922
  const parsedBody = parsedOutput.body;
935
- throwDefaultError({
923
+ return throwDefaultError({
936
924
  output,
937
925
  parsedBody: parsedBody.Error,
938
- exceptionCtor: __BaseException,
939
926
  errorCode,
940
927
  });
941
928
  }
@@ -951,7 +938,7 @@ export const de_DescribeListenersCommand = async (output, context) => {
951
938
  $metadata: deserializeMetadata(output),
952
939
  ...contents,
953
940
  };
954
- return Promise.resolve(response);
941
+ return response;
955
942
  };
956
943
  const de_DescribeListenersCommandError = async (output, context) => {
957
944
  const parsedOutput = {
@@ -971,10 +958,9 @@ const de_DescribeListenersCommandError = async (output, context) => {
971
958
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
972
959
  default:
973
960
  const parsedBody = parsedOutput.body;
974
- throwDefaultError({
961
+ return throwDefaultError({
975
962
  output,
976
963
  parsedBody: parsedBody.Error,
977
- exceptionCtor: __BaseException,
978
964
  errorCode,
979
965
  });
980
966
  }
@@ -990,7 +976,7 @@ export const de_DescribeLoadBalancerAttributesCommand = async (output, context)
990
976
  $metadata: deserializeMetadata(output),
991
977
  ...contents,
992
978
  };
993
- return Promise.resolve(response);
979
+ return response;
994
980
  };
995
981
  const de_DescribeLoadBalancerAttributesCommandError = async (output, context) => {
996
982
  const parsedOutput = {
@@ -1004,10 +990,9 @@ const de_DescribeLoadBalancerAttributesCommandError = async (output, context) =>
1004
990
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1005
991
  default:
1006
992
  const parsedBody = parsedOutput.body;
1007
- throwDefaultError({
993
+ return throwDefaultError({
1008
994
  output,
1009
995
  parsedBody: parsedBody.Error,
1010
- exceptionCtor: __BaseException,
1011
996
  errorCode,
1012
997
  });
1013
998
  }
@@ -1023,7 +1008,7 @@ export const de_DescribeLoadBalancersCommand = async (output, context) => {
1023
1008
  $metadata: deserializeMetadata(output),
1024
1009
  ...contents,
1025
1010
  };
1026
- return Promise.resolve(response);
1011
+ return response;
1027
1012
  };
1028
1013
  const de_DescribeLoadBalancersCommandError = async (output, context) => {
1029
1014
  const parsedOutput = {
@@ -1037,10 +1022,9 @@ const de_DescribeLoadBalancersCommandError = async (output, context) => {
1037
1022
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1038
1023
  default:
1039
1024
  const parsedBody = parsedOutput.body;
1040
- throwDefaultError({
1025
+ return throwDefaultError({
1041
1026
  output,
1042
1027
  parsedBody: parsedBody.Error,
1043
- exceptionCtor: __BaseException,
1044
1028
  errorCode,
1045
1029
  });
1046
1030
  }
@@ -1056,7 +1040,7 @@ export const de_DescribeRulesCommand = async (output, context) => {
1056
1040
  $metadata: deserializeMetadata(output),
1057
1041
  ...contents,
1058
1042
  };
1059
- return Promise.resolve(response);
1043
+ return response;
1060
1044
  };
1061
1045
  const de_DescribeRulesCommandError = async (output, context) => {
1062
1046
  const parsedOutput = {
@@ -1076,10 +1060,9 @@ const de_DescribeRulesCommandError = async (output, context) => {
1076
1060
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1077
1061
  default:
1078
1062
  const parsedBody = parsedOutput.body;
1079
- throwDefaultError({
1063
+ return throwDefaultError({
1080
1064
  output,
1081
1065
  parsedBody: parsedBody.Error,
1082
- exceptionCtor: __BaseException,
1083
1066
  errorCode,
1084
1067
  });
1085
1068
  }
@@ -1095,7 +1078,7 @@ export const de_DescribeSSLPoliciesCommand = async (output, context) => {
1095
1078
  $metadata: deserializeMetadata(output),
1096
1079
  ...contents,
1097
1080
  };
1098
- return Promise.resolve(response);
1081
+ return response;
1099
1082
  };
1100
1083
  const de_DescribeSSLPoliciesCommandError = async (output, context) => {
1101
1084
  const parsedOutput = {
@@ -1109,10 +1092,9 @@ const de_DescribeSSLPoliciesCommandError = async (output, context) => {
1109
1092
  throw await de_SSLPolicyNotFoundExceptionRes(parsedOutput, context);
1110
1093
  default:
1111
1094
  const parsedBody = parsedOutput.body;
1112
- throwDefaultError({
1095
+ return throwDefaultError({
1113
1096
  output,
1114
1097
  parsedBody: parsedBody.Error,
1115
- exceptionCtor: __BaseException,
1116
1098
  errorCode,
1117
1099
  });
1118
1100
  }
@@ -1128,7 +1110,7 @@ export const de_DescribeTagsCommand = async (output, context) => {
1128
1110
  $metadata: deserializeMetadata(output),
1129
1111
  ...contents,
1130
1112
  };
1131
- return Promise.resolve(response);
1113
+ return response;
1132
1114
  };
1133
1115
  const de_DescribeTagsCommandError = async (output, context) => {
1134
1116
  const parsedOutput = {
@@ -1151,10 +1133,9 @@ const de_DescribeTagsCommandError = async (output, context) => {
1151
1133
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1152
1134
  default:
1153
1135
  const parsedBody = parsedOutput.body;
1154
- throwDefaultError({
1136
+ return throwDefaultError({
1155
1137
  output,
1156
1138
  parsedBody: parsedBody.Error,
1157
- exceptionCtor: __BaseException,
1158
1139
  errorCode,
1159
1140
  });
1160
1141
  }
@@ -1170,7 +1151,7 @@ export const de_DescribeTargetGroupAttributesCommand = async (output, context) =
1170
1151
  $metadata: deserializeMetadata(output),
1171
1152
  ...contents,
1172
1153
  };
1173
- return Promise.resolve(response);
1154
+ return response;
1174
1155
  };
1175
1156
  const de_DescribeTargetGroupAttributesCommandError = async (output, context) => {
1176
1157
  const parsedOutput = {
@@ -1184,10 +1165,9 @@ const de_DescribeTargetGroupAttributesCommandError = async (output, context) =>
1184
1165
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1185
1166
  default:
1186
1167
  const parsedBody = parsedOutput.body;
1187
- throwDefaultError({
1168
+ return throwDefaultError({
1188
1169
  output,
1189
1170
  parsedBody: parsedBody.Error,
1190
- exceptionCtor: __BaseException,
1191
1171
  errorCode,
1192
1172
  });
1193
1173
  }
@@ -1203,7 +1183,7 @@ export const de_DescribeTargetGroupsCommand = async (output, context) => {
1203
1183
  $metadata: deserializeMetadata(output),
1204
1184
  ...contents,
1205
1185
  };
1206
- return Promise.resolve(response);
1186
+ return response;
1207
1187
  };
1208
1188
  const de_DescribeTargetGroupsCommandError = async (output, context) => {
1209
1189
  const parsedOutput = {
@@ -1220,10 +1200,9 @@ const de_DescribeTargetGroupsCommandError = async (output, context) => {
1220
1200
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1221
1201
  default:
1222
1202
  const parsedBody = parsedOutput.body;
1223
- throwDefaultError({
1203
+ return throwDefaultError({
1224
1204
  output,
1225
1205
  parsedBody: parsedBody.Error,
1226
- exceptionCtor: __BaseException,
1227
1206
  errorCode,
1228
1207
  });
1229
1208
  }
@@ -1239,7 +1218,7 @@ export const de_DescribeTargetHealthCommand = async (output, context) => {
1239
1218
  $metadata: deserializeMetadata(output),
1240
1219
  ...contents,
1241
1220
  };
1242
- return Promise.resolve(response);
1221
+ return response;
1243
1222
  };
1244
1223
  const de_DescribeTargetHealthCommandError = async (output, context) => {
1245
1224
  const parsedOutput = {
@@ -1259,10 +1238,9 @@ const de_DescribeTargetHealthCommandError = async (output, context) => {
1259
1238
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1260
1239
  default:
1261
1240
  const parsedBody = parsedOutput.body;
1262
- throwDefaultError({
1241
+ return throwDefaultError({
1263
1242
  output,
1264
1243
  parsedBody: parsedBody.Error,
1265
- exceptionCtor: __BaseException,
1266
1244
  errorCode,
1267
1245
  });
1268
1246
  }
@@ -1278,7 +1256,7 @@ export const de_ModifyListenerCommand = async (output, context) => {
1278
1256
  $metadata: deserializeMetadata(output),
1279
1257
  ...contents,
1280
1258
  };
1281
- return Promise.resolve(response);
1259
+ return response;
1282
1260
  };
1283
1261
  const de_ModifyListenerCommandError = async (output, context) => {
1284
1262
  const parsedOutput = {
@@ -1340,10 +1318,9 @@ const de_ModifyListenerCommandError = async (output, context) => {
1340
1318
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1341
1319
  default:
1342
1320
  const parsedBody = parsedOutput.body;
1343
- throwDefaultError({
1321
+ return throwDefaultError({
1344
1322
  output,
1345
1323
  parsedBody: parsedBody.Error,
1346
- exceptionCtor: __BaseException,
1347
1324
  errorCode,
1348
1325
  });
1349
1326
  }
@@ -1359,7 +1336,7 @@ export const de_ModifyLoadBalancerAttributesCommand = async (output, context) =>
1359
1336
  $metadata: deserializeMetadata(output),
1360
1337
  ...contents,
1361
1338
  };
1362
- return Promise.resolve(response);
1339
+ return response;
1363
1340
  };
1364
1341
  const de_ModifyLoadBalancerAttributesCommandError = async (output, context) => {
1365
1342
  const parsedOutput = {
@@ -1376,10 +1353,9 @@ const de_ModifyLoadBalancerAttributesCommandError = async (output, context) => {
1376
1353
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1377
1354
  default:
1378
1355
  const parsedBody = parsedOutput.body;
1379
- throwDefaultError({
1356
+ return throwDefaultError({
1380
1357
  output,
1381
1358
  parsedBody: parsedBody.Error,
1382
- exceptionCtor: __BaseException,
1383
1359
  errorCode,
1384
1360
  });
1385
1361
  }
@@ -1395,7 +1371,7 @@ export const de_ModifyRuleCommand = async (output, context) => {
1395
1371
  $metadata: deserializeMetadata(output),
1396
1372
  ...contents,
1397
1373
  };
1398
- return Promise.resolve(response);
1374
+ return response;
1399
1375
  };
1400
1376
  const de_ModifyRuleCommandError = async (output, context) => {
1401
1377
  const parsedOutput = {
@@ -1439,10 +1415,9 @@ const de_ModifyRuleCommandError = async (output, context) => {
1439
1415
  throw await de_UnsupportedProtocolExceptionRes(parsedOutput, context);
1440
1416
  default:
1441
1417
  const parsedBody = parsedOutput.body;
1442
- throwDefaultError({
1418
+ return throwDefaultError({
1443
1419
  output,
1444
1420
  parsedBody: parsedBody.Error,
1445
- exceptionCtor: __BaseException,
1446
1421
  errorCode,
1447
1422
  });
1448
1423
  }
@@ -1458,7 +1433,7 @@ export const de_ModifyTargetGroupCommand = async (output, context) => {
1458
1433
  $metadata: deserializeMetadata(output),
1459
1434
  ...contents,
1460
1435
  };
1461
- return Promise.resolve(response);
1436
+ return response;
1462
1437
  };
1463
1438
  const de_ModifyTargetGroupCommandError = async (output, context) => {
1464
1439
  const parsedOutput = {
@@ -1475,10 +1450,9 @@ const de_ModifyTargetGroupCommandError = async (output, context) => {
1475
1450
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1476
1451
  default:
1477
1452
  const parsedBody = parsedOutput.body;
1478
- throwDefaultError({
1453
+ return throwDefaultError({
1479
1454
  output,
1480
1455
  parsedBody: parsedBody.Error,
1481
- exceptionCtor: __BaseException,
1482
1456
  errorCode,
1483
1457
  });
1484
1458
  }
@@ -1494,7 +1468,7 @@ export const de_ModifyTargetGroupAttributesCommand = async (output, context) =>
1494
1468
  $metadata: deserializeMetadata(output),
1495
1469
  ...contents,
1496
1470
  };
1497
- return Promise.resolve(response);
1471
+ return response;
1498
1472
  };
1499
1473
  const de_ModifyTargetGroupAttributesCommandError = async (output, context) => {
1500
1474
  const parsedOutput = {
@@ -1511,10 +1485,9 @@ const de_ModifyTargetGroupAttributesCommandError = async (output, context) => {
1511
1485
  throw await de_TargetGroupNotFoundExceptionRes(parsedOutput, context);
1512
1486
  default:
1513
1487
  const parsedBody = parsedOutput.body;
1514
- throwDefaultError({
1488
+ return throwDefaultError({
1515
1489
  output,
1516
1490
  parsedBody: parsedBody.Error,
1517
- exceptionCtor: __BaseException,
1518
1491
  errorCode,
1519
1492
  });
1520
1493
  }
@@ -1530,7 +1503,7 @@ export const de_RegisterTargetsCommand = async (output, context) => {
1530
1503
  $metadata: deserializeMetadata(output),
1531
1504
  ...contents,
1532
1505
  };
1533
- return Promise.resolve(response);
1506
+ return response;
1534
1507
  };
1535
1508
  const de_RegisterTargetsCommandError = async (output, context) => {
1536
1509
  const parsedOutput = {
@@ -1553,10 +1526,9 @@ const de_RegisterTargetsCommandError = async (output, context) => {
1553
1526
  throw await de_TooManyTargetsExceptionRes(parsedOutput, context);
1554
1527
  default:
1555
1528
  const parsedBody = parsedOutput.body;
1556
- throwDefaultError({
1529
+ return throwDefaultError({
1557
1530
  output,
1558
1531
  parsedBody: parsedBody.Error,
1559
- exceptionCtor: __BaseException,
1560
1532
  errorCode,
1561
1533
  });
1562
1534
  }
@@ -1572,7 +1544,7 @@ export const de_RemoveListenerCertificatesCommand = async (output, context) => {
1572
1544
  $metadata: deserializeMetadata(output),
1573
1545
  ...contents,
1574
1546
  };
1575
- return Promise.resolve(response);
1547
+ return response;
1576
1548
  };
1577
1549
  const de_RemoveListenerCertificatesCommandError = async (output, context) => {
1578
1550
  const parsedOutput = {
@@ -1589,10 +1561,9 @@ const de_RemoveListenerCertificatesCommandError = async (output, context) => {
1589
1561
  throw await de_OperationNotPermittedExceptionRes(parsedOutput, context);
1590
1562
  default:
1591
1563
  const parsedBody = parsedOutput.body;
1592
- throwDefaultError({
1564
+ return throwDefaultError({
1593
1565
  output,
1594
1566
  parsedBody: parsedBody.Error,
1595
- exceptionCtor: __BaseException,
1596
1567
  errorCode,
1597
1568
  });
1598
1569
  }
@@ -1608,7 +1579,7 @@ export const de_RemoveTagsCommand = async (output, context) => {
1608
1579
  $metadata: deserializeMetadata(output),
1609
1580
  ...contents,
1610
1581
  };
1611
- return Promise.resolve(response);
1582
+ return response;
1612
1583
  };
1613
1584
  const de_RemoveTagsCommandError = async (output, context) => {
1614
1585
  const parsedOutput = {
@@ -1634,10 +1605,9 @@ const de_RemoveTagsCommandError = async (output, context) => {
1634
1605
  throw await de_TooManyTagsExceptionRes(parsedOutput, context);
1635
1606
  default:
1636
1607
  const parsedBody = parsedOutput.body;
1637
- throwDefaultError({
1608
+ return throwDefaultError({
1638
1609
  output,
1639
1610
  parsedBody: parsedBody.Error,
1640
- exceptionCtor: __BaseException,
1641
1611
  errorCode,
1642
1612
  });
1643
1613
  }
@@ -1653,7 +1623,7 @@ export const de_SetIpAddressTypeCommand = async (output, context) => {
1653
1623
  $metadata: deserializeMetadata(output),
1654
1624
  ...contents,
1655
1625
  };
1656
- return Promise.resolve(response);
1626
+ return response;
1657
1627
  };
1658
1628
  const de_SetIpAddressTypeCommandError = async (output, context) => {
1659
1629
  const parsedOutput = {
@@ -1673,10 +1643,9 @@ const de_SetIpAddressTypeCommandError = async (output, context) => {
1673
1643
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1674
1644
  default:
1675
1645
  const parsedBody = parsedOutput.body;
1676
- throwDefaultError({
1646
+ return throwDefaultError({
1677
1647
  output,
1678
1648
  parsedBody: parsedBody.Error,
1679
- exceptionCtor: __BaseException,
1680
1649
  errorCode,
1681
1650
  });
1682
1651
  }
@@ -1692,7 +1661,7 @@ export const de_SetRulePrioritiesCommand = async (output, context) => {
1692
1661
  $metadata: deserializeMetadata(output),
1693
1662
  ...contents,
1694
1663
  };
1695
- return Promise.resolve(response);
1664
+ return response;
1696
1665
  };
1697
1666
  const de_SetRulePrioritiesCommandError = async (output, context) => {
1698
1667
  const parsedOutput = {
@@ -1712,10 +1681,9 @@ const de_SetRulePrioritiesCommandError = async (output, context) => {
1712
1681
  throw await de_RuleNotFoundExceptionRes(parsedOutput, context);
1713
1682
  default:
1714
1683
  const parsedBody = parsedOutput.body;
1715
- throwDefaultError({
1684
+ return throwDefaultError({
1716
1685
  output,
1717
1686
  parsedBody: parsedBody.Error,
1718
- exceptionCtor: __BaseException,
1719
1687
  errorCode,
1720
1688
  });
1721
1689
  }
@@ -1731,7 +1699,7 @@ export const de_SetSecurityGroupsCommand = async (output, context) => {
1731
1699
  $metadata: deserializeMetadata(output),
1732
1700
  ...contents,
1733
1701
  };
1734
- return Promise.resolve(response);
1702
+ return response;
1735
1703
  };
1736
1704
  const de_SetSecurityGroupsCommandError = async (output, context) => {
1737
1705
  const parsedOutput = {
@@ -1751,10 +1719,9 @@ const de_SetSecurityGroupsCommandError = async (output, context) => {
1751
1719
  throw await de_LoadBalancerNotFoundExceptionRes(parsedOutput, context);
1752
1720
  default:
1753
1721
  const parsedBody = parsedOutput.body;
1754
- throwDefaultError({
1722
+ return throwDefaultError({
1755
1723
  output,
1756
1724
  parsedBody: parsedBody.Error,
1757
- exceptionCtor: __BaseException,
1758
1725
  errorCode,
1759
1726
  });
1760
1727
  }
@@ -1770,7 +1737,7 @@ export const de_SetSubnetsCommand = async (output, context) => {
1770
1737
  $metadata: deserializeMetadata(output),
1771
1738
  ...contents,
1772
1739
  };
1773
- return Promise.resolve(response);
1740
+ return response;
1774
1741
  };
1775
1742
  const de_SetSubnetsCommandError = async (output, context) => {
1776
1743
  const parsedOutput = {
@@ -1799,10 +1766,9 @@ const de_SetSubnetsCommandError = async (output, context) => {
1799
1766
  throw await de_SubnetNotFoundExceptionRes(parsedOutput, context);
1800
1767
  default:
1801
1768
  const parsedBody = parsedOutput.body;
1802
- throwDefaultError({
1769
+ return throwDefaultError({
1803
1770
  output,
1804
1771
  parsedBody: parsedBody.Error,
1805
- exceptionCtor: __BaseException,
1806
1772
  errorCode,
1807
1773
  });
1808
1774
  }
@@ -5118,6 +5084,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
5118
5084
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
5119
5085
  };
5120
5086
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
5087
+ const throwDefaultError = withBaseException(__BaseException);
5121
5088
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
5122
5089
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
5123
5090
  const contents = {