@aws-sdk/client-cloudwatch 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, serializeFloat as __serializeFloat, strictParseFloat as __strictParseFloat, 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, serializeFloat as __serializeFloat, strictParseFloat as __strictParseFloat, strictParseInt32 as __strictParseInt32, strictParseLong as __strictParseLong, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { XMLParser } from "fast-xml-parser";
4
4
  import { CloudWatchServiceException as __BaseException } from "../models/CloudWatchServiceException";
5
5
  import { ConcurrentModificationException, DashboardInvalidInputError, DashboardNotFoundError, InternalServiceFault, InvalidFormatFault, InvalidNextToken, InvalidParameterCombinationException, InvalidParameterValueException, LimitExceededException, LimitExceededFault, MissingRequiredParameterException, ResourceNotFound, ResourceNotFoundException, } from "../models/models_0";
@@ -391,7 +391,7 @@ export const de_DeleteAlarmsCommand = async (output, context) => {
391
391
  const response = {
392
392
  $metadata: deserializeMetadata(output),
393
393
  };
394
- return Promise.resolve(response);
394
+ return response;
395
395
  };
396
396
  const de_DeleteAlarmsCommandError = async (output, context) => {
397
397
  const parsedOutput = {
@@ -405,10 +405,9 @@ const de_DeleteAlarmsCommandError = async (output, context) => {
405
405
  throw await de_ResourceNotFoundRes(parsedOutput, context);
406
406
  default:
407
407
  const parsedBody = parsedOutput.body;
408
- throwDefaultError({
408
+ return throwDefaultError({
409
409
  output,
410
410
  parsedBody: parsedBody.Error,
411
- exceptionCtor: __BaseException,
412
411
  errorCode,
413
412
  });
414
413
  }
@@ -424,7 +423,7 @@ export const de_DeleteAnomalyDetectorCommand = async (output, context) => {
424
423
  $metadata: deserializeMetadata(output),
425
424
  ...contents,
426
425
  };
427
- return Promise.resolve(response);
426
+ return response;
428
427
  };
429
428
  const de_DeleteAnomalyDetectorCommandError = async (output, context) => {
430
429
  const parsedOutput = {
@@ -450,10 +449,9 @@ const de_DeleteAnomalyDetectorCommandError = async (output, context) => {
450
449
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
451
450
  default:
452
451
  const parsedBody = parsedOutput.body;
453
- throwDefaultError({
452
+ return throwDefaultError({
454
453
  output,
455
454
  parsedBody: parsedBody.Error,
456
- exceptionCtor: __BaseException,
457
455
  errorCode,
458
456
  });
459
457
  }
@@ -469,7 +467,7 @@ export const de_DeleteDashboardsCommand = async (output, context) => {
469
467
  $metadata: deserializeMetadata(output),
470
468
  ...contents,
471
469
  };
472
- return Promise.resolve(response);
470
+ return response;
473
471
  };
474
472
  const de_DeleteDashboardsCommandError = async (output, context) => {
475
473
  const parsedOutput = {
@@ -489,10 +487,9 @@ const de_DeleteDashboardsCommandError = async (output, context) => {
489
487
  throw await de_DashboardNotFoundErrorRes(parsedOutput, context);
490
488
  default:
491
489
  const parsedBody = parsedOutput.body;
492
- throwDefaultError({
490
+ return throwDefaultError({
493
491
  output,
494
492
  parsedBody: parsedBody.Error,
495
- exceptionCtor: __BaseException,
496
493
  errorCode,
497
494
  });
498
495
  }
@@ -508,7 +505,7 @@ export const de_DeleteInsightRulesCommand = async (output, context) => {
508
505
  $metadata: deserializeMetadata(output),
509
506
  ...contents,
510
507
  };
511
- return Promise.resolve(response);
508
+ return response;
512
509
  };
513
510
  const de_DeleteInsightRulesCommandError = async (output, context) => {
514
511
  const parsedOutput = {
@@ -525,10 +522,9 @@ const de_DeleteInsightRulesCommandError = async (output, context) => {
525
522
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
526
523
  default:
527
524
  const parsedBody = parsedOutput.body;
528
- throwDefaultError({
525
+ return throwDefaultError({
529
526
  output,
530
527
  parsedBody: parsedBody.Error,
531
- exceptionCtor: __BaseException,
532
528
  errorCode,
533
529
  });
534
530
  }
@@ -544,7 +540,7 @@ export const de_DeleteMetricStreamCommand = async (output, context) => {
544
540
  $metadata: deserializeMetadata(output),
545
541
  ...contents,
546
542
  };
547
- return Promise.resolve(response);
543
+ return response;
548
544
  };
549
545
  const de_DeleteMetricStreamCommandError = async (output, context) => {
550
546
  const parsedOutput = {
@@ -564,10 +560,9 @@ const de_DeleteMetricStreamCommandError = async (output, context) => {
564
560
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
565
561
  default:
566
562
  const parsedBody = parsedOutput.body;
567
- throwDefaultError({
563
+ return throwDefaultError({
568
564
  output,
569
565
  parsedBody: parsedBody.Error,
570
- exceptionCtor: __BaseException,
571
566
  errorCode,
572
567
  });
573
568
  }
@@ -583,7 +578,7 @@ export const de_DescribeAlarmHistoryCommand = async (output, context) => {
583
578
  $metadata: deserializeMetadata(output),
584
579
  ...contents,
585
580
  };
586
- return Promise.resolve(response);
581
+ return response;
587
582
  };
588
583
  const de_DescribeAlarmHistoryCommandError = async (output, context) => {
589
584
  const parsedOutput = {
@@ -597,10 +592,9 @@ const de_DescribeAlarmHistoryCommandError = async (output, context) => {
597
592
  throw await de_InvalidNextTokenRes(parsedOutput, context);
598
593
  default:
599
594
  const parsedBody = parsedOutput.body;
600
- throwDefaultError({
595
+ return throwDefaultError({
601
596
  output,
602
597
  parsedBody: parsedBody.Error,
603
- exceptionCtor: __BaseException,
604
598
  errorCode,
605
599
  });
606
600
  }
@@ -616,7 +610,7 @@ export const de_DescribeAlarmsCommand = async (output, context) => {
616
610
  $metadata: deserializeMetadata(output),
617
611
  ...contents,
618
612
  };
619
- return Promise.resolve(response);
613
+ return response;
620
614
  };
621
615
  const de_DescribeAlarmsCommandError = async (output, context) => {
622
616
  const parsedOutput = {
@@ -630,10 +624,9 @@ const de_DescribeAlarmsCommandError = async (output, context) => {
630
624
  throw await de_InvalidNextTokenRes(parsedOutput, context);
631
625
  default:
632
626
  const parsedBody = parsedOutput.body;
633
- throwDefaultError({
627
+ return throwDefaultError({
634
628
  output,
635
629
  parsedBody: parsedBody.Error,
636
- exceptionCtor: __BaseException,
637
630
  errorCode,
638
631
  });
639
632
  }
@@ -649,7 +642,7 @@ export const de_DescribeAlarmsForMetricCommand = async (output, context) => {
649
642
  $metadata: deserializeMetadata(output),
650
643
  ...contents,
651
644
  };
652
- return Promise.resolve(response);
645
+ return response;
653
646
  };
654
647
  const de_DescribeAlarmsForMetricCommandError = async (output, context) => {
655
648
  const parsedOutput = {
@@ -658,10 +651,9 @@ const de_DescribeAlarmsForMetricCommandError = async (output, context) => {
658
651
  };
659
652
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
660
653
  const parsedBody = parsedOutput.body;
661
- throwDefaultError({
654
+ return throwDefaultError({
662
655
  output,
663
656
  parsedBody: parsedBody.Error,
664
- exceptionCtor: __BaseException,
665
657
  errorCode,
666
658
  });
667
659
  };
@@ -676,7 +668,7 @@ export const de_DescribeAnomalyDetectorsCommand = async (output, context) => {
676
668
  $metadata: deserializeMetadata(output),
677
669
  ...contents,
678
670
  };
679
- return Promise.resolve(response);
671
+ return response;
680
672
  };
681
673
  const de_DescribeAnomalyDetectorsCommandError = async (output, context) => {
682
674
  const parsedOutput = {
@@ -699,10 +691,9 @@ const de_DescribeAnomalyDetectorsCommandError = async (output, context) => {
699
691
  throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
700
692
  default:
701
693
  const parsedBody = parsedOutput.body;
702
- throwDefaultError({
694
+ return throwDefaultError({
703
695
  output,
704
696
  parsedBody: parsedBody.Error,
705
- exceptionCtor: __BaseException,
706
697
  errorCode,
707
698
  });
708
699
  }
@@ -718,7 +709,7 @@ export const de_DescribeInsightRulesCommand = async (output, context) => {
718
709
  $metadata: deserializeMetadata(output),
719
710
  ...contents,
720
711
  };
721
- return Promise.resolve(response);
712
+ return response;
722
713
  };
723
714
  const de_DescribeInsightRulesCommandError = async (output, context) => {
724
715
  const parsedOutput = {
@@ -732,10 +723,9 @@ const de_DescribeInsightRulesCommandError = async (output, context) => {
732
723
  throw await de_InvalidNextTokenRes(parsedOutput, context);
733
724
  default:
734
725
  const parsedBody = parsedOutput.body;
735
- throwDefaultError({
726
+ return throwDefaultError({
736
727
  output,
737
728
  parsedBody: parsedBody.Error,
738
- exceptionCtor: __BaseException,
739
729
  errorCode,
740
730
  });
741
731
  }
@@ -748,7 +738,7 @@ export const de_DisableAlarmActionsCommand = async (output, context) => {
748
738
  const response = {
749
739
  $metadata: deserializeMetadata(output),
750
740
  };
751
- return Promise.resolve(response);
741
+ return response;
752
742
  };
753
743
  const de_DisableAlarmActionsCommandError = async (output, context) => {
754
744
  const parsedOutput = {
@@ -757,10 +747,9 @@ const de_DisableAlarmActionsCommandError = async (output, context) => {
757
747
  };
758
748
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
759
749
  const parsedBody = parsedOutput.body;
760
- throwDefaultError({
750
+ return throwDefaultError({
761
751
  output,
762
752
  parsedBody: parsedBody.Error,
763
- exceptionCtor: __BaseException,
764
753
  errorCode,
765
754
  });
766
755
  };
@@ -775,7 +764,7 @@ export const de_DisableInsightRulesCommand = async (output, context) => {
775
764
  $metadata: deserializeMetadata(output),
776
765
  ...contents,
777
766
  };
778
- return Promise.resolve(response);
767
+ return response;
779
768
  };
780
769
  const de_DisableInsightRulesCommandError = async (output, context) => {
781
770
  const parsedOutput = {
@@ -792,10 +781,9 @@ const de_DisableInsightRulesCommandError = async (output, context) => {
792
781
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
793
782
  default:
794
783
  const parsedBody = parsedOutput.body;
795
- throwDefaultError({
784
+ return throwDefaultError({
796
785
  output,
797
786
  parsedBody: parsedBody.Error,
798
- exceptionCtor: __BaseException,
799
787
  errorCode,
800
788
  });
801
789
  }
@@ -808,7 +796,7 @@ export const de_EnableAlarmActionsCommand = async (output, context) => {
808
796
  const response = {
809
797
  $metadata: deserializeMetadata(output),
810
798
  };
811
- return Promise.resolve(response);
799
+ return response;
812
800
  };
813
801
  const de_EnableAlarmActionsCommandError = async (output, context) => {
814
802
  const parsedOutput = {
@@ -817,10 +805,9 @@ const de_EnableAlarmActionsCommandError = async (output, context) => {
817
805
  };
818
806
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
819
807
  const parsedBody = parsedOutput.body;
820
- throwDefaultError({
808
+ return throwDefaultError({
821
809
  output,
822
810
  parsedBody: parsedBody.Error,
823
- exceptionCtor: __BaseException,
824
811
  errorCode,
825
812
  });
826
813
  };
@@ -835,7 +822,7 @@ export const de_EnableInsightRulesCommand = async (output, context) => {
835
822
  $metadata: deserializeMetadata(output),
836
823
  ...contents,
837
824
  };
838
- return Promise.resolve(response);
825
+ return response;
839
826
  };
840
827
  const de_EnableInsightRulesCommandError = async (output, context) => {
841
828
  const parsedOutput = {
@@ -855,10 +842,9 @@ const de_EnableInsightRulesCommandError = async (output, context) => {
855
842
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
856
843
  default:
857
844
  const parsedBody = parsedOutput.body;
858
- throwDefaultError({
845
+ return throwDefaultError({
859
846
  output,
860
847
  parsedBody: parsedBody.Error,
861
- exceptionCtor: __BaseException,
862
848
  errorCode,
863
849
  });
864
850
  }
@@ -874,7 +860,7 @@ export const de_GetDashboardCommand = async (output, context) => {
874
860
  $metadata: deserializeMetadata(output),
875
861
  ...contents,
876
862
  };
877
- return Promise.resolve(response);
863
+ return response;
878
864
  };
879
865
  const de_GetDashboardCommandError = async (output, context) => {
880
866
  const parsedOutput = {
@@ -894,10 +880,9 @@ const de_GetDashboardCommandError = async (output, context) => {
894
880
  throw await de_DashboardNotFoundErrorRes(parsedOutput, context);
895
881
  default:
896
882
  const parsedBody = parsedOutput.body;
897
- throwDefaultError({
883
+ return throwDefaultError({
898
884
  output,
899
885
  parsedBody: parsedBody.Error,
900
- exceptionCtor: __BaseException,
901
886
  errorCode,
902
887
  });
903
888
  }
@@ -913,7 +898,7 @@ export const de_GetInsightRuleReportCommand = async (output, context) => {
913
898
  $metadata: deserializeMetadata(output),
914
899
  ...contents,
915
900
  };
916
- return Promise.resolve(response);
901
+ return response;
917
902
  };
918
903
  const de_GetInsightRuleReportCommandError = async (output, context) => {
919
904
  const parsedOutput = {
@@ -933,10 +918,9 @@ const de_GetInsightRuleReportCommandError = async (output, context) => {
933
918
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
934
919
  default:
935
920
  const parsedBody = parsedOutput.body;
936
- throwDefaultError({
921
+ return throwDefaultError({
937
922
  output,
938
923
  parsedBody: parsedBody.Error,
939
- exceptionCtor: __BaseException,
940
924
  errorCode,
941
925
  });
942
926
  }
@@ -952,7 +936,7 @@ export const de_GetMetricDataCommand = async (output, context) => {
952
936
  $metadata: deserializeMetadata(output),
953
937
  ...contents,
954
938
  };
955
- return Promise.resolve(response);
939
+ return response;
956
940
  };
957
941
  const de_GetMetricDataCommandError = async (output, context) => {
958
942
  const parsedOutput = {
@@ -966,10 +950,9 @@ const de_GetMetricDataCommandError = async (output, context) => {
966
950
  throw await de_InvalidNextTokenRes(parsedOutput, context);
967
951
  default:
968
952
  const parsedBody = parsedOutput.body;
969
- throwDefaultError({
953
+ return throwDefaultError({
970
954
  output,
971
955
  parsedBody: parsedBody.Error,
972
- exceptionCtor: __BaseException,
973
956
  errorCode,
974
957
  });
975
958
  }
@@ -985,7 +968,7 @@ export const de_GetMetricStatisticsCommand = async (output, context) => {
985
968
  $metadata: deserializeMetadata(output),
986
969
  ...contents,
987
970
  };
988
- return Promise.resolve(response);
971
+ return response;
989
972
  };
990
973
  const de_GetMetricStatisticsCommandError = async (output, context) => {
991
974
  const parsedOutput = {
@@ -1008,10 +991,9 @@ const de_GetMetricStatisticsCommandError = async (output, context) => {
1008
991
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1009
992
  default:
1010
993
  const parsedBody = parsedOutput.body;
1011
- throwDefaultError({
994
+ return throwDefaultError({
1012
995
  output,
1013
996
  parsedBody: parsedBody.Error,
1014
- exceptionCtor: __BaseException,
1015
997
  errorCode,
1016
998
  });
1017
999
  }
@@ -1027,7 +1009,7 @@ export const de_GetMetricStreamCommand = async (output, context) => {
1027
1009
  $metadata: deserializeMetadata(output),
1028
1010
  ...contents,
1029
1011
  };
1030
- return Promise.resolve(response);
1012
+ return response;
1031
1013
  };
1032
1014
  const de_GetMetricStreamCommandError = async (output, context) => {
1033
1015
  const parsedOutput = {
@@ -1053,10 +1035,9 @@ const de_GetMetricStreamCommandError = async (output, context) => {
1053
1035
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1054
1036
  default:
1055
1037
  const parsedBody = parsedOutput.body;
1056
- throwDefaultError({
1038
+ return throwDefaultError({
1057
1039
  output,
1058
1040
  parsedBody: parsedBody.Error,
1059
- exceptionCtor: __BaseException,
1060
1041
  errorCode,
1061
1042
  });
1062
1043
  }
@@ -1072,7 +1053,7 @@ export const de_GetMetricWidgetImageCommand = async (output, context) => {
1072
1053
  $metadata: deserializeMetadata(output),
1073
1054
  ...contents,
1074
1055
  };
1075
- return Promise.resolve(response);
1056
+ return response;
1076
1057
  };
1077
1058
  const de_GetMetricWidgetImageCommandError = async (output, context) => {
1078
1059
  const parsedOutput = {
@@ -1081,10 +1062,9 @@ const de_GetMetricWidgetImageCommandError = async (output, context) => {
1081
1062
  };
1082
1063
  const errorCode = loadQueryErrorCode(output, parsedOutput.body);
1083
1064
  const parsedBody = parsedOutput.body;
1084
- throwDefaultError({
1065
+ return throwDefaultError({
1085
1066
  output,
1086
1067
  parsedBody: parsedBody.Error,
1087
- exceptionCtor: __BaseException,
1088
1068
  errorCode,
1089
1069
  });
1090
1070
  };
@@ -1099,7 +1079,7 @@ export const de_ListDashboardsCommand = async (output, context) => {
1099
1079
  $metadata: deserializeMetadata(output),
1100
1080
  ...contents,
1101
1081
  };
1102
- return Promise.resolve(response);
1082
+ return response;
1103
1083
  };
1104
1084
  const de_ListDashboardsCommandError = async (output, context) => {
1105
1085
  const parsedOutput = {
@@ -1116,10 +1096,9 @@ const de_ListDashboardsCommandError = async (output, context) => {
1116
1096
  throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1117
1097
  default:
1118
1098
  const parsedBody = parsedOutput.body;
1119
- throwDefaultError({
1099
+ return throwDefaultError({
1120
1100
  output,
1121
1101
  parsedBody: parsedBody.Error,
1122
- exceptionCtor: __BaseException,
1123
1102
  errorCode,
1124
1103
  });
1125
1104
  }
@@ -1135,7 +1114,7 @@ export const de_ListManagedInsightRulesCommand = async (output, context) => {
1135
1114
  $metadata: deserializeMetadata(output),
1136
1115
  ...contents,
1137
1116
  };
1138
- return Promise.resolve(response);
1117
+ return response;
1139
1118
  };
1140
1119
  const de_ListManagedInsightRulesCommandError = async (output, context) => {
1141
1120
  const parsedOutput = {
@@ -1155,10 +1134,9 @@ const de_ListManagedInsightRulesCommandError = async (output, context) => {
1155
1134
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1156
1135
  default:
1157
1136
  const parsedBody = parsedOutput.body;
1158
- throwDefaultError({
1137
+ return throwDefaultError({
1159
1138
  output,
1160
1139
  parsedBody: parsedBody.Error,
1161
- exceptionCtor: __BaseException,
1162
1140
  errorCode,
1163
1141
  });
1164
1142
  }
@@ -1174,7 +1152,7 @@ export const de_ListMetricsCommand = async (output, context) => {
1174
1152
  $metadata: deserializeMetadata(output),
1175
1153
  ...contents,
1176
1154
  };
1177
- return Promise.resolve(response);
1155
+ return response;
1178
1156
  };
1179
1157
  const de_ListMetricsCommandError = async (output, context) => {
1180
1158
  const parsedOutput = {
@@ -1191,10 +1169,9 @@ const de_ListMetricsCommandError = async (output, context) => {
1191
1169
  throw await de_InvalidParameterValueExceptionRes(parsedOutput, context);
1192
1170
  default:
1193
1171
  const parsedBody = parsedOutput.body;
1194
- throwDefaultError({
1172
+ return throwDefaultError({
1195
1173
  output,
1196
1174
  parsedBody: parsedBody.Error,
1197
- exceptionCtor: __BaseException,
1198
1175
  errorCode,
1199
1176
  });
1200
1177
  }
@@ -1210,7 +1187,7 @@ export const de_ListMetricStreamsCommand = async (output, context) => {
1210
1187
  $metadata: deserializeMetadata(output),
1211
1188
  ...contents,
1212
1189
  };
1213
- return Promise.resolve(response);
1190
+ return response;
1214
1191
  };
1215
1192
  const de_ListMetricStreamsCommandError = async (output, context) => {
1216
1193
  const parsedOutput = {
@@ -1233,10 +1210,9 @@ const de_ListMetricStreamsCommandError = async (output, context) => {
1233
1210
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1234
1211
  default:
1235
1212
  const parsedBody = parsedOutput.body;
1236
- throwDefaultError({
1213
+ return throwDefaultError({
1237
1214
  output,
1238
1215
  parsedBody: parsedBody.Error,
1239
- exceptionCtor: __BaseException,
1240
1216
  errorCode,
1241
1217
  });
1242
1218
  }
@@ -1252,7 +1228,7 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
1252
1228
  $metadata: deserializeMetadata(output),
1253
1229
  ...contents,
1254
1230
  };
1255
- return Promise.resolve(response);
1231
+ return response;
1256
1232
  };
1257
1233
  const de_ListTagsForResourceCommandError = async (output, context) => {
1258
1234
  const parsedOutput = {
@@ -1272,10 +1248,9 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
1272
1248
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1273
1249
  default:
1274
1250
  const parsedBody = parsedOutput.body;
1275
- throwDefaultError({
1251
+ return throwDefaultError({
1276
1252
  output,
1277
1253
  parsedBody: parsedBody.Error,
1278
- exceptionCtor: __BaseException,
1279
1254
  errorCode,
1280
1255
  });
1281
1256
  }
@@ -1291,7 +1266,7 @@ export const de_PutAnomalyDetectorCommand = async (output, context) => {
1291
1266
  $metadata: deserializeMetadata(output),
1292
1267
  ...contents,
1293
1268
  };
1294
- return Promise.resolve(response);
1269
+ return response;
1295
1270
  };
1296
1271
  const de_PutAnomalyDetectorCommandError = async (output, context) => {
1297
1272
  const parsedOutput = {
@@ -1317,10 +1292,9 @@ const de_PutAnomalyDetectorCommandError = async (output, context) => {
1317
1292
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1318
1293
  default:
1319
1294
  const parsedBody = parsedOutput.body;
1320
- throwDefaultError({
1295
+ return throwDefaultError({
1321
1296
  output,
1322
1297
  parsedBody: parsedBody.Error,
1323
- exceptionCtor: __BaseException,
1324
1298
  errorCode,
1325
1299
  });
1326
1300
  }
@@ -1333,7 +1307,7 @@ export const de_PutCompositeAlarmCommand = async (output, context) => {
1333
1307
  const response = {
1334
1308
  $metadata: deserializeMetadata(output),
1335
1309
  };
1336
- return Promise.resolve(response);
1310
+ return response;
1337
1311
  };
1338
1312
  const de_PutCompositeAlarmCommandError = async (output, context) => {
1339
1313
  const parsedOutput = {
@@ -1347,10 +1321,9 @@ const de_PutCompositeAlarmCommandError = async (output, context) => {
1347
1321
  throw await de_LimitExceededFaultRes(parsedOutput, context);
1348
1322
  default:
1349
1323
  const parsedBody = parsedOutput.body;
1350
- throwDefaultError({
1324
+ return throwDefaultError({
1351
1325
  output,
1352
1326
  parsedBody: parsedBody.Error,
1353
- exceptionCtor: __BaseException,
1354
1327
  errorCode,
1355
1328
  });
1356
1329
  }
@@ -1366,7 +1339,7 @@ export const de_PutDashboardCommand = async (output, context) => {
1366
1339
  $metadata: deserializeMetadata(output),
1367
1340
  ...contents,
1368
1341
  };
1369
- return Promise.resolve(response);
1342
+ return response;
1370
1343
  };
1371
1344
  const de_PutDashboardCommandError = async (output, context) => {
1372
1345
  const parsedOutput = {
@@ -1383,10 +1356,9 @@ const de_PutDashboardCommandError = async (output, context) => {
1383
1356
  throw await de_DashboardInvalidInputErrorRes(parsedOutput, context);
1384
1357
  default:
1385
1358
  const parsedBody = parsedOutput.body;
1386
- throwDefaultError({
1359
+ return throwDefaultError({
1387
1360
  output,
1388
1361
  parsedBody: parsedBody.Error,
1389
- exceptionCtor: __BaseException,
1390
1362
  errorCode,
1391
1363
  });
1392
1364
  }
@@ -1402,7 +1374,7 @@ export const de_PutInsightRuleCommand = async (output, context) => {
1402
1374
  $metadata: deserializeMetadata(output),
1403
1375
  ...contents,
1404
1376
  };
1405
- return Promise.resolve(response);
1377
+ return response;
1406
1378
  };
1407
1379
  const de_PutInsightRuleCommandError = async (output, context) => {
1408
1380
  const parsedOutput = {
@@ -1422,10 +1394,9 @@ const de_PutInsightRuleCommandError = async (output, context) => {
1422
1394
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1423
1395
  default:
1424
1396
  const parsedBody = parsedOutput.body;
1425
- throwDefaultError({
1397
+ return throwDefaultError({
1426
1398
  output,
1427
1399
  parsedBody: parsedBody.Error,
1428
- exceptionCtor: __BaseException,
1429
1400
  errorCode,
1430
1401
  });
1431
1402
  }
@@ -1441,7 +1412,7 @@ export const de_PutManagedInsightRulesCommand = async (output, context) => {
1441
1412
  $metadata: deserializeMetadata(output),
1442
1413
  ...contents,
1443
1414
  };
1444
- return Promise.resolve(response);
1415
+ return response;
1445
1416
  };
1446
1417
  const de_PutManagedInsightRulesCommandError = async (output, context) => {
1447
1418
  const parsedOutput = {
@@ -1458,10 +1429,9 @@ const de_PutManagedInsightRulesCommandError = async (output, context) => {
1458
1429
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1459
1430
  default:
1460
1431
  const parsedBody = parsedOutput.body;
1461
- throwDefaultError({
1432
+ return throwDefaultError({
1462
1433
  output,
1463
1434
  parsedBody: parsedBody.Error,
1464
- exceptionCtor: __BaseException,
1465
1435
  errorCode,
1466
1436
  });
1467
1437
  }
@@ -1474,7 +1444,7 @@ export const de_PutMetricAlarmCommand = async (output, context) => {
1474
1444
  const response = {
1475
1445
  $metadata: deserializeMetadata(output),
1476
1446
  };
1477
- return Promise.resolve(response);
1447
+ return response;
1478
1448
  };
1479
1449
  const de_PutMetricAlarmCommandError = async (output, context) => {
1480
1450
  const parsedOutput = {
@@ -1488,10 +1458,9 @@ const de_PutMetricAlarmCommandError = async (output, context) => {
1488
1458
  throw await de_LimitExceededFaultRes(parsedOutput, context);
1489
1459
  default:
1490
1460
  const parsedBody = parsedOutput.body;
1491
- throwDefaultError({
1461
+ return throwDefaultError({
1492
1462
  output,
1493
1463
  parsedBody: parsedBody.Error,
1494
- exceptionCtor: __BaseException,
1495
1464
  errorCode,
1496
1465
  });
1497
1466
  }
@@ -1504,7 +1473,7 @@ export const de_PutMetricDataCommand = async (output, context) => {
1504
1473
  const response = {
1505
1474
  $metadata: deserializeMetadata(output),
1506
1475
  };
1507
- return Promise.resolve(response);
1476
+ return response;
1508
1477
  };
1509
1478
  const de_PutMetricDataCommandError = async (output, context) => {
1510
1479
  const parsedOutput = {
@@ -1527,10 +1496,9 @@ const de_PutMetricDataCommandError = async (output, context) => {
1527
1496
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1528
1497
  default:
1529
1498
  const parsedBody = parsedOutput.body;
1530
- throwDefaultError({
1499
+ return throwDefaultError({
1531
1500
  output,
1532
1501
  parsedBody: parsedBody.Error,
1533
- exceptionCtor: __BaseException,
1534
1502
  errorCode,
1535
1503
  });
1536
1504
  }
@@ -1546,7 +1514,7 @@ export const de_PutMetricStreamCommand = async (output, context) => {
1546
1514
  $metadata: deserializeMetadata(output),
1547
1515
  ...contents,
1548
1516
  };
1549
- return Promise.resolve(response);
1517
+ return response;
1550
1518
  };
1551
1519
  const de_PutMetricStreamCommandError = async (output, context) => {
1552
1520
  const parsedOutput = {
@@ -1572,10 +1540,9 @@ const de_PutMetricStreamCommandError = async (output, context) => {
1572
1540
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1573
1541
  default:
1574
1542
  const parsedBody = parsedOutput.body;
1575
- throwDefaultError({
1543
+ return throwDefaultError({
1576
1544
  output,
1577
1545
  parsedBody: parsedBody.Error,
1578
- exceptionCtor: __BaseException,
1579
1546
  errorCode,
1580
1547
  });
1581
1548
  }
@@ -1588,7 +1555,7 @@ export const de_SetAlarmStateCommand = async (output, context) => {
1588
1555
  const response = {
1589
1556
  $metadata: deserializeMetadata(output),
1590
1557
  };
1591
- return Promise.resolve(response);
1558
+ return response;
1592
1559
  };
1593
1560
  const de_SetAlarmStateCommandError = async (output, context) => {
1594
1561
  const parsedOutput = {
@@ -1605,10 +1572,9 @@ const de_SetAlarmStateCommandError = async (output, context) => {
1605
1572
  throw await de_ResourceNotFoundRes(parsedOutput, context);
1606
1573
  default:
1607
1574
  const parsedBody = parsedOutput.body;
1608
- throwDefaultError({
1575
+ return throwDefaultError({
1609
1576
  output,
1610
1577
  parsedBody: parsedBody.Error,
1611
- exceptionCtor: __BaseException,
1612
1578
  errorCode,
1613
1579
  });
1614
1580
  }
@@ -1624,7 +1590,7 @@ export const de_StartMetricStreamsCommand = async (output, context) => {
1624
1590
  $metadata: deserializeMetadata(output),
1625
1591
  ...contents,
1626
1592
  };
1627
- return Promise.resolve(response);
1593
+ return response;
1628
1594
  };
1629
1595
  const de_StartMetricStreamsCommandError = async (output, context) => {
1630
1596
  const parsedOutput = {
@@ -1644,10 +1610,9 @@ const de_StartMetricStreamsCommandError = async (output, context) => {
1644
1610
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1645
1611
  default:
1646
1612
  const parsedBody = parsedOutput.body;
1647
- throwDefaultError({
1613
+ return throwDefaultError({
1648
1614
  output,
1649
1615
  parsedBody: parsedBody.Error,
1650
- exceptionCtor: __BaseException,
1651
1616
  errorCode,
1652
1617
  });
1653
1618
  }
@@ -1663,7 +1628,7 @@ export const de_StopMetricStreamsCommand = async (output, context) => {
1663
1628
  $metadata: deserializeMetadata(output),
1664
1629
  ...contents,
1665
1630
  };
1666
- return Promise.resolve(response);
1631
+ return response;
1667
1632
  };
1668
1633
  const de_StopMetricStreamsCommandError = async (output, context) => {
1669
1634
  const parsedOutput = {
@@ -1683,10 +1648,9 @@ const de_StopMetricStreamsCommandError = async (output, context) => {
1683
1648
  throw await de_MissingRequiredParameterExceptionRes(parsedOutput, context);
1684
1649
  default:
1685
1650
  const parsedBody = parsedOutput.body;
1686
- throwDefaultError({
1651
+ return throwDefaultError({
1687
1652
  output,
1688
1653
  parsedBody: parsedBody.Error,
1689
- exceptionCtor: __BaseException,
1690
1654
  errorCode,
1691
1655
  });
1692
1656
  }
@@ -1702,7 +1666,7 @@ export const de_TagResourceCommand = async (output, context) => {
1702
1666
  $metadata: deserializeMetadata(output),
1703
1667
  ...contents,
1704
1668
  };
1705
- return Promise.resolve(response);
1669
+ return response;
1706
1670
  };
1707
1671
  const de_TagResourceCommandError = async (output, context) => {
1708
1672
  const parsedOutput = {
@@ -1725,10 +1689,9 @@ const de_TagResourceCommandError = async (output, context) => {
1725
1689
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1726
1690
  default:
1727
1691
  const parsedBody = parsedOutput.body;
1728
- throwDefaultError({
1692
+ return throwDefaultError({
1729
1693
  output,
1730
1694
  parsedBody: parsedBody.Error,
1731
- exceptionCtor: __BaseException,
1732
1695
  errorCode,
1733
1696
  });
1734
1697
  }
@@ -1744,7 +1707,7 @@ export const de_UntagResourceCommand = async (output, context) => {
1744
1707
  $metadata: deserializeMetadata(output),
1745
1708
  ...contents,
1746
1709
  };
1747
- return Promise.resolve(response);
1710
+ return response;
1748
1711
  };
1749
1712
  const de_UntagResourceCommandError = async (output, context) => {
1750
1713
  const parsedOutput = {
@@ -1767,10 +1730,9 @@ const de_UntagResourceCommandError = async (output, context) => {
1767
1730
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1768
1731
  default:
1769
1732
  const parsedBody = parsedOutput.body;
1770
- throwDefaultError({
1733
+ return throwDefaultError({
1771
1734
  output,
1772
1735
  parsedBody: parsedBody.Error,
1773
- exceptionCtor: __BaseException,
1774
1736
  errorCode,
1775
1737
  });
1776
1738
  }
@@ -4788,6 +4750,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
4788
4750
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
4789
4751
  };
4790
4752
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
4753
+ const throwDefaultError = withBaseException(__BaseException);
4791
4754
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
4792
4755
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
4793
4756
  const contents = {