@aws-sdk/client-synthetics 3.489.0 → 3.495.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/Synthetics.js +1 -53
- package/dist-cjs/SyntheticsClient.js +1 -43
- package/dist-cjs/commands/AssociateResourceCommand.js +1 -28
- package/dist-cjs/commands/CreateCanaryCommand.js +1 -28
- package/dist-cjs/commands/CreateGroupCommand.js +1 -28
- package/dist-cjs/commands/DeleteCanaryCommand.js +1 -28
- package/dist-cjs/commands/DeleteGroupCommand.js +1 -28
- package/dist-cjs/commands/DescribeCanariesCommand.js +1 -28
- package/dist-cjs/commands/DescribeCanariesLastRunCommand.js +1 -28
- package/dist-cjs/commands/DescribeRuntimeVersionsCommand.js +1 -28
- package/dist-cjs/commands/DisassociateResourceCommand.js +1 -28
- package/dist-cjs/commands/GetCanaryCommand.js +1 -28
- package/dist-cjs/commands/GetCanaryRunsCommand.js +1 -28
- package/dist-cjs/commands/GetGroupCommand.js +1 -28
- package/dist-cjs/commands/ListAssociatedGroupsCommand.js +1 -28
- package/dist-cjs/commands/ListGroupResourcesCommand.js +1 -28
- package/dist-cjs/commands/ListGroupsCommand.js +1 -28
- package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
- package/dist-cjs/commands/StartCanaryCommand.js +1 -28
- package/dist-cjs/commands/StopCanaryCommand.js +1 -28
- package/dist-cjs/commands/TagResourceCommand.js +1 -28
- package/dist-cjs/commands/UntagResourceCommand.js +1 -28
- package/dist-cjs/commands/UpdateCanaryCommand.js +1 -28
- package/dist-cjs/commands/index.js +1 -24
- package/dist-cjs/endpoint/EndpointParameters.js +1 -18
- package/dist-cjs/extensionConfiguration.js +1 -2
- package/dist-cjs/index.js +2295 -11
- package/dist-cjs/models/SyntheticsServiceException.js +1 -12
- package/dist-cjs/models/index.js +1 -4
- package/dist-cjs/models/models_0.js +1 -182
- package/dist-cjs/pagination/DescribeCanariesLastRunPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeCanariesPaginator.js +1 -7
- package/dist-cjs/pagination/DescribeRuntimeVersionsPaginator.js +1 -7
- package/dist-cjs/pagination/GetCanaryRunsPaginator.js +1 -7
- package/dist-cjs/pagination/Interfaces.js +1 -2
- package/dist-cjs/pagination/ListAssociatedGroupsPaginator.js +1 -7
- package/dist-cjs/pagination/ListGroupResourcesPaginator.js +1 -7
- package/dist-cjs/pagination/ListGroupsPaginator.js +1 -7
- package/dist-cjs/pagination/index.js +1 -11
- package/dist-cjs/protocols/Aws_restJson1.js +1 -1462
- package/dist-cjs/runtimeExtensions.js +1 -22
- package/package.json +40 -40
|
@@ -1,1462 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.de_UpdateCanaryCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StopCanaryCommand = exports.de_StartCanaryCommand = exports.de_ListTagsForResourceCommand = exports.de_ListGroupsCommand = exports.de_ListGroupResourcesCommand = exports.de_ListAssociatedGroupsCommand = exports.de_GetGroupCommand = exports.de_GetCanaryRunsCommand = exports.de_GetCanaryCommand = exports.de_DisassociateResourceCommand = exports.de_DescribeRuntimeVersionsCommand = exports.de_DescribeCanariesLastRunCommand = exports.de_DescribeCanariesCommand = exports.de_DeleteGroupCommand = exports.de_DeleteCanaryCommand = exports.de_CreateGroupCommand = exports.de_CreateCanaryCommand = exports.de_AssociateResourceCommand = exports.se_UpdateCanaryCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StopCanaryCommand = exports.se_StartCanaryCommand = exports.se_ListTagsForResourceCommand = exports.se_ListGroupsCommand = exports.se_ListGroupResourcesCommand = exports.se_ListAssociatedGroupsCommand = exports.se_GetGroupCommand = exports.se_GetCanaryRunsCommand = exports.se_GetCanaryCommand = exports.se_DisassociateResourceCommand = exports.se_DescribeRuntimeVersionsCommand = exports.se_DescribeCanariesLastRunCommand = exports.se_DescribeCanariesCommand = exports.se_DeleteGroupCommand = exports.se_DeleteCanaryCommand = exports.se_CreateGroupCommand = exports.se_CreateCanaryCommand = exports.se_AssociateResourceCommand = void 0;
|
|
4
|
-
const core_1 = require("@smithy/core");
|
|
5
|
-
const smithy_client_1 = require("@smithy/smithy-client");
|
|
6
|
-
const models_0_1 = require("../models/models_0");
|
|
7
|
-
const SyntheticsServiceException_1 = require("../models/SyntheticsServiceException");
|
|
8
|
-
const se_AssociateResourceCommand = async (input, context) => {
|
|
9
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
10
|
-
const headers = {
|
|
11
|
-
"content-type": "application/json",
|
|
12
|
-
};
|
|
13
|
-
b.bp("/group/{GroupIdentifier}/associate");
|
|
14
|
-
b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
17
|
-
ResourceArn: [],
|
|
18
|
-
}));
|
|
19
|
-
b.m("PATCH").h(headers).b(body);
|
|
20
|
-
return b.build();
|
|
21
|
-
};
|
|
22
|
-
exports.se_AssociateResourceCommand = se_AssociateResourceCommand;
|
|
23
|
-
const se_CreateCanaryCommand = async (input, context) => {
|
|
24
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
25
|
-
const headers = {
|
|
26
|
-
"content-type": "application/json",
|
|
27
|
-
};
|
|
28
|
-
b.bp("/canary");
|
|
29
|
-
let body;
|
|
30
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
31
|
-
ArtifactConfig: (_) => (0, smithy_client_1._json)(_),
|
|
32
|
-
ArtifactS3Location: [],
|
|
33
|
-
Code: (_) => se_CanaryCodeInput(_, context),
|
|
34
|
-
ExecutionRoleArn: [],
|
|
35
|
-
FailureRetentionPeriodInDays: [],
|
|
36
|
-
Name: [],
|
|
37
|
-
RunConfig: (_) => (0, smithy_client_1._json)(_),
|
|
38
|
-
RuntimeVersion: [],
|
|
39
|
-
Schedule: (_) => (0, smithy_client_1._json)(_),
|
|
40
|
-
SuccessRetentionPeriodInDays: [],
|
|
41
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
42
|
-
VpcConfig: (_) => (0, smithy_client_1._json)(_),
|
|
43
|
-
}));
|
|
44
|
-
b.m("POST").h(headers).b(body);
|
|
45
|
-
return b.build();
|
|
46
|
-
};
|
|
47
|
-
exports.se_CreateCanaryCommand = se_CreateCanaryCommand;
|
|
48
|
-
const se_CreateGroupCommand = async (input, context) => {
|
|
49
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
50
|
-
const headers = {
|
|
51
|
-
"content-type": "application/json",
|
|
52
|
-
};
|
|
53
|
-
b.bp("/group");
|
|
54
|
-
let body;
|
|
55
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
56
|
-
Name: [],
|
|
57
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
58
|
-
}));
|
|
59
|
-
b.m("POST").h(headers).b(body);
|
|
60
|
-
return b.build();
|
|
61
|
-
};
|
|
62
|
-
exports.se_CreateGroupCommand = se_CreateGroupCommand;
|
|
63
|
-
const se_DeleteCanaryCommand = async (input, context) => {
|
|
64
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
65
|
-
const headers = {};
|
|
66
|
-
b.bp("/canary/{Name}");
|
|
67
|
-
b.p("Name", () => input.Name, "{Name}", false);
|
|
68
|
-
const query = (0, smithy_client_1.map)({
|
|
69
|
-
[_dL]: [() => input.DeleteLambda !== void 0, () => input[_DL].toString()],
|
|
70
|
-
});
|
|
71
|
-
let body;
|
|
72
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
73
|
-
return b.build();
|
|
74
|
-
};
|
|
75
|
-
exports.se_DeleteCanaryCommand = se_DeleteCanaryCommand;
|
|
76
|
-
const se_DeleteGroupCommand = async (input, context) => {
|
|
77
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
78
|
-
const headers = {};
|
|
79
|
-
b.bp("/group/{GroupIdentifier}");
|
|
80
|
-
b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
|
|
81
|
-
let body;
|
|
82
|
-
b.m("DELETE").h(headers).b(body);
|
|
83
|
-
return b.build();
|
|
84
|
-
};
|
|
85
|
-
exports.se_DeleteGroupCommand = se_DeleteGroupCommand;
|
|
86
|
-
const se_DescribeCanariesCommand = async (input, context) => {
|
|
87
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
88
|
-
const headers = {
|
|
89
|
-
"content-type": "application/json",
|
|
90
|
-
};
|
|
91
|
-
b.bp("/canaries");
|
|
92
|
-
let body;
|
|
93
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
94
|
-
MaxResults: [],
|
|
95
|
-
Names: (_) => (0, smithy_client_1._json)(_),
|
|
96
|
-
NextToken: [],
|
|
97
|
-
}));
|
|
98
|
-
b.m("POST").h(headers).b(body);
|
|
99
|
-
return b.build();
|
|
100
|
-
};
|
|
101
|
-
exports.se_DescribeCanariesCommand = se_DescribeCanariesCommand;
|
|
102
|
-
const se_DescribeCanariesLastRunCommand = async (input, context) => {
|
|
103
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
104
|
-
const headers = {
|
|
105
|
-
"content-type": "application/json",
|
|
106
|
-
};
|
|
107
|
-
b.bp("/canaries/last-run");
|
|
108
|
-
let body;
|
|
109
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
110
|
-
MaxResults: [],
|
|
111
|
-
Names: (_) => (0, smithy_client_1._json)(_),
|
|
112
|
-
NextToken: [],
|
|
113
|
-
}));
|
|
114
|
-
b.m("POST").h(headers).b(body);
|
|
115
|
-
return b.build();
|
|
116
|
-
};
|
|
117
|
-
exports.se_DescribeCanariesLastRunCommand = se_DescribeCanariesLastRunCommand;
|
|
118
|
-
const se_DescribeRuntimeVersionsCommand = async (input, context) => {
|
|
119
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
120
|
-
const headers = {
|
|
121
|
-
"content-type": "application/json",
|
|
122
|
-
};
|
|
123
|
-
b.bp("/runtime-versions");
|
|
124
|
-
let body;
|
|
125
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
126
|
-
MaxResults: [],
|
|
127
|
-
NextToken: [],
|
|
128
|
-
}));
|
|
129
|
-
b.m("POST").h(headers).b(body);
|
|
130
|
-
return b.build();
|
|
131
|
-
};
|
|
132
|
-
exports.se_DescribeRuntimeVersionsCommand = se_DescribeRuntimeVersionsCommand;
|
|
133
|
-
const se_DisassociateResourceCommand = async (input, context) => {
|
|
134
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
135
|
-
const headers = {
|
|
136
|
-
"content-type": "application/json",
|
|
137
|
-
};
|
|
138
|
-
b.bp("/group/{GroupIdentifier}/disassociate");
|
|
139
|
-
b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
|
|
140
|
-
let body;
|
|
141
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
142
|
-
ResourceArn: [],
|
|
143
|
-
}));
|
|
144
|
-
b.m("PATCH").h(headers).b(body);
|
|
145
|
-
return b.build();
|
|
146
|
-
};
|
|
147
|
-
exports.se_DisassociateResourceCommand = se_DisassociateResourceCommand;
|
|
148
|
-
const se_GetCanaryCommand = async (input, context) => {
|
|
149
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
150
|
-
const headers = {};
|
|
151
|
-
b.bp("/canary/{Name}");
|
|
152
|
-
b.p("Name", () => input.Name, "{Name}", false);
|
|
153
|
-
let body;
|
|
154
|
-
b.m("GET").h(headers).b(body);
|
|
155
|
-
return b.build();
|
|
156
|
-
};
|
|
157
|
-
exports.se_GetCanaryCommand = se_GetCanaryCommand;
|
|
158
|
-
const se_GetCanaryRunsCommand = async (input, context) => {
|
|
159
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
160
|
-
const headers = {
|
|
161
|
-
"content-type": "application/json",
|
|
162
|
-
};
|
|
163
|
-
b.bp("/canary/{Name}/runs");
|
|
164
|
-
b.p("Name", () => input.Name, "{Name}", false);
|
|
165
|
-
let body;
|
|
166
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
167
|
-
MaxResults: [],
|
|
168
|
-
NextToken: [],
|
|
169
|
-
}));
|
|
170
|
-
b.m("POST").h(headers).b(body);
|
|
171
|
-
return b.build();
|
|
172
|
-
};
|
|
173
|
-
exports.se_GetCanaryRunsCommand = se_GetCanaryRunsCommand;
|
|
174
|
-
const se_GetGroupCommand = async (input, context) => {
|
|
175
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
176
|
-
const headers = {};
|
|
177
|
-
b.bp("/group/{GroupIdentifier}");
|
|
178
|
-
b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
|
|
179
|
-
let body;
|
|
180
|
-
b.m("GET").h(headers).b(body);
|
|
181
|
-
return b.build();
|
|
182
|
-
};
|
|
183
|
-
exports.se_GetGroupCommand = se_GetGroupCommand;
|
|
184
|
-
const se_ListAssociatedGroupsCommand = async (input, context) => {
|
|
185
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
186
|
-
const headers = {
|
|
187
|
-
"content-type": "application/json",
|
|
188
|
-
};
|
|
189
|
-
b.bp("/resource/{ResourceArn}/groups");
|
|
190
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
191
|
-
let body;
|
|
192
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
193
|
-
MaxResults: [],
|
|
194
|
-
NextToken: [],
|
|
195
|
-
}));
|
|
196
|
-
b.m("POST").h(headers).b(body);
|
|
197
|
-
return b.build();
|
|
198
|
-
};
|
|
199
|
-
exports.se_ListAssociatedGroupsCommand = se_ListAssociatedGroupsCommand;
|
|
200
|
-
const se_ListGroupResourcesCommand = async (input, context) => {
|
|
201
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
202
|
-
const headers = {
|
|
203
|
-
"content-type": "application/json",
|
|
204
|
-
};
|
|
205
|
-
b.bp("/group/{GroupIdentifier}/resources");
|
|
206
|
-
b.p("GroupIdentifier", () => input.GroupIdentifier, "{GroupIdentifier}", false);
|
|
207
|
-
let body;
|
|
208
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
209
|
-
MaxResults: [],
|
|
210
|
-
NextToken: [],
|
|
211
|
-
}));
|
|
212
|
-
b.m("POST").h(headers).b(body);
|
|
213
|
-
return b.build();
|
|
214
|
-
};
|
|
215
|
-
exports.se_ListGroupResourcesCommand = se_ListGroupResourcesCommand;
|
|
216
|
-
const se_ListGroupsCommand = async (input, context) => {
|
|
217
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
218
|
-
const headers = {
|
|
219
|
-
"content-type": "application/json",
|
|
220
|
-
};
|
|
221
|
-
b.bp("/groups");
|
|
222
|
-
let body;
|
|
223
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
224
|
-
MaxResults: [],
|
|
225
|
-
NextToken: [],
|
|
226
|
-
}));
|
|
227
|
-
b.m("POST").h(headers).b(body);
|
|
228
|
-
return b.build();
|
|
229
|
-
};
|
|
230
|
-
exports.se_ListGroupsCommand = se_ListGroupsCommand;
|
|
231
|
-
const se_ListTagsForResourceCommand = async (input, context) => {
|
|
232
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
233
|
-
const headers = {};
|
|
234
|
-
b.bp("/tags/{ResourceArn}");
|
|
235
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
236
|
-
let body;
|
|
237
|
-
b.m("GET").h(headers).b(body);
|
|
238
|
-
return b.build();
|
|
239
|
-
};
|
|
240
|
-
exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
|
|
241
|
-
const se_StartCanaryCommand = async (input, context) => {
|
|
242
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
243
|
-
const headers = {};
|
|
244
|
-
b.bp("/canary/{Name}/start");
|
|
245
|
-
b.p("Name", () => input.Name, "{Name}", false);
|
|
246
|
-
let body;
|
|
247
|
-
b.m("POST").h(headers).b(body);
|
|
248
|
-
return b.build();
|
|
249
|
-
};
|
|
250
|
-
exports.se_StartCanaryCommand = se_StartCanaryCommand;
|
|
251
|
-
const se_StopCanaryCommand = async (input, context) => {
|
|
252
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
253
|
-
const headers = {};
|
|
254
|
-
b.bp("/canary/{Name}/stop");
|
|
255
|
-
b.p("Name", () => input.Name, "{Name}", false);
|
|
256
|
-
let body;
|
|
257
|
-
b.m("POST").h(headers).b(body);
|
|
258
|
-
return b.build();
|
|
259
|
-
};
|
|
260
|
-
exports.se_StopCanaryCommand = se_StopCanaryCommand;
|
|
261
|
-
const se_TagResourceCommand = async (input, context) => {
|
|
262
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
263
|
-
const headers = {
|
|
264
|
-
"content-type": "application/json",
|
|
265
|
-
};
|
|
266
|
-
b.bp("/tags/{ResourceArn}");
|
|
267
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
268
|
-
let body;
|
|
269
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
270
|
-
Tags: (_) => (0, smithy_client_1._json)(_),
|
|
271
|
-
}));
|
|
272
|
-
b.m("POST").h(headers).b(body);
|
|
273
|
-
return b.build();
|
|
274
|
-
};
|
|
275
|
-
exports.se_TagResourceCommand = se_TagResourceCommand;
|
|
276
|
-
const se_UntagResourceCommand = async (input, context) => {
|
|
277
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
278
|
-
const headers = {};
|
|
279
|
-
b.bp("/tags/{ResourceArn}");
|
|
280
|
-
b.p("ResourceArn", () => input.ResourceArn, "{ResourceArn}", false);
|
|
281
|
-
const query = (0, smithy_client_1.map)({
|
|
282
|
-
[_tK]: [
|
|
283
|
-
(0, smithy_client_1.expectNonNull)(input.TagKeys, `TagKeys`) != null,
|
|
284
|
-
() => (input[_TK] || []).map((_entry) => _entry),
|
|
285
|
-
],
|
|
286
|
-
});
|
|
287
|
-
let body;
|
|
288
|
-
b.m("DELETE").h(headers).q(query).b(body);
|
|
289
|
-
return b.build();
|
|
290
|
-
};
|
|
291
|
-
exports.se_UntagResourceCommand = se_UntagResourceCommand;
|
|
292
|
-
const se_UpdateCanaryCommand = async (input, context) => {
|
|
293
|
-
const b = (0, core_1.requestBuilder)(input, context);
|
|
294
|
-
const headers = {
|
|
295
|
-
"content-type": "application/json",
|
|
296
|
-
};
|
|
297
|
-
b.bp("/canary/{Name}");
|
|
298
|
-
b.p("Name", () => input.Name, "{Name}", false);
|
|
299
|
-
let body;
|
|
300
|
-
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
301
|
-
ArtifactConfig: (_) => (0, smithy_client_1._json)(_),
|
|
302
|
-
ArtifactS3Location: [],
|
|
303
|
-
Code: (_) => se_CanaryCodeInput(_, context),
|
|
304
|
-
ExecutionRoleArn: [],
|
|
305
|
-
FailureRetentionPeriodInDays: [],
|
|
306
|
-
RunConfig: (_) => (0, smithy_client_1._json)(_),
|
|
307
|
-
RuntimeVersion: [],
|
|
308
|
-
Schedule: (_) => (0, smithy_client_1._json)(_),
|
|
309
|
-
SuccessRetentionPeriodInDays: [],
|
|
310
|
-
VisualReference: (_) => (0, smithy_client_1._json)(_),
|
|
311
|
-
VpcConfig: (_) => (0, smithy_client_1._json)(_),
|
|
312
|
-
}));
|
|
313
|
-
b.m("PATCH").h(headers).b(body);
|
|
314
|
-
return b.build();
|
|
315
|
-
};
|
|
316
|
-
exports.se_UpdateCanaryCommand = se_UpdateCanaryCommand;
|
|
317
|
-
const de_AssociateResourceCommand = async (output, context) => {
|
|
318
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
319
|
-
return de_AssociateResourceCommandError(output, context);
|
|
320
|
-
}
|
|
321
|
-
const contents = (0, smithy_client_1.map)({
|
|
322
|
-
$metadata: deserializeMetadata(output),
|
|
323
|
-
});
|
|
324
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
325
|
-
return contents;
|
|
326
|
-
};
|
|
327
|
-
exports.de_AssociateResourceCommand = de_AssociateResourceCommand;
|
|
328
|
-
const de_AssociateResourceCommandError = async (output, context) => {
|
|
329
|
-
const parsedOutput = {
|
|
330
|
-
...output,
|
|
331
|
-
body: await parseErrorBody(output.body, context),
|
|
332
|
-
};
|
|
333
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
334
|
-
switch (errorCode) {
|
|
335
|
-
case "ConflictException":
|
|
336
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
337
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
338
|
-
case "InternalServerException":
|
|
339
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
340
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
341
|
-
case "ResourceNotFoundException":
|
|
342
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
343
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
344
|
-
case "ServiceQuotaExceededException":
|
|
345
|
-
case "com.amazonaws.synthetics#ServiceQuotaExceededException":
|
|
346
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
347
|
-
case "ValidationException":
|
|
348
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
349
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
350
|
-
default:
|
|
351
|
-
const parsedBody = parsedOutput.body;
|
|
352
|
-
return throwDefaultError({
|
|
353
|
-
output,
|
|
354
|
-
parsedBody,
|
|
355
|
-
errorCode,
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
const de_CreateCanaryCommand = async (output, context) => {
|
|
360
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
361
|
-
return de_CreateCanaryCommandError(output, context);
|
|
362
|
-
}
|
|
363
|
-
const contents = (0, smithy_client_1.map)({
|
|
364
|
-
$metadata: deserializeMetadata(output),
|
|
365
|
-
});
|
|
366
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
367
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
368
|
-
Canary: (_) => de_Canary(_, context),
|
|
369
|
-
});
|
|
370
|
-
Object.assign(contents, doc);
|
|
371
|
-
return contents;
|
|
372
|
-
};
|
|
373
|
-
exports.de_CreateCanaryCommand = de_CreateCanaryCommand;
|
|
374
|
-
const de_CreateCanaryCommandError = async (output, context) => {
|
|
375
|
-
const parsedOutput = {
|
|
376
|
-
...output,
|
|
377
|
-
body: await parseErrorBody(output.body, context),
|
|
378
|
-
};
|
|
379
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
380
|
-
switch (errorCode) {
|
|
381
|
-
case "InternalServerException":
|
|
382
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
383
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
384
|
-
case "RequestEntityTooLargeException":
|
|
385
|
-
case "com.amazonaws.synthetics#RequestEntityTooLargeException":
|
|
386
|
-
throw await de_RequestEntityTooLargeExceptionRes(parsedOutput, context);
|
|
387
|
-
case "ValidationException":
|
|
388
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
389
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
390
|
-
default:
|
|
391
|
-
const parsedBody = parsedOutput.body;
|
|
392
|
-
return throwDefaultError({
|
|
393
|
-
output,
|
|
394
|
-
parsedBody,
|
|
395
|
-
errorCode,
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
const de_CreateGroupCommand = async (output, context) => {
|
|
400
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
401
|
-
return de_CreateGroupCommandError(output, context);
|
|
402
|
-
}
|
|
403
|
-
const contents = (0, smithy_client_1.map)({
|
|
404
|
-
$metadata: deserializeMetadata(output),
|
|
405
|
-
});
|
|
406
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
407
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
408
|
-
Group: (_) => de_Group(_, context),
|
|
409
|
-
});
|
|
410
|
-
Object.assign(contents, doc);
|
|
411
|
-
return contents;
|
|
412
|
-
};
|
|
413
|
-
exports.de_CreateGroupCommand = de_CreateGroupCommand;
|
|
414
|
-
const de_CreateGroupCommandError = async (output, context) => {
|
|
415
|
-
const parsedOutput = {
|
|
416
|
-
...output,
|
|
417
|
-
body: await parseErrorBody(output.body, context),
|
|
418
|
-
};
|
|
419
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
420
|
-
switch (errorCode) {
|
|
421
|
-
case "ConflictException":
|
|
422
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
423
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
424
|
-
case "InternalServerException":
|
|
425
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
426
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
427
|
-
case "ServiceQuotaExceededException":
|
|
428
|
-
case "com.amazonaws.synthetics#ServiceQuotaExceededException":
|
|
429
|
-
throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
|
|
430
|
-
case "ValidationException":
|
|
431
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
432
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
433
|
-
default:
|
|
434
|
-
const parsedBody = parsedOutput.body;
|
|
435
|
-
return throwDefaultError({
|
|
436
|
-
output,
|
|
437
|
-
parsedBody,
|
|
438
|
-
errorCode,
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
};
|
|
442
|
-
const de_DeleteCanaryCommand = async (output, context) => {
|
|
443
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
444
|
-
return de_DeleteCanaryCommandError(output, context);
|
|
445
|
-
}
|
|
446
|
-
const contents = (0, smithy_client_1.map)({
|
|
447
|
-
$metadata: deserializeMetadata(output),
|
|
448
|
-
});
|
|
449
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
450
|
-
return contents;
|
|
451
|
-
};
|
|
452
|
-
exports.de_DeleteCanaryCommand = de_DeleteCanaryCommand;
|
|
453
|
-
const de_DeleteCanaryCommandError = async (output, context) => {
|
|
454
|
-
const parsedOutput = {
|
|
455
|
-
...output,
|
|
456
|
-
body: await parseErrorBody(output.body, context),
|
|
457
|
-
};
|
|
458
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
459
|
-
switch (errorCode) {
|
|
460
|
-
case "ConflictException":
|
|
461
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
462
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
463
|
-
case "InternalServerException":
|
|
464
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
465
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
466
|
-
case "ResourceNotFoundException":
|
|
467
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
468
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
469
|
-
case "ValidationException":
|
|
470
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
471
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
472
|
-
default:
|
|
473
|
-
const parsedBody = parsedOutput.body;
|
|
474
|
-
return throwDefaultError({
|
|
475
|
-
output,
|
|
476
|
-
parsedBody,
|
|
477
|
-
errorCode,
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
};
|
|
481
|
-
const de_DeleteGroupCommand = async (output, context) => {
|
|
482
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
483
|
-
return de_DeleteGroupCommandError(output, context);
|
|
484
|
-
}
|
|
485
|
-
const contents = (0, smithy_client_1.map)({
|
|
486
|
-
$metadata: deserializeMetadata(output),
|
|
487
|
-
});
|
|
488
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
489
|
-
return contents;
|
|
490
|
-
};
|
|
491
|
-
exports.de_DeleteGroupCommand = de_DeleteGroupCommand;
|
|
492
|
-
const de_DeleteGroupCommandError = async (output, context) => {
|
|
493
|
-
const parsedOutput = {
|
|
494
|
-
...output,
|
|
495
|
-
body: await parseErrorBody(output.body, context),
|
|
496
|
-
};
|
|
497
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
498
|
-
switch (errorCode) {
|
|
499
|
-
case "ConflictException":
|
|
500
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
501
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
502
|
-
case "InternalServerException":
|
|
503
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
504
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
505
|
-
case "ResourceNotFoundException":
|
|
506
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
507
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
508
|
-
case "ValidationException":
|
|
509
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
510
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
511
|
-
default:
|
|
512
|
-
const parsedBody = parsedOutput.body;
|
|
513
|
-
return throwDefaultError({
|
|
514
|
-
output,
|
|
515
|
-
parsedBody,
|
|
516
|
-
errorCode,
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
};
|
|
520
|
-
const de_DescribeCanariesCommand = async (output, context) => {
|
|
521
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
522
|
-
return de_DescribeCanariesCommandError(output, context);
|
|
523
|
-
}
|
|
524
|
-
const contents = (0, smithy_client_1.map)({
|
|
525
|
-
$metadata: deserializeMetadata(output),
|
|
526
|
-
});
|
|
527
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
528
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
529
|
-
Canaries: (_) => de_Canaries(_, context),
|
|
530
|
-
NextToken: smithy_client_1.expectString,
|
|
531
|
-
});
|
|
532
|
-
Object.assign(contents, doc);
|
|
533
|
-
return contents;
|
|
534
|
-
};
|
|
535
|
-
exports.de_DescribeCanariesCommand = de_DescribeCanariesCommand;
|
|
536
|
-
const de_DescribeCanariesCommandError = async (output, context) => {
|
|
537
|
-
const parsedOutput = {
|
|
538
|
-
...output,
|
|
539
|
-
body: await parseErrorBody(output.body, context),
|
|
540
|
-
};
|
|
541
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
542
|
-
switch (errorCode) {
|
|
543
|
-
case "InternalServerException":
|
|
544
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
545
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
546
|
-
case "ValidationException":
|
|
547
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
548
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
549
|
-
default:
|
|
550
|
-
const parsedBody = parsedOutput.body;
|
|
551
|
-
return throwDefaultError({
|
|
552
|
-
output,
|
|
553
|
-
parsedBody,
|
|
554
|
-
errorCode,
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
};
|
|
558
|
-
const de_DescribeCanariesLastRunCommand = async (output, context) => {
|
|
559
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
560
|
-
return de_DescribeCanariesLastRunCommandError(output, context);
|
|
561
|
-
}
|
|
562
|
-
const contents = (0, smithy_client_1.map)({
|
|
563
|
-
$metadata: deserializeMetadata(output),
|
|
564
|
-
});
|
|
565
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
566
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
567
|
-
CanariesLastRun: (_) => de_CanariesLastRun(_, context),
|
|
568
|
-
NextToken: smithy_client_1.expectString,
|
|
569
|
-
});
|
|
570
|
-
Object.assign(contents, doc);
|
|
571
|
-
return contents;
|
|
572
|
-
};
|
|
573
|
-
exports.de_DescribeCanariesLastRunCommand = de_DescribeCanariesLastRunCommand;
|
|
574
|
-
const de_DescribeCanariesLastRunCommandError = async (output, context) => {
|
|
575
|
-
const parsedOutput = {
|
|
576
|
-
...output,
|
|
577
|
-
body: await parseErrorBody(output.body, context),
|
|
578
|
-
};
|
|
579
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
580
|
-
switch (errorCode) {
|
|
581
|
-
case "InternalServerException":
|
|
582
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
583
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
584
|
-
case "ValidationException":
|
|
585
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
586
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
587
|
-
default:
|
|
588
|
-
const parsedBody = parsedOutput.body;
|
|
589
|
-
return throwDefaultError({
|
|
590
|
-
output,
|
|
591
|
-
parsedBody,
|
|
592
|
-
errorCode,
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
const de_DescribeRuntimeVersionsCommand = async (output, context) => {
|
|
597
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
598
|
-
return de_DescribeRuntimeVersionsCommandError(output, context);
|
|
599
|
-
}
|
|
600
|
-
const contents = (0, smithy_client_1.map)({
|
|
601
|
-
$metadata: deserializeMetadata(output),
|
|
602
|
-
});
|
|
603
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
604
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
605
|
-
NextToken: smithy_client_1.expectString,
|
|
606
|
-
RuntimeVersions: (_) => de_RuntimeVersionList(_, context),
|
|
607
|
-
});
|
|
608
|
-
Object.assign(contents, doc);
|
|
609
|
-
return contents;
|
|
610
|
-
};
|
|
611
|
-
exports.de_DescribeRuntimeVersionsCommand = de_DescribeRuntimeVersionsCommand;
|
|
612
|
-
const de_DescribeRuntimeVersionsCommandError = async (output, context) => {
|
|
613
|
-
const parsedOutput = {
|
|
614
|
-
...output,
|
|
615
|
-
body: await parseErrorBody(output.body, context),
|
|
616
|
-
};
|
|
617
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
618
|
-
switch (errorCode) {
|
|
619
|
-
case "InternalServerException":
|
|
620
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
621
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
622
|
-
case "ValidationException":
|
|
623
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
624
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
625
|
-
default:
|
|
626
|
-
const parsedBody = parsedOutput.body;
|
|
627
|
-
return throwDefaultError({
|
|
628
|
-
output,
|
|
629
|
-
parsedBody,
|
|
630
|
-
errorCode,
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
const de_DisassociateResourceCommand = async (output, context) => {
|
|
635
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
636
|
-
return de_DisassociateResourceCommandError(output, context);
|
|
637
|
-
}
|
|
638
|
-
const contents = (0, smithy_client_1.map)({
|
|
639
|
-
$metadata: deserializeMetadata(output),
|
|
640
|
-
});
|
|
641
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
642
|
-
return contents;
|
|
643
|
-
};
|
|
644
|
-
exports.de_DisassociateResourceCommand = de_DisassociateResourceCommand;
|
|
645
|
-
const de_DisassociateResourceCommandError = async (output, context) => {
|
|
646
|
-
const parsedOutput = {
|
|
647
|
-
...output,
|
|
648
|
-
body: await parseErrorBody(output.body, context),
|
|
649
|
-
};
|
|
650
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
651
|
-
switch (errorCode) {
|
|
652
|
-
case "ConflictException":
|
|
653
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
654
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
655
|
-
case "InternalServerException":
|
|
656
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
657
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
658
|
-
case "ResourceNotFoundException":
|
|
659
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
660
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
661
|
-
case "ValidationException":
|
|
662
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
663
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
664
|
-
default:
|
|
665
|
-
const parsedBody = parsedOutput.body;
|
|
666
|
-
return throwDefaultError({
|
|
667
|
-
output,
|
|
668
|
-
parsedBody,
|
|
669
|
-
errorCode,
|
|
670
|
-
});
|
|
671
|
-
}
|
|
672
|
-
};
|
|
673
|
-
const de_GetCanaryCommand = async (output, context) => {
|
|
674
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
675
|
-
return de_GetCanaryCommandError(output, context);
|
|
676
|
-
}
|
|
677
|
-
const contents = (0, smithy_client_1.map)({
|
|
678
|
-
$metadata: deserializeMetadata(output),
|
|
679
|
-
});
|
|
680
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
681
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
682
|
-
Canary: (_) => de_Canary(_, context),
|
|
683
|
-
});
|
|
684
|
-
Object.assign(contents, doc);
|
|
685
|
-
return contents;
|
|
686
|
-
};
|
|
687
|
-
exports.de_GetCanaryCommand = de_GetCanaryCommand;
|
|
688
|
-
const de_GetCanaryCommandError = async (output, context) => {
|
|
689
|
-
const parsedOutput = {
|
|
690
|
-
...output,
|
|
691
|
-
body: await parseErrorBody(output.body, context),
|
|
692
|
-
};
|
|
693
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
694
|
-
switch (errorCode) {
|
|
695
|
-
case "InternalServerException":
|
|
696
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
697
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
698
|
-
case "ValidationException":
|
|
699
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
700
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
701
|
-
default:
|
|
702
|
-
const parsedBody = parsedOutput.body;
|
|
703
|
-
return throwDefaultError({
|
|
704
|
-
output,
|
|
705
|
-
parsedBody,
|
|
706
|
-
errorCode,
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
};
|
|
710
|
-
const de_GetCanaryRunsCommand = async (output, context) => {
|
|
711
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
712
|
-
return de_GetCanaryRunsCommandError(output, context);
|
|
713
|
-
}
|
|
714
|
-
const contents = (0, smithy_client_1.map)({
|
|
715
|
-
$metadata: deserializeMetadata(output),
|
|
716
|
-
});
|
|
717
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
718
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
719
|
-
CanaryRuns: (_) => de_CanaryRuns(_, context),
|
|
720
|
-
NextToken: smithy_client_1.expectString,
|
|
721
|
-
});
|
|
722
|
-
Object.assign(contents, doc);
|
|
723
|
-
return contents;
|
|
724
|
-
};
|
|
725
|
-
exports.de_GetCanaryRunsCommand = de_GetCanaryRunsCommand;
|
|
726
|
-
const de_GetCanaryRunsCommandError = async (output, context) => {
|
|
727
|
-
const parsedOutput = {
|
|
728
|
-
...output,
|
|
729
|
-
body: await parseErrorBody(output.body, context),
|
|
730
|
-
};
|
|
731
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
732
|
-
switch (errorCode) {
|
|
733
|
-
case "InternalServerException":
|
|
734
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
735
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
736
|
-
case "ResourceNotFoundException":
|
|
737
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
738
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
739
|
-
case "ValidationException":
|
|
740
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
741
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
742
|
-
default:
|
|
743
|
-
const parsedBody = parsedOutput.body;
|
|
744
|
-
return throwDefaultError({
|
|
745
|
-
output,
|
|
746
|
-
parsedBody,
|
|
747
|
-
errorCode,
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
};
|
|
751
|
-
const de_GetGroupCommand = async (output, context) => {
|
|
752
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
753
|
-
return de_GetGroupCommandError(output, context);
|
|
754
|
-
}
|
|
755
|
-
const contents = (0, smithy_client_1.map)({
|
|
756
|
-
$metadata: deserializeMetadata(output),
|
|
757
|
-
});
|
|
758
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
759
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
760
|
-
Group: (_) => de_Group(_, context),
|
|
761
|
-
});
|
|
762
|
-
Object.assign(contents, doc);
|
|
763
|
-
return contents;
|
|
764
|
-
};
|
|
765
|
-
exports.de_GetGroupCommand = de_GetGroupCommand;
|
|
766
|
-
const de_GetGroupCommandError = async (output, context) => {
|
|
767
|
-
const parsedOutput = {
|
|
768
|
-
...output,
|
|
769
|
-
body: await parseErrorBody(output.body, context),
|
|
770
|
-
};
|
|
771
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
772
|
-
switch (errorCode) {
|
|
773
|
-
case "ConflictException":
|
|
774
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
775
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
776
|
-
case "InternalServerException":
|
|
777
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
778
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
779
|
-
case "ResourceNotFoundException":
|
|
780
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
781
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
782
|
-
case "ValidationException":
|
|
783
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
784
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
785
|
-
default:
|
|
786
|
-
const parsedBody = parsedOutput.body;
|
|
787
|
-
return throwDefaultError({
|
|
788
|
-
output,
|
|
789
|
-
parsedBody,
|
|
790
|
-
errorCode,
|
|
791
|
-
});
|
|
792
|
-
}
|
|
793
|
-
};
|
|
794
|
-
const de_ListAssociatedGroupsCommand = async (output, context) => {
|
|
795
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
796
|
-
return de_ListAssociatedGroupsCommandError(output, context);
|
|
797
|
-
}
|
|
798
|
-
const contents = (0, smithy_client_1.map)({
|
|
799
|
-
$metadata: deserializeMetadata(output),
|
|
800
|
-
});
|
|
801
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
802
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
803
|
-
Groups: smithy_client_1._json,
|
|
804
|
-
NextToken: smithy_client_1.expectString,
|
|
805
|
-
});
|
|
806
|
-
Object.assign(contents, doc);
|
|
807
|
-
return contents;
|
|
808
|
-
};
|
|
809
|
-
exports.de_ListAssociatedGroupsCommand = de_ListAssociatedGroupsCommand;
|
|
810
|
-
const de_ListAssociatedGroupsCommandError = async (output, context) => {
|
|
811
|
-
const parsedOutput = {
|
|
812
|
-
...output,
|
|
813
|
-
body: await parseErrorBody(output.body, context),
|
|
814
|
-
};
|
|
815
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
816
|
-
switch (errorCode) {
|
|
817
|
-
case "InternalServerException":
|
|
818
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
819
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
820
|
-
case "ResourceNotFoundException":
|
|
821
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
822
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
823
|
-
case "ValidationException":
|
|
824
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
825
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
826
|
-
default:
|
|
827
|
-
const parsedBody = parsedOutput.body;
|
|
828
|
-
return throwDefaultError({
|
|
829
|
-
output,
|
|
830
|
-
parsedBody,
|
|
831
|
-
errorCode,
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
const de_ListGroupResourcesCommand = async (output, context) => {
|
|
836
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
837
|
-
return de_ListGroupResourcesCommandError(output, context);
|
|
838
|
-
}
|
|
839
|
-
const contents = (0, smithy_client_1.map)({
|
|
840
|
-
$metadata: deserializeMetadata(output),
|
|
841
|
-
});
|
|
842
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
843
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
844
|
-
NextToken: smithy_client_1.expectString,
|
|
845
|
-
Resources: smithy_client_1._json,
|
|
846
|
-
});
|
|
847
|
-
Object.assign(contents, doc);
|
|
848
|
-
return contents;
|
|
849
|
-
};
|
|
850
|
-
exports.de_ListGroupResourcesCommand = de_ListGroupResourcesCommand;
|
|
851
|
-
const de_ListGroupResourcesCommandError = async (output, context) => {
|
|
852
|
-
const parsedOutput = {
|
|
853
|
-
...output,
|
|
854
|
-
body: await parseErrorBody(output.body, context),
|
|
855
|
-
};
|
|
856
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
857
|
-
switch (errorCode) {
|
|
858
|
-
case "ConflictException":
|
|
859
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
860
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
861
|
-
case "InternalServerException":
|
|
862
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
863
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
864
|
-
case "ResourceNotFoundException":
|
|
865
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
866
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
867
|
-
case "ValidationException":
|
|
868
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
869
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
870
|
-
default:
|
|
871
|
-
const parsedBody = parsedOutput.body;
|
|
872
|
-
return throwDefaultError({
|
|
873
|
-
output,
|
|
874
|
-
parsedBody,
|
|
875
|
-
errorCode,
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
};
|
|
879
|
-
const de_ListGroupsCommand = async (output, context) => {
|
|
880
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
881
|
-
return de_ListGroupsCommandError(output, context);
|
|
882
|
-
}
|
|
883
|
-
const contents = (0, smithy_client_1.map)({
|
|
884
|
-
$metadata: deserializeMetadata(output),
|
|
885
|
-
});
|
|
886
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
887
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
888
|
-
Groups: smithy_client_1._json,
|
|
889
|
-
NextToken: smithy_client_1.expectString,
|
|
890
|
-
});
|
|
891
|
-
Object.assign(contents, doc);
|
|
892
|
-
return contents;
|
|
893
|
-
};
|
|
894
|
-
exports.de_ListGroupsCommand = de_ListGroupsCommand;
|
|
895
|
-
const de_ListGroupsCommandError = async (output, context) => {
|
|
896
|
-
const parsedOutput = {
|
|
897
|
-
...output,
|
|
898
|
-
body: await parseErrorBody(output.body, context),
|
|
899
|
-
};
|
|
900
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
901
|
-
switch (errorCode) {
|
|
902
|
-
case "InternalServerException":
|
|
903
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
904
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
905
|
-
case "ValidationException":
|
|
906
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
907
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
908
|
-
default:
|
|
909
|
-
const parsedBody = parsedOutput.body;
|
|
910
|
-
return throwDefaultError({
|
|
911
|
-
output,
|
|
912
|
-
parsedBody,
|
|
913
|
-
errorCode,
|
|
914
|
-
});
|
|
915
|
-
}
|
|
916
|
-
};
|
|
917
|
-
const de_ListTagsForResourceCommand = async (output, context) => {
|
|
918
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
919
|
-
return de_ListTagsForResourceCommandError(output, context);
|
|
920
|
-
}
|
|
921
|
-
const contents = (0, smithy_client_1.map)({
|
|
922
|
-
$metadata: deserializeMetadata(output),
|
|
923
|
-
});
|
|
924
|
-
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
925
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
926
|
-
Tags: smithy_client_1._json,
|
|
927
|
-
});
|
|
928
|
-
Object.assign(contents, doc);
|
|
929
|
-
return contents;
|
|
930
|
-
};
|
|
931
|
-
exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
|
|
932
|
-
const de_ListTagsForResourceCommandError = async (output, context) => {
|
|
933
|
-
const parsedOutput = {
|
|
934
|
-
...output,
|
|
935
|
-
body: await parseErrorBody(output.body, context),
|
|
936
|
-
};
|
|
937
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
938
|
-
switch (errorCode) {
|
|
939
|
-
case "BadRequestException":
|
|
940
|
-
case "com.amazonaws.synthetics#BadRequestException":
|
|
941
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
942
|
-
case "ConflictException":
|
|
943
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
944
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
945
|
-
case "InternalFailureException":
|
|
946
|
-
case "com.amazonaws.synthetics#InternalFailureException":
|
|
947
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
948
|
-
case "NotFoundException":
|
|
949
|
-
case "com.amazonaws.synthetics#NotFoundException":
|
|
950
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
951
|
-
case "TooManyRequestsException":
|
|
952
|
-
case "com.amazonaws.synthetics#TooManyRequestsException":
|
|
953
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
954
|
-
default:
|
|
955
|
-
const parsedBody = parsedOutput.body;
|
|
956
|
-
return throwDefaultError({
|
|
957
|
-
output,
|
|
958
|
-
parsedBody,
|
|
959
|
-
errorCode,
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
};
|
|
963
|
-
const de_StartCanaryCommand = async (output, context) => {
|
|
964
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
965
|
-
return de_StartCanaryCommandError(output, context);
|
|
966
|
-
}
|
|
967
|
-
const contents = (0, smithy_client_1.map)({
|
|
968
|
-
$metadata: deserializeMetadata(output),
|
|
969
|
-
});
|
|
970
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
971
|
-
return contents;
|
|
972
|
-
};
|
|
973
|
-
exports.de_StartCanaryCommand = de_StartCanaryCommand;
|
|
974
|
-
const de_StartCanaryCommandError = async (output, context) => {
|
|
975
|
-
const parsedOutput = {
|
|
976
|
-
...output,
|
|
977
|
-
body: await parseErrorBody(output.body, context),
|
|
978
|
-
};
|
|
979
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
980
|
-
switch (errorCode) {
|
|
981
|
-
case "ConflictException":
|
|
982
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
983
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
984
|
-
case "InternalServerException":
|
|
985
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
986
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
987
|
-
case "ResourceNotFoundException":
|
|
988
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
989
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
990
|
-
case "ValidationException":
|
|
991
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
992
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
993
|
-
default:
|
|
994
|
-
const parsedBody = parsedOutput.body;
|
|
995
|
-
return throwDefaultError({
|
|
996
|
-
output,
|
|
997
|
-
parsedBody,
|
|
998
|
-
errorCode,
|
|
999
|
-
});
|
|
1000
|
-
}
|
|
1001
|
-
};
|
|
1002
|
-
const de_StopCanaryCommand = async (output, context) => {
|
|
1003
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1004
|
-
return de_StopCanaryCommandError(output, context);
|
|
1005
|
-
}
|
|
1006
|
-
const contents = (0, smithy_client_1.map)({
|
|
1007
|
-
$metadata: deserializeMetadata(output),
|
|
1008
|
-
});
|
|
1009
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1010
|
-
return contents;
|
|
1011
|
-
};
|
|
1012
|
-
exports.de_StopCanaryCommand = de_StopCanaryCommand;
|
|
1013
|
-
const de_StopCanaryCommandError = async (output, context) => {
|
|
1014
|
-
const parsedOutput = {
|
|
1015
|
-
...output,
|
|
1016
|
-
body: await parseErrorBody(output.body, context),
|
|
1017
|
-
};
|
|
1018
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1019
|
-
switch (errorCode) {
|
|
1020
|
-
case "ConflictException":
|
|
1021
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
1022
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1023
|
-
case "InternalServerException":
|
|
1024
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
1025
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1026
|
-
case "ResourceNotFoundException":
|
|
1027
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
1028
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1029
|
-
case "ValidationException":
|
|
1030
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
1031
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1032
|
-
default:
|
|
1033
|
-
const parsedBody = parsedOutput.body;
|
|
1034
|
-
return throwDefaultError({
|
|
1035
|
-
output,
|
|
1036
|
-
parsedBody,
|
|
1037
|
-
errorCode,
|
|
1038
|
-
});
|
|
1039
|
-
}
|
|
1040
|
-
};
|
|
1041
|
-
const de_TagResourceCommand = async (output, context) => {
|
|
1042
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1043
|
-
return de_TagResourceCommandError(output, context);
|
|
1044
|
-
}
|
|
1045
|
-
const contents = (0, smithy_client_1.map)({
|
|
1046
|
-
$metadata: deserializeMetadata(output),
|
|
1047
|
-
});
|
|
1048
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1049
|
-
return contents;
|
|
1050
|
-
};
|
|
1051
|
-
exports.de_TagResourceCommand = de_TagResourceCommand;
|
|
1052
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
1053
|
-
const parsedOutput = {
|
|
1054
|
-
...output,
|
|
1055
|
-
body: await parseErrorBody(output.body, context),
|
|
1056
|
-
};
|
|
1057
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1058
|
-
switch (errorCode) {
|
|
1059
|
-
case "BadRequestException":
|
|
1060
|
-
case "com.amazonaws.synthetics#BadRequestException":
|
|
1061
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
1062
|
-
case "ConflictException":
|
|
1063
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
1064
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1065
|
-
case "InternalFailureException":
|
|
1066
|
-
case "com.amazonaws.synthetics#InternalFailureException":
|
|
1067
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1068
|
-
case "NotFoundException":
|
|
1069
|
-
case "com.amazonaws.synthetics#NotFoundException":
|
|
1070
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1071
|
-
case "TooManyRequestsException":
|
|
1072
|
-
case "com.amazonaws.synthetics#TooManyRequestsException":
|
|
1073
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1074
|
-
default:
|
|
1075
|
-
const parsedBody = parsedOutput.body;
|
|
1076
|
-
return throwDefaultError({
|
|
1077
|
-
output,
|
|
1078
|
-
parsedBody,
|
|
1079
|
-
errorCode,
|
|
1080
|
-
});
|
|
1081
|
-
}
|
|
1082
|
-
};
|
|
1083
|
-
const de_UntagResourceCommand = async (output, context) => {
|
|
1084
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1085
|
-
return de_UntagResourceCommandError(output, context);
|
|
1086
|
-
}
|
|
1087
|
-
const contents = (0, smithy_client_1.map)({
|
|
1088
|
-
$metadata: deserializeMetadata(output),
|
|
1089
|
-
});
|
|
1090
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1091
|
-
return contents;
|
|
1092
|
-
};
|
|
1093
|
-
exports.de_UntagResourceCommand = de_UntagResourceCommand;
|
|
1094
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
1095
|
-
const parsedOutput = {
|
|
1096
|
-
...output,
|
|
1097
|
-
body: await parseErrorBody(output.body, context),
|
|
1098
|
-
};
|
|
1099
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1100
|
-
switch (errorCode) {
|
|
1101
|
-
case "BadRequestException":
|
|
1102
|
-
case "com.amazonaws.synthetics#BadRequestException":
|
|
1103
|
-
throw await de_BadRequestExceptionRes(parsedOutput, context);
|
|
1104
|
-
case "ConflictException":
|
|
1105
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
1106
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1107
|
-
case "InternalFailureException":
|
|
1108
|
-
case "com.amazonaws.synthetics#InternalFailureException":
|
|
1109
|
-
throw await de_InternalFailureExceptionRes(parsedOutput, context);
|
|
1110
|
-
case "NotFoundException":
|
|
1111
|
-
case "com.amazonaws.synthetics#NotFoundException":
|
|
1112
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1113
|
-
case "TooManyRequestsException":
|
|
1114
|
-
case "com.amazonaws.synthetics#TooManyRequestsException":
|
|
1115
|
-
throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
|
|
1116
|
-
default:
|
|
1117
|
-
const parsedBody = parsedOutput.body;
|
|
1118
|
-
return throwDefaultError({
|
|
1119
|
-
output,
|
|
1120
|
-
parsedBody,
|
|
1121
|
-
errorCode,
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
};
|
|
1125
|
-
const de_UpdateCanaryCommand = async (output, context) => {
|
|
1126
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1127
|
-
return de_UpdateCanaryCommandError(output, context);
|
|
1128
|
-
}
|
|
1129
|
-
const contents = (0, smithy_client_1.map)({
|
|
1130
|
-
$metadata: deserializeMetadata(output),
|
|
1131
|
-
});
|
|
1132
|
-
await (0, smithy_client_1.collectBody)(output.body, context);
|
|
1133
|
-
return contents;
|
|
1134
|
-
};
|
|
1135
|
-
exports.de_UpdateCanaryCommand = de_UpdateCanaryCommand;
|
|
1136
|
-
const de_UpdateCanaryCommandError = async (output, context) => {
|
|
1137
|
-
const parsedOutput = {
|
|
1138
|
-
...output,
|
|
1139
|
-
body: await parseErrorBody(output.body, context),
|
|
1140
|
-
};
|
|
1141
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1142
|
-
switch (errorCode) {
|
|
1143
|
-
case "ConflictException":
|
|
1144
|
-
case "com.amazonaws.synthetics#ConflictException":
|
|
1145
|
-
throw await de_ConflictExceptionRes(parsedOutput, context);
|
|
1146
|
-
case "InternalServerException":
|
|
1147
|
-
case "com.amazonaws.synthetics#InternalServerException":
|
|
1148
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
1149
|
-
case "RequestEntityTooLargeException":
|
|
1150
|
-
case "com.amazonaws.synthetics#RequestEntityTooLargeException":
|
|
1151
|
-
throw await de_RequestEntityTooLargeExceptionRes(parsedOutput, context);
|
|
1152
|
-
case "ResourceNotFoundException":
|
|
1153
|
-
case "com.amazonaws.synthetics#ResourceNotFoundException":
|
|
1154
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
1155
|
-
case "ValidationException":
|
|
1156
|
-
case "com.amazonaws.synthetics#ValidationException":
|
|
1157
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
1158
|
-
default:
|
|
1159
|
-
const parsedBody = parsedOutput.body;
|
|
1160
|
-
return throwDefaultError({
|
|
1161
|
-
output,
|
|
1162
|
-
parsedBody,
|
|
1163
|
-
errorCode,
|
|
1164
|
-
});
|
|
1165
|
-
}
|
|
1166
|
-
};
|
|
1167
|
-
const throwDefaultError = (0, smithy_client_1.withBaseException)(SyntheticsServiceException_1.SyntheticsServiceException);
|
|
1168
|
-
const de_BadRequestExceptionRes = async (parsedOutput, context) => {
|
|
1169
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1170
|
-
const data = parsedOutput.body;
|
|
1171
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1172
|
-
Message: smithy_client_1.expectString,
|
|
1173
|
-
});
|
|
1174
|
-
Object.assign(contents, doc);
|
|
1175
|
-
const exception = new models_0_1.BadRequestException({
|
|
1176
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1177
|
-
...contents,
|
|
1178
|
-
});
|
|
1179
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1180
|
-
};
|
|
1181
|
-
const de_ConflictExceptionRes = async (parsedOutput, context) => {
|
|
1182
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1183
|
-
const data = parsedOutput.body;
|
|
1184
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1185
|
-
Message: smithy_client_1.expectString,
|
|
1186
|
-
});
|
|
1187
|
-
Object.assign(contents, doc);
|
|
1188
|
-
const exception = new models_0_1.ConflictException({
|
|
1189
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1190
|
-
...contents,
|
|
1191
|
-
});
|
|
1192
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1193
|
-
};
|
|
1194
|
-
const de_InternalFailureExceptionRes = async (parsedOutput, context) => {
|
|
1195
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1196
|
-
const data = parsedOutput.body;
|
|
1197
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1198
|
-
Message: smithy_client_1.expectString,
|
|
1199
|
-
});
|
|
1200
|
-
Object.assign(contents, doc);
|
|
1201
|
-
const exception = new models_0_1.InternalFailureException({
|
|
1202
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1203
|
-
...contents,
|
|
1204
|
-
});
|
|
1205
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1206
|
-
};
|
|
1207
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
1208
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1209
|
-
const data = parsedOutput.body;
|
|
1210
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1211
|
-
Message: smithy_client_1.expectString,
|
|
1212
|
-
});
|
|
1213
|
-
Object.assign(contents, doc);
|
|
1214
|
-
const exception = new models_0_1.InternalServerException({
|
|
1215
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1216
|
-
...contents,
|
|
1217
|
-
});
|
|
1218
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1219
|
-
};
|
|
1220
|
-
const de_NotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1221
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1222
|
-
const data = parsedOutput.body;
|
|
1223
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1224
|
-
Message: smithy_client_1.expectString,
|
|
1225
|
-
});
|
|
1226
|
-
Object.assign(contents, doc);
|
|
1227
|
-
const exception = new models_0_1.NotFoundException({
|
|
1228
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1229
|
-
...contents,
|
|
1230
|
-
});
|
|
1231
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1232
|
-
};
|
|
1233
|
-
const de_RequestEntityTooLargeExceptionRes = async (parsedOutput, context) => {
|
|
1234
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1235
|
-
const data = parsedOutput.body;
|
|
1236
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1237
|
-
Message: smithy_client_1.expectString,
|
|
1238
|
-
});
|
|
1239
|
-
Object.assign(contents, doc);
|
|
1240
|
-
const exception = new models_0_1.RequestEntityTooLargeException({
|
|
1241
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1242
|
-
...contents,
|
|
1243
|
-
});
|
|
1244
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1245
|
-
};
|
|
1246
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
1247
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1248
|
-
const data = parsedOutput.body;
|
|
1249
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1250
|
-
Message: smithy_client_1.expectString,
|
|
1251
|
-
});
|
|
1252
|
-
Object.assign(contents, doc);
|
|
1253
|
-
const exception = new models_0_1.ResourceNotFoundException({
|
|
1254
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1255
|
-
...contents,
|
|
1256
|
-
});
|
|
1257
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1258
|
-
};
|
|
1259
|
-
const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
|
|
1260
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1261
|
-
const data = parsedOutput.body;
|
|
1262
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1263
|
-
Message: smithy_client_1.expectString,
|
|
1264
|
-
});
|
|
1265
|
-
Object.assign(contents, doc);
|
|
1266
|
-
const exception = new models_0_1.ServiceQuotaExceededException({
|
|
1267
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1268
|
-
...contents,
|
|
1269
|
-
});
|
|
1270
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1271
|
-
};
|
|
1272
|
-
const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
|
|
1273
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1274
|
-
const data = parsedOutput.body;
|
|
1275
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1276
|
-
Message: smithy_client_1.expectString,
|
|
1277
|
-
});
|
|
1278
|
-
Object.assign(contents, doc);
|
|
1279
|
-
const exception = new models_0_1.TooManyRequestsException({
|
|
1280
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1281
|
-
...contents,
|
|
1282
|
-
});
|
|
1283
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1284
|
-
};
|
|
1285
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
1286
|
-
const contents = (0, smithy_client_1.map)({});
|
|
1287
|
-
const data = parsedOutput.body;
|
|
1288
|
-
const doc = (0, smithy_client_1.take)(data, {
|
|
1289
|
-
Message: smithy_client_1.expectString,
|
|
1290
|
-
});
|
|
1291
|
-
Object.assign(contents, doc);
|
|
1292
|
-
const exception = new models_0_1.ValidationException({
|
|
1293
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
1294
|
-
...contents,
|
|
1295
|
-
});
|
|
1296
|
-
return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
|
|
1297
|
-
};
|
|
1298
|
-
const se_CanaryCodeInput = (input, context) => {
|
|
1299
|
-
return (0, smithy_client_1.take)(input, {
|
|
1300
|
-
Handler: [],
|
|
1301
|
-
S3Bucket: [],
|
|
1302
|
-
S3Key: [],
|
|
1303
|
-
S3Version: [],
|
|
1304
|
-
ZipFile: context.base64Encoder,
|
|
1305
|
-
});
|
|
1306
|
-
};
|
|
1307
|
-
const de_Canaries = (output, context) => {
|
|
1308
|
-
const retVal = (output || [])
|
|
1309
|
-
.filter((e) => e != null)
|
|
1310
|
-
.map((entry) => {
|
|
1311
|
-
return de_Canary(entry, context);
|
|
1312
|
-
});
|
|
1313
|
-
return retVal;
|
|
1314
|
-
};
|
|
1315
|
-
const de_CanariesLastRun = (output, context) => {
|
|
1316
|
-
const retVal = (output || [])
|
|
1317
|
-
.filter((e) => e != null)
|
|
1318
|
-
.map((entry) => {
|
|
1319
|
-
return de_CanaryLastRun(entry, context);
|
|
1320
|
-
});
|
|
1321
|
-
return retVal;
|
|
1322
|
-
};
|
|
1323
|
-
const de_Canary = (output, context) => {
|
|
1324
|
-
return (0, smithy_client_1.take)(output, {
|
|
1325
|
-
ArtifactConfig: smithy_client_1._json,
|
|
1326
|
-
ArtifactS3Location: smithy_client_1.expectString,
|
|
1327
|
-
Code: smithy_client_1._json,
|
|
1328
|
-
EngineArn: smithy_client_1.expectString,
|
|
1329
|
-
ExecutionRoleArn: smithy_client_1.expectString,
|
|
1330
|
-
FailureRetentionPeriodInDays: smithy_client_1.expectInt32,
|
|
1331
|
-
Id: smithy_client_1.expectString,
|
|
1332
|
-
Name: smithy_client_1.expectString,
|
|
1333
|
-
RunConfig: smithy_client_1._json,
|
|
1334
|
-
RuntimeVersion: smithy_client_1.expectString,
|
|
1335
|
-
Schedule: smithy_client_1._json,
|
|
1336
|
-
Status: smithy_client_1._json,
|
|
1337
|
-
SuccessRetentionPeriodInDays: smithy_client_1.expectInt32,
|
|
1338
|
-
Tags: smithy_client_1._json,
|
|
1339
|
-
Timeline: (_) => de_CanaryTimeline(_, context),
|
|
1340
|
-
VisualReference: smithy_client_1._json,
|
|
1341
|
-
VpcConfig: smithy_client_1._json,
|
|
1342
|
-
});
|
|
1343
|
-
};
|
|
1344
|
-
const de_CanaryLastRun = (output, context) => {
|
|
1345
|
-
return (0, smithy_client_1.take)(output, {
|
|
1346
|
-
CanaryName: smithy_client_1.expectString,
|
|
1347
|
-
LastRun: (_) => de_CanaryRun(_, context),
|
|
1348
|
-
});
|
|
1349
|
-
};
|
|
1350
|
-
const de_CanaryRun = (output, context) => {
|
|
1351
|
-
return (0, smithy_client_1.take)(output, {
|
|
1352
|
-
ArtifactS3Location: smithy_client_1.expectString,
|
|
1353
|
-
Id: smithy_client_1.expectString,
|
|
1354
|
-
Name: smithy_client_1.expectString,
|
|
1355
|
-
Status: smithy_client_1._json,
|
|
1356
|
-
Timeline: (_) => de_CanaryRunTimeline(_, context),
|
|
1357
|
-
});
|
|
1358
|
-
};
|
|
1359
|
-
const de_CanaryRuns = (output, context) => {
|
|
1360
|
-
const retVal = (output || [])
|
|
1361
|
-
.filter((e) => e != null)
|
|
1362
|
-
.map((entry) => {
|
|
1363
|
-
return de_CanaryRun(entry, context);
|
|
1364
|
-
});
|
|
1365
|
-
return retVal;
|
|
1366
|
-
};
|
|
1367
|
-
const de_CanaryRunTimeline = (output, context) => {
|
|
1368
|
-
return (0, smithy_client_1.take)(output, {
|
|
1369
|
-
Completed: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1370
|
-
Started: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1371
|
-
});
|
|
1372
|
-
};
|
|
1373
|
-
const de_CanaryTimeline = (output, context) => {
|
|
1374
|
-
return (0, smithy_client_1.take)(output, {
|
|
1375
|
-
Created: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1376
|
-
LastModified: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1377
|
-
LastStarted: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1378
|
-
LastStopped: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1379
|
-
});
|
|
1380
|
-
};
|
|
1381
|
-
const de_Group = (output, context) => {
|
|
1382
|
-
return (0, smithy_client_1.take)(output, {
|
|
1383
|
-
Arn: smithy_client_1.expectString,
|
|
1384
|
-
CreatedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1385
|
-
Id: smithy_client_1.expectString,
|
|
1386
|
-
LastModifiedTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1387
|
-
Name: smithy_client_1.expectString,
|
|
1388
|
-
Tags: smithy_client_1._json,
|
|
1389
|
-
});
|
|
1390
|
-
};
|
|
1391
|
-
const de_RuntimeVersion = (output, context) => {
|
|
1392
|
-
return (0, smithy_client_1.take)(output, {
|
|
1393
|
-
DeprecationDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1394
|
-
Description: smithy_client_1.expectString,
|
|
1395
|
-
ReleaseDate: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
1396
|
-
VersionName: smithy_client_1.expectString,
|
|
1397
|
-
});
|
|
1398
|
-
};
|
|
1399
|
-
const de_RuntimeVersionList = (output, context) => {
|
|
1400
|
-
const retVal = (output || [])
|
|
1401
|
-
.filter((e) => e != null)
|
|
1402
|
-
.map((entry) => {
|
|
1403
|
-
return de_RuntimeVersion(entry, context);
|
|
1404
|
-
});
|
|
1405
|
-
return retVal;
|
|
1406
|
-
};
|
|
1407
|
-
const deserializeMetadata = (output) => ({
|
|
1408
|
-
httpStatusCode: output.statusCode,
|
|
1409
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1410
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1411
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
1412
|
-
});
|
|
1413
|
-
const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1414
|
-
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1415
|
-
value !== null &&
|
|
1416
|
-
value !== "" &&
|
|
1417
|
-
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1418
|
-
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1419
|
-
const _DL = "DeleteLambda";
|
|
1420
|
-
const _TK = "TagKeys";
|
|
1421
|
-
const _dL = "deleteLambda";
|
|
1422
|
-
const _tK = "tagKeys";
|
|
1423
|
-
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1424
|
-
if (encoded.length) {
|
|
1425
|
-
return JSON.parse(encoded);
|
|
1426
|
-
}
|
|
1427
|
-
return {};
|
|
1428
|
-
});
|
|
1429
|
-
const parseErrorBody = async (errorBody, context) => {
|
|
1430
|
-
const value = await parseBody(errorBody, context);
|
|
1431
|
-
value.message = value.message ?? value.Message;
|
|
1432
|
-
return value;
|
|
1433
|
-
};
|
|
1434
|
-
const loadRestJsonErrorCode = (output, data) => {
|
|
1435
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1436
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
1437
|
-
let cleanValue = rawValue;
|
|
1438
|
-
if (typeof cleanValue === "number") {
|
|
1439
|
-
cleanValue = cleanValue.toString();
|
|
1440
|
-
}
|
|
1441
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
1442
|
-
cleanValue = cleanValue.split(",")[0];
|
|
1443
|
-
}
|
|
1444
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
1445
|
-
cleanValue = cleanValue.split(":")[0];
|
|
1446
|
-
}
|
|
1447
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
1448
|
-
cleanValue = cleanValue.split("#")[1];
|
|
1449
|
-
}
|
|
1450
|
-
return cleanValue;
|
|
1451
|
-
};
|
|
1452
|
-
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1453
|
-
if (headerKey !== undefined) {
|
|
1454
|
-
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1455
|
-
}
|
|
1456
|
-
if (data.code !== undefined) {
|
|
1457
|
-
return sanitizeErrorCode(data.code);
|
|
1458
|
-
}
|
|
1459
|
-
if (data["__type"] !== undefined) {
|
|
1460
|
-
return sanitizeErrorCode(data["__type"]);
|
|
1461
|
-
}
|
|
1462
|
-
};
|
|
1
|
+
module.exports = require("../index.js");
|