@aws-sdk/client-cloudcontrol 3.186.0 → 3.188.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 +8 -0
- package/dist-es/CloudControl.js +34 -41
- package/dist-es/CloudControlClient.js +22 -28
- package/dist-es/commands/CancelResourceRequestCommand.js +21 -28
- package/dist-es/commands/CreateResourceCommand.js +21 -28
- package/dist-es/commands/DeleteResourceCommand.js +21 -28
- package/dist-es/commands/GetResourceCommand.js +21 -28
- package/dist-es/commands/GetResourceRequestStatusCommand.js +21 -28
- package/dist-es/commands/ListResourceRequestsCommand.js +21 -28
- package/dist-es/commands/ListResourcesCommand.js +21 -28
- package/dist-es/commands/UpdateResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CloudControlServiceException.js +5 -10
- package/dist-es/models/models_0.js +327 -279
- package/dist-es/pagination/ListResourceRequestsPaginator.js +25 -68
- package/dist-es/pagination/ListResourcesPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_0.js +908 -1136
- 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/dist-es/waiters/waitForResourceRequestSuccess.js +45 -65
- package/package.json +34 -34
|
@@ -1,1121 +1,916 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { v4 as generateIdempotencyToken } from "uuid";
|
|
5
4
|
import { CloudControlServiceException as __BaseException } from "../models/CloudControlServiceException";
|
|
6
5
|
import { AlreadyExistsException, ClientTokenConflictException, ConcurrentModificationException, ConcurrentOperationException, GeneralServiceException, HandlerFailureException, HandlerInternalFailureException, InvalidCredentialsException, InvalidRequestException, NetworkFailureException, NotStabilizedException, NotUpdatableException, PrivateTypeException, RequestTokenNotFoundException, ResourceConflictException, ResourceNotFoundException, ServiceInternalErrorException, ServiceLimitExceededException, ThrottlingException, TypeNotFoundException, UnsupportedActionException, } 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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
case "AlreadyExistsException": return [3, 2];
|
|
429
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
|
|
430
|
-
case "GeneralServiceException": return [3, 4];
|
|
431
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 4];
|
|
432
|
-
case "HandlerFailureException": return [3, 6];
|
|
433
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 6];
|
|
434
|
-
case "HandlerInternalFailureException": return [3, 8];
|
|
435
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 8];
|
|
436
|
-
case "InvalidCredentialsException": return [3, 10];
|
|
437
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 10];
|
|
438
|
-
case "InvalidRequestException": return [3, 12];
|
|
439
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 12];
|
|
440
|
-
case "NetworkFailureException": return [3, 14];
|
|
441
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 14];
|
|
442
|
-
case "NotStabilizedException": return [3, 16];
|
|
443
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 16];
|
|
444
|
-
case "NotUpdatableException": return [3, 18];
|
|
445
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 18];
|
|
446
|
-
case "PrivateTypeException": return [3, 20];
|
|
447
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 20];
|
|
448
|
-
case "ResourceConflictException": return [3, 22];
|
|
449
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 22];
|
|
450
|
-
case "ResourceNotFoundException": return [3, 24];
|
|
451
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 24];
|
|
452
|
-
case "ServiceInternalErrorException": return [3, 26];
|
|
453
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 26];
|
|
454
|
-
case "ServiceLimitExceededException": return [3, 28];
|
|
455
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 28];
|
|
456
|
-
case "ThrottlingException": return [3, 30];
|
|
457
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 30];
|
|
458
|
-
case "TypeNotFoundException": return [3, 32];
|
|
459
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 32];
|
|
460
|
-
case "UnsupportedActionException": return [3, 34];
|
|
461
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 34];
|
|
462
|
-
}
|
|
463
|
-
return [3, 36];
|
|
464
|
-
case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
|
|
465
|
-
case 3: throw _d.sent();
|
|
466
|
-
case 4: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
|
|
467
|
-
case 5: throw _d.sent();
|
|
468
|
-
case 6: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
|
|
469
|
-
case 7: throw _d.sent();
|
|
470
|
-
case 8: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
|
|
471
|
-
case 9: throw _d.sent();
|
|
472
|
-
case 10: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
|
|
473
|
-
case 11: throw _d.sent();
|
|
474
|
-
case 12: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
475
|
-
case 13: throw _d.sent();
|
|
476
|
-
case 14: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
|
|
477
|
-
case 15: throw _d.sent();
|
|
478
|
-
case 16: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
|
|
479
|
-
case 17: throw _d.sent();
|
|
480
|
-
case 18: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
|
|
481
|
-
case 19: throw _d.sent();
|
|
482
|
-
case 20: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
|
|
483
|
-
case 21: throw _d.sent();
|
|
484
|
-
case 22: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
485
|
-
case 23: throw _d.sent();
|
|
486
|
-
case 24: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
487
|
-
case 25: throw _d.sent();
|
|
488
|
-
case 26: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
|
|
489
|
-
case 27: throw _d.sent();
|
|
490
|
-
case 28: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
|
|
491
|
-
case 29: throw _d.sent();
|
|
492
|
-
case 30: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
493
|
-
case 31: throw _d.sent();
|
|
494
|
-
case 32: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
|
|
495
|
-
case 33: throw _d.sent();
|
|
496
|
-
case 34: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
|
|
497
|
-
case 35: throw _d.sent();
|
|
498
|
-
case 36:
|
|
499
|
-
parsedBody = parsedOutput.body;
|
|
500
|
-
throwDefaultError({
|
|
501
|
-
output: output,
|
|
502
|
-
parsedBody: parsedBody,
|
|
503
|
-
exceptionCtor: __BaseException,
|
|
504
|
-
errorCode: errorCode,
|
|
505
|
-
});
|
|
506
|
-
_d.label = 37;
|
|
507
|
-
case 37: return [2];
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
}); };
|
|
511
|
-
export var deserializeAws_json1_0GetResourceRequestStatusCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
512
|
-
var data, contents, response;
|
|
513
|
-
return __generator(this, function (_a) {
|
|
514
|
-
switch (_a.label) {
|
|
515
|
-
case 0:
|
|
516
|
-
if (output.statusCode >= 300) {
|
|
517
|
-
return [2, deserializeAws_json1_0GetResourceRequestStatusCommandError(output, context)];
|
|
518
|
-
}
|
|
519
|
-
return [4, parseBody(output.body, context)];
|
|
520
|
-
case 1:
|
|
521
|
-
data = _a.sent();
|
|
522
|
-
contents = {};
|
|
523
|
-
contents = deserializeAws_json1_0GetResourceRequestStatusOutput(data, context);
|
|
524
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
525
|
-
return [2, Promise.resolve(response)];
|
|
526
|
-
}
|
|
527
|
-
});
|
|
528
|
-
}); };
|
|
529
|
-
var deserializeAws_json1_0GetResourceRequestStatusCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
530
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
531
|
-
var _c;
|
|
532
|
-
return __generator(this, function (_d) {
|
|
533
|
-
switch (_d.label) {
|
|
534
|
-
case 0:
|
|
535
|
-
_a = [__assign({}, output)];
|
|
536
|
-
_c = {};
|
|
537
|
-
return [4, parseErrorBody(output.body, context)];
|
|
538
|
-
case 1:
|
|
539
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
540
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
541
|
-
_b = errorCode;
|
|
542
|
-
switch (_b) {
|
|
543
|
-
case "RequestTokenNotFoundException": return [3, 2];
|
|
544
|
-
case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException": return [3, 2];
|
|
545
|
-
}
|
|
546
|
-
return [3, 4];
|
|
547
|
-
case 2: return [4, deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context)];
|
|
548
|
-
case 3: throw _d.sent();
|
|
549
|
-
case 4:
|
|
550
|
-
parsedBody = parsedOutput.body;
|
|
551
|
-
throwDefaultError({
|
|
552
|
-
output: output,
|
|
553
|
-
parsedBody: parsedBody,
|
|
554
|
-
exceptionCtor: __BaseException,
|
|
555
|
-
errorCode: errorCode,
|
|
556
|
-
});
|
|
557
|
-
_d.label = 5;
|
|
558
|
-
case 5: return [2];
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
}); };
|
|
562
|
-
export var deserializeAws_json1_0ListResourceRequestsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
563
|
-
var data, contents, response;
|
|
564
|
-
return __generator(this, function (_a) {
|
|
565
|
-
switch (_a.label) {
|
|
566
|
-
case 0:
|
|
567
|
-
if (output.statusCode >= 300) {
|
|
568
|
-
return [2, deserializeAws_json1_0ListResourceRequestsCommandError(output, context)];
|
|
569
|
-
}
|
|
570
|
-
return [4, parseBody(output.body, context)];
|
|
571
|
-
case 1:
|
|
572
|
-
data = _a.sent();
|
|
573
|
-
contents = {};
|
|
574
|
-
contents = deserializeAws_json1_0ListResourceRequestsOutput(data, context);
|
|
575
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
576
|
-
return [2, Promise.resolve(response)];
|
|
577
|
-
}
|
|
578
|
-
});
|
|
579
|
-
}); };
|
|
580
|
-
var deserializeAws_json1_0ListResourceRequestsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
581
|
-
var parsedOutput, _a, errorCode, parsedBody;
|
|
582
|
-
var _b;
|
|
583
|
-
return __generator(this, function (_c) {
|
|
584
|
-
switch (_c.label) {
|
|
585
|
-
case 0:
|
|
586
|
-
_a = [__assign({}, output)];
|
|
587
|
-
_b = {};
|
|
588
|
-
return [4, parseErrorBody(output.body, context)];
|
|
589
|
-
case 1:
|
|
590
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_b.body = _c.sent(), _b)]));
|
|
591
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
592
|
-
parsedBody = parsedOutput.body;
|
|
593
|
-
throwDefaultError({
|
|
594
|
-
output: output,
|
|
595
|
-
parsedBody: parsedBody,
|
|
596
|
-
exceptionCtor: __BaseException,
|
|
597
|
-
errorCode: errorCode,
|
|
598
|
-
});
|
|
599
|
-
return [2];
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
}); };
|
|
603
|
-
export var deserializeAws_json1_0ListResourcesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
604
|
-
var data, contents, response;
|
|
605
|
-
return __generator(this, function (_a) {
|
|
606
|
-
switch (_a.label) {
|
|
607
|
-
case 0:
|
|
608
|
-
if (output.statusCode >= 300) {
|
|
609
|
-
return [2, deserializeAws_json1_0ListResourcesCommandError(output, context)];
|
|
610
|
-
}
|
|
611
|
-
return [4, parseBody(output.body, context)];
|
|
612
|
-
case 1:
|
|
613
|
-
data = _a.sent();
|
|
614
|
-
contents = {};
|
|
615
|
-
contents = deserializeAws_json1_0ListResourcesOutput(data, context);
|
|
616
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
617
|
-
return [2, Promise.resolve(response)];
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
}); };
|
|
621
|
-
var deserializeAws_json1_0ListResourcesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
622
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
623
|
-
var _c;
|
|
624
|
-
return __generator(this, function (_d) {
|
|
625
|
-
switch (_d.label) {
|
|
626
|
-
case 0:
|
|
627
|
-
_a = [__assign({}, output)];
|
|
628
|
-
_c = {};
|
|
629
|
-
return [4, parseErrorBody(output.body, context)];
|
|
630
|
-
case 1:
|
|
631
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
632
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
633
|
-
_b = errorCode;
|
|
634
|
-
switch (_b) {
|
|
635
|
-
case "AlreadyExistsException": return [3, 2];
|
|
636
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
|
|
637
|
-
case "GeneralServiceException": return [3, 4];
|
|
638
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 4];
|
|
639
|
-
case "HandlerFailureException": return [3, 6];
|
|
640
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 6];
|
|
641
|
-
case "HandlerInternalFailureException": return [3, 8];
|
|
642
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 8];
|
|
643
|
-
case "InvalidCredentialsException": return [3, 10];
|
|
644
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 10];
|
|
645
|
-
case "InvalidRequestException": return [3, 12];
|
|
646
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 12];
|
|
647
|
-
case "NetworkFailureException": return [3, 14];
|
|
648
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 14];
|
|
649
|
-
case "NotStabilizedException": return [3, 16];
|
|
650
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 16];
|
|
651
|
-
case "NotUpdatableException": return [3, 18];
|
|
652
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 18];
|
|
653
|
-
case "PrivateTypeException": return [3, 20];
|
|
654
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 20];
|
|
655
|
-
case "ResourceConflictException": return [3, 22];
|
|
656
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 22];
|
|
657
|
-
case "ResourceNotFoundException": return [3, 24];
|
|
658
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 24];
|
|
659
|
-
case "ServiceInternalErrorException": return [3, 26];
|
|
660
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 26];
|
|
661
|
-
case "ServiceLimitExceededException": return [3, 28];
|
|
662
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 28];
|
|
663
|
-
case "ThrottlingException": return [3, 30];
|
|
664
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 30];
|
|
665
|
-
case "TypeNotFoundException": return [3, 32];
|
|
666
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 32];
|
|
667
|
-
case "UnsupportedActionException": return [3, 34];
|
|
668
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 34];
|
|
669
|
-
}
|
|
670
|
-
return [3, 36];
|
|
671
|
-
case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
|
|
672
|
-
case 3: throw _d.sent();
|
|
673
|
-
case 4: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
|
|
674
|
-
case 5: throw _d.sent();
|
|
675
|
-
case 6: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
|
|
676
|
-
case 7: throw _d.sent();
|
|
677
|
-
case 8: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
|
|
678
|
-
case 9: throw _d.sent();
|
|
679
|
-
case 10: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
|
|
680
|
-
case 11: throw _d.sent();
|
|
681
|
-
case 12: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
682
|
-
case 13: throw _d.sent();
|
|
683
|
-
case 14: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
|
|
684
|
-
case 15: throw _d.sent();
|
|
685
|
-
case 16: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
|
|
686
|
-
case 17: throw _d.sent();
|
|
687
|
-
case 18: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
|
|
688
|
-
case 19: throw _d.sent();
|
|
689
|
-
case 20: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
|
|
690
|
-
case 21: throw _d.sent();
|
|
691
|
-
case 22: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
692
|
-
case 23: throw _d.sent();
|
|
693
|
-
case 24: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
694
|
-
case 25: throw _d.sent();
|
|
695
|
-
case 26: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
|
|
696
|
-
case 27: throw _d.sent();
|
|
697
|
-
case 28: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
|
|
698
|
-
case 29: throw _d.sent();
|
|
699
|
-
case 30: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
700
|
-
case 31: throw _d.sent();
|
|
701
|
-
case 32: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
|
|
702
|
-
case 33: throw _d.sent();
|
|
703
|
-
case 34: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
|
|
704
|
-
case 35: throw _d.sent();
|
|
705
|
-
case 36:
|
|
706
|
-
parsedBody = parsedOutput.body;
|
|
707
|
-
throwDefaultError({
|
|
708
|
-
output: output,
|
|
709
|
-
parsedBody: parsedBody,
|
|
710
|
-
exceptionCtor: __BaseException,
|
|
711
|
-
errorCode: errorCode,
|
|
712
|
-
});
|
|
713
|
-
_d.label = 37;
|
|
714
|
-
case 37: return [2];
|
|
715
|
-
}
|
|
716
|
-
});
|
|
717
|
-
}); };
|
|
718
|
-
export var deserializeAws_json1_0UpdateResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
719
|
-
var data, contents, response;
|
|
720
|
-
return __generator(this, function (_a) {
|
|
721
|
-
switch (_a.label) {
|
|
722
|
-
case 0:
|
|
723
|
-
if (output.statusCode >= 300) {
|
|
724
|
-
return [2, deserializeAws_json1_0UpdateResourceCommandError(output, context)];
|
|
725
|
-
}
|
|
726
|
-
return [4, parseBody(output.body, context)];
|
|
727
|
-
case 1:
|
|
728
|
-
data = _a.sent();
|
|
729
|
-
contents = {};
|
|
730
|
-
contents = deserializeAws_json1_0UpdateResourceOutput(data, context);
|
|
731
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
732
|
-
return [2, Promise.resolve(response)];
|
|
733
|
-
}
|
|
734
|
-
});
|
|
735
|
-
}); };
|
|
736
|
-
var deserializeAws_json1_0UpdateResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
737
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
738
|
-
var _c;
|
|
739
|
-
return __generator(this, function (_d) {
|
|
740
|
-
switch (_d.label) {
|
|
741
|
-
case 0:
|
|
742
|
-
_a = [__assign({}, output)];
|
|
743
|
-
_c = {};
|
|
744
|
-
return [4, parseErrorBody(output.body, context)];
|
|
745
|
-
case 1:
|
|
746
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
747
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
748
|
-
_b = errorCode;
|
|
749
|
-
switch (_b) {
|
|
750
|
-
case "AlreadyExistsException": return [3, 2];
|
|
751
|
-
case "com.amazonaws.cloudcontrol#AlreadyExistsException": return [3, 2];
|
|
752
|
-
case "ClientTokenConflictException": return [3, 4];
|
|
753
|
-
case "com.amazonaws.cloudcontrol#ClientTokenConflictException": return [3, 4];
|
|
754
|
-
case "ConcurrentOperationException": return [3, 6];
|
|
755
|
-
case "com.amazonaws.cloudcontrol#ConcurrentOperationException": return [3, 6];
|
|
756
|
-
case "GeneralServiceException": return [3, 8];
|
|
757
|
-
case "com.amazonaws.cloudcontrol#GeneralServiceException": return [3, 8];
|
|
758
|
-
case "HandlerFailureException": return [3, 10];
|
|
759
|
-
case "com.amazonaws.cloudcontrol#HandlerFailureException": return [3, 10];
|
|
760
|
-
case "HandlerInternalFailureException": return [3, 12];
|
|
761
|
-
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException": return [3, 12];
|
|
762
|
-
case "InvalidCredentialsException": return [3, 14];
|
|
763
|
-
case "com.amazonaws.cloudcontrol#InvalidCredentialsException": return [3, 14];
|
|
764
|
-
case "InvalidRequestException": return [3, 16];
|
|
765
|
-
case "com.amazonaws.cloudcontrol#InvalidRequestException": return [3, 16];
|
|
766
|
-
case "NetworkFailureException": return [3, 18];
|
|
767
|
-
case "com.amazonaws.cloudcontrol#NetworkFailureException": return [3, 18];
|
|
768
|
-
case "NotStabilizedException": return [3, 20];
|
|
769
|
-
case "com.amazonaws.cloudcontrol#NotStabilizedException": return [3, 20];
|
|
770
|
-
case "NotUpdatableException": return [3, 22];
|
|
771
|
-
case "com.amazonaws.cloudcontrol#NotUpdatableException": return [3, 22];
|
|
772
|
-
case "PrivateTypeException": return [3, 24];
|
|
773
|
-
case "com.amazonaws.cloudcontrol#PrivateTypeException": return [3, 24];
|
|
774
|
-
case "ResourceConflictException": return [3, 26];
|
|
775
|
-
case "com.amazonaws.cloudcontrol#ResourceConflictException": return [3, 26];
|
|
776
|
-
case "ResourceNotFoundException": return [3, 28];
|
|
777
|
-
case "com.amazonaws.cloudcontrol#ResourceNotFoundException": return [3, 28];
|
|
778
|
-
case "ServiceInternalErrorException": return [3, 30];
|
|
779
|
-
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException": return [3, 30];
|
|
780
|
-
case "ServiceLimitExceededException": return [3, 32];
|
|
781
|
-
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException": return [3, 32];
|
|
782
|
-
case "ThrottlingException": return [3, 34];
|
|
783
|
-
case "com.amazonaws.cloudcontrol#ThrottlingException": return [3, 34];
|
|
784
|
-
case "TypeNotFoundException": return [3, 36];
|
|
785
|
-
case "com.amazonaws.cloudcontrol#TypeNotFoundException": return [3, 36];
|
|
786
|
-
case "UnsupportedActionException": return [3, 38];
|
|
787
|
-
case "com.amazonaws.cloudcontrol#UnsupportedActionException": return [3, 38];
|
|
788
|
-
}
|
|
789
|
-
return [3, 40];
|
|
790
|
-
case 2: return [4, deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context)];
|
|
791
|
-
case 3: throw _d.sent();
|
|
792
|
-
case 4: return [4, deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context)];
|
|
793
|
-
case 5: throw _d.sent();
|
|
794
|
-
case 6: return [4, deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context)];
|
|
795
|
-
case 7: throw _d.sent();
|
|
796
|
-
case 8: return [4, deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context)];
|
|
797
|
-
case 9: throw _d.sent();
|
|
798
|
-
case 10: return [4, deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context)];
|
|
799
|
-
case 11: throw _d.sent();
|
|
800
|
-
case 12: return [4, deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context)];
|
|
801
|
-
case 13: throw _d.sent();
|
|
802
|
-
case 14: return [4, deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context)];
|
|
803
|
-
case 15: throw _d.sent();
|
|
804
|
-
case 16: return [4, deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context)];
|
|
805
|
-
case 17: throw _d.sent();
|
|
806
|
-
case 18: return [4, deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context)];
|
|
807
|
-
case 19: throw _d.sent();
|
|
808
|
-
case 20: return [4, deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context)];
|
|
809
|
-
case 21: throw _d.sent();
|
|
810
|
-
case 22: return [4, deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context)];
|
|
811
|
-
case 23: throw _d.sent();
|
|
812
|
-
case 24: return [4, deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context)];
|
|
813
|
-
case 25: throw _d.sent();
|
|
814
|
-
case 26: return [4, deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context)];
|
|
815
|
-
case 27: throw _d.sent();
|
|
816
|
-
case 28: return [4, deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
817
|
-
case 29: throw _d.sent();
|
|
818
|
-
case 30: return [4, deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context)];
|
|
819
|
-
case 31: throw _d.sent();
|
|
820
|
-
case 32: return [4, deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context)];
|
|
821
|
-
case 33: throw _d.sent();
|
|
822
|
-
case 34: return [4, deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context)];
|
|
823
|
-
case 35: throw _d.sent();
|
|
824
|
-
case 36: return [4, deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context)];
|
|
825
|
-
case 37: throw _d.sent();
|
|
826
|
-
case 38: return [4, deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context)];
|
|
827
|
-
case 39: throw _d.sent();
|
|
828
|
-
case 40:
|
|
829
|
-
parsedBody = parsedOutput.body;
|
|
830
|
-
throwDefaultError({
|
|
831
|
-
output: output,
|
|
832
|
-
parsedBody: parsedBody,
|
|
833
|
-
exceptionCtor: __BaseException,
|
|
834
|
-
errorCode: errorCode,
|
|
835
|
-
});
|
|
836
|
-
_d.label = 41;
|
|
837
|
-
case 41: return [2];
|
|
838
|
-
}
|
|
6
|
+
export const serializeAws_json1_0CancelResourceRequestCommand = async (input, context) => {
|
|
7
|
+
const headers = {
|
|
8
|
+
"content-type": "application/x-amz-json-1.0",
|
|
9
|
+
"x-amz-target": "CloudApiService.CancelResourceRequest",
|
|
10
|
+
};
|
|
11
|
+
let body;
|
|
12
|
+
body = JSON.stringify(serializeAws_json1_0CancelResourceRequestInput(input, context));
|
|
13
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
|
+
};
|
|
15
|
+
export const serializeAws_json1_0CreateResourceCommand = async (input, context) => {
|
|
16
|
+
const headers = {
|
|
17
|
+
"content-type": "application/x-amz-json-1.0",
|
|
18
|
+
"x-amz-target": "CloudApiService.CreateResource",
|
|
19
|
+
};
|
|
20
|
+
let body;
|
|
21
|
+
body = JSON.stringify(serializeAws_json1_0CreateResourceInput(input, context));
|
|
22
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
|
+
};
|
|
24
|
+
export const serializeAws_json1_0DeleteResourceCommand = async (input, context) => {
|
|
25
|
+
const headers = {
|
|
26
|
+
"content-type": "application/x-amz-json-1.0",
|
|
27
|
+
"x-amz-target": "CloudApiService.DeleteResource",
|
|
28
|
+
};
|
|
29
|
+
let body;
|
|
30
|
+
body = JSON.stringify(serializeAws_json1_0DeleteResourceInput(input, context));
|
|
31
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
32
|
+
};
|
|
33
|
+
export const serializeAws_json1_0GetResourceCommand = async (input, context) => {
|
|
34
|
+
const headers = {
|
|
35
|
+
"content-type": "application/x-amz-json-1.0",
|
|
36
|
+
"x-amz-target": "CloudApiService.GetResource",
|
|
37
|
+
};
|
|
38
|
+
let body;
|
|
39
|
+
body = JSON.stringify(serializeAws_json1_0GetResourceInput(input, context));
|
|
40
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
|
+
};
|
|
42
|
+
export const serializeAws_json1_0GetResourceRequestStatusCommand = async (input, context) => {
|
|
43
|
+
const headers = {
|
|
44
|
+
"content-type": "application/x-amz-json-1.0",
|
|
45
|
+
"x-amz-target": "CloudApiService.GetResourceRequestStatus",
|
|
46
|
+
};
|
|
47
|
+
let body;
|
|
48
|
+
body = JSON.stringify(serializeAws_json1_0GetResourceRequestStatusInput(input, context));
|
|
49
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
|
+
};
|
|
51
|
+
export const serializeAws_json1_0ListResourceRequestsCommand = async (input, context) => {
|
|
52
|
+
const headers = {
|
|
53
|
+
"content-type": "application/x-amz-json-1.0",
|
|
54
|
+
"x-amz-target": "CloudApiService.ListResourceRequests",
|
|
55
|
+
};
|
|
56
|
+
let body;
|
|
57
|
+
body = JSON.stringify(serializeAws_json1_0ListResourceRequestsInput(input, context));
|
|
58
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
|
+
};
|
|
60
|
+
export const serializeAws_json1_0ListResourcesCommand = async (input, context) => {
|
|
61
|
+
const headers = {
|
|
62
|
+
"content-type": "application/x-amz-json-1.0",
|
|
63
|
+
"x-amz-target": "CloudApiService.ListResources",
|
|
64
|
+
};
|
|
65
|
+
let body;
|
|
66
|
+
body = JSON.stringify(serializeAws_json1_0ListResourcesInput(input, context));
|
|
67
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
68
|
+
};
|
|
69
|
+
export const serializeAws_json1_0UpdateResourceCommand = async (input, context) => {
|
|
70
|
+
const headers = {
|
|
71
|
+
"content-type": "application/x-amz-json-1.0",
|
|
72
|
+
"x-amz-target": "CloudApiService.UpdateResource",
|
|
73
|
+
};
|
|
74
|
+
let body;
|
|
75
|
+
body = JSON.stringify(serializeAws_json1_0UpdateResourceInput(input, context));
|
|
76
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
|
+
};
|
|
78
|
+
export const deserializeAws_json1_0CancelResourceRequestCommand = async (output, context) => {
|
|
79
|
+
if (output.statusCode >= 300) {
|
|
80
|
+
return deserializeAws_json1_0CancelResourceRequestCommandError(output, context);
|
|
81
|
+
}
|
|
82
|
+
const data = await parseBody(output.body, context);
|
|
83
|
+
let contents = {};
|
|
84
|
+
contents = deserializeAws_json1_0CancelResourceRequestOutput(data, context);
|
|
85
|
+
const response = {
|
|
86
|
+
$metadata: deserializeMetadata(output),
|
|
87
|
+
...contents,
|
|
88
|
+
};
|
|
89
|
+
return Promise.resolve(response);
|
|
90
|
+
};
|
|
91
|
+
const deserializeAws_json1_0CancelResourceRequestCommandError = async (output, context) => {
|
|
92
|
+
const parsedOutput = {
|
|
93
|
+
...output,
|
|
94
|
+
body: await parseErrorBody(output.body, context),
|
|
95
|
+
};
|
|
96
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
97
|
+
switch (errorCode) {
|
|
98
|
+
case "ConcurrentModificationException":
|
|
99
|
+
case "com.amazonaws.cloudcontrol#ConcurrentModificationException":
|
|
100
|
+
throw await deserializeAws_json1_0ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
101
|
+
case "RequestTokenNotFoundException":
|
|
102
|
+
case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException":
|
|
103
|
+
throw await deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context);
|
|
104
|
+
default:
|
|
105
|
+
const parsedBody = parsedOutput.body;
|
|
106
|
+
throwDefaultError({
|
|
107
|
+
output,
|
|
108
|
+
parsedBody,
|
|
109
|
+
exceptionCtor: __BaseException,
|
|
110
|
+
errorCode,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
export const deserializeAws_json1_0CreateResourceCommand = async (output, context) => {
|
|
115
|
+
if (output.statusCode >= 300) {
|
|
116
|
+
return deserializeAws_json1_0CreateResourceCommandError(output, context);
|
|
117
|
+
}
|
|
118
|
+
const data = await parseBody(output.body, context);
|
|
119
|
+
let contents = {};
|
|
120
|
+
contents = deserializeAws_json1_0CreateResourceOutput(data, context);
|
|
121
|
+
const response = {
|
|
122
|
+
$metadata: deserializeMetadata(output),
|
|
123
|
+
...contents,
|
|
124
|
+
};
|
|
125
|
+
return Promise.resolve(response);
|
|
126
|
+
};
|
|
127
|
+
const deserializeAws_json1_0CreateResourceCommandError = async (output, context) => {
|
|
128
|
+
const parsedOutput = {
|
|
129
|
+
...output,
|
|
130
|
+
body: await parseErrorBody(output.body, context),
|
|
131
|
+
};
|
|
132
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
133
|
+
switch (errorCode) {
|
|
134
|
+
case "AlreadyExistsException":
|
|
135
|
+
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
136
|
+
throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
|
|
137
|
+
case "ClientTokenConflictException":
|
|
138
|
+
case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
|
|
139
|
+
throw await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context);
|
|
140
|
+
case "ConcurrentOperationException":
|
|
141
|
+
case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
|
|
142
|
+
throw await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context);
|
|
143
|
+
case "GeneralServiceException":
|
|
144
|
+
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
145
|
+
throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
|
|
146
|
+
case "HandlerFailureException":
|
|
147
|
+
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
148
|
+
throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
|
|
149
|
+
case "HandlerInternalFailureException":
|
|
150
|
+
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
151
|
+
throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
|
|
152
|
+
case "InvalidCredentialsException":
|
|
153
|
+
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
154
|
+
throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
|
|
155
|
+
case "InvalidRequestException":
|
|
156
|
+
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
157
|
+
throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
|
|
158
|
+
case "NetworkFailureException":
|
|
159
|
+
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
160
|
+
throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
|
|
161
|
+
case "NotStabilizedException":
|
|
162
|
+
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
163
|
+
throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
|
|
164
|
+
case "NotUpdatableException":
|
|
165
|
+
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
166
|
+
throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
|
|
167
|
+
case "PrivateTypeException":
|
|
168
|
+
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
169
|
+
throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
|
|
170
|
+
case "ResourceConflictException":
|
|
171
|
+
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
172
|
+
throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
|
|
173
|
+
case "ResourceNotFoundException":
|
|
174
|
+
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
175
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
176
|
+
case "ServiceInternalErrorException":
|
|
177
|
+
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
178
|
+
throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
|
|
179
|
+
case "ServiceLimitExceededException":
|
|
180
|
+
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
181
|
+
throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
|
|
182
|
+
case "ThrottlingException":
|
|
183
|
+
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
184
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
185
|
+
case "TypeNotFoundException":
|
|
186
|
+
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
187
|
+
throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
|
|
188
|
+
case "UnsupportedActionException":
|
|
189
|
+
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
190
|
+
throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
|
|
191
|
+
default:
|
|
192
|
+
const parsedBody = parsedOutput.body;
|
|
193
|
+
throwDefaultError({
|
|
194
|
+
output,
|
|
195
|
+
parsedBody,
|
|
196
|
+
exceptionCtor: __BaseException,
|
|
197
|
+
errorCode,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
export const deserializeAws_json1_0DeleteResourceCommand = async (output, context) => {
|
|
202
|
+
if (output.statusCode >= 300) {
|
|
203
|
+
return deserializeAws_json1_0DeleteResourceCommandError(output, context);
|
|
204
|
+
}
|
|
205
|
+
const data = await parseBody(output.body, context);
|
|
206
|
+
let contents = {};
|
|
207
|
+
contents = deserializeAws_json1_0DeleteResourceOutput(data, context);
|
|
208
|
+
const response = {
|
|
209
|
+
$metadata: deserializeMetadata(output),
|
|
210
|
+
...contents,
|
|
211
|
+
};
|
|
212
|
+
return Promise.resolve(response);
|
|
213
|
+
};
|
|
214
|
+
const deserializeAws_json1_0DeleteResourceCommandError = async (output, context) => {
|
|
215
|
+
const parsedOutput = {
|
|
216
|
+
...output,
|
|
217
|
+
body: await parseErrorBody(output.body, context),
|
|
218
|
+
};
|
|
219
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
220
|
+
switch (errorCode) {
|
|
221
|
+
case "AlreadyExistsException":
|
|
222
|
+
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
223
|
+
throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
|
|
224
|
+
case "ClientTokenConflictException":
|
|
225
|
+
case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
|
|
226
|
+
throw await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context);
|
|
227
|
+
case "ConcurrentOperationException":
|
|
228
|
+
case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
|
|
229
|
+
throw await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context);
|
|
230
|
+
case "GeneralServiceException":
|
|
231
|
+
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
232
|
+
throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
|
|
233
|
+
case "HandlerFailureException":
|
|
234
|
+
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
235
|
+
throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
|
|
236
|
+
case "HandlerInternalFailureException":
|
|
237
|
+
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
238
|
+
throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
|
|
239
|
+
case "InvalidCredentialsException":
|
|
240
|
+
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
241
|
+
throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
|
|
242
|
+
case "InvalidRequestException":
|
|
243
|
+
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
244
|
+
throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
|
|
245
|
+
case "NetworkFailureException":
|
|
246
|
+
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
247
|
+
throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
|
|
248
|
+
case "NotStabilizedException":
|
|
249
|
+
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
250
|
+
throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
|
|
251
|
+
case "NotUpdatableException":
|
|
252
|
+
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
253
|
+
throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
|
|
254
|
+
case "PrivateTypeException":
|
|
255
|
+
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
256
|
+
throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
|
|
257
|
+
case "ResourceConflictException":
|
|
258
|
+
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
259
|
+
throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
|
|
260
|
+
case "ResourceNotFoundException":
|
|
261
|
+
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
262
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
263
|
+
case "ServiceInternalErrorException":
|
|
264
|
+
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
265
|
+
throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
|
|
266
|
+
case "ServiceLimitExceededException":
|
|
267
|
+
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
268
|
+
throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
|
|
269
|
+
case "ThrottlingException":
|
|
270
|
+
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
271
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
272
|
+
case "TypeNotFoundException":
|
|
273
|
+
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
274
|
+
throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
|
|
275
|
+
case "UnsupportedActionException":
|
|
276
|
+
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
277
|
+
throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
|
|
278
|
+
default:
|
|
279
|
+
const parsedBody = parsedOutput.body;
|
|
280
|
+
throwDefaultError({
|
|
281
|
+
output,
|
|
282
|
+
parsedBody,
|
|
283
|
+
exceptionCtor: __BaseException,
|
|
284
|
+
errorCode,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
export const deserializeAws_json1_0GetResourceCommand = async (output, context) => {
|
|
289
|
+
if (output.statusCode >= 300) {
|
|
290
|
+
return deserializeAws_json1_0GetResourceCommandError(output, context);
|
|
291
|
+
}
|
|
292
|
+
const data = await parseBody(output.body, context);
|
|
293
|
+
let contents = {};
|
|
294
|
+
contents = deserializeAws_json1_0GetResourceOutput(data, context);
|
|
295
|
+
const response = {
|
|
296
|
+
$metadata: deserializeMetadata(output),
|
|
297
|
+
...contents,
|
|
298
|
+
};
|
|
299
|
+
return Promise.resolve(response);
|
|
300
|
+
};
|
|
301
|
+
const deserializeAws_json1_0GetResourceCommandError = async (output, context) => {
|
|
302
|
+
const parsedOutput = {
|
|
303
|
+
...output,
|
|
304
|
+
body: await parseErrorBody(output.body, context),
|
|
305
|
+
};
|
|
306
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
307
|
+
switch (errorCode) {
|
|
308
|
+
case "AlreadyExistsException":
|
|
309
|
+
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
310
|
+
throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
|
|
311
|
+
case "GeneralServiceException":
|
|
312
|
+
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
313
|
+
throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
|
|
314
|
+
case "HandlerFailureException":
|
|
315
|
+
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
316
|
+
throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
|
|
317
|
+
case "HandlerInternalFailureException":
|
|
318
|
+
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
319
|
+
throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
|
|
320
|
+
case "InvalidCredentialsException":
|
|
321
|
+
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
322
|
+
throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
|
|
323
|
+
case "InvalidRequestException":
|
|
324
|
+
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
325
|
+
throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
|
|
326
|
+
case "NetworkFailureException":
|
|
327
|
+
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
328
|
+
throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
|
|
329
|
+
case "NotStabilizedException":
|
|
330
|
+
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
331
|
+
throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
|
|
332
|
+
case "NotUpdatableException":
|
|
333
|
+
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
334
|
+
throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
|
|
335
|
+
case "PrivateTypeException":
|
|
336
|
+
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
337
|
+
throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
|
|
338
|
+
case "ResourceConflictException":
|
|
339
|
+
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
340
|
+
throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
|
|
341
|
+
case "ResourceNotFoundException":
|
|
342
|
+
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
343
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
344
|
+
case "ServiceInternalErrorException":
|
|
345
|
+
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
346
|
+
throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
|
|
347
|
+
case "ServiceLimitExceededException":
|
|
348
|
+
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
349
|
+
throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
|
|
350
|
+
case "ThrottlingException":
|
|
351
|
+
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
352
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
353
|
+
case "TypeNotFoundException":
|
|
354
|
+
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
355
|
+
throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
|
|
356
|
+
case "UnsupportedActionException":
|
|
357
|
+
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
358
|
+
throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
|
|
359
|
+
default:
|
|
360
|
+
const parsedBody = parsedOutput.body;
|
|
361
|
+
throwDefaultError({
|
|
362
|
+
output,
|
|
363
|
+
parsedBody,
|
|
364
|
+
exceptionCtor: __BaseException,
|
|
365
|
+
errorCode,
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
export const deserializeAws_json1_0GetResourceRequestStatusCommand = async (output, context) => {
|
|
370
|
+
if (output.statusCode >= 300) {
|
|
371
|
+
return deserializeAws_json1_0GetResourceRequestStatusCommandError(output, context);
|
|
372
|
+
}
|
|
373
|
+
const data = await parseBody(output.body, context);
|
|
374
|
+
let contents = {};
|
|
375
|
+
contents = deserializeAws_json1_0GetResourceRequestStatusOutput(data, context);
|
|
376
|
+
const response = {
|
|
377
|
+
$metadata: deserializeMetadata(output),
|
|
378
|
+
...contents,
|
|
379
|
+
};
|
|
380
|
+
return Promise.resolve(response);
|
|
381
|
+
};
|
|
382
|
+
const deserializeAws_json1_0GetResourceRequestStatusCommandError = async (output, context) => {
|
|
383
|
+
const parsedOutput = {
|
|
384
|
+
...output,
|
|
385
|
+
body: await parseErrorBody(output.body, context),
|
|
386
|
+
};
|
|
387
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
388
|
+
switch (errorCode) {
|
|
389
|
+
case "RequestTokenNotFoundException":
|
|
390
|
+
case "com.amazonaws.cloudcontrol#RequestTokenNotFoundException":
|
|
391
|
+
throw await deserializeAws_json1_0RequestTokenNotFoundExceptionResponse(parsedOutput, context);
|
|
392
|
+
default:
|
|
393
|
+
const parsedBody = parsedOutput.body;
|
|
394
|
+
throwDefaultError({
|
|
395
|
+
output,
|
|
396
|
+
parsedBody,
|
|
397
|
+
exceptionCtor: __BaseException,
|
|
398
|
+
errorCode,
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
export const deserializeAws_json1_0ListResourceRequestsCommand = async (output, context) => {
|
|
403
|
+
if (output.statusCode >= 300) {
|
|
404
|
+
return deserializeAws_json1_0ListResourceRequestsCommandError(output, context);
|
|
405
|
+
}
|
|
406
|
+
const data = await parseBody(output.body, context);
|
|
407
|
+
let contents = {};
|
|
408
|
+
contents = deserializeAws_json1_0ListResourceRequestsOutput(data, context);
|
|
409
|
+
const response = {
|
|
410
|
+
$metadata: deserializeMetadata(output),
|
|
411
|
+
...contents,
|
|
412
|
+
};
|
|
413
|
+
return Promise.resolve(response);
|
|
414
|
+
};
|
|
415
|
+
const deserializeAws_json1_0ListResourceRequestsCommandError = async (output, context) => {
|
|
416
|
+
const parsedOutput = {
|
|
417
|
+
...output,
|
|
418
|
+
body: await parseErrorBody(output.body, context),
|
|
419
|
+
};
|
|
420
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
421
|
+
const parsedBody = parsedOutput.body;
|
|
422
|
+
throwDefaultError({
|
|
423
|
+
output,
|
|
424
|
+
parsedBody,
|
|
425
|
+
exceptionCtor: __BaseException,
|
|
426
|
+
errorCode,
|
|
839
427
|
});
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
428
|
+
};
|
|
429
|
+
export const deserializeAws_json1_0ListResourcesCommand = async (output, context) => {
|
|
430
|
+
if (output.statusCode >= 300) {
|
|
431
|
+
return deserializeAws_json1_0ListResourcesCommandError(output, context);
|
|
432
|
+
}
|
|
433
|
+
const data = await parseBody(output.body, context);
|
|
434
|
+
let contents = {};
|
|
435
|
+
contents = deserializeAws_json1_0ListResourcesOutput(data, context);
|
|
436
|
+
const response = {
|
|
437
|
+
$metadata: deserializeMetadata(output),
|
|
438
|
+
...contents,
|
|
439
|
+
};
|
|
440
|
+
return Promise.resolve(response);
|
|
441
|
+
};
|
|
442
|
+
const deserializeAws_json1_0ListResourcesCommandError = async (output, context) => {
|
|
443
|
+
const parsedOutput = {
|
|
444
|
+
...output,
|
|
445
|
+
body: await parseErrorBody(output.body, context),
|
|
446
|
+
};
|
|
447
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
448
|
+
switch (errorCode) {
|
|
449
|
+
case "AlreadyExistsException":
|
|
450
|
+
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
451
|
+
throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
|
|
452
|
+
case "GeneralServiceException":
|
|
453
|
+
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
454
|
+
throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
|
|
455
|
+
case "HandlerFailureException":
|
|
456
|
+
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
457
|
+
throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
|
|
458
|
+
case "HandlerInternalFailureException":
|
|
459
|
+
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
460
|
+
throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
|
|
461
|
+
case "InvalidCredentialsException":
|
|
462
|
+
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
463
|
+
throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
|
|
464
|
+
case "InvalidRequestException":
|
|
465
|
+
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
466
|
+
throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
|
|
467
|
+
case "NetworkFailureException":
|
|
468
|
+
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
469
|
+
throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
|
|
470
|
+
case "NotStabilizedException":
|
|
471
|
+
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
472
|
+
throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
|
|
473
|
+
case "NotUpdatableException":
|
|
474
|
+
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
475
|
+
throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
|
|
476
|
+
case "PrivateTypeException":
|
|
477
|
+
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
478
|
+
throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
|
|
479
|
+
case "ResourceConflictException":
|
|
480
|
+
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
481
|
+
throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
|
|
482
|
+
case "ResourceNotFoundException":
|
|
483
|
+
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
484
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
485
|
+
case "ServiceInternalErrorException":
|
|
486
|
+
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
487
|
+
throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
|
|
488
|
+
case "ServiceLimitExceededException":
|
|
489
|
+
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
490
|
+
throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
|
|
491
|
+
case "ThrottlingException":
|
|
492
|
+
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
493
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
494
|
+
case "TypeNotFoundException":
|
|
495
|
+
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
496
|
+
throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
|
|
497
|
+
case "UnsupportedActionException":
|
|
498
|
+
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
499
|
+
throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
|
|
500
|
+
default:
|
|
501
|
+
const parsedBody = parsedOutput.body;
|
|
502
|
+
throwDefaultError({
|
|
503
|
+
output,
|
|
504
|
+
parsedBody,
|
|
505
|
+
exceptionCtor: __BaseException,
|
|
506
|
+
errorCode,
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
export const deserializeAws_json1_0UpdateResourceCommand = async (output, context) => {
|
|
511
|
+
if (output.statusCode >= 300) {
|
|
512
|
+
return deserializeAws_json1_0UpdateResourceCommandError(output, context);
|
|
513
|
+
}
|
|
514
|
+
const data = await parseBody(output.body, context);
|
|
515
|
+
let contents = {};
|
|
516
|
+
contents = deserializeAws_json1_0UpdateResourceOutput(data, context);
|
|
517
|
+
const response = {
|
|
518
|
+
$metadata: deserializeMetadata(output),
|
|
519
|
+
...contents,
|
|
520
|
+
};
|
|
521
|
+
return Promise.resolve(response);
|
|
522
|
+
};
|
|
523
|
+
const deserializeAws_json1_0UpdateResourceCommandError = async (output, context) => {
|
|
524
|
+
const parsedOutput = {
|
|
525
|
+
...output,
|
|
526
|
+
body: await parseErrorBody(output.body, context),
|
|
527
|
+
};
|
|
528
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
529
|
+
switch (errorCode) {
|
|
530
|
+
case "AlreadyExistsException":
|
|
531
|
+
case "com.amazonaws.cloudcontrol#AlreadyExistsException":
|
|
532
|
+
throw await deserializeAws_json1_0AlreadyExistsExceptionResponse(parsedOutput, context);
|
|
533
|
+
case "ClientTokenConflictException":
|
|
534
|
+
case "com.amazonaws.cloudcontrol#ClientTokenConflictException":
|
|
535
|
+
throw await deserializeAws_json1_0ClientTokenConflictExceptionResponse(parsedOutput, context);
|
|
536
|
+
case "ConcurrentOperationException":
|
|
537
|
+
case "com.amazonaws.cloudcontrol#ConcurrentOperationException":
|
|
538
|
+
throw await deserializeAws_json1_0ConcurrentOperationExceptionResponse(parsedOutput, context);
|
|
539
|
+
case "GeneralServiceException":
|
|
540
|
+
case "com.amazonaws.cloudcontrol#GeneralServiceException":
|
|
541
|
+
throw await deserializeAws_json1_0GeneralServiceExceptionResponse(parsedOutput, context);
|
|
542
|
+
case "HandlerFailureException":
|
|
543
|
+
case "com.amazonaws.cloudcontrol#HandlerFailureException":
|
|
544
|
+
throw await deserializeAws_json1_0HandlerFailureExceptionResponse(parsedOutput, context);
|
|
545
|
+
case "HandlerInternalFailureException":
|
|
546
|
+
case "com.amazonaws.cloudcontrol#HandlerInternalFailureException":
|
|
547
|
+
throw await deserializeAws_json1_0HandlerInternalFailureExceptionResponse(parsedOutput, context);
|
|
548
|
+
case "InvalidCredentialsException":
|
|
549
|
+
case "com.amazonaws.cloudcontrol#InvalidCredentialsException":
|
|
550
|
+
throw await deserializeAws_json1_0InvalidCredentialsExceptionResponse(parsedOutput, context);
|
|
551
|
+
case "InvalidRequestException":
|
|
552
|
+
case "com.amazonaws.cloudcontrol#InvalidRequestException":
|
|
553
|
+
throw await deserializeAws_json1_0InvalidRequestExceptionResponse(parsedOutput, context);
|
|
554
|
+
case "NetworkFailureException":
|
|
555
|
+
case "com.amazonaws.cloudcontrol#NetworkFailureException":
|
|
556
|
+
throw await deserializeAws_json1_0NetworkFailureExceptionResponse(parsedOutput, context);
|
|
557
|
+
case "NotStabilizedException":
|
|
558
|
+
case "com.amazonaws.cloudcontrol#NotStabilizedException":
|
|
559
|
+
throw await deserializeAws_json1_0NotStabilizedExceptionResponse(parsedOutput, context);
|
|
560
|
+
case "NotUpdatableException":
|
|
561
|
+
case "com.amazonaws.cloudcontrol#NotUpdatableException":
|
|
562
|
+
throw await deserializeAws_json1_0NotUpdatableExceptionResponse(parsedOutput, context);
|
|
563
|
+
case "PrivateTypeException":
|
|
564
|
+
case "com.amazonaws.cloudcontrol#PrivateTypeException":
|
|
565
|
+
throw await deserializeAws_json1_0PrivateTypeExceptionResponse(parsedOutput, context);
|
|
566
|
+
case "ResourceConflictException":
|
|
567
|
+
case "com.amazonaws.cloudcontrol#ResourceConflictException":
|
|
568
|
+
throw await deserializeAws_json1_0ResourceConflictExceptionResponse(parsedOutput, context);
|
|
569
|
+
case "ResourceNotFoundException":
|
|
570
|
+
case "com.amazonaws.cloudcontrol#ResourceNotFoundException":
|
|
571
|
+
throw await deserializeAws_json1_0ResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
572
|
+
case "ServiceInternalErrorException":
|
|
573
|
+
case "com.amazonaws.cloudcontrol#ServiceInternalErrorException":
|
|
574
|
+
throw await deserializeAws_json1_0ServiceInternalErrorExceptionResponse(parsedOutput, context);
|
|
575
|
+
case "ServiceLimitExceededException":
|
|
576
|
+
case "com.amazonaws.cloudcontrol#ServiceLimitExceededException":
|
|
577
|
+
throw await deserializeAws_json1_0ServiceLimitExceededExceptionResponse(parsedOutput, context);
|
|
578
|
+
case "ThrottlingException":
|
|
579
|
+
case "com.amazonaws.cloudcontrol#ThrottlingException":
|
|
580
|
+
throw await deserializeAws_json1_0ThrottlingExceptionResponse(parsedOutput, context);
|
|
581
|
+
case "TypeNotFoundException":
|
|
582
|
+
case "com.amazonaws.cloudcontrol#TypeNotFoundException":
|
|
583
|
+
throw await deserializeAws_json1_0TypeNotFoundExceptionResponse(parsedOutput, context);
|
|
584
|
+
case "UnsupportedActionException":
|
|
585
|
+
case "com.amazonaws.cloudcontrol#UnsupportedActionException":
|
|
586
|
+
throw await deserializeAws_json1_0UnsupportedActionExceptionResponse(parsedOutput, context);
|
|
587
|
+
default:
|
|
588
|
+
const parsedBody = parsedOutput.body;
|
|
589
|
+
throwDefaultError({
|
|
590
|
+
output,
|
|
591
|
+
parsedBody,
|
|
592
|
+
exceptionCtor: __BaseException,
|
|
593
|
+
errorCode,
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
const deserializeAws_json1_0AlreadyExistsExceptionResponse = async (parsedOutput, context) => {
|
|
598
|
+
const body = parsedOutput.body;
|
|
599
|
+
const deserialized = deserializeAws_json1_0AlreadyExistsException(body, context);
|
|
600
|
+
const exception = new AlreadyExistsException({
|
|
601
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
602
|
+
...deserialized,
|
|
848
603
|
});
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
604
|
+
return __decorateServiceException(exception, body);
|
|
605
|
+
};
|
|
606
|
+
const deserializeAws_json1_0ClientTokenConflictExceptionResponse = async (parsedOutput, context) => {
|
|
607
|
+
const body = parsedOutput.body;
|
|
608
|
+
const deserialized = deserializeAws_json1_0ClientTokenConflictException(body, context);
|
|
609
|
+
const exception = new ClientTokenConflictException({
|
|
610
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
611
|
+
...deserialized,
|
|
857
612
|
});
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
613
|
+
return __decorateServiceException(exception, body);
|
|
614
|
+
};
|
|
615
|
+
const deserializeAws_json1_0ConcurrentModificationExceptionResponse = async (parsedOutput, context) => {
|
|
616
|
+
const body = parsedOutput.body;
|
|
617
|
+
const deserialized = deserializeAws_json1_0ConcurrentModificationException(body, context);
|
|
618
|
+
const exception = new ConcurrentModificationException({
|
|
619
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
620
|
+
...deserialized,
|
|
866
621
|
});
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
622
|
+
return __decorateServiceException(exception, body);
|
|
623
|
+
};
|
|
624
|
+
const deserializeAws_json1_0ConcurrentOperationExceptionResponse = async (parsedOutput, context) => {
|
|
625
|
+
const body = parsedOutput.body;
|
|
626
|
+
const deserialized = deserializeAws_json1_0ConcurrentOperationException(body, context);
|
|
627
|
+
const exception = new ConcurrentOperationException({
|
|
628
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
629
|
+
...deserialized,
|
|
875
630
|
});
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
631
|
+
return __decorateServiceException(exception, body);
|
|
632
|
+
};
|
|
633
|
+
const deserializeAws_json1_0GeneralServiceExceptionResponse = async (parsedOutput, context) => {
|
|
634
|
+
const body = parsedOutput.body;
|
|
635
|
+
const deserialized = deserializeAws_json1_0GeneralServiceException(body, context);
|
|
636
|
+
const exception = new GeneralServiceException({
|
|
637
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
638
|
+
...deserialized,
|
|
884
639
|
});
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
640
|
+
return __decorateServiceException(exception, body);
|
|
641
|
+
};
|
|
642
|
+
const deserializeAws_json1_0HandlerFailureExceptionResponse = async (parsedOutput, context) => {
|
|
643
|
+
const body = parsedOutput.body;
|
|
644
|
+
const deserialized = deserializeAws_json1_0HandlerFailureException(body, context);
|
|
645
|
+
const exception = new HandlerFailureException({
|
|
646
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
647
|
+
...deserialized,
|
|
893
648
|
});
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
649
|
+
return __decorateServiceException(exception, body);
|
|
650
|
+
};
|
|
651
|
+
const deserializeAws_json1_0HandlerInternalFailureExceptionResponse = async (parsedOutput, context) => {
|
|
652
|
+
const body = parsedOutput.body;
|
|
653
|
+
const deserialized = deserializeAws_json1_0HandlerInternalFailureException(body, context);
|
|
654
|
+
const exception = new HandlerInternalFailureException({
|
|
655
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
656
|
+
...deserialized,
|
|
902
657
|
});
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
658
|
+
return __decorateServiceException(exception, body);
|
|
659
|
+
};
|
|
660
|
+
const deserializeAws_json1_0InvalidCredentialsExceptionResponse = async (parsedOutput, context) => {
|
|
661
|
+
const body = parsedOutput.body;
|
|
662
|
+
const deserialized = deserializeAws_json1_0InvalidCredentialsException(body, context);
|
|
663
|
+
const exception = new InvalidCredentialsException({
|
|
664
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
665
|
+
...deserialized,
|
|
911
666
|
});
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
667
|
+
return __decorateServiceException(exception, body);
|
|
668
|
+
};
|
|
669
|
+
const deserializeAws_json1_0InvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
670
|
+
const body = parsedOutput.body;
|
|
671
|
+
const deserialized = deserializeAws_json1_0InvalidRequestException(body, context);
|
|
672
|
+
const exception = new InvalidRequestException({
|
|
673
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
674
|
+
...deserialized,
|
|
920
675
|
});
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
676
|
+
return __decorateServiceException(exception, body);
|
|
677
|
+
};
|
|
678
|
+
const deserializeAws_json1_0NetworkFailureExceptionResponse = async (parsedOutput, context) => {
|
|
679
|
+
const body = parsedOutput.body;
|
|
680
|
+
const deserialized = deserializeAws_json1_0NetworkFailureException(body, context);
|
|
681
|
+
const exception = new NetworkFailureException({
|
|
682
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
683
|
+
...deserialized,
|
|
929
684
|
});
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
685
|
+
return __decorateServiceException(exception, body);
|
|
686
|
+
};
|
|
687
|
+
const deserializeAws_json1_0NotStabilizedExceptionResponse = async (parsedOutput, context) => {
|
|
688
|
+
const body = parsedOutput.body;
|
|
689
|
+
const deserialized = deserializeAws_json1_0NotStabilizedException(body, context);
|
|
690
|
+
const exception = new NotStabilizedException({
|
|
691
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
692
|
+
...deserialized,
|
|
938
693
|
});
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
694
|
+
return __decorateServiceException(exception, body);
|
|
695
|
+
};
|
|
696
|
+
const deserializeAws_json1_0NotUpdatableExceptionResponse = async (parsedOutput, context) => {
|
|
697
|
+
const body = parsedOutput.body;
|
|
698
|
+
const deserialized = deserializeAws_json1_0NotUpdatableException(body, context);
|
|
699
|
+
const exception = new NotUpdatableException({
|
|
700
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
701
|
+
...deserialized,
|
|
947
702
|
});
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
703
|
+
return __decorateServiceException(exception, body);
|
|
704
|
+
};
|
|
705
|
+
const deserializeAws_json1_0PrivateTypeExceptionResponse = async (parsedOutput, context) => {
|
|
706
|
+
const body = parsedOutput.body;
|
|
707
|
+
const deserialized = deserializeAws_json1_0PrivateTypeException(body, context);
|
|
708
|
+
const exception = new PrivateTypeException({
|
|
709
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
710
|
+
...deserialized,
|
|
956
711
|
});
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
712
|
+
return __decorateServiceException(exception, body);
|
|
713
|
+
};
|
|
714
|
+
const deserializeAws_json1_0RequestTokenNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
715
|
+
const body = parsedOutput.body;
|
|
716
|
+
const deserialized = deserializeAws_json1_0RequestTokenNotFoundException(body, context);
|
|
717
|
+
const exception = new RequestTokenNotFoundException({
|
|
718
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
719
|
+
...deserialized,
|
|
965
720
|
});
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
721
|
+
return __decorateServiceException(exception, body);
|
|
722
|
+
};
|
|
723
|
+
const deserializeAws_json1_0ResourceConflictExceptionResponse = async (parsedOutput, context) => {
|
|
724
|
+
const body = parsedOutput.body;
|
|
725
|
+
const deserialized = deserializeAws_json1_0ResourceConflictException(body, context);
|
|
726
|
+
const exception = new ResourceConflictException({
|
|
727
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
728
|
+
...deserialized,
|
|
974
729
|
});
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
730
|
+
return __decorateServiceException(exception, body);
|
|
731
|
+
};
|
|
732
|
+
const deserializeAws_json1_0ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
733
|
+
const body = parsedOutput.body;
|
|
734
|
+
const deserialized = deserializeAws_json1_0ResourceNotFoundException(body, context);
|
|
735
|
+
const exception = new ResourceNotFoundException({
|
|
736
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
737
|
+
...deserialized,
|
|
983
738
|
});
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
739
|
+
return __decorateServiceException(exception, body);
|
|
740
|
+
};
|
|
741
|
+
const deserializeAws_json1_0ServiceInternalErrorExceptionResponse = async (parsedOutput, context) => {
|
|
742
|
+
const body = parsedOutput.body;
|
|
743
|
+
const deserialized = deserializeAws_json1_0ServiceInternalErrorException(body, context);
|
|
744
|
+
const exception = new ServiceInternalErrorException({
|
|
745
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
746
|
+
...deserialized,
|
|
992
747
|
});
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
748
|
+
return __decorateServiceException(exception, body);
|
|
749
|
+
};
|
|
750
|
+
const deserializeAws_json1_0ServiceLimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
751
|
+
const body = parsedOutput.body;
|
|
752
|
+
const deserialized = deserializeAws_json1_0ServiceLimitExceededException(body, context);
|
|
753
|
+
const exception = new ServiceLimitExceededException({
|
|
754
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
755
|
+
...deserialized,
|
|
1001
756
|
});
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
757
|
+
return __decorateServiceException(exception, body);
|
|
758
|
+
};
|
|
759
|
+
const deserializeAws_json1_0ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
760
|
+
const body = parsedOutput.body;
|
|
761
|
+
const deserialized = deserializeAws_json1_0ThrottlingException(body, context);
|
|
762
|
+
const exception = new ThrottlingException({
|
|
763
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
764
|
+
...deserialized,
|
|
1010
765
|
});
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
766
|
+
return __decorateServiceException(exception, body);
|
|
767
|
+
};
|
|
768
|
+
const deserializeAws_json1_0TypeNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
769
|
+
const body = parsedOutput.body;
|
|
770
|
+
const deserialized = deserializeAws_json1_0TypeNotFoundException(body, context);
|
|
771
|
+
const exception = new TypeNotFoundException({
|
|
772
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
773
|
+
...deserialized,
|
|
1019
774
|
});
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
775
|
+
return __decorateServiceException(exception, body);
|
|
776
|
+
};
|
|
777
|
+
const deserializeAws_json1_0UnsupportedActionExceptionResponse = async (parsedOutput, context) => {
|
|
778
|
+
const body = parsedOutput.body;
|
|
779
|
+
const deserialized = deserializeAws_json1_0UnsupportedActionException(body, context);
|
|
780
|
+
const exception = new UnsupportedActionException({
|
|
781
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
782
|
+
...deserialized,
|
|
1028
783
|
});
|
|
1029
|
-
|
|
1030
|
-
var serializeAws_json1_0CancelResourceRequestInput = function (input, context) {
|
|
1031
|
-
return __assign({}, (input.RequestToken != null && { RequestToken: input.RequestToken }));
|
|
784
|
+
return __decorateServiceException(exception, body);
|
|
1032
785
|
};
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
786
|
+
const serializeAws_json1_0CancelResourceRequestInput = (input, context) => {
|
|
787
|
+
return {
|
|
788
|
+
...(input.RequestToken != null && { RequestToken: input.RequestToken }),
|
|
789
|
+
};
|
|
1036
790
|
};
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
791
|
+
const serializeAws_json1_0CreateResourceInput = (input, context) => {
|
|
792
|
+
return {
|
|
793
|
+
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
794
|
+
...(input.DesiredState != null && { DesiredState: input.DesiredState }),
|
|
795
|
+
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
796
|
+
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
797
|
+
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
798
|
+
};
|
|
1040
799
|
};
|
|
1041
|
-
|
|
1042
|
-
return
|
|
800
|
+
const serializeAws_json1_0DeleteResourceInput = (input, context) => {
|
|
801
|
+
return {
|
|
802
|
+
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
803
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
804
|
+
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
805
|
+
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
806
|
+
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
807
|
+
};
|
|
1043
808
|
};
|
|
1044
|
-
|
|
1045
|
-
return
|
|
809
|
+
const serializeAws_json1_0GetResourceInput = (input, context) => {
|
|
810
|
+
return {
|
|
811
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
812
|
+
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
813
|
+
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
814
|
+
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
815
|
+
};
|
|
1046
816
|
};
|
|
1047
|
-
|
|
1048
|
-
return
|
|
1049
|
-
|
|
1050
|
-
}
|
|
817
|
+
const serializeAws_json1_0GetResourceRequestStatusInput = (input, context) => {
|
|
818
|
+
return {
|
|
819
|
+
...(input.RequestToken != null && { RequestToken: input.RequestToken }),
|
|
820
|
+
};
|
|
821
|
+
};
|
|
822
|
+
const serializeAws_json1_0ListResourceRequestsInput = (input, context) => {
|
|
823
|
+
return {
|
|
824
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
825
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
826
|
+
...(input.ResourceRequestStatusFilter != null && {
|
|
827
|
+
ResourceRequestStatusFilter: serializeAws_json1_0ResourceRequestStatusFilter(input.ResourceRequestStatusFilter, context),
|
|
828
|
+
}),
|
|
829
|
+
};
|
|
1051
830
|
};
|
|
1052
|
-
|
|
1053
|
-
return
|
|
831
|
+
const serializeAws_json1_0ListResourcesInput = (input, context) => {
|
|
832
|
+
return {
|
|
833
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
834
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
835
|
+
...(input.ResourceModel != null && { ResourceModel: input.ResourceModel }),
|
|
836
|
+
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
837
|
+
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
838
|
+
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
839
|
+
};
|
|
1054
840
|
};
|
|
1055
|
-
|
|
841
|
+
const serializeAws_json1_0Operations = (input, context) => {
|
|
1056
842
|
return input
|
|
1057
|
-
.filter(
|
|
1058
|
-
.map(
|
|
843
|
+
.filter((e) => e != null)
|
|
844
|
+
.map((entry) => {
|
|
1059
845
|
return entry;
|
|
1060
846
|
});
|
|
1061
847
|
};
|
|
1062
|
-
|
|
848
|
+
const serializeAws_json1_0OperationStatuses = (input, context) => {
|
|
1063
849
|
return input
|
|
1064
|
-
.filter(
|
|
1065
|
-
.map(
|
|
850
|
+
.filter((e) => e != null)
|
|
851
|
+
.map((entry) => {
|
|
1066
852
|
return entry;
|
|
1067
853
|
});
|
|
1068
854
|
};
|
|
1069
|
-
|
|
1070
|
-
return
|
|
1071
|
-
|
|
1072
|
-
|
|
855
|
+
const serializeAws_json1_0ResourceRequestStatusFilter = (input, context) => {
|
|
856
|
+
return {
|
|
857
|
+
...(input.OperationStatuses != null && {
|
|
858
|
+
OperationStatuses: serializeAws_json1_0OperationStatuses(input.OperationStatuses, context),
|
|
859
|
+
}),
|
|
860
|
+
...(input.Operations != null && { Operations: serializeAws_json1_0Operations(input.Operations, context) }),
|
|
861
|
+
};
|
|
1073
862
|
};
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
863
|
+
const serializeAws_json1_0UpdateResourceInput = (input, context) => {
|
|
864
|
+
return {
|
|
865
|
+
ClientToken: input.ClientToken ?? generateIdempotencyToken(),
|
|
866
|
+
...(input.Identifier != null && { Identifier: input.Identifier }),
|
|
867
|
+
...(input.PatchDocument != null && { PatchDocument: input.PatchDocument }),
|
|
868
|
+
...(input.RoleArn != null && { RoleArn: input.RoleArn }),
|
|
869
|
+
...(input.TypeName != null && { TypeName: input.TypeName }),
|
|
870
|
+
...(input.TypeVersionId != null && { TypeVersionId: input.TypeVersionId }),
|
|
871
|
+
};
|
|
1077
872
|
};
|
|
1078
|
-
|
|
873
|
+
const deserializeAws_json1_0AlreadyExistsException = (output, context) => {
|
|
1079
874
|
return {
|
|
1080
875
|
Message: __expectString(output.Message),
|
|
1081
876
|
};
|
|
1082
877
|
};
|
|
1083
|
-
|
|
878
|
+
const deserializeAws_json1_0CancelResourceRequestOutput = (output, context) => {
|
|
1084
879
|
return {
|
|
1085
880
|
ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
|
|
1086
881
|
};
|
|
1087
882
|
};
|
|
1088
|
-
|
|
883
|
+
const deserializeAws_json1_0ClientTokenConflictException = (output, context) => {
|
|
1089
884
|
return {
|
|
1090
885
|
Message: __expectString(output.Message),
|
|
1091
886
|
};
|
|
1092
887
|
};
|
|
1093
|
-
|
|
888
|
+
const deserializeAws_json1_0ConcurrentModificationException = (output, context) => {
|
|
1094
889
|
return {
|
|
1095
890
|
Message: __expectString(output.Message),
|
|
1096
891
|
};
|
|
1097
892
|
};
|
|
1098
|
-
|
|
893
|
+
const deserializeAws_json1_0ConcurrentOperationException = (output, context) => {
|
|
1099
894
|
return {
|
|
1100
895
|
Message: __expectString(output.Message),
|
|
1101
896
|
};
|
|
1102
897
|
};
|
|
1103
|
-
|
|
898
|
+
const deserializeAws_json1_0CreateResourceOutput = (output, context) => {
|
|
1104
899
|
return {
|
|
1105
900
|
ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
|
|
1106
901
|
};
|
|
1107
902
|
};
|
|
1108
|
-
|
|
903
|
+
const deserializeAws_json1_0DeleteResourceOutput = (output, context) => {
|
|
1109
904
|
return {
|
|
1110
905
|
ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
|
|
1111
906
|
};
|
|
1112
907
|
};
|
|
1113
|
-
|
|
908
|
+
const deserializeAws_json1_0GeneralServiceException = (output, context) => {
|
|
1114
909
|
return {
|
|
1115
910
|
Message: __expectString(output.Message),
|
|
1116
911
|
};
|
|
1117
912
|
};
|
|
1118
|
-
|
|
913
|
+
const deserializeAws_json1_0GetResourceOutput = (output, context) => {
|
|
1119
914
|
return {
|
|
1120
915
|
ResourceDescription: output.ResourceDescription != null
|
|
1121
916
|
? deserializeAws_json1_0ResourceDescription(output.ResourceDescription, context)
|
|
@@ -1123,32 +918,32 @@ var deserializeAws_json1_0GetResourceOutput = function (output, context) {
|
|
|
1123
918
|
TypeName: __expectString(output.TypeName),
|
|
1124
919
|
};
|
|
1125
920
|
};
|
|
1126
|
-
|
|
921
|
+
const deserializeAws_json1_0GetResourceRequestStatusOutput = (output, context) => {
|
|
1127
922
|
return {
|
|
1128
923
|
ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
|
|
1129
924
|
};
|
|
1130
925
|
};
|
|
1131
|
-
|
|
926
|
+
const deserializeAws_json1_0HandlerFailureException = (output, context) => {
|
|
1132
927
|
return {
|
|
1133
928
|
Message: __expectString(output.Message),
|
|
1134
929
|
};
|
|
1135
930
|
};
|
|
1136
|
-
|
|
931
|
+
const deserializeAws_json1_0HandlerInternalFailureException = (output, context) => {
|
|
1137
932
|
return {
|
|
1138
933
|
Message: __expectString(output.Message),
|
|
1139
934
|
};
|
|
1140
935
|
};
|
|
1141
|
-
|
|
936
|
+
const deserializeAws_json1_0InvalidCredentialsException = (output, context) => {
|
|
1142
937
|
return {
|
|
1143
938
|
Message: __expectString(output.Message),
|
|
1144
939
|
};
|
|
1145
940
|
};
|
|
1146
|
-
|
|
941
|
+
const deserializeAws_json1_0InvalidRequestException = (output, context) => {
|
|
1147
942
|
return {
|
|
1148
943
|
Message: __expectString(output.Message),
|
|
1149
944
|
};
|
|
1150
945
|
};
|
|
1151
|
-
|
|
946
|
+
const deserializeAws_json1_0ListResourceRequestsOutput = (output, context) => {
|
|
1152
947
|
return {
|
|
1153
948
|
NextToken: __expectString(output.NextToken),
|
|
1154
949
|
ResourceRequestStatusSummaries: output.ResourceRequestStatusSummaries != null
|
|
@@ -1156,7 +951,7 @@ var deserializeAws_json1_0ListResourceRequestsOutput = function (output, context
|
|
|
1156
951
|
: undefined,
|
|
1157
952
|
};
|
|
1158
953
|
};
|
|
1159
|
-
|
|
954
|
+
const deserializeAws_json1_0ListResourcesOutput = (output, context) => {
|
|
1160
955
|
return {
|
|
1161
956
|
NextToken: __expectString(output.NextToken),
|
|
1162
957
|
ResourceDescriptions: output.ResourceDescriptions != null
|
|
@@ -1165,27 +960,27 @@ var deserializeAws_json1_0ListResourcesOutput = function (output, context) {
|
|
|
1165
960
|
TypeName: __expectString(output.TypeName),
|
|
1166
961
|
};
|
|
1167
962
|
};
|
|
1168
|
-
|
|
963
|
+
const deserializeAws_json1_0NetworkFailureException = (output, context) => {
|
|
1169
964
|
return {
|
|
1170
965
|
Message: __expectString(output.Message),
|
|
1171
966
|
};
|
|
1172
967
|
};
|
|
1173
|
-
|
|
968
|
+
const deserializeAws_json1_0NotStabilizedException = (output, context) => {
|
|
1174
969
|
return {
|
|
1175
970
|
Message: __expectString(output.Message),
|
|
1176
971
|
};
|
|
1177
972
|
};
|
|
1178
|
-
|
|
973
|
+
const deserializeAws_json1_0NotUpdatableException = (output, context) => {
|
|
1179
974
|
return {
|
|
1180
975
|
Message: __expectString(output.Message),
|
|
1181
976
|
};
|
|
1182
977
|
};
|
|
1183
|
-
|
|
978
|
+
const deserializeAws_json1_0PrivateTypeException = (output, context) => {
|
|
1184
979
|
return {
|
|
1185
980
|
Message: __expectString(output.Message),
|
|
1186
981
|
};
|
|
1187
982
|
};
|
|
1188
|
-
|
|
983
|
+
const deserializeAws_json1_0ProgressEvent = (output, context) => {
|
|
1189
984
|
return {
|
|
1190
985
|
ErrorCode: __expectString(output.ErrorCode),
|
|
1191
986
|
EventTime: output.EventTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EventTime))) : undefined,
|
|
@@ -1199,26 +994,26 @@ var deserializeAws_json1_0ProgressEvent = function (output, context) {
|
|
|
1199
994
|
TypeName: __expectString(output.TypeName),
|
|
1200
995
|
};
|
|
1201
996
|
};
|
|
1202
|
-
|
|
997
|
+
const deserializeAws_json1_0RequestTokenNotFoundException = (output, context) => {
|
|
1203
998
|
return {
|
|
1204
999
|
Message: __expectString(output.Message),
|
|
1205
1000
|
};
|
|
1206
1001
|
};
|
|
1207
|
-
|
|
1002
|
+
const deserializeAws_json1_0ResourceConflictException = (output, context) => {
|
|
1208
1003
|
return {
|
|
1209
1004
|
Message: __expectString(output.Message),
|
|
1210
1005
|
};
|
|
1211
1006
|
};
|
|
1212
|
-
|
|
1007
|
+
const deserializeAws_json1_0ResourceDescription = (output, context) => {
|
|
1213
1008
|
return {
|
|
1214
1009
|
Identifier: __expectString(output.Identifier),
|
|
1215
1010
|
Properties: __expectString(output.Properties),
|
|
1216
1011
|
};
|
|
1217
1012
|
};
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
.filter(
|
|
1221
|
-
.map(
|
|
1013
|
+
const deserializeAws_json1_0ResourceDescriptions = (output, context) => {
|
|
1014
|
+
const retVal = (output || [])
|
|
1015
|
+
.filter((e) => e != null)
|
|
1016
|
+
.map((entry) => {
|
|
1222
1017
|
if (entry === null) {
|
|
1223
1018
|
return null;
|
|
1224
1019
|
}
|
|
@@ -1226,15 +1021,15 @@ var deserializeAws_json1_0ResourceDescriptions = function (output, context) {
|
|
|
1226
1021
|
});
|
|
1227
1022
|
return retVal;
|
|
1228
1023
|
};
|
|
1229
|
-
|
|
1024
|
+
const deserializeAws_json1_0ResourceNotFoundException = (output, context) => {
|
|
1230
1025
|
return {
|
|
1231
1026
|
Message: __expectString(output.Message),
|
|
1232
1027
|
};
|
|
1233
1028
|
};
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
.filter(
|
|
1237
|
-
.map(
|
|
1029
|
+
const deserializeAws_json1_0ResourceRequestStatusSummaries = (output, context) => {
|
|
1030
|
+
const retVal = (output || [])
|
|
1031
|
+
.filter((e) => e != null)
|
|
1032
|
+
.map((entry) => {
|
|
1238
1033
|
if (entry === null) {
|
|
1239
1034
|
return null;
|
|
1240
1035
|
}
|
|
@@ -1242,105 +1037,82 @@ var deserializeAws_json1_0ResourceRequestStatusSummaries = function (output, con
|
|
|
1242
1037
|
});
|
|
1243
1038
|
return retVal;
|
|
1244
1039
|
};
|
|
1245
|
-
|
|
1040
|
+
const deserializeAws_json1_0ServiceInternalErrorException = (output, context) => {
|
|
1246
1041
|
return {
|
|
1247
1042
|
Message: __expectString(output.Message),
|
|
1248
1043
|
};
|
|
1249
1044
|
};
|
|
1250
|
-
|
|
1045
|
+
const deserializeAws_json1_0ServiceLimitExceededException = (output, context) => {
|
|
1251
1046
|
return {
|
|
1252
1047
|
Message: __expectString(output.Message),
|
|
1253
1048
|
};
|
|
1254
1049
|
};
|
|
1255
|
-
|
|
1050
|
+
const deserializeAws_json1_0ThrottlingException = (output, context) => {
|
|
1256
1051
|
return {
|
|
1257
1052
|
Message: __expectString(output.Message),
|
|
1258
1053
|
};
|
|
1259
1054
|
};
|
|
1260
|
-
|
|
1055
|
+
const deserializeAws_json1_0TypeNotFoundException = (output, context) => {
|
|
1261
1056
|
return {
|
|
1262
1057
|
Message: __expectString(output.Message),
|
|
1263
1058
|
};
|
|
1264
1059
|
};
|
|
1265
|
-
|
|
1060
|
+
const deserializeAws_json1_0UnsupportedActionException = (output, context) => {
|
|
1266
1061
|
return {
|
|
1267
1062
|
Message: __expectString(output.Message),
|
|
1268
1063
|
};
|
|
1269
1064
|
};
|
|
1270
|
-
|
|
1065
|
+
const deserializeAws_json1_0UpdateResourceOutput = (output, context) => {
|
|
1271
1066
|
return {
|
|
1272
1067
|
ProgressEvent: output.ProgressEvent != null ? deserializeAws_json1_0ProgressEvent(output.ProgressEvent, context) : undefined,
|
|
1273
1068
|
};
|
|
1274
1069
|
};
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
});
|
|
1283
|
-
};
|
|
1284
|
-
var collectBody = function (streamBody, context) {
|
|
1285
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1070
|
+
const deserializeMetadata = (output) => ({
|
|
1071
|
+
httpStatusCode: output.statusCode,
|
|
1072
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1073
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1074
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1075
|
+
});
|
|
1076
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1286
1077
|
if (streamBody instanceof Uint8Array) {
|
|
1287
1078
|
return Promise.resolve(streamBody);
|
|
1288
1079
|
}
|
|
1289
1080
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1290
1081
|
};
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
};
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
if (resolvedHostname !== undefined) {
|
|
1310
|
-
contents.hostname = resolvedHostname;
|
|
1311
|
-
}
|
|
1312
|
-
if (body !== undefined) {
|
|
1313
|
-
contents.body = body;
|
|
1314
|
-
}
|
|
1315
|
-
return [2, new __HttpRequest(contents)];
|
|
1316
|
-
}
|
|
1317
|
-
});
|
|
1318
|
-
}); };
|
|
1319
|
-
var parseBody = function (streamBody, context) {
|
|
1320
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1321
|
-
if (encoded.length) {
|
|
1322
|
-
return JSON.parse(encoded);
|
|
1323
|
-
}
|
|
1324
|
-
return {};
|
|
1325
|
-
});
|
|
1082
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1083
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1084
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1085
|
+
const contents = {
|
|
1086
|
+
protocol,
|
|
1087
|
+
hostname,
|
|
1088
|
+
port,
|
|
1089
|
+
method: "POST",
|
|
1090
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1091
|
+
headers,
|
|
1092
|
+
};
|
|
1093
|
+
if (resolvedHostname !== undefined) {
|
|
1094
|
+
contents.hostname = resolvedHostname;
|
|
1095
|
+
}
|
|
1096
|
+
if (body !== undefined) {
|
|
1097
|
+
contents.body = body;
|
|
1098
|
+
}
|
|
1099
|
+
return new __HttpRequest(contents);
|
|
1326
1100
|
};
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1343
|
-
var cleanValue = rawValue;
|
|
1101
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1102
|
+
if (encoded.length) {
|
|
1103
|
+
return JSON.parse(encoded);
|
|
1104
|
+
}
|
|
1105
|
+
return {};
|
|
1106
|
+
});
|
|
1107
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1108
|
+
const value = await parseBody(errorBody, context);
|
|
1109
|
+
value.message = value.message ?? value.Message;
|
|
1110
|
+
return value;
|
|
1111
|
+
};
|
|
1112
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1113
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1114
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1115
|
+
let cleanValue = rawValue;
|
|
1344
1116
|
if (typeof cleanValue === "number") {
|
|
1345
1117
|
cleanValue = cleanValue.toString();
|
|
1346
1118
|
}
|
|
@@ -1355,7 +1127,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1355
1127
|
}
|
|
1356
1128
|
return cleanValue;
|
|
1357
1129
|
};
|
|
1358
|
-
|
|
1130
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1359
1131
|
if (headerKey !== undefined) {
|
|
1360
1132
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1361
1133
|
}
|