@aws-sdk/client-cloudhsm-v2 3.185.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 +16 -0
- package/dist-es/CloudHSMV2.js +62 -69
- package/dist-es/CloudHSMV2Client.js +22 -28
- package/dist-es/commands/CopyBackupToRegionCommand.js +21 -28
- package/dist-es/commands/CreateClusterCommand.js +21 -28
- package/dist-es/commands/CreateHsmCommand.js +21 -28
- package/dist-es/commands/DeleteBackupCommand.js +21 -28
- package/dist-es/commands/DeleteClusterCommand.js +21 -28
- package/dist-es/commands/DeleteHsmCommand.js +21 -28
- package/dist-es/commands/DescribeBackupsCommand.js +21 -28
- package/dist-es/commands/DescribeClustersCommand.js +21 -28
- package/dist-es/commands/InitializeClusterCommand.js +21 -28
- package/dist-es/commands/ListTagsCommand.js +21 -28
- package/dist-es/commands/ModifyBackupAttributesCommand.js +21 -28
- package/dist-es/commands/ModifyClusterCommand.js +21 -28
- package/dist-es/commands/RestoreBackupCommand.js +21 -28
- package/dist-es/commands/TagResourceCommand.js +21 -28
- package/dist-es/commands/UntagResourceCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/CloudHSMV2ServiceException.js +5 -10
- package/dist-es/models/models_0.js +183 -110
- package/dist-es/pagination/DescribeBackupsPaginator.js +25 -68
- package/dist-es/pagination/DescribeClustersPaginator.js +25 -68
- package/dist-es/pagination/ListTagsPaginator.js +25 -68
- package/dist-es/protocols/Aws_json1_1.js +1086 -1415
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/package.json +33 -33
|
@@ -1,1354 +1,1047 @@
|
|
|
1
|
-
import { __assign, __awaiter, __generator, __read } from "tslib";
|
|
2
1
|
import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
|
|
3
2
|
import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { CloudHSMV2ServiceException as __BaseException } from "../models/CloudHSMV2ServiceException";
|
|
5
4
|
import { CloudHsmAccessDeniedException, CloudHsmInternalFailureException, CloudHsmInvalidRequestException, CloudHsmResourceNotFoundException, CloudHsmServiceException, CloudHsmTagException, } from "../models/models_0";
|
|
6
|
-
export
|
|
7
|
-
|
|
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
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
export
|
|
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
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
case 9: throw _d.sent();
|
|
844
|
-
case 10: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
845
|
-
case 11: throw _d.sent();
|
|
846
|
-
case 12: return [4, deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context)];
|
|
847
|
-
case 13: throw _d.sent();
|
|
848
|
-
case 14:
|
|
849
|
-
parsedBody = parsedOutput.body;
|
|
850
|
-
throwDefaultError({
|
|
851
|
-
output: output,
|
|
852
|
-
parsedBody: parsedBody,
|
|
853
|
-
exceptionCtor: __BaseException,
|
|
854
|
-
errorCode: errorCode,
|
|
855
|
-
});
|
|
856
|
-
_d.label = 15;
|
|
857
|
-
case 15: return [2];
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
}); };
|
|
861
|
-
export var deserializeAws_json1_1ModifyBackupAttributesCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
862
|
-
var data, contents, response;
|
|
863
|
-
return __generator(this, function (_a) {
|
|
864
|
-
switch (_a.label) {
|
|
865
|
-
case 0:
|
|
866
|
-
if (output.statusCode >= 300) {
|
|
867
|
-
return [2, deserializeAws_json1_1ModifyBackupAttributesCommandError(output, context)];
|
|
868
|
-
}
|
|
869
|
-
return [4, parseBody(output.body, context)];
|
|
870
|
-
case 1:
|
|
871
|
-
data = _a.sent();
|
|
872
|
-
contents = {};
|
|
873
|
-
contents = deserializeAws_json1_1ModifyBackupAttributesResponse(data, context);
|
|
874
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
875
|
-
return [2, Promise.resolve(response)];
|
|
876
|
-
}
|
|
877
|
-
});
|
|
878
|
-
}); };
|
|
879
|
-
var deserializeAws_json1_1ModifyBackupAttributesCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
880
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
881
|
-
var _c;
|
|
882
|
-
return __generator(this, function (_d) {
|
|
883
|
-
switch (_d.label) {
|
|
884
|
-
case 0:
|
|
885
|
-
_a = [__assign({}, output)];
|
|
886
|
-
_c = {};
|
|
887
|
-
return [4, parseErrorBody(output.body, context)];
|
|
888
|
-
case 1:
|
|
889
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
890
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
891
|
-
_b = errorCode;
|
|
892
|
-
switch (_b) {
|
|
893
|
-
case "CloudHsmAccessDeniedException": return [3, 2];
|
|
894
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException": return [3, 2];
|
|
895
|
-
case "CloudHsmInternalFailureException": return [3, 4];
|
|
896
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException": return [3, 4];
|
|
897
|
-
case "CloudHsmInvalidRequestException": return [3, 6];
|
|
898
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException": return [3, 6];
|
|
899
|
-
case "CloudHsmResourceNotFoundException": return [3, 8];
|
|
900
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException": return [3, 8];
|
|
901
|
-
case "CloudHsmServiceException": return [3, 10];
|
|
902
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException": return [3, 10];
|
|
903
|
-
}
|
|
904
|
-
return [3, 12];
|
|
905
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context)];
|
|
906
|
-
case 3: throw _d.sent();
|
|
907
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context)];
|
|
908
|
-
case 5: throw _d.sent();
|
|
909
|
-
case 6: return [4, deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context)];
|
|
910
|
-
case 7: throw _d.sent();
|
|
911
|
-
case 8: return [4, deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
912
|
-
case 9: throw _d.sent();
|
|
913
|
-
case 10: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
914
|
-
case 11: throw _d.sent();
|
|
915
|
-
case 12:
|
|
916
|
-
parsedBody = parsedOutput.body;
|
|
917
|
-
throwDefaultError({
|
|
918
|
-
output: output,
|
|
919
|
-
parsedBody: parsedBody,
|
|
920
|
-
exceptionCtor: __BaseException,
|
|
921
|
-
errorCode: errorCode,
|
|
922
|
-
});
|
|
923
|
-
_d.label = 13;
|
|
924
|
-
case 13: return [2];
|
|
925
|
-
}
|
|
926
|
-
});
|
|
927
|
-
}); };
|
|
928
|
-
export var deserializeAws_json1_1ModifyClusterCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
929
|
-
var data, contents, response;
|
|
930
|
-
return __generator(this, function (_a) {
|
|
931
|
-
switch (_a.label) {
|
|
932
|
-
case 0:
|
|
933
|
-
if (output.statusCode >= 300) {
|
|
934
|
-
return [2, deserializeAws_json1_1ModifyClusterCommandError(output, context)];
|
|
935
|
-
}
|
|
936
|
-
return [4, parseBody(output.body, context)];
|
|
937
|
-
case 1:
|
|
938
|
-
data = _a.sent();
|
|
939
|
-
contents = {};
|
|
940
|
-
contents = deserializeAws_json1_1ModifyClusterResponse(data, context);
|
|
941
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
942
|
-
return [2, Promise.resolve(response)];
|
|
943
|
-
}
|
|
944
|
-
});
|
|
945
|
-
}); };
|
|
946
|
-
var deserializeAws_json1_1ModifyClusterCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
947
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
948
|
-
var _c;
|
|
949
|
-
return __generator(this, function (_d) {
|
|
950
|
-
switch (_d.label) {
|
|
951
|
-
case 0:
|
|
952
|
-
_a = [__assign({}, output)];
|
|
953
|
-
_c = {};
|
|
954
|
-
return [4, parseErrorBody(output.body, context)];
|
|
955
|
-
case 1:
|
|
956
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
957
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
958
|
-
_b = errorCode;
|
|
959
|
-
switch (_b) {
|
|
960
|
-
case "CloudHsmAccessDeniedException": return [3, 2];
|
|
961
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException": return [3, 2];
|
|
962
|
-
case "CloudHsmInternalFailureException": return [3, 4];
|
|
963
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException": return [3, 4];
|
|
964
|
-
case "CloudHsmInvalidRequestException": return [3, 6];
|
|
965
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException": return [3, 6];
|
|
966
|
-
case "CloudHsmResourceNotFoundException": return [3, 8];
|
|
967
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException": return [3, 8];
|
|
968
|
-
case "CloudHsmServiceException": return [3, 10];
|
|
969
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException": return [3, 10];
|
|
970
|
-
}
|
|
971
|
-
return [3, 12];
|
|
972
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context)];
|
|
973
|
-
case 3: throw _d.sent();
|
|
974
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context)];
|
|
975
|
-
case 5: throw _d.sent();
|
|
976
|
-
case 6: return [4, deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context)];
|
|
977
|
-
case 7: throw _d.sent();
|
|
978
|
-
case 8: return [4, deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
979
|
-
case 9: throw _d.sent();
|
|
980
|
-
case 10: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
981
|
-
case 11: throw _d.sent();
|
|
982
|
-
case 12:
|
|
983
|
-
parsedBody = parsedOutput.body;
|
|
984
|
-
throwDefaultError({
|
|
985
|
-
output: output,
|
|
986
|
-
parsedBody: parsedBody,
|
|
987
|
-
exceptionCtor: __BaseException,
|
|
988
|
-
errorCode: errorCode,
|
|
989
|
-
});
|
|
990
|
-
_d.label = 13;
|
|
991
|
-
case 13: return [2];
|
|
992
|
-
}
|
|
993
|
-
});
|
|
994
|
-
}); };
|
|
995
|
-
export var deserializeAws_json1_1RestoreBackupCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
996
|
-
var data, contents, response;
|
|
997
|
-
return __generator(this, function (_a) {
|
|
998
|
-
switch (_a.label) {
|
|
999
|
-
case 0:
|
|
1000
|
-
if (output.statusCode >= 300) {
|
|
1001
|
-
return [2, deserializeAws_json1_1RestoreBackupCommandError(output, context)];
|
|
1002
|
-
}
|
|
1003
|
-
return [4, parseBody(output.body, context)];
|
|
1004
|
-
case 1:
|
|
1005
|
-
data = _a.sent();
|
|
1006
|
-
contents = {};
|
|
1007
|
-
contents = deserializeAws_json1_1RestoreBackupResponse(data, context);
|
|
1008
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1009
|
-
return [2, Promise.resolve(response)];
|
|
1010
|
-
}
|
|
1011
|
-
});
|
|
1012
|
-
}); };
|
|
1013
|
-
var deserializeAws_json1_1RestoreBackupCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1014
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1015
|
-
var _c;
|
|
1016
|
-
return __generator(this, function (_d) {
|
|
1017
|
-
switch (_d.label) {
|
|
1018
|
-
case 0:
|
|
1019
|
-
_a = [__assign({}, output)];
|
|
1020
|
-
_c = {};
|
|
1021
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1022
|
-
case 1:
|
|
1023
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1024
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1025
|
-
_b = errorCode;
|
|
1026
|
-
switch (_b) {
|
|
1027
|
-
case "CloudHsmAccessDeniedException": return [3, 2];
|
|
1028
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException": return [3, 2];
|
|
1029
|
-
case "CloudHsmInternalFailureException": return [3, 4];
|
|
1030
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException": return [3, 4];
|
|
1031
|
-
case "CloudHsmInvalidRequestException": return [3, 6];
|
|
1032
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException": return [3, 6];
|
|
1033
|
-
case "CloudHsmResourceNotFoundException": return [3, 8];
|
|
1034
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException": return [3, 8];
|
|
1035
|
-
case "CloudHsmServiceException": return [3, 10];
|
|
1036
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException": return [3, 10];
|
|
1037
|
-
}
|
|
1038
|
-
return [3, 12];
|
|
1039
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1040
|
-
case 3: throw _d.sent();
|
|
1041
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context)];
|
|
1042
|
-
case 5: throw _d.sent();
|
|
1043
|
-
case 6: return [4, deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1044
|
-
case 7: throw _d.sent();
|
|
1045
|
-
case 8: return [4, deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1046
|
-
case 9: throw _d.sent();
|
|
1047
|
-
case 10: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1048
|
-
case 11: throw _d.sent();
|
|
1049
|
-
case 12:
|
|
1050
|
-
parsedBody = parsedOutput.body;
|
|
1051
|
-
throwDefaultError({
|
|
1052
|
-
output: output,
|
|
1053
|
-
parsedBody: parsedBody,
|
|
1054
|
-
exceptionCtor: __BaseException,
|
|
1055
|
-
errorCode: errorCode,
|
|
1056
|
-
});
|
|
1057
|
-
_d.label = 13;
|
|
1058
|
-
case 13: return [2];
|
|
1059
|
-
}
|
|
1060
|
-
});
|
|
1061
|
-
}); };
|
|
1062
|
-
export var deserializeAws_json1_1TagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1063
|
-
var data, contents, response;
|
|
1064
|
-
return __generator(this, function (_a) {
|
|
1065
|
-
switch (_a.label) {
|
|
1066
|
-
case 0:
|
|
1067
|
-
if (output.statusCode >= 300) {
|
|
1068
|
-
return [2, deserializeAws_json1_1TagResourceCommandError(output, context)];
|
|
1069
|
-
}
|
|
1070
|
-
return [4, parseBody(output.body, context)];
|
|
1071
|
-
case 1:
|
|
1072
|
-
data = _a.sent();
|
|
1073
|
-
contents = {};
|
|
1074
|
-
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
1075
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1076
|
-
return [2, Promise.resolve(response)];
|
|
1077
|
-
}
|
|
1078
|
-
});
|
|
1079
|
-
}); };
|
|
1080
|
-
var deserializeAws_json1_1TagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1081
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1082
|
-
var _c;
|
|
1083
|
-
return __generator(this, function (_d) {
|
|
1084
|
-
switch (_d.label) {
|
|
1085
|
-
case 0:
|
|
1086
|
-
_a = [__assign({}, output)];
|
|
1087
|
-
_c = {};
|
|
1088
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1089
|
-
case 1:
|
|
1090
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1091
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1092
|
-
_b = errorCode;
|
|
1093
|
-
switch (_b) {
|
|
1094
|
-
case "CloudHsmAccessDeniedException": return [3, 2];
|
|
1095
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException": return [3, 2];
|
|
1096
|
-
case "CloudHsmInternalFailureException": return [3, 4];
|
|
1097
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException": return [3, 4];
|
|
1098
|
-
case "CloudHsmInvalidRequestException": return [3, 6];
|
|
1099
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException": return [3, 6];
|
|
1100
|
-
case "CloudHsmResourceNotFoundException": return [3, 8];
|
|
1101
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException": return [3, 8];
|
|
1102
|
-
case "CloudHsmServiceException": return [3, 10];
|
|
1103
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException": return [3, 10];
|
|
1104
|
-
case "CloudHsmTagException": return [3, 12];
|
|
1105
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmTagException": return [3, 12];
|
|
1106
|
-
}
|
|
1107
|
-
return [3, 14];
|
|
1108
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1109
|
-
case 3: throw _d.sent();
|
|
1110
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context)];
|
|
1111
|
-
case 5: throw _d.sent();
|
|
1112
|
-
case 6: return [4, deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1113
|
-
case 7: throw _d.sent();
|
|
1114
|
-
case 8: return [4, deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1115
|
-
case 9: throw _d.sent();
|
|
1116
|
-
case 10: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1117
|
-
case 11: throw _d.sent();
|
|
1118
|
-
case 12: return [4, deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context)];
|
|
1119
|
-
case 13: throw _d.sent();
|
|
1120
|
-
case 14:
|
|
1121
|
-
parsedBody = parsedOutput.body;
|
|
1122
|
-
throwDefaultError({
|
|
1123
|
-
output: output,
|
|
1124
|
-
parsedBody: parsedBody,
|
|
1125
|
-
exceptionCtor: __BaseException,
|
|
1126
|
-
errorCode: errorCode,
|
|
1127
|
-
});
|
|
1128
|
-
_d.label = 15;
|
|
1129
|
-
case 15: return [2];
|
|
1130
|
-
}
|
|
1131
|
-
});
|
|
1132
|
-
}); };
|
|
1133
|
-
export var deserializeAws_json1_1UntagResourceCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1134
|
-
var data, contents, response;
|
|
1135
|
-
return __generator(this, function (_a) {
|
|
1136
|
-
switch (_a.label) {
|
|
1137
|
-
case 0:
|
|
1138
|
-
if (output.statusCode >= 300) {
|
|
1139
|
-
return [2, deserializeAws_json1_1UntagResourceCommandError(output, context)];
|
|
1140
|
-
}
|
|
1141
|
-
return [4, parseBody(output.body, context)];
|
|
1142
|
-
case 1:
|
|
1143
|
-
data = _a.sent();
|
|
1144
|
-
contents = {};
|
|
1145
|
-
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
1146
|
-
response = __assign({ $metadata: deserializeMetadata(output) }, contents);
|
|
1147
|
-
return [2, Promise.resolve(response)];
|
|
1148
|
-
}
|
|
1149
|
-
});
|
|
1150
|
-
}); };
|
|
1151
|
-
var deserializeAws_json1_1UntagResourceCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1152
|
-
var parsedOutput, _a, errorCode, _b, parsedBody;
|
|
1153
|
-
var _c;
|
|
1154
|
-
return __generator(this, function (_d) {
|
|
1155
|
-
switch (_d.label) {
|
|
1156
|
-
case 0:
|
|
1157
|
-
_a = [__assign({}, output)];
|
|
1158
|
-
_c = {};
|
|
1159
|
-
return [4, parseErrorBody(output.body, context)];
|
|
1160
|
-
case 1:
|
|
1161
|
-
parsedOutput = __assign.apply(void 0, _a.concat([(_c.body = _d.sent(), _c)]));
|
|
1162
|
-
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1163
|
-
_b = errorCode;
|
|
1164
|
-
switch (_b) {
|
|
1165
|
-
case "CloudHsmAccessDeniedException": return [3, 2];
|
|
1166
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException": return [3, 2];
|
|
1167
|
-
case "CloudHsmInternalFailureException": return [3, 4];
|
|
1168
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException": return [3, 4];
|
|
1169
|
-
case "CloudHsmInvalidRequestException": return [3, 6];
|
|
1170
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException": return [3, 6];
|
|
1171
|
-
case "CloudHsmResourceNotFoundException": return [3, 8];
|
|
1172
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException": return [3, 8];
|
|
1173
|
-
case "CloudHsmServiceException": return [3, 10];
|
|
1174
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException": return [3, 10];
|
|
1175
|
-
case "CloudHsmTagException": return [3, 12];
|
|
1176
|
-
case "com.amazonaws.cloudhsmv2#CloudHsmTagException": return [3, 12];
|
|
1177
|
-
}
|
|
1178
|
-
return [3, 14];
|
|
1179
|
-
case 2: return [4, deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context)];
|
|
1180
|
-
case 3: throw _d.sent();
|
|
1181
|
-
case 4: return [4, deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context)];
|
|
1182
|
-
case 5: throw _d.sent();
|
|
1183
|
-
case 6: return [4, deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context)];
|
|
1184
|
-
case 7: throw _d.sent();
|
|
1185
|
-
case 8: return [4, deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context)];
|
|
1186
|
-
case 9: throw _d.sent();
|
|
1187
|
-
case 10: return [4, deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context)];
|
|
1188
|
-
case 11: throw _d.sent();
|
|
1189
|
-
case 12: return [4, deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context)];
|
|
1190
|
-
case 13: throw _d.sent();
|
|
1191
|
-
case 14:
|
|
1192
|
-
parsedBody = parsedOutput.body;
|
|
1193
|
-
throwDefaultError({
|
|
1194
|
-
output: output,
|
|
1195
|
-
parsedBody: parsedBody,
|
|
1196
|
-
exceptionCtor: __BaseException,
|
|
1197
|
-
errorCode: errorCode,
|
|
1198
|
-
});
|
|
1199
|
-
_d.label = 15;
|
|
1200
|
-
case 15: return [2];
|
|
1201
|
-
}
|
|
1202
|
-
});
|
|
1203
|
-
}); };
|
|
1204
|
-
var deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
|
|
1205
|
-
var body, deserialized, exception;
|
|
1206
|
-
return __generator(this, function (_a) {
|
|
1207
|
-
body = parsedOutput.body;
|
|
1208
|
-
deserialized = deserializeAws_json1_1CloudHsmAccessDeniedException(body, context);
|
|
1209
|
-
exception = new CloudHsmAccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, deserialized));
|
|
1210
|
-
return [2, __decorateServiceException(exception, body)];
|
|
5
|
+
export const serializeAws_json1_1CopyBackupToRegionCommand = async (input, context) => {
|
|
6
|
+
const headers = {
|
|
7
|
+
"content-type": "application/x-amz-json-1.1",
|
|
8
|
+
"x-amz-target": "BaldrApiService.CopyBackupToRegion",
|
|
9
|
+
};
|
|
10
|
+
let body;
|
|
11
|
+
body = JSON.stringify(serializeAws_json1_1CopyBackupToRegionRequest(input, context));
|
|
12
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
13
|
+
};
|
|
14
|
+
export const serializeAws_json1_1CreateClusterCommand = async (input, context) => {
|
|
15
|
+
const headers = {
|
|
16
|
+
"content-type": "application/x-amz-json-1.1",
|
|
17
|
+
"x-amz-target": "BaldrApiService.CreateCluster",
|
|
18
|
+
};
|
|
19
|
+
let body;
|
|
20
|
+
body = JSON.stringify(serializeAws_json1_1CreateClusterRequest(input, context));
|
|
21
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
22
|
+
};
|
|
23
|
+
export const serializeAws_json1_1CreateHsmCommand = async (input, context) => {
|
|
24
|
+
const headers = {
|
|
25
|
+
"content-type": "application/x-amz-json-1.1",
|
|
26
|
+
"x-amz-target": "BaldrApiService.CreateHsm",
|
|
27
|
+
};
|
|
28
|
+
let body;
|
|
29
|
+
body = JSON.stringify(serializeAws_json1_1CreateHsmRequest(input, context));
|
|
30
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
31
|
+
};
|
|
32
|
+
export const serializeAws_json1_1DeleteBackupCommand = async (input, context) => {
|
|
33
|
+
const headers = {
|
|
34
|
+
"content-type": "application/x-amz-json-1.1",
|
|
35
|
+
"x-amz-target": "BaldrApiService.DeleteBackup",
|
|
36
|
+
};
|
|
37
|
+
let body;
|
|
38
|
+
body = JSON.stringify(serializeAws_json1_1DeleteBackupRequest(input, context));
|
|
39
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
40
|
+
};
|
|
41
|
+
export const serializeAws_json1_1DeleteClusterCommand = async (input, context) => {
|
|
42
|
+
const headers = {
|
|
43
|
+
"content-type": "application/x-amz-json-1.1",
|
|
44
|
+
"x-amz-target": "BaldrApiService.DeleteCluster",
|
|
45
|
+
};
|
|
46
|
+
let body;
|
|
47
|
+
body = JSON.stringify(serializeAws_json1_1DeleteClusterRequest(input, context));
|
|
48
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
49
|
+
};
|
|
50
|
+
export const serializeAws_json1_1DeleteHsmCommand = async (input, context) => {
|
|
51
|
+
const headers = {
|
|
52
|
+
"content-type": "application/x-amz-json-1.1",
|
|
53
|
+
"x-amz-target": "BaldrApiService.DeleteHsm",
|
|
54
|
+
};
|
|
55
|
+
let body;
|
|
56
|
+
body = JSON.stringify(serializeAws_json1_1DeleteHsmRequest(input, context));
|
|
57
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
58
|
+
};
|
|
59
|
+
export const serializeAws_json1_1DescribeBackupsCommand = async (input, context) => {
|
|
60
|
+
const headers = {
|
|
61
|
+
"content-type": "application/x-amz-json-1.1",
|
|
62
|
+
"x-amz-target": "BaldrApiService.DescribeBackups",
|
|
63
|
+
};
|
|
64
|
+
let body;
|
|
65
|
+
body = JSON.stringify(serializeAws_json1_1DescribeBackupsRequest(input, context));
|
|
66
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
|
+
};
|
|
68
|
+
export const serializeAws_json1_1DescribeClustersCommand = async (input, context) => {
|
|
69
|
+
const headers = {
|
|
70
|
+
"content-type": "application/x-amz-json-1.1",
|
|
71
|
+
"x-amz-target": "BaldrApiService.DescribeClusters",
|
|
72
|
+
};
|
|
73
|
+
let body;
|
|
74
|
+
body = JSON.stringify(serializeAws_json1_1DescribeClustersRequest(input, context));
|
|
75
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
76
|
+
};
|
|
77
|
+
export const serializeAws_json1_1InitializeClusterCommand = async (input, context) => {
|
|
78
|
+
const headers = {
|
|
79
|
+
"content-type": "application/x-amz-json-1.1",
|
|
80
|
+
"x-amz-target": "BaldrApiService.InitializeCluster",
|
|
81
|
+
};
|
|
82
|
+
let body;
|
|
83
|
+
body = JSON.stringify(serializeAws_json1_1InitializeClusterRequest(input, context));
|
|
84
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
85
|
+
};
|
|
86
|
+
export const serializeAws_json1_1ListTagsCommand = async (input, context) => {
|
|
87
|
+
const headers = {
|
|
88
|
+
"content-type": "application/x-amz-json-1.1",
|
|
89
|
+
"x-amz-target": "BaldrApiService.ListTags",
|
|
90
|
+
};
|
|
91
|
+
let body;
|
|
92
|
+
body = JSON.stringify(serializeAws_json1_1ListTagsRequest(input, context));
|
|
93
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
94
|
+
};
|
|
95
|
+
export const serializeAws_json1_1ModifyBackupAttributesCommand = async (input, context) => {
|
|
96
|
+
const headers = {
|
|
97
|
+
"content-type": "application/x-amz-json-1.1",
|
|
98
|
+
"x-amz-target": "BaldrApiService.ModifyBackupAttributes",
|
|
99
|
+
};
|
|
100
|
+
let body;
|
|
101
|
+
body = JSON.stringify(serializeAws_json1_1ModifyBackupAttributesRequest(input, context));
|
|
102
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
103
|
+
};
|
|
104
|
+
export const serializeAws_json1_1ModifyClusterCommand = async (input, context) => {
|
|
105
|
+
const headers = {
|
|
106
|
+
"content-type": "application/x-amz-json-1.1",
|
|
107
|
+
"x-amz-target": "BaldrApiService.ModifyCluster",
|
|
108
|
+
};
|
|
109
|
+
let body;
|
|
110
|
+
body = JSON.stringify(serializeAws_json1_1ModifyClusterRequest(input, context));
|
|
111
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
112
|
+
};
|
|
113
|
+
export const serializeAws_json1_1RestoreBackupCommand = async (input, context) => {
|
|
114
|
+
const headers = {
|
|
115
|
+
"content-type": "application/x-amz-json-1.1",
|
|
116
|
+
"x-amz-target": "BaldrApiService.RestoreBackup",
|
|
117
|
+
};
|
|
118
|
+
let body;
|
|
119
|
+
body = JSON.stringify(serializeAws_json1_1RestoreBackupRequest(input, context));
|
|
120
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
121
|
+
};
|
|
122
|
+
export const serializeAws_json1_1TagResourceCommand = async (input, context) => {
|
|
123
|
+
const headers = {
|
|
124
|
+
"content-type": "application/x-amz-json-1.1",
|
|
125
|
+
"x-amz-target": "BaldrApiService.TagResource",
|
|
126
|
+
};
|
|
127
|
+
let body;
|
|
128
|
+
body = JSON.stringify(serializeAws_json1_1TagResourceRequest(input, context));
|
|
129
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
130
|
+
};
|
|
131
|
+
export const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
|
|
132
|
+
const headers = {
|
|
133
|
+
"content-type": "application/x-amz-json-1.1",
|
|
134
|
+
"x-amz-target": "BaldrApiService.UntagResource",
|
|
135
|
+
};
|
|
136
|
+
let body;
|
|
137
|
+
body = JSON.stringify(serializeAws_json1_1UntagResourceRequest(input, context));
|
|
138
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
139
|
+
};
|
|
140
|
+
export const deserializeAws_json1_1CopyBackupToRegionCommand = async (output, context) => {
|
|
141
|
+
if (output.statusCode >= 300) {
|
|
142
|
+
return deserializeAws_json1_1CopyBackupToRegionCommandError(output, context);
|
|
143
|
+
}
|
|
144
|
+
const data = await parseBody(output.body, context);
|
|
145
|
+
let contents = {};
|
|
146
|
+
contents = deserializeAws_json1_1CopyBackupToRegionResponse(data, context);
|
|
147
|
+
const response = {
|
|
148
|
+
$metadata: deserializeMetadata(output),
|
|
149
|
+
...contents,
|
|
150
|
+
};
|
|
151
|
+
return Promise.resolve(response);
|
|
152
|
+
};
|
|
153
|
+
const deserializeAws_json1_1CopyBackupToRegionCommandError = async (output, context) => {
|
|
154
|
+
const parsedOutput = {
|
|
155
|
+
...output,
|
|
156
|
+
body: await parseErrorBody(output.body, context),
|
|
157
|
+
};
|
|
158
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
159
|
+
switch (errorCode) {
|
|
160
|
+
case "CloudHsmAccessDeniedException":
|
|
161
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
162
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
163
|
+
case "CloudHsmInternalFailureException":
|
|
164
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
165
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
166
|
+
case "CloudHsmInvalidRequestException":
|
|
167
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
168
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
169
|
+
case "CloudHsmResourceNotFoundException":
|
|
170
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
171
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
172
|
+
case "CloudHsmServiceException":
|
|
173
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
174
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
175
|
+
case "CloudHsmTagException":
|
|
176
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
177
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
178
|
+
default:
|
|
179
|
+
const parsedBody = parsedOutput.body;
|
|
180
|
+
throwDefaultError({
|
|
181
|
+
output,
|
|
182
|
+
parsedBody,
|
|
183
|
+
exceptionCtor: __BaseException,
|
|
184
|
+
errorCode,
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
export const deserializeAws_json1_1CreateClusterCommand = async (output, context) => {
|
|
189
|
+
if (output.statusCode >= 300) {
|
|
190
|
+
return deserializeAws_json1_1CreateClusterCommandError(output, context);
|
|
191
|
+
}
|
|
192
|
+
const data = await parseBody(output.body, context);
|
|
193
|
+
let contents = {};
|
|
194
|
+
contents = deserializeAws_json1_1CreateClusterResponse(data, context);
|
|
195
|
+
const response = {
|
|
196
|
+
$metadata: deserializeMetadata(output),
|
|
197
|
+
...contents,
|
|
198
|
+
};
|
|
199
|
+
return Promise.resolve(response);
|
|
200
|
+
};
|
|
201
|
+
const deserializeAws_json1_1CreateClusterCommandError = async (output, context) => {
|
|
202
|
+
const parsedOutput = {
|
|
203
|
+
...output,
|
|
204
|
+
body: await parseErrorBody(output.body, context),
|
|
205
|
+
};
|
|
206
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
207
|
+
switch (errorCode) {
|
|
208
|
+
case "CloudHsmAccessDeniedException":
|
|
209
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
210
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
211
|
+
case "CloudHsmInternalFailureException":
|
|
212
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
213
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
214
|
+
case "CloudHsmInvalidRequestException":
|
|
215
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
216
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
217
|
+
case "CloudHsmResourceNotFoundException":
|
|
218
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
219
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
220
|
+
case "CloudHsmServiceException":
|
|
221
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
222
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
223
|
+
case "CloudHsmTagException":
|
|
224
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
225
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
226
|
+
default:
|
|
227
|
+
const parsedBody = parsedOutput.body;
|
|
228
|
+
throwDefaultError({
|
|
229
|
+
output,
|
|
230
|
+
parsedBody,
|
|
231
|
+
exceptionCtor: __BaseException,
|
|
232
|
+
errorCode,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
export const deserializeAws_json1_1CreateHsmCommand = async (output, context) => {
|
|
237
|
+
if (output.statusCode >= 300) {
|
|
238
|
+
return deserializeAws_json1_1CreateHsmCommandError(output, context);
|
|
239
|
+
}
|
|
240
|
+
const data = await parseBody(output.body, context);
|
|
241
|
+
let contents = {};
|
|
242
|
+
contents = deserializeAws_json1_1CreateHsmResponse(data, context);
|
|
243
|
+
const response = {
|
|
244
|
+
$metadata: deserializeMetadata(output),
|
|
245
|
+
...contents,
|
|
246
|
+
};
|
|
247
|
+
return Promise.resolve(response);
|
|
248
|
+
};
|
|
249
|
+
const deserializeAws_json1_1CreateHsmCommandError = async (output, context) => {
|
|
250
|
+
const parsedOutput = {
|
|
251
|
+
...output,
|
|
252
|
+
body: await parseErrorBody(output.body, context),
|
|
253
|
+
};
|
|
254
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
255
|
+
switch (errorCode) {
|
|
256
|
+
case "CloudHsmAccessDeniedException":
|
|
257
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
258
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
259
|
+
case "CloudHsmInternalFailureException":
|
|
260
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
261
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
262
|
+
case "CloudHsmInvalidRequestException":
|
|
263
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
264
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
265
|
+
case "CloudHsmResourceNotFoundException":
|
|
266
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
267
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
268
|
+
case "CloudHsmServiceException":
|
|
269
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
270
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
271
|
+
default:
|
|
272
|
+
const parsedBody = parsedOutput.body;
|
|
273
|
+
throwDefaultError({
|
|
274
|
+
output,
|
|
275
|
+
parsedBody,
|
|
276
|
+
exceptionCtor: __BaseException,
|
|
277
|
+
errorCode,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
export const deserializeAws_json1_1DeleteBackupCommand = async (output, context) => {
|
|
282
|
+
if (output.statusCode >= 300) {
|
|
283
|
+
return deserializeAws_json1_1DeleteBackupCommandError(output, context);
|
|
284
|
+
}
|
|
285
|
+
const data = await parseBody(output.body, context);
|
|
286
|
+
let contents = {};
|
|
287
|
+
contents = deserializeAws_json1_1DeleteBackupResponse(data, context);
|
|
288
|
+
const response = {
|
|
289
|
+
$metadata: deserializeMetadata(output),
|
|
290
|
+
...contents,
|
|
291
|
+
};
|
|
292
|
+
return Promise.resolve(response);
|
|
293
|
+
};
|
|
294
|
+
const deserializeAws_json1_1DeleteBackupCommandError = async (output, context) => {
|
|
295
|
+
const parsedOutput = {
|
|
296
|
+
...output,
|
|
297
|
+
body: await parseErrorBody(output.body, context),
|
|
298
|
+
};
|
|
299
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
300
|
+
switch (errorCode) {
|
|
301
|
+
case "CloudHsmAccessDeniedException":
|
|
302
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
303
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
304
|
+
case "CloudHsmInternalFailureException":
|
|
305
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
306
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
307
|
+
case "CloudHsmInvalidRequestException":
|
|
308
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
309
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
310
|
+
case "CloudHsmResourceNotFoundException":
|
|
311
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
312
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
313
|
+
case "CloudHsmServiceException":
|
|
314
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
315
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
316
|
+
default:
|
|
317
|
+
const parsedBody = parsedOutput.body;
|
|
318
|
+
throwDefaultError({
|
|
319
|
+
output,
|
|
320
|
+
parsedBody,
|
|
321
|
+
exceptionCtor: __BaseException,
|
|
322
|
+
errorCode,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
export const deserializeAws_json1_1DeleteClusterCommand = async (output, context) => {
|
|
327
|
+
if (output.statusCode >= 300) {
|
|
328
|
+
return deserializeAws_json1_1DeleteClusterCommandError(output, context);
|
|
329
|
+
}
|
|
330
|
+
const data = await parseBody(output.body, context);
|
|
331
|
+
let contents = {};
|
|
332
|
+
contents = deserializeAws_json1_1DeleteClusterResponse(data, context);
|
|
333
|
+
const response = {
|
|
334
|
+
$metadata: deserializeMetadata(output),
|
|
335
|
+
...contents,
|
|
336
|
+
};
|
|
337
|
+
return Promise.resolve(response);
|
|
338
|
+
};
|
|
339
|
+
const deserializeAws_json1_1DeleteClusterCommandError = async (output, context) => {
|
|
340
|
+
const parsedOutput = {
|
|
341
|
+
...output,
|
|
342
|
+
body: await parseErrorBody(output.body, context),
|
|
343
|
+
};
|
|
344
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
345
|
+
switch (errorCode) {
|
|
346
|
+
case "CloudHsmAccessDeniedException":
|
|
347
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
348
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
349
|
+
case "CloudHsmInternalFailureException":
|
|
350
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
351
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
352
|
+
case "CloudHsmInvalidRequestException":
|
|
353
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
354
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
355
|
+
case "CloudHsmResourceNotFoundException":
|
|
356
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
357
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
358
|
+
case "CloudHsmServiceException":
|
|
359
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
360
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
361
|
+
case "CloudHsmTagException":
|
|
362
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
363
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
364
|
+
default:
|
|
365
|
+
const parsedBody = parsedOutput.body;
|
|
366
|
+
throwDefaultError({
|
|
367
|
+
output,
|
|
368
|
+
parsedBody,
|
|
369
|
+
exceptionCtor: __BaseException,
|
|
370
|
+
errorCode,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
export const deserializeAws_json1_1DeleteHsmCommand = async (output, context) => {
|
|
375
|
+
if (output.statusCode >= 300) {
|
|
376
|
+
return deserializeAws_json1_1DeleteHsmCommandError(output, context);
|
|
377
|
+
}
|
|
378
|
+
const data = await parseBody(output.body, context);
|
|
379
|
+
let contents = {};
|
|
380
|
+
contents = deserializeAws_json1_1DeleteHsmResponse(data, context);
|
|
381
|
+
const response = {
|
|
382
|
+
$metadata: deserializeMetadata(output),
|
|
383
|
+
...contents,
|
|
384
|
+
};
|
|
385
|
+
return Promise.resolve(response);
|
|
386
|
+
};
|
|
387
|
+
const deserializeAws_json1_1DeleteHsmCommandError = async (output, context) => {
|
|
388
|
+
const parsedOutput = {
|
|
389
|
+
...output,
|
|
390
|
+
body: await parseErrorBody(output.body, context),
|
|
391
|
+
};
|
|
392
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
393
|
+
switch (errorCode) {
|
|
394
|
+
case "CloudHsmAccessDeniedException":
|
|
395
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
396
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
397
|
+
case "CloudHsmInternalFailureException":
|
|
398
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
399
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
400
|
+
case "CloudHsmInvalidRequestException":
|
|
401
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
402
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
403
|
+
case "CloudHsmResourceNotFoundException":
|
|
404
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
405
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
406
|
+
case "CloudHsmServiceException":
|
|
407
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
408
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
409
|
+
default:
|
|
410
|
+
const parsedBody = parsedOutput.body;
|
|
411
|
+
throwDefaultError({
|
|
412
|
+
output,
|
|
413
|
+
parsedBody,
|
|
414
|
+
exceptionCtor: __BaseException,
|
|
415
|
+
errorCode,
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
export const deserializeAws_json1_1DescribeBackupsCommand = async (output, context) => {
|
|
420
|
+
if (output.statusCode >= 300) {
|
|
421
|
+
return deserializeAws_json1_1DescribeBackupsCommandError(output, context);
|
|
422
|
+
}
|
|
423
|
+
const data = await parseBody(output.body, context);
|
|
424
|
+
let contents = {};
|
|
425
|
+
contents = deserializeAws_json1_1DescribeBackupsResponse(data, context);
|
|
426
|
+
const response = {
|
|
427
|
+
$metadata: deserializeMetadata(output),
|
|
428
|
+
...contents,
|
|
429
|
+
};
|
|
430
|
+
return Promise.resolve(response);
|
|
431
|
+
};
|
|
432
|
+
const deserializeAws_json1_1DescribeBackupsCommandError = async (output, context) => {
|
|
433
|
+
const parsedOutput = {
|
|
434
|
+
...output,
|
|
435
|
+
body: await parseErrorBody(output.body, context),
|
|
436
|
+
};
|
|
437
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
438
|
+
switch (errorCode) {
|
|
439
|
+
case "CloudHsmAccessDeniedException":
|
|
440
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
441
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
442
|
+
case "CloudHsmInternalFailureException":
|
|
443
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
444
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
445
|
+
case "CloudHsmInvalidRequestException":
|
|
446
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
447
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
448
|
+
case "CloudHsmResourceNotFoundException":
|
|
449
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
450
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
451
|
+
case "CloudHsmServiceException":
|
|
452
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
453
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
454
|
+
case "CloudHsmTagException":
|
|
455
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
456
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
457
|
+
default:
|
|
458
|
+
const parsedBody = parsedOutput.body;
|
|
459
|
+
throwDefaultError({
|
|
460
|
+
output,
|
|
461
|
+
parsedBody,
|
|
462
|
+
exceptionCtor: __BaseException,
|
|
463
|
+
errorCode,
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
};
|
|
467
|
+
export const deserializeAws_json1_1DescribeClustersCommand = async (output, context) => {
|
|
468
|
+
if (output.statusCode >= 300) {
|
|
469
|
+
return deserializeAws_json1_1DescribeClustersCommandError(output, context);
|
|
470
|
+
}
|
|
471
|
+
const data = await parseBody(output.body, context);
|
|
472
|
+
let contents = {};
|
|
473
|
+
contents = deserializeAws_json1_1DescribeClustersResponse(data, context);
|
|
474
|
+
const response = {
|
|
475
|
+
$metadata: deserializeMetadata(output),
|
|
476
|
+
...contents,
|
|
477
|
+
};
|
|
478
|
+
return Promise.resolve(response);
|
|
479
|
+
};
|
|
480
|
+
const deserializeAws_json1_1DescribeClustersCommandError = async (output, context) => {
|
|
481
|
+
const parsedOutput = {
|
|
482
|
+
...output,
|
|
483
|
+
body: await parseErrorBody(output.body, context),
|
|
484
|
+
};
|
|
485
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
486
|
+
switch (errorCode) {
|
|
487
|
+
case "CloudHsmAccessDeniedException":
|
|
488
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
489
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
490
|
+
case "CloudHsmInternalFailureException":
|
|
491
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
492
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
493
|
+
case "CloudHsmInvalidRequestException":
|
|
494
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
495
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
496
|
+
case "CloudHsmServiceException":
|
|
497
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
498
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
499
|
+
case "CloudHsmTagException":
|
|
500
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
501
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
502
|
+
default:
|
|
503
|
+
const parsedBody = parsedOutput.body;
|
|
504
|
+
throwDefaultError({
|
|
505
|
+
output,
|
|
506
|
+
parsedBody,
|
|
507
|
+
exceptionCtor: __BaseException,
|
|
508
|
+
errorCode,
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
};
|
|
512
|
+
export const deserializeAws_json1_1InitializeClusterCommand = async (output, context) => {
|
|
513
|
+
if (output.statusCode >= 300) {
|
|
514
|
+
return deserializeAws_json1_1InitializeClusterCommandError(output, context);
|
|
515
|
+
}
|
|
516
|
+
const data = await parseBody(output.body, context);
|
|
517
|
+
let contents = {};
|
|
518
|
+
contents = deserializeAws_json1_1InitializeClusterResponse(data, context);
|
|
519
|
+
const response = {
|
|
520
|
+
$metadata: deserializeMetadata(output),
|
|
521
|
+
...contents,
|
|
522
|
+
};
|
|
523
|
+
return Promise.resolve(response);
|
|
524
|
+
};
|
|
525
|
+
const deserializeAws_json1_1InitializeClusterCommandError = async (output, context) => {
|
|
526
|
+
const parsedOutput = {
|
|
527
|
+
...output,
|
|
528
|
+
body: await parseErrorBody(output.body, context),
|
|
529
|
+
};
|
|
530
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
531
|
+
switch (errorCode) {
|
|
532
|
+
case "CloudHsmAccessDeniedException":
|
|
533
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
534
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
535
|
+
case "CloudHsmInternalFailureException":
|
|
536
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
537
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
538
|
+
case "CloudHsmInvalidRequestException":
|
|
539
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
540
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
541
|
+
case "CloudHsmResourceNotFoundException":
|
|
542
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
543
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
544
|
+
case "CloudHsmServiceException":
|
|
545
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
546
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
547
|
+
default:
|
|
548
|
+
const parsedBody = parsedOutput.body;
|
|
549
|
+
throwDefaultError({
|
|
550
|
+
output,
|
|
551
|
+
parsedBody,
|
|
552
|
+
exceptionCtor: __BaseException,
|
|
553
|
+
errorCode,
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
export const deserializeAws_json1_1ListTagsCommand = async (output, context) => {
|
|
558
|
+
if (output.statusCode >= 300) {
|
|
559
|
+
return deserializeAws_json1_1ListTagsCommandError(output, context);
|
|
560
|
+
}
|
|
561
|
+
const data = await parseBody(output.body, context);
|
|
562
|
+
let contents = {};
|
|
563
|
+
contents = deserializeAws_json1_1ListTagsResponse(data, context);
|
|
564
|
+
const response = {
|
|
565
|
+
$metadata: deserializeMetadata(output),
|
|
566
|
+
...contents,
|
|
567
|
+
};
|
|
568
|
+
return Promise.resolve(response);
|
|
569
|
+
};
|
|
570
|
+
const deserializeAws_json1_1ListTagsCommandError = async (output, context) => {
|
|
571
|
+
const parsedOutput = {
|
|
572
|
+
...output,
|
|
573
|
+
body: await parseErrorBody(output.body, context),
|
|
574
|
+
};
|
|
575
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
576
|
+
switch (errorCode) {
|
|
577
|
+
case "CloudHsmAccessDeniedException":
|
|
578
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
579
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
580
|
+
case "CloudHsmInternalFailureException":
|
|
581
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
582
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
583
|
+
case "CloudHsmInvalidRequestException":
|
|
584
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
585
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
586
|
+
case "CloudHsmResourceNotFoundException":
|
|
587
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
588
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
589
|
+
case "CloudHsmServiceException":
|
|
590
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
591
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
592
|
+
case "CloudHsmTagException":
|
|
593
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
594
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
595
|
+
default:
|
|
596
|
+
const parsedBody = parsedOutput.body;
|
|
597
|
+
throwDefaultError({
|
|
598
|
+
output,
|
|
599
|
+
parsedBody,
|
|
600
|
+
exceptionCtor: __BaseException,
|
|
601
|
+
errorCode,
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
export const deserializeAws_json1_1ModifyBackupAttributesCommand = async (output, context) => {
|
|
606
|
+
if (output.statusCode >= 300) {
|
|
607
|
+
return deserializeAws_json1_1ModifyBackupAttributesCommandError(output, context);
|
|
608
|
+
}
|
|
609
|
+
const data = await parseBody(output.body, context);
|
|
610
|
+
let contents = {};
|
|
611
|
+
contents = deserializeAws_json1_1ModifyBackupAttributesResponse(data, context);
|
|
612
|
+
const response = {
|
|
613
|
+
$metadata: deserializeMetadata(output),
|
|
614
|
+
...contents,
|
|
615
|
+
};
|
|
616
|
+
return Promise.resolve(response);
|
|
617
|
+
};
|
|
618
|
+
const deserializeAws_json1_1ModifyBackupAttributesCommandError = async (output, context) => {
|
|
619
|
+
const parsedOutput = {
|
|
620
|
+
...output,
|
|
621
|
+
body: await parseErrorBody(output.body, context),
|
|
622
|
+
};
|
|
623
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
624
|
+
switch (errorCode) {
|
|
625
|
+
case "CloudHsmAccessDeniedException":
|
|
626
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
627
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
628
|
+
case "CloudHsmInternalFailureException":
|
|
629
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
630
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
631
|
+
case "CloudHsmInvalidRequestException":
|
|
632
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
633
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
634
|
+
case "CloudHsmResourceNotFoundException":
|
|
635
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
636
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
637
|
+
case "CloudHsmServiceException":
|
|
638
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
639
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
640
|
+
default:
|
|
641
|
+
const parsedBody = parsedOutput.body;
|
|
642
|
+
throwDefaultError({
|
|
643
|
+
output,
|
|
644
|
+
parsedBody,
|
|
645
|
+
exceptionCtor: __BaseException,
|
|
646
|
+
errorCode,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
export const deserializeAws_json1_1ModifyClusterCommand = async (output, context) => {
|
|
651
|
+
if (output.statusCode >= 300) {
|
|
652
|
+
return deserializeAws_json1_1ModifyClusterCommandError(output, context);
|
|
653
|
+
}
|
|
654
|
+
const data = await parseBody(output.body, context);
|
|
655
|
+
let contents = {};
|
|
656
|
+
contents = deserializeAws_json1_1ModifyClusterResponse(data, context);
|
|
657
|
+
const response = {
|
|
658
|
+
$metadata: deserializeMetadata(output),
|
|
659
|
+
...contents,
|
|
660
|
+
};
|
|
661
|
+
return Promise.resolve(response);
|
|
662
|
+
};
|
|
663
|
+
const deserializeAws_json1_1ModifyClusterCommandError = async (output, context) => {
|
|
664
|
+
const parsedOutput = {
|
|
665
|
+
...output,
|
|
666
|
+
body: await parseErrorBody(output.body, context),
|
|
667
|
+
};
|
|
668
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
669
|
+
switch (errorCode) {
|
|
670
|
+
case "CloudHsmAccessDeniedException":
|
|
671
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
672
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
673
|
+
case "CloudHsmInternalFailureException":
|
|
674
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
675
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
676
|
+
case "CloudHsmInvalidRequestException":
|
|
677
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
678
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
679
|
+
case "CloudHsmResourceNotFoundException":
|
|
680
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
681
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
682
|
+
case "CloudHsmServiceException":
|
|
683
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
684
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
685
|
+
default:
|
|
686
|
+
const parsedBody = parsedOutput.body;
|
|
687
|
+
throwDefaultError({
|
|
688
|
+
output,
|
|
689
|
+
parsedBody,
|
|
690
|
+
exceptionCtor: __BaseException,
|
|
691
|
+
errorCode,
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
export const deserializeAws_json1_1RestoreBackupCommand = async (output, context) => {
|
|
696
|
+
if (output.statusCode >= 300) {
|
|
697
|
+
return deserializeAws_json1_1RestoreBackupCommandError(output, context);
|
|
698
|
+
}
|
|
699
|
+
const data = await parseBody(output.body, context);
|
|
700
|
+
let contents = {};
|
|
701
|
+
contents = deserializeAws_json1_1RestoreBackupResponse(data, context);
|
|
702
|
+
const response = {
|
|
703
|
+
$metadata: deserializeMetadata(output),
|
|
704
|
+
...contents,
|
|
705
|
+
};
|
|
706
|
+
return Promise.resolve(response);
|
|
707
|
+
};
|
|
708
|
+
const deserializeAws_json1_1RestoreBackupCommandError = async (output, context) => {
|
|
709
|
+
const parsedOutput = {
|
|
710
|
+
...output,
|
|
711
|
+
body: await parseErrorBody(output.body, context),
|
|
712
|
+
};
|
|
713
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
714
|
+
switch (errorCode) {
|
|
715
|
+
case "CloudHsmAccessDeniedException":
|
|
716
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
717
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
718
|
+
case "CloudHsmInternalFailureException":
|
|
719
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
720
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
721
|
+
case "CloudHsmInvalidRequestException":
|
|
722
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
723
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
724
|
+
case "CloudHsmResourceNotFoundException":
|
|
725
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
726
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
727
|
+
case "CloudHsmServiceException":
|
|
728
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
729
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
730
|
+
default:
|
|
731
|
+
const parsedBody = parsedOutput.body;
|
|
732
|
+
throwDefaultError({
|
|
733
|
+
output,
|
|
734
|
+
parsedBody,
|
|
735
|
+
exceptionCtor: __BaseException,
|
|
736
|
+
errorCode,
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
};
|
|
740
|
+
export const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
|
|
741
|
+
if (output.statusCode >= 300) {
|
|
742
|
+
return deserializeAws_json1_1TagResourceCommandError(output, context);
|
|
743
|
+
}
|
|
744
|
+
const data = await parseBody(output.body, context);
|
|
745
|
+
let contents = {};
|
|
746
|
+
contents = deserializeAws_json1_1TagResourceResponse(data, context);
|
|
747
|
+
const response = {
|
|
748
|
+
$metadata: deserializeMetadata(output),
|
|
749
|
+
...contents,
|
|
750
|
+
};
|
|
751
|
+
return Promise.resolve(response);
|
|
752
|
+
};
|
|
753
|
+
const deserializeAws_json1_1TagResourceCommandError = async (output, context) => {
|
|
754
|
+
const parsedOutput = {
|
|
755
|
+
...output,
|
|
756
|
+
body: await parseErrorBody(output.body, context),
|
|
757
|
+
};
|
|
758
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
759
|
+
switch (errorCode) {
|
|
760
|
+
case "CloudHsmAccessDeniedException":
|
|
761
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
762
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
763
|
+
case "CloudHsmInternalFailureException":
|
|
764
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
765
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
766
|
+
case "CloudHsmInvalidRequestException":
|
|
767
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
768
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
769
|
+
case "CloudHsmResourceNotFoundException":
|
|
770
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
771
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
772
|
+
case "CloudHsmServiceException":
|
|
773
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
774
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
775
|
+
case "CloudHsmTagException":
|
|
776
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
777
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
778
|
+
default:
|
|
779
|
+
const parsedBody = parsedOutput.body;
|
|
780
|
+
throwDefaultError({
|
|
781
|
+
output,
|
|
782
|
+
parsedBody,
|
|
783
|
+
exceptionCtor: __BaseException,
|
|
784
|
+
errorCode,
|
|
785
|
+
});
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
export const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
|
|
789
|
+
if (output.statusCode >= 300) {
|
|
790
|
+
return deserializeAws_json1_1UntagResourceCommandError(output, context);
|
|
791
|
+
}
|
|
792
|
+
const data = await parseBody(output.body, context);
|
|
793
|
+
let contents = {};
|
|
794
|
+
contents = deserializeAws_json1_1UntagResourceResponse(data, context);
|
|
795
|
+
const response = {
|
|
796
|
+
$metadata: deserializeMetadata(output),
|
|
797
|
+
...contents,
|
|
798
|
+
};
|
|
799
|
+
return Promise.resolve(response);
|
|
800
|
+
};
|
|
801
|
+
const deserializeAws_json1_1UntagResourceCommandError = async (output, context) => {
|
|
802
|
+
const parsedOutput = {
|
|
803
|
+
...output,
|
|
804
|
+
body: await parseErrorBody(output.body, context),
|
|
805
|
+
};
|
|
806
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
807
|
+
switch (errorCode) {
|
|
808
|
+
case "CloudHsmAccessDeniedException":
|
|
809
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmAccessDeniedException":
|
|
810
|
+
throw await deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse(parsedOutput, context);
|
|
811
|
+
case "CloudHsmInternalFailureException":
|
|
812
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInternalFailureException":
|
|
813
|
+
throw await deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse(parsedOutput, context);
|
|
814
|
+
case "CloudHsmInvalidRequestException":
|
|
815
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmInvalidRequestException":
|
|
816
|
+
throw await deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse(parsedOutput, context);
|
|
817
|
+
case "CloudHsmResourceNotFoundException":
|
|
818
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmResourceNotFoundException":
|
|
819
|
+
throw await deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse(parsedOutput, context);
|
|
820
|
+
case "CloudHsmServiceException":
|
|
821
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmServiceException":
|
|
822
|
+
throw await deserializeAws_json1_1CloudHsmServiceExceptionResponse(parsedOutput, context);
|
|
823
|
+
case "CloudHsmTagException":
|
|
824
|
+
case "com.amazonaws.cloudhsmv2#CloudHsmTagException":
|
|
825
|
+
throw await deserializeAws_json1_1CloudHsmTagExceptionResponse(parsedOutput, context);
|
|
826
|
+
default:
|
|
827
|
+
const parsedBody = parsedOutput.body;
|
|
828
|
+
throwDefaultError({
|
|
829
|
+
output,
|
|
830
|
+
parsedBody,
|
|
831
|
+
exceptionCtor: __BaseException,
|
|
832
|
+
errorCode,
|
|
833
|
+
});
|
|
834
|
+
}
|
|
835
|
+
};
|
|
836
|
+
const deserializeAws_json1_1CloudHsmAccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
837
|
+
const body = parsedOutput.body;
|
|
838
|
+
const deserialized = deserializeAws_json1_1CloudHsmAccessDeniedException(body, context);
|
|
839
|
+
const exception = new CloudHsmAccessDeniedException({
|
|
840
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
841
|
+
...deserialized,
|
|
1211
842
|
});
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
843
|
+
return __decorateServiceException(exception, body);
|
|
844
|
+
};
|
|
845
|
+
const deserializeAws_json1_1CloudHsmInternalFailureExceptionResponse = async (parsedOutput, context) => {
|
|
846
|
+
const body = parsedOutput.body;
|
|
847
|
+
const deserialized = deserializeAws_json1_1CloudHsmInternalFailureException(body, context);
|
|
848
|
+
const exception = new CloudHsmInternalFailureException({
|
|
849
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
850
|
+
...deserialized,
|
|
1220
851
|
});
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
852
|
+
return __decorateServiceException(exception, body);
|
|
853
|
+
};
|
|
854
|
+
const deserializeAws_json1_1CloudHsmInvalidRequestExceptionResponse = async (parsedOutput, context) => {
|
|
855
|
+
const body = parsedOutput.body;
|
|
856
|
+
const deserialized = deserializeAws_json1_1CloudHsmInvalidRequestException(body, context);
|
|
857
|
+
const exception = new CloudHsmInvalidRequestException({
|
|
858
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
859
|
+
...deserialized,
|
|
1229
860
|
});
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
861
|
+
return __decorateServiceException(exception, body);
|
|
862
|
+
};
|
|
863
|
+
const deserializeAws_json1_1CloudHsmResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
|
|
864
|
+
const body = parsedOutput.body;
|
|
865
|
+
const deserialized = deserializeAws_json1_1CloudHsmResourceNotFoundException(body, context);
|
|
866
|
+
const exception = new CloudHsmResourceNotFoundException({
|
|
867
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
868
|
+
...deserialized,
|
|
1238
869
|
});
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
870
|
+
return __decorateServiceException(exception, body);
|
|
871
|
+
};
|
|
872
|
+
const deserializeAws_json1_1CloudHsmServiceExceptionResponse = async (parsedOutput, context) => {
|
|
873
|
+
const body = parsedOutput.body;
|
|
874
|
+
const deserialized = deserializeAws_json1_1CloudHsmServiceException(body, context);
|
|
875
|
+
const exception = new CloudHsmServiceException({
|
|
876
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
877
|
+
...deserialized,
|
|
1247
878
|
});
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
879
|
+
return __decorateServiceException(exception, body);
|
|
880
|
+
};
|
|
881
|
+
const deserializeAws_json1_1CloudHsmTagExceptionResponse = async (parsedOutput, context) => {
|
|
882
|
+
const body = parsedOutput.body;
|
|
883
|
+
const deserialized = deserializeAws_json1_1CloudHsmTagException(body, context);
|
|
884
|
+
const exception = new CloudHsmTagException({
|
|
885
|
+
$metadata: deserializeMetadata(parsedOutput),
|
|
886
|
+
...deserialized,
|
|
1256
887
|
});
|
|
1257
|
-
|
|
1258
|
-
var serializeAws_json1_1BackupRetentionPolicy = function (input, context) {
|
|
1259
|
-
return __assign(__assign({}, (input.Type != null && { Type: input.Type })), (input.Value != null && { Value: input.Value }));
|
|
888
|
+
return __decorateServiceException(exception, body);
|
|
1260
889
|
};
|
|
1261
|
-
|
|
1262
|
-
return
|
|
890
|
+
const serializeAws_json1_1BackupRetentionPolicy = (input, context) => {
|
|
891
|
+
return {
|
|
892
|
+
...(input.Type != null && { Type: input.Type }),
|
|
893
|
+
...(input.Value != null && { Value: input.Value }),
|
|
894
|
+
};
|
|
1263
895
|
};
|
|
1264
|
-
|
|
1265
|
-
return
|
|
1266
|
-
|
|
1267
|
-
|
|
896
|
+
const serializeAws_json1_1CopyBackupToRegionRequest = (input, context) => {
|
|
897
|
+
return {
|
|
898
|
+
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
899
|
+
...(input.DestinationRegion != null && { DestinationRegion: input.DestinationRegion }),
|
|
900
|
+
...(input.TagList != null && { TagList: serializeAws_json1_1TagList(input.TagList, context) }),
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
const serializeAws_json1_1CreateClusterRequest = (input, context) => {
|
|
904
|
+
return {
|
|
905
|
+
...(input.BackupRetentionPolicy != null && {
|
|
906
|
+
BackupRetentionPolicy: serializeAws_json1_1BackupRetentionPolicy(input.BackupRetentionPolicy, context),
|
|
907
|
+
}),
|
|
908
|
+
...(input.HsmType != null && { HsmType: input.HsmType }),
|
|
909
|
+
...(input.SourceBackupId != null && { SourceBackupId: input.SourceBackupId }),
|
|
910
|
+
...(input.SubnetIds != null && { SubnetIds: serializeAws_json1_1SubnetIds(input.SubnetIds, context) }),
|
|
911
|
+
...(input.TagList != null && { TagList: serializeAws_json1_1TagList(input.TagList, context) }),
|
|
912
|
+
};
|
|
1268
913
|
};
|
|
1269
|
-
|
|
1270
|
-
return
|
|
914
|
+
const serializeAws_json1_1CreateHsmRequest = (input, context) => {
|
|
915
|
+
return {
|
|
916
|
+
...(input.AvailabilityZone != null && { AvailabilityZone: input.AvailabilityZone }),
|
|
917
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
918
|
+
...(input.IpAddress != null && { IpAddress: input.IpAddress }),
|
|
919
|
+
};
|
|
1271
920
|
};
|
|
1272
|
-
|
|
1273
|
-
return
|
|
921
|
+
const serializeAws_json1_1DeleteBackupRequest = (input, context) => {
|
|
922
|
+
return {
|
|
923
|
+
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
924
|
+
};
|
|
1274
925
|
};
|
|
1275
|
-
|
|
1276
|
-
return
|
|
926
|
+
const serializeAws_json1_1DeleteClusterRequest = (input, context) => {
|
|
927
|
+
return {
|
|
928
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
929
|
+
};
|
|
1277
930
|
};
|
|
1278
|
-
|
|
1279
|
-
return
|
|
931
|
+
const serializeAws_json1_1DeleteHsmRequest = (input, context) => {
|
|
932
|
+
return {
|
|
933
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
934
|
+
...(input.EniId != null && { EniId: input.EniId }),
|
|
935
|
+
...(input.EniIp != null && { EniIp: input.EniIp }),
|
|
936
|
+
...(input.HsmId != null && { HsmId: input.HsmId }),
|
|
937
|
+
};
|
|
1280
938
|
};
|
|
1281
|
-
|
|
1282
|
-
return
|
|
939
|
+
const serializeAws_json1_1DescribeBackupsRequest = (input, context) => {
|
|
940
|
+
return {
|
|
941
|
+
...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
|
|
942
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
943
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
944
|
+
...(input.SortAscending != null && { SortAscending: input.SortAscending }),
|
|
945
|
+
};
|
|
1283
946
|
};
|
|
1284
|
-
|
|
1285
|
-
return
|
|
947
|
+
const serializeAws_json1_1DescribeClustersRequest = (input, context) => {
|
|
948
|
+
return {
|
|
949
|
+
...(input.Filters != null && { Filters: serializeAws_json1_1Filters(input.Filters, context) }),
|
|
950
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
951
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
952
|
+
};
|
|
1286
953
|
};
|
|
1287
|
-
|
|
1288
|
-
return Object.entries(input).reduce(
|
|
1289
|
-
var _b;
|
|
1290
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
954
|
+
const serializeAws_json1_1Filters = (input, context) => {
|
|
955
|
+
return Object.entries(input).reduce((acc, [key, value]) => {
|
|
1291
956
|
if (value === null) {
|
|
1292
957
|
return acc;
|
|
1293
958
|
}
|
|
1294
|
-
return
|
|
959
|
+
return {
|
|
960
|
+
...acc,
|
|
961
|
+
[key]: serializeAws_json1_1Strings(value, context),
|
|
962
|
+
};
|
|
1295
963
|
}, {});
|
|
1296
964
|
};
|
|
1297
|
-
|
|
1298
|
-
return
|
|
965
|
+
const serializeAws_json1_1InitializeClusterRequest = (input, context) => {
|
|
966
|
+
return {
|
|
967
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
968
|
+
...(input.SignedCert != null && { SignedCert: input.SignedCert }),
|
|
969
|
+
...(input.TrustAnchor != null && { TrustAnchor: input.TrustAnchor }),
|
|
970
|
+
};
|
|
1299
971
|
};
|
|
1300
|
-
|
|
1301
|
-
return
|
|
972
|
+
const serializeAws_json1_1ListTagsRequest = (input, context) => {
|
|
973
|
+
return {
|
|
974
|
+
...(input.MaxResults != null && { MaxResults: input.MaxResults }),
|
|
975
|
+
...(input.NextToken != null && { NextToken: input.NextToken }),
|
|
976
|
+
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
977
|
+
};
|
|
1302
978
|
};
|
|
1303
|
-
|
|
1304
|
-
return
|
|
979
|
+
const serializeAws_json1_1ModifyBackupAttributesRequest = (input, context) => {
|
|
980
|
+
return {
|
|
981
|
+
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
982
|
+
...(input.NeverExpires != null && { NeverExpires: input.NeverExpires }),
|
|
983
|
+
};
|
|
1305
984
|
};
|
|
1306
|
-
|
|
1307
|
-
return
|
|
1308
|
-
|
|
1309
|
-
|
|
985
|
+
const serializeAws_json1_1ModifyClusterRequest = (input, context) => {
|
|
986
|
+
return {
|
|
987
|
+
...(input.BackupRetentionPolicy != null && {
|
|
988
|
+
BackupRetentionPolicy: serializeAws_json1_1BackupRetentionPolicy(input.BackupRetentionPolicy, context),
|
|
989
|
+
}),
|
|
990
|
+
...(input.ClusterId != null && { ClusterId: input.ClusterId }),
|
|
991
|
+
};
|
|
1310
992
|
};
|
|
1311
|
-
|
|
1312
|
-
return
|
|
993
|
+
const serializeAws_json1_1RestoreBackupRequest = (input, context) => {
|
|
994
|
+
return {
|
|
995
|
+
...(input.BackupId != null && { BackupId: input.BackupId }),
|
|
996
|
+
};
|
|
1313
997
|
};
|
|
1314
|
-
|
|
998
|
+
const serializeAws_json1_1Strings = (input, context) => {
|
|
1315
999
|
return input
|
|
1316
|
-
.filter(
|
|
1317
|
-
.map(
|
|
1000
|
+
.filter((e) => e != null)
|
|
1001
|
+
.map((entry) => {
|
|
1318
1002
|
return entry;
|
|
1319
1003
|
});
|
|
1320
1004
|
};
|
|
1321
|
-
|
|
1005
|
+
const serializeAws_json1_1SubnetIds = (input, context) => {
|
|
1322
1006
|
return input
|
|
1323
|
-
.filter(
|
|
1324
|
-
.map(
|
|
1007
|
+
.filter((e) => e != null)
|
|
1008
|
+
.map((entry) => {
|
|
1325
1009
|
return entry;
|
|
1326
1010
|
});
|
|
1327
1011
|
};
|
|
1328
|
-
|
|
1329
|
-
return
|
|
1012
|
+
const serializeAws_json1_1Tag = (input, context) => {
|
|
1013
|
+
return {
|
|
1014
|
+
...(input.Key != null && { Key: input.Key }),
|
|
1015
|
+
...(input.Value != null && { Value: input.Value }),
|
|
1016
|
+
};
|
|
1330
1017
|
};
|
|
1331
|
-
|
|
1018
|
+
const serializeAws_json1_1TagKeyList = (input, context) => {
|
|
1332
1019
|
return input
|
|
1333
|
-
.filter(
|
|
1334
|
-
.map(
|
|
1020
|
+
.filter((e) => e != null)
|
|
1021
|
+
.map((entry) => {
|
|
1335
1022
|
return entry;
|
|
1336
1023
|
});
|
|
1337
1024
|
};
|
|
1338
|
-
|
|
1025
|
+
const serializeAws_json1_1TagList = (input, context) => {
|
|
1339
1026
|
return input
|
|
1340
|
-
.filter(
|
|
1341
|
-
.map(
|
|
1027
|
+
.filter((e) => e != null)
|
|
1028
|
+
.map((entry) => {
|
|
1342
1029
|
return serializeAws_json1_1Tag(entry, context);
|
|
1343
1030
|
});
|
|
1344
1031
|
};
|
|
1345
|
-
|
|
1346
|
-
return
|
|
1032
|
+
const serializeAws_json1_1TagResourceRequest = (input, context) => {
|
|
1033
|
+
return {
|
|
1034
|
+
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
1035
|
+
...(input.TagList != null && { TagList: serializeAws_json1_1TagList(input.TagList, context) }),
|
|
1036
|
+
};
|
|
1347
1037
|
};
|
|
1348
|
-
|
|
1349
|
-
return
|
|
1038
|
+
const serializeAws_json1_1UntagResourceRequest = (input, context) => {
|
|
1039
|
+
return {
|
|
1040
|
+
...(input.ResourceId != null && { ResourceId: input.ResourceId }),
|
|
1041
|
+
...(input.TagKeyList != null && { TagKeyList: serializeAws_json1_1TagKeyList(input.TagKeyList, context) }),
|
|
1042
|
+
};
|
|
1350
1043
|
};
|
|
1351
|
-
|
|
1044
|
+
const deserializeAws_json1_1Backup = (output, context) => {
|
|
1352
1045
|
return {
|
|
1353
1046
|
BackupId: __expectString(output.BackupId),
|
|
1354
1047
|
BackupState: __expectString(output.BackupState),
|
|
@@ -1369,16 +1062,16 @@ var deserializeAws_json1_1Backup = function (output, context) {
|
|
|
1369
1062
|
TagList: output.TagList != null ? deserializeAws_json1_1TagList(output.TagList, context) : undefined,
|
|
1370
1063
|
};
|
|
1371
1064
|
};
|
|
1372
|
-
|
|
1065
|
+
const deserializeAws_json1_1BackupRetentionPolicy = (output, context) => {
|
|
1373
1066
|
return {
|
|
1374
1067
|
Type: __expectString(output.Type),
|
|
1375
1068
|
Value: __expectString(output.Value),
|
|
1376
1069
|
};
|
|
1377
1070
|
};
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
.filter(
|
|
1381
|
-
.map(
|
|
1071
|
+
const deserializeAws_json1_1Backups = (output, context) => {
|
|
1072
|
+
const retVal = (output || [])
|
|
1073
|
+
.filter((e) => e != null)
|
|
1074
|
+
.map((entry) => {
|
|
1382
1075
|
if (entry === null) {
|
|
1383
1076
|
return null;
|
|
1384
1077
|
}
|
|
@@ -1386,7 +1079,7 @@ var deserializeAws_json1_1Backups = function (output, context) {
|
|
|
1386
1079
|
});
|
|
1387
1080
|
return retVal;
|
|
1388
1081
|
};
|
|
1389
|
-
|
|
1082
|
+
const deserializeAws_json1_1Certificates = (output, context) => {
|
|
1390
1083
|
return {
|
|
1391
1084
|
AwsHardwareCertificate: __expectString(output.AwsHardwareCertificate),
|
|
1392
1085
|
ClusterCertificate: __expectString(output.ClusterCertificate),
|
|
@@ -1395,37 +1088,37 @@ var deserializeAws_json1_1Certificates = function (output, context) {
|
|
|
1395
1088
|
ManufacturerHardwareCertificate: __expectString(output.ManufacturerHardwareCertificate),
|
|
1396
1089
|
};
|
|
1397
1090
|
};
|
|
1398
|
-
|
|
1091
|
+
const deserializeAws_json1_1CloudHsmAccessDeniedException = (output, context) => {
|
|
1399
1092
|
return {
|
|
1400
1093
|
Message: __expectString(output.Message),
|
|
1401
1094
|
};
|
|
1402
1095
|
};
|
|
1403
|
-
|
|
1096
|
+
const deserializeAws_json1_1CloudHsmInternalFailureException = (output, context) => {
|
|
1404
1097
|
return {
|
|
1405
1098
|
Message: __expectString(output.Message),
|
|
1406
1099
|
};
|
|
1407
1100
|
};
|
|
1408
|
-
|
|
1101
|
+
const deserializeAws_json1_1CloudHsmInvalidRequestException = (output, context) => {
|
|
1409
1102
|
return {
|
|
1410
1103
|
Message: __expectString(output.Message),
|
|
1411
1104
|
};
|
|
1412
1105
|
};
|
|
1413
|
-
|
|
1106
|
+
const deserializeAws_json1_1CloudHsmResourceNotFoundException = (output, context) => {
|
|
1414
1107
|
return {
|
|
1415
1108
|
Message: __expectString(output.Message),
|
|
1416
1109
|
};
|
|
1417
1110
|
};
|
|
1418
|
-
|
|
1111
|
+
const deserializeAws_json1_1CloudHsmServiceException = (output, context) => {
|
|
1419
1112
|
return {
|
|
1420
1113
|
Message: __expectString(output.Message),
|
|
1421
1114
|
};
|
|
1422
1115
|
};
|
|
1423
|
-
|
|
1116
|
+
const deserializeAws_json1_1CloudHsmTagException = (output, context) => {
|
|
1424
1117
|
return {
|
|
1425
1118
|
Message: __expectString(output.Message),
|
|
1426
1119
|
};
|
|
1427
1120
|
};
|
|
1428
|
-
|
|
1121
|
+
const deserializeAws_json1_1Cluster = (output, context) => {
|
|
1429
1122
|
return {
|
|
1430
1123
|
BackupPolicy: __expectString(output.BackupPolicy),
|
|
1431
1124
|
BackupRetentionPolicy: output.BackupRetentionPolicy != null
|
|
@@ -1450,10 +1143,10 @@ var deserializeAws_json1_1Cluster = function (output, context) {
|
|
|
1450
1143
|
VpcId: __expectString(output.VpcId),
|
|
1451
1144
|
};
|
|
1452
1145
|
};
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
.filter(
|
|
1456
|
-
.map(
|
|
1146
|
+
const deserializeAws_json1_1Clusters = (output, context) => {
|
|
1147
|
+
const retVal = (output || [])
|
|
1148
|
+
.filter((e) => e != null)
|
|
1149
|
+
.map((entry) => {
|
|
1457
1150
|
if (entry === null) {
|
|
1458
1151
|
return null;
|
|
1459
1152
|
}
|
|
@@ -1461,51 +1154,51 @@ var deserializeAws_json1_1Clusters = function (output, context) {
|
|
|
1461
1154
|
});
|
|
1462
1155
|
return retVal;
|
|
1463
1156
|
};
|
|
1464
|
-
|
|
1157
|
+
const deserializeAws_json1_1CopyBackupToRegionResponse = (output, context) => {
|
|
1465
1158
|
return {
|
|
1466
1159
|
DestinationBackup: output.DestinationBackup != null
|
|
1467
1160
|
? deserializeAws_json1_1DestinationBackup(output.DestinationBackup, context)
|
|
1468
1161
|
: undefined,
|
|
1469
1162
|
};
|
|
1470
1163
|
};
|
|
1471
|
-
|
|
1164
|
+
const deserializeAws_json1_1CreateClusterResponse = (output, context) => {
|
|
1472
1165
|
return {
|
|
1473
1166
|
Cluster: output.Cluster != null ? deserializeAws_json1_1Cluster(output.Cluster, context) : undefined,
|
|
1474
1167
|
};
|
|
1475
1168
|
};
|
|
1476
|
-
|
|
1169
|
+
const deserializeAws_json1_1CreateHsmResponse = (output, context) => {
|
|
1477
1170
|
return {
|
|
1478
1171
|
Hsm: output.Hsm != null ? deserializeAws_json1_1Hsm(output.Hsm, context) : undefined,
|
|
1479
1172
|
};
|
|
1480
1173
|
};
|
|
1481
|
-
|
|
1174
|
+
const deserializeAws_json1_1DeleteBackupResponse = (output, context) => {
|
|
1482
1175
|
return {
|
|
1483
1176
|
Backup: output.Backup != null ? deserializeAws_json1_1Backup(output.Backup, context) : undefined,
|
|
1484
1177
|
};
|
|
1485
1178
|
};
|
|
1486
|
-
|
|
1179
|
+
const deserializeAws_json1_1DeleteClusterResponse = (output, context) => {
|
|
1487
1180
|
return {
|
|
1488
1181
|
Cluster: output.Cluster != null ? deserializeAws_json1_1Cluster(output.Cluster, context) : undefined,
|
|
1489
1182
|
};
|
|
1490
1183
|
};
|
|
1491
|
-
|
|
1184
|
+
const deserializeAws_json1_1DeleteHsmResponse = (output, context) => {
|
|
1492
1185
|
return {
|
|
1493
1186
|
HsmId: __expectString(output.HsmId),
|
|
1494
1187
|
};
|
|
1495
1188
|
};
|
|
1496
|
-
|
|
1189
|
+
const deserializeAws_json1_1DescribeBackupsResponse = (output, context) => {
|
|
1497
1190
|
return {
|
|
1498
1191
|
Backups: output.Backups != null ? deserializeAws_json1_1Backups(output.Backups, context) : undefined,
|
|
1499
1192
|
NextToken: __expectString(output.NextToken),
|
|
1500
1193
|
};
|
|
1501
1194
|
};
|
|
1502
|
-
|
|
1195
|
+
const deserializeAws_json1_1DescribeClustersResponse = (output, context) => {
|
|
1503
1196
|
return {
|
|
1504
1197
|
Clusters: output.Clusters != null ? deserializeAws_json1_1Clusters(output.Clusters, context) : undefined,
|
|
1505
1198
|
NextToken: __expectString(output.NextToken),
|
|
1506
1199
|
};
|
|
1507
1200
|
};
|
|
1508
|
-
|
|
1201
|
+
const deserializeAws_json1_1DestinationBackup = (output, context) => {
|
|
1509
1202
|
return {
|
|
1510
1203
|
CreateTimestamp: output.CreateTimestamp != null
|
|
1511
1204
|
? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.CreateTimestamp)))
|
|
@@ -1515,17 +1208,18 @@ var deserializeAws_json1_1DestinationBackup = function (output, context) {
|
|
|
1515
1208
|
SourceRegion: __expectString(output.SourceRegion),
|
|
1516
1209
|
};
|
|
1517
1210
|
};
|
|
1518
|
-
|
|
1519
|
-
return Object.entries(output).reduce(
|
|
1520
|
-
var _b;
|
|
1521
|
-
var _c = __read(_a, 2), key = _c[0], value = _c[1];
|
|
1211
|
+
const deserializeAws_json1_1ExternalSubnetMapping = (output, context) => {
|
|
1212
|
+
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
1522
1213
|
if (value === null) {
|
|
1523
1214
|
return acc;
|
|
1524
1215
|
}
|
|
1525
|
-
return
|
|
1216
|
+
return {
|
|
1217
|
+
...acc,
|
|
1218
|
+
[key]: __expectString(value),
|
|
1219
|
+
};
|
|
1526
1220
|
}, {});
|
|
1527
1221
|
};
|
|
1528
|
-
|
|
1222
|
+
const deserializeAws_json1_1Hsm = (output, context) => {
|
|
1529
1223
|
return {
|
|
1530
1224
|
AvailabilityZone: __expectString(output.AvailabilityZone),
|
|
1531
1225
|
ClusterId: __expectString(output.ClusterId),
|
|
@@ -1537,10 +1231,10 @@ var deserializeAws_json1_1Hsm = function (output, context) {
|
|
|
1537
1231
|
SubnetId: __expectString(output.SubnetId),
|
|
1538
1232
|
};
|
|
1539
1233
|
};
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
.filter(
|
|
1543
|
-
.map(
|
|
1234
|
+
const deserializeAws_json1_1Hsms = (output, context) => {
|
|
1235
|
+
const retVal = (output || [])
|
|
1236
|
+
.filter((e) => e != null)
|
|
1237
|
+
.map((entry) => {
|
|
1544
1238
|
if (entry === null) {
|
|
1545
1239
|
return null;
|
|
1546
1240
|
}
|
|
@@ -1548,43 +1242,43 @@ var deserializeAws_json1_1Hsms = function (output, context) {
|
|
|
1548
1242
|
});
|
|
1549
1243
|
return retVal;
|
|
1550
1244
|
};
|
|
1551
|
-
|
|
1245
|
+
const deserializeAws_json1_1InitializeClusterResponse = (output, context) => {
|
|
1552
1246
|
return {
|
|
1553
1247
|
State: __expectString(output.State),
|
|
1554
1248
|
StateMessage: __expectString(output.StateMessage),
|
|
1555
1249
|
};
|
|
1556
1250
|
};
|
|
1557
|
-
|
|
1251
|
+
const deserializeAws_json1_1ListTagsResponse = (output, context) => {
|
|
1558
1252
|
return {
|
|
1559
1253
|
NextToken: __expectString(output.NextToken),
|
|
1560
1254
|
TagList: output.TagList != null ? deserializeAws_json1_1TagList(output.TagList, context) : undefined,
|
|
1561
1255
|
};
|
|
1562
1256
|
};
|
|
1563
|
-
|
|
1257
|
+
const deserializeAws_json1_1ModifyBackupAttributesResponse = (output, context) => {
|
|
1564
1258
|
return {
|
|
1565
1259
|
Backup: output.Backup != null ? deserializeAws_json1_1Backup(output.Backup, context) : undefined,
|
|
1566
1260
|
};
|
|
1567
1261
|
};
|
|
1568
|
-
|
|
1262
|
+
const deserializeAws_json1_1ModifyClusterResponse = (output, context) => {
|
|
1569
1263
|
return {
|
|
1570
1264
|
Cluster: output.Cluster != null ? deserializeAws_json1_1Cluster(output.Cluster, context) : undefined,
|
|
1571
1265
|
};
|
|
1572
1266
|
};
|
|
1573
|
-
|
|
1267
|
+
const deserializeAws_json1_1RestoreBackupResponse = (output, context) => {
|
|
1574
1268
|
return {
|
|
1575
1269
|
Backup: output.Backup != null ? deserializeAws_json1_1Backup(output.Backup, context) : undefined,
|
|
1576
1270
|
};
|
|
1577
1271
|
};
|
|
1578
|
-
|
|
1272
|
+
const deserializeAws_json1_1Tag = (output, context) => {
|
|
1579
1273
|
return {
|
|
1580
1274
|
Key: __expectString(output.Key),
|
|
1581
1275
|
Value: __expectString(output.Value),
|
|
1582
1276
|
};
|
|
1583
1277
|
};
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
.filter(
|
|
1587
|
-
.map(
|
|
1278
|
+
const deserializeAws_json1_1TagList = (output, context) => {
|
|
1279
|
+
const retVal = (output || [])
|
|
1280
|
+
.filter((e) => e != null)
|
|
1281
|
+
.map((entry) => {
|
|
1588
1282
|
if (entry === null) {
|
|
1589
1283
|
return null;
|
|
1590
1284
|
}
|
|
@@ -1592,81 +1286,58 @@ var deserializeAws_json1_1TagList = function (output, context) {
|
|
|
1592
1286
|
});
|
|
1593
1287
|
return retVal;
|
|
1594
1288
|
};
|
|
1595
|
-
|
|
1289
|
+
const deserializeAws_json1_1TagResourceResponse = (output, context) => {
|
|
1596
1290
|
return {};
|
|
1597
1291
|
};
|
|
1598
|
-
|
|
1292
|
+
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
|
|
1599
1293
|
return {};
|
|
1600
1294
|
};
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
});
|
|
1609
|
-
};
|
|
1610
|
-
var collectBody = function (streamBody, context) {
|
|
1611
|
-
if (streamBody === void 0) { streamBody = new Uint8Array(); }
|
|
1295
|
+
const deserializeMetadata = (output) => ({
|
|
1296
|
+
httpStatusCode: output.statusCode,
|
|
1297
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
1298
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
1299
|
+
cfId: output.headers["x-amz-cf-id"],
|
|
1300
|
+
});
|
|
1301
|
+
const collectBody = (streamBody = new Uint8Array(), context) => {
|
|
1612
1302
|
if (streamBody instanceof Uint8Array) {
|
|
1613
1303
|
return Promise.resolve(streamBody);
|
|
1614
1304
|
}
|
|
1615
1305
|
return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
|
|
1616
1306
|
};
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
};
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
if (resolvedHostname !== undefined) {
|
|
1636
|
-
contents.hostname = resolvedHostname;
|
|
1637
|
-
}
|
|
1638
|
-
if (body !== undefined) {
|
|
1639
|
-
contents.body = body;
|
|
1640
|
-
}
|
|
1641
|
-
return [2, new __HttpRequest(contents)];
|
|
1642
|
-
}
|
|
1643
|
-
});
|
|
1644
|
-
}); };
|
|
1645
|
-
var parseBody = function (streamBody, context) {
|
|
1646
|
-
return collectBodyString(streamBody, context).then(function (encoded) {
|
|
1647
|
-
if (encoded.length) {
|
|
1648
|
-
return JSON.parse(encoded);
|
|
1649
|
-
}
|
|
1650
|
-
return {};
|
|
1651
|
-
});
|
|
1307
|
+
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
1308
|
+
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
1309
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
1310
|
+
const contents = {
|
|
1311
|
+
protocol,
|
|
1312
|
+
hostname,
|
|
1313
|
+
port,
|
|
1314
|
+
method: "POST",
|
|
1315
|
+
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
1316
|
+
headers,
|
|
1317
|
+
};
|
|
1318
|
+
if (resolvedHostname !== undefined) {
|
|
1319
|
+
contents.hostname = resolvedHostname;
|
|
1320
|
+
}
|
|
1321
|
+
if (body !== undefined) {
|
|
1322
|
+
contents.body = body;
|
|
1323
|
+
}
|
|
1324
|
+
return new __HttpRequest(contents);
|
|
1652
1325
|
};
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
var sanitizeErrorCode = function (rawValue) {
|
|
1669
|
-
var cleanValue = rawValue;
|
|
1326
|
+
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1327
|
+
if (encoded.length) {
|
|
1328
|
+
return JSON.parse(encoded);
|
|
1329
|
+
}
|
|
1330
|
+
return {};
|
|
1331
|
+
});
|
|
1332
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1333
|
+
const value = await parseBody(errorBody, context);
|
|
1334
|
+
value.message = value.message ?? value.Message;
|
|
1335
|
+
return value;
|
|
1336
|
+
};
|
|
1337
|
+
const loadRestJsonErrorCode = (output, data) => {
|
|
1338
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1339
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
1340
|
+
let cleanValue = rawValue;
|
|
1670
1341
|
if (typeof cleanValue === "number") {
|
|
1671
1342
|
cleanValue = cleanValue.toString();
|
|
1672
1343
|
}
|
|
@@ -1681,7 +1352,7 @@ var loadRestJsonErrorCode = function (output, data) {
|
|
|
1681
1352
|
}
|
|
1682
1353
|
return cleanValue;
|
|
1683
1354
|
};
|
|
1684
|
-
|
|
1355
|
+
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
1685
1356
|
if (headerKey !== undefined) {
|
|
1686
1357
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
1687
1358
|
}
|