@aws-sdk/client-fis 3.180.0 → 3.183.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 +20 -0
- package/dist-cjs/protocols/Aws_restJson1.js +22 -16
- package/dist-es/Fis.js +66 -73
- package/dist-es/FisClient.js +22 -28
- package/dist-es/commands/CreateExperimentTemplateCommand.js +21 -28
- package/dist-es/commands/DeleteExperimentTemplateCommand.js +21 -28
- package/dist-es/commands/GetActionCommand.js +21 -28
- package/dist-es/commands/GetExperimentCommand.js +21 -28
- package/dist-es/commands/GetExperimentTemplateCommand.js +21 -28
- package/dist-es/commands/GetTargetResourceTypeCommand.js +21 -28
- package/dist-es/commands/ListActionsCommand.js +21 -28
- package/dist-es/commands/ListExperimentTemplatesCommand.js +21 -28
- package/dist-es/commands/ListExperimentsCommand.js +21 -28
- package/dist-es/commands/ListTagsForResourceCommand.js +21 -28
- package/dist-es/commands/ListTargetResourceTypesCommand.js +21 -28
- package/dist-es/commands/StartExperimentCommand.js +21 -28
- package/dist-es/commands/StopExperimentCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/commands/UpdateExperimentTemplateCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/FisServiceException.js +5 -10
- package/dist-es/models/models_0.js +254 -115
- package/dist-es/pagination/ListActionsPaginator.js +25 -68
- package/dist-es/pagination/ListExperimentTemplatesPaginator.js +25 -68
- package/dist-es/pagination/ListExperimentsPaginator.js +25 -68
- package/dist-es/pagination/ListTargetResourceTypesPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +1275 -1653
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1572 +1,1185 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectObject as __expectObject, expectString as __expectString, map as __map, parseEpochTimestamp as __parseEpochTimestamp, resolvedPath as __resolvedPath, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { FisServiceException as __BaseException } from "../models/FisServiceException";
|
|
6
5
|
import { ConflictException, ResourceNotFoundException, ServiceQuotaExceededException, ValidationException, } from "../models/models_0";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
export
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
})
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
protocol: protocol,
|
|
338
|
-
hostname: hostname,
|
|
339
|
-
port: port,
|
|
340
|
-
method: "POST",
|
|
341
|
-
headers: headers,
|
|
342
|
-
path: resolvedPath,
|
|
343
|
-
body: body,
|
|
344
|
-
})];
|
|
345
|
-
}
|
|
346
|
-
});
|
|
347
|
-
}); };
|
|
348
|
-
export var serializeAws_restJson1UntagResourceCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
349
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, query, body;
|
|
350
|
-
return __generator(this, function (_c) {
|
|
351
|
-
switch (_c.label) {
|
|
352
|
-
case 0: return [4, context.endpoint()];
|
|
353
|
-
case 1:
|
|
354
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
355
|
-
headers = {};
|
|
356
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/tags/{resourceArn}";
|
|
357
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", function () { return input.resourceArn; }, "{resourceArn}", false);
|
|
358
|
-
query = map({
|
|
359
|
-
tagKeys: [function () { return input.tagKeys !== void 0; }, function () { return (input.tagKeys || []).map(function (_entry) { return _entry; }); }],
|
|
360
|
-
});
|
|
361
|
-
return [2, new __HttpRequest({
|
|
362
|
-
protocol: protocol,
|
|
363
|
-
hostname: hostname,
|
|
364
|
-
port: port,
|
|
365
|
-
method: "DELETE",
|
|
366
|
-
headers: headers,
|
|
367
|
-
path: resolvedPath,
|
|
368
|
-
query: query,
|
|
369
|
-
body: body,
|
|
370
|
-
})];
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
}); };
|
|
374
|
-
export var serializeAws_restJson1UpdateExperimentTemplateCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
375
|
-
var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
|
|
376
|
-
return __generator(this, function (_c) {
|
|
377
|
-
switch (_c.label) {
|
|
378
|
-
case 0: return [4, context.endpoint()];
|
|
379
|
-
case 1:
|
|
380
|
-
_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
|
|
381
|
-
headers = {
|
|
382
|
-
"content-type": "application/json",
|
|
383
|
-
};
|
|
384
|
-
resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/experimentTemplates/{id}";
|
|
385
|
-
resolvedPath = __resolvedPath(resolvedPath, input, "id", function () { return input.id; }, "{id}", false);
|
|
386
|
-
body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.actions != null && {
|
|
387
|
-
actions: serializeAws_restJson1UpdateExperimentTemplateActionInputMap(input.actions, context),
|
|
388
|
-
})), (input.description != null && { description: input.description })), (input.logConfiguration != null && {
|
|
389
|
-
logConfiguration: serializeAws_restJson1UpdateExperimentTemplateLogConfigurationInput(input.logConfiguration, context),
|
|
390
|
-
})), (input.roleArn != null && { roleArn: input.roleArn })), (input.stopConditions != null && {
|
|
391
|
-
stopConditions: serializeAws_restJson1UpdateExperimentTemplateStopConditionInputList(input.stopConditions, context),
|
|
392
|
-
})), (input.targets != null && {
|
|
393
|
-
targets: serializeAws_restJson1UpdateExperimentTemplateTargetInputMap(input.targets, context),
|
|
394
|
-
})));
|
|
395
|
-
return [2, new __HttpRequest({
|
|
396
|
-
protocol: protocol,
|
|
397
|
-
hostname: hostname,
|
|
398
|
-
port: port,
|
|
399
|
-
method: "PATCH",
|
|
400
|
-
headers: headers,
|
|
401
|
-
path: resolvedPath,
|
|
402
|
-
body: body,
|
|
403
|
-
})];
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
}); };
|
|
407
|
-
export var deserializeAws_restJson1CreateExperimentTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
408
|
-
var contents, data, _a, _b;
|
|
409
|
-
return __generator(this, function (_c) {
|
|
410
|
-
switch (_c.label) {
|
|
411
|
-
case 0:
|
|
412
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
413
|
-
return [2, deserializeAws_restJson1CreateExperimentTemplateCommandError(output, context)];
|
|
414
|
-
}
|
|
415
|
-
contents = map({
|
|
416
|
-
$metadata: deserializeMetadata(output),
|
|
417
|
-
});
|
|
418
|
-
_a = __expectNonNull;
|
|
419
|
-
_b = __expectObject;
|
|
420
|
-
return [4, parseBody(output.body, context)];
|
|
421
|
-
case 1:
|
|
422
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
423
|
-
if (data.experimentTemplate != null) {
|
|
424
|
-
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
425
|
-
}
|
|
426
|
-
return [2, contents];
|
|
427
|
-
}
|
|
428
|
-
});
|
|
429
|
-
}); };
|
|
430
|
-
var deserializeAws_restJson1CreateExperimentTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
431
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
432
|
-
var _c;
|
|
433
|
-
return __generator(this, function (_d) {
|
|
434
|
-
switch (_d.label) {
|
|
435
|
-
case 0:
|
|
436
|
-
_a = [__assign({}, output)];
|
|
437
|
-
_c = {};
|
|
438
|
-
return [4, parseBody(output.body, context)];
|
|
439
|
-
case 1:
|
|
440
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
441
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
442
|
-
_b = errorCode;
|
|
443
|
-
switch (_b) {
|
|
444
|
-
case "ConflictException": return [3, 2];
|
|
445
|
-
case "com.amazonaws.fis#ConflictException": return [3, 2];
|
|
446
|
-
case "ResourceNotFoundException": return [3, 4];
|
|
447
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 4];
|
|
448
|
-
case "ServiceQuotaExceededException": return [3, 6];
|
|
449
|
-
case "com.amazonaws.fis#ServiceQuotaExceededException": return [3, 6];
|
|
450
|
-
case "ValidationException": return [3, 8];
|
|
451
|
-
case "com.amazonaws.fis#ValidationException": return [3, 8];
|
|
452
|
-
}
|
|
453
|
-
return [3, 10];
|
|
454
|
-
case 2: return [4, deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)];
|
|
455
|
-
case 3: throw _d.sent();
|
|
456
|
-
case 4: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
457
|
-
case 5: throw _d.sent();
|
|
458
|
-
case 6: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
459
|
-
case 7: throw _d.sent();
|
|
460
|
-
case 8: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
461
|
-
case 9: throw _d.sent();
|
|
462
|
-
case 10:
|
|
463
|
-
parsedBody = parsedOutput.body;
|
|
464
|
-
throwDefaultError({
|
|
465
|
-
output: output,
|
|
466
|
-
parsedBody: parsedBody,
|
|
467
|
-
exceptionCtor: __BaseException,
|
|
468
|
-
errorCode: errorCode,
|
|
469
|
-
});
|
|
470
|
-
_d.label = 11;
|
|
471
|
-
case 11: return [2];
|
|
472
|
-
}
|
|
473
|
-
});
|
|
474
|
-
}); };
|
|
475
|
-
export var deserializeAws_restJson1DeleteExperimentTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
476
|
-
var contents, data, _a, _b;
|
|
477
|
-
return __generator(this, function (_c) {
|
|
478
|
-
switch (_c.label) {
|
|
479
|
-
case 0:
|
|
480
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
481
|
-
return [2, deserializeAws_restJson1DeleteExperimentTemplateCommandError(output, context)];
|
|
482
|
-
}
|
|
483
|
-
contents = map({
|
|
484
|
-
$metadata: deserializeMetadata(output),
|
|
485
|
-
});
|
|
486
|
-
_a = __expectNonNull;
|
|
487
|
-
_b = __expectObject;
|
|
488
|
-
return [4, parseBody(output.body, context)];
|
|
489
|
-
case 1:
|
|
490
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
491
|
-
if (data.experimentTemplate != null) {
|
|
492
|
-
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
493
|
-
}
|
|
494
|
-
return [2, contents];
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
}); };
|
|
498
|
-
var deserializeAws_restJson1DeleteExperimentTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
499
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
500
|
-
var _c;
|
|
501
|
-
return __generator(this, function (_d) {
|
|
502
|
-
switch (_d.label) {
|
|
503
|
-
case 0:
|
|
504
|
-
_a = [__assign({}, output)];
|
|
505
|
-
_c = {};
|
|
506
|
-
return [4, parseBody(output.body, context)];
|
|
507
|
-
case 1:
|
|
508
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
509
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
510
|
-
_b = errorCode;
|
|
511
|
-
switch (_b) {
|
|
512
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
513
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 2];
|
|
514
|
-
case "ValidationException": return [3, 4];
|
|
515
|
-
case "com.amazonaws.fis#ValidationException": return [3, 4];
|
|
516
|
-
}
|
|
517
|
-
return [3, 6];
|
|
518
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
519
|
-
case 3: throw _d.sent();
|
|
520
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
521
|
-
case 5: throw _d.sent();
|
|
522
|
-
case 6:
|
|
523
|
-
parsedBody = parsedOutput.body;
|
|
524
|
-
throwDefaultError({
|
|
525
|
-
output: output,
|
|
526
|
-
parsedBody: parsedBody,
|
|
527
|
-
exceptionCtor: __BaseException,
|
|
528
|
-
errorCode: errorCode,
|
|
529
|
-
});
|
|
530
|
-
_d.label = 7;
|
|
531
|
-
case 7: return [2];
|
|
532
|
-
}
|
|
533
|
-
});
|
|
534
|
-
}); };
|
|
535
|
-
export var deserializeAws_restJson1GetActionCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
536
|
-
var contents, data, _a, _b;
|
|
537
|
-
return __generator(this, function (_c) {
|
|
538
|
-
switch (_c.label) {
|
|
539
|
-
case 0:
|
|
540
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
541
|
-
return [2, deserializeAws_restJson1GetActionCommandError(output, context)];
|
|
542
|
-
}
|
|
543
|
-
contents = map({
|
|
544
|
-
$metadata: deserializeMetadata(output),
|
|
545
|
-
});
|
|
546
|
-
_a = __expectNonNull;
|
|
547
|
-
_b = __expectObject;
|
|
548
|
-
return [4, parseBody(output.body, context)];
|
|
549
|
-
case 1:
|
|
550
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
551
|
-
if (data.action != null) {
|
|
552
|
-
contents.action = deserializeAws_restJson1Action(data.action, context);
|
|
553
|
-
}
|
|
554
|
-
return [2, contents];
|
|
555
|
-
}
|
|
556
|
-
});
|
|
557
|
-
}); };
|
|
558
|
-
var deserializeAws_restJson1GetActionCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
559
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
560
|
-
var _c;
|
|
561
|
-
return __generator(this, function (_d) {
|
|
562
|
-
switch (_d.label) {
|
|
563
|
-
case 0:
|
|
564
|
-
_a = [__assign({}, output)];
|
|
565
|
-
_c = {};
|
|
566
|
-
return [4, parseBody(output.body, context)];
|
|
567
|
-
case 1:
|
|
568
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
569
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
570
|
-
_b = errorCode;
|
|
571
|
-
switch (_b) {
|
|
572
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
573
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 2];
|
|
574
|
-
case "ValidationException": return [3, 4];
|
|
575
|
-
case "com.amazonaws.fis#ValidationException": return [3, 4];
|
|
576
|
-
}
|
|
577
|
-
return [3, 6];
|
|
578
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
579
|
-
case 3: throw _d.sent();
|
|
580
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
581
|
-
case 5: throw _d.sent();
|
|
582
|
-
case 6:
|
|
583
|
-
parsedBody = parsedOutput.body;
|
|
584
|
-
throwDefaultError({
|
|
585
|
-
output: output,
|
|
586
|
-
parsedBody: parsedBody,
|
|
587
|
-
exceptionCtor: __BaseException,
|
|
588
|
-
errorCode: errorCode,
|
|
589
|
-
});
|
|
590
|
-
_d.label = 7;
|
|
591
|
-
case 7: return [2];
|
|
592
|
-
}
|
|
593
|
-
});
|
|
594
|
-
}); };
|
|
595
|
-
export var deserializeAws_restJson1GetExperimentCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
596
|
-
var contents, data, _a, _b;
|
|
597
|
-
return __generator(this, function (_c) {
|
|
598
|
-
switch (_c.label) {
|
|
599
|
-
case 0:
|
|
600
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
601
|
-
return [2, deserializeAws_restJson1GetExperimentCommandError(output, context)];
|
|
602
|
-
}
|
|
603
|
-
contents = map({
|
|
604
|
-
$metadata: deserializeMetadata(output),
|
|
605
|
-
});
|
|
606
|
-
_a = __expectNonNull;
|
|
607
|
-
_b = __expectObject;
|
|
608
|
-
return [4, parseBody(output.body, context)];
|
|
609
|
-
case 1:
|
|
610
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
611
|
-
if (data.experiment != null) {
|
|
612
|
-
contents.experiment = deserializeAws_restJson1Experiment(data.experiment, context);
|
|
613
|
-
}
|
|
614
|
-
return [2, contents];
|
|
615
|
-
}
|
|
616
|
-
});
|
|
617
|
-
}); };
|
|
618
|
-
var deserializeAws_restJson1GetExperimentCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
619
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
620
|
-
var _c;
|
|
621
|
-
return __generator(this, function (_d) {
|
|
622
|
-
switch (_d.label) {
|
|
623
|
-
case 0:
|
|
624
|
-
_a = [__assign({}, output)];
|
|
625
|
-
_c = {};
|
|
626
|
-
return [4, parseBody(output.body, context)];
|
|
627
|
-
case 1:
|
|
628
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
629
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
630
|
-
_b = errorCode;
|
|
631
|
-
switch (_b) {
|
|
632
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
633
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 2];
|
|
634
|
-
case "ValidationException": return [3, 4];
|
|
635
|
-
case "com.amazonaws.fis#ValidationException": return [3, 4];
|
|
636
|
-
}
|
|
637
|
-
return [3, 6];
|
|
638
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
639
|
-
case 3: throw _d.sent();
|
|
640
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
641
|
-
case 5: throw _d.sent();
|
|
642
|
-
case 6:
|
|
643
|
-
parsedBody = parsedOutput.body;
|
|
644
|
-
throwDefaultError({
|
|
645
|
-
output: output,
|
|
646
|
-
parsedBody: parsedBody,
|
|
647
|
-
exceptionCtor: __BaseException,
|
|
648
|
-
errorCode: errorCode,
|
|
649
|
-
});
|
|
650
|
-
_d.label = 7;
|
|
651
|
-
case 7: return [2];
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
}); };
|
|
655
|
-
export var deserializeAws_restJson1GetExperimentTemplateCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
656
|
-
var contents, data, _a, _b;
|
|
657
|
-
return __generator(this, function (_c) {
|
|
658
|
-
switch (_c.label) {
|
|
659
|
-
case 0:
|
|
660
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
661
|
-
return [2, deserializeAws_restJson1GetExperimentTemplateCommandError(output, context)];
|
|
662
|
-
}
|
|
663
|
-
contents = map({
|
|
664
|
-
$metadata: deserializeMetadata(output),
|
|
665
|
-
});
|
|
666
|
-
_a = __expectNonNull;
|
|
667
|
-
_b = __expectObject;
|
|
668
|
-
return [4, parseBody(output.body, context)];
|
|
669
|
-
case 1:
|
|
670
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
671
|
-
if (data.experimentTemplate != null) {
|
|
672
|
-
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
673
|
-
}
|
|
674
|
-
return [2, contents];
|
|
675
|
-
}
|
|
676
|
-
});
|
|
677
|
-
}); };
|
|
678
|
-
var deserializeAws_restJson1GetExperimentTemplateCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
679
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
680
|
-
var _c;
|
|
681
|
-
return __generator(this, function (_d) {
|
|
682
|
-
switch (_d.label) {
|
|
683
|
-
case 0:
|
|
684
|
-
_a = [__assign({}, output)];
|
|
685
|
-
_c = {};
|
|
686
|
-
return [4, parseBody(output.body, context)];
|
|
687
|
-
case 1:
|
|
688
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
689
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
690
|
-
_b = errorCode;
|
|
691
|
-
switch (_b) {
|
|
692
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
693
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 2];
|
|
694
|
-
case "ValidationException": return [3, 4];
|
|
695
|
-
case "com.amazonaws.fis#ValidationException": return [3, 4];
|
|
696
|
-
}
|
|
697
|
-
return [3, 6];
|
|
698
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
699
|
-
case 3: throw _d.sent();
|
|
700
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
701
|
-
case 5: throw _d.sent();
|
|
702
|
-
case 6:
|
|
703
|
-
parsedBody = parsedOutput.body;
|
|
704
|
-
throwDefaultError({
|
|
705
|
-
output: output,
|
|
706
|
-
parsedBody: parsedBody,
|
|
707
|
-
exceptionCtor: __BaseException,
|
|
708
|
-
errorCode: errorCode,
|
|
709
|
-
});
|
|
710
|
-
_d.label = 7;
|
|
711
|
-
case 7: return [2];
|
|
712
|
-
}
|
|
713
|
-
});
|
|
714
|
-
}); };
|
|
715
|
-
export var deserializeAws_restJson1GetTargetResourceTypeCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
716
|
-
var contents, data, _a, _b;
|
|
717
|
-
return __generator(this, function (_c) {
|
|
718
|
-
switch (_c.label) {
|
|
719
|
-
case 0:
|
|
720
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
721
|
-
return [2, deserializeAws_restJson1GetTargetResourceTypeCommandError(output, context)];
|
|
722
|
-
}
|
|
723
|
-
contents = map({
|
|
724
|
-
$metadata: deserializeMetadata(output),
|
|
725
|
-
});
|
|
726
|
-
_a = __expectNonNull;
|
|
727
|
-
_b = __expectObject;
|
|
728
|
-
return [4, parseBody(output.body, context)];
|
|
729
|
-
case 1:
|
|
730
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
731
|
-
if (data.targetResourceType != null) {
|
|
732
|
-
contents.targetResourceType = deserializeAws_restJson1TargetResourceType(data.targetResourceType, context);
|
|
733
|
-
}
|
|
734
|
-
return [2, contents];
|
|
735
|
-
}
|
|
736
|
-
});
|
|
737
|
-
}); };
|
|
738
|
-
var deserializeAws_restJson1GetTargetResourceTypeCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
739
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
740
|
-
var _c;
|
|
741
|
-
return __generator(this, function (_d) {
|
|
742
|
-
switch (_d.label) {
|
|
743
|
-
case 0:
|
|
744
|
-
_a = [__assign({}, output)];
|
|
745
|
-
_c = {};
|
|
746
|
-
return [4, parseBody(output.body, context)];
|
|
747
|
-
case 1:
|
|
748
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
749
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
750
|
-
_b = errorCode;
|
|
751
|
-
switch (_b) {
|
|
752
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
753
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 2];
|
|
754
|
-
case "ValidationException": return [3, 4];
|
|
755
|
-
case "com.amazonaws.fis#ValidationException": return [3, 4];
|
|
756
|
-
}
|
|
757
|
-
return [3, 6];
|
|
758
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
759
|
-
case 3: throw _d.sent();
|
|
760
|
-
case 4: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
761
|
-
case 5: throw _d.sent();
|
|
762
|
-
case 6:
|
|
763
|
-
parsedBody = parsedOutput.body;
|
|
764
|
-
throwDefaultError({
|
|
765
|
-
output: output,
|
|
766
|
-
parsedBody: parsedBody,
|
|
767
|
-
exceptionCtor: __BaseException,
|
|
768
|
-
errorCode: errorCode,
|
|
769
|
-
});
|
|
770
|
-
_d.label = 7;
|
|
771
|
-
case 7: return [2];
|
|
772
|
-
}
|
|
773
|
-
});
|
|
774
|
-
}); };
|
|
775
|
-
export var deserializeAws_restJson1ListActionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
776
|
-
var contents, data, _a, _b;
|
|
777
|
-
return __generator(this, function (_c) {
|
|
778
|
-
switch (_c.label) {
|
|
779
|
-
case 0:
|
|
780
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
781
|
-
return [2, deserializeAws_restJson1ListActionsCommandError(output, context)];
|
|
782
|
-
}
|
|
783
|
-
contents = map({
|
|
784
|
-
$metadata: deserializeMetadata(output),
|
|
785
|
-
});
|
|
786
|
-
_a = __expectNonNull;
|
|
787
|
-
_b = __expectObject;
|
|
788
|
-
return [4, parseBody(output.body, context)];
|
|
789
|
-
case 1:
|
|
790
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
791
|
-
if (data.actions != null) {
|
|
792
|
-
contents.actions = deserializeAws_restJson1ActionSummaryList(data.actions, context);
|
|
793
|
-
}
|
|
794
|
-
if (data.nextToken != null) {
|
|
795
|
-
contents.nextToken = __expectString(data.nextToken);
|
|
796
|
-
}
|
|
797
|
-
return [2, contents];
|
|
798
|
-
}
|
|
6
|
+
export const serializeAws_restJson1CreateExperimentTemplateCommand = async (input, context) => {
|
|
7
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
8
|
+
const headers = {
|
|
9
|
+
"content-type": "application/json",
|
|
10
|
+
};
|
|
11
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates";
|
|
12
|
+
let body;
|
|
13
|
+
body = JSON.stringify({
|
|
14
|
+
...(input.actions != null && {
|
|
15
|
+
actions: serializeAws_restJson1CreateExperimentTemplateActionInputMap(input.actions, context),
|
|
16
|
+
}),
|
|
17
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
18
|
+
...(input.description != null && { description: input.description }),
|
|
19
|
+
...(input.logConfiguration != null && {
|
|
20
|
+
logConfiguration: serializeAws_restJson1CreateExperimentTemplateLogConfigurationInput(input.logConfiguration, context),
|
|
21
|
+
}),
|
|
22
|
+
...(input.roleArn != null && { roleArn: input.roleArn }),
|
|
23
|
+
...(input.stopConditions != null && {
|
|
24
|
+
stopConditions: serializeAws_restJson1CreateExperimentTemplateStopConditionInputList(input.stopConditions, context),
|
|
25
|
+
}),
|
|
26
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
27
|
+
...(input.targets != null && {
|
|
28
|
+
targets: serializeAws_restJson1CreateExperimentTemplateTargetInputMap(input.targets, context),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
return new __HttpRequest({
|
|
32
|
+
protocol,
|
|
33
|
+
hostname,
|
|
34
|
+
port,
|
|
35
|
+
method: "POST",
|
|
36
|
+
headers,
|
|
37
|
+
path: resolvedPath,
|
|
38
|
+
body,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_restJson1DeleteExperimentTemplateCommand = async (input, context) => {
|
|
42
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
43
|
+
const headers = {};
|
|
44
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
|
|
45
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
46
|
+
let body;
|
|
47
|
+
return new __HttpRequest({
|
|
48
|
+
protocol,
|
|
49
|
+
hostname,
|
|
50
|
+
port,
|
|
51
|
+
method: "DELETE",
|
|
52
|
+
headers,
|
|
53
|
+
path: resolvedPath,
|
|
54
|
+
body,
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
export const serializeAws_restJson1GetActionCommand = async (input, context) => {
|
|
58
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
59
|
+
const headers = {};
|
|
60
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/actions/{id}";
|
|
61
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
62
|
+
let body;
|
|
63
|
+
return new __HttpRequest({
|
|
64
|
+
protocol,
|
|
65
|
+
hostname,
|
|
66
|
+
port,
|
|
67
|
+
method: "GET",
|
|
68
|
+
headers,
|
|
69
|
+
path: resolvedPath,
|
|
70
|
+
body,
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
export const serializeAws_restJson1GetExperimentCommand = async (input, context) => {
|
|
74
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
75
|
+
const headers = {};
|
|
76
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments/{id}";
|
|
77
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
78
|
+
let body;
|
|
79
|
+
return new __HttpRequest({
|
|
80
|
+
protocol,
|
|
81
|
+
hostname,
|
|
82
|
+
port,
|
|
83
|
+
method: "GET",
|
|
84
|
+
headers,
|
|
85
|
+
path: resolvedPath,
|
|
86
|
+
body,
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
export const serializeAws_restJson1GetExperimentTemplateCommand = async (input, context) => {
|
|
90
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
91
|
+
const headers = {};
|
|
92
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
|
|
93
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
94
|
+
let body;
|
|
95
|
+
return new __HttpRequest({
|
|
96
|
+
protocol,
|
|
97
|
+
hostname,
|
|
98
|
+
port,
|
|
99
|
+
method: "GET",
|
|
100
|
+
headers,
|
|
101
|
+
path: resolvedPath,
|
|
102
|
+
body,
|
|
103
|
+
});
|
|
104
|
+
};
|
|
105
|
+
export const serializeAws_restJson1GetTargetResourceTypeCommand = async (input, context) => {
|
|
106
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
107
|
+
const headers = {};
|
|
108
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetResourceTypes/{resourceType}";
|
|
109
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceType", () => input.resourceType, "{resourceType}", false);
|
|
110
|
+
let body;
|
|
111
|
+
return new __HttpRequest({
|
|
112
|
+
protocol,
|
|
113
|
+
hostname,
|
|
114
|
+
port,
|
|
115
|
+
method: "GET",
|
|
116
|
+
headers,
|
|
117
|
+
path: resolvedPath,
|
|
118
|
+
body,
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
export const serializeAws_restJson1ListActionsCommand = async (input, context) => {
|
|
122
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
123
|
+
const headers = {};
|
|
124
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/actions";
|
|
125
|
+
const query = map({
|
|
126
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
127
|
+
nextToken: [, input.nextToken],
|
|
128
|
+
});
|
|
129
|
+
let body;
|
|
130
|
+
return new __HttpRequest({
|
|
131
|
+
protocol,
|
|
132
|
+
hostname,
|
|
133
|
+
port,
|
|
134
|
+
method: "GET",
|
|
135
|
+
headers,
|
|
136
|
+
path: resolvedPath,
|
|
137
|
+
query,
|
|
138
|
+
body,
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
export const serializeAws_restJson1ListExperimentsCommand = async (input, context) => {
|
|
142
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
143
|
+
const headers = {};
|
|
144
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments";
|
|
145
|
+
const query = map({
|
|
146
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
147
|
+
nextToken: [, input.nextToken],
|
|
148
|
+
});
|
|
149
|
+
let body;
|
|
150
|
+
return new __HttpRequest({
|
|
151
|
+
protocol,
|
|
152
|
+
hostname,
|
|
153
|
+
port,
|
|
154
|
+
method: "GET",
|
|
155
|
+
headers,
|
|
156
|
+
path: resolvedPath,
|
|
157
|
+
query,
|
|
158
|
+
body,
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
export const serializeAws_restJson1ListExperimentTemplatesCommand = async (input, context) => {
|
|
162
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
163
|
+
const headers = {};
|
|
164
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates";
|
|
165
|
+
const query = map({
|
|
166
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
167
|
+
nextToken: [, input.nextToken],
|
|
168
|
+
});
|
|
169
|
+
let body;
|
|
170
|
+
return new __HttpRequest({
|
|
171
|
+
protocol,
|
|
172
|
+
hostname,
|
|
173
|
+
port,
|
|
174
|
+
method: "GET",
|
|
175
|
+
headers,
|
|
176
|
+
path: resolvedPath,
|
|
177
|
+
query,
|
|
178
|
+
body,
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
export const serializeAws_restJson1ListTagsForResourceCommand = async (input, context) => {
|
|
182
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
183
|
+
const headers = {};
|
|
184
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
185
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
186
|
+
let body;
|
|
187
|
+
return new __HttpRequest({
|
|
188
|
+
protocol,
|
|
189
|
+
hostname,
|
|
190
|
+
port,
|
|
191
|
+
method: "GET",
|
|
192
|
+
headers,
|
|
193
|
+
path: resolvedPath,
|
|
194
|
+
body,
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
export const serializeAws_restJson1ListTargetResourceTypesCommand = async (input, context) => {
|
|
198
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
199
|
+
const headers = {};
|
|
200
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/targetResourceTypes";
|
|
201
|
+
const query = map({
|
|
202
|
+
maxResults: [() => input.maxResults !== void 0, () => input.maxResults.toString()],
|
|
203
|
+
nextToken: [, input.nextToken],
|
|
204
|
+
});
|
|
205
|
+
let body;
|
|
206
|
+
return new __HttpRequest({
|
|
207
|
+
protocol,
|
|
208
|
+
hostname,
|
|
209
|
+
port,
|
|
210
|
+
method: "GET",
|
|
211
|
+
headers,
|
|
212
|
+
path: resolvedPath,
|
|
213
|
+
query,
|
|
214
|
+
body,
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
export const serializeAws_restJson1StartExperimentCommand = async (input, context) => {
|
|
218
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
219
|
+
const headers = {
|
|
220
|
+
"content-type": "application/json",
|
|
221
|
+
};
|
|
222
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments";
|
|
223
|
+
let body;
|
|
224
|
+
body = JSON.stringify({
|
|
225
|
+
clientToken: input.clientToken ?? generateIdempotencyToken(),
|
|
226
|
+
...(input.experimentTemplateId != null && { experimentTemplateId: input.experimentTemplateId }),
|
|
227
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
228
|
+
});
|
|
229
|
+
return new __HttpRequest({
|
|
230
|
+
protocol,
|
|
231
|
+
hostname,
|
|
232
|
+
port,
|
|
233
|
+
method: "POST",
|
|
234
|
+
headers,
|
|
235
|
+
path: resolvedPath,
|
|
236
|
+
body,
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
export const serializeAws_restJson1StopExperimentCommand = async (input, context) => {
|
|
240
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
241
|
+
const headers = {};
|
|
242
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experiments/{id}";
|
|
243
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
244
|
+
let body;
|
|
245
|
+
return new __HttpRequest({
|
|
246
|
+
protocol,
|
|
247
|
+
hostname,
|
|
248
|
+
port,
|
|
249
|
+
method: "DELETE",
|
|
250
|
+
headers,
|
|
251
|
+
path: resolvedPath,
|
|
252
|
+
body,
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
export const serializeAws_restJson1TagResourceCommand = async (input, context) => {
|
|
256
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
257
|
+
const headers = {
|
|
258
|
+
"content-type": "application/json",
|
|
259
|
+
};
|
|
260
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
261
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
262
|
+
let body;
|
|
263
|
+
body = JSON.stringify({
|
|
264
|
+
...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
|
|
265
|
+
});
|
|
266
|
+
return new __HttpRequest({
|
|
267
|
+
protocol,
|
|
268
|
+
hostname,
|
|
269
|
+
port,
|
|
270
|
+
method: "POST",
|
|
271
|
+
headers,
|
|
272
|
+
path: resolvedPath,
|
|
273
|
+
body,
|
|
274
|
+
});
|
|
275
|
+
};
|
|
276
|
+
export const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
|
|
277
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
278
|
+
const headers = {};
|
|
279
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
|
|
280
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
|
|
281
|
+
const query = map({
|
|
282
|
+
tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
|
|
283
|
+
});
|
|
284
|
+
let body;
|
|
285
|
+
return new __HttpRequest({
|
|
286
|
+
protocol,
|
|
287
|
+
hostname,
|
|
288
|
+
port,
|
|
289
|
+
method: "DELETE",
|
|
290
|
+
headers,
|
|
291
|
+
path: resolvedPath,
|
|
292
|
+
query,
|
|
293
|
+
body,
|
|
294
|
+
});
|
|
295
|
+
};
|
|
296
|
+
export const serializeAws_restJson1UpdateExperimentTemplateCommand = async (input, context) => {
|
|
297
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
298
|
+
const headers = {
|
|
299
|
+
"content-type": "application/json",
|
|
300
|
+
};
|
|
301
|
+
let resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/experimentTemplates/{id}";
|
|
302
|
+
resolvedPath = __resolvedPath(resolvedPath, input, "id", () => input.id, "{id}", false);
|
|
303
|
+
let body;
|
|
304
|
+
body = JSON.stringify({
|
|
305
|
+
...(input.actions != null && {
|
|
306
|
+
actions: serializeAws_restJson1UpdateExperimentTemplateActionInputMap(input.actions, context),
|
|
307
|
+
}),
|
|
308
|
+
...(input.description != null && { description: input.description }),
|
|
309
|
+
...(input.logConfiguration != null && {
|
|
310
|
+
logConfiguration: serializeAws_restJson1UpdateExperimentTemplateLogConfigurationInput(input.logConfiguration, context),
|
|
311
|
+
}),
|
|
312
|
+
...(input.roleArn != null && { roleArn: input.roleArn }),
|
|
313
|
+
...(input.stopConditions != null && {
|
|
314
|
+
stopConditions: serializeAws_restJson1UpdateExperimentTemplateStopConditionInputList(input.stopConditions, context),
|
|
315
|
+
}),
|
|
316
|
+
...(input.targets != null && {
|
|
317
|
+
targets: serializeAws_restJson1UpdateExperimentTemplateTargetInputMap(input.targets, context),
|
|
318
|
+
}),
|
|
319
|
+
});
|
|
320
|
+
return new __HttpRequest({
|
|
321
|
+
protocol,
|
|
322
|
+
hostname,
|
|
323
|
+
port,
|
|
324
|
+
method: "PATCH",
|
|
325
|
+
headers,
|
|
326
|
+
path: resolvedPath,
|
|
327
|
+
body,
|
|
328
|
+
});
|
|
329
|
+
};
|
|
330
|
+
export const deserializeAws_restJson1CreateExperimentTemplateCommand = async (output, context) => {
|
|
331
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
332
|
+
return deserializeAws_restJson1CreateExperimentTemplateCommandError(output, context);
|
|
333
|
+
}
|
|
334
|
+
const contents = map({
|
|
335
|
+
$metadata: deserializeMetadata(output),
|
|
799
336
|
});
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
return
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
337
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
338
|
+
if (data.experimentTemplate != null) {
|
|
339
|
+
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
340
|
+
}
|
|
341
|
+
return contents;
|
|
342
|
+
};
|
|
343
|
+
const deserializeAws_restJson1CreateExperimentTemplateCommandError = async (output, context) => {
|
|
344
|
+
const parsedOutput = {
|
|
345
|
+
...output,
|
|
346
|
+
body: await parseErrorBody(output.body, context),
|
|
347
|
+
};
|
|
348
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
349
|
+
switch (errorCode) {
|
|
350
|
+
case "ConflictException":
|
|
351
|
+
case "com.amazonaws.fis#ConflictException":
|
|
352
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
353
|
+
case "ResourceNotFoundException":
|
|
354
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
355
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
356
|
+
case "ServiceQuotaExceededException":
|
|
357
|
+
case "com.amazonaws.fis#ServiceQuotaExceededException":
|
|
358
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
359
|
+
case "ValidationException":
|
|
360
|
+
case "com.amazonaws.fis#ValidationException":
|
|
361
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
362
|
+
default:
|
|
363
|
+
const parsedBody = parsedOutput.body;
|
|
364
|
+
throwDefaultError({
|
|
365
|
+
output,
|
|
366
|
+
parsedBody,
|
|
367
|
+
exceptionCtor: __BaseException,
|
|
368
|
+
errorCode,
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
export const deserializeAws_restJson1DeleteExperimentTemplateCommand = async (output, context) => {
|
|
373
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
374
|
+
return deserializeAws_restJson1DeleteExperimentTemplateCommandError(output, context);
|
|
375
|
+
}
|
|
376
|
+
const contents = map({
|
|
377
|
+
$metadata: deserializeMetadata(output),
|
|
832
378
|
});
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
379
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
380
|
+
if (data.experimentTemplate != null) {
|
|
381
|
+
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
382
|
+
}
|
|
383
|
+
return contents;
|
|
384
|
+
};
|
|
385
|
+
const deserializeAws_restJson1DeleteExperimentTemplateCommandError = async (output, context) => {
|
|
386
|
+
const parsedOutput = {
|
|
387
|
+
...output,
|
|
388
|
+
body: await parseErrorBody(output.body, context),
|
|
389
|
+
};
|
|
390
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
391
|
+
switch (errorCode) {
|
|
392
|
+
case "ResourceNotFoundException":
|
|
393
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
394
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
395
|
+
case "ValidationException":
|
|
396
|
+
case "com.amazonaws.fis#ValidationException":
|
|
397
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
398
|
+
default:
|
|
399
|
+
const parsedBody = parsedOutput.body;
|
|
400
|
+
throwDefaultError({
|
|
401
|
+
output,
|
|
402
|
+
parsedBody,
|
|
403
|
+
exceptionCtor: __BaseException,
|
|
404
|
+
errorCode,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
export const deserializeAws_restJson1GetActionCommand = async (output, context) => {
|
|
409
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
410
|
+
return deserializeAws_restJson1GetActionCommandError(output, context);
|
|
411
|
+
}
|
|
412
|
+
const contents = map({
|
|
413
|
+
$metadata: deserializeMetadata(output),
|
|
858
414
|
});
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
return
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
415
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
416
|
+
if (data.action != null) {
|
|
417
|
+
contents.action = deserializeAws_restJson1Action(data.action, context);
|
|
418
|
+
}
|
|
419
|
+
return contents;
|
|
420
|
+
};
|
|
421
|
+
const deserializeAws_restJson1GetActionCommandError = async (output, context) => {
|
|
422
|
+
const parsedOutput = {
|
|
423
|
+
...output,
|
|
424
|
+
body: await parseErrorBody(output.body, context),
|
|
425
|
+
};
|
|
426
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
427
|
+
switch (errorCode) {
|
|
428
|
+
case "ResourceNotFoundException":
|
|
429
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
430
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
431
|
+
case "ValidationException":
|
|
432
|
+
case "com.amazonaws.fis#ValidationException":
|
|
433
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
434
|
+
default:
|
|
435
|
+
const parsedBody = parsedOutput.body;
|
|
436
|
+
throwDefaultError({
|
|
437
|
+
output,
|
|
438
|
+
parsedBody,
|
|
439
|
+
exceptionCtor: __BaseException,
|
|
440
|
+
errorCode,
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
export const deserializeAws_restJson1GetExperimentCommand = async (output, context) => {
|
|
445
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
446
|
+
return deserializeAws_restJson1GetExperimentCommandError(output, context);
|
|
447
|
+
}
|
|
448
|
+
const contents = map({
|
|
449
|
+
$metadata: deserializeMetadata(output),
|
|
891
450
|
});
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
451
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
452
|
+
if (data.experiment != null) {
|
|
453
|
+
contents.experiment = deserializeAws_restJson1Experiment(data.experiment, context);
|
|
454
|
+
}
|
|
455
|
+
return contents;
|
|
456
|
+
};
|
|
457
|
+
const deserializeAws_restJson1GetExperimentCommandError = async (output, context) => {
|
|
458
|
+
const parsedOutput = {
|
|
459
|
+
...output,
|
|
460
|
+
body: await parseErrorBody(output.body, context),
|
|
461
|
+
};
|
|
462
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
463
|
+
switch (errorCode) {
|
|
464
|
+
case "ResourceNotFoundException":
|
|
465
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
466
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
467
|
+
case "ValidationException":
|
|
468
|
+
case "com.amazonaws.fis#ValidationException":
|
|
469
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
470
|
+
default:
|
|
471
|
+
const parsedBody = parsedOutput.body;
|
|
472
|
+
throwDefaultError({
|
|
473
|
+
output,
|
|
474
|
+
parsedBody,
|
|
475
|
+
exceptionCtor: __BaseException,
|
|
476
|
+
errorCode,
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
export const deserializeAws_restJson1GetExperimentTemplateCommand = async (output, context) => {
|
|
481
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
482
|
+
return deserializeAws_restJson1GetExperimentTemplateCommandError(output, context);
|
|
483
|
+
}
|
|
484
|
+
const contents = map({
|
|
485
|
+
$metadata: deserializeMetadata(output),
|
|
917
486
|
});
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
return
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
487
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
488
|
+
if (data.experimentTemplate != null) {
|
|
489
|
+
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
490
|
+
}
|
|
491
|
+
return contents;
|
|
492
|
+
};
|
|
493
|
+
const deserializeAws_restJson1GetExperimentTemplateCommandError = async (output, context) => {
|
|
494
|
+
const parsedOutput = {
|
|
495
|
+
...output,
|
|
496
|
+
body: await parseErrorBody(output.body, context),
|
|
497
|
+
};
|
|
498
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
499
|
+
switch (errorCode) {
|
|
500
|
+
case "ResourceNotFoundException":
|
|
501
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
502
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
503
|
+
case "ValidationException":
|
|
504
|
+
case "com.amazonaws.fis#ValidationException":
|
|
505
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
506
|
+
default:
|
|
507
|
+
const parsedBody = parsedOutput.body;
|
|
508
|
+
throwDefaultError({
|
|
509
|
+
output,
|
|
510
|
+
parsedBody,
|
|
511
|
+
exceptionCtor: __BaseException,
|
|
512
|
+
errorCode,
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
};
|
|
516
|
+
export const deserializeAws_restJson1GetTargetResourceTypeCommand = async (output, context) => {
|
|
517
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
518
|
+
return deserializeAws_restJson1GetTargetResourceTypeCommandError(output, context);
|
|
519
|
+
}
|
|
520
|
+
const contents = map({
|
|
521
|
+
$metadata: deserializeMetadata(output),
|
|
950
522
|
});
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
523
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
524
|
+
if (data.targetResourceType != null) {
|
|
525
|
+
contents.targetResourceType = deserializeAws_restJson1TargetResourceType(data.targetResourceType, context);
|
|
526
|
+
}
|
|
527
|
+
return contents;
|
|
528
|
+
};
|
|
529
|
+
const deserializeAws_restJson1GetTargetResourceTypeCommandError = async (output, context) => {
|
|
530
|
+
const parsedOutput = {
|
|
531
|
+
...output,
|
|
532
|
+
body: await parseErrorBody(output.body, context),
|
|
533
|
+
};
|
|
534
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
535
|
+
switch (errorCode) {
|
|
536
|
+
case "ResourceNotFoundException":
|
|
537
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
538
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
539
|
+
case "ValidationException":
|
|
540
|
+
case "com.amazonaws.fis#ValidationException":
|
|
541
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
542
|
+
default:
|
|
543
|
+
const parsedBody = parsedOutput.body;
|
|
544
|
+
throwDefaultError({
|
|
545
|
+
output,
|
|
546
|
+
parsedBody,
|
|
547
|
+
exceptionCtor: __BaseException,
|
|
548
|
+
errorCode,
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
export const deserializeAws_restJson1ListActionsCommand = async (output, context) => {
|
|
553
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
554
|
+
return deserializeAws_restJson1ListActionsCommandError(output, context);
|
|
555
|
+
}
|
|
556
|
+
const contents = map({
|
|
557
|
+
$metadata: deserializeMetadata(output),
|
|
973
558
|
});
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
559
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
560
|
+
if (data.actions != null) {
|
|
561
|
+
contents.actions = deserializeAws_restJson1ActionSummaryList(data.actions, context);
|
|
562
|
+
}
|
|
563
|
+
if (data.nextToken != null) {
|
|
564
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
565
|
+
}
|
|
566
|
+
return contents;
|
|
567
|
+
};
|
|
568
|
+
const deserializeAws_restJson1ListActionsCommandError = async (output, context) => {
|
|
569
|
+
const parsedOutput = {
|
|
570
|
+
...output,
|
|
571
|
+
body: await parseErrorBody(output.body, context),
|
|
572
|
+
};
|
|
573
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
574
|
+
switch (errorCode) {
|
|
575
|
+
case "ValidationException":
|
|
576
|
+
case "com.amazonaws.fis#ValidationException":
|
|
577
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
578
|
+
default:
|
|
579
|
+
const parsedBody = parsedOutput.body;
|
|
580
|
+
throwDefaultError({
|
|
581
|
+
output,
|
|
582
|
+
parsedBody,
|
|
583
|
+
exceptionCtor: __BaseException,
|
|
584
|
+
errorCode,
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
export const deserializeAws_restJson1ListExperimentsCommand = async (output, context) => {
|
|
589
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
590
|
+
return deserializeAws_restJson1ListExperimentsCommandError(output, context);
|
|
591
|
+
}
|
|
592
|
+
const contents = map({
|
|
593
|
+
$metadata: deserializeMetadata(output),
|
|
996
594
|
});
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
595
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
596
|
+
if (data.experiments != null) {
|
|
597
|
+
contents.experiments = deserializeAws_restJson1ExperimentSummaryList(data.experiments, context);
|
|
598
|
+
}
|
|
599
|
+
if (data.nextToken != null) {
|
|
600
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
601
|
+
}
|
|
602
|
+
return contents;
|
|
603
|
+
};
|
|
604
|
+
const deserializeAws_restJson1ListExperimentsCommandError = async (output, context) => {
|
|
605
|
+
const parsedOutput = {
|
|
606
|
+
...output,
|
|
607
|
+
body: await parseErrorBody(output.body, context),
|
|
608
|
+
};
|
|
609
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
610
|
+
switch (errorCode) {
|
|
611
|
+
case "ValidationException":
|
|
612
|
+
case "com.amazonaws.fis#ValidationException":
|
|
613
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
614
|
+
default:
|
|
615
|
+
const parsedBody = parsedOutput.body;
|
|
616
|
+
throwDefaultError({
|
|
617
|
+
output,
|
|
618
|
+
parsedBody,
|
|
619
|
+
exceptionCtor: __BaseException,
|
|
620
|
+
errorCode,
|
|
621
|
+
});
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
export const deserializeAws_restJson1ListExperimentTemplatesCommand = async (output, context) => {
|
|
625
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
626
|
+
return deserializeAws_restJson1ListExperimentTemplatesCommandError(output, context);
|
|
627
|
+
}
|
|
628
|
+
const contents = map({
|
|
629
|
+
$metadata: deserializeMetadata(output),
|
|
1022
630
|
});
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
631
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
632
|
+
if (data.experimentTemplates != null) {
|
|
633
|
+
contents.experimentTemplates = deserializeAws_restJson1ExperimentTemplateSummaryList(data.experimentTemplates, context);
|
|
634
|
+
}
|
|
635
|
+
if (data.nextToken != null) {
|
|
636
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
637
|
+
}
|
|
638
|
+
return contents;
|
|
639
|
+
};
|
|
640
|
+
const deserializeAws_restJson1ListExperimentTemplatesCommandError = async (output, context) => {
|
|
641
|
+
const parsedOutput = {
|
|
642
|
+
...output,
|
|
643
|
+
body: await parseErrorBody(output.body, context),
|
|
644
|
+
};
|
|
645
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
646
|
+
switch (errorCode) {
|
|
647
|
+
case "ValidationException":
|
|
648
|
+
case "com.amazonaws.fis#ValidationException":
|
|
649
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
650
|
+
default:
|
|
651
|
+
const parsedBody = parsedOutput.body;
|
|
652
|
+
throwDefaultError({
|
|
653
|
+
output,
|
|
654
|
+
parsedBody,
|
|
655
|
+
exceptionCtor: __BaseException,
|
|
656
|
+
errorCode,
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
export const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
|
|
661
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
662
|
+
return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
|
|
663
|
+
}
|
|
664
|
+
const contents = map({
|
|
665
|
+
$metadata: deserializeMetadata(output),
|
|
1055
666
|
});
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
667
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
668
|
+
if (data.tags != null) {
|
|
669
|
+
contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
|
|
670
|
+
}
|
|
671
|
+
return contents;
|
|
672
|
+
};
|
|
673
|
+
const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
|
|
674
|
+
const parsedOutput = {
|
|
675
|
+
...output,
|
|
676
|
+
body: await parseErrorBody(output.body, context),
|
|
677
|
+
};
|
|
678
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
679
|
+
const parsedBody = parsedOutput.body;
|
|
680
|
+
throwDefaultError({
|
|
681
|
+
output,
|
|
682
|
+
parsedBody,
|
|
683
|
+
exceptionCtor: __BaseException,
|
|
684
|
+
errorCode,
|
|
685
|
+
});
|
|
686
|
+
};
|
|
687
|
+
export const deserializeAws_restJson1ListTargetResourceTypesCommand = async (output, context) => {
|
|
688
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
689
|
+
return deserializeAws_restJson1ListTargetResourceTypesCommandError(output, context);
|
|
690
|
+
}
|
|
691
|
+
const contents = map({
|
|
692
|
+
$metadata: deserializeMetadata(output),
|
|
1078
693
|
});
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
throwDefaultError({
|
|
1115
|
-
output: output,
|
|
1116
|
-
parsedBody: parsedBody,
|
|
1117
|
-
exceptionCtor: __BaseException,
|
|
1118
|
-
errorCode: errorCode,
|
|
1119
|
-
});
|
|
1120
|
-
_d.label = 11;
|
|
1121
|
-
case 11: return [2];
|
|
1122
|
-
}
|
|
694
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
695
|
+
if (data.nextToken != null) {
|
|
696
|
+
contents.nextToken = __expectString(data.nextToken);
|
|
697
|
+
}
|
|
698
|
+
if (data.targetResourceTypes != null) {
|
|
699
|
+
contents.targetResourceTypes = deserializeAws_restJson1TargetResourceTypeSummaryList(data.targetResourceTypes, context);
|
|
700
|
+
}
|
|
701
|
+
return contents;
|
|
702
|
+
};
|
|
703
|
+
const deserializeAws_restJson1ListTargetResourceTypesCommandError = async (output, context) => {
|
|
704
|
+
const parsedOutput = {
|
|
705
|
+
...output,
|
|
706
|
+
body: await parseErrorBody(output.body, context),
|
|
707
|
+
};
|
|
708
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
709
|
+
switch (errorCode) {
|
|
710
|
+
case "ValidationException":
|
|
711
|
+
case "com.amazonaws.fis#ValidationException":
|
|
712
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
713
|
+
default:
|
|
714
|
+
const parsedBody = parsedOutput.body;
|
|
715
|
+
throwDefaultError({
|
|
716
|
+
output,
|
|
717
|
+
parsedBody,
|
|
718
|
+
exceptionCtor: __BaseException,
|
|
719
|
+
errorCode,
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
export const deserializeAws_restJson1StartExperimentCommand = async (output, context) => {
|
|
724
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
725
|
+
return deserializeAws_restJson1StartExperimentCommandError(output, context);
|
|
726
|
+
}
|
|
727
|
+
const contents = map({
|
|
728
|
+
$metadata: deserializeMetadata(output),
|
|
1123
729
|
});
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
730
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
731
|
+
if (data.experiment != null) {
|
|
732
|
+
contents.experiment = deserializeAws_restJson1Experiment(data.experiment, context);
|
|
733
|
+
}
|
|
734
|
+
return contents;
|
|
735
|
+
};
|
|
736
|
+
const deserializeAws_restJson1StartExperimentCommandError = async (output, context) => {
|
|
737
|
+
const parsedOutput = {
|
|
738
|
+
...output,
|
|
739
|
+
body: await parseErrorBody(output.body, context),
|
|
740
|
+
};
|
|
741
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
742
|
+
switch (errorCode) {
|
|
743
|
+
case "ConflictException":
|
|
744
|
+
case "com.amazonaws.fis#ConflictException":
|
|
745
|
+
throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
|
|
746
|
+
case "ResourceNotFoundException":
|
|
747
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
748
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
749
|
+
case "ServiceQuotaExceededException":
|
|
750
|
+
case "com.amazonaws.fis#ServiceQuotaExceededException":
|
|
751
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
752
|
+
case "ValidationException":
|
|
753
|
+
case "com.amazonaws.fis#ValidationException":
|
|
754
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
755
|
+
default:
|
|
756
|
+
const parsedBody = parsedOutput.body;
|
|
757
|
+
throwDefaultError({
|
|
758
|
+
output,
|
|
759
|
+
parsedBody,
|
|
760
|
+
exceptionCtor: __BaseException,
|
|
761
|
+
errorCode,
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
export const deserializeAws_restJson1StopExperimentCommand = async (output, context) => {
|
|
766
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
767
|
+
return deserializeAws_restJson1StopExperimentCommandError(output, context);
|
|
768
|
+
}
|
|
769
|
+
const contents = map({
|
|
770
|
+
$metadata: deserializeMetadata(output),
|
|
1146
771
|
});
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
return
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
}
|
|
772
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
773
|
+
if (data.experiment != null) {
|
|
774
|
+
contents.experiment = deserializeAws_restJson1Experiment(data.experiment, context);
|
|
775
|
+
}
|
|
776
|
+
return contents;
|
|
777
|
+
};
|
|
778
|
+
const deserializeAws_restJson1StopExperimentCommandError = async (output, context) => {
|
|
779
|
+
const parsedOutput = {
|
|
780
|
+
...output,
|
|
781
|
+
body: await parseErrorBody(output.body, context),
|
|
782
|
+
};
|
|
783
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
784
|
+
switch (errorCode) {
|
|
785
|
+
case "ResourceNotFoundException":
|
|
786
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
787
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
788
|
+
case "ValidationException":
|
|
789
|
+
case "com.amazonaws.fis#ValidationException":
|
|
790
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
791
|
+
default:
|
|
792
|
+
const parsedBody = parsedOutput.body;
|
|
793
|
+
throwDefaultError({
|
|
794
|
+
output,
|
|
795
|
+
parsedBody,
|
|
796
|
+
exceptionCtor: __BaseException,
|
|
797
|
+
errorCode,
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
};
|
|
801
|
+
export const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
|
|
802
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
803
|
+
return deserializeAws_restJson1TagResourceCommandError(output, context);
|
|
804
|
+
}
|
|
805
|
+
const contents = map({
|
|
806
|
+
$metadata: deserializeMetadata(output),
|
|
1183
807
|
});
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
808
|
+
await collectBody(output.body, context);
|
|
809
|
+
return contents;
|
|
810
|
+
};
|
|
811
|
+
const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
|
|
812
|
+
const parsedOutput = {
|
|
813
|
+
...output,
|
|
814
|
+
body: await parseErrorBody(output.body, context),
|
|
815
|
+
};
|
|
816
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
817
|
+
const parsedBody = parsedOutput.body;
|
|
818
|
+
throwDefaultError({
|
|
819
|
+
output,
|
|
820
|
+
parsedBody,
|
|
821
|
+
exceptionCtor: __BaseException,
|
|
822
|
+
errorCode,
|
|
823
|
+
});
|
|
824
|
+
};
|
|
825
|
+
export const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
|
|
826
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
827
|
+
return deserializeAws_restJson1UntagResourceCommandError(output, context);
|
|
828
|
+
}
|
|
829
|
+
const contents = map({
|
|
830
|
+
$metadata: deserializeMetadata(output),
|
|
1201
831
|
});
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
832
|
+
await collectBody(output.body, context);
|
|
833
|
+
return contents;
|
|
834
|
+
};
|
|
835
|
+
const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
|
|
836
|
+
const parsedOutput = {
|
|
837
|
+
...output,
|
|
838
|
+
body: await parseErrorBody(output.body, context),
|
|
839
|
+
};
|
|
840
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
841
|
+
const parsedBody = parsedOutput.body;
|
|
842
|
+
throwDefaultError({
|
|
843
|
+
output,
|
|
844
|
+
parsedBody,
|
|
845
|
+
exceptionCtor: __BaseException,
|
|
846
|
+
errorCode,
|
|
847
|
+
});
|
|
848
|
+
};
|
|
849
|
+
export const deserializeAws_restJson1UpdateExperimentTemplateCommand = async (output, context) => {
|
|
850
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
851
|
+
return deserializeAws_restJson1UpdateExperimentTemplateCommandError(output, context);
|
|
852
|
+
}
|
|
853
|
+
const contents = map({
|
|
854
|
+
$metadata: deserializeMetadata(output),
|
|
1224
855
|
});
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
856
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
857
|
+
if (data.experimentTemplate != null) {
|
|
858
|
+
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
859
|
+
}
|
|
860
|
+
return contents;
|
|
861
|
+
};
|
|
862
|
+
const deserializeAws_restJson1UpdateExperimentTemplateCommandError = async (output, context) => {
|
|
863
|
+
const parsedOutput = {
|
|
864
|
+
...output,
|
|
865
|
+
body: await parseErrorBody(output.body, context),
|
|
866
|
+
};
|
|
867
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
868
|
+
switch (errorCode) {
|
|
869
|
+
case "ResourceNotFoundException":
|
|
870
|
+
case "com.amazonaws.fis#ResourceNotFoundException":
|
|
871
|
+
throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
872
|
+
case "ServiceQuotaExceededException":
|
|
873
|
+
case "com.amazonaws.fis#ServiceQuotaExceededException":
|
|
874
|
+
throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
|
|
875
|
+
case "ValidationException":
|
|
876
|
+
case "com.amazonaws.fis#ValidationException":
|
|
877
|
+
throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
|
|
878
|
+
default:
|
|
879
|
+
const parsedBody = parsedOutput.body;
|
|
880
|
+
throwDefaultError({
|
|
881
|
+
output,
|
|
882
|
+
parsedBody,
|
|
883
|
+
exceptionCtor: __BaseException,
|
|
884
|
+
errorCode,
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
};
|
|
888
|
+
const map = __map;
|
|
889
|
+
const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
|
|
890
|
+
const contents = map({});
|
|
891
|
+
const data = parsedOutput.body;
|
|
892
|
+
if (data.message != null) {
|
|
893
|
+
contents.message = __expectString(data.message);
|
|
894
|
+
}
|
|
895
|
+
const exception = new ConflictException({
|
|
896
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
897
|
+
...contents,
|
|
1242
898
|
});
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
1255
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1256
|
-
parsedBody = parsedOutput.body;
|
|
1257
|
-
throwDefaultError({
|
|
1258
|
-
output: output,
|
|
1259
|
-
parsedBody: parsedBody,
|
|
1260
|
-
exceptionCtor: __BaseException,
|
|
1261
|
-
errorCode: errorCode,
|
|
1262
|
-
});
|
|
1263
|
-
return [2];
|
|
1264
|
-
}
|
|
899
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
900
|
+
};
|
|
901
|
+
const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
902
|
+
const contents = map({});
|
|
903
|
+
const data = parsedOutput.body;
|
|
904
|
+
if (data.message != null) {
|
|
905
|
+
contents.message = __expectString(data.message);
|
|
906
|
+
}
|
|
907
|
+
const exception = new ResourceNotFoundException({
|
|
908
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
909
|
+
...contents,
|
|
1265
910
|
});
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
});
|
|
1278
|
-
_a = __expectNonNull;
|
|
1279
|
-
_b = __expectObject;
|
|
1280
|
-
return [4, parseBody(output.body, context)];
|
|
1281
|
-
case 1:
|
|
1282
|
-
data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
|
|
1283
|
-
if (data.experimentTemplate != null) {
|
|
1284
|
-
contents.experimentTemplate = deserializeAws_restJson1ExperimentTemplate(data.experimentTemplate, context);
|
|
1285
|
-
}
|
|
1286
|
-
return [2, contents];
|
|
1287
|
-
}
|
|
911
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
912
|
+
};
|
|
913
|
+
const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
914
|
+
const contents = map({});
|
|
915
|
+
const data = parsedOutput.body;
|
|
916
|
+
if (data.message != null) {
|
|
917
|
+
contents.message = __expectString(data.message);
|
|
918
|
+
}
|
|
919
|
+
const exception = new ServiceQuotaExceededException({
|
|
920
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
921
|
+
...contents,
|
|
1288
922
|
});
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1301
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1302
|
-
_b = errorCode;
|
|
1303
|
-
switch (_b) {
|
|
1304
|
-
case "ResourceNotFoundException": return [3, 2];
|
|
1305
|
-
case "com.amazonaws.fis#ResourceNotFoundException": return [3, 2];
|
|
1306
|
-
case "ServiceQuotaExceededException": return [3, 4];
|
|
1307
|
-
case "com.amazonaws.fis#ServiceQuotaExceededException": return [3, 4];
|
|
1308
|
-
case "ValidationException": return [3, 6];
|
|
1309
|
-
case "com.amazonaws.fis#ValidationException": return [3, 6];
|
|
1310
|
-
}
|
|
1311
|
-
return [3, 8];
|
|
1312
|
-
case 2: return [4, deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1313
|
-
case 3: throw _d.sent();
|
|
1314
|
-
case 4: return [4, deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context)];
|
|
1315
|
-
case 5: throw _d.sent();
|
|
1316
|
-
case 6: return [4, deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)];
|
|
1317
|
-
case 7: throw _d.sent();
|
|
1318
|
-
case 8:
|
|
1319
|
-
parsedBody = parsedOutput.body;
|
|
1320
|
-
throwDefaultError({
|
|
1321
|
-
output: output,
|
|
1322
|
-
parsedBody: parsedBody,
|
|
1323
|
-
exceptionCtor: __BaseException,
|
|
1324
|
-
errorCode: errorCode,
|
|
1325
|
-
});
|
|
1326
|
-
_d.label = 9;
|
|
1327
|
-
case 9: return [2];
|
|
1328
|
-
}
|
|
923
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
924
|
+
};
|
|
925
|
+
const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
|
|
926
|
+
const contents = map({});
|
|
927
|
+
const data = parsedOutput.body;
|
|
928
|
+
if (data.message != null) {
|
|
929
|
+
contents.message = __expectString(data.message);
|
|
930
|
+
}
|
|
931
|
+
const exception = new ValidationException({
|
|
932
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
933
|
+
...contents,
|
|
1329
934
|
});
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
if (data.message != null) {
|
|
1350
|
-
contents.message = __expectString(data.message);
|
|
1351
|
-
}
|
|
1352
|
-
exception = new ResourceNotFoundException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1353
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1354
|
-
});
|
|
1355
|
-
}); };
|
|
1356
|
-
var deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1357
|
-
var contents, data, exception;
|
|
1358
|
-
return __generator(this, function (_a) {
|
|
1359
|
-
contents = map({});
|
|
1360
|
-
data = parsedOutput.body;
|
|
1361
|
-
if (data.message != null) {
|
|
1362
|
-
contents.message = __expectString(data.message);
|
|
1363
|
-
}
|
|
1364
|
-
exception = new ServiceQuotaExceededException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1365
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1366
|
-
});
|
|
1367
|
-
}); };
|
|
1368
|
-
var deserializeAws_restJson1ValidationExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1369
|
-
var contents, data, exception;
|
|
1370
|
-
return __generator(this, function (_a) {
|
|
1371
|
-
contents = map({});
|
|
1372
|
-
data = parsedOutput.body;
|
|
1373
|
-
if (data.message != null) {
|
|
1374
|
-
contents.message = __expectString(data.message);
|
|
1375
|
-
}
|
|
1376
|
-
exception = new ValidationException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
|
|
1377
|
-
return [2, __decorateServiceException(exception, parsedOutput.body)];
|
|
1378
|
-
});
|
|
1379
|
-
}); };
|
|
1380
|
-
var serializeAws_restJson1CreateExperimentTemplateActionInput = function (input, context) {
|
|
1381
|
-
return __assign(__assign(__assign(__assign(__assign({}, (input.actionId != null && { actionId: input.actionId })), (input.description != null && { description: input.description })), (input.parameters != null && {
|
|
1382
|
-
parameters: serializeAws_restJson1ExperimentTemplateActionParameterMap(input.parameters, context),
|
|
1383
|
-
})), (input.startAfter != null && {
|
|
1384
|
-
startAfter: serializeAws_restJson1ExperimentTemplateActionStartAfterList(input.startAfter, context),
|
|
1385
|
-
})), (input.targets != null && {
|
|
1386
|
-
targets: serializeAws_restJson1ExperimentTemplateActionTargetMap(input.targets, context),
|
|
1387
|
-
}));
|
|
1388
|
-
};
|
|
1389
|
-
var serializeAws_restJson1CreateExperimentTemplateActionInputMap = function (input, context) {
|
|
1390
|
-
return Object.entries(input).reduce(function (acc, _a) {
|
|
1391
|
-
var _b;
|
|
1392
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
935
|
+
return __decorateServiceException(exception, parsedOutput.body);
|
|
936
|
+
};
|
|
937
|
+
const serializeAws_restJson1CreateExperimentTemplateActionInput = (input, context) => {
|
|
938
|
+
return {
|
|
939
|
+
...(input.actionId != null && { actionId: input.actionId }),
|
|
940
|
+
...(input.description != null && { description: input.description }),
|
|
941
|
+
...(input.parameters != null && {
|
|
942
|
+
parameters: serializeAws_restJson1ExperimentTemplateActionParameterMap(input.parameters, context),
|
|
943
|
+
}),
|
|
944
|
+
...(input.startAfter != null && {
|
|
945
|
+
startAfter: serializeAws_restJson1ExperimentTemplateActionStartAfterList(input.startAfter, context),
|
|
946
|
+
}),
|
|
947
|
+
...(input.targets != null && {
|
|
948
|
+
targets: serializeAws_restJson1ExperimentTemplateActionTargetMap(input.targets, context),
|
|
949
|
+
}),
|
|
950
|
+
};
|
|
951
|
+
};
|
|
952
|
+
const serializeAws_restJson1CreateExperimentTemplateActionInputMap = (input, context) => {
|
|
953
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1393
954
|
if (value === null) {
|
|
1394
955
|
return acc;
|
|
1395
956
|
}
|
|
1396
|
-
return
|
|
957
|
+
return {
|
|
958
|
+
...acc,
|
|
959
|
+
[key]: serializeAws_restJson1CreateExperimentTemplateActionInput(value, context),
|
|
960
|
+
};
|
|
1397
961
|
}, {});
|
|
1398
962
|
};
|
|
1399
|
-
|
|
1400
|
-
return
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
963
|
+
const serializeAws_restJson1CreateExperimentTemplateLogConfigurationInput = (input, context) => {
|
|
964
|
+
return {
|
|
965
|
+
...(input.cloudWatchLogsConfiguration != null && {
|
|
966
|
+
cloudWatchLogsConfiguration: serializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfigurationInput(input.cloudWatchLogsConfiguration, context),
|
|
967
|
+
}),
|
|
968
|
+
...(input.logSchemaVersion != null && { logSchemaVersion: input.logSchemaVersion }),
|
|
969
|
+
...(input.s3Configuration != null && {
|
|
970
|
+
s3Configuration: serializeAws_restJson1ExperimentTemplateS3LogConfigurationInput(input.s3Configuration, context),
|
|
971
|
+
}),
|
|
972
|
+
};
|
|
1405
973
|
};
|
|
1406
|
-
|
|
1407
|
-
return
|
|
974
|
+
const serializeAws_restJson1CreateExperimentTemplateStopConditionInput = (input, context) => {
|
|
975
|
+
return {
|
|
976
|
+
...(input.source != null && { source: input.source }),
|
|
977
|
+
...(input.value != null && { value: input.value }),
|
|
978
|
+
};
|
|
1408
979
|
};
|
|
1409
|
-
|
|
980
|
+
const serializeAws_restJson1CreateExperimentTemplateStopConditionInputList = (input, context) => {
|
|
1410
981
|
return input
|
|
1411
|
-
.filter(
|
|
1412
|
-
.map(
|
|
982
|
+
.filter((e) => e != null)
|
|
983
|
+
.map((entry) => {
|
|
1413
984
|
return serializeAws_restJson1CreateExperimentTemplateStopConditionInput(entry, context);
|
|
1414
985
|
});
|
|
1415
986
|
};
|
|
1416
|
-
|
|
1417
|
-
return
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
987
|
+
const serializeAws_restJson1CreateExperimentTemplateTargetInput = (input, context) => {
|
|
988
|
+
return {
|
|
989
|
+
...(input.filters != null && {
|
|
990
|
+
filters: serializeAws_restJson1ExperimentTemplateTargetFilterInputList(input.filters, context),
|
|
991
|
+
}),
|
|
992
|
+
...(input.parameters != null && {
|
|
993
|
+
parameters: serializeAws_restJson1ExperimentTemplateTargetParameterMap(input.parameters, context),
|
|
994
|
+
}),
|
|
995
|
+
...(input.resourceArns != null && {
|
|
996
|
+
resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
|
|
997
|
+
}),
|
|
998
|
+
...(input.resourceTags != null && { resourceTags: serializeAws_restJson1TagMap(input.resourceTags, context) }),
|
|
999
|
+
...(input.resourceType != null && { resourceType: input.resourceType }),
|
|
1000
|
+
...(input.selectionMode != null && { selectionMode: input.selectionMode }),
|
|
1001
|
+
};
|
|
1424
1002
|
};
|
|
1425
|
-
|
|
1426
|
-
return Object.entries(input).reduce(
|
|
1427
|
-
var _b;
|
|
1428
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1003
|
+
const serializeAws_restJson1CreateExperimentTemplateTargetInputMap = (input, context) => {
|
|
1004
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1429
1005
|
if (value === null) {
|
|
1430
1006
|
return acc;
|
|
1431
1007
|
}
|
|
1432
|
-
return
|
|
1008
|
+
return {
|
|
1009
|
+
...acc,
|
|
1010
|
+
[key]: serializeAws_restJson1CreateExperimentTemplateTargetInput(value, context),
|
|
1011
|
+
};
|
|
1433
1012
|
}, {});
|
|
1434
1013
|
};
|
|
1435
|
-
|
|
1436
|
-
return Object.entries(input).reduce(
|
|
1437
|
-
var _b;
|
|
1438
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1014
|
+
const serializeAws_restJson1ExperimentTemplateActionParameterMap = (input, context) => {
|
|
1015
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1439
1016
|
if (value === null) {
|
|
1440
1017
|
return acc;
|
|
1441
1018
|
}
|
|
1442
|
-
return
|
|
1019
|
+
return {
|
|
1020
|
+
...acc,
|
|
1021
|
+
[key]: value,
|
|
1022
|
+
};
|
|
1443
1023
|
}, {});
|
|
1444
1024
|
};
|
|
1445
|
-
|
|
1025
|
+
const serializeAws_restJson1ExperimentTemplateActionStartAfterList = (input, context) => {
|
|
1446
1026
|
return input
|
|
1447
|
-
.filter(
|
|
1448
|
-
.map(
|
|
1027
|
+
.filter((e) => e != null)
|
|
1028
|
+
.map((entry) => {
|
|
1449
1029
|
return entry;
|
|
1450
1030
|
});
|
|
1451
1031
|
};
|
|
1452
|
-
|
|
1453
|
-
return Object.entries(input).reduce(
|
|
1454
|
-
var _b;
|
|
1455
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1032
|
+
const serializeAws_restJson1ExperimentTemplateActionTargetMap = (input, context) => {
|
|
1033
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1456
1034
|
if (value === null) {
|
|
1457
1035
|
return acc;
|
|
1458
1036
|
}
|
|
1459
|
-
return
|
|
1037
|
+
return {
|
|
1038
|
+
...acc,
|
|
1039
|
+
[key]: value,
|
|
1040
|
+
};
|
|
1460
1041
|
}, {});
|
|
1461
1042
|
};
|
|
1462
|
-
|
|
1463
|
-
return
|
|
1043
|
+
const serializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfigurationInput = (input, context) => {
|
|
1044
|
+
return {
|
|
1045
|
+
...(input.logGroupArn != null && { logGroupArn: input.logGroupArn }),
|
|
1046
|
+
};
|
|
1464
1047
|
};
|
|
1465
|
-
|
|
1466
|
-
return
|
|
1048
|
+
const serializeAws_restJson1ExperimentTemplateS3LogConfigurationInput = (input, context) => {
|
|
1049
|
+
return {
|
|
1050
|
+
...(input.bucketName != null && { bucketName: input.bucketName }),
|
|
1051
|
+
...(input.prefix != null && { prefix: input.prefix }),
|
|
1052
|
+
};
|
|
1467
1053
|
};
|
|
1468
|
-
|
|
1054
|
+
const serializeAws_restJson1ExperimentTemplateTargetFilterInputList = (input, context) => {
|
|
1469
1055
|
return input
|
|
1470
|
-
.filter(
|
|
1471
|
-
.map(
|
|
1056
|
+
.filter((e) => e != null)
|
|
1057
|
+
.map((entry) => {
|
|
1472
1058
|
return serializeAws_restJson1ExperimentTemplateTargetInputFilter(entry, context);
|
|
1473
1059
|
});
|
|
1474
1060
|
};
|
|
1475
|
-
|
|
1061
|
+
const serializeAws_restJson1ExperimentTemplateTargetFilterValues = (input, context) => {
|
|
1476
1062
|
return input
|
|
1477
|
-
.filter(
|
|
1478
|
-
.map(
|
|
1063
|
+
.filter((e) => e != null)
|
|
1064
|
+
.map((entry) => {
|
|
1479
1065
|
return entry;
|
|
1480
1066
|
});
|
|
1481
1067
|
};
|
|
1482
|
-
|
|
1483
|
-
return
|
|
1484
|
-
|
|
1485
|
-
|
|
1068
|
+
const serializeAws_restJson1ExperimentTemplateTargetInputFilter = (input, context) => {
|
|
1069
|
+
return {
|
|
1070
|
+
...(input.path != null && { path: input.path }),
|
|
1071
|
+
...(input.values != null && {
|
|
1072
|
+
values: serializeAws_restJson1ExperimentTemplateTargetFilterValues(input.values, context),
|
|
1073
|
+
}),
|
|
1074
|
+
};
|
|
1486
1075
|
};
|
|
1487
|
-
|
|
1488
|
-
return Object.entries(input).reduce(
|
|
1489
|
-
var _b;
|
|
1490
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1076
|
+
const serializeAws_restJson1ExperimentTemplateTargetParameterMap = (input, context) => {
|
|
1077
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1491
1078
|
if (value === null) {
|
|
1492
1079
|
return acc;
|
|
1493
1080
|
}
|
|
1494
|
-
return
|
|
1081
|
+
return {
|
|
1082
|
+
...acc,
|
|
1083
|
+
[key]: value,
|
|
1084
|
+
};
|
|
1495
1085
|
}, {});
|
|
1496
1086
|
};
|
|
1497
|
-
|
|
1087
|
+
const serializeAws_restJson1ResourceArnList = (input, context) => {
|
|
1498
1088
|
return input
|
|
1499
|
-
.filter(
|
|
1500
|
-
.map(
|
|
1089
|
+
.filter((e) => e != null)
|
|
1090
|
+
.map((entry) => {
|
|
1501
1091
|
return entry;
|
|
1502
1092
|
});
|
|
1503
1093
|
};
|
|
1504
|
-
|
|
1505
|
-
return Object.entries(input).reduce(
|
|
1506
|
-
var _b;
|
|
1507
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1094
|
+
const serializeAws_restJson1TagMap = (input, context) => {
|
|
1095
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1508
1096
|
if (value === null) {
|
|
1509
1097
|
return acc;
|
|
1510
1098
|
}
|
|
1511
|
-
return
|
|
1099
|
+
return {
|
|
1100
|
+
...acc,
|
|
1101
|
+
[key]: value,
|
|
1102
|
+
};
|
|
1512
1103
|
}, {});
|
|
1513
1104
|
};
|
|
1514
|
-
|
|
1515
|
-
return
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1105
|
+
const serializeAws_restJson1UpdateExperimentTemplateActionInputItem = (input, context) => {
|
|
1106
|
+
return {
|
|
1107
|
+
...(input.actionId != null && { actionId: input.actionId }),
|
|
1108
|
+
...(input.description != null && { description: input.description }),
|
|
1109
|
+
...(input.parameters != null && {
|
|
1110
|
+
parameters: serializeAws_restJson1ExperimentTemplateActionParameterMap(input.parameters, context),
|
|
1111
|
+
}),
|
|
1112
|
+
...(input.startAfter != null && {
|
|
1113
|
+
startAfter: serializeAws_restJson1ExperimentTemplateActionStartAfterList(input.startAfter, context),
|
|
1114
|
+
}),
|
|
1115
|
+
...(input.targets != null && {
|
|
1116
|
+
targets: serializeAws_restJson1ExperimentTemplateActionTargetMap(input.targets, context),
|
|
1117
|
+
}),
|
|
1118
|
+
};
|
|
1119
|
+
};
|
|
1120
|
+
const serializeAws_restJson1UpdateExperimentTemplateActionInputMap = (input, context) => {
|
|
1121
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1527
1122
|
if (value === null) {
|
|
1528
1123
|
return acc;
|
|
1529
1124
|
}
|
|
1530
|
-
return
|
|
1125
|
+
return {
|
|
1126
|
+
...acc,
|
|
1127
|
+
[key]: serializeAws_restJson1UpdateExperimentTemplateActionInputItem(value, context),
|
|
1128
|
+
};
|
|
1531
1129
|
}, {});
|
|
1532
1130
|
};
|
|
1533
|
-
|
|
1534
|
-
return
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1131
|
+
const serializeAws_restJson1UpdateExperimentTemplateLogConfigurationInput = (input, context) => {
|
|
1132
|
+
return {
|
|
1133
|
+
...(input.cloudWatchLogsConfiguration != null && {
|
|
1134
|
+
cloudWatchLogsConfiguration: serializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfigurationInput(input.cloudWatchLogsConfiguration, context),
|
|
1135
|
+
}),
|
|
1136
|
+
...(input.logSchemaVersion != null && { logSchemaVersion: input.logSchemaVersion }),
|
|
1137
|
+
...(input.s3Configuration != null && {
|
|
1138
|
+
s3Configuration: serializeAws_restJson1ExperimentTemplateS3LogConfigurationInput(input.s3Configuration, context),
|
|
1139
|
+
}),
|
|
1140
|
+
};
|
|
1539
1141
|
};
|
|
1540
|
-
|
|
1541
|
-
return
|
|
1142
|
+
const serializeAws_restJson1UpdateExperimentTemplateStopConditionInput = (input, context) => {
|
|
1143
|
+
return {
|
|
1144
|
+
...(input.source != null && { source: input.source }),
|
|
1145
|
+
...(input.value != null && { value: input.value }),
|
|
1146
|
+
};
|
|
1542
1147
|
};
|
|
1543
|
-
|
|
1148
|
+
const serializeAws_restJson1UpdateExperimentTemplateStopConditionInputList = (input, context) => {
|
|
1544
1149
|
return input
|
|
1545
|
-
.filter(
|
|
1546
|
-
.map(
|
|
1150
|
+
.filter((e) => e != null)
|
|
1151
|
+
.map((entry) => {
|
|
1547
1152
|
return serializeAws_restJson1UpdateExperimentTemplateStopConditionInput(entry, context);
|
|
1548
1153
|
});
|
|
1549
1154
|
};
|
|
1550
|
-
|
|
1551
|
-
return
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1155
|
+
const serializeAws_restJson1UpdateExperimentTemplateTargetInput = (input, context) => {
|
|
1156
|
+
return {
|
|
1157
|
+
...(input.filters != null && {
|
|
1158
|
+
filters: serializeAws_restJson1ExperimentTemplateTargetFilterInputList(input.filters, context),
|
|
1159
|
+
}),
|
|
1160
|
+
...(input.parameters != null && {
|
|
1161
|
+
parameters: serializeAws_restJson1ExperimentTemplateTargetParameterMap(input.parameters, context),
|
|
1162
|
+
}),
|
|
1163
|
+
...(input.resourceArns != null && {
|
|
1164
|
+
resourceArns: serializeAws_restJson1ResourceArnList(input.resourceArns, context),
|
|
1165
|
+
}),
|
|
1166
|
+
...(input.resourceTags != null && { resourceTags: serializeAws_restJson1TagMap(input.resourceTags, context) }),
|
|
1167
|
+
...(input.resourceType != null && { resourceType: input.resourceType }),
|
|
1168
|
+
...(input.selectionMode != null && { selectionMode: input.selectionMode }),
|
|
1169
|
+
};
|
|
1558
1170
|
};
|
|
1559
|
-
|
|
1560
|
-
return Object.entries(input).reduce(
|
|
1561
|
-
var _b;
|
|
1562
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1171
|
+
const serializeAws_restJson1UpdateExperimentTemplateTargetInputMap = (input, context) => {
|
|
1172
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1563
1173
|
if (value === null) {
|
|
1564
1174
|
return acc;
|
|
1565
1175
|
}
|
|
1566
|
-
return
|
|
1176
|
+
return {
|
|
1177
|
+
...acc,
|
|
1178
|
+
[key]: serializeAws_restJson1UpdateExperimentTemplateTargetInput(value, context),
|
|
1179
|
+
};
|
|
1567
1180
|
}, {});
|
|
1568
1181
|
};
|
|
1569
|
-
|
|
1182
|
+
const deserializeAws_restJson1Action = (output, context) => {
|
|
1570
1183
|
return {
|
|
1571
1184
|
description: __expectString(output.description),
|
|
1572
1185
|
id: __expectString(output.id),
|
|
@@ -1575,23 +1188,24 @@ var deserializeAws_restJson1Action = function (output, context) {
|
|
|
1575
1188
|
targets: output.targets != null ? deserializeAws_restJson1ActionTargetMap(output.targets, context) : undefined,
|
|
1576
1189
|
};
|
|
1577
1190
|
};
|
|
1578
|
-
|
|
1191
|
+
const deserializeAws_restJson1ActionParameter = (output, context) => {
|
|
1579
1192
|
return {
|
|
1580
1193
|
description: __expectString(output.description),
|
|
1581
1194
|
required: __expectBoolean(output.required),
|
|
1582
1195
|
};
|
|
1583
1196
|
};
|
|
1584
|
-
|
|
1585
|
-
return Object.entries(output).reduce(
|
|
1586
|
-
var _b;
|
|
1587
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1197
|
+
const deserializeAws_restJson1ActionParameterMap = (output, context) => {
|
|
1198
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1588
1199
|
if (value === null) {
|
|
1589
1200
|
return acc;
|
|
1590
1201
|
}
|
|
1591
|
-
return
|
|
1202
|
+
return {
|
|
1203
|
+
...acc,
|
|
1204
|
+
[key]: deserializeAws_restJson1ActionParameter(value, context),
|
|
1205
|
+
};
|
|
1592
1206
|
}, {});
|
|
1593
1207
|
};
|
|
1594
|
-
|
|
1208
|
+
const deserializeAws_restJson1ActionSummary = (output, context) => {
|
|
1595
1209
|
return {
|
|
1596
1210
|
description: __expectString(output.description),
|
|
1597
1211
|
id: __expectString(output.id),
|
|
@@ -1599,10 +1213,10 @@ var deserializeAws_restJson1ActionSummary = function (output, context) {
|
|
|
1599
1213
|
targets: output.targets != null ? deserializeAws_restJson1ActionTargetMap(output.targets, context) : undefined,
|
|
1600
1214
|
};
|
|
1601
1215
|
};
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
.filter(
|
|
1605
|
-
.map(
|
|
1216
|
+
const deserializeAws_restJson1ActionSummaryList = (output, context) => {
|
|
1217
|
+
const retVal = (output || [])
|
|
1218
|
+
.filter((e) => e != null)
|
|
1219
|
+
.map((entry) => {
|
|
1606
1220
|
if (entry === null) {
|
|
1607
1221
|
return null;
|
|
1608
1222
|
}
|
|
@@ -1610,22 +1224,23 @@ var deserializeAws_restJson1ActionSummaryList = function (output, context) {
|
|
|
1610
1224
|
});
|
|
1611
1225
|
return retVal;
|
|
1612
1226
|
};
|
|
1613
|
-
|
|
1227
|
+
const deserializeAws_restJson1ActionTarget = (output, context) => {
|
|
1614
1228
|
return {
|
|
1615
1229
|
resourceType: __expectString(output.resourceType),
|
|
1616
1230
|
};
|
|
1617
1231
|
};
|
|
1618
|
-
|
|
1619
|
-
return Object.entries(output).reduce(
|
|
1620
|
-
var _b;
|
|
1621
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1232
|
+
const deserializeAws_restJson1ActionTargetMap = (output, context) => {
|
|
1233
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1622
1234
|
if (value === null) {
|
|
1623
1235
|
return acc;
|
|
1624
1236
|
}
|
|
1625
|
-
return
|
|
1237
|
+
return {
|
|
1238
|
+
...acc,
|
|
1239
|
+
[key]: deserializeAws_restJson1ActionTarget(value, context),
|
|
1240
|
+
};
|
|
1626
1241
|
}, {});
|
|
1627
1242
|
};
|
|
1628
|
-
|
|
1243
|
+
const deserializeAws_restJson1Experiment = (output, context) => {
|
|
1629
1244
|
return {
|
|
1630
1245
|
actions: output.actions != null ? deserializeAws_restJson1ExperimentActionMap(output.actions, context) : undefined,
|
|
1631
1246
|
creationTime: output.creationTime != null
|
|
@@ -1647,7 +1262,7 @@ var deserializeAws_restJson1Experiment = function (output, context) {
|
|
|
1647
1262
|
targets: output.targets != null ? deserializeAws_restJson1ExperimentTargetMap(output.targets, context) : undefined,
|
|
1648
1263
|
};
|
|
1649
1264
|
};
|
|
1650
|
-
|
|
1265
|
+
const deserializeAws_restJson1ExperimentAction = (output, context) => {
|
|
1651
1266
|
return {
|
|
1652
1267
|
actionId: __expectString(output.actionId),
|
|
1653
1268
|
description: __expectString(output.description),
|
|
@@ -1663,30 +1278,32 @@ var deserializeAws_restJson1ExperimentAction = function (output, context) {
|
|
|
1663
1278
|
targets: output.targets != null ? deserializeAws_restJson1ExperimentActionTargetMap(output.targets, context) : undefined,
|
|
1664
1279
|
};
|
|
1665
1280
|
};
|
|
1666
|
-
|
|
1667
|
-
return Object.entries(output).reduce(
|
|
1668
|
-
var _b;
|
|
1669
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1281
|
+
const deserializeAws_restJson1ExperimentActionMap = (output, context) => {
|
|
1282
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1670
1283
|
if (value === null) {
|
|
1671
1284
|
return acc;
|
|
1672
1285
|
}
|
|
1673
|
-
return
|
|
1286
|
+
return {
|
|
1287
|
+
...acc,
|
|
1288
|
+
[key]: deserializeAws_restJson1ExperimentAction(value, context),
|
|
1289
|
+
};
|
|
1674
1290
|
}, {});
|
|
1675
1291
|
};
|
|
1676
|
-
|
|
1677
|
-
return Object.entries(output).reduce(
|
|
1678
|
-
var _b;
|
|
1679
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1292
|
+
const deserializeAws_restJson1ExperimentActionParameterMap = (output, context) => {
|
|
1293
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1680
1294
|
if (value === null) {
|
|
1681
1295
|
return acc;
|
|
1682
1296
|
}
|
|
1683
|
-
return
|
|
1297
|
+
return {
|
|
1298
|
+
...acc,
|
|
1299
|
+
[key]: __expectString(value),
|
|
1300
|
+
};
|
|
1684
1301
|
}, {});
|
|
1685
1302
|
};
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
.filter(
|
|
1689
|
-
.map(
|
|
1303
|
+
const deserializeAws_restJson1ExperimentActionStartAfterList = (output, context) => {
|
|
1304
|
+
const retVal = (output || [])
|
|
1305
|
+
.filter((e) => e != null)
|
|
1306
|
+
.map((entry) => {
|
|
1690
1307
|
if (entry === null) {
|
|
1691
1308
|
return null;
|
|
1692
1309
|
}
|
|
@@ -1694,28 +1311,29 @@ var deserializeAws_restJson1ExperimentActionStartAfterList = function (output, c
|
|
|
1694
1311
|
});
|
|
1695
1312
|
return retVal;
|
|
1696
1313
|
};
|
|
1697
|
-
|
|
1314
|
+
const deserializeAws_restJson1ExperimentActionState = (output, context) => {
|
|
1698
1315
|
return {
|
|
1699
1316
|
reason: __expectString(output.reason),
|
|
1700
1317
|
status: __expectString(output.status),
|
|
1701
1318
|
};
|
|
1702
1319
|
};
|
|
1703
|
-
|
|
1704
|
-
return Object.entries(output).reduce(
|
|
1705
|
-
var _b;
|
|
1706
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1320
|
+
const deserializeAws_restJson1ExperimentActionTargetMap = (output, context) => {
|
|
1321
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1707
1322
|
if (value === null) {
|
|
1708
1323
|
return acc;
|
|
1709
1324
|
}
|
|
1710
|
-
return
|
|
1325
|
+
return {
|
|
1326
|
+
...acc,
|
|
1327
|
+
[key]: __expectString(value),
|
|
1328
|
+
};
|
|
1711
1329
|
}, {});
|
|
1712
1330
|
};
|
|
1713
|
-
|
|
1331
|
+
const deserializeAws_restJson1ExperimentCloudWatchLogsLogConfiguration = (output, context) => {
|
|
1714
1332
|
return {
|
|
1715
1333
|
logGroupArn: __expectString(output.logGroupArn),
|
|
1716
1334
|
};
|
|
1717
1335
|
};
|
|
1718
|
-
|
|
1336
|
+
const deserializeAws_restJson1ExperimentLogConfiguration = (output, context) => {
|
|
1719
1337
|
return {
|
|
1720
1338
|
cloudWatchLogsConfiguration: output.cloudWatchLogsConfiguration != null
|
|
1721
1339
|
? deserializeAws_restJson1ExperimentCloudWatchLogsLogConfiguration(output.cloudWatchLogsConfiguration, context)
|
|
@@ -1726,28 +1344,28 @@ var deserializeAws_restJson1ExperimentLogConfiguration = function (output, conte
|
|
|
1726
1344
|
: undefined,
|
|
1727
1345
|
};
|
|
1728
1346
|
};
|
|
1729
|
-
|
|
1347
|
+
const deserializeAws_restJson1ExperimentS3LogConfiguration = (output, context) => {
|
|
1730
1348
|
return {
|
|
1731
1349
|
bucketName: __expectString(output.bucketName),
|
|
1732
1350
|
prefix: __expectString(output.prefix),
|
|
1733
1351
|
};
|
|
1734
1352
|
};
|
|
1735
|
-
|
|
1353
|
+
const deserializeAws_restJson1ExperimentState = (output, context) => {
|
|
1736
1354
|
return {
|
|
1737
1355
|
reason: __expectString(output.reason),
|
|
1738
1356
|
status: __expectString(output.status),
|
|
1739
1357
|
};
|
|
1740
1358
|
};
|
|
1741
|
-
|
|
1359
|
+
const deserializeAws_restJson1ExperimentStopCondition = (output, context) => {
|
|
1742
1360
|
return {
|
|
1743
1361
|
source: __expectString(output.source),
|
|
1744
1362
|
value: __expectString(output.value),
|
|
1745
1363
|
};
|
|
1746
1364
|
};
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
.filter(
|
|
1750
|
-
.map(
|
|
1365
|
+
const deserializeAws_restJson1ExperimentStopConditionList = (output, context) => {
|
|
1366
|
+
const retVal = (output || [])
|
|
1367
|
+
.filter((e) => e != null)
|
|
1368
|
+
.map((entry) => {
|
|
1751
1369
|
if (entry === null) {
|
|
1752
1370
|
return null;
|
|
1753
1371
|
}
|
|
@@ -1755,7 +1373,7 @@ var deserializeAws_restJson1ExperimentStopConditionList = function (output, cont
|
|
|
1755
1373
|
});
|
|
1756
1374
|
return retVal;
|
|
1757
1375
|
};
|
|
1758
|
-
|
|
1376
|
+
const deserializeAws_restJson1ExperimentSummary = (output, context) => {
|
|
1759
1377
|
return {
|
|
1760
1378
|
creationTime: output.creationTime != null
|
|
1761
1379
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
@@ -1766,10 +1384,10 @@ var deserializeAws_restJson1ExperimentSummary = function (output, context) {
|
|
|
1766
1384
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
1767
1385
|
};
|
|
1768
1386
|
};
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
.filter(
|
|
1772
|
-
.map(
|
|
1387
|
+
const deserializeAws_restJson1ExperimentSummaryList = (output, context) => {
|
|
1388
|
+
const retVal = (output || [])
|
|
1389
|
+
.filter((e) => e != null)
|
|
1390
|
+
.map((entry) => {
|
|
1773
1391
|
if (entry === null) {
|
|
1774
1392
|
return null;
|
|
1775
1393
|
}
|
|
@@ -1777,7 +1395,7 @@ var deserializeAws_restJson1ExperimentSummaryList = function (output, context) {
|
|
|
1777
1395
|
});
|
|
1778
1396
|
return retVal;
|
|
1779
1397
|
};
|
|
1780
|
-
|
|
1398
|
+
const deserializeAws_restJson1ExperimentTarget = (output, context) => {
|
|
1781
1399
|
return {
|
|
1782
1400
|
filters: output.filters != null ? deserializeAws_restJson1ExperimentTargetFilterList(output.filters, context) : undefined,
|
|
1783
1401
|
parameters: output.parameters != null
|
|
@@ -1789,16 +1407,16 @@ var deserializeAws_restJson1ExperimentTarget = function (output, context) {
|
|
|
1789
1407
|
selectionMode: __expectString(output.selectionMode),
|
|
1790
1408
|
};
|
|
1791
1409
|
};
|
|
1792
|
-
|
|
1410
|
+
const deserializeAws_restJson1ExperimentTargetFilter = (output, context) => {
|
|
1793
1411
|
return {
|
|
1794
1412
|
path: __expectString(output.path),
|
|
1795
1413
|
values: output.values != null ? deserializeAws_restJson1ExperimentTargetFilterValues(output.values, context) : undefined,
|
|
1796
1414
|
};
|
|
1797
1415
|
};
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
.filter(
|
|
1801
|
-
.map(
|
|
1416
|
+
const deserializeAws_restJson1ExperimentTargetFilterList = (output, context) => {
|
|
1417
|
+
const retVal = (output || [])
|
|
1418
|
+
.filter((e) => e != null)
|
|
1419
|
+
.map((entry) => {
|
|
1802
1420
|
if (entry === null) {
|
|
1803
1421
|
return null;
|
|
1804
1422
|
}
|
|
@@ -1806,10 +1424,10 @@ var deserializeAws_restJson1ExperimentTargetFilterList = function (output, conte
|
|
|
1806
1424
|
});
|
|
1807
1425
|
return retVal;
|
|
1808
1426
|
};
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
.filter(
|
|
1812
|
-
.map(
|
|
1427
|
+
const deserializeAws_restJson1ExperimentTargetFilterValues = (output, context) => {
|
|
1428
|
+
const retVal = (output || [])
|
|
1429
|
+
.filter((e) => e != null)
|
|
1430
|
+
.map((entry) => {
|
|
1813
1431
|
if (entry === null) {
|
|
1814
1432
|
return null;
|
|
1815
1433
|
}
|
|
@@ -1817,27 +1435,29 @@ var deserializeAws_restJson1ExperimentTargetFilterValues = function (output, con
|
|
|
1817
1435
|
});
|
|
1818
1436
|
return retVal;
|
|
1819
1437
|
};
|
|
1820
|
-
|
|
1821
|
-
return Object.entries(output).reduce(
|
|
1822
|
-
var _b;
|
|
1823
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1438
|
+
const deserializeAws_restJson1ExperimentTargetMap = (output, context) => {
|
|
1439
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1824
1440
|
if (value === null) {
|
|
1825
1441
|
return acc;
|
|
1826
1442
|
}
|
|
1827
|
-
return
|
|
1443
|
+
return {
|
|
1444
|
+
...acc,
|
|
1445
|
+
[key]: deserializeAws_restJson1ExperimentTarget(value, context),
|
|
1446
|
+
};
|
|
1828
1447
|
}, {});
|
|
1829
1448
|
};
|
|
1830
|
-
|
|
1831
|
-
return Object.entries(output).reduce(
|
|
1832
|
-
var _b;
|
|
1833
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1449
|
+
const deserializeAws_restJson1ExperimentTargetParameterMap = (output, context) => {
|
|
1450
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1834
1451
|
if (value === null) {
|
|
1835
1452
|
return acc;
|
|
1836
1453
|
}
|
|
1837
|
-
return
|
|
1454
|
+
return {
|
|
1455
|
+
...acc,
|
|
1456
|
+
[key]: __expectString(value),
|
|
1457
|
+
};
|
|
1838
1458
|
}, {});
|
|
1839
1459
|
};
|
|
1840
|
-
|
|
1460
|
+
const deserializeAws_restJson1ExperimentTemplate = (output, context) => {
|
|
1841
1461
|
return {
|
|
1842
1462
|
actions: output.actions != null ? deserializeAws_restJson1ExperimentTemplateActionMap(output.actions, context) : undefined,
|
|
1843
1463
|
creationTime: output.creationTime != null
|
|
@@ -1859,7 +1479,7 @@ var deserializeAws_restJson1ExperimentTemplate = function (output, context) {
|
|
|
1859
1479
|
targets: output.targets != null ? deserializeAws_restJson1ExperimentTemplateTargetMap(output.targets, context) : undefined,
|
|
1860
1480
|
};
|
|
1861
1481
|
};
|
|
1862
|
-
|
|
1482
|
+
const deserializeAws_restJson1ExperimentTemplateAction = (output, context) => {
|
|
1863
1483
|
return {
|
|
1864
1484
|
actionId: __expectString(output.actionId),
|
|
1865
1485
|
description: __expectString(output.description),
|
|
@@ -1874,30 +1494,32 @@ var deserializeAws_restJson1ExperimentTemplateAction = function (output, context
|
|
|
1874
1494
|
: undefined,
|
|
1875
1495
|
};
|
|
1876
1496
|
};
|
|
1877
|
-
|
|
1878
|
-
return Object.entries(output).reduce(
|
|
1879
|
-
var _b;
|
|
1880
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1497
|
+
const deserializeAws_restJson1ExperimentTemplateActionMap = (output, context) => {
|
|
1498
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1881
1499
|
if (value === null) {
|
|
1882
1500
|
return acc;
|
|
1883
1501
|
}
|
|
1884
|
-
return
|
|
1502
|
+
return {
|
|
1503
|
+
...acc,
|
|
1504
|
+
[key]: deserializeAws_restJson1ExperimentTemplateAction(value, context),
|
|
1505
|
+
};
|
|
1885
1506
|
}, {});
|
|
1886
1507
|
};
|
|
1887
|
-
|
|
1888
|
-
return Object.entries(output).reduce(
|
|
1889
|
-
var _b;
|
|
1890
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1508
|
+
const deserializeAws_restJson1ExperimentTemplateActionParameterMap = (output, context) => {
|
|
1509
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1891
1510
|
if (value === null) {
|
|
1892
1511
|
return acc;
|
|
1893
1512
|
}
|
|
1894
|
-
return
|
|
1513
|
+
return {
|
|
1514
|
+
...acc,
|
|
1515
|
+
[key]: __expectString(value),
|
|
1516
|
+
};
|
|
1895
1517
|
}, {});
|
|
1896
1518
|
};
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
.filter(
|
|
1900
|
-
.map(
|
|
1519
|
+
const deserializeAws_restJson1ExperimentTemplateActionStartAfterList = (output, context) => {
|
|
1520
|
+
const retVal = (output || [])
|
|
1521
|
+
.filter((e) => e != null)
|
|
1522
|
+
.map((entry) => {
|
|
1901
1523
|
if (entry === null) {
|
|
1902
1524
|
return null;
|
|
1903
1525
|
}
|
|
@@ -1905,22 +1527,23 @@ var deserializeAws_restJson1ExperimentTemplateActionStartAfterList = function (o
|
|
|
1905
1527
|
});
|
|
1906
1528
|
return retVal;
|
|
1907
1529
|
};
|
|
1908
|
-
|
|
1909
|
-
return Object.entries(output).reduce(
|
|
1910
|
-
var _b;
|
|
1911
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1530
|
+
const deserializeAws_restJson1ExperimentTemplateActionTargetMap = (output, context) => {
|
|
1531
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1912
1532
|
if (value === null) {
|
|
1913
1533
|
return acc;
|
|
1914
1534
|
}
|
|
1915
|
-
return
|
|
1535
|
+
return {
|
|
1536
|
+
...acc,
|
|
1537
|
+
[key]: __expectString(value),
|
|
1538
|
+
};
|
|
1916
1539
|
}, {});
|
|
1917
1540
|
};
|
|
1918
|
-
|
|
1541
|
+
const deserializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfiguration = (output, context) => {
|
|
1919
1542
|
return {
|
|
1920
1543
|
logGroupArn: __expectString(output.logGroupArn),
|
|
1921
1544
|
};
|
|
1922
1545
|
};
|
|
1923
|
-
|
|
1546
|
+
const deserializeAws_restJson1ExperimentTemplateLogConfiguration = (output, context) => {
|
|
1924
1547
|
return {
|
|
1925
1548
|
cloudWatchLogsConfiguration: output.cloudWatchLogsConfiguration != null
|
|
1926
1549
|
? deserializeAws_restJson1ExperimentTemplateCloudWatchLogsLogConfiguration(output.cloudWatchLogsConfiguration, context)
|
|
@@ -1931,22 +1554,22 @@ var deserializeAws_restJson1ExperimentTemplateLogConfiguration = function (outpu
|
|
|
1931
1554
|
: undefined,
|
|
1932
1555
|
};
|
|
1933
1556
|
};
|
|
1934
|
-
|
|
1557
|
+
const deserializeAws_restJson1ExperimentTemplateS3LogConfiguration = (output, context) => {
|
|
1935
1558
|
return {
|
|
1936
1559
|
bucketName: __expectString(output.bucketName),
|
|
1937
1560
|
prefix: __expectString(output.prefix),
|
|
1938
1561
|
};
|
|
1939
1562
|
};
|
|
1940
|
-
|
|
1563
|
+
const deserializeAws_restJson1ExperimentTemplateStopCondition = (output, context) => {
|
|
1941
1564
|
return {
|
|
1942
1565
|
source: __expectString(output.source),
|
|
1943
1566
|
value: __expectString(output.value),
|
|
1944
1567
|
};
|
|
1945
1568
|
};
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
.filter(
|
|
1949
|
-
.map(
|
|
1569
|
+
const deserializeAws_restJson1ExperimentTemplateStopConditionList = (output, context) => {
|
|
1570
|
+
const retVal = (output || [])
|
|
1571
|
+
.filter((e) => e != null)
|
|
1572
|
+
.map((entry) => {
|
|
1950
1573
|
if (entry === null) {
|
|
1951
1574
|
return null;
|
|
1952
1575
|
}
|
|
@@ -1954,7 +1577,7 @@ var deserializeAws_restJson1ExperimentTemplateStopConditionList = function (outp
|
|
|
1954
1577
|
});
|
|
1955
1578
|
return retVal;
|
|
1956
1579
|
};
|
|
1957
|
-
|
|
1580
|
+
const deserializeAws_restJson1ExperimentTemplateSummary = (output, context) => {
|
|
1958
1581
|
return {
|
|
1959
1582
|
creationTime: output.creationTime != null
|
|
1960
1583
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.creationTime)))
|
|
@@ -1967,10 +1590,10 @@ var deserializeAws_restJson1ExperimentTemplateSummary = function (output, contex
|
|
|
1967
1590
|
tags: output.tags != null ? deserializeAws_restJson1TagMap(output.tags, context) : undefined,
|
|
1968
1591
|
};
|
|
1969
1592
|
};
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
.filter(
|
|
1973
|
-
.map(
|
|
1593
|
+
const deserializeAws_restJson1ExperimentTemplateSummaryList = (output, context) => {
|
|
1594
|
+
const retVal = (output || [])
|
|
1595
|
+
.filter((e) => e != null)
|
|
1596
|
+
.map((entry) => {
|
|
1974
1597
|
if (entry === null) {
|
|
1975
1598
|
return null;
|
|
1976
1599
|
}
|
|
@@ -1978,7 +1601,7 @@ var deserializeAws_restJson1ExperimentTemplateSummaryList = function (output, co
|
|
|
1978
1601
|
});
|
|
1979
1602
|
return retVal;
|
|
1980
1603
|
};
|
|
1981
|
-
|
|
1604
|
+
const deserializeAws_restJson1ExperimentTemplateTarget = (output, context) => {
|
|
1982
1605
|
return {
|
|
1983
1606
|
filters: output.filters != null
|
|
1984
1607
|
? deserializeAws_restJson1ExperimentTemplateTargetFilterList(output.filters, context)
|
|
@@ -1992,7 +1615,7 @@ var deserializeAws_restJson1ExperimentTemplateTarget = function (output, context
|
|
|
1992
1615
|
selectionMode: __expectString(output.selectionMode),
|
|
1993
1616
|
};
|
|
1994
1617
|
};
|
|
1995
|
-
|
|
1618
|
+
const deserializeAws_restJson1ExperimentTemplateTargetFilter = (output, context) => {
|
|
1996
1619
|
return {
|
|
1997
1620
|
path: __expectString(output.path),
|
|
1998
1621
|
values: output.values != null
|
|
@@ -2000,10 +1623,10 @@ var deserializeAws_restJson1ExperimentTemplateTargetFilter = function (output, c
|
|
|
2000
1623
|
: undefined,
|
|
2001
1624
|
};
|
|
2002
1625
|
};
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
.filter(
|
|
2006
|
-
.map(
|
|
1626
|
+
const deserializeAws_restJson1ExperimentTemplateTargetFilterList = (output, context) => {
|
|
1627
|
+
const retVal = (output || [])
|
|
1628
|
+
.filter((e) => e != null)
|
|
1629
|
+
.map((entry) => {
|
|
2007
1630
|
if (entry === null) {
|
|
2008
1631
|
return null;
|
|
2009
1632
|
}
|
|
@@ -2011,10 +1634,10 @@ var deserializeAws_restJson1ExperimentTemplateTargetFilterList = function (outpu
|
|
|
2011
1634
|
});
|
|
2012
1635
|
return retVal;
|
|
2013
1636
|
};
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
.filter(
|
|
2017
|
-
.map(
|
|
1637
|
+
const deserializeAws_restJson1ExperimentTemplateTargetFilterValues = (output, context) => {
|
|
1638
|
+
const retVal = (output || [])
|
|
1639
|
+
.filter((e) => e != null)
|
|
1640
|
+
.map((entry) => {
|
|
2018
1641
|
if (entry === null) {
|
|
2019
1642
|
return null;
|
|
2020
1643
|
}
|
|
@@ -2022,30 +1645,32 @@ var deserializeAws_restJson1ExperimentTemplateTargetFilterValues = function (out
|
|
|
2022
1645
|
});
|
|
2023
1646
|
return retVal;
|
|
2024
1647
|
};
|
|
2025
|
-
|
|
2026
|
-
return Object.entries(output).reduce(
|
|
2027
|
-
var _b;
|
|
2028
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1648
|
+
const deserializeAws_restJson1ExperimentTemplateTargetMap = (output, context) => {
|
|
1649
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2029
1650
|
if (value === null) {
|
|
2030
1651
|
return acc;
|
|
2031
1652
|
}
|
|
2032
|
-
return
|
|
1653
|
+
return {
|
|
1654
|
+
...acc,
|
|
1655
|
+
[key]: deserializeAws_restJson1ExperimentTemplateTarget(value, context),
|
|
1656
|
+
};
|
|
2033
1657
|
}, {});
|
|
2034
1658
|
};
|
|
2035
|
-
|
|
2036
|
-
return Object.entries(output).reduce(
|
|
2037
|
-
var _b;
|
|
2038
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1659
|
+
const deserializeAws_restJson1ExperimentTemplateTargetParameterMap = (output, context) => {
|
|
1660
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2039
1661
|
if (value === null) {
|
|
2040
1662
|
return acc;
|
|
2041
1663
|
}
|
|
2042
|
-
return
|
|
1664
|
+
return {
|
|
1665
|
+
...acc,
|
|
1666
|
+
[key]: __expectString(value),
|
|
1667
|
+
};
|
|
2043
1668
|
}, {});
|
|
2044
1669
|
};
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
.filter(
|
|
2048
|
-
.map(
|
|
1670
|
+
const deserializeAws_restJson1ResourceArnList = (output, context) => {
|
|
1671
|
+
const retVal = (output || [])
|
|
1672
|
+
.filter((e) => e != null)
|
|
1673
|
+
.map((entry) => {
|
|
2049
1674
|
if (entry === null) {
|
|
2050
1675
|
return null;
|
|
2051
1676
|
}
|
|
@@ -2053,17 +1678,18 @@ var deserializeAws_restJson1ResourceArnList = function (output, context) {
|
|
|
2053
1678
|
});
|
|
2054
1679
|
return retVal;
|
|
2055
1680
|
};
|
|
2056
|
-
|
|
2057
|
-
return Object.entries(output).reduce(
|
|
2058
|
-
var _b;
|
|
2059
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1681
|
+
const deserializeAws_restJson1TagMap = (output, context) => {
|
|
1682
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2060
1683
|
if (value === null) {
|
|
2061
1684
|
return acc;
|
|
2062
1685
|
}
|
|
2063
|
-
return
|
|
1686
|
+
return {
|
|
1687
|
+
...acc,
|
|
1688
|
+
[key]: __expectString(value),
|
|
1689
|
+
};
|
|
2064
1690
|
}, {});
|
|
2065
1691
|
};
|
|
2066
|
-
|
|
1692
|
+
const deserializeAws_restJson1TargetResourceType = (output, context) => {
|
|
2067
1693
|
return {
|
|
2068
1694
|
description: __expectString(output.description),
|
|
2069
1695
|
parameters: output.parameters != null
|
|
@@ -2072,32 +1698,33 @@ var deserializeAws_restJson1TargetResourceType = function (output, context) {
|
|
|
2072
1698
|
resourceType: __expectString(output.resourceType),
|
|
2073
1699
|
};
|
|
2074
1700
|
};
|
|
2075
|
-
|
|
1701
|
+
const deserializeAws_restJson1TargetResourceTypeParameter = (output, context) => {
|
|
2076
1702
|
return {
|
|
2077
1703
|
description: __expectString(output.description),
|
|
2078
1704
|
required: __expectBoolean(output.required),
|
|
2079
1705
|
};
|
|
2080
1706
|
};
|
|
2081
|
-
|
|
2082
|
-
return Object.entries(output).reduce(
|
|
2083
|
-
var _b;
|
|
2084
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1707
|
+
const deserializeAws_restJson1TargetResourceTypeParameterMap = (output, context) => {
|
|
1708
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
2085
1709
|
if (value === null) {
|
|
2086
1710
|
return acc;
|
|
2087
1711
|
}
|
|
2088
|
-
return
|
|
1712
|
+
return {
|
|
1713
|
+
...acc,
|
|
1714
|
+
[key]: deserializeAws_restJson1TargetResourceTypeParameter(value, context),
|
|
1715
|
+
};
|
|
2089
1716
|
}, {});
|
|
2090
1717
|
};
|
|
2091
|
-
|
|
1718
|
+
const deserializeAws_restJson1TargetResourceTypeSummary = (output, context) => {
|
|
2092
1719
|
return {
|
|
2093
1720
|
description: __expectString(output.description),
|
|
2094
1721
|
resourceType: __expectString(output.resourceType),
|
|
2095
1722
|
};
|
|
2096
1723
|
};
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
.filter(
|
|
2100
|
-
.map(
|
|
1724
|
+
const deserializeAws_restJson1TargetResourceTypeSummaryList = (output, context) => {
|
|
1725
|
+
const retVal = (output || [])
|
|
1726
|
+
.filter((e) => e != null)
|
|
1727
|
+
.map((entry) => {
|
|
2101
1728
|
if (entry === null) {
|
|
2102
1729
|
return null;
|
|
2103
1730
|
}
|
|
@@ -2105,44 +1732,39 @@ var deserializeAws_restJson1TargetResourceTypeSummaryList = function (output, co
|
|
|
2105
1732
|
});
|
|
2106
1733
|
return retVal;
|
|
2107
1734
|
};
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
});
|
|
2116
|
-
};
|
|
2117
|
-
var collectBody = function (streamBody, context) {
|
|
2118
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1735
|
+
const deserializeMetadata = (output) => ({
|
|
1736
|
+
httpStatusCode: output.statusCode,
|
|
1737
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"],
|
|
1738
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1739
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1740
|
+
});
|
|
1741
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
2119
1742
|
if (streamBody instanceof Uint8Array) {
|
|
2120
1743
|
return Promise.resolve(streamBody);
|
|
2121
1744
|
}
|
|
2122
1745
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
2123
1746
|
};
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
var cleanValue = rawValue;
|
|
1747
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1748
|
+
const isSerializableHeaderValue = (value) => value !== undefined &&
|
|
1749
|
+
value !== null &&
|
|
1750
|
+
value !== "" &&
|
|
1751
|
+
(!Object.getOwnPropertyNames(value).includes("length") || value.length != 0) &&
|
|
1752
|
+
(!Object.getOwnPropertyNames(value).includes("size") || value.size != 0);
|
|
1753
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1754
|
+
if (encoded.length) {
|
|
1755
|
+
return JSON.parse(encoded);
|
|
1756
|
+
}
|
|
1757
|
+
return {};
|
|
1758
|
+
});
|
|
1759
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1760
|
+
const value = await parseBody(errorBody, context);
|
|
1761
|
+
value.message = value.message ?? value.Message;
|
|
1762
|
+
return value;
|
|
1763
|
+
};
|
|
1764
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1765
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1766
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1767
|
+
let cleanValue = rawValue;
|
|
2146
1768
|
if (typeof cleanValue === "number") {
|
|
2147
1769
|
cleanValue = cleanValue.toString();
|
|
2148
1770
|
}
|
|
@@ -2157,7 +1779,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
2157
1779
|
}
|
|
2158
1780
|
return cleanValue;
|
|
2159
1781
|
};
|
|
2160
|
-
|
|
1782
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
2161
1783
|
if (headerKey !== undefined) {
|
|
2162
1784
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
2163
1785
|
}
|