@aws-sdk/client-amp 3.52.0 → 3.53.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/CHANGELOG.md +11 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/AmpServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +109 -1
- package/dist-cjs/protocols/Aws_restJson1.js +216 -826
- package/dist-es/index.js +1 -0
- package/dist-es/models/AmpServiceException.js +12 -0
- package/dist-es/models/models_0.js +102 -1
- package/dist-es/protocols/Aws_restJson1.js +437 -902
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/AmpServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +49 -48
- package/dist-types/ts3.4/index.d.ts +1 -0
- package/dist-types/ts3.4/models/AmpServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/models_0.d.ts +36 -35
- package/package.json +26 -26
|
@@ -4,6 +4,8 @@ exports.deserializeAws_restJson1UpdateWorkspaceAliasCommand = exports.deserializ
|
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
6
|
const uuid_1 = require("uuid");
|
|
7
|
+
const AmpServiceException_1 = require("../models/AmpServiceException");
|
|
8
|
+
const models_0_1 = require("../models/models_0");
|
|
7
9
|
const serializeAws_restJson1CreateAlertManagerDefinitionCommand = async (input, context) => {
|
|
8
10
|
var _a;
|
|
9
11
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
@@ -569,75 +571,34 @@ const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async (
|
|
|
569
571
|
switch (errorCode) {
|
|
570
572
|
case "AccessDeniedException":
|
|
571
573
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
572
|
-
|
|
573
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
574
|
-
name: errorCode,
|
|
575
|
-
$metadata: deserializeMetadata(output),
|
|
576
|
-
};
|
|
577
|
-
break;
|
|
574
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
578
575
|
case "ConflictException":
|
|
579
576
|
case "com.amazonaws.amp#ConflictException":
|
|
580
|
-
|
|
581
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
582
|
-
name: errorCode,
|
|
583
|
-
$metadata: deserializeMetadata(output),
|
|
584
|
-
};
|
|
585
|
-
break;
|
|
577
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
586
578
|
case "InternalServerException":
|
|
587
579
|
case "com.amazonaws.amp#InternalServerException":
|
|
588
|
-
|
|
589
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
590
|
-
name: errorCode,
|
|
591
|
-
$metadata: deserializeMetadata(output),
|
|
592
|
-
};
|
|
593
|
-
break;
|
|
580
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
594
581
|
case "ResourceNotFoundException":
|
|
595
582
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
596
|
-
|
|
597
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
598
|
-
name: errorCode,
|
|
599
|
-
$metadata: deserializeMetadata(output),
|
|
600
|
-
};
|
|
601
|
-
break;
|
|
583
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
602
584
|
case "ServiceQuotaExceededException":
|
|
603
585
|
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
604
|
-
|
|
605
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
606
|
-
name: errorCode,
|
|
607
|
-
$metadata: deserializeMetadata(output),
|
|
608
|
-
};
|
|
609
|
-
break;
|
|
586
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
610
587
|
case "ThrottlingException":
|
|
611
588
|
case "com.amazonaws.amp#ThrottlingException":
|
|
612
|
-
|
|
613
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
614
|
-
name: errorCode,
|
|
615
|
-
$metadata: deserializeMetadata(output),
|
|
616
|
-
};
|
|
617
|
-
break;
|
|
589
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
618
590
|
case "ValidationException":
|
|
619
591
|
case "com.amazonaws.amp#ValidationException":
|
|
620
|
-
|
|
621
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
622
|
-
name: errorCode,
|
|
623
|
-
$metadata: deserializeMetadata(output),
|
|
624
|
-
};
|
|
625
|
-
break;
|
|
592
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
626
593
|
default:
|
|
627
594
|
const parsedBody = parsedOutput.body;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
...parsedBody,
|
|
631
|
-
name: `${errorCode}`,
|
|
632
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
595
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
596
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
633
597
|
$fault: "client",
|
|
634
598
|
$metadata: deserializeMetadata(output),
|
|
635
|
-
};
|
|
599
|
+
});
|
|
600
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
636
601
|
}
|
|
637
|
-
const message = response.message || response.Message || errorCode;
|
|
638
|
-
response.message = message;
|
|
639
|
-
delete response.Message;
|
|
640
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
641
602
|
};
|
|
642
603
|
const deserializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (output, context) => {
|
|
643
604
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -677,75 +638,34 @@ const deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = async (out
|
|
|
677
638
|
switch (errorCode) {
|
|
678
639
|
case "AccessDeniedException":
|
|
679
640
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
680
|
-
|
|
681
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
682
|
-
name: errorCode,
|
|
683
|
-
$metadata: deserializeMetadata(output),
|
|
684
|
-
};
|
|
685
|
-
break;
|
|
641
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
686
642
|
case "ConflictException":
|
|
687
643
|
case "com.amazonaws.amp#ConflictException":
|
|
688
|
-
|
|
689
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
690
|
-
name: errorCode,
|
|
691
|
-
$metadata: deserializeMetadata(output),
|
|
692
|
-
};
|
|
693
|
-
break;
|
|
644
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
694
645
|
case "InternalServerException":
|
|
695
646
|
case "com.amazonaws.amp#InternalServerException":
|
|
696
|
-
|
|
697
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
698
|
-
name: errorCode,
|
|
699
|
-
$metadata: deserializeMetadata(output),
|
|
700
|
-
};
|
|
701
|
-
break;
|
|
647
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
702
648
|
case "ResourceNotFoundException":
|
|
703
649
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
704
|
-
|
|
705
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
706
|
-
name: errorCode,
|
|
707
|
-
$metadata: deserializeMetadata(output),
|
|
708
|
-
};
|
|
709
|
-
break;
|
|
650
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
710
651
|
case "ServiceQuotaExceededException":
|
|
711
652
|
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
712
|
-
|
|
713
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
714
|
-
name: errorCode,
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
};
|
|
717
|
-
break;
|
|
653
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
718
654
|
case "ThrottlingException":
|
|
719
655
|
case "com.amazonaws.amp#ThrottlingException":
|
|
720
|
-
|
|
721
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
722
|
-
name: errorCode,
|
|
723
|
-
$metadata: deserializeMetadata(output),
|
|
724
|
-
};
|
|
725
|
-
break;
|
|
656
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
726
657
|
case "ValidationException":
|
|
727
658
|
case "com.amazonaws.amp#ValidationException":
|
|
728
|
-
|
|
729
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
730
|
-
name: errorCode,
|
|
731
|
-
$metadata: deserializeMetadata(output),
|
|
732
|
-
};
|
|
733
|
-
break;
|
|
659
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
734
660
|
default:
|
|
735
661
|
const parsedBody = parsedOutput.body;
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
...parsedBody,
|
|
739
|
-
name: `${errorCode}`,
|
|
740
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
662
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
663
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
741
664
|
$fault: "client",
|
|
742
665
|
$metadata: deserializeMetadata(output),
|
|
743
|
-
};
|
|
666
|
+
});
|
|
667
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
744
668
|
}
|
|
745
|
-
const message = response.message || response.Message || errorCode;
|
|
746
|
-
response.message = message;
|
|
747
|
-
delete response.Message;
|
|
748
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
749
669
|
};
|
|
750
670
|
const deserializeAws_restJson1CreateWorkspaceCommand = async (output, context) => {
|
|
751
671
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -785,67 +705,31 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
|
|
|
785
705
|
switch (errorCode) {
|
|
786
706
|
case "AccessDeniedException":
|
|
787
707
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
788
|
-
|
|
789
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
790
|
-
name: errorCode,
|
|
791
|
-
$metadata: deserializeMetadata(output),
|
|
792
|
-
};
|
|
793
|
-
break;
|
|
708
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
794
709
|
case "ConflictException":
|
|
795
710
|
case "com.amazonaws.amp#ConflictException":
|
|
796
|
-
|
|
797
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
798
|
-
name: errorCode,
|
|
799
|
-
$metadata: deserializeMetadata(output),
|
|
800
|
-
};
|
|
801
|
-
break;
|
|
711
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
802
712
|
case "InternalServerException":
|
|
803
713
|
case "com.amazonaws.amp#InternalServerException":
|
|
804
|
-
|
|
805
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
806
|
-
name: errorCode,
|
|
807
|
-
$metadata: deserializeMetadata(output),
|
|
808
|
-
};
|
|
809
|
-
break;
|
|
714
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
810
715
|
case "ServiceQuotaExceededException":
|
|
811
716
|
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
812
|
-
|
|
813
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
814
|
-
name: errorCode,
|
|
815
|
-
$metadata: deserializeMetadata(output),
|
|
816
|
-
};
|
|
817
|
-
break;
|
|
717
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
818
718
|
case "ThrottlingException":
|
|
819
719
|
case "com.amazonaws.amp#ThrottlingException":
|
|
820
|
-
|
|
821
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
822
|
-
name: errorCode,
|
|
823
|
-
$metadata: deserializeMetadata(output),
|
|
824
|
-
};
|
|
825
|
-
break;
|
|
720
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
826
721
|
case "ValidationException":
|
|
827
722
|
case "com.amazonaws.amp#ValidationException":
|
|
828
|
-
|
|
829
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
830
|
-
name: errorCode,
|
|
831
|
-
$metadata: deserializeMetadata(output),
|
|
832
|
-
};
|
|
833
|
-
break;
|
|
723
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
834
724
|
default:
|
|
835
725
|
const parsedBody = parsedOutput.body;
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
...parsedBody,
|
|
839
|
-
name: `${errorCode}`,
|
|
840
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
726
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
727
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
841
728
|
$fault: "client",
|
|
842
729
|
$metadata: deserializeMetadata(output),
|
|
843
|
-
};
|
|
730
|
+
});
|
|
731
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
844
732
|
}
|
|
845
|
-
const message = response.message || response.Message || errorCode;
|
|
846
|
-
response.message = message;
|
|
847
|
-
delete response.Message;
|
|
848
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
849
733
|
};
|
|
850
734
|
const deserializeAws_restJson1DeleteAlertManagerDefinitionCommand = async (output, context) => {
|
|
851
735
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -869,67 +753,31 @@ const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async (
|
|
|
869
753
|
switch (errorCode) {
|
|
870
754
|
case "AccessDeniedException":
|
|
871
755
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
872
|
-
|
|
873
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
874
|
-
name: errorCode,
|
|
875
|
-
$metadata: deserializeMetadata(output),
|
|
876
|
-
};
|
|
877
|
-
break;
|
|
756
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
878
757
|
case "ConflictException":
|
|
879
758
|
case "com.amazonaws.amp#ConflictException":
|
|
880
|
-
|
|
881
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
882
|
-
name: errorCode,
|
|
883
|
-
$metadata: deserializeMetadata(output),
|
|
884
|
-
};
|
|
885
|
-
break;
|
|
759
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
886
760
|
case "InternalServerException":
|
|
887
761
|
case "com.amazonaws.amp#InternalServerException":
|
|
888
|
-
|
|
889
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
890
|
-
name: errorCode,
|
|
891
|
-
$metadata: deserializeMetadata(output),
|
|
892
|
-
};
|
|
893
|
-
break;
|
|
762
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
894
763
|
case "ResourceNotFoundException":
|
|
895
764
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
896
|
-
|
|
897
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
898
|
-
name: errorCode,
|
|
899
|
-
$metadata: deserializeMetadata(output),
|
|
900
|
-
};
|
|
901
|
-
break;
|
|
765
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
902
766
|
case "ThrottlingException":
|
|
903
767
|
case "com.amazonaws.amp#ThrottlingException":
|
|
904
|
-
|
|
905
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
906
|
-
name: errorCode,
|
|
907
|
-
$metadata: deserializeMetadata(output),
|
|
908
|
-
};
|
|
909
|
-
break;
|
|
768
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
910
769
|
case "ValidationException":
|
|
911
770
|
case "com.amazonaws.amp#ValidationException":
|
|
912
|
-
|
|
913
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
914
|
-
name: errorCode,
|
|
915
|
-
$metadata: deserializeMetadata(output),
|
|
916
|
-
};
|
|
917
|
-
break;
|
|
771
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
918
772
|
default:
|
|
919
773
|
const parsedBody = parsedOutput.body;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
...parsedBody,
|
|
923
|
-
name: `${errorCode}`,
|
|
924
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
774
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
775
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
925
776
|
$fault: "client",
|
|
926
777
|
$metadata: deserializeMetadata(output),
|
|
927
|
-
};
|
|
778
|
+
});
|
|
779
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
928
780
|
}
|
|
929
|
-
const message = response.message || response.Message || errorCode;
|
|
930
|
-
response.message = message;
|
|
931
|
-
delete response.Message;
|
|
932
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
933
781
|
};
|
|
934
782
|
const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommand = async (output, context) => {
|
|
935
783
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -953,67 +801,31 @@ const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = async (out
|
|
|
953
801
|
switch (errorCode) {
|
|
954
802
|
case "AccessDeniedException":
|
|
955
803
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
956
|
-
|
|
957
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
958
|
-
name: errorCode,
|
|
959
|
-
$metadata: deserializeMetadata(output),
|
|
960
|
-
};
|
|
961
|
-
break;
|
|
804
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
962
805
|
case "ConflictException":
|
|
963
806
|
case "com.amazonaws.amp#ConflictException":
|
|
964
|
-
|
|
965
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
966
|
-
name: errorCode,
|
|
967
|
-
$metadata: deserializeMetadata(output),
|
|
968
|
-
};
|
|
969
|
-
break;
|
|
807
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
970
808
|
case "InternalServerException":
|
|
971
809
|
case "com.amazonaws.amp#InternalServerException":
|
|
972
|
-
|
|
973
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
974
|
-
name: errorCode,
|
|
975
|
-
$metadata: deserializeMetadata(output),
|
|
976
|
-
};
|
|
977
|
-
break;
|
|
810
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
978
811
|
case "ResourceNotFoundException":
|
|
979
812
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
980
|
-
|
|
981
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
982
|
-
name: errorCode,
|
|
983
|
-
$metadata: deserializeMetadata(output),
|
|
984
|
-
};
|
|
985
|
-
break;
|
|
813
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
986
814
|
case "ThrottlingException":
|
|
987
815
|
case "com.amazonaws.amp#ThrottlingException":
|
|
988
|
-
|
|
989
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
990
|
-
name: errorCode,
|
|
991
|
-
$metadata: deserializeMetadata(output),
|
|
992
|
-
};
|
|
993
|
-
break;
|
|
816
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
994
817
|
case "ValidationException":
|
|
995
818
|
case "com.amazonaws.amp#ValidationException":
|
|
996
|
-
|
|
997
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
998
|
-
name: errorCode,
|
|
999
|
-
$metadata: deserializeMetadata(output),
|
|
1000
|
-
};
|
|
1001
|
-
break;
|
|
819
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1002
820
|
default:
|
|
1003
821
|
const parsedBody = parsedOutput.body;
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
...parsedBody,
|
|
1007
|
-
name: `${errorCode}`,
|
|
1008
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
822
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
823
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1009
824
|
$fault: "client",
|
|
1010
825
|
$metadata: deserializeMetadata(output),
|
|
1011
|
-
};
|
|
826
|
+
});
|
|
827
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1012
828
|
}
|
|
1013
|
-
const message = response.message || response.Message || errorCode;
|
|
1014
|
-
response.message = message;
|
|
1015
|
-
delete response.Message;
|
|
1016
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1017
829
|
};
|
|
1018
830
|
const deserializeAws_restJson1DeleteWorkspaceCommand = async (output, context) => {
|
|
1019
831
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -1037,67 +849,31 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
|
|
|
1037
849
|
switch (errorCode) {
|
|
1038
850
|
case "AccessDeniedException":
|
|
1039
851
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1040
|
-
|
|
1041
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1042
|
-
name: errorCode,
|
|
1043
|
-
$metadata: deserializeMetadata(output),
|
|
1044
|
-
};
|
|
1045
|
-
break;
|
|
852
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1046
853
|
case "ConflictException":
|
|
1047
854
|
case "com.amazonaws.amp#ConflictException":
|
|
1048
|
-
|
|
1049
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1050
|
-
name: errorCode,
|
|
1051
|
-
$metadata: deserializeMetadata(output),
|
|
1052
|
-
};
|
|
1053
|
-
break;
|
|
855
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1054
856
|
case "InternalServerException":
|
|
1055
857
|
case "com.amazonaws.amp#InternalServerException":
|
|
1056
|
-
|
|
1057
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1058
|
-
name: errorCode,
|
|
1059
|
-
$metadata: deserializeMetadata(output),
|
|
1060
|
-
};
|
|
1061
|
-
break;
|
|
858
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1062
859
|
case "ResourceNotFoundException":
|
|
1063
860
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1064
|
-
|
|
1065
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1066
|
-
name: errorCode,
|
|
1067
|
-
$metadata: deserializeMetadata(output),
|
|
1068
|
-
};
|
|
1069
|
-
break;
|
|
861
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1070
862
|
case "ThrottlingException":
|
|
1071
863
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1072
|
-
|
|
1073
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1074
|
-
name: errorCode,
|
|
1075
|
-
$metadata: deserializeMetadata(output),
|
|
1076
|
-
};
|
|
1077
|
-
break;
|
|
864
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1078
865
|
case "ValidationException":
|
|
1079
866
|
case "com.amazonaws.amp#ValidationException":
|
|
1080
|
-
|
|
1081
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1082
|
-
name: errorCode,
|
|
1083
|
-
$metadata: deserializeMetadata(output),
|
|
1084
|
-
};
|
|
1085
|
-
break;
|
|
867
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1086
868
|
default:
|
|
1087
869
|
const parsedBody = parsedOutput.body;
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
...parsedBody,
|
|
1091
|
-
name: `${errorCode}`,
|
|
1092
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
870
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
871
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1093
872
|
$fault: "client",
|
|
1094
873
|
$metadata: deserializeMetadata(output),
|
|
1095
|
-
};
|
|
874
|
+
});
|
|
875
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1096
876
|
}
|
|
1097
|
-
const message = response.message || response.Message || errorCode;
|
|
1098
|
-
response.message = message;
|
|
1099
|
-
delete response.Message;
|
|
1100
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1101
877
|
};
|
|
1102
878
|
const deserializeAws_restJson1DescribeAlertManagerDefinitionCommand = async (output, context) => {
|
|
1103
879
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1125,59 +901,28 @@ const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async
|
|
|
1125
901
|
switch (errorCode) {
|
|
1126
902
|
case "AccessDeniedException":
|
|
1127
903
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1128
|
-
|
|
1129
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1130
|
-
name: errorCode,
|
|
1131
|
-
$metadata: deserializeMetadata(output),
|
|
1132
|
-
};
|
|
1133
|
-
break;
|
|
904
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1134
905
|
case "InternalServerException":
|
|
1135
906
|
case "com.amazonaws.amp#InternalServerException":
|
|
1136
|
-
|
|
1137
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1138
|
-
name: errorCode,
|
|
1139
|
-
$metadata: deserializeMetadata(output),
|
|
1140
|
-
};
|
|
1141
|
-
break;
|
|
907
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1142
908
|
case "ResourceNotFoundException":
|
|
1143
909
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1144
|
-
|
|
1145
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1146
|
-
name: errorCode,
|
|
1147
|
-
$metadata: deserializeMetadata(output),
|
|
1148
|
-
};
|
|
1149
|
-
break;
|
|
910
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1150
911
|
case "ThrottlingException":
|
|
1151
912
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1152
|
-
|
|
1153
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1154
|
-
name: errorCode,
|
|
1155
|
-
$metadata: deserializeMetadata(output),
|
|
1156
|
-
};
|
|
1157
|
-
break;
|
|
913
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1158
914
|
case "ValidationException":
|
|
1159
915
|
case "com.amazonaws.amp#ValidationException":
|
|
1160
|
-
|
|
1161
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1162
|
-
name: errorCode,
|
|
1163
|
-
$metadata: deserializeMetadata(output),
|
|
1164
|
-
};
|
|
1165
|
-
break;
|
|
916
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1166
917
|
default:
|
|
1167
918
|
const parsedBody = parsedOutput.body;
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
...parsedBody,
|
|
1171
|
-
name: `${errorCode}`,
|
|
1172
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
919
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
920
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1173
921
|
$fault: "client",
|
|
1174
922
|
$metadata: deserializeMetadata(output),
|
|
1175
|
-
};
|
|
923
|
+
});
|
|
924
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1176
925
|
}
|
|
1177
|
-
const message = response.message || response.Message || errorCode;
|
|
1178
|
-
response.message = message;
|
|
1179
|
-
delete response.Message;
|
|
1180
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1181
926
|
};
|
|
1182
927
|
const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommand = async (output, context) => {
|
|
1183
928
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1205,59 +950,28 @@ const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = async (o
|
|
|
1205
950
|
switch (errorCode) {
|
|
1206
951
|
case "AccessDeniedException":
|
|
1207
952
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1208
|
-
|
|
1209
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1210
|
-
name: errorCode,
|
|
1211
|
-
$metadata: deserializeMetadata(output),
|
|
1212
|
-
};
|
|
1213
|
-
break;
|
|
953
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1214
954
|
case "InternalServerException":
|
|
1215
955
|
case "com.amazonaws.amp#InternalServerException":
|
|
1216
|
-
|
|
1217
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1218
|
-
name: errorCode,
|
|
1219
|
-
$metadata: deserializeMetadata(output),
|
|
1220
|
-
};
|
|
1221
|
-
break;
|
|
956
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1222
957
|
case "ResourceNotFoundException":
|
|
1223
958
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1224
|
-
|
|
1225
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1226
|
-
name: errorCode,
|
|
1227
|
-
$metadata: deserializeMetadata(output),
|
|
1228
|
-
};
|
|
1229
|
-
break;
|
|
959
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1230
960
|
case "ThrottlingException":
|
|
1231
961
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1232
|
-
|
|
1233
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1234
|
-
name: errorCode,
|
|
1235
|
-
$metadata: deserializeMetadata(output),
|
|
1236
|
-
};
|
|
1237
|
-
break;
|
|
962
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1238
963
|
case "ValidationException":
|
|
1239
964
|
case "com.amazonaws.amp#ValidationException":
|
|
1240
|
-
|
|
1241
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1242
|
-
name: errorCode,
|
|
1243
|
-
$metadata: deserializeMetadata(output),
|
|
1244
|
-
};
|
|
1245
|
-
break;
|
|
965
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1246
966
|
default:
|
|
1247
967
|
const parsedBody = parsedOutput.body;
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
...parsedBody,
|
|
1251
|
-
name: `${errorCode}`,
|
|
1252
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
968
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
969
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1253
970
|
$fault: "client",
|
|
1254
971
|
$metadata: deserializeMetadata(output),
|
|
1255
|
-
};
|
|
972
|
+
});
|
|
973
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1256
974
|
}
|
|
1257
|
-
const message = response.message || response.Message || errorCode;
|
|
1258
|
-
response.message = message;
|
|
1259
|
-
delete response.Message;
|
|
1260
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1261
975
|
};
|
|
1262
976
|
const deserializeAws_restJson1DescribeWorkspaceCommand = async (output, context) => {
|
|
1263
977
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1285,59 +999,28 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, con
|
|
|
1285
999
|
switch (errorCode) {
|
|
1286
1000
|
case "AccessDeniedException":
|
|
1287
1001
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1288
|
-
|
|
1289
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1290
|
-
name: errorCode,
|
|
1291
|
-
$metadata: deserializeMetadata(output),
|
|
1292
|
-
};
|
|
1293
|
-
break;
|
|
1002
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1294
1003
|
case "InternalServerException":
|
|
1295
1004
|
case "com.amazonaws.amp#InternalServerException":
|
|
1296
|
-
|
|
1297
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1298
|
-
name: errorCode,
|
|
1299
|
-
$metadata: deserializeMetadata(output),
|
|
1300
|
-
};
|
|
1301
|
-
break;
|
|
1005
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1302
1006
|
case "ResourceNotFoundException":
|
|
1303
1007
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1304
|
-
|
|
1305
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1306
|
-
name: errorCode,
|
|
1307
|
-
$metadata: deserializeMetadata(output),
|
|
1308
|
-
};
|
|
1309
|
-
break;
|
|
1008
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1310
1009
|
case "ThrottlingException":
|
|
1311
1010
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1312
|
-
|
|
1313
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1314
|
-
name: errorCode,
|
|
1315
|
-
$metadata: deserializeMetadata(output),
|
|
1316
|
-
};
|
|
1317
|
-
break;
|
|
1011
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1318
1012
|
case "ValidationException":
|
|
1319
1013
|
case "com.amazonaws.amp#ValidationException":
|
|
1320
|
-
|
|
1321
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1322
|
-
name: errorCode,
|
|
1323
|
-
$metadata: deserializeMetadata(output),
|
|
1324
|
-
};
|
|
1325
|
-
break;
|
|
1014
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1326
1015
|
default:
|
|
1327
1016
|
const parsedBody = parsedOutput.body;
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
...parsedBody,
|
|
1331
|
-
name: `${errorCode}`,
|
|
1332
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1017
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1018
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1333
1019
|
$fault: "client",
|
|
1334
1020
|
$metadata: deserializeMetadata(output),
|
|
1335
|
-
};
|
|
1021
|
+
});
|
|
1022
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1336
1023
|
}
|
|
1337
|
-
const message = response.message || response.Message || errorCode;
|
|
1338
|
-
response.message = message;
|
|
1339
|
-
delete response.Message;
|
|
1340
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1341
1024
|
};
|
|
1342
1025
|
const deserializeAws_restJson1ListRuleGroupsNamespacesCommand = async (output, context) => {
|
|
1343
1026
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1369,59 +1052,28 @@ const deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = async (outp
|
|
|
1369
1052
|
switch (errorCode) {
|
|
1370
1053
|
case "AccessDeniedException":
|
|
1371
1054
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1372
|
-
|
|
1373
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1374
|
-
name: errorCode,
|
|
1375
|
-
$metadata: deserializeMetadata(output),
|
|
1376
|
-
};
|
|
1377
|
-
break;
|
|
1055
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1378
1056
|
case "InternalServerException":
|
|
1379
1057
|
case "com.amazonaws.amp#InternalServerException":
|
|
1380
|
-
|
|
1381
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1382
|
-
name: errorCode,
|
|
1383
|
-
$metadata: deserializeMetadata(output),
|
|
1384
|
-
};
|
|
1385
|
-
break;
|
|
1058
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1386
1059
|
case "ResourceNotFoundException":
|
|
1387
1060
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1388
|
-
|
|
1389
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1390
|
-
name: errorCode,
|
|
1391
|
-
$metadata: deserializeMetadata(output),
|
|
1392
|
-
};
|
|
1393
|
-
break;
|
|
1061
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1394
1062
|
case "ThrottlingException":
|
|
1395
1063
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1396
|
-
|
|
1397
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1398
|
-
name: errorCode,
|
|
1399
|
-
$metadata: deserializeMetadata(output),
|
|
1400
|
-
};
|
|
1401
|
-
break;
|
|
1064
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1402
1065
|
case "ValidationException":
|
|
1403
1066
|
case "com.amazonaws.amp#ValidationException":
|
|
1404
|
-
|
|
1405
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1406
|
-
name: errorCode,
|
|
1407
|
-
$metadata: deserializeMetadata(output),
|
|
1408
|
-
};
|
|
1409
|
-
break;
|
|
1067
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1410
1068
|
default:
|
|
1411
1069
|
const parsedBody = parsedOutput.body;
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
...parsedBody,
|
|
1415
|
-
name: `${errorCode}`,
|
|
1416
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1070
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1071
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1417
1072
|
$fault: "client",
|
|
1418
1073
|
$metadata: deserializeMetadata(output),
|
|
1419
|
-
};
|
|
1074
|
+
});
|
|
1075
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1420
1076
|
}
|
|
1421
|
-
const message = response.message || response.Message || errorCode;
|
|
1422
|
-
response.message = message;
|
|
1423
|
-
delete response.Message;
|
|
1424
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1425
1077
|
};
|
|
1426
1078
|
const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
1427
1079
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1449,59 +1101,28 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1449
1101
|
switch (errorCode) {
|
|
1450
1102
|
case "AccessDeniedException":
|
|
1451
1103
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1452
|
-
|
|
1453
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1454
|
-
name: errorCode,
|
|
1455
|
-
$metadata: deserializeMetadata(output),
|
|
1456
|
-
};
|
|
1457
|
-
break;
|
|
1104
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1458
1105
|
case "InternalServerException":
|
|
1459
1106
|
case "com.amazonaws.amp#InternalServerException":
|
|
1460
|
-
|
|
1461
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1462
|
-
name: errorCode,
|
|
1463
|
-
$metadata: deserializeMetadata(output),
|
|
1464
|
-
};
|
|
1465
|
-
break;
|
|
1107
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1466
1108
|
case "ResourceNotFoundException":
|
|
1467
1109
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1468
|
-
|
|
1469
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1470
|
-
name: errorCode,
|
|
1471
|
-
$metadata: deserializeMetadata(output),
|
|
1472
|
-
};
|
|
1473
|
-
break;
|
|
1110
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1474
1111
|
case "ThrottlingException":
|
|
1475
1112
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1476
|
-
|
|
1477
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1478
|
-
name: errorCode,
|
|
1479
|
-
$metadata: deserializeMetadata(output),
|
|
1480
|
-
};
|
|
1481
|
-
break;
|
|
1113
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1482
1114
|
case "ValidationException":
|
|
1483
1115
|
case "com.amazonaws.amp#ValidationException":
|
|
1484
|
-
|
|
1485
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1486
|
-
name: errorCode,
|
|
1487
|
-
$metadata: deserializeMetadata(output),
|
|
1488
|
-
};
|
|
1489
|
-
break;
|
|
1116
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1490
1117
|
default:
|
|
1491
1118
|
const parsedBody = parsedOutput.body;
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
...parsedBody,
|
|
1495
|
-
name: `${errorCode}`,
|
|
1496
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1119
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1120
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1497
1121
|
$fault: "client",
|
|
1498
1122
|
$metadata: deserializeMetadata(output),
|
|
1499
|
-
};
|
|
1123
|
+
});
|
|
1124
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1500
1125
|
}
|
|
1501
|
-
const message = response.message || response.Message || errorCode;
|
|
1502
|
-
response.message = message;
|
|
1503
|
-
delete response.Message;
|
|
1504
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1505
1126
|
};
|
|
1506
1127
|
const deserializeAws_restJson1ListWorkspacesCommand = async (output, context) => {
|
|
1507
1128
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1533,51 +1154,25 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
|
|
|
1533
1154
|
switch (errorCode) {
|
|
1534
1155
|
case "AccessDeniedException":
|
|
1535
1156
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1536
|
-
|
|
1537
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1538
|
-
name: errorCode,
|
|
1539
|
-
$metadata: deserializeMetadata(output),
|
|
1540
|
-
};
|
|
1541
|
-
break;
|
|
1157
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1542
1158
|
case "InternalServerException":
|
|
1543
1159
|
case "com.amazonaws.amp#InternalServerException":
|
|
1544
|
-
|
|
1545
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1546
|
-
name: errorCode,
|
|
1547
|
-
$metadata: deserializeMetadata(output),
|
|
1548
|
-
};
|
|
1549
|
-
break;
|
|
1160
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1550
1161
|
case "ThrottlingException":
|
|
1551
1162
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1552
|
-
|
|
1553
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1554
|
-
name: errorCode,
|
|
1555
|
-
$metadata: deserializeMetadata(output),
|
|
1556
|
-
};
|
|
1557
|
-
break;
|
|
1163
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1558
1164
|
case "ValidationException":
|
|
1559
1165
|
case "com.amazonaws.amp#ValidationException":
|
|
1560
|
-
|
|
1561
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1562
|
-
name: errorCode,
|
|
1563
|
-
$metadata: deserializeMetadata(output),
|
|
1564
|
-
};
|
|
1565
|
-
break;
|
|
1166
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1566
1167
|
default:
|
|
1567
1168
|
const parsedBody = parsedOutput.body;
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
...parsedBody,
|
|
1571
|
-
name: `${errorCode}`,
|
|
1572
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1169
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1170
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1573
1171
|
$fault: "client",
|
|
1574
1172
|
$metadata: deserializeMetadata(output),
|
|
1575
|
-
};
|
|
1173
|
+
});
|
|
1174
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1576
1175
|
}
|
|
1577
|
-
const message = response.message || response.Message || errorCode;
|
|
1578
|
-
response.message = message;
|
|
1579
|
-
delete response.Message;
|
|
1580
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1581
1176
|
};
|
|
1582
1177
|
const deserializeAws_restJson1PutAlertManagerDefinitionCommand = async (output, context) => {
|
|
1583
1178
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -1605,75 +1200,34 @@ const deserializeAws_restJson1PutAlertManagerDefinitionCommandError = async (out
|
|
|
1605
1200
|
switch (errorCode) {
|
|
1606
1201
|
case "AccessDeniedException":
|
|
1607
1202
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1608
|
-
|
|
1609
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1610
|
-
name: errorCode,
|
|
1611
|
-
$metadata: deserializeMetadata(output),
|
|
1612
|
-
};
|
|
1613
|
-
break;
|
|
1203
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1614
1204
|
case "ConflictException":
|
|
1615
1205
|
case "com.amazonaws.amp#ConflictException":
|
|
1616
|
-
|
|
1617
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1618
|
-
name: errorCode,
|
|
1619
|
-
$metadata: deserializeMetadata(output),
|
|
1620
|
-
};
|
|
1621
|
-
break;
|
|
1206
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1622
1207
|
case "InternalServerException":
|
|
1623
1208
|
case "com.amazonaws.amp#InternalServerException":
|
|
1624
|
-
|
|
1625
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1626
|
-
name: errorCode,
|
|
1627
|
-
$metadata: deserializeMetadata(output),
|
|
1628
|
-
};
|
|
1629
|
-
break;
|
|
1209
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1630
1210
|
case "ResourceNotFoundException":
|
|
1631
1211
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1632
|
-
|
|
1633
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1634
|
-
name: errorCode,
|
|
1635
|
-
$metadata: deserializeMetadata(output),
|
|
1636
|
-
};
|
|
1637
|
-
break;
|
|
1212
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1638
1213
|
case "ServiceQuotaExceededException":
|
|
1639
1214
|
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1640
|
-
|
|
1641
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1642
|
-
name: errorCode,
|
|
1643
|
-
$metadata: deserializeMetadata(output),
|
|
1644
|
-
};
|
|
1645
|
-
break;
|
|
1215
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1646
1216
|
case "ThrottlingException":
|
|
1647
1217
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1648
|
-
|
|
1649
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1650
|
-
name: errorCode,
|
|
1651
|
-
$metadata: deserializeMetadata(output),
|
|
1652
|
-
};
|
|
1653
|
-
break;
|
|
1218
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1654
1219
|
case "ValidationException":
|
|
1655
1220
|
case "com.amazonaws.amp#ValidationException":
|
|
1656
|
-
|
|
1657
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1658
|
-
name: errorCode,
|
|
1659
|
-
$metadata: deserializeMetadata(output),
|
|
1660
|
-
};
|
|
1661
|
-
break;
|
|
1221
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1662
1222
|
default:
|
|
1663
1223
|
const parsedBody = parsedOutput.body;
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
...parsedBody,
|
|
1667
|
-
name: `${errorCode}`,
|
|
1668
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1224
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1225
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1669
1226
|
$fault: "client",
|
|
1670
1227
|
$metadata: deserializeMetadata(output),
|
|
1671
|
-
};
|
|
1228
|
+
});
|
|
1229
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1672
1230
|
}
|
|
1673
|
-
const message = response.message || response.Message || errorCode;
|
|
1674
|
-
response.message = message;
|
|
1675
|
-
delete response.Message;
|
|
1676
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1677
1231
|
};
|
|
1678
1232
|
const deserializeAws_restJson1PutRuleGroupsNamespaceCommand = async (output, context) => {
|
|
1679
1233
|
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
@@ -1713,75 +1267,34 @@ const deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = async (output
|
|
|
1713
1267
|
switch (errorCode) {
|
|
1714
1268
|
case "AccessDeniedException":
|
|
1715
1269
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1716
|
-
|
|
1717
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1718
|
-
name: errorCode,
|
|
1719
|
-
$metadata: deserializeMetadata(output),
|
|
1720
|
-
};
|
|
1721
|
-
break;
|
|
1270
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1722
1271
|
case "ConflictException":
|
|
1723
1272
|
case "com.amazonaws.amp#ConflictException":
|
|
1724
|
-
|
|
1725
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1726
|
-
name: errorCode,
|
|
1727
|
-
$metadata: deserializeMetadata(output),
|
|
1728
|
-
};
|
|
1729
|
-
break;
|
|
1273
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1730
1274
|
case "InternalServerException":
|
|
1731
1275
|
case "com.amazonaws.amp#InternalServerException":
|
|
1732
|
-
|
|
1733
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1734
|
-
name: errorCode,
|
|
1735
|
-
$metadata: deserializeMetadata(output),
|
|
1736
|
-
};
|
|
1737
|
-
break;
|
|
1276
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1738
1277
|
case "ResourceNotFoundException":
|
|
1739
1278
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1740
|
-
|
|
1741
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1742
|
-
name: errorCode,
|
|
1743
|
-
$metadata: deserializeMetadata(output),
|
|
1744
|
-
};
|
|
1745
|
-
break;
|
|
1279
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1746
1280
|
case "ServiceQuotaExceededException":
|
|
1747
1281
|
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1748
|
-
|
|
1749
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1750
|
-
name: errorCode,
|
|
1751
|
-
$metadata: deserializeMetadata(output),
|
|
1752
|
-
};
|
|
1753
|
-
break;
|
|
1282
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1754
1283
|
case "ThrottlingException":
|
|
1755
1284
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1756
|
-
|
|
1757
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1758
|
-
name: errorCode,
|
|
1759
|
-
$metadata: deserializeMetadata(output),
|
|
1760
|
-
};
|
|
1761
|
-
break;
|
|
1285
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1762
1286
|
case "ValidationException":
|
|
1763
1287
|
case "com.amazonaws.amp#ValidationException":
|
|
1764
|
-
|
|
1765
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1766
|
-
name: errorCode,
|
|
1767
|
-
$metadata: deserializeMetadata(output),
|
|
1768
|
-
};
|
|
1769
|
-
break;
|
|
1288
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1770
1289
|
default:
|
|
1771
1290
|
const parsedBody = parsedOutput.body;
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
...parsedBody,
|
|
1775
|
-
name: `${errorCode}`,
|
|
1776
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1291
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1292
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1777
1293
|
$fault: "client",
|
|
1778
1294
|
$metadata: deserializeMetadata(output),
|
|
1779
|
-
};
|
|
1295
|
+
});
|
|
1296
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1780
1297
|
}
|
|
1781
|
-
const message = response.message || response.Message || errorCode;
|
|
1782
|
-
response.message = message;
|
|
1783
|
-
delete response.Message;
|
|
1784
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1785
1298
|
};
|
|
1786
1299
|
const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
1787
1300
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1805,59 +1318,28 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1805
1318
|
switch (errorCode) {
|
|
1806
1319
|
case "AccessDeniedException":
|
|
1807
1320
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1808
|
-
|
|
1809
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1810
|
-
name: errorCode,
|
|
1811
|
-
$metadata: deserializeMetadata(output),
|
|
1812
|
-
};
|
|
1813
|
-
break;
|
|
1321
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1814
1322
|
case "InternalServerException":
|
|
1815
1323
|
case "com.amazonaws.amp#InternalServerException":
|
|
1816
|
-
|
|
1817
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1818
|
-
name: errorCode,
|
|
1819
|
-
$metadata: deserializeMetadata(output),
|
|
1820
|
-
};
|
|
1821
|
-
break;
|
|
1324
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1822
1325
|
case "ResourceNotFoundException":
|
|
1823
1326
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1824
|
-
|
|
1825
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1826
|
-
name: errorCode,
|
|
1827
|
-
$metadata: deserializeMetadata(output),
|
|
1828
|
-
};
|
|
1829
|
-
break;
|
|
1327
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1830
1328
|
case "ThrottlingException":
|
|
1831
1329
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1832
|
-
|
|
1833
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1834
|
-
name: errorCode,
|
|
1835
|
-
$metadata: deserializeMetadata(output),
|
|
1836
|
-
};
|
|
1837
|
-
break;
|
|
1330
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1838
1331
|
case "ValidationException":
|
|
1839
1332
|
case "com.amazonaws.amp#ValidationException":
|
|
1840
|
-
|
|
1841
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1842
|
-
name: errorCode,
|
|
1843
|
-
$metadata: deserializeMetadata(output),
|
|
1844
|
-
};
|
|
1845
|
-
break;
|
|
1333
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1846
1334
|
default:
|
|
1847
1335
|
const parsedBody = parsedOutput.body;
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
...parsedBody,
|
|
1851
|
-
name: `${errorCode}`,
|
|
1852
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1336
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1337
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1853
1338
|
$fault: "client",
|
|
1854
1339
|
$metadata: deserializeMetadata(output),
|
|
1855
|
-
};
|
|
1340
|
+
});
|
|
1341
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1856
1342
|
}
|
|
1857
|
-
const message = response.message || response.Message || errorCode;
|
|
1858
|
-
response.message = message;
|
|
1859
|
-
delete response.Message;
|
|
1860
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1861
1343
|
};
|
|
1862
1344
|
const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
1863
1345
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
@@ -1881,59 +1363,28 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1881
1363
|
switch (errorCode) {
|
|
1882
1364
|
case "AccessDeniedException":
|
|
1883
1365
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1884
|
-
|
|
1885
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1886
|
-
name: errorCode,
|
|
1887
|
-
$metadata: deserializeMetadata(output),
|
|
1888
|
-
};
|
|
1889
|
-
break;
|
|
1366
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1890
1367
|
case "InternalServerException":
|
|
1891
1368
|
case "com.amazonaws.amp#InternalServerException":
|
|
1892
|
-
|
|
1893
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1894
|
-
name: errorCode,
|
|
1895
|
-
$metadata: deserializeMetadata(output),
|
|
1896
|
-
};
|
|
1897
|
-
break;
|
|
1369
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1898
1370
|
case "ResourceNotFoundException":
|
|
1899
1371
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1900
|
-
|
|
1901
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1902
|
-
name: errorCode,
|
|
1903
|
-
$metadata: deserializeMetadata(output),
|
|
1904
|
-
};
|
|
1905
|
-
break;
|
|
1372
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1906
1373
|
case "ThrottlingException":
|
|
1907
1374
|
case "com.amazonaws.amp#ThrottlingException":
|
|
1908
|
-
|
|
1909
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1910
|
-
name: errorCode,
|
|
1911
|
-
$metadata: deserializeMetadata(output),
|
|
1912
|
-
};
|
|
1913
|
-
break;
|
|
1375
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1914
1376
|
case "ValidationException":
|
|
1915
1377
|
case "com.amazonaws.amp#ValidationException":
|
|
1916
|
-
|
|
1917
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
1918
|
-
name: errorCode,
|
|
1919
|
-
$metadata: deserializeMetadata(output),
|
|
1920
|
-
};
|
|
1921
|
-
break;
|
|
1378
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1922
1379
|
default:
|
|
1923
1380
|
const parsedBody = parsedOutput.body;
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
...parsedBody,
|
|
1927
|
-
name: `${errorCode}`,
|
|
1928
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1381
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1382
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1929
1383
|
$fault: "client",
|
|
1930
1384
|
$metadata: deserializeMetadata(output),
|
|
1931
|
-
};
|
|
1385
|
+
});
|
|
1386
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1932
1387
|
}
|
|
1933
|
-
const message = response.message || response.Message || errorCode;
|
|
1934
|
-
response.message = message;
|
|
1935
|
-
delete response.Message;
|
|
1936
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1937
1388
|
};
|
|
1938
1389
|
const deserializeAws_restJson1UpdateWorkspaceAliasCommand = async (output, context) => {
|
|
1939
1390
|
if (output.statusCode !== 204 && output.statusCode >= 300) {
|
|
@@ -1957,98 +1408,49 @@ const deserializeAws_restJson1UpdateWorkspaceAliasCommandError = async (output,
|
|
|
1957
1408
|
switch (errorCode) {
|
|
1958
1409
|
case "AccessDeniedException":
|
|
1959
1410
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
1960
|
-
|
|
1961
|
-
...(await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1962
|
-
name: errorCode,
|
|
1963
|
-
$metadata: deserializeMetadata(output),
|
|
1964
|
-
};
|
|
1965
|
-
break;
|
|
1411
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1966
1412
|
case "ConflictException":
|
|
1967
1413
|
case "com.amazonaws.amp#ConflictException":
|
|
1968
|
-
|
|
1969
|
-
...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
|
|
1970
|
-
name: errorCode,
|
|
1971
|
-
$metadata: deserializeMetadata(output),
|
|
1972
|
-
};
|
|
1973
|
-
break;
|
|
1414
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1974
1415
|
case "InternalServerException":
|
|
1975
1416
|
case "com.amazonaws.amp#InternalServerException":
|
|
1976
|
-
|
|
1977
|
-
...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1978
|
-
name: errorCode,
|
|
1979
|
-
$metadata: deserializeMetadata(output),
|
|
1980
|
-
};
|
|
1981
|
-
break;
|
|
1417
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1982
1418
|
case "ResourceNotFoundException":
|
|
1983
1419
|
case "com.amazonaws.amp#ResourceNotFoundException":
|
|
1984
|
-
|
|
1985
|
-
...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1986
|
-
name: errorCode,
|
|
1987
|
-
$metadata: deserializeMetadata(output),
|
|
1988
|
-
};
|
|
1989
|
-
break;
|
|
1420
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1990
1421
|
case "ServiceQuotaExceededException":
|
|
1991
1422
|
case "com.amazonaws.amp#ServiceQuotaExceededException":
|
|
1992
|
-
|
|
1993
|
-
...(await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
1994
|
-
name: errorCode,
|
|
1995
|
-
$metadata: deserializeMetadata(output),
|
|
1996
|
-
};
|
|
1997
|
-
break;
|
|
1423
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
1998
1424
|
case "ThrottlingException":
|
|
1999
1425
|
case "com.amazonaws.amp#ThrottlingException":
|
|
2000
|
-
|
|
2001
|
-
...(await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2002
|
-
name: errorCode,
|
|
2003
|
-
$metadata: deserializeMetadata(output),
|
|
2004
|
-
};
|
|
2005
|
-
break;
|
|
1426
|
+
throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
|
|
2006
1427
|
case "ValidationException":
|
|
2007
1428
|
case "com.amazonaws.amp#ValidationException":
|
|
2008
|
-
|
|
2009
|
-
...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
|
|
2010
|
-
name: errorCode,
|
|
2011
|
-
$metadata: deserializeMetadata(output),
|
|
2012
|
-
};
|
|
2013
|
-
break;
|
|
1429
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
2014
1430
|
default:
|
|
2015
1431
|
const parsedBody = parsedOutput.body;
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
...parsedBody,
|
|
2019
|
-
name: `${errorCode}`,
|
|
2020
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1432
|
+
response = new AmpServiceException_1.AmpServiceException({
|
|
1433
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
2021
1434
|
$fault: "client",
|
|
2022
1435
|
$metadata: deserializeMetadata(output),
|
|
2023
|
-
};
|
|
1436
|
+
});
|
|
1437
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
2024
1438
|
}
|
|
2025
|
-
const message = response.message || response.Message || errorCode;
|
|
2026
|
-
response.message = message;
|
|
2027
|
-
delete response.Message;
|
|
2028
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
2029
1439
|
};
|
|
2030
1440
|
const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
2031
|
-
const contents = {
|
|
2032
|
-
name: "AccessDeniedException",
|
|
2033
|
-
$fault: "client",
|
|
2034
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2035
|
-
message: undefined,
|
|
2036
|
-
};
|
|
1441
|
+
const contents = {};
|
|
2037
1442
|
const data = parsedOutput.body;
|
|
2038
1443
|
if (data.message !== undefined && data.message !== null) {
|
|
2039
1444
|
contents.message = smithy_client_1.expectString(data.message);
|
|
2040
1445
|
}
|
|
2041
|
-
|
|
1446
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
1447
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1448
|
+
...contents,
|
|
1449
|
+
});
|
|
1450
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2042
1451
|
};
|
|
2043
1452
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
2044
|
-
const contents = {
|
|
2045
|
-
name: "ConflictException",
|
|
2046
|
-
$fault: "client",
|
|
2047
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2048
|
-
message: undefined,
|
|
2049
|
-
resourceId: undefined,
|
|
2050
|
-
resourceType: undefined,
|
|
2051
|
-
};
|
|
1453
|
+
const contents = {};
|
|
2052
1454
|
const data = parsedOutput.body;
|
|
2053
1455
|
if (data.message !== undefined && data.message !== null) {
|
|
2054
1456
|
contents.message = smithy_client_1.expectString(data.message);
|
|
@@ -2059,17 +1461,14 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
2059
1461
|
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
2060
1462
|
contents.resourceType = smithy_client_1.expectString(data.resourceType);
|
|
2061
1463
|
}
|
|
2062
|
-
|
|
1464
|
+
const exception = new models_0_1.ConflictException({
|
|
1465
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1466
|
+
...contents,
|
|
1467
|
+
});
|
|
1468
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2063
1469
|
};
|
|
2064
1470
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
2065
|
-
const contents = {
|
|
2066
|
-
name: "InternalServerException",
|
|
2067
|
-
$fault: "server",
|
|
2068
|
-
$retryable: {},
|
|
2069
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2070
|
-
message: undefined,
|
|
2071
|
-
retryAfterSeconds: undefined,
|
|
2072
|
-
};
|
|
1471
|
+
const contents = {};
|
|
2073
1472
|
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
2074
1473
|
contents.retryAfterSeconds = smithy_client_1.strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
2075
1474
|
}
|
|
@@ -2077,17 +1476,14 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
2077
1476
|
if (data.message !== undefined && data.message !== null) {
|
|
2078
1477
|
contents.message = smithy_client_1.expectString(data.message);
|
|
2079
1478
|
}
|
|
2080
|
-
|
|
1479
|
+
const exception = new models_0_1.InternalServerException({
|
|
1480
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1481
|
+
...contents,
|
|
1482
|
+
});
|
|
1483
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2081
1484
|
};
|
|
2082
1485
|
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
2083
|
-
const contents = {
|
|
2084
|
-
name: "ResourceNotFoundException",
|
|
2085
|
-
$fault: "client",
|
|
2086
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2087
|
-
message: undefined,
|
|
2088
|
-
resourceId: undefined,
|
|
2089
|
-
resourceType: undefined,
|
|
2090
|
-
};
|
|
1486
|
+
const contents = {};
|
|
2091
1487
|
const data = parsedOutput.body;
|
|
2092
1488
|
if (data.message !== undefined && data.message !== null) {
|
|
2093
1489
|
contents.message = smithy_client_1.expectString(data.message);
|
|
@@ -2098,19 +1494,14 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
2098
1494
|
if (data.resourceType !== undefined && data.resourceType !== null) {
|
|
2099
1495
|
contents.resourceType = smithy_client_1.expectString(data.resourceType);
|
|
2100
1496
|
}
|
|
2101
|
-
|
|
1497
|
+
const exception = new models_0_1.ResourceNotFoundException({
|
|
1498
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1499
|
+
...contents,
|
|
1500
|
+
});
|
|
1501
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2102
1502
|
};
|
|
2103
1503
|
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
2104
|
-
const contents = {
|
|
2105
|
-
name: "ServiceQuotaExceededException",
|
|
2106
|
-
$fault: "client",
|
|
2107
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2108
|
-
message: undefined,
|
|
2109
|
-
quotaCode: undefined,
|
|
2110
|
-
resourceId: undefined,
|
|
2111
|
-
resourceType: undefined,
|
|
2112
|
-
serviceCode: undefined,
|
|
2113
|
-
};
|
|
1504
|
+
const contents = {};
|
|
2114
1505
|
const data = parsedOutput.body;
|
|
2115
1506
|
if (data.message !== undefined && data.message !== null) {
|
|
2116
1507
|
contents.message = smithy_client_1.expectString(data.message);
|
|
@@ -2127,19 +1518,14 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
|
|
|
2127
1518
|
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
2128
1519
|
contents.serviceCode = smithy_client_1.expectString(data.serviceCode);
|
|
2129
1520
|
}
|
|
2130
|
-
|
|
1521
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1522
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1523
|
+
...contents,
|
|
1524
|
+
});
|
|
1525
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2131
1526
|
};
|
|
2132
1527
|
const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
2133
|
-
const contents = {
|
|
2134
|
-
name: "ThrottlingException",
|
|
2135
|
-
$fault: "client",
|
|
2136
|
-
$retryable: {},
|
|
2137
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2138
|
-
message: undefined,
|
|
2139
|
-
quotaCode: undefined,
|
|
2140
|
-
retryAfterSeconds: undefined,
|
|
2141
|
-
serviceCode: undefined,
|
|
2142
|
-
};
|
|
1528
|
+
const contents = {};
|
|
2143
1529
|
if (parsedOutput.headers["retry-after"] !== undefined) {
|
|
2144
1530
|
contents.retryAfterSeconds = smithy_client_1.strictParseInt32(parsedOutput.headers["retry-after"]);
|
|
2145
1531
|
}
|
|
@@ -2153,17 +1539,14 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
|
|
|
2153
1539
|
if (data.serviceCode !== undefined && data.serviceCode !== null) {
|
|
2154
1540
|
contents.serviceCode = smithy_client_1.expectString(data.serviceCode);
|
|
2155
1541
|
}
|
|
2156
|
-
|
|
1542
|
+
const exception = new models_0_1.ThrottlingException({
|
|
1543
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1544
|
+
...contents,
|
|
1545
|
+
});
|
|
1546
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2157
1547
|
};
|
|
2158
1548
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
2159
|
-
const contents = {
|
|
2160
|
-
name: "ValidationException",
|
|
2161
|
-
$fault: "client",
|
|
2162
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
2163
|
-
fieldList: undefined,
|
|
2164
|
-
message: undefined,
|
|
2165
|
-
reason: undefined,
|
|
2166
|
-
};
|
|
1549
|
+
const contents = {};
|
|
2167
1550
|
const data = parsedOutput.body;
|
|
2168
1551
|
if (data.fieldList !== undefined && data.fieldList !== null) {
|
|
2169
1552
|
contents.fieldList = deserializeAws_restJson1ValidationExceptionFieldList(data.fieldList, context);
|
|
@@ -2174,7 +1557,11 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
2174
1557
|
if (data.reason !== undefined && data.reason !== null) {
|
|
2175
1558
|
contents.reason = smithy_client_1.expectString(data.reason);
|
|
2176
1559
|
}
|
|
2177
|
-
|
|
1560
|
+
const exception = new models_0_1.ValidationException({
|
|
1561
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1562
|
+
...contents,
|
|
1563
|
+
});
|
|
1564
|
+
return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
|
|
2178
1565
|
};
|
|
2179
1566
|
const serializeAws_restJson1TagMap = (input, context) => {
|
|
2180
1567
|
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
@@ -2251,7 +1638,7 @@ const deserializeAws_restJson1RuleGroupsNamespaceSummary = (output, context) =>
|
|
|
2251
1638
|
};
|
|
2252
1639
|
};
|
|
2253
1640
|
const deserializeAws_restJson1RuleGroupsNamespaceSummaryList = (output, context) => {
|
|
2254
|
-
|
|
1641
|
+
const retVal = (output || [])
|
|
2255
1642
|
.filter((e) => e != null)
|
|
2256
1643
|
.map((entry) => {
|
|
2257
1644
|
if (entry === null) {
|
|
@@ -2259,6 +1646,7 @@ const deserializeAws_restJson1RuleGroupsNamespaceSummaryList = (output, context)
|
|
|
2259
1646
|
}
|
|
2260
1647
|
return deserializeAws_restJson1RuleGroupsNamespaceSummary(entry, context);
|
|
2261
1648
|
});
|
|
1649
|
+
return retVal;
|
|
2262
1650
|
};
|
|
2263
1651
|
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
2264
1652
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
@@ -2278,7 +1666,7 @@ const deserializeAws_restJson1ValidationExceptionField = (output, context) => {
|
|
|
2278
1666
|
};
|
|
2279
1667
|
};
|
|
2280
1668
|
const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) => {
|
|
2281
|
-
|
|
1669
|
+
const retVal = (output || [])
|
|
2282
1670
|
.filter((e) => e != null)
|
|
2283
1671
|
.map((entry) => {
|
|
2284
1672
|
if (entry === null) {
|
|
@@ -2286,6 +1674,7 @@ const deserializeAws_restJson1ValidationExceptionFieldList = (output, context) =
|
|
|
2286
1674
|
}
|
|
2287
1675
|
return deserializeAws_restJson1ValidationExceptionField(entry, context);
|
|
2288
1676
|
});
|
|
1677
|
+
return retVal;
|
|
2289
1678
|
};
|
|
2290
1679
|
const deserializeAws_restJson1WorkspaceDescription = (output, context) => {
|
|
2291
1680
|
return {
|
|
@@ -2326,7 +1715,7 @@ const deserializeAws_restJson1WorkspaceSummary = (output, context) => {
|
|
|
2326
1715
|
};
|
|
2327
1716
|
};
|
|
2328
1717
|
const deserializeAws_restJson1WorkspaceSummaryList = (output, context) => {
|
|
2329
|
-
|
|
1718
|
+
const retVal = (output || [])
|
|
2330
1719
|
.filter((e) => e != null)
|
|
2331
1720
|
.map((entry) => {
|
|
2332
1721
|
if (entry === null) {
|
|
@@ -2334,6 +1723,7 @@ const deserializeAws_restJson1WorkspaceSummaryList = (output, context) => {
|
|
|
2334
1723
|
}
|
|
2335
1724
|
return deserializeAws_restJson1WorkspaceSummary(entry, context);
|
|
2336
1725
|
});
|
|
1726
|
+
return retVal;
|
|
2337
1727
|
};
|
|
2338
1728
|
const deserializeMetadata = (output) => {
|
|
2339
1729
|
var _a;
|