@aws-sdk/client-amp 3.118.1 → 3.128.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 +27 -0
- package/dist-cjs/protocols/Aws_restJson1.js +114 -132
- package/dist-es/protocols/Aws_restJson1.js +111 -129
- package/package.json +27 -27
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.128.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.127.0...v3.128.0) (2022-07-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-amp
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.127.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.126.0...v3.127.0) (2022-07-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/client-amp
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.121.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.120.0...v3.121.0) (2022-06-30)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* **clients:** fallback to status code for unmodeled errors ([#3752](https://github.com/aws/aws-sdk-js-v3/issues/3752)) ([49bcc4f](https://github.com/aws/aws-sdk-js-v3/commit/49bcc4f153e890e798a8e82fd5fc397b2dcc449f))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## [3.118.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.118.0...v3.118.1) (2022-06-27)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @aws-sdk/client-amp
|
|
@@ -27,7 +27,7 @@ const serializeAws_restJson1CreateAlertManagerDefinitionCommand = async (input,
|
|
|
27
27
|
let body;
|
|
28
28
|
body = JSON.stringify({
|
|
29
29
|
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
30
|
-
...(input.data
|
|
30
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
31
31
|
});
|
|
32
32
|
return new protocol_http_1.HttpRequest({
|
|
33
33
|
protocol,
|
|
@@ -61,9 +61,9 @@ const serializeAws_restJson1CreateRuleGroupsNamespaceCommand = async (input, con
|
|
|
61
61
|
let body;
|
|
62
62
|
body = JSON.stringify({
|
|
63
63
|
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
64
|
-
...(input.data
|
|
65
|
-
...(input.name
|
|
66
|
-
...(input.tags
|
|
64
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
65
|
+
...(input.name != null && { name: input.name }),
|
|
66
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
67
67
|
});
|
|
68
68
|
return new protocol_http_1.HttpRequest({
|
|
69
69
|
protocol,
|
|
@@ -85,9 +85,9 @@ const serializeAws_restJson1CreateWorkspaceCommand = async (input, context) => {
|
|
|
85
85
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/workspaces";
|
|
86
86
|
let body;
|
|
87
87
|
body = JSON.stringify({
|
|
88
|
-
...(input.alias
|
|
88
|
+
...(input.alias != null && { alias: input.alias }),
|
|
89
89
|
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
90
|
-
...(input.tags
|
|
90
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
91
91
|
});
|
|
92
92
|
return new protocol_http_1.HttpRequest({
|
|
93
93
|
protocol,
|
|
@@ -394,7 +394,7 @@ const serializeAws_restJson1PutAlertManagerDefinitionCommand = async (input, con
|
|
|
394
394
|
let body;
|
|
395
395
|
body = JSON.stringify({
|
|
396
396
|
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
397
|
-
...(input.data
|
|
397
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
398
398
|
});
|
|
399
399
|
return new protocol_http_1.HttpRequest({
|
|
400
400
|
protocol,
|
|
@@ -438,7 +438,7 @@ const serializeAws_restJson1PutRuleGroupsNamespaceCommand = async (input, contex
|
|
|
438
438
|
let body;
|
|
439
439
|
body = JSON.stringify({
|
|
440
440
|
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
441
|
-
...(input.data
|
|
441
|
+
...(input.data != null && { data: context.base64Encoder(input.data) }),
|
|
442
442
|
});
|
|
443
443
|
return new protocol_http_1.HttpRequest({
|
|
444
444
|
protocol,
|
|
@@ -469,7 +469,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
469
469
|
}
|
|
470
470
|
let body;
|
|
471
471
|
body = JSON.stringify({
|
|
472
|
-
...(input.tags
|
|
472
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
473
473
|
});
|
|
474
474
|
return new protocol_http_1.HttpRequest({
|
|
475
475
|
protocol,
|
|
@@ -531,7 +531,7 @@ const serializeAws_restJson1UpdateWorkspaceAliasCommand = async (input, context)
|
|
|
531
531
|
}
|
|
532
532
|
let body;
|
|
533
533
|
body = JSON.stringify({
|
|
534
|
-
...(input.alias
|
|
534
|
+
...(input.alias != null && { alias: input.alias }),
|
|
535
535
|
clientToken: (_a = input.clientToken) !== null && _a !== void 0 ? _a : (0, uuid_1.v4)(),
|
|
536
536
|
});
|
|
537
537
|
return new protocol_http_1.HttpRequest({
|
|
@@ -566,8 +566,7 @@ const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async (
|
|
|
566
566
|
body: await parseBody(output.body, context),
|
|
567
567
|
};
|
|
568
568
|
let response;
|
|
569
|
-
|
|
570
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
569
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
571
570
|
switch (errorCode) {
|
|
572
571
|
case "AccessDeniedException":
|
|
573
572
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -592,10 +591,12 @@ const deserializeAws_restJson1CreateAlertManagerDefinitionCommandError = async (
|
|
|
592
591
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
593
592
|
default:
|
|
594
593
|
const parsedBody = parsedOutput.body;
|
|
594
|
+
const $metadata = deserializeMetadata(output);
|
|
595
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
595
596
|
response = new AmpServiceException_1.AmpServiceException({
|
|
596
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
597
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
597
598
|
$fault: "client",
|
|
598
|
-
$metadata
|
|
599
|
+
$metadata,
|
|
599
600
|
});
|
|
600
601
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
601
602
|
}
|
|
@@ -633,8 +634,7 @@ const deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = async (out
|
|
|
633
634
|
body: await parseBody(output.body, context),
|
|
634
635
|
};
|
|
635
636
|
let response;
|
|
636
|
-
|
|
637
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
637
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
638
638
|
switch (errorCode) {
|
|
639
639
|
case "AccessDeniedException":
|
|
640
640
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -659,10 +659,12 @@ const deserializeAws_restJson1CreateRuleGroupsNamespaceCommandError = async (out
|
|
|
659
659
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
660
660
|
default:
|
|
661
661
|
const parsedBody = parsedOutput.body;
|
|
662
|
+
const $metadata = deserializeMetadata(output);
|
|
663
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
662
664
|
response = new AmpServiceException_1.AmpServiceException({
|
|
663
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
665
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
664
666
|
$fault: "client",
|
|
665
|
-
$metadata
|
|
667
|
+
$metadata,
|
|
666
668
|
});
|
|
667
669
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
668
670
|
}
|
|
@@ -700,8 +702,7 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
|
|
|
700
702
|
body: await parseBody(output.body, context),
|
|
701
703
|
};
|
|
702
704
|
let response;
|
|
703
|
-
|
|
704
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
705
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
705
706
|
switch (errorCode) {
|
|
706
707
|
case "AccessDeniedException":
|
|
707
708
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -723,10 +724,12 @@ const deserializeAws_restJson1CreateWorkspaceCommandError = async (output, conte
|
|
|
723
724
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
724
725
|
default:
|
|
725
726
|
const parsedBody = parsedOutput.body;
|
|
727
|
+
const $metadata = deserializeMetadata(output);
|
|
728
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
726
729
|
response = new AmpServiceException_1.AmpServiceException({
|
|
727
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
730
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
728
731
|
$fault: "client",
|
|
729
|
-
$metadata
|
|
732
|
+
$metadata,
|
|
730
733
|
});
|
|
731
734
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
732
735
|
}
|
|
@@ -748,8 +751,7 @@ const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async (
|
|
|
748
751
|
body: await parseBody(output.body, context),
|
|
749
752
|
};
|
|
750
753
|
let response;
|
|
751
|
-
|
|
752
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
754
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
753
755
|
switch (errorCode) {
|
|
754
756
|
case "AccessDeniedException":
|
|
755
757
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -771,10 +773,12 @@ const deserializeAws_restJson1DeleteAlertManagerDefinitionCommandError = async (
|
|
|
771
773
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
772
774
|
default:
|
|
773
775
|
const parsedBody = parsedOutput.body;
|
|
776
|
+
const $metadata = deserializeMetadata(output);
|
|
777
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
774
778
|
response = new AmpServiceException_1.AmpServiceException({
|
|
775
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
779
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
776
780
|
$fault: "client",
|
|
777
|
-
$metadata
|
|
781
|
+
$metadata,
|
|
778
782
|
});
|
|
779
783
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
780
784
|
}
|
|
@@ -796,8 +800,7 @@ const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = async (out
|
|
|
796
800
|
body: await parseBody(output.body, context),
|
|
797
801
|
};
|
|
798
802
|
let response;
|
|
799
|
-
|
|
800
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
803
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
801
804
|
switch (errorCode) {
|
|
802
805
|
case "AccessDeniedException":
|
|
803
806
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -819,10 +822,12 @@ const deserializeAws_restJson1DeleteRuleGroupsNamespaceCommandError = async (out
|
|
|
819
822
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
820
823
|
default:
|
|
821
824
|
const parsedBody = parsedOutput.body;
|
|
825
|
+
const $metadata = deserializeMetadata(output);
|
|
826
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
822
827
|
response = new AmpServiceException_1.AmpServiceException({
|
|
823
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
828
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
824
829
|
$fault: "client",
|
|
825
|
-
$metadata
|
|
830
|
+
$metadata,
|
|
826
831
|
});
|
|
827
832
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
828
833
|
}
|
|
@@ -844,8 +849,7 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
|
|
|
844
849
|
body: await parseBody(output.body, context),
|
|
845
850
|
};
|
|
846
851
|
let response;
|
|
847
|
-
|
|
848
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
852
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
849
853
|
switch (errorCode) {
|
|
850
854
|
case "AccessDeniedException":
|
|
851
855
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -867,10 +871,12 @@ const deserializeAws_restJson1DeleteWorkspaceCommandError = async (output, conte
|
|
|
867
871
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
868
872
|
default:
|
|
869
873
|
const parsedBody = parsedOutput.body;
|
|
874
|
+
const $metadata = deserializeMetadata(output);
|
|
875
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
870
876
|
response = new AmpServiceException_1.AmpServiceException({
|
|
871
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
877
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
872
878
|
$fault: "client",
|
|
873
|
-
$metadata
|
|
879
|
+
$metadata,
|
|
874
880
|
});
|
|
875
881
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
876
882
|
}
|
|
@@ -896,8 +902,7 @@ const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async
|
|
|
896
902
|
body: await parseBody(output.body, context),
|
|
897
903
|
};
|
|
898
904
|
let response;
|
|
899
|
-
|
|
900
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
905
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
901
906
|
switch (errorCode) {
|
|
902
907
|
case "AccessDeniedException":
|
|
903
908
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -916,10 +921,12 @@ const deserializeAws_restJson1DescribeAlertManagerDefinitionCommandError = async
|
|
|
916
921
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
917
922
|
default:
|
|
918
923
|
const parsedBody = parsedOutput.body;
|
|
924
|
+
const $metadata = deserializeMetadata(output);
|
|
925
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
919
926
|
response = new AmpServiceException_1.AmpServiceException({
|
|
920
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
927
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
921
928
|
$fault: "client",
|
|
922
|
-
$metadata
|
|
929
|
+
$metadata,
|
|
923
930
|
});
|
|
924
931
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
925
932
|
}
|
|
@@ -945,8 +952,7 @@ const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = async (o
|
|
|
945
952
|
body: await parseBody(output.body, context),
|
|
946
953
|
};
|
|
947
954
|
let response;
|
|
948
|
-
|
|
949
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
955
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
950
956
|
switch (errorCode) {
|
|
951
957
|
case "AccessDeniedException":
|
|
952
958
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -965,10 +971,12 @@ const deserializeAws_restJson1DescribeRuleGroupsNamespaceCommandError = async (o
|
|
|
965
971
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
966
972
|
default:
|
|
967
973
|
const parsedBody = parsedOutput.body;
|
|
974
|
+
const $metadata = deserializeMetadata(output);
|
|
975
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
968
976
|
response = new AmpServiceException_1.AmpServiceException({
|
|
969
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
977
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
970
978
|
$fault: "client",
|
|
971
|
-
$metadata
|
|
979
|
+
$metadata,
|
|
972
980
|
});
|
|
973
981
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
974
982
|
}
|
|
@@ -994,8 +1002,7 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, con
|
|
|
994
1002
|
body: await parseBody(output.body, context),
|
|
995
1003
|
};
|
|
996
1004
|
let response;
|
|
997
|
-
|
|
998
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1005
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
999
1006
|
switch (errorCode) {
|
|
1000
1007
|
case "AccessDeniedException":
|
|
1001
1008
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1014,10 +1021,12 @@ const deserializeAws_restJson1DescribeWorkspaceCommandError = async (output, con
|
|
|
1014
1021
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1015
1022
|
default:
|
|
1016
1023
|
const parsedBody = parsedOutput.body;
|
|
1024
|
+
const $metadata = deserializeMetadata(output);
|
|
1025
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1017
1026
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1018
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1027
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1019
1028
|
$fault: "client",
|
|
1020
|
-
$metadata
|
|
1029
|
+
$metadata,
|
|
1021
1030
|
});
|
|
1022
1031
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1023
1032
|
}
|
|
@@ -1047,8 +1056,7 @@ const deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = async (outp
|
|
|
1047
1056
|
body: await parseBody(output.body, context),
|
|
1048
1057
|
};
|
|
1049
1058
|
let response;
|
|
1050
|
-
|
|
1051
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1059
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1052
1060
|
switch (errorCode) {
|
|
1053
1061
|
case "AccessDeniedException":
|
|
1054
1062
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1067,10 +1075,12 @@ const deserializeAws_restJson1ListRuleGroupsNamespacesCommandError = async (outp
|
|
|
1067
1075
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1068
1076
|
default:
|
|
1069
1077
|
const parsedBody = parsedOutput.body;
|
|
1078
|
+
const $metadata = deserializeMetadata(output);
|
|
1079
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1070
1080
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1071
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1081
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1072
1082
|
$fault: "client",
|
|
1073
|
-
$metadata
|
|
1083
|
+
$metadata,
|
|
1074
1084
|
});
|
|
1075
1085
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1076
1086
|
}
|
|
@@ -1096,8 +1106,7 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1096
1106
|
body: await parseBody(output.body, context),
|
|
1097
1107
|
};
|
|
1098
1108
|
let response;
|
|
1099
|
-
|
|
1100
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1109
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1101
1110
|
switch (errorCode) {
|
|
1102
1111
|
case "AccessDeniedException":
|
|
1103
1112
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1116,10 +1125,12 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
1116
1125
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1117
1126
|
default:
|
|
1118
1127
|
const parsedBody = parsedOutput.body;
|
|
1128
|
+
const $metadata = deserializeMetadata(output);
|
|
1129
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1119
1130
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1120
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1131
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1121
1132
|
$fault: "client",
|
|
1122
|
-
$metadata
|
|
1133
|
+
$metadata,
|
|
1123
1134
|
});
|
|
1124
1135
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1125
1136
|
}
|
|
@@ -1149,8 +1160,7 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
|
|
|
1149
1160
|
body: await parseBody(output.body, context),
|
|
1150
1161
|
};
|
|
1151
1162
|
let response;
|
|
1152
|
-
|
|
1153
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1163
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1154
1164
|
switch (errorCode) {
|
|
1155
1165
|
case "AccessDeniedException":
|
|
1156
1166
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1166,10 +1176,12 @@ const deserializeAws_restJson1ListWorkspacesCommandError = async (output, contex
|
|
|
1166
1176
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1167
1177
|
default:
|
|
1168
1178
|
const parsedBody = parsedOutput.body;
|
|
1179
|
+
const $metadata = deserializeMetadata(output);
|
|
1180
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1169
1181
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1170
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1182
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1171
1183
|
$fault: "client",
|
|
1172
|
-
$metadata
|
|
1184
|
+
$metadata,
|
|
1173
1185
|
});
|
|
1174
1186
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1175
1187
|
}
|
|
@@ -1195,8 +1207,7 @@ const deserializeAws_restJson1PutAlertManagerDefinitionCommandError = async (out
|
|
|
1195
1207
|
body: await parseBody(output.body, context),
|
|
1196
1208
|
};
|
|
1197
1209
|
let response;
|
|
1198
|
-
|
|
1199
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1210
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1200
1211
|
switch (errorCode) {
|
|
1201
1212
|
case "AccessDeniedException":
|
|
1202
1213
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1221,10 +1232,12 @@ const deserializeAws_restJson1PutAlertManagerDefinitionCommandError = async (out
|
|
|
1221
1232
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1222
1233
|
default:
|
|
1223
1234
|
const parsedBody = parsedOutput.body;
|
|
1235
|
+
const $metadata = deserializeMetadata(output);
|
|
1236
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1224
1237
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1225
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1238
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1226
1239
|
$fault: "client",
|
|
1227
|
-
$metadata
|
|
1240
|
+
$metadata,
|
|
1228
1241
|
});
|
|
1229
1242
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1230
1243
|
}
|
|
@@ -1262,8 +1275,7 @@ const deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = async (output
|
|
|
1262
1275
|
body: await parseBody(output.body, context),
|
|
1263
1276
|
};
|
|
1264
1277
|
let response;
|
|
1265
|
-
|
|
1266
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1278
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1267
1279
|
switch (errorCode) {
|
|
1268
1280
|
case "AccessDeniedException":
|
|
1269
1281
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1288,10 +1300,12 @@ const deserializeAws_restJson1PutRuleGroupsNamespaceCommandError = async (output
|
|
|
1288
1300
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1289
1301
|
default:
|
|
1290
1302
|
const parsedBody = parsedOutput.body;
|
|
1303
|
+
const $metadata = deserializeMetadata(output);
|
|
1304
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1291
1305
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1292
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1306
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1293
1307
|
$fault: "client",
|
|
1294
|
-
$metadata
|
|
1308
|
+
$metadata,
|
|
1295
1309
|
});
|
|
1296
1310
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1297
1311
|
}
|
|
@@ -1313,8 +1327,7 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1313
1327
|
body: await parseBody(output.body, context),
|
|
1314
1328
|
};
|
|
1315
1329
|
let response;
|
|
1316
|
-
|
|
1317
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1330
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1318
1331
|
switch (errorCode) {
|
|
1319
1332
|
case "AccessDeniedException":
|
|
1320
1333
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1333,10 +1346,12 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
1333
1346
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1334
1347
|
default:
|
|
1335
1348
|
const parsedBody = parsedOutput.body;
|
|
1349
|
+
const $metadata = deserializeMetadata(output);
|
|
1350
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1336
1351
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1337
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1352
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1338
1353
|
$fault: "client",
|
|
1339
|
-
$metadata
|
|
1354
|
+
$metadata,
|
|
1340
1355
|
});
|
|
1341
1356
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1342
1357
|
}
|
|
@@ -1358,8 +1373,7 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1358
1373
|
body: await parseBody(output.body, context),
|
|
1359
1374
|
};
|
|
1360
1375
|
let response;
|
|
1361
|
-
|
|
1362
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1376
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1363
1377
|
switch (errorCode) {
|
|
1364
1378
|
case "AccessDeniedException":
|
|
1365
1379
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1378,10 +1392,12 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
1378
1392
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1379
1393
|
default:
|
|
1380
1394
|
const parsedBody = parsedOutput.body;
|
|
1395
|
+
const $metadata = deserializeMetadata(output);
|
|
1396
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1381
1397
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1382
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1398
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1383
1399
|
$fault: "client",
|
|
1384
|
-
$metadata
|
|
1400
|
+
$metadata,
|
|
1385
1401
|
});
|
|
1386
1402
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1387
1403
|
}
|
|
@@ -1403,8 +1419,7 @@ const deserializeAws_restJson1UpdateWorkspaceAliasCommandError = async (output,
|
|
|
1403
1419
|
body: await parseBody(output.body, context),
|
|
1404
1420
|
};
|
|
1405
1421
|
let response;
|
|
1406
|
-
|
|
1407
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1422
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1408
1423
|
switch (errorCode) {
|
|
1409
1424
|
case "AccessDeniedException":
|
|
1410
1425
|
case "com.amazonaws.amp#AccessDeniedException":
|
|
@@ -1429,10 +1444,12 @@ const deserializeAws_restJson1UpdateWorkspaceAliasCommandError = async (output,
|
|
|
1429
1444
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1430
1445
|
default:
|
|
1431
1446
|
const parsedBody = parsedOutput.body;
|
|
1447
|
+
const $metadata = deserializeMetadata(output);
|
|
1448
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1432
1449
|
response = new AmpServiceException_1.AmpServiceException({
|
|
1433
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1450
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1434
1451
|
$fault: "client",
|
|
1435
|
-
$metadata
|
|
1452
|
+
$metadata,
|
|
1436
1453
|
});
|
|
1437
1454
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1438
1455
|
}
|
|
@@ -1576,16 +1593,10 @@ const serializeAws_restJson1TagMap = (input, context) => {
|
|
|
1576
1593
|
};
|
|
1577
1594
|
const deserializeAws_restJson1AlertManagerDefinitionDescription = (output, context) => {
|
|
1578
1595
|
return {
|
|
1579
|
-
createdAt: output.createdAt
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
|
|
1584
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt)))
|
|
1585
|
-
: undefined,
|
|
1586
|
-
status: output.status !== undefined && output.status !== null
|
|
1587
|
-
? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context)
|
|
1588
|
-
: undefined,
|
|
1596
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1597
|
+
data: output.data != null ? context.base64Decoder(output.data) : undefined,
|
|
1598
|
+
modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
|
|
1599
|
+
status: output.status != null ? deserializeAws_restJson1AlertManagerDefinitionStatus(output.status, context) : undefined,
|
|
1589
1600
|
};
|
|
1590
1601
|
};
|
|
1591
1602
|
const deserializeAws_restJson1AlertManagerDefinitionStatus = (output, context) => {
|
|
@@ -1597,20 +1608,12 @@ const deserializeAws_restJson1AlertManagerDefinitionStatus = (output, context) =
|
|
|
1597
1608
|
const deserializeAws_restJson1RuleGroupsNamespaceDescription = (output, context) => {
|
|
1598
1609
|
return {
|
|
1599
1610
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
1600
|
-
createdAt: output.createdAt
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
data: output.data !== undefined && output.data !== null ? context.base64Decoder(output.data) : undefined,
|
|
1604
|
-
modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
|
|
1605
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt)))
|
|
1606
|
-
: undefined,
|
|
1611
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1612
|
+
data: output.data != null ? context.base64Decoder(output.data) : undefined,
|
|
1613
|
+
modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
|
|
1607
1614
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
1608
|
-
status: output.status
|
|
1609
|
-
|
|
1610
|
-
: undefined,
|
|
1611
|
-
tags: output.tags !== undefined && output.tags !== null
|
|
1612
|
-
? deserializeAws_restJson1TagMap(output.tags, context)
|
|
1613
|
-
: undefined,
|
|
1615
|
+
status: output.status != null ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) : undefined,
|
|
1616
|
+
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
1614
1617
|
};
|
|
1615
1618
|
};
|
|
1616
1619
|
const deserializeAws_restJson1RuleGroupsNamespaceStatus = (output, context) => {
|
|
@@ -1622,19 +1625,11 @@ const deserializeAws_restJson1RuleGroupsNamespaceStatus = (output, context) => {
|
|
|
1622
1625
|
const deserializeAws_restJson1RuleGroupsNamespaceSummary = (output, context) => {
|
|
1623
1626
|
return {
|
|
1624
1627
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
1625
|
-
createdAt: output.createdAt
|
|
1626
|
-
|
|
1627
|
-
: undefined,
|
|
1628
|
-
modifiedAt: output.modifiedAt !== undefined && output.modifiedAt !== null
|
|
1629
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt)))
|
|
1630
|
-
: undefined,
|
|
1628
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1629
|
+
modifiedAt: output.modifiedAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.modifiedAt))) : undefined,
|
|
1631
1630
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
1632
|
-
status: output.status
|
|
1633
|
-
|
|
1634
|
-
: undefined,
|
|
1635
|
-
tags: output.tags !== undefined && output.tags !== null
|
|
1636
|
-
? deserializeAws_restJson1TagMap(output.tags, context)
|
|
1637
|
-
: undefined,
|
|
1631
|
+
status: output.status != null ? deserializeAws_restJson1RuleGroupsNamespaceStatus(output.status, context) : undefined,
|
|
1632
|
+
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
1638
1633
|
};
|
|
1639
1634
|
};
|
|
1640
1635
|
const deserializeAws_restJson1RuleGroupsNamespaceSummaryList = (output, context) => {
|
|
@@ -1680,16 +1675,10 @@ const deserializeAws_restJson1WorkspaceDescription = (output, context) => {
|
|
|
1680
1675
|
return {
|
|
1681
1676
|
alias: (0, smithy_client_1.expectString)(output.alias),
|
|
1682
1677
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
1683
|
-
createdAt: output.createdAt
|
|
1684
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt)))
|
|
1685
|
-
: undefined,
|
|
1678
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1686
1679
|
prometheusEndpoint: (0, smithy_client_1.expectString)(output.prometheusEndpoint),
|
|
1687
|
-
status: output.status
|
|
1688
|
-
|
|
1689
|
-
: undefined,
|
|
1690
|
-
tags: output.tags !== undefined && output.tags !== null
|
|
1691
|
-
? deserializeAws_restJson1TagMap(output.tags, context)
|
|
1692
|
-
: undefined,
|
|
1680
|
+
status: output.status != null ? deserializeAws_restJson1WorkspaceStatus(output.status, context) : undefined,
|
|
1681
|
+
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
1693
1682
|
workspaceId: (0, smithy_client_1.expectString)(output.workspaceId),
|
|
1694
1683
|
};
|
|
1695
1684
|
};
|
|
@@ -1702,15 +1691,9 @@ const deserializeAws_restJson1WorkspaceSummary = (output, context) => {
|
|
|
1702
1691
|
return {
|
|
1703
1692
|
alias: (0, smithy_client_1.expectString)(output.alias),
|
|
1704
1693
|
arn: (0, smithy_client_1.expectString)(output.arn),
|
|
1705
|
-
createdAt: output.createdAt
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
status: output.status !== undefined && output.status !== null
|
|
1709
|
-
? deserializeAws_restJson1WorkspaceStatus(output.status, context)
|
|
1710
|
-
: undefined,
|
|
1711
|
-
tags: output.tags !== undefined && output.tags !== null
|
|
1712
|
-
? deserializeAws_restJson1TagMap(output.tags, context)
|
|
1713
|
-
: undefined,
|
|
1694
|
+
createdAt: output.createdAt != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.createdAt))) : undefined,
|
|
1695
|
+
status: output.status != null ? deserializeAws_restJson1WorkspaceStatus(output.status, context) : undefined,
|
|
1696
|
+
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
1714
1697
|
workspaceId: (0, smithy_client_1.expectString)(output.workspaceId),
|
|
1715
1698
|
};
|
|
1716
1699
|
};
|
|
@@ -1774,5 +1757,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1774
1757
|
if (data["__type"] !== undefined) {
|
|
1775
1758
|
return sanitizeErrorCode(data["__type"]);
|
|
1776
1759
|
}
|
|
1777
|
-
return "";
|
|
1778
1760
|
};
|