@aws-sdk/client-synthetics 3.118.1 → 3.127.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 +30 -0
- package/README.md +7 -7
- package/dist-cjs/Synthetics.js +120 -0
- package/dist-cjs/commands/AssociateResourceCommand.js +36 -0
- package/dist-cjs/commands/CreateGroupCommand.js +36 -0
- package/dist-cjs/commands/DeleteGroupCommand.js +36 -0
- package/dist-cjs/commands/DisassociateResourceCommand.js +36 -0
- package/dist-cjs/commands/GetGroupCommand.js +36 -0
- package/dist-cjs/commands/ListAssociatedGroupsCommand.js +36 -0
- package/dist-cjs/commands/ListGroupResourcesCommand.js +36 -0
- package/dist-cjs/commands/ListGroupsCommand.js +36 -0
- package/dist-cjs/commands/index.js +8 -0
- package/dist-cjs/models/models_0.js +236 -58
- package/dist-cjs/pagination/ListAssociatedGroupsPaginator.js +36 -0
- package/dist-cjs/pagination/ListGroupResourcesPaginator.js +36 -0
- package/dist-cjs/pagination/ListGroupsPaginator.js +36 -0
- package/dist-cjs/pagination/index.js +3 -0
- package/dist-cjs/protocols/Aws_restJson1.js +939 -274
- package/dist-es/Synthetics.js +120 -0
- package/dist-es/commands/AssociateResourceCommand.js +39 -0
- package/dist-es/commands/CreateGroupCommand.js +39 -0
- package/dist-es/commands/DeleteGroupCommand.js +39 -0
- package/dist-es/commands/DisassociateResourceCommand.js +39 -0
- package/dist-es/commands/GetGroupCommand.js +39 -0
- package/dist-es/commands/ListAssociatedGroupsCommand.js +39 -0
- package/dist-es/commands/ListGroupResourcesCommand.js +39 -0
- package/dist-es/commands/ListGroupsCommand.js +39 -0
- package/dist-es/commands/index.js +8 -0
- package/dist-es/models/models_0.js +189 -52
- package/dist-es/pagination/ListAssociatedGroupsPaginator.js +75 -0
- package/dist-es/pagination/ListGroupResourcesPaginator.js +75 -0
- package/dist-es/pagination/ListGroupsPaginator.js +75 -0
- package/dist-es/pagination/index.js +3 -0
- package/dist-es/protocols/Aws_restJson1.js +1116 -253
- package/dist-types/Synthetics.d.ts +90 -11
- package/dist-types/SyntheticsClient.d.ts +10 -2
- package/dist-types/commands/AssociateResourceCommand.d.ts +38 -0
- package/dist-types/commands/CreateCanaryCommand.d.ts +1 -1
- package/dist-types/commands/CreateGroupCommand.d.ts +47 -0
- package/dist-types/commands/DeleteCanaryCommand.d.ts +1 -1
- package/dist-types/commands/DeleteGroupCommand.d.ts +39 -0
- package/dist-types/commands/DisassociateResourceCommand.d.ts +35 -0
- package/dist-types/commands/GetGroupCommand.d.ts +36 -0
- package/dist-types/commands/ListAssociatedGroupsCommand.d.ts +36 -0
- package/dist-types/commands/ListGroupResourcesCommand.d.ts +35 -0
- package/dist-types/commands/ListGroupsCommand.d.ts +36 -0
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/StopCanaryCommand.d.ts +1 -2
- package/dist-types/commands/TagResourceCommand.d.ts +6 -4
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateCanaryCommand.d.ts +1 -1
- package/dist-types/commands/index.d.ts +8 -0
- package/dist-types/models/models_0.d.ts +450 -52
- package/dist-types/pagination/ListAssociatedGroupsPaginator.d.ts +4 -0
- package/dist-types/pagination/ListGroupResourcesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListGroupsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +3 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +24 -0
- package/dist-types/ts3.4/Synthetics.d.ts +40 -0
- package/dist-types/ts3.4/SyntheticsClient.d.ts +10 -2
- package/dist-types/ts3.4/commands/AssociateResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/CreateGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DisassociateResourceCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetGroupCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListAssociatedGroupsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListGroupResourcesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListGroupsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +8 -0
- package/dist-types/ts3.4/models/models_0.d.ts +243 -27
- package/dist-types/ts3.4/pagination/ListAssociatedGroupsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListGroupResourcesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListGroupsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +24 -0
- package/package.json +26 -26
|
@@ -1,10 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeAws_restJson1UpdateCanaryCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopCanaryCommand = exports.deserializeAws_restJson1StartCanaryCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1GetCanaryRunsCommand = exports.deserializeAws_restJson1GetCanaryCommand = exports.deserializeAws_restJson1DescribeRuntimeVersionsCommand = exports.deserializeAws_restJson1DescribeCanariesLastRunCommand = exports.deserializeAws_restJson1DescribeCanariesCommand = exports.deserializeAws_restJson1DeleteCanaryCommand = exports.deserializeAws_restJson1CreateCanaryCommand = exports.serializeAws_restJson1UpdateCanaryCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopCanaryCommand = exports.serializeAws_restJson1StartCanaryCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1GetCanaryRunsCommand = exports.serializeAws_restJson1GetCanaryCommand = exports.serializeAws_restJson1DescribeRuntimeVersionsCommand = exports.serializeAws_restJson1DescribeCanariesLastRunCommand = exports.serializeAws_restJson1DescribeCanariesCommand = exports.serializeAws_restJson1DeleteCanaryCommand = exports.serializeAws_restJson1CreateCanaryCommand = void 0;
|
|
3
|
+
exports.deserializeAws_restJson1UpdateCanaryCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopCanaryCommand = exports.deserializeAws_restJson1StartCanaryCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListGroupsCommand = exports.deserializeAws_restJson1ListGroupResourcesCommand = exports.deserializeAws_restJson1ListAssociatedGroupsCommand = exports.deserializeAws_restJson1GetGroupCommand = exports.deserializeAws_restJson1GetCanaryRunsCommand = exports.deserializeAws_restJson1GetCanaryCommand = exports.deserializeAws_restJson1DisassociateResourceCommand = exports.deserializeAws_restJson1DescribeRuntimeVersionsCommand = exports.deserializeAws_restJson1DescribeCanariesLastRunCommand = exports.deserializeAws_restJson1DescribeCanariesCommand = exports.deserializeAws_restJson1DeleteGroupCommand = exports.deserializeAws_restJson1DeleteCanaryCommand = exports.deserializeAws_restJson1CreateGroupCommand = exports.deserializeAws_restJson1CreateCanaryCommand = exports.deserializeAws_restJson1AssociateResourceCommand = exports.serializeAws_restJson1UpdateCanaryCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopCanaryCommand = exports.serializeAws_restJson1StartCanaryCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListGroupsCommand = exports.serializeAws_restJson1ListGroupResourcesCommand = exports.serializeAws_restJson1ListAssociatedGroupsCommand = exports.serializeAws_restJson1GetGroupCommand = exports.serializeAws_restJson1GetCanaryRunsCommand = exports.serializeAws_restJson1GetCanaryCommand = exports.serializeAws_restJson1DisassociateResourceCommand = exports.serializeAws_restJson1DescribeRuntimeVersionsCommand = exports.serializeAws_restJson1DescribeCanariesLastRunCommand = exports.serializeAws_restJson1DescribeCanariesCommand = exports.serializeAws_restJson1DeleteGroupCommand = exports.serializeAws_restJson1DeleteCanaryCommand = exports.serializeAws_restJson1CreateGroupCommand = exports.serializeAws_restJson1CreateCanaryCommand = exports.serializeAws_restJson1AssociateResourceCommand = void 0;
|
|
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 models_0_1 = require("../models/models_0");
|
|
7
7
|
const SyntheticsServiceException_1 = require("../models/SyntheticsServiceException");
|
|
8
|
+
const serializeAws_restJson1AssociateResourceCommand = async (input, context) => {
|
|
9
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
|
+
const headers = {
|
|
11
|
+
"content-type": "application/json",
|
|
12
|
+
};
|
|
13
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}/associate";
|
|
14
|
+
if (input.GroupIdentifier !== undefined) {
|
|
15
|
+
const labelValue = input.GroupIdentifier;
|
|
16
|
+
if (labelValue.length <= 0) {
|
|
17
|
+
throw new Error("Empty value provided for input HTTP label: GroupIdentifier.");
|
|
18
|
+
}
|
|
19
|
+
resolvedPath = resolvedPath.replace("{GroupIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
throw new Error("No value provided for input HTTP label: GroupIdentifier.");
|
|
23
|
+
}
|
|
24
|
+
let body;
|
|
25
|
+
body = JSON.stringify({
|
|
26
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
27
|
+
});
|
|
28
|
+
return new protocol_http_1.HttpRequest({
|
|
29
|
+
protocol,
|
|
30
|
+
hostname,
|
|
31
|
+
port,
|
|
32
|
+
method: "PATCH",
|
|
33
|
+
headers,
|
|
34
|
+
path: resolvedPath,
|
|
35
|
+
body,
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
exports.serializeAws_restJson1AssociateResourceCommand = serializeAws_restJson1AssociateResourceCommand;
|
|
8
39
|
const serializeAws_restJson1CreateCanaryCommand = async (input, context) => {
|
|
9
40
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
10
41
|
const headers = {
|
|
@@ -13,34 +44,24 @@ const serializeAws_restJson1CreateCanaryCommand = async (input, context) => {
|
|
|
13
44
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/canary";
|
|
14
45
|
let body;
|
|
15
46
|
body = JSON.stringify({
|
|
16
|
-
...(input.ArtifactConfig
|
|
17
|
-
input.ArtifactConfig !== null && {
|
|
47
|
+
...(input.ArtifactConfig != null && {
|
|
18
48
|
ArtifactConfig: serializeAws_restJson1ArtifactConfigInput(input.ArtifactConfig, context),
|
|
19
49
|
}),
|
|
20
|
-
...(input.ArtifactS3Location
|
|
21
|
-
|
|
22
|
-
...(input.
|
|
23
|
-
|
|
24
|
-
...(input.ExecutionRoleArn !== undefined &&
|
|
25
|
-
input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
26
|
-
...(input.FailureRetentionPeriodInDays !== undefined &&
|
|
27
|
-
input.FailureRetentionPeriodInDays !== null && {
|
|
50
|
+
...(input.ArtifactS3Location != null && { ArtifactS3Location: input.ArtifactS3Location }),
|
|
51
|
+
...(input.Code != null && { Code: serializeAws_restJson1CanaryCodeInput(input.Code, context) }),
|
|
52
|
+
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
53
|
+
...(input.FailureRetentionPeriodInDays != null && {
|
|
28
54
|
FailureRetentionPeriodInDays: input.FailureRetentionPeriodInDays,
|
|
29
55
|
}),
|
|
30
|
-
...(input.Name
|
|
31
|
-
...(input.RunConfig
|
|
32
|
-
|
|
33
|
-
...(input.
|
|
34
|
-
|
|
35
|
-
...(input.Schedule !== undefined &&
|
|
36
|
-
input.Schedule !== null && { Schedule: serializeAws_restJson1CanaryScheduleInput(input.Schedule, context) }),
|
|
37
|
-
...(input.SuccessRetentionPeriodInDays !== undefined &&
|
|
38
|
-
input.SuccessRetentionPeriodInDays !== null && {
|
|
56
|
+
...(input.Name != null && { Name: input.Name }),
|
|
57
|
+
...(input.RunConfig != null && { RunConfig: serializeAws_restJson1CanaryRunConfigInput(input.RunConfig, context) }),
|
|
58
|
+
...(input.RuntimeVersion != null && { RuntimeVersion: input.RuntimeVersion }),
|
|
59
|
+
...(input.Schedule != null && { Schedule: serializeAws_restJson1CanaryScheduleInput(input.Schedule, context) }),
|
|
60
|
+
...(input.SuccessRetentionPeriodInDays != null && {
|
|
39
61
|
SuccessRetentionPeriodInDays: input.SuccessRetentionPeriodInDays,
|
|
40
62
|
}),
|
|
41
|
-
...(input.Tags
|
|
42
|
-
...(input.VpcConfig
|
|
43
|
-
input.VpcConfig !== null && { VpcConfig: serializeAws_restJson1VpcConfigInput(input.VpcConfig, context) }),
|
|
63
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
64
|
+
...(input.VpcConfig != null && { VpcConfig: serializeAws_restJson1VpcConfigInput(input.VpcConfig, context) }),
|
|
44
65
|
});
|
|
45
66
|
return new protocol_http_1.HttpRequest({
|
|
46
67
|
protocol,
|
|
@@ -53,6 +74,28 @@ const serializeAws_restJson1CreateCanaryCommand = async (input, context) => {
|
|
|
53
74
|
});
|
|
54
75
|
};
|
|
55
76
|
exports.serializeAws_restJson1CreateCanaryCommand = serializeAws_restJson1CreateCanaryCommand;
|
|
77
|
+
const serializeAws_restJson1CreateGroupCommand = async (input, context) => {
|
|
78
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
79
|
+
const headers = {
|
|
80
|
+
"content-type": "application/json",
|
|
81
|
+
};
|
|
82
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/group";
|
|
83
|
+
let body;
|
|
84
|
+
body = JSON.stringify({
|
|
85
|
+
...(input.Name != null && { Name: input.Name }),
|
|
86
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
87
|
+
});
|
|
88
|
+
return new protocol_http_1.HttpRequest({
|
|
89
|
+
protocol,
|
|
90
|
+
hostname,
|
|
91
|
+
port,
|
|
92
|
+
method: "POST",
|
|
93
|
+
headers,
|
|
94
|
+
path: resolvedPath,
|
|
95
|
+
body,
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
exports.serializeAws_restJson1CreateGroupCommand = serializeAws_restJson1CreateGroupCommand;
|
|
56
99
|
const serializeAws_restJson1DeleteCanaryCommand = async (input, context) => {
|
|
57
100
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
58
101
|
const headers = {};
|
|
@@ -83,6 +126,32 @@ const serializeAws_restJson1DeleteCanaryCommand = async (input, context) => {
|
|
|
83
126
|
});
|
|
84
127
|
};
|
|
85
128
|
exports.serializeAws_restJson1DeleteCanaryCommand = serializeAws_restJson1DeleteCanaryCommand;
|
|
129
|
+
const serializeAws_restJson1DeleteGroupCommand = async (input, context) => {
|
|
130
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
131
|
+
const headers = {};
|
|
132
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}";
|
|
133
|
+
if (input.GroupIdentifier !== undefined) {
|
|
134
|
+
const labelValue = input.GroupIdentifier;
|
|
135
|
+
if (labelValue.length <= 0) {
|
|
136
|
+
throw new Error("Empty value provided for input HTTP label: GroupIdentifier.");
|
|
137
|
+
}
|
|
138
|
+
resolvedPath = resolvedPath.replace("{GroupIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
throw new Error("No value provided for input HTTP label: GroupIdentifier.");
|
|
142
|
+
}
|
|
143
|
+
let body;
|
|
144
|
+
return new protocol_http_1.HttpRequest({
|
|
145
|
+
protocol,
|
|
146
|
+
hostname,
|
|
147
|
+
port,
|
|
148
|
+
method: "DELETE",
|
|
149
|
+
headers,
|
|
150
|
+
path: resolvedPath,
|
|
151
|
+
body,
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
exports.serializeAws_restJson1DeleteGroupCommand = serializeAws_restJson1DeleteGroupCommand;
|
|
86
155
|
const serializeAws_restJson1DescribeCanariesCommand = async (input, context) => {
|
|
87
156
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
88
157
|
const headers = {
|
|
@@ -91,10 +160,9 @@ const serializeAws_restJson1DescribeCanariesCommand = async (input, context) =>
|
|
|
91
160
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/canaries";
|
|
92
161
|
let body;
|
|
93
162
|
body = JSON.stringify({
|
|
94
|
-
...(input.MaxResults
|
|
95
|
-
...(input.Names
|
|
96
|
-
|
|
97
|
-
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
163
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
164
|
+
...(input.Names != null && { Names: serializeAws_restJson1DescribeCanariesNameFilter(input.Names, context) }),
|
|
165
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
98
166
|
});
|
|
99
167
|
return new protocol_http_1.HttpRequest({
|
|
100
168
|
protocol,
|
|
@@ -115,10 +183,11 @@ const serializeAws_restJson1DescribeCanariesLastRunCommand = async (input, conte
|
|
|
115
183
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/canaries/last-run";
|
|
116
184
|
let body;
|
|
117
185
|
body = JSON.stringify({
|
|
118
|
-
...(input.MaxResults
|
|
119
|
-
...(input.Names
|
|
120
|
-
|
|
121
|
-
|
|
186
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
187
|
+
...(input.Names != null && {
|
|
188
|
+
Names: serializeAws_restJson1DescribeCanariesLastRunNameFilter(input.Names, context),
|
|
189
|
+
}),
|
|
190
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
122
191
|
});
|
|
123
192
|
return new protocol_http_1.HttpRequest({
|
|
124
193
|
protocol,
|
|
@@ -139,8 +208,8 @@ const serializeAws_restJson1DescribeRuntimeVersionsCommand = async (input, conte
|
|
|
139
208
|
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/runtime-versions";
|
|
140
209
|
let body;
|
|
141
210
|
body = JSON.stringify({
|
|
142
|
-
...(input.MaxResults
|
|
143
|
-
...(input.NextToken
|
|
211
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
212
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
144
213
|
});
|
|
145
214
|
return new protocol_http_1.HttpRequest({
|
|
146
215
|
protocol,
|
|
@@ -153,6 +222,37 @@ const serializeAws_restJson1DescribeRuntimeVersionsCommand = async (input, conte
|
|
|
153
222
|
});
|
|
154
223
|
};
|
|
155
224
|
exports.serializeAws_restJson1DescribeRuntimeVersionsCommand = serializeAws_restJson1DescribeRuntimeVersionsCommand;
|
|
225
|
+
const serializeAws_restJson1DisassociateResourceCommand = async (input, context) => {
|
|
226
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
227
|
+
const headers = {
|
|
228
|
+
"content-type": "application/json",
|
|
229
|
+
};
|
|
230
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}/disassociate";
|
|
231
|
+
if (input.GroupIdentifier !== undefined) {
|
|
232
|
+
const labelValue = input.GroupIdentifier;
|
|
233
|
+
if (labelValue.length <= 0) {
|
|
234
|
+
throw new Error("Empty value provided for input HTTP label: GroupIdentifier.");
|
|
235
|
+
}
|
|
236
|
+
resolvedPath = resolvedPath.replace("{GroupIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
throw new Error("No value provided for input HTTP label: GroupIdentifier.");
|
|
240
|
+
}
|
|
241
|
+
let body;
|
|
242
|
+
body = JSON.stringify({
|
|
243
|
+
...(input.ResourceArn != null && { ResourceArn: input.ResourceArn }),
|
|
244
|
+
});
|
|
245
|
+
return new protocol_http_1.HttpRequest({
|
|
246
|
+
protocol,
|
|
247
|
+
hostname,
|
|
248
|
+
port,
|
|
249
|
+
method: "PATCH",
|
|
250
|
+
headers,
|
|
251
|
+
path: resolvedPath,
|
|
252
|
+
body,
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
exports.serializeAws_restJson1DisassociateResourceCommand = serializeAws_restJson1DisassociateResourceCommand;
|
|
156
256
|
const serializeAws_restJson1GetCanaryCommand = async (input, context) => {
|
|
157
257
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
158
258
|
const headers = {};
|
|
@@ -197,8 +297,8 @@ const serializeAws_restJson1GetCanaryRunsCommand = async (input, context) => {
|
|
|
197
297
|
}
|
|
198
298
|
let body;
|
|
199
299
|
body = JSON.stringify({
|
|
200
|
-
...(input.MaxResults
|
|
201
|
-
...(input.NextToken
|
|
300
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
301
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
202
302
|
});
|
|
203
303
|
return new protocol_http_1.HttpRequest({
|
|
204
304
|
protocol,
|
|
@@ -211,6 +311,118 @@ const serializeAws_restJson1GetCanaryRunsCommand = async (input, context) => {
|
|
|
211
311
|
});
|
|
212
312
|
};
|
|
213
313
|
exports.serializeAws_restJson1GetCanaryRunsCommand = serializeAws_restJson1GetCanaryRunsCommand;
|
|
314
|
+
const serializeAws_restJson1GetGroupCommand = async (input, context) => {
|
|
315
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
316
|
+
const headers = {};
|
|
317
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}";
|
|
318
|
+
if (input.GroupIdentifier !== undefined) {
|
|
319
|
+
const labelValue = input.GroupIdentifier;
|
|
320
|
+
if (labelValue.length <= 0) {
|
|
321
|
+
throw new Error("Empty value provided for input HTTP label: GroupIdentifier.");
|
|
322
|
+
}
|
|
323
|
+
resolvedPath = resolvedPath.replace("{GroupIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
throw new Error("No value provided for input HTTP label: GroupIdentifier.");
|
|
327
|
+
}
|
|
328
|
+
let body;
|
|
329
|
+
return new protocol_http_1.HttpRequest({
|
|
330
|
+
protocol,
|
|
331
|
+
hostname,
|
|
332
|
+
port,
|
|
333
|
+
method: "GET",
|
|
334
|
+
headers,
|
|
335
|
+
path: resolvedPath,
|
|
336
|
+
body,
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
exports.serializeAws_restJson1GetGroupCommand = serializeAws_restJson1GetGroupCommand;
|
|
340
|
+
const serializeAws_restJson1ListAssociatedGroupsCommand = async (input, context) => {
|
|
341
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
342
|
+
const headers = {
|
|
343
|
+
"content-type": "application/json",
|
|
344
|
+
};
|
|
345
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/resource/{ResourceArn}/groups";
|
|
346
|
+
if (input.ResourceArn !== undefined) {
|
|
347
|
+
const labelValue = input.ResourceArn;
|
|
348
|
+
if (labelValue.length <= 0) {
|
|
349
|
+
throw new Error("Empty value provided for input HTTP label: ResourceArn.");
|
|
350
|
+
}
|
|
351
|
+
resolvedPath = resolvedPath.replace("{ResourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
throw new Error("No value provided for input HTTP label: ResourceArn.");
|
|
355
|
+
}
|
|
356
|
+
let body;
|
|
357
|
+
body = JSON.stringify({
|
|
358
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
359
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
360
|
+
});
|
|
361
|
+
return new protocol_http_1.HttpRequest({
|
|
362
|
+
protocol,
|
|
363
|
+
hostname,
|
|
364
|
+
port,
|
|
365
|
+
method: "POST",
|
|
366
|
+
headers,
|
|
367
|
+
path: resolvedPath,
|
|
368
|
+
body,
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
exports.serializeAws_restJson1ListAssociatedGroupsCommand = serializeAws_restJson1ListAssociatedGroupsCommand;
|
|
372
|
+
const serializeAws_restJson1ListGroupResourcesCommand = async (input, context) => {
|
|
373
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
374
|
+
const headers = {
|
|
375
|
+
"content-type": "application/json",
|
|
376
|
+
};
|
|
377
|
+
let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/group/{GroupIdentifier}/resources";
|
|
378
|
+
if (input.GroupIdentifier !== undefined) {
|
|
379
|
+
const labelValue = input.GroupIdentifier;
|
|
380
|
+
if (labelValue.length <= 0) {
|
|
381
|
+
throw new Error("Empty value provided for input HTTP label: GroupIdentifier.");
|
|
382
|
+
}
|
|
383
|
+
resolvedPath = resolvedPath.replace("{GroupIdentifier}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
|
|
384
|
+
}
|
|
385
|
+
else {
|
|
386
|
+
throw new Error("No value provided for input HTTP label: GroupIdentifier.");
|
|
387
|
+
}
|
|
388
|
+
let body;
|
|
389
|
+
body = JSON.stringify({
|
|
390
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
391
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
392
|
+
});
|
|
393
|
+
return new protocol_http_1.HttpRequest({
|
|
394
|
+
protocol,
|
|
395
|
+
hostname,
|
|
396
|
+
port,
|
|
397
|
+
method: "POST",
|
|
398
|
+
headers,
|
|
399
|
+
path: resolvedPath,
|
|
400
|
+
body,
|
|
401
|
+
});
|
|
402
|
+
};
|
|
403
|
+
exports.serializeAws_restJson1ListGroupResourcesCommand = serializeAws_restJson1ListGroupResourcesCommand;
|
|
404
|
+
const serializeAws_restJson1ListGroupsCommand = async (input, context) => {
|
|
405
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
406
|
+
const headers = {
|
|
407
|
+
"content-type": "application/json",
|
|
408
|
+
};
|
|
409
|
+
const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/groups";
|
|
410
|
+
let body;
|
|
411
|
+
body = JSON.stringify({
|
|
412
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
413
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
414
|
+
});
|
|
415
|
+
return new protocol_http_1.HttpRequest({
|
|
416
|
+
protocol,
|
|
417
|
+
hostname,
|
|
418
|
+
port,
|
|
419
|
+
method: "POST",
|
|
420
|
+
headers,
|
|
421
|
+
path: resolvedPath,
|
|
422
|
+
body,
|
|
423
|
+
});
|
|
424
|
+
};
|
|
425
|
+
exports.serializeAws_restJson1ListGroupsCommand = serializeAws_restJson1ListGroupsCommand;
|
|
214
426
|
const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
215
427
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
216
428
|
const headers = {};
|
|
@@ -307,7 +519,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
|
307
519
|
}
|
|
308
520
|
let body;
|
|
309
521
|
body = JSON.stringify({
|
|
310
|
-
...(input.Tags
|
|
522
|
+
...(input.Tags != null && { Tags: serializeAws_restJson1TagMap(input.Tags, context) }),
|
|
311
523
|
});
|
|
312
524
|
return new protocol_http_1.HttpRequest({
|
|
313
525
|
protocol,
|
|
@@ -368,36 +580,25 @@ const serializeAws_restJson1UpdateCanaryCommand = async (input, context) => {
|
|
|
368
580
|
}
|
|
369
581
|
let body;
|
|
370
582
|
body = JSON.stringify({
|
|
371
|
-
...(input.ArtifactConfig
|
|
372
|
-
input.ArtifactConfig !== null && {
|
|
583
|
+
...(input.ArtifactConfig != null && {
|
|
373
584
|
ArtifactConfig: serializeAws_restJson1ArtifactConfigInput(input.ArtifactConfig, context),
|
|
374
585
|
}),
|
|
375
|
-
...(input.ArtifactS3Location
|
|
376
|
-
|
|
377
|
-
...(input.
|
|
378
|
-
|
|
379
|
-
...(input.ExecutionRoleArn !== undefined &&
|
|
380
|
-
input.ExecutionRoleArn !== null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
381
|
-
...(input.FailureRetentionPeriodInDays !== undefined &&
|
|
382
|
-
input.FailureRetentionPeriodInDays !== null && {
|
|
586
|
+
...(input.ArtifactS3Location != null && { ArtifactS3Location: input.ArtifactS3Location }),
|
|
587
|
+
...(input.Code != null && { Code: serializeAws_restJson1CanaryCodeInput(input.Code, context) }),
|
|
588
|
+
...(input.ExecutionRoleArn != null && { ExecutionRoleArn: input.ExecutionRoleArn }),
|
|
589
|
+
...(input.FailureRetentionPeriodInDays != null && {
|
|
383
590
|
FailureRetentionPeriodInDays: input.FailureRetentionPeriodInDays,
|
|
384
591
|
}),
|
|
385
|
-
...(input.RunConfig
|
|
386
|
-
|
|
387
|
-
...(input.
|
|
388
|
-
|
|
389
|
-
...(input.Schedule !== undefined &&
|
|
390
|
-
input.Schedule !== null && { Schedule: serializeAws_restJson1CanaryScheduleInput(input.Schedule, context) }),
|
|
391
|
-
...(input.SuccessRetentionPeriodInDays !== undefined &&
|
|
392
|
-
input.SuccessRetentionPeriodInDays !== null && {
|
|
592
|
+
...(input.RunConfig != null && { RunConfig: serializeAws_restJson1CanaryRunConfigInput(input.RunConfig, context) }),
|
|
593
|
+
...(input.RuntimeVersion != null && { RuntimeVersion: input.RuntimeVersion }),
|
|
594
|
+
...(input.Schedule != null && { Schedule: serializeAws_restJson1CanaryScheduleInput(input.Schedule, context) }),
|
|
595
|
+
...(input.SuccessRetentionPeriodInDays != null && {
|
|
393
596
|
SuccessRetentionPeriodInDays: input.SuccessRetentionPeriodInDays,
|
|
394
597
|
}),
|
|
395
|
-
...(input.VisualReference
|
|
396
|
-
input.VisualReference !== null && {
|
|
598
|
+
...(input.VisualReference != null && {
|
|
397
599
|
VisualReference: serializeAws_restJson1VisualReferenceInput(input.VisualReference, context),
|
|
398
600
|
}),
|
|
399
|
-
...(input.VpcConfig
|
|
400
|
-
input.VpcConfig !== null && { VpcConfig: serializeAws_restJson1VpcConfigInput(input.VpcConfig, context) }),
|
|
601
|
+
...(input.VpcConfig != null && { VpcConfig: serializeAws_restJson1VpcConfigInput(input.VpcConfig, context) }),
|
|
401
602
|
});
|
|
402
603
|
return new protocol_http_1.HttpRequest({
|
|
403
604
|
protocol,
|
|
@@ -410,6 +611,52 @@ const serializeAws_restJson1UpdateCanaryCommand = async (input, context) => {
|
|
|
410
611
|
});
|
|
411
612
|
};
|
|
412
613
|
exports.serializeAws_restJson1UpdateCanaryCommand = serializeAws_restJson1UpdateCanaryCommand;
|
|
614
|
+
const deserializeAws_restJson1AssociateResourceCommand = async (output, context) => {
|
|
615
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
616
|
+
return deserializeAws_restJson1AssociateResourceCommandError(output, context);
|
|
617
|
+
}
|
|
618
|
+
const contents = {
|
|
619
|
+
$metadata: deserializeMetadata(output),
|
|
620
|
+
};
|
|
621
|
+
await collectBody(output.body, context);
|
|
622
|
+
return Promise.resolve(contents);
|
|
623
|
+
};
|
|
624
|
+
exports.deserializeAws_restJson1AssociateResourceCommand = deserializeAws_restJson1AssociateResourceCommand;
|
|
625
|
+
const deserializeAws_restJson1AssociateResourceCommandError = async (output, context) => {
|
|
626
|
+
const parsedOutput = {
|
|
627
|
+
...output,
|
|
628
|
+
body: await parseBody(output.body, context),
|
|
629
|
+
};
|
|
630
|
+
let response;
|
|
631
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
632
|
+
switch (errorCode) {
|
|
633
|
+
case "ConflictException":
|
|
634
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
635
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
636
|
+
case "InternalServerException":
|
|
637
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
638
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
639
|
+
case "ResourceNotFoundException":
|
|
640
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
641
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
642
|
+
case "ServiceQuotaExceededException":
|
|
643
|
+
case "com.amazonaws.synthetics#ServiceQuotaExceededException":
|
|
644
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
645
|
+
case "ValidationException":
|
|
646
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
647
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
648
|
+
default:
|
|
649
|
+
const parsedBody = parsedOutput.body;
|
|
650
|
+
const $metadata = deserializeMetadata(output);
|
|
651
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
652
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
653
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
654
|
+
$fault: "client",
|
|
655
|
+
$metadata,
|
|
656
|
+
});
|
|
657
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
658
|
+
}
|
|
659
|
+
};
|
|
413
660
|
const deserializeAws_restJson1CreateCanaryCommand = async (output, context) => {
|
|
414
661
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
415
662
|
return deserializeAws_restJson1CreateCanaryCommandError(output, context);
|
|
@@ -424,38 +671,307 @@ const deserializeAws_restJson1CreateCanaryCommand = async (output, context) => {
|
|
|
424
671
|
}
|
|
425
672
|
return Promise.resolve(contents);
|
|
426
673
|
};
|
|
427
|
-
exports.deserializeAws_restJson1CreateCanaryCommand = deserializeAws_restJson1CreateCanaryCommand;
|
|
428
|
-
const deserializeAws_restJson1CreateCanaryCommandError = async (output, context) => {
|
|
674
|
+
exports.deserializeAws_restJson1CreateCanaryCommand = deserializeAws_restJson1CreateCanaryCommand;
|
|
675
|
+
const deserializeAws_restJson1CreateCanaryCommandError = async (output, context) => {
|
|
676
|
+
const parsedOutput = {
|
|
677
|
+
...output,
|
|
678
|
+
body: await parseBody(output.body, context),
|
|
679
|
+
};
|
|
680
|
+
let response;
|
|
681
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
682
|
+
switch (errorCode) {
|
|
683
|
+
case "InternalServerException":
|
|
684
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
685
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
686
|
+
case "RequestEntityTooLargeException":
|
|
687
|
+
case "com.amazonaws.synthetics#RequestEntityTooLargeException":
|
|
688
|
+
throw await deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context);
|
|
689
|
+
case "ValidationException":
|
|
690
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
691
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
692
|
+
default:
|
|
693
|
+
const parsedBody = parsedOutput.body;
|
|
694
|
+
const $metadata = deserializeMetadata(output);
|
|
695
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
696
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
697
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
698
|
+
$fault: "client",
|
|
699
|
+
$metadata,
|
|
700
|
+
});
|
|
701
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
const deserializeAws_restJson1CreateGroupCommand = async (output, context) => {
|
|
705
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
706
|
+
return deserializeAws_restJson1CreateGroupCommandError(output, context);
|
|
707
|
+
}
|
|
708
|
+
const contents = {
|
|
709
|
+
$metadata: deserializeMetadata(output),
|
|
710
|
+
Group: undefined,
|
|
711
|
+
};
|
|
712
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
713
|
+
if (data.Group !== undefined && data.Group !== null) {
|
|
714
|
+
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
715
|
+
}
|
|
716
|
+
return Promise.resolve(contents);
|
|
717
|
+
};
|
|
718
|
+
exports.deserializeAws_restJson1CreateGroupCommand = deserializeAws_restJson1CreateGroupCommand;
|
|
719
|
+
const deserializeAws_restJson1CreateGroupCommandError = async (output, context) => {
|
|
720
|
+
const parsedOutput = {
|
|
721
|
+
...output,
|
|
722
|
+
body: await parseBody(output.body, context),
|
|
723
|
+
};
|
|
724
|
+
let response;
|
|
725
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
726
|
+
switch (errorCode) {
|
|
727
|
+
case "ConflictException":
|
|
728
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
729
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
730
|
+
case "InternalServerException":
|
|
731
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
732
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
733
|
+
case "ServiceQuotaExceededException":
|
|
734
|
+
case "com.amazonaws.synthetics#ServiceQuotaExceededException":
|
|
735
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
736
|
+
case "ValidationException":
|
|
737
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
738
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
739
|
+
default:
|
|
740
|
+
const parsedBody = parsedOutput.body;
|
|
741
|
+
const $metadata = deserializeMetadata(output);
|
|
742
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
743
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
744
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
745
|
+
$fault: "client",
|
|
746
|
+
$metadata,
|
|
747
|
+
});
|
|
748
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
749
|
+
}
|
|
750
|
+
};
|
|
751
|
+
const deserializeAws_restJson1DeleteCanaryCommand = async (output, context) => {
|
|
752
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
753
|
+
return deserializeAws_restJson1DeleteCanaryCommandError(output, context);
|
|
754
|
+
}
|
|
755
|
+
const contents = {
|
|
756
|
+
$metadata: deserializeMetadata(output),
|
|
757
|
+
};
|
|
758
|
+
await collectBody(output.body, context);
|
|
759
|
+
return Promise.resolve(contents);
|
|
760
|
+
};
|
|
761
|
+
exports.deserializeAws_restJson1DeleteCanaryCommand = deserializeAws_restJson1DeleteCanaryCommand;
|
|
762
|
+
const deserializeAws_restJson1DeleteCanaryCommandError = async (output, context) => {
|
|
763
|
+
const parsedOutput = {
|
|
764
|
+
...output,
|
|
765
|
+
body: await parseBody(output.body, context),
|
|
766
|
+
};
|
|
767
|
+
let response;
|
|
768
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
769
|
+
switch (errorCode) {
|
|
770
|
+
case "ConflictException":
|
|
771
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
772
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
773
|
+
case "InternalServerException":
|
|
774
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
775
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
776
|
+
case "ResourceNotFoundException":
|
|
777
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
778
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
779
|
+
case "ValidationException":
|
|
780
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
781
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
782
|
+
default:
|
|
783
|
+
const parsedBody = parsedOutput.body;
|
|
784
|
+
const $metadata = deserializeMetadata(output);
|
|
785
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
786
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
787
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
788
|
+
$fault: "client",
|
|
789
|
+
$metadata,
|
|
790
|
+
});
|
|
791
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
792
|
+
}
|
|
793
|
+
};
|
|
794
|
+
const deserializeAws_restJson1DeleteGroupCommand = async (output, context) => {
|
|
795
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
796
|
+
return deserializeAws_restJson1DeleteGroupCommandError(output, context);
|
|
797
|
+
}
|
|
798
|
+
const contents = {
|
|
799
|
+
$metadata: deserializeMetadata(output),
|
|
800
|
+
};
|
|
801
|
+
await collectBody(output.body, context);
|
|
802
|
+
return Promise.resolve(contents);
|
|
803
|
+
};
|
|
804
|
+
exports.deserializeAws_restJson1DeleteGroupCommand = deserializeAws_restJson1DeleteGroupCommand;
|
|
805
|
+
const deserializeAws_restJson1DeleteGroupCommandError = async (output, context) => {
|
|
806
|
+
const parsedOutput = {
|
|
807
|
+
...output,
|
|
808
|
+
body: await parseBody(output.body, context),
|
|
809
|
+
};
|
|
810
|
+
let response;
|
|
811
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
812
|
+
switch (errorCode) {
|
|
813
|
+
case "ConflictException":
|
|
814
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
815
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
816
|
+
case "InternalServerException":
|
|
817
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
818
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
819
|
+
case "ResourceNotFoundException":
|
|
820
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
821
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
822
|
+
case "ValidationException":
|
|
823
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
824
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
825
|
+
default:
|
|
826
|
+
const parsedBody = parsedOutput.body;
|
|
827
|
+
const $metadata = deserializeMetadata(output);
|
|
828
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
829
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
830
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
831
|
+
$fault: "client",
|
|
832
|
+
$metadata,
|
|
833
|
+
});
|
|
834
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
const deserializeAws_restJson1DescribeCanariesCommand = async (output, context) => {
|
|
838
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
839
|
+
return deserializeAws_restJson1DescribeCanariesCommandError(output, context);
|
|
840
|
+
}
|
|
841
|
+
const contents = {
|
|
842
|
+
$metadata: deserializeMetadata(output),
|
|
843
|
+
Canaries: undefined,
|
|
844
|
+
NextToken: undefined,
|
|
845
|
+
};
|
|
846
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
847
|
+
if (data.Canaries !== undefined && data.Canaries !== null) {
|
|
848
|
+
contents.Canaries = deserializeAws_restJson1Canaries(data.Canaries, context);
|
|
849
|
+
}
|
|
850
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
851
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
852
|
+
}
|
|
853
|
+
return Promise.resolve(contents);
|
|
854
|
+
};
|
|
855
|
+
exports.deserializeAws_restJson1DescribeCanariesCommand = deserializeAws_restJson1DescribeCanariesCommand;
|
|
856
|
+
const deserializeAws_restJson1DescribeCanariesCommandError = async (output, context) => {
|
|
857
|
+
const parsedOutput = {
|
|
858
|
+
...output,
|
|
859
|
+
body: await parseBody(output.body, context),
|
|
860
|
+
};
|
|
861
|
+
let response;
|
|
862
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
863
|
+
switch (errorCode) {
|
|
864
|
+
case "InternalServerException":
|
|
865
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
866
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
867
|
+
case "ValidationException":
|
|
868
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
869
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
870
|
+
default:
|
|
871
|
+
const parsedBody = parsedOutput.body;
|
|
872
|
+
const $metadata = deserializeMetadata(output);
|
|
873
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
874
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
875
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
876
|
+
$fault: "client",
|
|
877
|
+
$metadata,
|
|
878
|
+
});
|
|
879
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
880
|
+
}
|
|
881
|
+
};
|
|
882
|
+
const deserializeAws_restJson1DescribeCanariesLastRunCommand = async (output, context) => {
|
|
883
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
884
|
+
return deserializeAws_restJson1DescribeCanariesLastRunCommandError(output, context);
|
|
885
|
+
}
|
|
886
|
+
const contents = {
|
|
887
|
+
$metadata: deserializeMetadata(output),
|
|
888
|
+
CanariesLastRun: undefined,
|
|
889
|
+
NextToken: undefined,
|
|
890
|
+
};
|
|
891
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
892
|
+
if (data.CanariesLastRun !== undefined && data.CanariesLastRun !== null) {
|
|
893
|
+
contents.CanariesLastRun = deserializeAws_restJson1CanariesLastRun(data.CanariesLastRun, context);
|
|
894
|
+
}
|
|
895
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
896
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
897
|
+
}
|
|
898
|
+
return Promise.resolve(contents);
|
|
899
|
+
};
|
|
900
|
+
exports.deserializeAws_restJson1DescribeCanariesLastRunCommand = deserializeAws_restJson1DescribeCanariesLastRunCommand;
|
|
901
|
+
const deserializeAws_restJson1DescribeCanariesLastRunCommandError = async (output, context) => {
|
|
902
|
+
const parsedOutput = {
|
|
903
|
+
...output,
|
|
904
|
+
body: await parseBody(output.body, context),
|
|
905
|
+
};
|
|
906
|
+
let response;
|
|
907
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
908
|
+
switch (errorCode) {
|
|
909
|
+
case "InternalServerException":
|
|
910
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
911
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
912
|
+
case "ValidationException":
|
|
913
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
914
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
915
|
+
default:
|
|
916
|
+
const parsedBody = parsedOutput.body;
|
|
917
|
+
const $metadata = deserializeMetadata(output);
|
|
918
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
919
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
920
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
921
|
+
$fault: "client",
|
|
922
|
+
$metadata,
|
|
923
|
+
});
|
|
924
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
const deserializeAws_restJson1DescribeRuntimeVersionsCommand = async (output, context) => {
|
|
928
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
929
|
+
return deserializeAws_restJson1DescribeRuntimeVersionsCommandError(output, context);
|
|
930
|
+
}
|
|
931
|
+
const contents = {
|
|
932
|
+
$metadata: deserializeMetadata(output),
|
|
933
|
+
NextToken: undefined,
|
|
934
|
+
RuntimeVersions: undefined,
|
|
935
|
+
};
|
|
936
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
937
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
938
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
939
|
+
}
|
|
940
|
+
if (data.RuntimeVersions !== undefined && data.RuntimeVersions !== null) {
|
|
941
|
+
contents.RuntimeVersions = deserializeAws_restJson1RuntimeVersionList(data.RuntimeVersions, context);
|
|
942
|
+
}
|
|
943
|
+
return Promise.resolve(contents);
|
|
944
|
+
};
|
|
945
|
+
exports.deserializeAws_restJson1DescribeRuntimeVersionsCommand = deserializeAws_restJson1DescribeRuntimeVersionsCommand;
|
|
946
|
+
const deserializeAws_restJson1DescribeRuntimeVersionsCommandError = async (output, context) => {
|
|
429
947
|
const parsedOutput = {
|
|
430
948
|
...output,
|
|
431
949
|
body: await parseBody(output.body, context),
|
|
432
950
|
};
|
|
433
951
|
let response;
|
|
434
|
-
|
|
435
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
952
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
436
953
|
switch (errorCode) {
|
|
437
954
|
case "InternalServerException":
|
|
438
955
|
case "com.amazonaws.synthetics#InternalServerException":
|
|
439
956
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
440
|
-
case "RequestEntityTooLargeException":
|
|
441
|
-
case "com.amazonaws.synthetics#RequestEntityTooLargeException":
|
|
442
|
-
throw await deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context);
|
|
443
957
|
case "ValidationException":
|
|
444
958
|
case "com.amazonaws.synthetics#ValidationException":
|
|
445
959
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
446
960
|
default:
|
|
447
961
|
const parsedBody = parsedOutput.body;
|
|
962
|
+
const $metadata = deserializeMetadata(output);
|
|
963
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
448
964
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
449
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
965
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
450
966
|
$fault: "client",
|
|
451
|
-
$metadata
|
|
967
|
+
$metadata,
|
|
452
968
|
});
|
|
453
969
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
454
970
|
}
|
|
455
971
|
};
|
|
456
|
-
const
|
|
972
|
+
const deserializeAws_restJson1DisassociateResourceCommand = async (output, context) => {
|
|
457
973
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
458
|
-
return
|
|
974
|
+
return deserializeAws_restJson1DisassociateResourceCommandError(output, context);
|
|
459
975
|
}
|
|
460
976
|
const contents = {
|
|
461
977
|
$metadata: deserializeMetadata(output),
|
|
@@ -463,15 +979,14 @@ const deserializeAws_restJson1DeleteCanaryCommand = async (output, context) => {
|
|
|
463
979
|
await collectBody(output.body, context);
|
|
464
980
|
return Promise.resolve(contents);
|
|
465
981
|
};
|
|
466
|
-
exports.
|
|
467
|
-
const
|
|
982
|
+
exports.deserializeAws_restJson1DisassociateResourceCommand = deserializeAws_restJson1DisassociateResourceCommand;
|
|
983
|
+
const deserializeAws_restJson1DisassociateResourceCommandError = async (output, context) => {
|
|
468
984
|
const parsedOutput = {
|
|
469
985
|
...output,
|
|
470
986
|
body: await parseBody(output.body, context),
|
|
471
987
|
};
|
|
472
988
|
let response;
|
|
473
|
-
|
|
474
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
989
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
475
990
|
switch (errorCode) {
|
|
476
991
|
case "ConflictException":
|
|
477
992
|
case "com.amazonaws.synthetics#ConflictException":
|
|
@@ -487,41 +1002,38 @@ const deserializeAws_restJson1DeleteCanaryCommandError = async (output, context)
|
|
|
487
1002
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
488
1003
|
default:
|
|
489
1004
|
const parsedBody = parsedOutput.body;
|
|
1005
|
+
const $metadata = deserializeMetadata(output);
|
|
1006
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
490
1007
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
491
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1008
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
492
1009
|
$fault: "client",
|
|
493
|
-
$metadata
|
|
1010
|
+
$metadata,
|
|
494
1011
|
});
|
|
495
1012
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
496
1013
|
}
|
|
497
1014
|
};
|
|
498
|
-
const
|
|
1015
|
+
const deserializeAws_restJson1GetCanaryCommand = async (output, context) => {
|
|
499
1016
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
500
|
-
return
|
|
1017
|
+
return deserializeAws_restJson1GetCanaryCommandError(output, context);
|
|
501
1018
|
}
|
|
502
1019
|
const contents = {
|
|
503
1020
|
$metadata: deserializeMetadata(output),
|
|
504
|
-
|
|
505
|
-
NextToken: undefined,
|
|
1021
|
+
Canary: undefined,
|
|
506
1022
|
};
|
|
507
1023
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
508
|
-
if (data.
|
|
509
|
-
contents.
|
|
510
|
-
}
|
|
511
|
-
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
512
|
-
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1024
|
+
if (data.Canary !== undefined && data.Canary !== null) {
|
|
1025
|
+
contents.Canary = deserializeAws_restJson1Canary(data.Canary, context);
|
|
513
1026
|
}
|
|
514
1027
|
return Promise.resolve(contents);
|
|
515
1028
|
};
|
|
516
|
-
exports.
|
|
517
|
-
const
|
|
1029
|
+
exports.deserializeAws_restJson1GetCanaryCommand = deserializeAws_restJson1GetCanaryCommand;
|
|
1030
|
+
const deserializeAws_restJson1GetCanaryCommandError = async (output, context) => {
|
|
518
1031
|
const parsedOutput = {
|
|
519
1032
|
...output,
|
|
520
1033
|
body: await parseBody(output.body, context),
|
|
521
1034
|
};
|
|
522
1035
|
let response;
|
|
523
|
-
|
|
524
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1036
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
525
1037
|
switch (errorCode) {
|
|
526
1038
|
case "InternalServerException":
|
|
527
1039
|
case "com.amazonaws.synthetics#InternalServerException":
|
|
@@ -531,185 +1043,251 @@ const deserializeAws_restJson1DescribeCanariesCommandError = async (output, cont
|
|
|
531
1043
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
532
1044
|
default:
|
|
533
1045
|
const parsedBody = parsedOutput.body;
|
|
1046
|
+
const $metadata = deserializeMetadata(output);
|
|
1047
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
534
1048
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
535
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1049
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
536
1050
|
$fault: "client",
|
|
537
|
-
$metadata
|
|
1051
|
+
$metadata,
|
|
538
1052
|
});
|
|
539
1053
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
540
1054
|
}
|
|
541
1055
|
};
|
|
542
|
-
const
|
|
1056
|
+
const deserializeAws_restJson1GetCanaryRunsCommand = async (output, context) => {
|
|
543
1057
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
544
|
-
return
|
|
1058
|
+
return deserializeAws_restJson1GetCanaryRunsCommandError(output, context);
|
|
545
1059
|
}
|
|
546
1060
|
const contents = {
|
|
547
1061
|
$metadata: deserializeMetadata(output),
|
|
548
|
-
|
|
1062
|
+
CanaryRuns: undefined,
|
|
549
1063
|
NextToken: undefined,
|
|
550
1064
|
};
|
|
551
1065
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
552
|
-
if (data.
|
|
553
|
-
contents.
|
|
1066
|
+
if (data.CanaryRuns !== undefined && data.CanaryRuns !== null) {
|
|
1067
|
+
contents.CanaryRuns = deserializeAws_restJson1CanaryRuns(data.CanaryRuns, context);
|
|
554
1068
|
}
|
|
555
1069
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
556
1070
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
557
1071
|
}
|
|
558
1072
|
return Promise.resolve(contents);
|
|
559
1073
|
};
|
|
560
|
-
exports.
|
|
561
|
-
const
|
|
1074
|
+
exports.deserializeAws_restJson1GetCanaryRunsCommand = deserializeAws_restJson1GetCanaryRunsCommand;
|
|
1075
|
+
const deserializeAws_restJson1GetCanaryRunsCommandError = async (output, context) => {
|
|
562
1076
|
const parsedOutput = {
|
|
563
1077
|
...output,
|
|
564
1078
|
body: await parseBody(output.body, context),
|
|
565
1079
|
};
|
|
566
1080
|
let response;
|
|
567
|
-
|
|
568
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1081
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
569
1082
|
switch (errorCode) {
|
|
570
1083
|
case "InternalServerException":
|
|
571
1084
|
case "com.amazonaws.synthetics#InternalServerException":
|
|
572
1085
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1086
|
+
case "ResourceNotFoundException":
|
|
1087
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
1088
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
573
1089
|
case "ValidationException":
|
|
574
1090
|
case "com.amazonaws.synthetics#ValidationException":
|
|
575
1091
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
576
1092
|
default:
|
|
577
1093
|
const parsedBody = parsedOutput.body;
|
|
1094
|
+
const $metadata = deserializeMetadata(output);
|
|
1095
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
578
1096
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
579
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1097
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
580
1098
|
$fault: "client",
|
|
581
|
-
$metadata
|
|
1099
|
+
$metadata,
|
|
582
1100
|
});
|
|
583
1101
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
584
1102
|
}
|
|
585
1103
|
};
|
|
586
|
-
const
|
|
1104
|
+
const deserializeAws_restJson1GetGroupCommand = async (output, context) => {
|
|
587
1105
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
588
|
-
return
|
|
1106
|
+
return deserializeAws_restJson1GetGroupCommandError(output, context);
|
|
1107
|
+
}
|
|
1108
|
+
const contents = {
|
|
1109
|
+
$metadata: deserializeMetadata(output),
|
|
1110
|
+
Group: undefined,
|
|
1111
|
+
};
|
|
1112
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1113
|
+
if (data.Group !== undefined && data.Group !== null) {
|
|
1114
|
+
contents.Group = deserializeAws_restJson1Group(data.Group, context);
|
|
1115
|
+
}
|
|
1116
|
+
return Promise.resolve(contents);
|
|
1117
|
+
};
|
|
1118
|
+
exports.deserializeAws_restJson1GetGroupCommand = deserializeAws_restJson1GetGroupCommand;
|
|
1119
|
+
const deserializeAws_restJson1GetGroupCommandError = async (output, context) => {
|
|
1120
|
+
const parsedOutput = {
|
|
1121
|
+
...output,
|
|
1122
|
+
body: await parseBody(output.body, context),
|
|
1123
|
+
};
|
|
1124
|
+
let response;
|
|
1125
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1126
|
+
switch (errorCode) {
|
|
1127
|
+
case "ConflictException":
|
|
1128
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
1129
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1130
|
+
case "InternalServerException":
|
|
1131
|
+
case "com.amazonaws.synthetics#InternalServerException":
|
|
1132
|
+
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1133
|
+
case "ResourceNotFoundException":
|
|
1134
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
1135
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
1136
|
+
case "ValidationException":
|
|
1137
|
+
case "com.amazonaws.synthetics#ValidationException":
|
|
1138
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
1139
|
+
default:
|
|
1140
|
+
const parsedBody = parsedOutput.body;
|
|
1141
|
+
const $metadata = deserializeMetadata(output);
|
|
1142
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
1143
|
+
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
1144
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
1145
|
+
$fault: "client",
|
|
1146
|
+
$metadata,
|
|
1147
|
+
});
|
|
1148
|
+
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
1149
|
+
}
|
|
1150
|
+
};
|
|
1151
|
+
const deserializeAws_restJson1ListAssociatedGroupsCommand = async (output, context) => {
|
|
1152
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1153
|
+
return deserializeAws_restJson1ListAssociatedGroupsCommandError(output, context);
|
|
589
1154
|
}
|
|
590
1155
|
const contents = {
|
|
591
1156
|
$metadata: deserializeMetadata(output),
|
|
1157
|
+
Groups: undefined,
|
|
592
1158
|
NextToken: undefined,
|
|
593
|
-
RuntimeVersions: undefined,
|
|
594
1159
|
};
|
|
595
1160
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1161
|
+
if (data.Groups !== undefined && data.Groups !== null) {
|
|
1162
|
+
contents.Groups = deserializeAws_restJson1GroupSummaryList(data.Groups, context);
|
|
1163
|
+
}
|
|
596
1164
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
597
1165
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
598
1166
|
}
|
|
599
|
-
if (data.RuntimeVersions !== undefined && data.RuntimeVersions !== null) {
|
|
600
|
-
contents.RuntimeVersions = deserializeAws_restJson1RuntimeVersionList(data.RuntimeVersions, context);
|
|
601
|
-
}
|
|
602
1167
|
return Promise.resolve(contents);
|
|
603
1168
|
};
|
|
604
|
-
exports.
|
|
605
|
-
const
|
|
1169
|
+
exports.deserializeAws_restJson1ListAssociatedGroupsCommand = deserializeAws_restJson1ListAssociatedGroupsCommand;
|
|
1170
|
+
const deserializeAws_restJson1ListAssociatedGroupsCommandError = async (output, context) => {
|
|
606
1171
|
const parsedOutput = {
|
|
607
1172
|
...output,
|
|
608
1173
|
body: await parseBody(output.body, context),
|
|
609
1174
|
};
|
|
610
1175
|
let response;
|
|
611
|
-
|
|
612
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1176
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
613
1177
|
switch (errorCode) {
|
|
614
1178
|
case "InternalServerException":
|
|
615
1179
|
case "com.amazonaws.synthetics#InternalServerException":
|
|
616
1180
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1181
|
+
case "ResourceNotFoundException":
|
|
1182
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
1183
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
617
1184
|
case "ValidationException":
|
|
618
1185
|
case "com.amazonaws.synthetics#ValidationException":
|
|
619
1186
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
620
1187
|
default:
|
|
621
1188
|
const parsedBody = parsedOutput.body;
|
|
1189
|
+
const $metadata = deserializeMetadata(output);
|
|
1190
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
622
1191
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
623
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1192
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
624
1193
|
$fault: "client",
|
|
625
|
-
$metadata
|
|
1194
|
+
$metadata,
|
|
626
1195
|
});
|
|
627
1196
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
628
1197
|
}
|
|
629
1198
|
};
|
|
630
|
-
const
|
|
1199
|
+
const deserializeAws_restJson1ListGroupResourcesCommand = async (output, context) => {
|
|
631
1200
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
632
|
-
return
|
|
1201
|
+
return deserializeAws_restJson1ListGroupResourcesCommandError(output, context);
|
|
633
1202
|
}
|
|
634
1203
|
const contents = {
|
|
635
1204
|
$metadata: deserializeMetadata(output),
|
|
636
|
-
|
|
1205
|
+
NextToken: undefined,
|
|
1206
|
+
Resources: undefined,
|
|
637
1207
|
};
|
|
638
1208
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
639
|
-
if (data.
|
|
640
|
-
contents.
|
|
1209
|
+
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
1210
|
+
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
1211
|
+
}
|
|
1212
|
+
if (data.Resources !== undefined && data.Resources !== null) {
|
|
1213
|
+
contents.Resources = deserializeAws_restJson1StringList(data.Resources, context);
|
|
641
1214
|
}
|
|
642
1215
|
return Promise.resolve(contents);
|
|
643
1216
|
};
|
|
644
|
-
exports.
|
|
645
|
-
const
|
|
1217
|
+
exports.deserializeAws_restJson1ListGroupResourcesCommand = deserializeAws_restJson1ListGroupResourcesCommand;
|
|
1218
|
+
const deserializeAws_restJson1ListGroupResourcesCommandError = async (output, context) => {
|
|
646
1219
|
const parsedOutput = {
|
|
647
1220
|
...output,
|
|
648
1221
|
body: await parseBody(output.body, context),
|
|
649
1222
|
};
|
|
650
1223
|
let response;
|
|
651
|
-
|
|
652
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1224
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
653
1225
|
switch (errorCode) {
|
|
1226
|
+
case "ConflictException":
|
|
1227
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
1228
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
654
1229
|
case "InternalServerException":
|
|
655
1230
|
case "com.amazonaws.synthetics#InternalServerException":
|
|
656
1231
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
1232
|
+
case "ResourceNotFoundException":
|
|
1233
|
+
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
1234
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
657
1235
|
case "ValidationException":
|
|
658
1236
|
case "com.amazonaws.synthetics#ValidationException":
|
|
659
1237
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
660
1238
|
default:
|
|
661
1239
|
const parsedBody = parsedOutput.body;
|
|
1240
|
+
const $metadata = deserializeMetadata(output);
|
|
1241
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
662
1242
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
663
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1243
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
664
1244
|
$fault: "client",
|
|
665
|
-
$metadata
|
|
1245
|
+
$metadata,
|
|
666
1246
|
});
|
|
667
1247
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
668
1248
|
}
|
|
669
1249
|
};
|
|
670
|
-
const
|
|
1250
|
+
const deserializeAws_restJson1ListGroupsCommand = async (output, context) => {
|
|
671
1251
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
672
|
-
return
|
|
1252
|
+
return deserializeAws_restJson1ListGroupsCommandError(output, context);
|
|
673
1253
|
}
|
|
674
1254
|
const contents = {
|
|
675
1255
|
$metadata: deserializeMetadata(output),
|
|
676
|
-
|
|
1256
|
+
Groups: undefined,
|
|
677
1257
|
NextToken: undefined,
|
|
678
1258
|
};
|
|
679
1259
|
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
680
|
-
if (data.
|
|
681
|
-
contents.
|
|
1260
|
+
if (data.Groups !== undefined && data.Groups !== null) {
|
|
1261
|
+
contents.Groups = deserializeAws_restJson1GroupSummaryList(data.Groups, context);
|
|
682
1262
|
}
|
|
683
1263
|
if (data.NextToken !== undefined && data.NextToken !== null) {
|
|
684
1264
|
contents.NextToken = (0, smithy_client_1.expectString)(data.NextToken);
|
|
685
1265
|
}
|
|
686
1266
|
return Promise.resolve(contents);
|
|
687
1267
|
};
|
|
688
|
-
exports.
|
|
689
|
-
const
|
|
1268
|
+
exports.deserializeAws_restJson1ListGroupsCommand = deserializeAws_restJson1ListGroupsCommand;
|
|
1269
|
+
const deserializeAws_restJson1ListGroupsCommandError = async (output, context) => {
|
|
690
1270
|
const parsedOutput = {
|
|
691
1271
|
...output,
|
|
692
1272
|
body: await parseBody(output.body, context),
|
|
693
1273
|
};
|
|
694
1274
|
let response;
|
|
695
|
-
|
|
696
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1275
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
697
1276
|
switch (errorCode) {
|
|
698
1277
|
case "InternalServerException":
|
|
699
1278
|
case "com.amazonaws.synthetics#InternalServerException":
|
|
700
1279
|
throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
|
|
701
|
-
case "ResourceNotFoundException":
|
|
702
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
703
|
-
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
704
1280
|
case "ValidationException":
|
|
705
1281
|
case "com.amazonaws.synthetics#ValidationException":
|
|
706
1282
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
707
1283
|
default:
|
|
708
1284
|
const parsedBody = parsedOutput.body;
|
|
1285
|
+
const $metadata = deserializeMetadata(output);
|
|
1286
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
709
1287
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
710
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1288
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
711
1289
|
$fault: "client",
|
|
712
|
-
$metadata
|
|
1290
|
+
$metadata,
|
|
713
1291
|
});
|
|
714
1292
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
715
1293
|
}
|
|
@@ -735,24 +1313,31 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
|
|
|
735
1313
|
body: await parseBody(output.body, context),
|
|
736
1314
|
};
|
|
737
1315
|
let response;
|
|
738
|
-
|
|
739
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1316
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
740
1317
|
switch (errorCode) {
|
|
741
|
-
case "
|
|
742
|
-
case "com.amazonaws.synthetics#
|
|
743
|
-
throw await
|
|
744
|
-
case "
|
|
745
|
-
case "com.amazonaws.synthetics#
|
|
746
|
-
throw await
|
|
747
|
-
case "
|
|
748
|
-
case "com.amazonaws.synthetics#
|
|
749
|
-
throw await
|
|
1318
|
+
case "BadRequestException":
|
|
1319
|
+
case "com.amazonaws.synthetics#BadRequestException":
|
|
1320
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1321
|
+
case "ConflictException":
|
|
1322
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
1323
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1324
|
+
case "InternalFailureException":
|
|
1325
|
+
case "com.amazonaws.synthetics#InternalFailureException":
|
|
1326
|
+
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
1327
|
+
case "NotFoundException":
|
|
1328
|
+
case "com.amazonaws.synthetics#NotFoundException":
|
|
1329
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1330
|
+
case "TooManyRequestsException":
|
|
1331
|
+
case "com.amazonaws.synthetics#TooManyRequestsException":
|
|
1332
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
750
1333
|
default:
|
|
751
1334
|
const parsedBody = parsedOutput.body;
|
|
1335
|
+
const $metadata = deserializeMetadata(output);
|
|
1336
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
752
1337
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
753
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1338
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
754
1339
|
$fault: "client",
|
|
755
|
-
$metadata
|
|
1340
|
+
$metadata,
|
|
756
1341
|
});
|
|
757
1342
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
758
1343
|
}
|
|
@@ -774,8 +1359,7 @@ const deserializeAws_restJson1StartCanaryCommandError = async (output, context)
|
|
|
774
1359
|
body: await parseBody(output.body, context),
|
|
775
1360
|
};
|
|
776
1361
|
let response;
|
|
777
|
-
|
|
778
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1362
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
779
1363
|
switch (errorCode) {
|
|
780
1364
|
case "ConflictException":
|
|
781
1365
|
case "com.amazonaws.synthetics#ConflictException":
|
|
@@ -791,10 +1375,12 @@ const deserializeAws_restJson1StartCanaryCommandError = async (output, context)
|
|
|
791
1375
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
792
1376
|
default:
|
|
793
1377
|
const parsedBody = parsedOutput.body;
|
|
1378
|
+
const $metadata = deserializeMetadata(output);
|
|
1379
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
794
1380
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
795
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1381
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
796
1382
|
$fault: "client",
|
|
797
|
-
$metadata
|
|
1383
|
+
$metadata,
|
|
798
1384
|
});
|
|
799
1385
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
800
1386
|
}
|
|
@@ -816,8 +1402,7 @@ const deserializeAws_restJson1StopCanaryCommandError = async (output, context) =
|
|
|
816
1402
|
body: await parseBody(output.body, context),
|
|
817
1403
|
};
|
|
818
1404
|
let response;
|
|
819
|
-
|
|
820
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1405
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
821
1406
|
switch (errorCode) {
|
|
822
1407
|
case "ConflictException":
|
|
823
1408
|
case "com.amazonaws.synthetics#ConflictException":
|
|
@@ -833,10 +1418,12 @@ const deserializeAws_restJson1StopCanaryCommandError = async (output, context) =
|
|
|
833
1418
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
834
1419
|
default:
|
|
835
1420
|
const parsedBody = parsedOutput.body;
|
|
1421
|
+
const $metadata = deserializeMetadata(output);
|
|
1422
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
836
1423
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
837
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1424
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
838
1425
|
$fault: "client",
|
|
839
|
-
$metadata
|
|
1426
|
+
$metadata,
|
|
840
1427
|
});
|
|
841
1428
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
842
1429
|
}
|
|
@@ -858,24 +1445,31 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
|
|
|
858
1445
|
body: await parseBody(output.body, context),
|
|
859
1446
|
};
|
|
860
1447
|
let response;
|
|
861
|
-
|
|
862
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1448
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
863
1449
|
switch (errorCode) {
|
|
864
|
-
case "
|
|
865
|
-
case "com.amazonaws.synthetics#
|
|
866
|
-
throw await
|
|
867
|
-
case "
|
|
868
|
-
case "com.amazonaws.synthetics#
|
|
869
|
-
throw await
|
|
870
|
-
case "
|
|
871
|
-
case "com.amazonaws.synthetics#
|
|
872
|
-
throw await
|
|
1450
|
+
case "BadRequestException":
|
|
1451
|
+
case "com.amazonaws.synthetics#BadRequestException":
|
|
1452
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1453
|
+
case "ConflictException":
|
|
1454
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
1455
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1456
|
+
case "InternalFailureException":
|
|
1457
|
+
case "com.amazonaws.synthetics#InternalFailureException":
|
|
1458
|
+
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
1459
|
+
case "NotFoundException":
|
|
1460
|
+
case "com.amazonaws.synthetics#NotFoundException":
|
|
1461
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1462
|
+
case "TooManyRequestsException":
|
|
1463
|
+
case "com.amazonaws.synthetics#TooManyRequestsException":
|
|
1464
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
873
1465
|
default:
|
|
874
1466
|
const parsedBody = parsedOutput.body;
|
|
1467
|
+
const $metadata = deserializeMetadata(output);
|
|
1468
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
875
1469
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
876
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1470
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
877
1471
|
$fault: "client",
|
|
878
|
-
$metadata
|
|
1472
|
+
$metadata,
|
|
879
1473
|
});
|
|
880
1474
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
881
1475
|
}
|
|
@@ -897,24 +1491,31 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
|
|
|
897
1491
|
body: await parseBody(output.body, context),
|
|
898
1492
|
};
|
|
899
1493
|
let response;
|
|
900
|
-
|
|
901
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1494
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
902
1495
|
switch (errorCode) {
|
|
903
|
-
case "
|
|
904
|
-
case "com.amazonaws.synthetics#
|
|
905
|
-
throw await
|
|
906
|
-
case "
|
|
907
|
-
case "com.amazonaws.synthetics#
|
|
908
|
-
throw await
|
|
909
|
-
case "
|
|
910
|
-
case "com.amazonaws.synthetics#
|
|
911
|
-
throw await
|
|
1496
|
+
case "BadRequestException":
|
|
1497
|
+
case "com.amazonaws.synthetics#BadRequestException":
|
|
1498
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1499
|
+
case "ConflictException":
|
|
1500
|
+
case "com.amazonaws.synthetics#ConflictException":
|
|
1501
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
1502
|
+
case "InternalFailureException":
|
|
1503
|
+
case "com.amazonaws.synthetics#InternalFailureException":
|
|
1504
|
+
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
1505
|
+
case "NotFoundException":
|
|
1506
|
+
case "com.amazonaws.synthetics#NotFoundException":
|
|
1507
|
+
throw await deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context);
|
|
1508
|
+
case "TooManyRequestsException":
|
|
1509
|
+
case "com.amazonaws.synthetics#TooManyRequestsException":
|
|
1510
|
+
throw await deserializeAws_restJson1TooManyRequestsExceptionResponse(parsedOutput, context);
|
|
912
1511
|
default:
|
|
913
1512
|
const parsedBody = parsedOutput.body;
|
|
1513
|
+
const $metadata = deserializeMetadata(output);
|
|
1514
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
914
1515
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
915
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1516
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
916
1517
|
$fault: "client",
|
|
917
|
-
$metadata
|
|
1518
|
+
$metadata,
|
|
918
1519
|
});
|
|
919
1520
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
920
1521
|
}
|
|
@@ -936,8 +1537,7 @@ const deserializeAws_restJson1UpdateCanaryCommandError = async (output, context)
|
|
|
936
1537
|
body: await parseBody(output.body, context),
|
|
937
1538
|
};
|
|
938
1539
|
let response;
|
|
939
|
-
|
|
940
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1540
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
941
1541
|
switch (errorCode) {
|
|
942
1542
|
case "ConflictException":
|
|
943
1543
|
case "com.amazonaws.synthetics#ConflictException":
|
|
@@ -956,14 +1556,28 @@ const deserializeAws_restJson1UpdateCanaryCommandError = async (output, context)
|
|
|
956
1556
|
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
957
1557
|
default:
|
|
958
1558
|
const parsedBody = parsedOutput.body;
|
|
1559
|
+
const $metadata = deserializeMetadata(output);
|
|
1560
|
+
const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
|
|
959
1561
|
response = new SyntheticsServiceException_1.SyntheticsServiceException({
|
|
960
|
-
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1562
|
+
name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
|
|
961
1563
|
$fault: "client",
|
|
962
|
-
$metadata
|
|
1564
|
+
$metadata,
|
|
963
1565
|
});
|
|
964
1566
|
throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
|
|
965
1567
|
}
|
|
966
1568
|
};
|
|
1569
|
+
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
1570
|
+
const contents = {};
|
|
1571
|
+
const data = parsedOutput.body;
|
|
1572
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
1573
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1574
|
+
}
|
|
1575
|
+
const exception = new models_0_1.BadRequestException({
|
|
1576
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1577
|
+
...contents,
|
|
1578
|
+
});
|
|
1579
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1580
|
+
};
|
|
967
1581
|
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
968
1582
|
const contents = {};
|
|
969
1583
|
const data = parsedOutput.body;
|
|
@@ -976,6 +1590,18 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
|
|
|
976
1590
|
});
|
|
977
1591
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
978
1592
|
};
|
|
1593
|
+
const deserializeAws_restJson1InternalFailureExceptionResponse = async (parsedOutput, context) => {
|
|
1594
|
+
const contents = {};
|
|
1595
|
+
const data = parsedOutput.body;
|
|
1596
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
1597
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1598
|
+
}
|
|
1599
|
+
const exception = new models_0_1.InternalFailureException({
|
|
1600
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1601
|
+
...contents,
|
|
1602
|
+
});
|
|
1603
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1604
|
+
};
|
|
979
1605
|
const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
980
1606
|
const contents = {};
|
|
981
1607
|
const data = parsedOutput.body;
|
|
@@ -988,6 +1614,18 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
|
|
|
988
1614
|
});
|
|
989
1615
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
990
1616
|
};
|
|
1617
|
+
const deserializeAws_restJson1NotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
1618
|
+
const contents = {};
|
|
1619
|
+
const data = parsedOutput.body;
|
|
1620
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
1621
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1622
|
+
}
|
|
1623
|
+
const exception = new models_0_1.NotFoundException({
|
|
1624
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1625
|
+
...contents,
|
|
1626
|
+
});
|
|
1627
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1628
|
+
};
|
|
991
1629
|
const deserializeAws_restJson1RequestEntityTooLargeExceptionResponse = async (parsedOutput, context) => {
|
|
992
1630
|
const contents = {};
|
|
993
1631
|
const data = parsedOutput.body;
|
|
@@ -1012,6 +1650,30 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
|
|
|
1012
1650
|
});
|
|
1013
1651
|
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1014
1652
|
};
|
|
1653
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1654
|
+
const contents = {};
|
|
1655
|
+
const data = parsedOutput.body;
|
|
1656
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
1657
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1658
|
+
}
|
|
1659
|
+
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1660
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1661
|
+
...contents,
|
|
1662
|
+
});
|
|
1663
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1664
|
+
};
|
|
1665
|
+
const deserializeAws_restJson1TooManyRequestsExceptionResponse = async (parsedOutput, context) => {
|
|
1666
|
+
const contents = {};
|
|
1667
|
+
const data = parsedOutput.body;
|
|
1668
|
+
if (data.Message !== undefined && data.Message !== null) {
|
|
1669
|
+
contents.Message = (0, smithy_client_1.expectString)(data.Message);
|
|
1670
|
+
}
|
|
1671
|
+
const exception = new models_0_1.TooManyRequestsException({
|
|
1672
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
1673
|
+
...contents,
|
|
1674
|
+
});
|
|
1675
|
+
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1676
|
+
};
|
|
1015
1677
|
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
1016
1678
|
const contents = {};
|
|
1017
1679
|
const data = parsedOutput.body;
|
|
@@ -1026,20 +1688,17 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
|
|
|
1026
1688
|
};
|
|
1027
1689
|
const serializeAws_restJson1ArtifactConfigInput = (input, context) => {
|
|
1028
1690
|
return {
|
|
1029
|
-
...(input.S3Encryption
|
|
1030
|
-
input.S3Encryption !== null && {
|
|
1691
|
+
...(input.S3Encryption != null && {
|
|
1031
1692
|
S3Encryption: serializeAws_restJson1S3EncryptionConfig(input.S3Encryption, context),
|
|
1032
1693
|
}),
|
|
1033
1694
|
};
|
|
1034
1695
|
};
|
|
1035
1696
|
const serializeAws_restJson1BaseScreenshot = (input, context) => {
|
|
1036
1697
|
return {
|
|
1037
|
-
...(input.IgnoreCoordinates
|
|
1038
|
-
input.IgnoreCoordinates !== null && {
|
|
1698
|
+
...(input.IgnoreCoordinates != null && {
|
|
1039
1699
|
IgnoreCoordinates: serializeAws_restJson1BaseScreenshotIgnoreCoordinates(input.IgnoreCoordinates, context),
|
|
1040
1700
|
}),
|
|
1041
|
-
...(input.ScreenshotName
|
|
1042
|
-
input.ScreenshotName !== null && { ScreenshotName: input.ScreenshotName }),
|
|
1701
|
+
...(input.ScreenshotName != null && { ScreenshotName: input.ScreenshotName }),
|
|
1043
1702
|
};
|
|
1044
1703
|
};
|
|
1045
1704
|
const serializeAws_restJson1BaseScreenshotIgnoreCoordinates = (input, context) => {
|
|
@@ -1064,30 +1723,27 @@ const serializeAws_restJson1BaseScreenshots = (input, context) => {
|
|
|
1064
1723
|
};
|
|
1065
1724
|
const serializeAws_restJson1CanaryCodeInput = (input, context) => {
|
|
1066
1725
|
return {
|
|
1067
|
-
...(input.Handler
|
|
1068
|
-
...(input.S3Bucket
|
|
1069
|
-
...(input.S3Key
|
|
1070
|
-
...(input.S3Version
|
|
1071
|
-
...(input.ZipFile
|
|
1726
|
+
...(input.Handler != null && { Handler: input.Handler }),
|
|
1727
|
+
...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
|
|
1728
|
+
...(input.S3Key != null && { S3Key: input.S3Key }),
|
|
1729
|
+
...(input.S3Version != null && { S3Version: input.S3Version }),
|
|
1730
|
+
...(input.ZipFile != null && { ZipFile: context.base64Encoder(input.ZipFile) }),
|
|
1072
1731
|
};
|
|
1073
1732
|
};
|
|
1074
1733
|
const serializeAws_restJson1CanaryRunConfigInput = (input, context) => {
|
|
1075
1734
|
return {
|
|
1076
|
-
...(input.ActiveTracing
|
|
1077
|
-
...(input.EnvironmentVariables
|
|
1078
|
-
input.EnvironmentVariables !== null && {
|
|
1735
|
+
...(input.ActiveTracing != null && { ActiveTracing: input.ActiveTracing }),
|
|
1736
|
+
...(input.EnvironmentVariables != null && {
|
|
1079
1737
|
EnvironmentVariables: serializeAws_restJson1EnvironmentVariablesMap(input.EnvironmentVariables, context),
|
|
1080
1738
|
}),
|
|
1081
|
-
...(input.MemoryInMB
|
|
1082
|
-
...(input.TimeoutInSeconds
|
|
1083
|
-
input.TimeoutInSeconds !== null && { TimeoutInSeconds: input.TimeoutInSeconds }),
|
|
1739
|
+
...(input.MemoryInMB != null && { MemoryInMB: input.MemoryInMB }),
|
|
1740
|
+
...(input.TimeoutInSeconds != null && { TimeoutInSeconds: input.TimeoutInSeconds }),
|
|
1084
1741
|
};
|
|
1085
1742
|
};
|
|
1086
1743
|
const serializeAws_restJson1CanaryScheduleInput = (input, context) => {
|
|
1087
1744
|
return {
|
|
1088
|
-
...(input.DurationInSeconds
|
|
1089
|
-
|
|
1090
|
-
...(input.Expression !== undefined && input.Expression !== null && { Expression: input.Expression }),
|
|
1745
|
+
...(input.DurationInSeconds != null && { DurationInSeconds: input.DurationInSeconds }),
|
|
1746
|
+
...(input.Expression != null && { Expression: input.Expression }),
|
|
1091
1747
|
};
|
|
1092
1748
|
};
|
|
1093
1749
|
const serializeAws_restJson1DescribeCanariesLastRunNameFilter = (input, context) => {
|
|
@@ -1123,9 +1779,8 @@ const serializeAws_restJson1EnvironmentVariablesMap = (input, context) => {
|
|
|
1123
1779
|
};
|
|
1124
1780
|
const serializeAws_restJson1S3EncryptionConfig = (input, context) => {
|
|
1125
1781
|
return {
|
|
1126
|
-
...(input.EncryptionMode
|
|
1127
|
-
|
|
1128
|
-
...(input.KmsKeyArn !== undefined && input.KmsKeyArn !== null && { KmsKeyArn: input.KmsKeyArn }),
|
|
1782
|
+
...(input.EncryptionMode != null && { EncryptionMode: input.EncryptionMode }),
|
|
1783
|
+
...(input.KmsKeyArn != null && { KmsKeyArn: input.KmsKeyArn }),
|
|
1129
1784
|
};
|
|
1130
1785
|
};
|
|
1131
1786
|
const serializeAws_restJson1SecurityGroupIds = (input, context) => {
|
|
@@ -1161,34 +1816,30 @@ const serializeAws_restJson1TagMap = (input, context) => {
|
|
|
1161
1816
|
};
|
|
1162
1817
|
const serializeAws_restJson1VisualReferenceInput = (input, context) => {
|
|
1163
1818
|
return {
|
|
1164
|
-
...(input.BaseCanaryRunId
|
|
1165
|
-
|
|
1166
|
-
...(input.BaseScreenshots !== undefined &&
|
|
1167
|
-
input.BaseScreenshots !== null && {
|
|
1819
|
+
...(input.BaseCanaryRunId != null && { BaseCanaryRunId: input.BaseCanaryRunId }),
|
|
1820
|
+
...(input.BaseScreenshots != null && {
|
|
1168
1821
|
BaseScreenshots: serializeAws_restJson1BaseScreenshots(input.BaseScreenshots, context),
|
|
1169
1822
|
}),
|
|
1170
1823
|
};
|
|
1171
1824
|
};
|
|
1172
1825
|
const serializeAws_restJson1VpcConfigInput = (input, context) => {
|
|
1173
1826
|
return {
|
|
1174
|
-
...(input.SecurityGroupIds
|
|
1175
|
-
input.SecurityGroupIds !== null && {
|
|
1827
|
+
...(input.SecurityGroupIds != null && {
|
|
1176
1828
|
SecurityGroupIds: serializeAws_restJson1SecurityGroupIds(input.SecurityGroupIds, context),
|
|
1177
1829
|
}),
|
|
1178
|
-
...(input.SubnetIds
|
|
1179
|
-
input.SubnetIds !== null && { SubnetIds: serializeAws_restJson1SubnetIds(input.SubnetIds, context) }),
|
|
1830
|
+
...(input.SubnetIds != null && { SubnetIds: serializeAws_restJson1SubnetIds(input.SubnetIds, context) }),
|
|
1180
1831
|
};
|
|
1181
1832
|
};
|
|
1182
1833
|
const deserializeAws_restJson1ArtifactConfigOutput = (output, context) => {
|
|
1183
1834
|
return {
|
|
1184
|
-
S3Encryption: output.S3Encryption
|
|
1835
|
+
S3Encryption: output.S3Encryption != null
|
|
1185
1836
|
? deserializeAws_restJson1S3EncryptionConfig(output.S3Encryption, context)
|
|
1186
1837
|
: undefined,
|
|
1187
1838
|
};
|
|
1188
1839
|
};
|
|
1189
1840
|
const deserializeAws_restJson1BaseScreenshot = (output, context) => {
|
|
1190
1841
|
return {
|
|
1191
|
-
IgnoreCoordinates: output.IgnoreCoordinates
|
|
1842
|
+
IgnoreCoordinates: output.IgnoreCoordinates != null
|
|
1192
1843
|
? deserializeAws_restJson1BaseScreenshotIgnoreCoordinates(output.IgnoreCoordinates, context)
|
|
1193
1844
|
: undefined,
|
|
1194
1845
|
ScreenshotName: (0, smithy_client_1.expectString)(output.ScreenshotName),
|
|
@@ -1240,41 +1891,27 @@ const deserializeAws_restJson1CanariesLastRun = (output, context) => {
|
|
|
1240
1891
|
};
|
|
1241
1892
|
const deserializeAws_restJson1Canary = (output, context) => {
|
|
1242
1893
|
return {
|
|
1243
|
-
ArtifactConfig: output.ArtifactConfig
|
|
1894
|
+
ArtifactConfig: output.ArtifactConfig != null
|
|
1244
1895
|
? deserializeAws_restJson1ArtifactConfigOutput(output.ArtifactConfig, context)
|
|
1245
1896
|
: undefined,
|
|
1246
1897
|
ArtifactS3Location: (0, smithy_client_1.expectString)(output.ArtifactS3Location),
|
|
1247
|
-
Code: output.Code
|
|
1248
|
-
? deserializeAws_restJson1CanaryCodeOutput(output.Code, context)
|
|
1249
|
-
: undefined,
|
|
1898
|
+
Code: output.Code != null ? deserializeAws_restJson1CanaryCodeOutput(output.Code, context) : undefined,
|
|
1250
1899
|
EngineArn: (0, smithy_client_1.expectString)(output.EngineArn),
|
|
1251
1900
|
ExecutionRoleArn: (0, smithy_client_1.expectString)(output.ExecutionRoleArn),
|
|
1252
1901
|
FailureRetentionPeriodInDays: (0, smithy_client_1.expectInt32)(output.FailureRetentionPeriodInDays),
|
|
1253
1902
|
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1254
1903
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1255
|
-
RunConfig: output.RunConfig
|
|
1256
|
-
? deserializeAws_restJson1CanaryRunConfigOutput(output.RunConfig, context)
|
|
1257
|
-
: undefined,
|
|
1904
|
+
RunConfig: output.RunConfig != null ? deserializeAws_restJson1CanaryRunConfigOutput(output.RunConfig, context) : undefined,
|
|
1258
1905
|
RuntimeVersion: (0, smithy_client_1.expectString)(output.RuntimeVersion),
|
|
1259
|
-
Schedule: output.Schedule
|
|
1260
|
-
|
|
1261
|
-
: undefined,
|
|
1262
|
-
Status: output.Status !== undefined && output.Status !== null
|
|
1263
|
-
? deserializeAws_restJson1CanaryStatus(output.Status, context)
|
|
1264
|
-
: undefined,
|
|
1906
|
+
Schedule: output.Schedule != null ? deserializeAws_restJson1CanaryScheduleOutput(output.Schedule, context) : undefined,
|
|
1907
|
+
Status: output.Status != null ? deserializeAws_restJson1CanaryStatus(output.Status, context) : undefined,
|
|
1265
1908
|
SuccessRetentionPeriodInDays: (0, smithy_client_1.expectInt32)(output.SuccessRetentionPeriodInDays),
|
|
1266
|
-
Tags: output.Tags
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
Timeline: output.Timeline !== undefined && output.Timeline !== null
|
|
1270
|
-
? deserializeAws_restJson1CanaryTimeline(output.Timeline, context)
|
|
1271
|
-
: undefined,
|
|
1272
|
-
VisualReference: output.VisualReference !== undefined && output.VisualReference !== null
|
|
1909
|
+
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
1910
|
+
Timeline: output.Timeline != null ? deserializeAws_restJson1CanaryTimeline(output.Timeline, context) : undefined,
|
|
1911
|
+
VisualReference: output.VisualReference != null
|
|
1273
1912
|
? deserializeAws_restJson1VisualReferenceOutput(output.VisualReference, context)
|
|
1274
1913
|
: undefined,
|
|
1275
|
-
VpcConfig: output.VpcConfig
|
|
1276
|
-
? deserializeAws_restJson1VpcConfigOutput(output.VpcConfig, context)
|
|
1277
|
-
: undefined,
|
|
1914
|
+
VpcConfig: output.VpcConfig != null ? deserializeAws_restJson1VpcConfigOutput(output.VpcConfig, context) : undefined,
|
|
1278
1915
|
};
|
|
1279
1916
|
};
|
|
1280
1917
|
const deserializeAws_restJson1CanaryCodeOutput = (output, context) => {
|
|
@@ -1286,9 +1923,7 @@ const deserializeAws_restJson1CanaryCodeOutput = (output, context) => {
|
|
|
1286
1923
|
const deserializeAws_restJson1CanaryLastRun = (output, context) => {
|
|
1287
1924
|
return {
|
|
1288
1925
|
CanaryName: (0, smithy_client_1.expectString)(output.CanaryName),
|
|
1289
|
-
LastRun: output.LastRun
|
|
1290
|
-
? deserializeAws_restJson1CanaryRun(output.LastRun, context)
|
|
1291
|
-
: undefined,
|
|
1926
|
+
LastRun: output.LastRun != null ? deserializeAws_restJson1CanaryRun(output.LastRun, context) : undefined,
|
|
1292
1927
|
};
|
|
1293
1928
|
};
|
|
1294
1929
|
const deserializeAws_restJson1CanaryRun = (output, context) => {
|
|
@@ -1296,12 +1931,8 @@ const deserializeAws_restJson1CanaryRun = (output, context) => {
|
|
|
1296
1931
|
ArtifactS3Location: (0, smithy_client_1.expectString)(output.ArtifactS3Location),
|
|
1297
1932
|
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
1298
1933
|
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
1299
|
-
Status: output.Status
|
|
1300
|
-
|
|
1301
|
-
: undefined,
|
|
1302
|
-
Timeline: output.Timeline !== undefined && output.Timeline !== null
|
|
1303
|
-
? deserializeAws_restJson1CanaryRunTimeline(output.Timeline, context)
|
|
1304
|
-
: undefined,
|
|
1934
|
+
Status: output.Status != null ? deserializeAws_restJson1CanaryRunStatus(output.Status, context) : undefined,
|
|
1935
|
+
Timeline: output.Timeline != null ? deserializeAws_restJson1CanaryRunTimeline(output.Timeline, context) : undefined,
|
|
1305
1936
|
};
|
|
1306
1937
|
};
|
|
1307
1938
|
const deserializeAws_restJson1CanaryRunConfigOutput = (output, context) => {
|
|
@@ -1331,12 +1962,8 @@ const deserializeAws_restJson1CanaryRunStatus = (output, context) => {
|
|
|
1331
1962
|
};
|
|
1332
1963
|
const deserializeAws_restJson1CanaryRunTimeline = (output, context) => {
|
|
1333
1964
|
return {
|
|
1334
|
-
Completed: output.Completed
|
|
1335
|
-
|
|
1336
|
-
: undefined,
|
|
1337
|
-
Started: output.Started !== undefined && output.Started !== null
|
|
1338
|
-
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Started)))
|
|
1339
|
-
: undefined,
|
|
1965
|
+
Completed: output.Completed != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Completed))) : undefined,
|
|
1966
|
+
Started: output.Started != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Started))) : undefined,
|
|
1340
1967
|
};
|
|
1341
1968
|
};
|
|
1342
1969
|
const deserializeAws_restJson1CanaryScheduleOutput = (output, context) => {
|
|
@@ -1354,27 +1981,57 @@ const deserializeAws_restJson1CanaryStatus = (output, context) => {
|
|
|
1354
1981
|
};
|
|
1355
1982
|
const deserializeAws_restJson1CanaryTimeline = (output, context) => {
|
|
1356
1983
|
return {
|
|
1357
|
-
Created: output.Created
|
|
1358
|
-
|
|
1359
|
-
: undefined,
|
|
1360
|
-
LastModified: output.LastModified !== undefined && output.LastModified !== null
|
|
1984
|
+
Created: output.Created != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.Created))) : undefined,
|
|
1985
|
+
LastModified: output.LastModified != null
|
|
1361
1986
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModified)))
|
|
1362
1987
|
: undefined,
|
|
1363
|
-
LastStarted: output.LastStarted
|
|
1988
|
+
LastStarted: output.LastStarted != null
|
|
1364
1989
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastStarted)))
|
|
1365
1990
|
: undefined,
|
|
1366
|
-
LastStopped: output.LastStopped
|
|
1991
|
+
LastStopped: output.LastStopped != null
|
|
1367
1992
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastStopped)))
|
|
1368
1993
|
: undefined,
|
|
1369
1994
|
};
|
|
1370
1995
|
};
|
|
1996
|
+
const deserializeAws_restJson1Group = (output, context) => {
|
|
1997
|
+
return {
|
|
1998
|
+
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
1999
|
+
CreatedTime: output.CreatedTime != null
|
|
2000
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.CreatedTime)))
|
|
2001
|
+
: undefined,
|
|
2002
|
+
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
2003
|
+
LastModifiedTime: output.LastModifiedTime != null
|
|
2004
|
+
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.LastModifiedTime)))
|
|
2005
|
+
: undefined,
|
|
2006
|
+
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
2007
|
+
Tags: output.Tags != null ? deserializeAws_restJson1TagMap(output.Tags, context) : undefined,
|
|
2008
|
+
};
|
|
2009
|
+
};
|
|
2010
|
+
const deserializeAws_restJson1GroupSummary = (output, context) => {
|
|
2011
|
+
return {
|
|
2012
|
+
Arn: (0, smithy_client_1.expectString)(output.Arn),
|
|
2013
|
+
Id: (0, smithy_client_1.expectString)(output.Id),
|
|
2014
|
+
Name: (0, smithy_client_1.expectString)(output.Name),
|
|
2015
|
+
};
|
|
2016
|
+
};
|
|
2017
|
+
const deserializeAws_restJson1GroupSummaryList = (output, context) => {
|
|
2018
|
+
const retVal = (output || [])
|
|
2019
|
+
.filter((e) => e != null)
|
|
2020
|
+
.map((entry) => {
|
|
2021
|
+
if (entry === null) {
|
|
2022
|
+
return null;
|
|
2023
|
+
}
|
|
2024
|
+
return deserializeAws_restJson1GroupSummary(entry, context);
|
|
2025
|
+
});
|
|
2026
|
+
return retVal;
|
|
2027
|
+
};
|
|
1371
2028
|
const deserializeAws_restJson1RuntimeVersion = (output, context) => {
|
|
1372
2029
|
return {
|
|
1373
|
-
DeprecationDate: output.DeprecationDate
|
|
2030
|
+
DeprecationDate: output.DeprecationDate != null
|
|
1374
2031
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.DeprecationDate)))
|
|
1375
2032
|
: undefined,
|
|
1376
2033
|
Description: (0, smithy_client_1.expectString)(output.Description),
|
|
1377
|
-
ReleaseDate: output.ReleaseDate
|
|
2034
|
+
ReleaseDate: output.ReleaseDate != null
|
|
1378
2035
|
? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ReleaseDate)))
|
|
1379
2036
|
: undefined,
|
|
1380
2037
|
VersionName: (0, smithy_client_1.expectString)(output.VersionName),
|
|
@@ -1408,6 +2065,17 @@ const deserializeAws_restJson1SecurityGroupIds = (output, context) => {
|
|
|
1408
2065
|
});
|
|
1409
2066
|
return retVal;
|
|
1410
2067
|
};
|
|
2068
|
+
const deserializeAws_restJson1StringList = (output, context) => {
|
|
2069
|
+
const retVal = (output || [])
|
|
2070
|
+
.filter((e) => e != null)
|
|
2071
|
+
.map((entry) => {
|
|
2072
|
+
if (entry === null) {
|
|
2073
|
+
return null;
|
|
2074
|
+
}
|
|
2075
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
2076
|
+
});
|
|
2077
|
+
return retVal;
|
|
2078
|
+
};
|
|
1411
2079
|
const deserializeAws_restJson1SubnetIds = (output, context) => {
|
|
1412
2080
|
const retVal = (output || [])
|
|
1413
2081
|
.filter((e) => e != null)
|
|
@@ -1433,19 +2101,17 @@ const deserializeAws_restJson1TagMap = (output, context) => {
|
|
|
1433
2101
|
const deserializeAws_restJson1VisualReferenceOutput = (output, context) => {
|
|
1434
2102
|
return {
|
|
1435
2103
|
BaseCanaryRunId: (0, smithy_client_1.expectString)(output.BaseCanaryRunId),
|
|
1436
|
-
BaseScreenshots: output.BaseScreenshots
|
|
2104
|
+
BaseScreenshots: output.BaseScreenshots != null
|
|
1437
2105
|
? deserializeAws_restJson1BaseScreenshots(output.BaseScreenshots, context)
|
|
1438
2106
|
: undefined,
|
|
1439
2107
|
};
|
|
1440
2108
|
};
|
|
1441
2109
|
const deserializeAws_restJson1VpcConfigOutput = (output, context) => {
|
|
1442
2110
|
return {
|
|
1443
|
-
SecurityGroupIds: output.SecurityGroupIds
|
|
2111
|
+
SecurityGroupIds: output.SecurityGroupIds != null
|
|
1444
2112
|
? deserializeAws_restJson1SecurityGroupIds(output.SecurityGroupIds, context)
|
|
1445
2113
|
: undefined,
|
|
1446
|
-
SubnetIds: output.SubnetIds
|
|
1447
|
-
? deserializeAws_restJson1SubnetIds(output.SubnetIds, context)
|
|
1448
|
-
: undefined,
|
|
2114
|
+
SubnetIds: output.SubnetIds != null ? deserializeAws_restJson1SubnetIds(output.SubnetIds, context) : undefined,
|
|
1449
2115
|
VpcId: (0, smithy_client_1.expectString)(output.VpcId),
|
|
1450
2116
|
};
|
|
1451
2117
|
};
|
|
@@ -1498,5 +2164,4 @@ const loadRestJsonErrorCode = (output, data) => {
|
|
|
1498
2164
|
if (data["__type"] !== undefined) {
|
|
1499
2165
|
return sanitizeErrorCode(data["__type"]);
|
|
1500
2166
|
}
|
|
1501
|
-
return "";
|
|
1502
2167
|
};
|