@aws-sdk/client-docdb-elastic 3.503.1 → 3.507.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-cjs/index.js CHANGED
@@ -518,7 +518,7 @@ var se_UpdateClusterCommand = /* @__PURE__ */ __name(async (input, context) => {
518
518
  }, "se_UpdateClusterCommand");
519
519
  var de_CreateClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
520
520
  if (output.statusCode !== 200 && output.statusCode >= 300) {
521
- return de_CreateClusterCommandError(output, context);
521
+ return de_CommandError(output, context);
522
522
  }
523
523
  const contents = (0, import_smithy_client.map)({
524
524
  $metadata: deserializeMetadata(output)
@@ -530,43 +530,9 @@ var de_CreateClusterCommand = /* @__PURE__ */ __name(async (output, context) =>
530
530
  Object.assign(contents, doc);
531
531
  return contents;
532
532
  }, "de_CreateClusterCommand");
533
- var de_CreateClusterCommandError = /* @__PURE__ */ __name(async (output, context) => {
534
- const parsedOutput = {
535
- ...output,
536
- body: await parseErrorBody(output.body, context)
537
- };
538
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
539
- switch (errorCode) {
540
- case "AccessDeniedException":
541
- case "com.amazonaws.docdbelastic#AccessDeniedException":
542
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
543
- case "ConflictException":
544
- case "com.amazonaws.docdbelastic#ConflictException":
545
- throw await de_ConflictExceptionRes(parsedOutput, context);
546
- case "InternalServerException":
547
- case "com.amazonaws.docdbelastic#InternalServerException":
548
- throw await de_InternalServerExceptionRes(parsedOutput, context);
549
- case "ServiceQuotaExceededException":
550
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
551
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
552
- case "ThrottlingException":
553
- case "com.amazonaws.docdbelastic#ThrottlingException":
554
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
555
- case "ValidationException":
556
- case "com.amazonaws.docdbelastic#ValidationException":
557
- throw await de_ValidationExceptionRes(parsedOutput, context);
558
- default:
559
- const parsedBody = parsedOutput.body;
560
- return throwDefaultError({
561
- output,
562
- parsedBody,
563
- errorCode
564
- });
565
- }
566
- }, "de_CreateClusterCommandError");
567
533
  var de_CreateClusterSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
568
534
  if (output.statusCode !== 200 && output.statusCode >= 300) {
569
- return de_CreateClusterSnapshotCommandError(output, context);
535
+ return de_CommandError(output, context);
570
536
  }
571
537
  const contents = (0, import_smithy_client.map)({
572
538
  $metadata: deserializeMetadata(output)
@@ -578,46 +544,9 @@ var de_CreateClusterSnapshotCommand = /* @__PURE__ */ __name(async (output, cont
578
544
  Object.assign(contents, doc);
579
545
  return contents;
580
546
  }, "de_CreateClusterSnapshotCommand");
581
- var de_CreateClusterSnapshotCommandError = /* @__PURE__ */ __name(async (output, context) => {
582
- const parsedOutput = {
583
- ...output,
584
- body: await parseErrorBody(output.body, context)
585
- };
586
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
587
- switch (errorCode) {
588
- case "AccessDeniedException":
589
- case "com.amazonaws.docdbelastic#AccessDeniedException":
590
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
591
- case "ConflictException":
592
- case "com.amazonaws.docdbelastic#ConflictException":
593
- throw await de_ConflictExceptionRes(parsedOutput, context);
594
- case "InternalServerException":
595
- case "com.amazonaws.docdbelastic#InternalServerException":
596
- throw await de_InternalServerExceptionRes(parsedOutput, context);
597
- case "ResourceNotFoundException":
598
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
599
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
600
- case "ServiceQuotaExceededException":
601
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
602
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
603
- case "ThrottlingException":
604
- case "com.amazonaws.docdbelastic#ThrottlingException":
605
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
606
- case "ValidationException":
607
- case "com.amazonaws.docdbelastic#ValidationException":
608
- throw await de_ValidationExceptionRes(parsedOutput, context);
609
- default:
610
- const parsedBody = parsedOutput.body;
611
- return throwDefaultError({
612
- output,
613
- parsedBody,
614
- errorCode
615
- });
616
- }
617
- }, "de_CreateClusterSnapshotCommandError");
618
547
  var de_DeleteClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
619
548
  if (output.statusCode !== 200 && output.statusCode >= 300) {
620
- return de_DeleteClusterCommandError(output, context);
549
+ return de_CommandError(output, context);
621
550
  }
622
551
  const contents = (0, import_smithy_client.map)({
623
552
  $metadata: deserializeMetadata(output)
@@ -629,43 +558,9 @@ var de_DeleteClusterCommand = /* @__PURE__ */ __name(async (output, context) =>
629
558
  Object.assign(contents, doc);
630
559
  return contents;
631
560
  }, "de_DeleteClusterCommand");
632
- var de_DeleteClusterCommandError = /* @__PURE__ */ __name(async (output, context) => {
633
- const parsedOutput = {
634
- ...output,
635
- body: await parseErrorBody(output.body, context)
636
- };
637
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
638
- switch (errorCode) {
639
- case "AccessDeniedException":
640
- case "com.amazonaws.docdbelastic#AccessDeniedException":
641
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
642
- case "ConflictException":
643
- case "com.amazonaws.docdbelastic#ConflictException":
644
- throw await de_ConflictExceptionRes(parsedOutput, context);
645
- case "InternalServerException":
646
- case "com.amazonaws.docdbelastic#InternalServerException":
647
- throw await de_InternalServerExceptionRes(parsedOutput, context);
648
- case "ResourceNotFoundException":
649
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
650
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
651
- case "ThrottlingException":
652
- case "com.amazonaws.docdbelastic#ThrottlingException":
653
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
654
- case "ValidationException":
655
- case "com.amazonaws.docdbelastic#ValidationException":
656
- throw await de_ValidationExceptionRes(parsedOutput, context);
657
- default:
658
- const parsedBody = parsedOutput.body;
659
- return throwDefaultError({
660
- output,
661
- parsedBody,
662
- errorCode
663
- });
664
- }
665
- }, "de_DeleteClusterCommandError");
666
561
  var de_DeleteClusterSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
667
562
  if (output.statusCode !== 200 && output.statusCode >= 300) {
668
- return de_DeleteClusterSnapshotCommandError(output, context);
563
+ return de_CommandError(output, context);
669
564
  }
670
565
  const contents = (0, import_smithy_client.map)({
671
566
  $metadata: deserializeMetadata(output)
@@ -677,43 +572,9 @@ var de_DeleteClusterSnapshotCommand = /* @__PURE__ */ __name(async (output, cont
677
572
  Object.assign(contents, doc);
678
573
  return contents;
679
574
  }, "de_DeleteClusterSnapshotCommand");
680
- var de_DeleteClusterSnapshotCommandError = /* @__PURE__ */ __name(async (output, context) => {
681
- const parsedOutput = {
682
- ...output,
683
- body: await parseErrorBody(output.body, context)
684
- };
685
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
686
- switch (errorCode) {
687
- case "AccessDeniedException":
688
- case "com.amazonaws.docdbelastic#AccessDeniedException":
689
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
690
- case "ConflictException":
691
- case "com.amazonaws.docdbelastic#ConflictException":
692
- throw await de_ConflictExceptionRes(parsedOutput, context);
693
- case "InternalServerException":
694
- case "com.amazonaws.docdbelastic#InternalServerException":
695
- throw await de_InternalServerExceptionRes(parsedOutput, context);
696
- case "ResourceNotFoundException":
697
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
698
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
699
- case "ThrottlingException":
700
- case "com.amazonaws.docdbelastic#ThrottlingException":
701
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
702
- case "ValidationException":
703
- case "com.amazonaws.docdbelastic#ValidationException":
704
- throw await de_ValidationExceptionRes(parsedOutput, context);
705
- default:
706
- const parsedBody = parsedOutput.body;
707
- return throwDefaultError({
708
- output,
709
- parsedBody,
710
- errorCode
711
- });
712
- }
713
- }, "de_DeleteClusterSnapshotCommandError");
714
575
  var de_GetClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
715
576
  if (output.statusCode !== 200 && output.statusCode >= 300) {
716
- return de_GetClusterCommandError(output, context);
577
+ return de_CommandError(output, context);
717
578
  }
718
579
  const contents = (0, import_smithy_client.map)({
719
580
  $metadata: deserializeMetadata(output)
@@ -725,40 +586,9 @@ var de_GetClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
725
586
  Object.assign(contents, doc);
726
587
  return contents;
727
588
  }, "de_GetClusterCommand");
728
- var de_GetClusterCommandError = /* @__PURE__ */ __name(async (output, context) => {
729
- const parsedOutput = {
730
- ...output,
731
- body: await parseErrorBody(output.body, context)
732
- };
733
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
734
- switch (errorCode) {
735
- case "AccessDeniedException":
736
- case "com.amazonaws.docdbelastic#AccessDeniedException":
737
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
738
- case "InternalServerException":
739
- case "com.amazonaws.docdbelastic#InternalServerException":
740
- throw await de_InternalServerExceptionRes(parsedOutput, context);
741
- case "ResourceNotFoundException":
742
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
743
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
744
- case "ThrottlingException":
745
- case "com.amazonaws.docdbelastic#ThrottlingException":
746
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
747
- case "ValidationException":
748
- case "com.amazonaws.docdbelastic#ValidationException":
749
- throw await de_ValidationExceptionRes(parsedOutput, context);
750
- default:
751
- const parsedBody = parsedOutput.body;
752
- return throwDefaultError({
753
- output,
754
- parsedBody,
755
- errorCode
756
- });
757
- }
758
- }, "de_GetClusterCommandError");
759
589
  var de_GetClusterSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
760
590
  if (output.statusCode !== 200 && output.statusCode >= 300) {
761
- return de_GetClusterSnapshotCommandError(output, context);
591
+ return de_CommandError(output, context);
762
592
  }
763
593
  const contents = (0, import_smithy_client.map)({
764
594
  $metadata: deserializeMetadata(output)
@@ -770,40 +600,9 @@ var de_GetClusterSnapshotCommand = /* @__PURE__ */ __name(async (output, context
770
600
  Object.assign(contents, doc);
771
601
  return contents;
772
602
  }, "de_GetClusterSnapshotCommand");
773
- var de_GetClusterSnapshotCommandError = /* @__PURE__ */ __name(async (output, context) => {
774
- const parsedOutput = {
775
- ...output,
776
- body: await parseErrorBody(output.body, context)
777
- };
778
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
779
- switch (errorCode) {
780
- case "AccessDeniedException":
781
- case "com.amazonaws.docdbelastic#AccessDeniedException":
782
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
783
- case "InternalServerException":
784
- case "com.amazonaws.docdbelastic#InternalServerException":
785
- throw await de_InternalServerExceptionRes(parsedOutput, context);
786
- case "ResourceNotFoundException":
787
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
788
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
789
- case "ThrottlingException":
790
- case "com.amazonaws.docdbelastic#ThrottlingException":
791
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
792
- case "ValidationException":
793
- case "com.amazonaws.docdbelastic#ValidationException":
794
- throw await de_ValidationExceptionRes(parsedOutput, context);
795
- default:
796
- const parsedBody = parsedOutput.body;
797
- return throwDefaultError({
798
- output,
799
- parsedBody,
800
- errorCode
801
- });
802
- }
803
- }, "de_GetClusterSnapshotCommandError");
804
603
  var de_ListClustersCommand = /* @__PURE__ */ __name(async (output, context) => {
805
604
  if (output.statusCode !== 200 && output.statusCode >= 300) {
806
- return de_ListClustersCommandError(output, context);
605
+ return de_CommandError(output, context);
807
606
  }
808
607
  const contents = (0, import_smithy_client.map)({
809
608
  $metadata: deserializeMetadata(output)
@@ -816,37 +615,9 @@ var de_ListClustersCommand = /* @__PURE__ */ __name(async (output, context) => {
816
615
  Object.assign(contents, doc);
817
616
  return contents;
818
617
  }, "de_ListClustersCommand");
819
- var de_ListClustersCommandError = /* @__PURE__ */ __name(async (output, context) => {
820
- const parsedOutput = {
821
- ...output,
822
- body: await parseErrorBody(output.body, context)
823
- };
824
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
825
- switch (errorCode) {
826
- case "AccessDeniedException":
827
- case "com.amazonaws.docdbelastic#AccessDeniedException":
828
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
829
- case "InternalServerException":
830
- case "com.amazonaws.docdbelastic#InternalServerException":
831
- throw await de_InternalServerExceptionRes(parsedOutput, context);
832
- case "ThrottlingException":
833
- case "com.amazonaws.docdbelastic#ThrottlingException":
834
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
835
- case "ValidationException":
836
- case "com.amazonaws.docdbelastic#ValidationException":
837
- throw await de_ValidationExceptionRes(parsedOutput, context);
838
- default:
839
- const parsedBody = parsedOutput.body;
840
- return throwDefaultError({
841
- output,
842
- parsedBody,
843
- errorCode
844
- });
845
- }
846
- }, "de_ListClustersCommandError");
847
618
  var de_ListClusterSnapshotsCommand = /* @__PURE__ */ __name(async (output, context) => {
848
619
  if (output.statusCode !== 200 && output.statusCode >= 300) {
849
- return de_ListClusterSnapshotsCommandError(output, context);
620
+ return de_CommandError(output, context);
850
621
  }
851
622
  const contents = (0, import_smithy_client.map)({
852
623
  $metadata: deserializeMetadata(output)
@@ -859,37 +630,9 @@ var de_ListClusterSnapshotsCommand = /* @__PURE__ */ __name(async (output, conte
859
630
  Object.assign(contents, doc);
860
631
  return contents;
861
632
  }, "de_ListClusterSnapshotsCommand");
862
- var de_ListClusterSnapshotsCommandError = /* @__PURE__ */ __name(async (output, context) => {
863
- const parsedOutput = {
864
- ...output,
865
- body: await parseErrorBody(output.body, context)
866
- };
867
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
868
- switch (errorCode) {
869
- case "AccessDeniedException":
870
- case "com.amazonaws.docdbelastic#AccessDeniedException":
871
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
872
- case "InternalServerException":
873
- case "com.amazonaws.docdbelastic#InternalServerException":
874
- throw await de_InternalServerExceptionRes(parsedOutput, context);
875
- case "ThrottlingException":
876
- case "com.amazonaws.docdbelastic#ThrottlingException":
877
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
878
- case "ValidationException":
879
- case "com.amazonaws.docdbelastic#ValidationException":
880
- throw await de_ValidationExceptionRes(parsedOutput, context);
881
- default:
882
- const parsedBody = parsedOutput.body;
883
- return throwDefaultError({
884
- output,
885
- parsedBody,
886
- errorCode
887
- });
888
- }
889
- }, "de_ListClusterSnapshotsCommandError");
890
633
  var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
891
634
  if (output.statusCode !== 200 && output.statusCode >= 300) {
892
- return de_ListTagsForResourceCommandError(output, context);
635
+ return de_CommandError(output, context);
893
636
  }
894
637
  const contents = (0, import_smithy_client.map)({
895
638
  $metadata: deserializeMetadata(output)
@@ -901,37 +644,9 @@ var de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, contex
901
644
  Object.assign(contents, doc);
902
645
  return contents;
903
646
  }, "de_ListTagsForResourceCommand");
904
- var de_ListTagsForResourceCommandError = /* @__PURE__ */ __name(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 "InternalServerException":
912
- case "com.amazonaws.docdbelastic#InternalServerException":
913
- throw await de_InternalServerExceptionRes(parsedOutput, context);
914
- case "ResourceNotFoundException":
915
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
916
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
917
- case "ThrottlingException":
918
- case "com.amazonaws.docdbelastic#ThrottlingException":
919
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
920
- case "ValidationException":
921
- case "com.amazonaws.docdbelastic#ValidationException":
922
- throw await de_ValidationExceptionRes(parsedOutput, context);
923
- default:
924
- const parsedBody = parsedOutput.body;
925
- return throwDefaultError({
926
- output,
927
- parsedBody,
928
- errorCode
929
- });
930
- }
931
- }, "de_ListTagsForResourceCommandError");
932
647
  var de_RestoreClusterFromSnapshotCommand = /* @__PURE__ */ __name(async (output, context) => {
933
648
  if (output.statusCode !== 200 && output.statusCode >= 300) {
934
- return de_RestoreClusterFromSnapshotCommandError(output, context);
649
+ return de_CommandError(output, context);
935
650
  }
936
651
  const contents = (0, import_smithy_client.map)({
937
652
  $metadata: deserializeMetadata(output)
@@ -943,46 +658,9 @@ var de_RestoreClusterFromSnapshotCommand = /* @__PURE__ */ __name(async (output,
943
658
  Object.assign(contents, doc);
944
659
  return contents;
945
660
  }, "de_RestoreClusterFromSnapshotCommand");
946
- var de_RestoreClusterFromSnapshotCommandError = /* @__PURE__ */ __name(async (output, context) => {
947
- const parsedOutput = {
948
- ...output,
949
- body: await parseErrorBody(output.body, context)
950
- };
951
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
952
- switch (errorCode) {
953
- case "AccessDeniedException":
954
- case "com.amazonaws.docdbelastic#AccessDeniedException":
955
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
956
- case "ConflictException":
957
- case "com.amazonaws.docdbelastic#ConflictException":
958
- throw await de_ConflictExceptionRes(parsedOutput, context);
959
- case "InternalServerException":
960
- case "com.amazonaws.docdbelastic#InternalServerException":
961
- throw await de_InternalServerExceptionRes(parsedOutput, context);
962
- case "ResourceNotFoundException":
963
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
964
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
965
- case "ServiceQuotaExceededException":
966
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
967
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
968
- case "ThrottlingException":
969
- case "com.amazonaws.docdbelastic#ThrottlingException":
970
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
971
- case "ValidationException":
972
- case "com.amazonaws.docdbelastic#ValidationException":
973
- throw await de_ValidationExceptionRes(parsedOutput, context);
974
- default:
975
- const parsedBody = parsedOutput.body;
976
- return throwDefaultError({
977
- output,
978
- parsedBody,
979
- errorCode
980
- });
981
- }
982
- }, "de_RestoreClusterFromSnapshotCommandError");
983
661
  var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
984
662
  if (output.statusCode !== 200 && output.statusCode >= 300) {
985
- return de_TagResourceCommandError(output, context);
663
+ return de_CommandError(output, context);
986
664
  }
987
665
  const contents = (0, import_smithy_client.map)({
988
666
  $metadata: deserializeMetadata(output)
@@ -990,37 +668,9 @@ var de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
990
668
  await (0, import_smithy_client.collectBody)(output.body, context);
991
669
  return contents;
992
670
  }, "de_TagResourceCommand");
993
- var de_TagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
994
- const parsedOutput = {
995
- ...output,
996
- body: await parseErrorBody(output.body, context)
997
- };
998
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
999
- switch (errorCode) {
1000
- case "InternalServerException":
1001
- case "com.amazonaws.docdbelastic#InternalServerException":
1002
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1003
- case "ResourceNotFoundException":
1004
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
1005
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1006
- case "ThrottlingException":
1007
- case "com.amazonaws.docdbelastic#ThrottlingException":
1008
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1009
- case "ValidationException":
1010
- case "com.amazonaws.docdbelastic#ValidationException":
1011
- throw await de_ValidationExceptionRes(parsedOutput, context);
1012
- default:
1013
- const parsedBody = parsedOutput.body;
1014
- return throwDefaultError({
1015
- output,
1016
- parsedBody,
1017
- errorCode
1018
- });
1019
- }
1020
- }, "de_TagResourceCommandError");
1021
671
  var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {
1022
672
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1023
- return de_UntagResourceCommandError(output, context);
673
+ return de_CommandError(output, context);
1024
674
  }
1025
675
  const contents = (0, import_smithy_client.map)({
1026
676
  $metadata: deserializeMetadata(output)
@@ -1028,37 +678,9 @@ var de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) =>
1028
678
  await (0, import_smithy_client.collectBody)(output.body, context);
1029
679
  return contents;
1030
680
  }, "de_UntagResourceCommand");
1031
- var de_UntagResourceCommandError = /* @__PURE__ */ __name(async (output, context) => {
1032
- const parsedOutput = {
1033
- ...output,
1034
- body: await parseErrorBody(output.body, context)
1035
- };
1036
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1037
- switch (errorCode) {
1038
- case "InternalServerException":
1039
- case "com.amazonaws.docdbelastic#InternalServerException":
1040
- throw await de_InternalServerExceptionRes(parsedOutput, context);
1041
- case "ResourceNotFoundException":
1042
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
1043
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1044
- case "ThrottlingException":
1045
- case "com.amazonaws.docdbelastic#ThrottlingException":
1046
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
1047
- case "ValidationException":
1048
- case "com.amazonaws.docdbelastic#ValidationException":
1049
- throw await de_ValidationExceptionRes(parsedOutput, context);
1050
- default:
1051
- const parsedBody = parsedOutput.body;
1052
- return throwDefaultError({
1053
- output,
1054
- parsedBody,
1055
- errorCode
1056
- });
1057
- }
1058
- }, "de_UntagResourceCommandError");
1059
681
  var de_UpdateClusterCommand = /* @__PURE__ */ __name(async (output, context) => {
1060
682
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1061
- return de_UpdateClusterCommandError(output, context);
683
+ return de_CommandError(output, context);
1062
684
  }
1063
685
  const contents = (0, import_smithy_client.map)({
1064
686
  $metadata: deserializeMetadata(output)
@@ -1070,7 +692,7 @@ var de_UpdateClusterCommand = /* @__PURE__ */ __name(async (output, context) =>
1070
692
  Object.assign(contents, doc);
1071
693
  return contents;
1072
694
  }, "de_UpdateClusterCommand");
1073
- var de_UpdateClusterCommandError = /* @__PURE__ */ __name(async (output, context) => {
695
+ var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
1074
696
  const parsedOutput = {
1075
697
  ...output,
1076
698
  body: await parseErrorBody(output.body, context)
@@ -1086,15 +708,18 @@ var de_UpdateClusterCommandError = /* @__PURE__ */ __name(async (output, context
1086
708
  case "InternalServerException":
1087
709
  case "com.amazonaws.docdbelastic#InternalServerException":
1088
710
  throw await de_InternalServerExceptionRes(parsedOutput, context);
1089
- case "ResourceNotFoundException":
1090
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
1091
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
711
+ case "ServiceQuotaExceededException":
712
+ case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
713
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
1092
714
  case "ThrottlingException":
1093
715
  case "com.amazonaws.docdbelastic#ThrottlingException":
1094
716
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
1095
717
  case "ValidationException":
1096
718
  case "com.amazonaws.docdbelastic#ValidationException":
1097
719
  throw await de_ValidationExceptionRes(parsedOutput, context);
720
+ case "ResourceNotFoundException":
721
+ case "com.amazonaws.docdbelastic#ResourceNotFoundException":
722
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1098
723
  default:
1099
724
  const parsedBody = parsedOutput.body;
1100
725
  return throwDefaultError({
@@ -1103,7 +728,7 @@ var de_UpdateClusterCommandError = /* @__PURE__ */ __name(async (output, context
1103
728
  errorCode
1104
729
  });
1105
730
  }
1106
- }, "de_UpdateClusterCommandError");
731
+ }, "de_CommandError");
1107
732
  var throwDefaultError = (0, import_smithy_client.withBaseException)(DocDBElasticServiceException);
1108
733
  var de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
1109
734
  const contents = (0, import_smithy_client.map)({});
@@ -182,7 +182,7 @@ export const se_UpdateClusterCommand = async (input, context) => {
182
182
  };
183
183
  export const de_CreateClusterCommand = async (output, context) => {
184
184
  if (output.statusCode !== 200 && output.statusCode >= 300) {
185
- return de_CreateClusterCommandError(output, context);
185
+ return de_CommandError(output, context);
186
186
  }
187
187
  const contents = map({
188
188
  $metadata: deserializeMetadata(output),
@@ -194,43 +194,9 @@ export const de_CreateClusterCommand = async (output, context) => {
194
194
  Object.assign(contents, doc);
195
195
  return contents;
196
196
  };
197
- const de_CreateClusterCommandError = async (output, context) => {
198
- const parsedOutput = {
199
- ...output,
200
- body: await parseErrorBody(output.body, context),
201
- };
202
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
203
- switch (errorCode) {
204
- case "AccessDeniedException":
205
- case "com.amazonaws.docdbelastic#AccessDeniedException":
206
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
207
- case "ConflictException":
208
- case "com.amazonaws.docdbelastic#ConflictException":
209
- throw await de_ConflictExceptionRes(parsedOutput, context);
210
- case "InternalServerException":
211
- case "com.amazonaws.docdbelastic#InternalServerException":
212
- throw await de_InternalServerExceptionRes(parsedOutput, context);
213
- case "ServiceQuotaExceededException":
214
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
215
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
216
- case "ThrottlingException":
217
- case "com.amazonaws.docdbelastic#ThrottlingException":
218
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
219
- case "ValidationException":
220
- case "com.amazonaws.docdbelastic#ValidationException":
221
- throw await de_ValidationExceptionRes(parsedOutput, context);
222
- default:
223
- const parsedBody = parsedOutput.body;
224
- return throwDefaultError({
225
- output,
226
- parsedBody,
227
- errorCode,
228
- });
229
- }
230
- };
231
197
  export const de_CreateClusterSnapshotCommand = async (output, context) => {
232
198
  if (output.statusCode !== 200 && output.statusCode >= 300) {
233
- return de_CreateClusterSnapshotCommandError(output, context);
199
+ return de_CommandError(output, context);
234
200
  }
235
201
  const contents = map({
236
202
  $metadata: deserializeMetadata(output),
@@ -242,46 +208,9 @@ export const de_CreateClusterSnapshotCommand = async (output, context) => {
242
208
  Object.assign(contents, doc);
243
209
  return contents;
244
210
  };
245
- const de_CreateClusterSnapshotCommandError = async (output, context) => {
246
- const parsedOutput = {
247
- ...output,
248
- body: await parseErrorBody(output.body, context),
249
- };
250
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
251
- switch (errorCode) {
252
- case "AccessDeniedException":
253
- case "com.amazonaws.docdbelastic#AccessDeniedException":
254
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
255
- case "ConflictException":
256
- case "com.amazonaws.docdbelastic#ConflictException":
257
- throw await de_ConflictExceptionRes(parsedOutput, context);
258
- case "InternalServerException":
259
- case "com.amazonaws.docdbelastic#InternalServerException":
260
- throw await de_InternalServerExceptionRes(parsedOutput, context);
261
- case "ResourceNotFoundException":
262
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
263
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
264
- case "ServiceQuotaExceededException":
265
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
266
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
267
- case "ThrottlingException":
268
- case "com.amazonaws.docdbelastic#ThrottlingException":
269
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
270
- case "ValidationException":
271
- case "com.amazonaws.docdbelastic#ValidationException":
272
- throw await de_ValidationExceptionRes(parsedOutput, context);
273
- default:
274
- const parsedBody = parsedOutput.body;
275
- return throwDefaultError({
276
- output,
277
- parsedBody,
278
- errorCode,
279
- });
280
- }
281
- };
282
211
  export const de_DeleteClusterCommand = async (output, context) => {
283
212
  if (output.statusCode !== 200 && output.statusCode >= 300) {
284
- return de_DeleteClusterCommandError(output, context);
213
+ return de_CommandError(output, context);
285
214
  }
286
215
  const contents = map({
287
216
  $metadata: deserializeMetadata(output),
@@ -293,43 +222,9 @@ export const de_DeleteClusterCommand = async (output, context) => {
293
222
  Object.assign(contents, doc);
294
223
  return contents;
295
224
  };
296
- const de_DeleteClusterCommandError = async (output, context) => {
297
- const parsedOutput = {
298
- ...output,
299
- body: await parseErrorBody(output.body, context),
300
- };
301
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
302
- switch (errorCode) {
303
- case "AccessDeniedException":
304
- case "com.amazonaws.docdbelastic#AccessDeniedException":
305
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
306
- case "ConflictException":
307
- case "com.amazonaws.docdbelastic#ConflictException":
308
- throw await de_ConflictExceptionRes(parsedOutput, context);
309
- case "InternalServerException":
310
- case "com.amazonaws.docdbelastic#InternalServerException":
311
- throw await de_InternalServerExceptionRes(parsedOutput, context);
312
- case "ResourceNotFoundException":
313
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
314
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
315
- case "ThrottlingException":
316
- case "com.amazonaws.docdbelastic#ThrottlingException":
317
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
318
- case "ValidationException":
319
- case "com.amazonaws.docdbelastic#ValidationException":
320
- throw await de_ValidationExceptionRes(parsedOutput, context);
321
- default:
322
- const parsedBody = parsedOutput.body;
323
- return throwDefaultError({
324
- output,
325
- parsedBody,
326
- errorCode,
327
- });
328
- }
329
- };
330
225
  export const de_DeleteClusterSnapshotCommand = async (output, context) => {
331
226
  if (output.statusCode !== 200 && output.statusCode >= 300) {
332
- return de_DeleteClusterSnapshotCommandError(output, context);
227
+ return de_CommandError(output, context);
333
228
  }
334
229
  const contents = map({
335
230
  $metadata: deserializeMetadata(output),
@@ -341,43 +236,9 @@ export const de_DeleteClusterSnapshotCommand = async (output, context) => {
341
236
  Object.assign(contents, doc);
342
237
  return contents;
343
238
  };
344
- const de_DeleteClusterSnapshotCommandError = async (output, context) => {
345
- const parsedOutput = {
346
- ...output,
347
- body: await parseErrorBody(output.body, context),
348
- };
349
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
350
- switch (errorCode) {
351
- case "AccessDeniedException":
352
- case "com.amazonaws.docdbelastic#AccessDeniedException":
353
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
354
- case "ConflictException":
355
- case "com.amazonaws.docdbelastic#ConflictException":
356
- throw await de_ConflictExceptionRes(parsedOutput, context);
357
- case "InternalServerException":
358
- case "com.amazonaws.docdbelastic#InternalServerException":
359
- throw await de_InternalServerExceptionRes(parsedOutput, context);
360
- case "ResourceNotFoundException":
361
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
362
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
363
- case "ThrottlingException":
364
- case "com.amazonaws.docdbelastic#ThrottlingException":
365
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
366
- case "ValidationException":
367
- case "com.amazonaws.docdbelastic#ValidationException":
368
- throw await de_ValidationExceptionRes(parsedOutput, context);
369
- default:
370
- const parsedBody = parsedOutput.body;
371
- return throwDefaultError({
372
- output,
373
- parsedBody,
374
- errorCode,
375
- });
376
- }
377
- };
378
239
  export const de_GetClusterCommand = async (output, context) => {
379
240
  if (output.statusCode !== 200 && output.statusCode >= 300) {
380
- return de_GetClusterCommandError(output, context);
241
+ return de_CommandError(output, context);
381
242
  }
382
243
  const contents = map({
383
244
  $metadata: deserializeMetadata(output),
@@ -389,40 +250,9 @@ export const de_GetClusterCommand = async (output, context) => {
389
250
  Object.assign(contents, doc);
390
251
  return contents;
391
252
  };
392
- const de_GetClusterCommandError = async (output, context) => {
393
- const parsedOutput = {
394
- ...output,
395
- body: await parseErrorBody(output.body, context),
396
- };
397
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
398
- switch (errorCode) {
399
- case "AccessDeniedException":
400
- case "com.amazonaws.docdbelastic#AccessDeniedException":
401
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
402
- case "InternalServerException":
403
- case "com.amazonaws.docdbelastic#InternalServerException":
404
- throw await de_InternalServerExceptionRes(parsedOutput, context);
405
- case "ResourceNotFoundException":
406
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
407
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
408
- case "ThrottlingException":
409
- case "com.amazonaws.docdbelastic#ThrottlingException":
410
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
411
- case "ValidationException":
412
- case "com.amazonaws.docdbelastic#ValidationException":
413
- throw await de_ValidationExceptionRes(parsedOutput, context);
414
- default:
415
- const parsedBody = parsedOutput.body;
416
- return throwDefaultError({
417
- output,
418
- parsedBody,
419
- errorCode,
420
- });
421
- }
422
- };
423
253
  export const de_GetClusterSnapshotCommand = async (output, context) => {
424
254
  if (output.statusCode !== 200 && output.statusCode >= 300) {
425
- return de_GetClusterSnapshotCommandError(output, context);
255
+ return de_CommandError(output, context);
426
256
  }
427
257
  const contents = map({
428
258
  $metadata: deserializeMetadata(output),
@@ -434,40 +264,9 @@ export const de_GetClusterSnapshotCommand = async (output, context) => {
434
264
  Object.assign(contents, doc);
435
265
  return contents;
436
266
  };
437
- const de_GetClusterSnapshotCommandError = async (output, context) => {
438
- const parsedOutput = {
439
- ...output,
440
- body: await parseErrorBody(output.body, context),
441
- };
442
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
443
- switch (errorCode) {
444
- case "AccessDeniedException":
445
- case "com.amazonaws.docdbelastic#AccessDeniedException":
446
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
447
- case "InternalServerException":
448
- case "com.amazonaws.docdbelastic#InternalServerException":
449
- throw await de_InternalServerExceptionRes(parsedOutput, context);
450
- case "ResourceNotFoundException":
451
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
452
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
453
- case "ThrottlingException":
454
- case "com.amazonaws.docdbelastic#ThrottlingException":
455
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
456
- case "ValidationException":
457
- case "com.amazonaws.docdbelastic#ValidationException":
458
- throw await de_ValidationExceptionRes(parsedOutput, context);
459
- default:
460
- const parsedBody = parsedOutput.body;
461
- return throwDefaultError({
462
- output,
463
- parsedBody,
464
- errorCode,
465
- });
466
- }
467
- };
468
267
  export const de_ListClustersCommand = async (output, context) => {
469
268
  if (output.statusCode !== 200 && output.statusCode >= 300) {
470
- return de_ListClustersCommandError(output, context);
269
+ return de_CommandError(output, context);
471
270
  }
472
271
  const contents = map({
473
272
  $metadata: deserializeMetadata(output),
@@ -480,37 +279,9 @@ export const de_ListClustersCommand = async (output, context) => {
480
279
  Object.assign(contents, doc);
481
280
  return contents;
482
281
  };
483
- const de_ListClustersCommandError = async (output, context) => {
484
- const parsedOutput = {
485
- ...output,
486
- body: await parseErrorBody(output.body, context),
487
- };
488
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
489
- switch (errorCode) {
490
- case "AccessDeniedException":
491
- case "com.amazonaws.docdbelastic#AccessDeniedException":
492
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
493
- case "InternalServerException":
494
- case "com.amazonaws.docdbelastic#InternalServerException":
495
- throw await de_InternalServerExceptionRes(parsedOutput, context);
496
- case "ThrottlingException":
497
- case "com.amazonaws.docdbelastic#ThrottlingException":
498
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
499
- case "ValidationException":
500
- case "com.amazonaws.docdbelastic#ValidationException":
501
- throw await de_ValidationExceptionRes(parsedOutput, context);
502
- default:
503
- const parsedBody = parsedOutput.body;
504
- return throwDefaultError({
505
- output,
506
- parsedBody,
507
- errorCode,
508
- });
509
- }
510
- };
511
282
  export const de_ListClusterSnapshotsCommand = async (output, context) => {
512
283
  if (output.statusCode !== 200 && output.statusCode >= 300) {
513
- return de_ListClusterSnapshotsCommandError(output, context);
284
+ return de_CommandError(output, context);
514
285
  }
515
286
  const contents = map({
516
287
  $metadata: deserializeMetadata(output),
@@ -523,37 +294,9 @@ export const de_ListClusterSnapshotsCommand = async (output, context) => {
523
294
  Object.assign(contents, doc);
524
295
  return contents;
525
296
  };
526
- const de_ListClusterSnapshotsCommandError = async (output, context) => {
527
- const parsedOutput = {
528
- ...output,
529
- body: await parseErrorBody(output.body, context),
530
- };
531
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
532
- switch (errorCode) {
533
- case "AccessDeniedException":
534
- case "com.amazonaws.docdbelastic#AccessDeniedException":
535
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
536
- case "InternalServerException":
537
- case "com.amazonaws.docdbelastic#InternalServerException":
538
- throw await de_InternalServerExceptionRes(parsedOutput, context);
539
- case "ThrottlingException":
540
- case "com.amazonaws.docdbelastic#ThrottlingException":
541
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
542
- case "ValidationException":
543
- case "com.amazonaws.docdbelastic#ValidationException":
544
- throw await de_ValidationExceptionRes(parsedOutput, context);
545
- default:
546
- const parsedBody = parsedOutput.body;
547
- return throwDefaultError({
548
- output,
549
- parsedBody,
550
- errorCode,
551
- });
552
- }
553
- };
554
297
  export const de_ListTagsForResourceCommand = async (output, context) => {
555
298
  if (output.statusCode !== 200 && output.statusCode >= 300) {
556
- return de_ListTagsForResourceCommandError(output, context);
299
+ return de_CommandError(output, context);
557
300
  }
558
301
  const contents = map({
559
302
  $metadata: deserializeMetadata(output),
@@ -565,37 +308,9 @@ export const de_ListTagsForResourceCommand = async (output, context) => {
565
308
  Object.assign(contents, doc);
566
309
  return contents;
567
310
  };
568
- const de_ListTagsForResourceCommandError = async (output, context) => {
569
- const parsedOutput = {
570
- ...output,
571
- body: await parseErrorBody(output.body, context),
572
- };
573
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
- switch (errorCode) {
575
- case "InternalServerException":
576
- case "com.amazonaws.docdbelastic#InternalServerException":
577
- throw await de_InternalServerExceptionRes(parsedOutput, context);
578
- case "ResourceNotFoundException":
579
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
580
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
581
- case "ThrottlingException":
582
- case "com.amazonaws.docdbelastic#ThrottlingException":
583
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
584
- case "ValidationException":
585
- case "com.amazonaws.docdbelastic#ValidationException":
586
- throw await de_ValidationExceptionRes(parsedOutput, context);
587
- default:
588
- const parsedBody = parsedOutput.body;
589
- return throwDefaultError({
590
- output,
591
- parsedBody,
592
- errorCode,
593
- });
594
- }
595
- };
596
311
  export const de_RestoreClusterFromSnapshotCommand = async (output, context) => {
597
312
  if (output.statusCode !== 200 && output.statusCode >= 300) {
598
- return de_RestoreClusterFromSnapshotCommandError(output, context);
313
+ return de_CommandError(output, context);
599
314
  }
600
315
  const contents = map({
601
316
  $metadata: deserializeMetadata(output),
@@ -607,46 +322,9 @@ export const de_RestoreClusterFromSnapshotCommand = async (output, context) => {
607
322
  Object.assign(contents, doc);
608
323
  return contents;
609
324
  };
610
- const de_RestoreClusterFromSnapshotCommandError = async (output, context) => {
611
- const parsedOutput = {
612
- ...output,
613
- body: await parseErrorBody(output.body, context),
614
- };
615
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
616
- switch (errorCode) {
617
- case "AccessDeniedException":
618
- case "com.amazonaws.docdbelastic#AccessDeniedException":
619
- throw await de_AccessDeniedExceptionRes(parsedOutput, context);
620
- case "ConflictException":
621
- case "com.amazonaws.docdbelastic#ConflictException":
622
- throw await de_ConflictExceptionRes(parsedOutput, context);
623
- case "InternalServerException":
624
- case "com.amazonaws.docdbelastic#InternalServerException":
625
- throw await de_InternalServerExceptionRes(parsedOutput, context);
626
- case "ResourceNotFoundException":
627
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
628
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
629
- case "ServiceQuotaExceededException":
630
- case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
631
- throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
632
- case "ThrottlingException":
633
- case "com.amazonaws.docdbelastic#ThrottlingException":
634
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
635
- case "ValidationException":
636
- case "com.amazonaws.docdbelastic#ValidationException":
637
- throw await de_ValidationExceptionRes(parsedOutput, context);
638
- default:
639
- const parsedBody = parsedOutput.body;
640
- return throwDefaultError({
641
- output,
642
- parsedBody,
643
- errorCode,
644
- });
645
- }
646
- };
647
325
  export const de_TagResourceCommand = async (output, context) => {
648
326
  if (output.statusCode !== 200 && output.statusCode >= 300) {
649
- return de_TagResourceCommandError(output, context);
327
+ return de_CommandError(output, context);
650
328
  }
651
329
  const contents = map({
652
330
  $metadata: deserializeMetadata(output),
@@ -654,37 +332,9 @@ export const de_TagResourceCommand = async (output, context) => {
654
332
  await collectBody(output.body, context);
655
333
  return contents;
656
334
  };
657
- const de_TagResourceCommandError = async (output, context) => {
658
- const parsedOutput = {
659
- ...output,
660
- body: await parseErrorBody(output.body, context),
661
- };
662
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
663
- switch (errorCode) {
664
- case "InternalServerException":
665
- case "com.amazonaws.docdbelastic#InternalServerException":
666
- throw await de_InternalServerExceptionRes(parsedOutput, context);
667
- case "ResourceNotFoundException":
668
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
669
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
670
- case "ThrottlingException":
671
- case "com.amazonaws.docdbelastic#ThrottlingException":
672
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
673
- case "ValidationException":
674
- case "com.amazonaws.docdbelastic#ValidationException":
675
- throw await de_ValidationExceptionRes(parsedOutput, context);
676
- default:
677
- const parsedBody = parsedOutput.body;
678
- return throwDefaultError({
679
- output,
680
- parsedBody,
681
- errorCode,
682
- });
683
- }
684
- };
685
335
  export const de_UntagResourceCommand = async (output, context) => {
686
336
  if (output.statusCode !== 200 && output.statusCode >= 300) {
687
- return de_UntagResourceCommandError(output, context);
337
+ return de_CommandError(output, context);
688
338
  }
689
339
  const contents = map({
690
340
  $metadata: deserializeMetadata(output),
@@ -692,37 +342,9 @@ export const de_UntagResourceCommand = async (output, context) => {
692
342
  await collectBody(output.body, context);
693
343
  return contents;
694
344
  };
695
- const de_UntagResourceCommandError = async (output, context) => {
696
- const parsedOutput = {
697
- ...output,
698
- body: await parseErrorBody(output.body, context),
699
- };
700
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
701
- switch (errorCode) {
702
- case "InternalServerException":
703
- case "com.amazonaws.docdbelastic#InternalServerException":
704
- throw await de_InternalServerExceptionRes(parsedOutput, context);
705
- case "ResourceNotFoundException":
706
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
707
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
708
- case "ThrottlingException":
709
- case "com.amazonaws.docdbelastic#ThrottlingException":
710
- throw await de_ThrottlingExceptionRes(parsedOutput, context);
711
- case "ValidationException":
712
- case "com.amazonaws.docdbelastic#ValidationException":
713
- throw await de_ValidationExceptionRes(parsedOutput, context);
714
- default:
715
- const parsedBody = parsedOutput.body;
716
- return throwDefaultError({
717
- output,
718
- parsedBody,
719
- errorCode,
720
- });
721
- }
722
- };
723
345
  export const de_UpdateClusterCommand = async (output, context) => {
724
346
  if (output.statusCode !== 200 && output.statusCode >= 300) {
725
- return de_UpdateClusterCommandError(output, context);
347
+ return de_CommandError(output, context);
726
348
  }
727
349
  const contents = map({
728
350
  $metadata: deserializeMetadata(output),
@@ -734,7 +356,7 @@ export const de_UpdateClusterCommand = async (output, context) => {
734
356
  Object.assign(contents, doc);
735
357
  return contents;
736
358
  };
737
- const de_UpdateClusterCommandError = async (output, context) => {
359
+ const de_CommandError = async (output, context) => {
738
360
  const parsedOutput = {
739
361
  ...output,
740
362
  body: await parseErrorBody(output.body, context),
@@ -750,15 +372,18 @@ const de_UpdateClusterCommandError = async (output, context) => {
750
372
  case "InternalServerException":
751
373
  case "com.amazonaws.docdbelastic#InternalServerException":
752
374
  throw await de_InternalServerExceptionRes(parsedOutput, context);
753
- case "ResourceNotFoundException":
754
- case "com.amazonaws.docdbelastic#ResourceNotFoundException":
755
- throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
375
+ case "ServiceQuotaExceededException":
376
+ case "com.amazonaws.docdbelastic#ServiceQuotaExceededException":
377
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
756
378
  case "ThrottlingException":
757
379
  case "com.amazonaws.docdbelastic#ThrottlingException":
758
380
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
759
381
  case "ValidationException":
760
382
  case "com.amazonaws.docdbelastic#ValidationException":
761
383
  throw await de_ValidationExceptionRes(parsedOutput, context);
384
+ case "ResourceNotFoundException":
385
+ case "com.amazonaws.docdbelastic#ResourceNotFoundException":
386
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
762
387
  default:
763
388
  const parsedBody = parsedOutput.body;
764
389
  return throwDefaultError({
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-docdb-elastic",
3
3
  "description": "AWS SDK for JavaScript Docdb Elastic Client for Node.js, Browser and React Native",
4
- "version": "3.503.1",
4
+ "version": "3.507.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-docdb-elastic",
@@ -20,9 +20,9 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.502.0",
23
+ "@aws-sdk/client-sts": "3.507.0",
24
24
  "@aws-sdk/core": "3.496.0",
25
- "@aws-sdk/credential-provider-node": "3.503.1",
25
+ "@aws-sdk/credential-provider-node": "3.507.0",
26
26
  "@aws-sdk/middleware-host-header": "3.502.0",
27
27
  "@aws-sdk/middleware-logger": "3.502.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.502.0",