@aws-sdk/client-kms 3.504.0 → 3.507.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/index.js +206 -1938
- package/dist-es/protocols/Aws_json1_1.js +387 -2119
- package/package.json +3 -3
|
@@ -304,7 +304,7 @@ export const se_VerifyMacCommand = async (input, context) => {
|
|
|
304
304
|
};
|
|
305
305
|
export const de_CancelKeyDeletionCommand = async (output, context) => {
|
|
306
306
|
if (output.statusCode >= 300) {
|
|
307
|
-
return
|
|
307
|
+
return de_CommandError(output, context);
|
|
308
308
|
}
|
|
309
309
|
const data = await parseBody(output.body, context);
|
|
310
310
|
let contents = {};
|
|
@@ -315,40 +315,9 @@ export const de_CancelKeyDeletionCommand = async (output, context) => {
|
|
|
315
315
|
};
|
|
316
316
|
return response;
|
|
317
317
|
};
|
|
318
|
-
const de_CancelKeyDeletionCommandError = async (output, context) => {
|
|
319
|
-
const parsedOutput = {
|
|
320
|
-
...output,
|
|
321
|
-
body: await parseErrorBody(output.body, context),
|
|
322
|
-
};
|
|
323
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
324
|
-
switch (errorCode) {
|
|
325
|
-
case "DependencyTimeoutException":
|
|
326
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
327
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
328
|
-
case "InvalidArnException":
|
|
329
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
330
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
331
|
-
case "KMSInternalException":
|
|
332
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
333
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
334
|
-
case "KMSInvalidStateException":
|
|
335
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
336
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
337
|
-
case "NotFoundException":
|
|
338
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
339
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
340
|
-
default:
|
|
341
|
-
const parsedBody = parsedOutput.body;
|
|
342
|
-
return throwDefaultError({
|
|
343
|
-
output,
|
|
344
|
-
parsedBody,
|
|
345
|
-
errorCode,
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
318
|
export const de_ConnectCustomKeyStoreCommand = async (output, context) => {
|
|
350
319
|
if (output.statusCode >= 300) {
|
|
351
|
-
return
|
|
320
|
+
return de_CommandError(output, context);
|
|
352
321
|
}
|
|
353
322
|
const data = await parseBody(output.body, context);
|
|
354
323
|
let contents = {};
|
|
@@ -359,40 +328,9 @@ export const de_ConnectCustomKeyStoreCommand = async (output, context) => {
|
|
|
359
328
|
};
|
|
360
329
|
return response;
|
|
361
330
|
};
|
|
362
|
-
const de_ConnectCustomKeyStoreCommandError = async (output, context) => {
|
|
363
|
-
const parsedOutput = {
|
|
364
|
-
...output,
|
|
365
|
-
body: await parseErrorBody(output.body, context),
|
|
366
|
-
};
|
|
367
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
368
|
-
switch (errorCode) {
|
|
369
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
370
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
371
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
372
|
-
case "CloudHsmClusterNotActiveException":
|
|
373
|
-
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
374
|
-
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
375
|
-
case "CustomKeyStoreInvalidStateException":
|
|
376
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
377
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
378
|
-
case "CustomKeyStoreNotFoundException":
|
|
379
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
380
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
381
|
-
case "KMSInternalException":
|
|
382
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
383
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
384
|
-
default:
|
|
385
|
-
const parsedBody = parsedOutput.body;
|
|
386
|
-
return throwDefaultError({
|
|
387
|
-
output,
|
|
388
|
-
parsedBody,
|
|
389
|
-
errorCode,
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
331
|
export const de_CreateAliasCommand = async (output, context) => {
|
|
394
332
|
if (output.statusCode >= 300) {
|
|
395
|
-
return
|
|
333
|
+
return de_CommandError(output, context);
|
|
396
334
|
}
|
|
397
335
|
await collectBody(output.body, context);
|
|
398
336
|
const response = {
|
|
@@ -400,46 +338,22 @@ export const de_CreateAliasCommand = async (output, context) => {
|
|
|
400
338
|
};
|
|
401
339
|
return response;
|
|
402
340
|
};
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
body: await parseErrorBody(output.body, context),
|
|
407
|
-
};
|
|
408
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
409
|
-
switch (errorCode) {
|
|
410
|
-
case "AlreadyExistsException":
|
|
411
|
-
case "com.amazonaws.kms#AlreadyExistsException":
|
|
412
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
413
|
-
case "DependencyTimeoutException":
|
|
414
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
415
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
416
|
-
case "InvalidAliasNameException":
|
|
417
|
-
case "com.amazonaws.kms#InvalidAliasNameException":
|
|
418
|
-
throw await de_InvalidAliasNameExceptionRes(parsedOutput, context);
|
|
419
|
-
case "KMSInternalException":
|
|
420
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
421
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
422
|
-
case "KMSInvalidStateException":
|
|
423
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
424
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
425
|
-
case "LimitExceededException":
|
|
426
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
427
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
428
|
-
case "NotFoundException":
|
|
429
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
430
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
431
|
-
default:
|
|
432
|
-
const parsedBody = parsedOutput.body;
|
|
433
|
-
return throwDefaultError({
|
|
434
|
-
output,
|
|
435
|
-
parsedBody,
|
|
436
|
-
errorCode,
|
|
437
|
-
});
|
|
341
|
+
export const de_CreateCustomKeyStoreCommand = async (output, context) => {
|
|
342
|
+
if (output.statusCode >= 300) {
|
|
343
|
+
return de_CommandError(output, context);
|
|
438
344
|
}
|
|
345
|
+
const data = await parseBody(output.body, context);
|
|
346
|
+
let contents = {};
|
|
347
|
+
contents = _json(data);
|
|
348
|
+
const response = {
|
|
349
|
+
$metadata: deserializeMetadata(output),
|
|
350
|
+
...contents,
|
|
351
|
+
};
|
|
352
|
+
return response;
|
|
439
353
|
};
|
|
440
|
-
export const
|
|
354
|
+
export const de_CreateGrantCommand = async (output, context) => {
|
|
441
355
|
if (output.statusCode >= 300) {
|
|
442
|
-
return
|
|
356
|
+
return de_CommandError(output, context);
|
|
443
357
|
}
|
|
444
358
|
const data = await parseBody(output.body, context);
|
|
445
359
|
let contents = {};
|
|
@@ -450,76 +364,45 @@ export const de_CreateCustomKeyStoreCommand = async (output, context) => {
|
|
|
450
364
|
};
|
|
451
365
|
return response;
|
|
452
366
|
};
|
|
453
|
-
const
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
367
|
+
export const de_CreateKeyCommand = async (output, context) => {
|
|
368
|
+
if (output.statusCode >= 300) {
|
|
369
|
+
return de_CommandError(output, context);
|
|
370
|
+
}
|
|
371
|
+
const data = await parseBody(output.body, context);
|
|
372
|
+
let contents = {};
|
|
373
|
+
contents = de_CreateKeyResponse(data, context);
|
|
374
|
+
const response = {
|
|
375
|
+
$metadata: deserializeMetadata(output),
|
|
376
|
+
...contents,
|
|
457
377
|
};
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
464
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
465
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
466
|
-
case "CloudHsmClusterNotActiveException":
|
|
467
|
-
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
468
|
-
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
469
|
-
case "CloudHsmClusterNotFoundException":
|
|
470
|
-
case "com.amazonaws.kms#CloudHsmClusterNotFoundException":
|
|
471
|
-
throw await de_CloudHsmClusterNotFoundExceptionRes(parsedOutput, context);
|
|
472
|
-
case "CustomKeyStoreNameInUseException":
|
|
473
|
-
case "com.amazonaws.kms#CustomKeyStoreNameInUseException":
|
|
474
|
-
throw await de_CustomKeyStoreNameInUseExceptionRes(parsedOutput, context);
|
|
475
|
-
case "IncorrectTrustAnchorException":
|
|
476
|
-
case "com.amazonaws.kms#IncorrectTrustAnchorException":
|
|
477
|
-
throw await de_IncorrectTrustAnchorExceptionRes(parsedOutput, context);
|
|
478
|
-
case "KMSInternalException":
|
|
479
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
480
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
481
|
-
case "LimitExceededException":
|
|
482
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
483
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
484
|
-
case "XksProxyIncorrectAuthenticationCredentialException":
|
|
485
|
-
case "com.amazonaws.kms#XksProxyIncorrectAuthenticationCredentialException":
|
|
486
|
-
throw await de_XksProxyIncorrectAuthenticationCredentialExceptionRes(parsedOutput, context);
|
|
487
|
-
case "XksProxyInvalidConfigurationException":
|
|
488
|
-
case "com.amazonaws.kms#XksProxyInvalidConfigurationException":
|
|
489
|
-
throw await de_XksProxyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
490
|
-
case "XksProxyInvalidResponseException":
|
|
491
|
-
case "com.amazonaws.kms#XksProxyInvalidResponseException":
|
|
492
|
-
throw await de_XksProxyInvalidResponseExceptionRes(parsedOutput, context);
|
|
493
|
-
case "XksProxyUriEndpointInUseException":
|
|
494
|
-
case "com.amazonaws.kms#XksProxyUriEndpointInUseException":
|
|
495
|
-
throw await de_XksProxyUriEndpointInUseExceptionRes(parsedOutput, context);
|
|
496
|
-
case "XksProxyUriInUseException":
|
|
497
|
-
case "com.amazonaws.kms#XksProxyUriInUseException":
|
|
498
|
-
throw await de_XksProxyUriInUseExceptionRes(parsedOutput, context);
|
|
499
|
-
case "XksProxyUriUnreachableException":
|
|
500
|
-
case "com.amazonaws.kms#XksProxyUriUnreachableException":
|
|
501
|
-
throw await de_XksProxyUriUnreachableExceptionRes(parsedOutput, context);
|
|
502
|
-
case "XksProxyVpcEndpointServiceInUseException":
|
|
503
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInUseException":
|
|
504
|
-
throw await de_XksProxyVpcEndpointServiceInUseExceptionRes(parsedOutput, context);
|
|
505
|
-
case "XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
506
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
507
|
-
throw await de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
508
|
-
case "XksProxyVpcEndpointServiceNotFoundException":
|
|
509
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceNotFoundException":
|
|
510
|
-
throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context);
|
|
511
|
-
default:
|
|
512
|
-
const parsedBody = parsedOutput.body;
|
|
513
|
-
return throwDefaultError({
|
|
514
|
-
output,
|
|
515
|
-
parsedBody,
|
|
516
|
-
errorCode,
|
|
517
|
-
});
|
|
378
|
+
return response;
|
|
379
|
+
};
|
|
380
|
+
export const de_DecryptCommand = async (output, context) => {
|
|
381
|
+
if (output.statusCode >= 300) {
|
|
382
|
+
return de_CommandError(output, context);
|
|
518
383
|
}
|
|
384
|
+
const data = await parseBody(output.body, context);
|
|
385
|
+
let contents = {};
|
|
386
|
+
contents = de_DecryptResponse(data, context);
|
|
387
|
+
const response = {
|
|
388
|
+
$metadata: deserializeMetadata(output),
|
|
389
|
+
...contents,
|
|
390
|
+
};
|
|
391
|
+
return response;
|
|
519
392
|
};
|
|
520
|
-
export const
|
|
393
|
+
export const de_DeleteAliasCommand = async (output, context) => {
|
|
521
394
|
if (output.statusCode >= 300) {
|
|
522
|
-
return
|
|
395
|
+
return de_CommandError(output, context);
|
|
396
|
+
}
|
|
397
|
+
await collectBody(output.body, context);
|
|
398
|
+
const response = {
|
|
399
|
+
$metadata: deserializeMetadata(output),
|
|
400
|
+
};
|
|
401
|
+
return response;
|
|
402
|
+
};
|
|
403
|
+
export const de_DeleteCustomKeyStoreCommand = async (output, context) => {
|
|
404
|
+
if (output.statusCode >= 300) {
|
|
405
|
+
return de_CommandError(output, context);
|
|
523
406
|
}
|
|
524
407
|
const data = await parseBody(output.body, context);
|
|
525
408
|
let contents = {};
|
|
@@ -530,182 +413,45 @@ export const de_CreateGrantCommand = async (output, context) => {
|
|
|
530
413
|
};
|
|
531
414
|
return response;
|
|
532
415
|
};
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
body: await parseErrorBody(output.body, context),
|
|
537
|
-
};
|
|
538
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
539
|
-
switch (errorCode) {
|
|
540
|
-
case "DependencyTimeoutException":
|
|
541
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
542
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
543
|
-
case "DisabledException":
|
|
544
|
-
case "com.amazonaws.kms#DisabledException":
|
|
545
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
546
|
-
case "DryRunOperationException":
|
|
547
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
548
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
549
|
-
case "InvalidArnException":
|
|
550
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
551
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
552
|
-
case "InvalidGrantTokenException":
|
|
553
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
554
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
555
|
-
case "KMSInternalException":
|
|
556
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
557
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
558
|
-
case "KMSInvalidStateException":
|
|
559
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
560
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
561
|
-
case "LimitExceededException":
|
|
562
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
563
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
564
|
-
case "NotFoundException":
|
|
565
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
566
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
567
|
-
default:
|
|
568
|
-
const parsedBody = parsedOutput.body;
|
|
569
|
-
return throwDefaultError({
|
|
570
|
-
output,
|
|
571
|
-
parsedBody,
|
|
572
|
-
errorCode,
|
|
573
|
-
});
|
|
416
|
+
export const de_DeleteImportedKeyMaterialCommand = async (output, context) => {
|
|
417
|
+
if (output.statusCode >= 300) {
|
|
418
|
+
return de_CommandError(output, context);
|
|
574
419
|
}
|
|
420
|
+
await collectBody(output.body, context);
|
|
421
|
+
const response = {
|
|
422
|
+
$metadata: deserializeMetadata(output),
|
|
423
|
+
};
|
|
424
|
+
return response;
|
|
575
425
|
};
|
|
576
|
-
export const
|
|
426
|
+
export const de_DescribeCustomKeyStoresCommand = async (output, context) => {
|
|
577
427
|
if (output.statusCode >= 300) {
|
|
578
|
-
return
|
|
428
|
+
return de_CommandError(output, context);
|
|
579
429
|
}
|
|
580
430
|
const data = await parseBody(output.body, context);
|
|
581
431
|
let contents = {};
|
|
582
|
-
contents =
|
|
432
|
+
contents = de_DescribeCustomKeyStoresResponse(data, context);
|
|
583
433
|
const response = {
|
|
584
434
|
$metadata: deserializeMetadata(output),
|
|
585
435
|
...contents,
|
|
586
436
|
};
|
|
587
437
|
return response;
|
|
588
438
|
};
|
|
589
|
-
const
|
|
590
|
-
const parsedOutput = {
|
|
591
|
-
...output,
|
|
592
|
-
body: await parseErrorBody(output.body, context),
|
|
593
|
-
};
|
|
594
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
595
|
-
switch (errorCode) {
|
|
596
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
597
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
598
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
599
|
-
case "CustomKeyStoreInvalidStateException":
|
|
600
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
601
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
602
|
-
case "CustomKeyStoreNotFoundException":
|
|
603
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
604
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
605
|
-
case "DependencyTimeoutException":
|
|
606
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
607
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
608
|
-
case "InvalidArnException":
|
|
609
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
610
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
611
|
-
case "KMSInternalException":
|
|
612
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
613
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
614
|
-
case "LimitExceededException":
|
|
615
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
616
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
617
|
-
case "MalformedPolicyDocumentException":
|
|
618
|
-
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
619
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
620
|
-
case "TagException":
|
|
621
|
-
case "com.amazonaws.kms#TagException":
|
|
622
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
623
|
-
case "UnsupportedOperationException":
|
|
624
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
625
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
626
|
-
case "XksKeyAlreadyInUseException":
|
|
627
|
-
case "com.amazonaws.kms#XksKeyAlreadyInUseException":
|
|
628
|
-
throw await de_XksKeyAlreadyInUseExceptionRes(parsedOutput, context);
|
|
629
|
-
case "XksKeyInvalidConfigurationException":
|
|
630
|
-
case "com.amazonaws.kms#XksKeyInvalidConfigurationException":
|
|
631
|
-
throw await de_XksKeyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
632
|
-
case "XksKeyNotFoundException":
|
|
633
|
-
case "com.amazonaws.kms#XksKeyNotFoundException":
|
|
634
|
-
throw await de_XksKeyNotFoundExceptionRes(parsedOutput, context);
|
|
635
|
-
default:
|
|
636
|
-
const parsedBody = parsedOutput.body;
|
|
637
|
-
return throwDefaultError({
|
|
638
|
-
output,
|
|
639
|
-
parsedBody,
|
|
640
|
-
errorCode,
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
export const de_DecryptCommand = async (output, context) => {
|
|
439
|
+
export const de_DescribeKeyCommand = async (output, context) => {
|
|
645
440
|
if (output.statusCode >= 300) {
|
|
646
|
-
return
|
|
441
|
+
return de_CommandError(output, context);
|
|
647
442
|
}
|
|
648
443
|
const data = await parseBody(output.body, context);
|
|
649
444
|
let contents = {};
|
|
650
|
-
contents =
|
|
445
|
+
contents = de_DescribeKeyResponse(data, context);
|
|
651
446
|
const response = {
|
|
652
447
|
$metadata: deserializeMetadata(output),
|
|
653
448
|
...contents,
|
|
654
449
|
};
|
|
655
450
|
return response;
|
|
656
451
|
};
|
|
657
|
-
const
|
|
658
|
-
const parsedOutput = {
|
|
659
|
-
...output,
|
|
660
|
-
body: await parseErrorBody(output.body, context),
|
|
661
|
-
};
|
|
662
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
663
|
-
switch (errorCode) {
|
|
664
|
-
case "DependencyTimeoutException":
|
|
665
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
666
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
667
|
-
case "DisabledException":
|
|
668
|
-
case "com.amazonaws.kms#DisabledException":
|
|
669
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
670
|
-
case "DryRunOperationException":
|
|
671
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
672
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
673
|
-
case "IncorrectKeyException":
|
|
674
|
-
case "com.amazonaws.kms#IncorrectKeyException":
|
|
675
|
-
throw await de_IncorrectKeyExceptionRes(parsedOutput, context);
|
|
676
|
-
case "InvalidCiphertextException":
|
|
677
|
-
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
678
|
-
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
679
|
-
case "InvalidGrantTokenException":
|
|
680
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
681
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
682
|
-
case "InvalidKeyUsageException":
|
|
683
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
684
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
685
|
-
case "KMSInternalException":
|
|
686
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
687
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
688
|
-
case "KMSInvalidStateException":
|
|
689
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
690
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
691
|
-
case "KeyUnavailableException":
|
|
692
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
693
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
694
|
-
case "NotFoundException":
|
|
695
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
696
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
697
|
-
default:
|
|
698
|
-
const parsedBody = parsedOutput.body;
|
|
699
|
-
return throwDefaultError({
|
|
700
|
-
output,
|
|
701
|
-
parsedBody,
|
|
702
|
-
errorCode,
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
};
|
|
706
|
-
export const de_DeleteAliasCommand = async (output, context) => {
|
|
452
|
+
export const de_DisableKeyCommand = async (output, context) => {
|
|
707
453
|
if (output.statusCode >= 300) {
|
|
708
|
-
return
|
|
454
|
+
return de_CommandError(output, context);
|
|
709
455
|
}
|
|
710
456
|
await collectBody(output.body, context);
|
|
711
457
|
const response = {
|
|
@@ -713,37 +459,19 @@ export const de_DeleteAliasCommand = async (output, context) => {
|
|
|
713
459
|
};
|
|
714
460
|
return response;
|
|
715
461
|
};
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
body: await parseErrorBody(output.body, context),
|
|
720
|
-
};
|
|
721
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
722
|
-
switch (errorCode) {
|
|
723
|
-
case "DependencyTimeoutException":
|
|
724
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
725
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
726
|
-
case "KMSInternalException":
|
|
727
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
728
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
729
|
-
case "KMSInvalidStateException":
|
|
730
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
731
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
732
|
-
case "NotFoundException":
|
|
733
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
734
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
735
|
-
default:
|
|
736
|
-
const parsedBody = parsedOutput.body;
|
|
737
|
-
return throwDefaultError({
|
|
738
|
-
output,
|
|
739
|
-
parsedBody,
|
|
740
|
-
errorCode,
|
|
741
|
-
});
|
|
462
|
+
export const de_DisableKeyRotationCommand = async (output, context) => {
|
|
463
|
+
if (output.statusCode >= 300) {
|
|
464
|
+
return de_CommandError(output, context);
|
|
742
465
|
}
|
|
466
|
+
await collectBody(output.body, context);
|
|
467
|
+
const response = {
|
|
468
|
+
$metadata: deserializeMetadata(output),
|
|
469
|
+
};
|
|
470
|
+
return response;
|
|
743
471
|
};
|
|
744
|
-
export const
|
|
472
|
+
export const de_DisconnectCustomKeyStoreCommand = async (output, context) => {
|
|
745
473
|
if (output.statusCode >= 300) {
|
|
746
|
-
return
|
|
474
|
+
return de_CommandError(output, context);
|
|
747
475
|
}
|
|
748
476
|
const data = await parseBody(output.body, context);
|
|
749
477
|
let contents = {};
|
|
@@ -754,37 +482,19 @@ export const de_DeleteCustomKeyStoreCommand = async (output, context) => {
|
|
|
754
482
|
};
|
|
755
483
|
return response;
|
|
756
484
|
};
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
body: await parseErrorBody(output.body, context),
|
|
761
|
-
};
|
|
762
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
763
|
-
switch (errorCode) {
|
|
764
|
-
case "CustomKeyStoreHasCMKsException":
|
|
765
|
-
case "com.amazonaws.kms#CustomKeyStoreHasCMKsException":
|
|
766
|
-
throw await de_CustomKeyStoreHasCMKsExceptionRes(parsedOutput, context);
|
|
767
|
-
case "CustomKeyStoreInvalidStateException":
|
|
768
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
769
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
770
|
-
case "CustomKeyStoreNotFoundException":
|
|
771
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
772
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
773
|
-
case "KMSInternalException":
|
|
774
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
775
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
776
|
-
default:
|
|
777
|
-
const parsedBody = parsedOutput.body;
|
|
778
|
-
return throwDefaultError({
|
|
779
|
-
output,
|
|
780
|
-
parsedBody,
|
|
781
|
-
errorCode,
|
|
782
|
-
});
|
|
485
|
+
export const de_EnableKeyCommand = async (output, context) => {
|
|
486
|
+
if (output.statusCode >= 300) {
|
|
487
|
+
return de_CommandError(output, context);
|
|
783
488
|
}
|
|
489
|
+
await collectBody(output.body, context);
|
|
490
|
+
const response = {
|
|
491
|
+
$metadata: deserializeMetadata(output),
|
|
492
|
+
};
|
|
493
|
+
return response;
|
|
784
494
|
};
|
|
785
|
-
export const
|
|
495
|
+
export const de_EnableKeyRotationCommand = async (output, context) => {
|
|
786
496
|
if (output.statusCode >= 300) {
|
|
787
|
-
return
|
|
497
|
+
return de_CommandError(output, context);
|
|
788
498
|
}
|
|
789
499
|
await collectBody(output.body, context);
|
|
790
500
|
const response = {
|
|
@@ -792,210 +502,100 @@ export const de_DeleteImportedKeyMaterialCommand = async (output, context) => {
|
|
|
792
502
|
};
|
|
793
503
|
return response;
|
|
794
504
|
};
|
|
795
|
-
const
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
body: await parseErrorBody(output.body, context),
|
|
799
|
-
};
|
|
800
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
801
|
-
switch (errorCode) {
|
|
802
|
-
case "DependencyTimeoutException":
|
|
803
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
804
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
805
|
-
case "InvalidArnException":
|
|
806
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
807
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
808
|
-
case "KMSInternalException":
|
|
809
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
810
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
811
|
-
case "KMSInvalidStateException":
|
|
812
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
813
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
814
|
-
case "NotFoundException":
|
|
815
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
816
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
817
|
-
case "UnsupportedOperationException":
|
|
818
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
819
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
820
|
-
default:
|
|
821
|
-
const parsedBody = parsedOutput.body;
|
|
822
|
-
return throwDefaultError({
|
|
823
|
-
output,
|
|
824
|
-
parsedBody,
|
|
825
|
-
errorCode,
|
|
826
|
-
});
|
|
505
|
+
export const de_EncryptCommand = async (output, context) => {
|
|
506
|
+
if (output.statusCode >= 300) {
|
|
507
|
+
return de_CommandError(output, context);
|
|
827
508
|
}
|
|
509
|
+
const data = await parseBody(output.body, context);
|
|
510
|
+
let contents = {};
|
|
511
|
+
contents = de_EncryptResponse(data, context);
|
|
512
|
+
const response = {
|
|
513
|
+
$metadata: deserializeMetadata(output),
|
|
514
|
+
...contents,
|
|
515
|
+
};
|
|
516
|
+
return response;
|
|
828
517
|
};
|
|
829
|
-
export const
|
|
518
|
+
export const de_GenerateDataKeyCommand = async (output, context) => {
|
|
830
519
|
if (output.statusCode >= 300) {
|
|
831
|
-
return
|
|
520
|
+
return de_CommandError(output, context);
|
|
832
521
|
}
|
|
833
522
|
const data = await parseBody(output.body, context);
|
|
834
523
|
let contents = {};
|
|
835
|
-
contents =
|
|
524
|
+
contents = de_GenerateDataKeyResponse(data, context);
|
|
836
525
|
const response = {
|
|
837
526
|
$metadata: deserializeMetadata(output),
|
|
838
527
|
...contents,
|
|
839
528
|
};
|
|
840
529
|
return response;
|
|
841
530
|
};
|
|
842
|
-
const
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
body: await parseErrorBody(output.body, context),
|
|
846
|
-
};
|
|
847
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
848
|
-
switch (errorCode) {
|
|
849
|
-
case "CustomKeyStoreNotFoundException":
|
|
850
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
851
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
852
|
-
case "InvalidMarkerException":
|
|
853
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
854
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
855
|
-
case "KMSInternalException":
|
|
856
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
857
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
858
|
-
default:
|
|
859
|
-
const parsedBody = parsedOutput.body;
|
|
860
|
-
return throwDefaultError({
|
|
861
|
-
output,
|
|
862
|
-
parsedBody,
|
|
863
|
-
errorCode,
|
|
864
|
-
});
|
|
531
|
+
export const de_GenerateDataKeyPairCommand = async (output, context) => {
|
|
532
|
+
if (output.statusCode >= 300) {
|
|
533
|
+
return de_CommandError(output, context);
|
|
865
534
|
}
|
|
535
|
+
const data = await parseBody(output.body, context);
|
|
536
|
+
let contents = {};
|
|
537
|
+
contents = de_GenerateDataKeyPairResponse(data, context);
|
|
538
|
+
const response = {
|
|
539
|
+
$metadata: deserializeMetadata(output),
|
|
540
|
+
...contents,
|
|
541
|
+
};
|
|
542
|
+
return response;
|
|
866
543
|
};
|
|
867
|
-
export const
|
|
544
|
+
export const de_GenerateDataKeyPairWithoutPlaintextCommand = async (output, context) => {
|
|
868
545
|
if (output.statusCode >= 300) {
|
|
869
|
-
return
|
|
546
|
+
return de_CommandError(output, context);
|
|
870
547
|
}
|
|
871
548
|
const data = await parseBody(output.body, context);
|
|
872
549
|
let contents = {};
|
|
873
|
-
contents =
|
|
550
|
+
contents = de_GenerateDataKeyPairWithoutPlaintextResponse(data, context);
|
|
874
551
|
const response = {
|
|
875
552
|
$metadata: deserializeMetadata(output),
|
|
876
553
|
...contents,
|
|
877
554
|
};
|
|
878
555
|
return response;
|
|
879
556
|
};
|
|
880
|
-
const
|
|
881
|
-
const parsedOutput = {
|
|
882
|
-
...output,
|
|
883
|
-
body: await parseErrorBody(output.body, context),
|
|
884
|
-
};
|
|
885
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
886
|
-
switch (errorCode) {
|
|
887
|
-
case "DependencyTimeoutException":
|
|
888
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
889
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
890
|
-
case "InvalidArnException":
|
|
891
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
892
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
893
|
-
case "KMSInternalException":
|
|
894
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
895
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
896
|
-
case "NotFoundException":
|
|
897
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
898
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
899
|
-
default:
|
|
900
|
-
const parsedBody = parsedOutput.body;
|
|
901
|
-
return throwDefaultError({
|
|
902
|
-
output,
|
|
903
|
-
parsedBody,
|
|
904
|
-
errorCode,
|
|
905
|
-
});
|
|
906
|
-
}
|
|
907
|
-
};
|
|
908
|
-
export const de_DisableKeyCommand = async (output, context) => {
|
|
557
|
+
export const de_GenerateDataKeyWithoutPlaintextCommand = async (output, context) => {
|
|
909
558
|
if (output.statusCode >= 300) {
|
|
910
|
-
return
|
|
559
|
+
return de_CommandError(output, context);
|
|
911
560
|
}
|
|
912
|
-
await
|
|
561
|
+
const data = await parseBody(output.body, context);
|
|
562
|
+
let contents = {};
|
|
563
|
+
contents = de_GenerateDataKeyWithoutPlaintextResponse(data, context);
|
|
913
564
|
const response = {
|
|
914
565
|
$metadata: deserializeMetadata(output),
|
|
566
|
+
...contents,
|
|
915
567
|
};
|
|
916
568
|
return response;
|
|
917
569
|
};
|
|
918
|
-
const
|
|
919
|
-
const parsedOutput = {
|
|
920
|
-
...output,
|
|
921
|
-
body: await parseErrorBody(output.body, context),
|
|
922
|
-
};
|
|
923
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
924
|
-
switch (errorCode) {
|
|
925
|
-
case "DependencyTimeoutException":
|
|
926
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
927
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
928
|
-
case "InvalidArnException":
|
|
929
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
930
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
931
|
-
case "KMSInternalException":
|
|
932
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
933
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
934
|
-
case "KMSInvalidStateException":
|
|
935
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
936
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
937
|
-
case "NotFoundException":
|
|
938
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
939
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
940
|
-
default:
|
|
941
|
-
const parsedBody = parsedOutput.body;
|
|
942
|
-
return throwDefaultError({
|
|
943
|
-
output,
|
|
944
|
-
parsedBody,
|
|
945
|
-
errorCode,
|
|
946
|
-
});
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
|
-
export const de_DisableKeyRotationCommand = async (output, context) => {
|
|
570
|
+
export const de_GenerateMacCommand = async (output, context) => {
|
|
950
571
|
if (output.statusCode >= 300) {
|
|
951
|
-
return
|
|
572
|
+
return de_CommandError(output, context);
|
|
952
573
|
}
|
|
953
|
-
await
|
|
574
|
+
const data = await parseBody(output.body, context);
|
|
575
|
+
let contents = {};
|
|
576
|
+
contents = de_GenerateMacResponse(data, context);
|
|
954
577
|
const response = {
|
|
955
578
|
$metadata: deserializeMetadata(output),
|
|
579
|
+
...contents,
|
|
956
580
|
};
|
|
957
581
|
return response;
|
|
958
582
|
};
|
|
959
|
-
const
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
body: await parseErrorBody(output.body, context),
|
|
963
|
-
};
|
|
964
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
965
|
-
switch (errorCode) {
|
|
966
|
-
case "DependencyTimeoutException":
|
|
967
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
968
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
969
|
-
case "DisabledException":
|
|
970
|
-
case "com.amazonaws.kms#DisabledException":
|
|
971
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
972
|
-
case "InvalidArnException":
|
|
973
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
974
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
975
|
-
case "KMSInternalException":
|
|
976
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
977
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
978
|
-
case "KMSInvalidStateException":
|
|
979
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
980
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
981
|
-
case "NotFoundException":
|
|
982
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
983
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
984
|
-
case "UnsupportedOperationException":
|
|
985
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
986
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
987
|
-
default:
|
|
988
|
-
const parsedBody = parsedOutput.body;
|
|
989
|
-
return throwDefaultError({
|
|
990
|
-
output,
|
|
991
|
-
parsedBody,
|
|
992
|
-
errorCode,
|
|
993
|
-
});
|
|
583
|
+
export const de_GenerateRandomCommand = async (output, context) => {
|
|
584
|
+
if (output.statusCode >= 300) {
|
|
585
|
+
return de_CommandError(output, context);
|
|
994
586
|
}
|
|
587
|
+
const data = await parseBody(output.body, context);
|
|
588
|
+
let contents = {};
|
|
589
|
+
contents = de_GenerateRandomResponse(data, context);
|
|
590
|
+
const response = {
|
|
591
|
+
$metadata: deserializeMetadata(output),
|
|
592
|
+
...contents,
|
|
593
|
+
};
|
|
594
|
+
return response;
|
|
995
595
|
};
|
|
996
|
-
export const
|
|
596
|
+
export const de_GetKeyPolicyCommand = async (output, context) => {
|
|
997
597
|
if (output.statusCode >= 300) {
|
|
998
|
-
return
|
|
598
|
+
return de_CommandError(output, context);
|
|
999
599
|
}
|
|
1000
600
|
const data = await parseBody(output.body, context);
|
|
1001
601
|
let contents = {};
|
|
@@ -1006,1293 +606,195 @@ export const de_DisconnectCustomKeyStoreCommand = async (output, context) => {
|
|
|
1006
606
|
};
|
|
1007
607
|
return response;
|
|
1008
608
|
};
|
|
1009
|
-
const
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
body: await parseErrorBody(output.body, context),
|
|
1013
|
-
};
|
|
1014
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1015
|
-
switch (errorCode) {
|
|
1016
|
-
case "CustomKeyStoreInvalidStateException":
|
|
1017
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
1018
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
1019
|
-
case "CustomKeyStoreNotFoundException":
|
|
1020
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
1021
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
1022
|
-
case "KMSInternalException":
|
|
1023
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1024
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1025
|
-
default:
|
|
1026
|
-
const parsedBody = parsedOutput.body;
|
|
1027
|
-
return throwDefaultError({
|
|
1028
|
-
output,
|
|
1029
|
-
parsedBody,
|
|
1030
|
-
errorCode,
|
|
1031
|
-
});
|
|
609
|
+
export const de_GetKeyRotationStatusCommand = async (output, context) => {
|
|
610
|
+
if (output.statusCode >= 300) {
|
|
611
|
+
return de_CommandError(output, context);
|
|
1032
612
|
}
|
|
613
|
+
const data = await parseBody(output.body, context);
|
|
614
|
+
let contents = {};
|
|
615
|
+
contents = _json(data);
|
|
616
|
+
const response = {
|
|
617
|
+
$metadata: deserializeMetadata(output),
|
|
618
|
+
...contents,
|
|
619
|
+
};
|
|
620
|
+
return response;
|
|
1033
621
|
};
|
|
1034
|
-
export const
|
|
622
|
+
export const de_GetParametersForImportCommand = async (output, context) => {
|
|
1035
623
|
if (output.statusCode >= 300) {
|
|
1036
|
-
return
|
|
624
|
+
return de_CommandError(output, context);
|
|
1037
625
|
}
|
|
1038
|
-
await
|
|
626
|
+
const data = await parseBody(output.body, context);
|
|
627
|
+
let contents = {};
|
|
628
|
+
contents = de_GetParametersForImportResponse(data, context);
|
|
1039
629
|
const response = {
|
|
1040
630
|
$metadata: deserializeMetadata(output),
|
|
631
|
+
...contents,
|
|
1041
632
|
};
|
|
1042
633
|
return response;
|
|
1043
634
|
};
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
body: await parseErrorBody(output.body, context),
|
|
1048
|
-
};
|
|
1049
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1050
|
-
switch (errorCode) {
|
|
1051
|
-
case "DependencyTimeoutException":
|
|
1052
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1053
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1054
|
-
case "InvalidArnException":
|
|
1055
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1056
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1057
|
-
case "KMSInternalException":
|
|
1058
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1059
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1060
|
-
case "KMSInvalidStateException":
|
|
1061
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1062
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1063
|
-
case "LimitExceededException":
|
|
1064
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
1065
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
1066
|
-
case "NotFoundException":
|
|
1067
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1068
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1069
|
-
default:
|
|
1070
|
-
const parsedBody = parsedOutput.body;
|
|
1071
|
-
return throwDefaultError({
|
|
1072
|
-
output,
|
|
1073
|
-
parsedBody,
|
|
1074
|
-
errorCode,
|
|
1075
|
-
});
|
|
635
|
+
export const de_GetPublicKeyCommand = async (output, context) => {
|
|
636
|
+
if (output.statusCode >= 300) {
|
|
637
|
+
return de_CommandError(output, context);
|
|
1076
638
|
}
|
|
639
|
+
const data = await parseBody(output.body, context);
|
|
640
|
+
let contents = {};
|
|
641
|
+
contents = de_GetPublicKeyResponse(data, context);
|
|
642
|
+
const response = {
|
|
643
|
+
$metadata: deserializeMetadata(output),
|
|
644
|
+
...contents,
|
|
645
|
+
};
|
|
646
|
+
return response;
|
|
1077
647
|
};
|
|
1078
|
-
export const
|
|
648
|
+
export const de_ImportKeyMaterialCommand = async (output, context) => {
|
|
1079
649
|
if (output.statusCode >= 300) {
|
|
1080
|
-
return
|
|
650
|
+
return de_CommandError(output, context);
|
|
1081
651
|
}
|
|
1082
|
-
await
|
|
652
|
+
const data = await parseBody(output.body, context);
|
|
653
|
+
let contents = {};
|
|
654
|
+
contents = _json(data);
|
|
1083
655
|
const response = {
|
|
1084
656
|
$metadata: deserializeMetadata(output),
|
|
657
|
+
...contents,
|
|
1085
658
|
};
|
|
1086
659
|
return response;
|
|
1087
660
|
};
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
body: await parseErrorBody(output.body, context),
|
|
1092
|
-
};
|
|
1093
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1094
|
-
switch (errorCode) {
|
|
1095
|
-
case "DependencyTimeoutException":
|
|
1096
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1097
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1098
|
-
case "DisabledException":
|
|
1099
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1100
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1101
|
-
case "InvalidArnException":
|
|
1102
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1103
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1104
|
-
case "KMSInternalException":
|
|
1105
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1106
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1107
|
-
case "KMSInvalidStateException":
|
|
1108
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1109
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1110
|
-
case "NotFoundException":
|
|
1111
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1112
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1113
|
-
case "UnsupportedOperationException":
|
|
1114
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1115
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1116
|
-
default:
|
|
1117
|
-
const parsedBody = parsedOutput.body;
|
|
1118
|
-
return throwDefaultError({
|
|
1119
|
-
output,
|
|
1120
|
-
parsedBody,
|
|
1121
|
-
errorCode,
|
|
1122
|
-
});
|
|
661
|
+
export const de_ListAliasesCommand = async (output, context) => {
|
|
662
|
+
if (output.statusCode >= 300) {
|
|
663
|
+
return de_CommandError(output, context);
|
|
1123
664
|
}
|
|
665
|
+
const data = await parseBody(output.body, context);
|
|
666
|
+
let contents = {};
|
|
667
|
+
contents = de_ListAliasesResponse(data, context);
|
|
668
|
+
const response = {
|
|
669
|
+
$metadata: deserializeMetadata(output),
|
|
670
|
+
...contents,
|
|
671
|
+
};
|
|
672
|
+
return response;
|
|
1124
673
|
};
|
|
1125
|
-
export const
|
|
674
|
+
export const de_ListGrantsCommand = async (output, context) => {
|
|
1126
675
|
if (output.statusCode >= 300) {
|
|
1127
|
-
return
|
|
676
|
+
return de_CommandError(output, context);
|
|
1128
677
|
}
|
|
1129
678
|
const data = await parseBody(output.body, context);
|
|
1130
679
|
let contents = {};
|
|
1131
|
-
contents =
|
|
680
|
+
contents = de_ListGrantsResponse(data, context);
|
|
1132
681
|
const response = {
|
|
1133
682
|
$metadata: deserializeMetadata(output),
|
|
1134
683
|
...contents,
|
|
1135
684
|
};
|
|
1136
685
|
return response;
|
|
1137
686
|
};
|
|
1138
|
-
const
|
|
1139
|
-
const parsedOutput = {
|
|
1140
|
-
...output,
|
|
1141
|
-
body: await parseErrorBody(output.body, context),
|
|
1142
|
-
};
|
|
1143
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1144
|
-
switch (errorCode) {
|
|
1145
|
-
case "DependencyTimeoutException":
|
|
1146
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1147
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1148
|
-
case "DisabledException":
|
|
1149
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1150
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1151
|
-
case "DryRunOperationException":
|
|
1152
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1153
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1154
|
-
case "InvalidGrantTokenException":
|
|
1155
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1156
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1157
|
-
case "InvalidKeyUsageException":
|
|
1158
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1159
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1160
|
-
case "KMSInternalException":
|
|
1161
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1162
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1163
|
-
case "KMSInvalidStateException":
|
|
1164
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1165
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1166
|
-
case "KeyUnavailableException":
|
|
1167
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1168
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1169
|
-
case "NotFoundException":
|
|
1170
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1171
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1172
|
-
default:
|
|
1173
|
-
const parsedBody = parsedOutput.body;
|
|
1174
|
-
return throwDefaultError({
|
|
1175
|
-
output,
|
|
1176
|
-
parsedBody,
|
|
1177
|
-
errorCode,
|
|
1178
|
-
});
|
|
1179
|
-
}
|
|
1180
|
-
};
|
|
1181
|
-
export const de_GenerateDataKeyCommand = async (output, context) => {
|
|
687
|
+
export const de_ListKeyPoliciesCommand = async (output, context) => {
|
|
1182
688
|
if (output.statusCode >= 300) {
|
|
1183
|
-
return
|
|
689
|
+
return de_CommandError(output, context);
|
|
1184
690
|
}
|
|
1185
691
|
const data = await parseBody(output.body, context);
|
|
1186
692
|
let contents = {};
|
|
1187
|
-
contents =
|
|
693
|
+
contents = _json(data);
|
|
1188
694
|
const response = {
|
|
1189
695
|
$metadata: deserializeMetadata(output),
|
|
1190
696
|
...contents,
|
|
1191
697
|
};
|
|
1192
698
|
return response;
|
|
1193
699
|
};
|
|
1194
|
-
const
|
|
1195
|
-
const parsedOutput = {
|
|
1196
|
-
...output,
|
|
1197
|
-
body: await parseErrorBody(output.body, context),
|
|
1198
|
-
};
|
|
1199
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1200
|
-
switch (errorCode) {
|
|
1201
|
-
case "DependencyTimeoutException":
|
|
1202
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1203
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1204
|
-
case "DisabledException":
|
|
1205
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1206
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1207
|
-
case "DryRunOperationException":
|
|
1208
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1209
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1210
|
-
case "InvalidGrantTokenException":
|
|
1211
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1212
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1213
|
-
case "InvalidKeyUsageException":
|
|
1214
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1215
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1216
|
-
case "KMSInternalException":
|
|
1217
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1218
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1219
|
-
case "KMSInvalidStateException":
|
|
1220
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1221
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1222
|
-
case "KeyUnavailableException":
|
|
1223
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1224
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1225
|
-
case "NotFoundException":
|
|
1226
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1227
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1228
|
-
default:
|
|
1229
|
-
const parsedBody = parsedOutput.body;
|
|
1230
|
-
return throwDefaultError({
|
|
1231
|
-
output,
|
|
1232
|
-
parsedBody,
|
|
1233
|
-
errorCode,
|
|
1234
|
-
});
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
|
-
export const de_GenerateDataKeyPairCommand = async (output, context) => {
|
|
700
|
+
export const de_ListKeysCommand = async (output, context) => {
|
|
1238
701
|
if (output.statusCode >= 300) {
|
|
1239
|
-
return
|
|
702
|
+
return de_CommandError(output, context);
|
|
1240
703
|
}
|
|
1241
704
|
const data = await parseBody(output.body, context);
|
|
1242
705
|
let contents = {};
|
|
1243
|
-
contents =
|
|
706
|
+
contents = _json(data);
|
|
1244
707
|
const response = {
|
|
1245
708
|
$metadata: deserializeMetadata(output),
|
|
1246
709
|
...contents,
|
|
1247
710
|
};
|
|
1248
711
|
return response;
|
|
1249
712
|
};
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
body: await parseErrorBody(output.body, context),
|
|
1254
|
-
};
|
|
1255
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1256
|
-
switch (errorCode) {
|
|
1257
|
-
case "DependencyTimeoutException":
|
|
1258
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1259
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1260
|
-
case "DisabledException":
|
|
1261
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1262
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1263
|
-
case "DryRunOperationException":
|
|
1264
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1265
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1266
|
-
case "InvalidGrantTokenException":
|
|
1267
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1268
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1269
|
-
case "InvalidKeyUsageException":
|
|
1270
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1271
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1272
|
-
case "KMSInternalException":
|
|
1273
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1274
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1275
|
-
case "KMSInvalidStateException":
|
|
1276
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1277
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1278
|
-
case "KeyUnavailableException":
|
|
1279
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1280
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1281
|
-
case "NotFoundException":
|
|
1282
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1283
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1284
|
-
case "UnsupportedOperationException":
|
|
1285
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1286
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1287
|
-
default:
|
|
1288
|
-
const parsedBody = parsedOutput.body;
|
|
1289
|
-
return throwDefaultError({
|
|
1290
|
-
output,
|
|
1291
|
-
parsedBody,
|
|
1292
|
-
errorCode,
|
|
1293
|
-
});
|
|
713
|
+
export const de_ListResourceTagsCommand = async (output, context) => {
|
|
714
|
+
if (output.statusCode >= 300) {
|
|
715
|
+
return de_CommandError(output, context);
|
|
1294
716
|
}
|
|
717
|
+
const data = await parseBody(output.body, context);
|
|
718
|
+
let contents = {};
|
|
719
|
+
contents = _json(data);
|
|
720
|
+
const response = {
|
|
721
|
+
$metadata: deserializeMetadata(output),
|
|
722
|
+
...contents,
|
|
723
|
+
};
|
|
724
|
+
return response;
|
|
1295
725
|
};
|
|
1296
|
-
export const
|
|
726
|
+
export const de_ListRetirableGrantsCommand = async (output, context) => {
|
|
1297
727
|
if (output.statusCode >= 300) {
|
|
1298
|
-
return
|
|
728
|
+
return de_CommandError(output, context);
|
|
1299
729
|
}
|
|
1300
730
|
const data = await parseBody(output.body, context);
|
|
1301
731
|
let contents = {};
|
|
1302
|
-
contents =
|
|
732
|
+
contents = de_ListGrantsResponse(data, context);
|
|
1303
733
|
const response = {
|
|
1304
734
|
$metadata: deserializeMetadata(output),
|
|
1305
735
|
...contents,
|
|
1306
736
|
};
|
|
1307
737
|
return response;
|
|
1308
738
|
};
|
|
1309
|
-
const
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
body: await parseErrorBody(output.body, context),
|
|
1313
|
-
};
|
|
1314
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1315
|
-
switch (errorCode) {
|
|
1316
|
-
case "DependencyTimeoutException":
|
|
1317
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1318
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1319
|
-
case "DisabledException":
|
|
1320
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1321
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1322
|
-
case "DryRunOperationException":
|
|
1323
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1324
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1325
|
-
case "InvalidGrantTokenException":
|
|
1326
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1327
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1328
|
-
case "InvalidKeyUsageException":
|
|
1329
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1330
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1331
|
-
case "KMSInternalException":
|
|
1332
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1333
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1334
|
-
case "KMSInvalidStateException":
|
|
1335
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1336
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1337
|
-
case "KeyUnavailableException":
|
|
1338
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1339
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1340
|
-
case "NotFoundException":
|
|
1341
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1342
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1343
|
-
case "UnsupportedOperationException":
|
|
1344
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1345
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1346
|
-
default:
|
|
1347
|
-
const parsedBody = parsedOutput.body;
|
|
1348
|
-
return throwDefaultError({
|
|
1349
|
-
output,
|
|
1350
|
-
parsedBody,
|
|
1351
|
-
errorCode,
|
|
1352
|
-
});
|
|
739
|
+
export const de_PutKeyPolicyCommand = async (output, context) => {
|
|
740
|
+
if (output.statusCode >= 300) {
|
|
741
|
+
return de_CommandError(output, context);
|
|
1353
742
|
}
|
|
743
|
+
await collectBody(output.body, context);
|
|
744
|
+
const response = {
|
|
745
|
+
$metadata: deserializeMetadata(output),
|
|
746
|
+
};
|
|
747
|
+
return response;
|
|
1354
748
|
};
|
|
1355
|
-
export const
|
|
749
|
+
export const de_ReEncryptCommand = async (output, context) => {
|
|
1356
750
|
if (output.statusCode >= 300) {
|
|
1357
|
-
return
|
|
751
|
+
return de_CommandError(output, context);
|
|
1358
752
|
}
|
|
1359
753
|
const data = await parseBody(output.body, context);
|
|
1360
754
|
let contents = {};
|
|
1361
|
-
contents =
|
|
755
|
+
contents = de_ReEncryptResponse(data, context);
|
|
1362
756
|
const response = {
|
|
1363
757
|
$metadata: deserializeMetadata(output),
|
|
1364
758
|
...contents,
|
|
1365
759
|
};
|
|
1366
760
|
return response;
|
|
1367
761
|
};
|
|
1368
|
-
const
|
|
1369
|
-
const parsedOutput = {
|
|
1370
|
-
...output,
|
|
1371
|
-
body: await parseErrorBody(output.body, context),
|
|
1372
|
-
};
|
|
1373
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1374
|
-
switch (errorCode) {
|
|
1375
|
-
case "DependencyTimeoutException":
|
|
1376
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1377
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1378
|
-
case "DisabledException":
|
|
1379
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1380
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1381
|
-
case "DryRunOperationException":
|
|
1382
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1383
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1384
|
-
case "InvalidGrantTokenException":
|
|
1385
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1386
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1387
|
-
case "InvalidKeyUsageException":
|
|
1388
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1389
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1390
|
-
case "KMSInternalException":
|
|
1391
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1392
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1393
|
-
case "KMSInvalidStateException":
|
|
1394
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1395
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1396
|
-
case "KeyUnavailableException":
|
|
1397
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1398
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1399
|
-
case "NotFoundException":
|
|
1400
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1401
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1402
|
-
default:
|
|
1403
|
-
const parsedBody = parsedOutput.body;
|
|
1404
|
-
return throwDefaultError({
|
|
1405
|
-
output,
|
|
1406
|
-
parsedBody,
|
|
1407
|
-
errorCode,
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
};
|
|
1411
|
-
export const de_GenerateMacCommand = async (output, context) => {
|
|
762
|
+
export const de_ReplicateKeyCommand = async (output, context) => {
|
|
1412
763
|
if (output.statusCode >= 300) {
|
|
1413
|
-
return
|
|
764
|
+
return de_CommandError(output, context);
|
|
1414
765
|
}
|
|
1415
766
|
const data = await parseBody(output.body, context);
|
|
1416
767
|
let contents = {};
|
|
1417
|
-
contents =
|
|
768
|
+
contents = de_ReplicateKeyResponse(data, context);
|
|
1418
769
|
const response = {
|
|
1419
770
|
$metadata: deserializeMetadata(output),
|
|
1420
771
|
...contents,
|
|
1421
772
|
};
|
|
1422
773
|
return response;
|
|
1423
774
|
};
|
|
1424
|
-
const
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
775
|
+
export const de_RetireGrantCommand = async (output, context) => {
|
|
776
|
+
if (output.statusCode >= 300) {
|
|
777
|
+
return de_CommandError(output, context);
|
|
778
|
+
}
|
|
779
|
+
await collectBody(output.body, context);
|
|
780
|
+
const response = {
|
|
781
|
+
$metadata: deserializeMetadata(output),
|
|
1428
782
|
};
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
case "DryRunOperationException":
|
|
1435
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
1436
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
1437
|
-
case "InvalidGrantTokenException":
|
|
1438
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1439
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1440
|
-
case "InvalidKeyUsageException":
|
|
1441
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1442
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1443
|
-
case "KMSInternalException":
|
|
1444
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1445
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1446
|
-
case "KMSInvalidStateException":
|
|
1447
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1448
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1449
|
-
case "KeyUnavailableException":
|
|
1450
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1451
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1452
|
-
case "NotFoundException":
|
|
1453
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1454
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1455
|
-
default:
|
|
1456
|
-
const parsedBody = parsedOutput.body;
|
|
1457
|
-
return throwDefaultError({
|
|
1458
|
-
output,
|
|
1459
|
-
parsedBody,
|
|
1460
|
-
errorCode,
|
|
1461
|
-
});
|
|
1462
|
-
}
|
|
1463
|
-
};
|
|
1464
|
-
export const de_GenerateRandomCommand = async (output, context) => {
|
|
1465
|
-
if (output.statusCode >= 300) {
|
|
1466
|
-
return de_GenerateRandomCommandError(output, context);
|
|
1467
|
-
}
|
|
1468
|
-
const data = await parseBody(output.body, context);
|
|
1469
|
-
let contents = {};
|
|
1470
|
-
contents = de_GenerateRandomResponse(data, context);
|
|
1471
|
-
const response = {
|
|
1472
|
-
$metadata: deserializeMetadata(output),
|
|
1473
|
-
...contents,
|
|
1474
|
-
};
|
|
1475
|
-
return response;
|
|
1476
|
-
};
|
|
1477
|
-
const de_GenerateRandomCommandError = async (output, context) => {
|
|
1478
|
-
const parsedOutput = {
|
|
1479
|
-
...output,
|
|
1480
|
-
body: await parseErrorBody(output.body, context),
|
|
1481
|
-
};
|
|
1482
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1483
|
-
switch (errorCode) {
|
|
1484
|
-
case "CustomKeyStoreInvalidStateException":
|
|
1485
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
1486
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
1487
|
-
case "CustomKeyStoreNotFoundException":
|
|
1488
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
1489
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
1490
|
-
case "DependencyTimeoutException":
|
|
1491
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1492
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1493
|
-
case "KMSInternalException":
|
|
1494
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1495
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1496
|
-
case "UnsupportedOperationException":
|
|
1497
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1498
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1499
|
-
default:
|
|
1500
|
-
const parsedBody = parsedOutput.body;
|
|
1501
|
-
return throwDefaultError({
|
|
1502
|
-
output,
|
|
1503
|
-
parsedBody,
|
|
1504
|
-
errorCode,
|
|
1505
|
-
});
|
|
1506
|
-
}
|
|
1507
|
-
};
|
|
1508
|
-
export const de_GetKeyPolicyCommand = async (output, context) => {
|
|
1509
|
-
if (output.statusCode >= 300) {
|
|
1510
|
-
return de_GetKeyPolicyCommandError(output, context);
|
|
1511
|
-
}
|
|
1512
|
-
const data = await parseBody(output.body, context);
|
|
1513
|
-
let contents = {};
|
|
1514
|
-
contents = _json(data);
|
|
1515
|
-
const response = {
|
|
1516
|
-
$metadata: deserializeMetadata(output),
|
|
1517
|
-
...contents,
|
|
1518
|
-
};
|
|
1519
|
-
return response;
|
|
1520
|
-
};
|
|
1521
|
-
const de_GetKeyPolicyCommandError = async (output, context) => {
|
|
1522
|
-
const parsedOutput = {
|
|
1523
|
-
...output,
|
|
1524
|
-
body: await parseErrorBody(output.body, context),
|
|
1525
|
-
};
|
|
1526
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1527
|
-
switch (errorCode) {
|
|
1528
|
-
case "DependencyTimeoutException":
|
|
1529
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1530
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1531
|
-
case "InvalidArnException":
|
|
1532
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1533
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1534
|
-
case "KMSInternalException":
|
|
1535
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1536
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1537
|
-
case "KMSInvalidStateException":
|
|
1538
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1539
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1540
|
-
case "NotFoundException":
|
|
1541
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1542
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1543
|
-
default:
|
|
1544
|
-
const parsedBody = parsedOutput.body;
|
|
1545
|
-
return throwDefaultError({
|
|
1546
|
-
output,
|
|
1547
|
-
parsedBody,
|
|
1548
|
-
errorCode,
|
|
1549
|
-
});
|
|
1550
|
-
}
|
|
1551
|
-
};
|
|
1552
|
-
export const de_GetKeyRotationStatusCommand = async (output, context) => {
|
|
1553
|
-
if (output.statusCode >= 300) {
|
|
1554
|
-
return de_GetKeyRotationStatusCommandError(output, context);
|
|
1555
|
-
}
|
|
1556
|
-
const data = await parseBody(output.body, context);
|
|
1557
|
-
let contents = {};
|
|
1558
|
-
contents = _json(data);
|
|
1559
|
-
const response = {
|
|
1560
|
-
$metadata: deserializeMetadata(output),
|
|
1561
|
-
...contents,
|
|
1562
|
-
};
|
|
1563
|
-
return response;
|
|
1564
|
-
};
|
|
1565
|
-
const de_GetKeyRotationStatusCommandError = async (output, context) => {
|
|
1566
|
-
const parsedOutput = {
|
|
1567
|
-
...output,
|
|
1568
|
-
body: await parseErrorBody(output.body, context),
|
|
1569
|
-
};
|
|
1570
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1571
|
-
switch (errorCode) {
|
|
1572
|
-
case "DependencyTimeoutException":
|
|
1573
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1574
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1575
|
-
case "InvalidArnException":
|
|
1576
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1577
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1578
|
-
case "KMSInternalException":
|
|
1579
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1580
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1581
|
-
case "KMSInvalidStateException":
|
|
1582
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1583
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1584
|
-
case "NotFoundException":
|
|
1585
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1586
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1587
|
-
case "UnsupportedOperationException":
|
|
1588
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1589
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1590
|
-
default:
|
|
1591
|
-
const parsedBody = parsedOutput.body;
|
|
1592
|
-
return throwDefaultError({
|
|
1593
|
-
output,
|
|
1594
|
-
parsedBody,
|
|
1595
|
-
errorCode,
|
|
1596
|
-
});
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
export const de_GetParametersForImportCommand = async (output, context) => {
|
|
1600
|
-
if (output.statusCode >= 300) {
|
|
1601
|
-
return de_GetParametersForImportCommandError(output, context);
|
|
1602
|
-
}
|
|
1603
|
-
const data = await parseBody(output.body, context);
|
|
1604
|
-
let contents = {};
|
|
1605
|
-
contents = de_GetParametersForImportResponse(data, context);
|
|
1606
|
-
const response = {
|
|
1607
|
-
$metadata: deserializeMetadata(output),
|
|
1608
|
-
...contents,
|
|
1609
|
-
};
|
|
1610
|
-
return response;
|
|
1611
|
-
};
|
|
1612
|
-
const de_GetParametersForImportCommandError = async (output, context) => {
|
|
1613
|
-
const parsedOutput = {
|
|
1614
|
-
...output,
|
|
1615
|
-
body: await parseErrorBody(output.body, context),
|
|
1616
|
-
};
|
|
1617
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1618
|
-
switch (errorCode) {
|
|
1619
|
-
case "DependencyTimeoutException":
|
|
1620
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1621
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1622
|
-
case "InvalidArnException":
|
|
1623
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1624
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1625
|
-
case "KMSInternalException":
|
|
1626
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1627
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1628
|
-
case "KMSInvalidStateException":
|
|
1629
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1630
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1631
|
-
case "NotFoundException":
|
|
1632
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1633
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1634
|
-
case "UnsupportedOperationException":
|
|
1635
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1636
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1637
|
-
default:
|
|
1638
|
-
const parsedBody = parsedOutput.body;
|
|
1639
|
-
return throwDefaultError({
|
|
1640
|
-
output,
|
|
1641
|
-
parsedBody,
|
|
1642
|
-
errorCode,
|
|
1643
|
-
});
|
|
1644
|
-
}
|
|
1645
|
-
};
|
|
1646
|
-
export const de_GetPublicKeyCommand = async (output, context) => {
|
|
1647
|
-
if (output.statusCode >= 300) {
|
|
1648
|
-
return de_GetPublicKeyCommandError(output, context);
|
|
1649
|
-
}
|
|
1650
|
-
const data = await parseBody(output.body, context);
|
|
1651
|
-
let contents = {};
|
|
1652
|
-
contents = de_GetPublicKeyResponse(data, context);
|
|
1653
|
-
const response = {
|
|
1654
|
-
$metadata: deserializeMetadata(output),
|
|
1655
|
-
...contents,
|
|
1656
|
-
};
|
|
1657
|
-
return response;
|
|
1658
|
-
};
|
|
1659
|
-
const de_GetPublicKeyCommandError = async (output, context) => {
|
|
1660
|
-
const parsedOutput = {
|
|
1661
|
-
...output,
|
|
1662
|
-
body: await parseErrorBody(output.body, context),
|
|
1663
|
-
};
|
|
1664
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1665
|
-
switch (errorCode) {
|
|
1666
|
-
case "DependencyTimeoutException":
|
|
1667
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1668
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1669
|
-
case "DisabledException":
|
|
1670
|
-
case "com.amazonaws.kms#DisabledException":
|
|
1671
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
1672
|
-
case "InvalidArnException":
|
|
1673
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1674
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1675
|
-
case "InvalidGrantTokenException":
|
|
1676
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
1677
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1678
|
-
case "InvalidKeyUsageException":
|
|
1679
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
1680
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
1681
|
-
case "KMSInternalException":
|
|
1682
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1683
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1684
|
-
case "KMSInvalidStateException":
|
|
1685
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1686
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1687
|
-
case "KeyUnavailableException":
|
|
1688
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
1689
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
1690
|
-
case "NotFoundException":
|
|
1691
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1692
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1693
|
-
case "UnsupportedOperationException":
|
|
1694
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1695
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1696
|
-
default:
|
|
1697
|
-
const parsedBody = parsedOutput.body;
|
|
1698
|
-
return throwDefaultError({
|
|
1699
|
-
output,
|
|
1700
|
-
parsedBody,
|
|
1701
|
-
errorCode,
|
|
1702
|
-
});
|
|
1703
|
-
}
|
|
1704
|
-
};
|
|
1705
|
-
export const de_ImportKeyMaterialCommand = async (output, context) => {
|
|
1706
|
-
if (output.statusCode >= 300) {
|
|
1707
|
-
return de_ImportKeyMaterialCommandError(output, context);
|
|
1708
|
-
}
|
|
1709
|
-
const data = await parseBody(output.body, context);
|
|
1710
|
-
let contents = {};
|
|
1711
|
-
contents = _json(data);
|
|
1712
|
-
const response = {
|
|
1713
|
-
$metadata: deserializeMetadata(output),
|
|
1714
|
-
...contents,
|
|
1715
|
-
};
|
|
1716
|
-
return response;
|
|
1717
|
-
};
|
|
1718
|
-
const de_ImportKeyMaterialCommandError = async (output, context) => {
|
|
1719
|
-
const parsedOutput = {
|
|
1720
|
-
...output,
|
|
1721
|
-
body: await parseErrorBody(output.body, context),
|
|
1722
|
-
};
|
|
1723
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1724
|
-
switch (errorCode) {
|
|
1725
|
-
case "DependencyTimeoutException":
|
|
1726
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1727
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1728
|
-
case "ExpiredImportTokenException":
|
|
1729
|
-
case "com.amazonaws.kms#ExpiredImportTokenException":
|
|
1730
|
-
throw await de_ExpiredImportTokenExceptionRes(parsedOutput, context);
|
|
1731
|
-
case "IncorrectKeyMaterialException":
|
|
1732
|
-
case "com.amazonaws.kms#IncorrectKeyMaterialException":
|
|
1733
|
-
throw await de_IncorrectKeyMaterialExceptionRes(parsedOutput, context);
|
|
1734
|
-
case "InvalidArnException":
|
|
1735
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1736
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1737
|
-
case "InvalidCiphertextException":
|
|
1738
|
-
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
1739
|
-
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
1740
|
-
case "InvalidImportTokenException":
|
|
1741
|
-
case "com.amazonaws.kms#InvalidImportTokenException":
|
|
1742
|
-
throw await de_InvalidImportTokenExceptionRes(parsedOutput, context);
|
|
1743
|
-
case "KMSInternalException":
|
|
1744
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1745
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1746
|
-
case "KMSInvalidStateException":
|
|
1747
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1748
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1749
|
-
case "NotFoundException":
|
|
1750
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1751
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1752
|
-
case "UnsupportedOperationException":
|
|
1753
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1754
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1755
|
-
default:
|
|
1756
|
-
const parsedBody = parsedOutput.body;
|
|
1757
|
-
return throwDefaultError({
|
|
1758
|
-
output,
|
|
1759
|
-
parsedBody,
|
|
1760
|
-
errorCode,
|
|
1761
|
-
});
|
|
1762
|
-
}
|
|
1763
|
-
};
|
|
1764
|
-
export const de_ListAliasesCommand = async (output, context) => {
|
|
1765
|
-
if (output.statusCode >= 300) {
|
|
1766
|
-
return de_ListAliasesCommandError(output, context);
|
|
1767
|
-
}
|
|
1768
|
-
const data = await parseBody(output.body, context);
|
|
1769
|
-
let contents = {};
|
|
1770
|
-
contents = de_ListAliasesResponse(data, context);
|
|
1771
|
-
const response = {
|
|
1772
|
-
$metadata: deserializeMetadata(output),
|
|
1773
|
-
...contents,
|
|
1774
|
-
};
|
|
1775
|
-
return response;
|
|
1776
|
-
};
|
|
1777
|
-
const de_ListAliasesCommandError = async (output, context) => {
|
|
1778
|
-
const parsedOutput = {
|
|
1779
|
-
...output,
|
|
1780
|
-
body: await parseErrorBody(output.body, context),
|
|
1781
|
-
};
|
|
1782
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1783
|
-
switch (errorCode) {
|
|
1784
|
-
case "DependencyTimeoutException":
|
|
1785
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1786
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1787
|
-
case "InvalidArnException":
|
|
1788
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1789
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1790
|
-
case "InvalidMarkerException":
|
|
1791
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1792
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1793
|
-
case "KMSInternalException":
|
|
1794
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1795
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1796
|
-
case "NotFoundException":
|
|
1797
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1798
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1799
|
-
default:
|
|
1800
|
-
const parsedBody = parsedOutput.body;
|
|
1801
|
-
return throwDefaultError({
|
|
1802
|
-
output,
|
|
1803
|
-
parsedBody,
|
|
1804
|
-
errorCode,
|
|
1805
|
-
});
|
|
1806
|
-
}
|
|
1807
|
-
};
|
|
1808
|
-
export const de_ListGrantsCommand = async (output, context) => {
|
|
1809
|
-
if (output.statusCode >= 300) {
|
|
1810
|
-
return de_ListGrantsCommandError(output, context);
|
|
1811
|
-
}
|
|
1812
|
-
const data = await parseBody(output.body, context);
|
|
1813
|
-
let contents = {};
|
|
1814
|
-
contents = de_ListGrantsResponse(data, context);
|
|
1815
|
-
const response = {
|
|
1816
|
-
$metadata: deserializeMetadata(output),
|
|
1817
|
-
...contents,
|
|
1818
|
-
};
|
|
1819
|
-
return response;
|
|
1820
|
-
};
|
|
1821
|
-
const de_ListGrantsCommandError = async (output, context) => {
|
|
1822
|
-
const parsedOutput = {
|
|
1823
|
-
...output,
|
|
1824
|
-
body: await parseErrorBody(output.body, context),
|
|
1825
|
-
};
|
|
1826
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1827
|
-
switch (errorCode) {
|
|
1828
|
-
case "DependencyTimeoutException":
|
|
1829
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1830
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1831
|
-
case "InvalidArnException":
|
|
1832
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1833
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1834
|
-
case "InvalidGrantIdException":
|
|
1835
|
-
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
1836
|
-
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
1837
|
-
case "InvalidMarkerException":
|
|
1838
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1839
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1840
|
-
case "KMSInternalException":
|
|
1841
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1842
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1843
|
-
case "KMSInvalidStateException":
|
|
1844
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1845
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1846
|
-
case "NotFoundException":
|
|
1847
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1848
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1849
|
-
default:
|
|
1850
|
-
const parsedBody = parsedOutput.body;
|
|
1851
|
-
return throwDefaultError({
|
|
1852
|
-
output,
|
|
1853
|
-
parsedBody,
|
|
1854
|
-
errorCode,
|
|
1855
|
-
});
|
|
1856
|
-
}
|
|
1857
|
-
};
|
|
1858
|
-
export const de_ListKeyPoliciesCommand = async (output, context) => {
|
|
1859
|
-
if (output.statusCode >= 300) {
|
|
1860
|
-
return de_ListKeyPoliciesCommandError(output, context);
|
|
1861
|
-
}
|
|
1862
|
-
const data = await parseBody(output.body, context);
|
|
1863
|
-
let contents = {};
|
|
1864
|
-
contents = _json(data);
|
|
1865
|
-
const response = {
|
|
1866
|
-
$metadata: deserializeMetadata(output),
|
|
1867
|
-
...contents,
|
|
1868
|
-
};
|
|
1869
|
-
return response;
|
|
1870
|
-
};
|
|
1871
|
-
const de_ListKeyPoliciesCommandError = async (output, context) => {
|
|
1872
|
-
const parsedOutput = {
|
|
1873
|
-
...output,
|
|
1874
|
-
body: await parseErrorBody(output.body, context),
|
|
1875
|
-
};
|
|
1876
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1877
|
-
switch (errorCode) {
|
|
1878
|
-
case "DependencyTimeoutException":
|
|
1879
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1880
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1881
|
-
case "InvalidArnException":
|
|
1882
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1883
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1884
|
-
case "KMSInternalException":
|
|
1885
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1886
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1887
|
-
case "KMSInvalidStateException":
|
|
1888
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
1889
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
1890
|
-
case "NotFoundException":
|
|
1891
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1892
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1893
|
-
default:
|
|
1894
|
-
const parsedBody = parsedOutput.body;
|
|
1895
|
-
return throwDefaultError({
|
|
1896
|
-
output,
|
|
1897
|
-
parsedBody,
|
|
1898
|
-
errorCode,
|
|
1899
|
-
});
|
|
1900
|
-
}
|
|
1901
|
-
};
|
|
1902
|
-
export const de_ListKeysCommand = async (output, context) => {
|
|
1903
|
-
if (output.statusCode >= 300) {
|
|
1904
|
-
return de_ListKeysCommandError(output, context);
|
|
1905
|
-
}
|
|
1906
|
-
const data = await parseBody(output.body, context);
|
|
1907
|
-
let contents = {};
|
|
1908
|
-
contents = _json(data);
|
|
1909
|
-
const response = {
|
|
1910
|
-
$metadata: deserializeMetadata(output),
|
|
1911
|
-
...contents,
|
|
1912
|
-
};
|
|
1913
|
-
return response;
|
|
1914
|
-
};
|
|
1915
|
-
const de_ListKeysCommandError = async (output, context) => {
|
|
1916
|
-
const parsedOutput = {
|
|
1917
|
-
...output,
|
|
1918
|
-
body: await parseErrorBody(output.body, context),
|
|
1919
|
-
};
|
|
1920
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1921
|
-
switch (errorCode) {
|
|
1922
|
-
case "DependencyTimeoutException":
|
|
1923
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
1924
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
1925
|
-
case "InvalidMarkerException":
|
|
1926
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1927
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1928
|
-
case "KMSInternalException":
|
|
1929
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1930
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1931
|
-
default:
|
|
1932
|
-
const parsedBody = parsedOutput.body;
|
|
1933
|
-
return throwDefaultError({
|
|
1934
|
-
output,
|
|
1935
|
-
parsedBody,
|
|
1936
|
-
errorCode,
|
|
1937
|
-
});
|
|
1938
|
-
}
|
|
1939
|
-
};
|
|
1940
|
-
export const de_ListResourceTagsCommand = async (output, context) => {
|
|
1941
|
-
if (output.statusCode >= 300) {
|
|
1942
|
-
return de_ListResourceTagsCommandError(output, context);
|
|
1943
|
-
}
|
|
1944
|
-
const data = await parseBody(output.body, context);
|
|
1945
|
-
let contents = {};
|
|
1946
|
-
contents = _json(data);
|
|
1947
|
-
const response = {
|
|
1948
|
-
$metadata: deserializeMetadata(output),
|
|
1949
|
-
...contents,
|
|
1950
|
-
};
|
|
1951
|
-
return response;
|
|
1952
|
-
};
|
|
1953
|
-
const de_ListResourceTagsCommandError = async (output, context) => {
|
|
1954
|
-
const parsedOutput = {
|
|
1955
|
-
...output,
|
|
1956
|
-
body: await parseErrorBody(output.body, context),
|
|
1957
|
-
};
|
|
1958
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1959
|
-
switch (errorCode) {
|
|
1960
|
-
case "InvalidArnException":
|
|
1961
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
1962
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
1963
|
-
case "InvalidMarkerException":
|
|
1964
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1965
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1966
|
-
case "KMSInternalException":
|
|
1967
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
1968
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
1969
|
-
case "NotFoundException":
|
|
1970
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
1971
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
1972
|
-
default:
|
|
1973
|
-
const parsedBody = parsedOutput.body;
|
|
1974
|
-
return throwDefaultError({
|
|
1975
|
-
output,
|
|
1976
|
-
parsedBody,
|
|
1977
|
-
errorCode,
|
|
1978
|
-
});
|
|
1979
|
-
}
|
|
1980
|
-
};
|
|
1981
|
-
export const de_ListRetirableGrantsCommand = async (output, context) => {
|
|
1982
|
-
if (output.statusCode >= 300) {
|
|
1983
|
-
return de_ListRetirableGrantsCommandError(output, context);
|
|
1984
|
-
}
|
|
1985
|
-
const data = await parseBody(output.body, context);
|
|
1986
|
-
let contents = {};
|
|
1987
|
-
contents = de_ListGrantsResponse(data, context);
|
|
1988
|
-
const response = {
|
|
1989
|
-
$metadata: deserializeMetadata(output),
|
|
1990
|
-
...contents,
|
|
1991
|
-
};
|
|
1992
|
-
return response;
|
|
1993
|
-
};
|
|
1994
|
-
const de_ListRetirableGrantsCommandError = async (output, context) => {
|
|
1995
|
-
const parsedOutput = {
|
|
1996
|
-
...output,
|
|
1997
|
-
body: await parseErrorBody(output.body, context),
|
|
1998
|
-
};
|
|
1999
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2000
|
-
switch (errorCode) {
|
|
2001
|
-
case "DependencyTimeoutException":
|
|
2002
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2003
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2004
|
-
case "InvalidArnException":
|
|
2005
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2006
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2007
|
-
case "InvalidMarkerException":
|
|
2008
|
-
case "com.amazonaws.kms#InvalidMarkerException":
|
|
2009
|
-
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
2010
|
-
case "KMSInternalException":
|
|
2011
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2012
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2013
|
-
case "NotFoundException":
|
|
2014
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2015
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2016
|
-
default:
|
|
2017
|
-
const parsedBody = parsedOutput.body;
|
|
2018
|
-
return throwDefaultError({
|
|
2019
|
-
output,
|
|
2020
|
-
parsedBody,
|
|
2021
|
-
errorCode,
|
|
2022
|
-
});
|
|
2023
|
-
}
|
|
2024
|
-
};
|
|
2025
|
-
export const de_PutKeyPolicyCommand = async (output, context) => {
|
|
2026
|
-
if (output.statusCode >= 300) {
|
|
2027
|
-
return de_PutKeyPolicyCommandError(output, context);
|
|
2028
|
-
}
|
|
2029
|
-
await collectBody(output.body, context);
|
|
2030
|
-
const response = {
|
|
2031
|
-
$metadata: deserializeMetadata(output),
|
|
2032
|
-
};
|
|
2033
|
-
return response;
|
|
2034
|
-
};
|
|
2035
|
-
const de_PutKeyPolicyCommandError = async (output, context) => {
|
|
2036
|
-
const parsedOutput = {
|
|
2037
|
-
...output,
|
|
2038
|
-
body: await parseErrorBody(output.body, context),
|
|
2039
|
-
};
|
|
2040
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2041
|
-
switch (errorCode) {
|
|
2042
|
-
case "DependencyTimeoutException":
|
|
2043
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2044
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2045
|
-
case "InvalidArnException":
|
|
2046
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2047
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2048
|
-
case "KMSInternalException":
|
|
2049
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2050
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2051
|
-
case "KMSInvalidStateException":
|
|
2052
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2053
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2054
|
-
case "LimitExceededException":
|
|
2055
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2056
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2057
|
-
case "MalformedPolicyDocumentException":
|
|
2058
|
-
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
2059
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
2060
|
-
case "NotFoundException":
|
|
2061
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2062
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2063
|
-
case "UnsupportedOperationException":
|
|
2064
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
2065
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
2066
|
-
default:
|
|
2067
|
-
const parsedBody = parsedOutput.body;
|
|
2068
|
-
return throwDefaultError({
|
|
2069
|
-
output,
|
|
2070
|
-
parsedBody,
|
|
2071
|
-
errorCode,
|
|
2072
|
-
});
|
|
2073
|
-
}
|
|
2074
|
-
};
|
|
2075
|
-
export const de_ReEncryptCommand = async (output, context) => {
|
|
2076
|
-
if (output.statusCode >= 300) {
|
|
2077
|
-
return de_ReEncryptCommandError(output, context);
|
|
2078
|
-
}
|
|
2079
|
-
const data = await parseBody(output.body, context);
|
|
2080
|
-
let contents = {};
|
|
2081
|
-
contents = de_ReEncryptResponse(data, context);
|
|
2082
|
-
const response = {
|
|
2083
|
-
$metadata: deserializeMetadata(output),
|
|
2084
|
-
...contents,
|
|
2085
|
-
};
|
|
2086
|
-
return response;
|
|
2087
|
-
};
|
|
2088
|
-
const de_ReEncryptCommandError = async (output, context) => {
|
|
2089
|
-
const parsedOutput = {
|
|
2090
|
-
...output,
|
|
2091
|
-
body: await parseErrorBody(output.body, context),
|
|
2092
|
-
};
|
|
2093
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2094
|
-
switch (errorCode) {
|
|
2095
|
-
case "DependencyTimeoutException":
|
|
2096
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2097
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2098
|
-
case "DisabledException":
|
|
2099
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2100
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2101
|
-
case "DryRunOperationException":
|
|
2102
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2103
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2104
|
-
case "IncorrectKeyException":
|
|
2105
|
-
case "com.amazonaws.kms#IncorrectKeyException":
|
|
2106
|
-
throw await de_IncorrectKeyExceptionRes(parsedOutput, context);
|
|
2107
|
-
case "InvalidCiphertextException":
|
|
2108
|
-
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
2109
|
-
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
2110
|
-
case "InvalidGrantTokenException":
|
|
2111
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2112
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2113
|
-
case "InvalidKeyUsageException":
|
|
2114
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2115
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2116
|
-
case "KMSInternalException":
|
|
2117
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2118
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2119
|
-
case "KMSInvalidStateException":
|
|
2120
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2121
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2122
|
-
case "KeyUnavailableException":
|
|
2123
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2124
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2125
|
-
case "NotFoundException":
|
|
2126
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2127
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2128
|
-
default:
|
|
2129
|
-
const parsedBody = parsedOutput.body;
|
|
2130
|
-
return throwDefaultError({
|
|
2131
|
-
output,
|
|
2132
|
-
parsedBody,
|
|
2133
|
-
errorCode,
|
|
2134
|
-
});
|
|
2135
|
-
}
|
|
2136
|
-
};
|
|
2137
|
-
export const de_ReplicateKeyCommand = async (output, context) => {
|
|
2138
|
-
if (output.statusCode >= 300) {
|
|
2139
|
-
return de_ReplicateKeyCommandError(output, context);
|
|
2140
|
-
}
|
|
2141
|
-
const data = await parseBody(output.body, context);
|
|
2142
|
-
let contents = {};
|
|
2143
|
-
contents = de_ReplicateKeyResponse(data, context);
|
|
2144
|
-
const response = {
|
|
2145
|
-
$metadata: deserializeMetadata(output),
|
|
2146
|
-
...contents,
|
|
2147
|
-
};
|
|
2148
|
-
return response;
|
|
2149
|
-
};
|
|
2150
|
-
const de_ReplicateKeyCommandError = async (output, context) => {
|
|
2151
|
-
const parsedOutput = {
|
|
2152
|
-
...output,
|
|
2153
|
-
body: await parseErrorBody(output.body, context),
|
|
2154
|
-
};
|
|
2155
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2156
|
-
switch (errorCode) {
|
|
2157
|
-
case "AlreadyExistsException":
|
|
2158
|
-
case "com.amazonaws.kms#AlreadyExistsException":
|
|
2159
|
-
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
2160
|
-
case "DisabledException":
|
|
2161
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2162
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2163
|
-
case "InvalidArnException":
|
|
2164
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2165
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2166
|
-
case "KMSInternalException":
|
|
2167
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2168
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2169
|
-
case "KMSInvalidStateException":
|
|
2170
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2171
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2172
|
-
case "LimitExceededException":
|
|
2173
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2174
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2175
|
-
case "MalformedPolicyDocumentException":
|
|
2176
|
-
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
2177
|
-
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
2178
|
-
case "NotFoundException":
|
|
2179
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2180
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2181
|
-
case "TagException":
|
|
2182
|
-
case "com.amazonaws.kms#TagException":
|
|
2183
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
2184
|
-
case "UnsupportedOperationException":
|
|
2185
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
2186
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
2187
|
-
default:
|
|
2188
|
-
const parsedBody = parsedOutput.body;
|
|
2189
|
-
return throwDefaultError({
|
|
2190
|
-
output,
|
|
2191
|
-
parsedBody,
|
|
2192
|
-
errorCode,
|
|
2193
|
-
});
|
|
2194
|
-
}
|
|
2195
|
-
};
|
|
2196
|
-
export const de_RetireGrantCommand = async (output, context) => {
|
|
2197
|
-
if (output.statusCode >= 300) {
|
|
2198
|
-
return de_RetireGrantCommandError(output, context);
|
|
2199
|
-
}
|
|
2200
|
-
await collectBody(output.body, context);
|
|
2201
|
-
const response = {
|
|
2202
|
-
$metadata: deserializeMetadata(output),
|
|
2203
|
-
};
|
|
2204
|
-
return response;
|
|
2205
|
-
};
|
|
2206
|
-
const de_RetireGrantCommandError = async (output, context) => {
|
|
2207
|
-
const parsedOutput = {
|
|
2208
|
-
...output,
|
|
2209
|
-
body: await parseErrorBody(output.body, context),
|
|
2210
|
-
};
|
|
2211
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2212
|
-
switch (errorCode) {
|
|
2213
|
-
case "DependencyTimeoutException":
|
|
2214
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2215
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2216
|
-
case "DryRunOperationException":
|
|
2217
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2218
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2219
|
-
case "InvalidArnException":
|
|
2220
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2221
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2222
|
-
case "InvalidGrantIdException":
|
|
2223
|
-
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
2224
|
-
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
2225
|
-
case "InvalidGrantTokenException":
|
|
2226
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2227
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2228
|
-
case "KMSInternalException":
|
|
2229
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2230
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2231
|
-
case "KMSInvalidStateException":
|
|
2232
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2233
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2234
|
-
case "NotFoundException":
|
|
2235
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2236
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2237
|
-
default:
|
|
2238
|
-
const parsedBody = parsedOutput.body;
|
|
2239
|
-
return throwDefaultError({
|
|
2240
|
-
output,
|
|
2241
|
-
parsedBody,
|
|
2242
|
-
errorCode,
|
|
2243
|
-
});
|
|
2244
|
-
}
|
|
2245
|
-
};
|
|
2246
|
-
export const de_RevokeGrantCommand = async (output, context) => {
|
|
2247
|
-
if (output.statusCode >= 300) {
|
|
2248
|
-
return de_RevokeGrantCommandError(output, context);
|
|
2249
|
-
}
|
|
2250
|
-
await collectBody(output.body, context);
|
|
2251
|
-
const response = {
|
|
2252
|
-
$metadata: deserializeMetadata(output),
|
|
2253
|
-
};
|
|
2254
|
-
return response;
|
|
2255
|
-
};
|
|
2256
|
-
const de_RevokeGrantCommandError = async (output, context) => {
|
|
2257
|
-
const parsedOutput = {
|
|
2258
|
-
...output,
|
|
2259
|
-
body: await parseErrorBody(output.body, context),
|
|
2260
|
-
};
|
|
2261
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2262
|
-
switch (errorCode) {
|
|
2263
|
-
case "DependencyTimeoutException":
|
|
2264
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2265
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2266
|
-
case "DryRunOperationException":
|
|
2267
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2268
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2269
|
-
case "InvalidArnException":
|
|
2270
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2271
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2272
|
-
case "InvalidGrantIdException":
|
|
2273
|
-
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
2274
|
-
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
2275
|
-
case "KMSInternalException":
|
|
2276
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2277
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2278
|
-
case "KMSInvalidStateException":
|
|
2279
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2280
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2281
|
-
case "NotFoundException":
|
|
2282
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2283
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2284
|
-
default:
|
|
2285
|
-
const parsedBody = parsedOutput.body;
|
|
2286
|
-
return throwDefaultError({
|
|
2287
|
-
output,
|
|
2288
|
-
parsedBody,
|
|
2289
|
-
errorCode,
|
|
2290
|
-
});
|
|
783
|
+
return response;
|
|
784
|
+
};
|
|
785
|
+
export const de_RevokeGrantCommand = async (output, context) => {
|
|
786
|
+
if (output.statusCode >= 300) {
|
|
787
|
+
return de_CommandError(output, context);
|
|
2291
788
|
}
|
|
789
|
+
await collectBody(output.body, context);
|
|
790
|
+
const response = {
|
|
791
|
+
$metadata: deserializeMetadata(output),
|
|
792
|
+
};
|
|
793
|
+
return response;
|
|
2292
794
|
};
|
|
2293
795
|
export const de_ScheduleKeyDeletionCommand = async (output, context) => {
|
|
2294
796
|
if (output.statusCode >= 300) {
|
|
2295
|
-
return
|
|
797
|
+
return de_CommandError(output, context);
|
|
2296
798
|
}
|
|
2297
799
|
const data = await parseBody(output.body, context);
|
|
2298
800
|
let contents = {};
|
|
@@ -2303,40 +805,9 @@ export const de_ScheduleKeyDeletionCommand = async (output, context) => {
|
|
|
2303
805
|
};
|
|
2304
806
|
return response;
|
|
2305
807
|
};
|
|
2306
|
-
const de_ScheduleKeyDeletionCommandError = async (output, context) => {
|
|
2307
|
-
const parsedOutput = {
|
|
2308
|
-
...output,
|
|
2309
|
-
body: await parseErrorBody(output.body, context),
|
|
2310
|
-
};
|
|
2311
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2312
|
-
switch (errorCode) {
|
|
2313
|
-
case "DependencyTimeoutException":
|
|
2314
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2315
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2316
|
-
case "InvalidArnException":
|
|
2317
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2318
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2319
|
-
case "KMSInternalException":
|
|
2320
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2321
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2322
|
-
case "KMSInvalidStateException":
|
|
2323
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2324
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2325
|
-
case "NotFoundException":
|
|
2326
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2327
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2328
|
-
default:
|
|
2329
|
-
const parsedBody = parsedOutput.body;
|
|
2330
|
-
return throwDefaultError({
|
|
2331
|
-
output,
|
|
2332
|
-
parsedBody,
|
|
2333
|
-
errorCode,
|
|
2334
|
-
});
|
|
2335
|
-
}
|
|
2336
|
-
};
|
|
2337
808
|
export const de_SignCommand = async (output, context) => {
|
|
2338
809
|
if (output.statusCode >= 300) {
|
|
2339
|
-
return
|
|
810
|
+
return de_CommandError(output, context);
|
|
2340
811
|
}
|
|
2341
812
|
const data = await parseBody(output.body, context);
|
|
2342
813
|
let contents = {};
|
|
@@ -2347,52 +818,9 @@ export const de_SignCommand = async (output, context) => {
|
|
|
2347
818
|
};
|
|
2348
819
|
return response;
|
|
2349
820
|
};
|
|
2350
|
-
const de_SignCommandError = async (output, context) => {
|
|
2351
|
-
const parsedOutput = {
|
|
2352
|
-
...output,
|
|
2353
|
-
body: await parseErrorBody(output.body, context),
|
|
2354
|
-
};
|
|
2355
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2356
|
-
switch (errorCode) {
|
|
2357
|
-
case "DependencyTimeoutException":
|
|
2358
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2359
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2360
|
-
case "DisabledException":
|
|
2361
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2362
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2363
|
-
case "DryRunOperationException":
|
|
2364
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2365
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2366
|
-
case "InvalidGrantTokenException":
|
|
2367
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2368
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2369
|
-
case "InvalidKeyUsageException":
|
|
2370
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2371
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2372
|
-
case "KMSInternalException":
|
|
2373
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2374
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2375
|
-
case "KMSInvalidStateException":
|
|
2376
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2377
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2378
|
-
case "KeyUnavailableException":
|
|
2379
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2380
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2381
|
-
case "NotFoundException":
|
|
2382
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2383
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2384
|
-
default:
|
|
2385
|
-
const parsedBody = parsedOutput.body;
|
|
2386
|
-
return throwDefaultError({
|
|
2387
|
-
output,
|
|
2388
|
-
parsedBody,
|
|
2389
|
-
errorCode,
|
|
2390
|
-
});
|
|
2391
|
-
}
|
|
2392
|
-
};
|
|
2393
821
|
export const de_TagResourceCommand = async (output, context) => {
|
|
2394
822
|
if (output.statusCode >= 300) {
|
|
2395
|
-
return
|
|
823
|
+
return de_CommandError(output, context);
|
|
2396
824
|
}
|
|
2397
825
|
await collectBody(output.body, context);
|
|
2398
826
|
const response = {
|
|
@@ -2400,43 +828,9 @@ export const de_TagResourceCommand = async (output, context) => {
|
|
|
2400
828
|
};
|
|
2401
829
|
return response;
|
|
2402
830
|
};
|
|
2403
|
-
const de_TagResourceCommandError = async (output, context) => {
|
|
2404
|
-
const parsedOutput = {
|
|
2405
|
-
...output,
|
|
2406
|
-
body: await parseErrorBody(output.body, context),
|
|
2407
|
-
};
|
|
2408
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2409
|
-
switch (errorCode) {
|
|
2410
|
-
case "InvalidArnException":
|
|
2411
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2412
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2413
|
-
case "KMSInternalException":
|
|
2414
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2415
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2416
|
-
case "KMSInvalidStateException":
|
|
2417
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2418
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2419
|
-
case "LimitExceededException":
|
|
2420
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2421
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2422
|
-
case "NotFoundException":
|
|
2423
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2424
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2425
|
-
case "TagException":
|
|
2426
|
-
case "com.amazonaws.kms#TagException":
|
|
2427
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
2428
|
-
default:
|
|
2429
|
-
const parsedBody = parsedOutput.body;
|
|
2430
|
-
return throwDefaultError({
|
|
2431
|
-
output,
|
|
2432
|
-
parsedBody,
|
|
2433
|
-
errorCode,
|
|
2434
|
-
});
|
|
2435
|
-
}
|
|
2436
|
-
};
|
|
2437
831
|
export const de_UntagResourceCommand = async (output, context) => {
|
|
2438
832
|
if (output.statusCode >= 300) {
|
|
2439
|
-
return
|
|
833
|
+
return de_CommandError(output, context);
|
|
2440
834
|
}
|
|
2441
835
|
await collectBody(output.body, context);
|
|
2442
836
|
const response = {
|
|
@@ -2444,161 +838,32 @@ export const de_UntagResourceCommand = async (output, context) => {
|
|
|
2444
838
|
};
|
|
2445
839
|
return response;
|
|
2446
840
|
};
|
|
2447
|
-
const de_UntagResourceCommandError = async (output, context) => {
|
|
2448
|
-
const parsedOutput = {
|
|
2449
|
-
...output,
|
|
2450
|
-
body: await parseErrorBody(output.body, context),
|
|
2451
|
-
};
|
|
2452
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2453
|
-
switch (errorCode) {
|
|
2454
|
-
case "InvalidArnException":
|
|
2455
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2456
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2457
|
-
case "KMSInternalException":
|
|
2458
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2459
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2460
|
-
case "KMSInvalidStateException":
|
|
2461
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2462
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2463
|
-
case "NotFoundException":
|
|
2464
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2465
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2466
|
-
case "TagException":
|
|
2467
|
-
case "com.amazonaws.kms#TagException":
|
|
2468
|
-
throw await de_TagExceptionRes(parsedOutput, context);
|
|
2469
|
-
default:
|
|
2470
|
-
const parsedBody = parsedOutput.body;
|
|
2471
|
-
return throwDefaultError({
|
|
2472
|
-
output,
|
|
2473
|
-
parsedBody,
|
|
2474
|
-
errorCode,
|
|
2475
|
-
});
|
|
2476
|
-
}
|
|
2477
|
-
};
|
|
2478
841
|
export const de_UpdateAliasCommand = async (output, context) => {
|
|
2479
842
|
if (output.statusCode >= 300) {
|
|
2480
|
-
return
|
|
843
|
+
return de_CommandError(output, context);
|
|
2481
844
|
}
|
|
2482
845
|
await collectBody(output.body, context);
|
|
2483
846
|
const response = {
|
|
2484
847
|
$metadata: deserializeMetadata(output),
|
|
2485
848
|
};
|
|
2486
|
-
return response;
|
|
2487
|
-
};
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
body: await parseErrorBody(output.body, context),
|
|
2492
|
-
};
|
|
2493
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2494
|
-
switch (errorCode) {
|
|
2495
|
-
case "DependencyTimeoutException":
|
|
2496
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2497
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2498
|
-
case "KMSInternalException":
|
|
2499
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2500
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2501
|
-
case "KMSInvalidStateException":
|
|
2502
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2503
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2504
|
-
case "LimitExceededException":
|
|
2505
|
-
case "com.amazonaws.kms#LimitExceededException":
|
|
2506
|
-
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
2507
|
-
case "NotFoundException":
|
|
2508
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2509
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2510
|
-
default:
|
|
2511
|
-
const parsedBody = parsedOutput.body;
|
|
2512
|
-
return throwDefaultError({
|
|
2513
|
-
output,
|
|
2514
|
-
parsedBody,
|
|
2515
|
-
errorCode,
|
|
2516
|
-
});
|
|
2517
|
-
}
|
|
2518
|
-
};
|
|
2519
|
-
export const de_UpdateCustomKeyStoreCommand = async (output, context) => {
|
|
2520
|
-
if (output.statusCode >= 300) {
|
|
2521
|
-
return de_UpdateCustomKeyStoreCommandError(output, context);
|
|
2522
|
-
}
|
|
2523
|
-
const data = await parseBody(output.body, context);
|
|
2524
|
-
let contents = {};
|
|
2525
|
-
contents = _json(data);
|
|
2526
|
-
const response = {
|
|
2527
|
-
$metadata: deserializeMetadata(output),
|
|
2528
|
-
...contents,
|
|
2529
|
-
};
|
|
2530
|
-
return response;
|
|
2531
|
-
};
|
|
2532
|
-
const de_UpdateCustomKeyStoreCommandError = async (output, context) => {
|
|
2533
|
-
const parsedOutput = {
|
|
2534
|
-
...output,
|
|
2535
|
-
body: await parseErrorBody(output.body, context),
|
|
2536
|
-
};
|
|
2537
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2538
|
-
switch (errorCode) {
|
|
2539
|
-
case "CloudHsmClusterInvalidConfigurationException":
|
|
2540
|
-
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
2541
|
-
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
2542
|
-
case "CloudHsmClusterNotActiveException":
|
|
2543
|
-
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
2544
|
-
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
2545
|
-
case "CloudHsmClusterNotFoundException":
|
|
2546
|
-
case "com.amazonaws.kms#CloudHsmClusterNotFoundException":
|
|
2547
|
-
throw await de_CloudHsmClusterNotFoundExceptionRes(parsedOutput, context);
|
|
2548
|
-
case "CloudHsmClusterNotRelatedException":
|
|
2549
|
-
case "com.amazonaws.kms#CloudHsmClusterNotRelatedException":
|
|
2550
|
-
throw await de_CloudHsmClusterNotRelatedExceptionRes(parsedOutput, context);
|
|
2551
|
-
case "CustomKeyStoreInvalidStateException":
|
|
2552
|
-
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
2553
|
-
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
2554
|
-
case "CustomKeyStoreNameInUseException":
|
|
2555
|
-
case "com.amazonaws.kms#CustomKeyStoreNameInUseException":
|
|
2556
|
-
throw await de_CustomKeyStoreNameInUseExceptionRes(parsedOutput, context);
|
|
2557
|
-
case "CustomKeyStoreNotFoundException":
|
|
2558
|
-
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
2559
|
-
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
2560
|
-
case "KMSInternalException":
|
|
2561
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2562
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2563
|
-
case "XksProxyIncorrectAuthenticationCredentialException":
|
|
2564
|
-
case "com.amazonaws.kms#XksProxyIncorrectAuthenticationCredentialException":
|
|
2565
|
-
throw await de_XksProxyIncorrectAuthenticationCredentialExceptionRes(parsedOutput, context);
|
|
2566
|
-
case "XksProxyInvalidConfigurationException":
|
|
2567
|
-
case "com.amazonaws.kms#XksProxyInvalidConfigurationException":
|
|
2568
|
-
throw await de_XksProxyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
2569
|
-
case "XksProxyInvalidResponseException":
|
|
2570
|
-
case "com.amazonaws.kms#XksProxyInvalidResponseException":
|
|
2571
|
-
throw await de_XksProxyInvalidResponseExceptionRes(parsedOutput, context);
|
|
2572
|
-
case "XksProxyUriEndpointInUseException":
|
|
2573
|
-
case "com.amazonaws.kms#XksProxyUriEndpointInUseException":
|
|
2574
|
-
throw await de_XksProxyUriEndpointInUseExceptionRes(parsedOutput, context);
|
|
2575
|
-
case "XksProxyUriInUseException":
|
|
2576
|
-
case "com.amazonaws.kms#XksProxyUriInUseException":
|
|
2577
|
-
throw await de_XksProxyUriInUseExceptionRes(parsedOutput, context);
|
|
2578
|
-
case "XksProxyUriUnreachableException":
|
|
2579
|
-
case "com.amazonaws.kms#XksProxyUriUnreachableException":
|
|
2580
|
-
throw await de_XksProxyUriUnreachableExceptionRes(parsedOutput, context);
|
|
2581
|
-
case "XksProxyVpcEndpointServiceInUseException":
|
|
2582
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInUseException":
|
|
2583
|
-
throw await de_XksProxyVpcEndpointServiceInUseExceptionRes(parsedOutput, context);
|
|
2584
|
-
case "XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
2585
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
2586
|
-
throw await de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
2587
|
-
case "XksProxyVpcEndpointServiceNotFoundException":
|
|
2588
|
-
case "com.amazonaws.kms#XksProxyVpcEndpointServiceNotFoundException":
|
|
2589
|
-
throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context);
|
|
2590
|
-
default:
|
|
2591
|
-
const parsedBody = parsedOutput.body;
|
|
2592
|
-
return throwDefaultError({
|
|
2593
|
-
output,
|
|
2594
|
-
parsedBody,
|
|
2595
|
-
errorCode,
|
|
2596
|
-
});
|
|
849
|
+
return response;
|
|
850
|
+
};
|
|
851
|
+
export const de_UpdateCustomKeyStoreCommand = async (output, context) => {
|
|
852
|
+
if (output.statusCode >= 300) {
|
|
853
|
+
return de_CommandError(output, context);
|
|
2597
854
|
}
|
|
855
|
+
const data = await parseBody(output.body, context);
|
|
856
|
+
let contents = {};
|
|
857
|
+
contents = _json(data);
|
|
858
|
+
const response = {
|
|
859
|
+
$metadata: deserializeMetadata(output),
|
|
860
|
+
...contents,
|
|
861
|
+
};
|
|
862
|
+
return response;
|
|
2598
863
|
};
|
|
2599
864
|
export const de_UpdateKeyDescriptionCommand = async (output, context) => {
|
|
2600
865
|
if (output.statusCode >= 300) {
|
|
2601
|
-
return
|
|
866
|
+
return de_CommandError(output, context);
|
|
2602
867
|
}
|
|
2603
868
|
await collectBody(output.body, context);
|
|
2604
869
|
const response = {
|
|
@@ -2606,40 +871,9 @@ export const de_UpdateKeyDescriptionCommand = async (output, context) => {
|
|
|
2606
871
|
};
|
|
2607
872
|
return response;
|
|
2608
873
|
};
|
|
2609
|
-
const de_UpdateKeyDescriptionCommandError = async (output, context) => {
|
|
2610
|
-
const parsedOutput = {
|
|
2611
|
-
...output,
|
|
2612
|
-
body: await parseErrorBody(output.body, context),
|
|
2613
|
-
};
|
|
2614
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2615
|
-
switch (errorCode) {
|
|
2616
|
-
case "DependencyTimeoutException":
|
|
2617
|
-
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2618
|
-
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2619
|
-
case "InvalidArnException":
|
|
2620
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2621
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2622
|
-
case "KMSInternalException":
|
|
2623
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2624
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2625
|
-
case "KMSInvalidStateException":
|
|
2626
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2627
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2628
|
-
case "NotFoundException":
|
|
2629
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2630
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2631
|
-
default:
|
|
2632
|
-
const parsedBody = parsedOutput.body;
|
|
2633
|
-
return throwDefaultError({
|
|
2634
|
-
output,
|
|
2635
|
-
parsedBody,
|
|
2636
|
-
errorCode,
|
|
2637
|
-
});
|
|
2638
|
-
}
|
|
2639
|
-
};
|
|
2640
874
|
export const de_UpdatePrimaryRegionCommand = async (output, context) => {
|
|
2641
875
|
if (output.statusCode >= 300) {
|
|
2642
|
-
return
|
|
876
|
+
return de_CommandError(output, context);
|
|
2643
877
|
}
|
|
2644
878
|
await collectBody(output.body, context);
|
|
2645
879
|
const response = {
|
|
@@ -2647,43 +881,22 @@ export const de_UpdatePrimaryRegionCommand = async (output, context) => {
|
|
|
2647
881
|
};
|
|
2648
882
|
return response;
|
|
2649
883
|
};
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
body: await parseErrorBody(output.body, context),
|
|
2654
|
-
};
|
|
2655
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2656
|
-
switch (errorCode) {
|
|
2657
|
-
case "DisabledException":
|
|
2658
|
-
case "com.amazonaws.kms#DisabledException":
|
|
2659
|
-
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
2660
|
-
case "InvalidArnException":
|
|
2661
|
-
case "com.amazonaws.kms#InvalidArnException":
|
|
2662
|
-
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2663
|
-
case "KMSInternalException":
|
|
2664
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2665
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2666
|
-
case "KMSInvalidStateException":
|
|
2667
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2668
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2669
|
-
case "NotFoundException":
|
|
2670
|
-
case "com.amazonaws.kms#NotFoundException":
|
|
2671
|
-
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2672
|
-
case "UnsupportedOperationException":
|
|
2673
|
-
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
2674
|
-
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
2675
|
-
default:
|
|
2676
|
-
const parsedBody = parsedOutput.body;
|
|
2677
|
-
return throwDefaultError({
|
|
2678
|
-
output,
|
|
2679
|
-
parsedBody,
|
|
2680
|
-
errorCode,
|
|
2681
|
-
});
|
|
884
|
+
export const de_VerifyCommand = async (output, context) => {
|
|
885
|
+
if (output.statusCode >= 300) {
|
|
886
|
+
return de_CommandError(output, context);
|
|
2682
887
|
}
|
|
888
|
+
const data = await parseBody(output.body, context);
|
|
889
|
+
let contents = {};
|
|
890
|
+
contents = _json(data);
|
|
891
|
+
const response = {
|
|
892
|
+
$metadata: deserializeMetadata(output),
|
|
893
|
+
...contents,
|
|
894
|
+
};
|
|
895
|
+
return response;
|
|
2683
896
|
};
|
|
2684
|
-
export const
|
|
897
|
+
export const de_VerifyMacCommand = async (output, context) => {
|
|
2685
898
|
if (output.statusCode >= 300) {
|
|
2686
|
-
return
|
|
899
|
+
return de_CommandError(output, context);
|
|
2687
900
|
}
|
|
2688
901
|
const data = await parseBody(output.body, context);
|
|
2689
902
|
let contents = {};
|
|
@@ -2694,7 +907,7 @@ export const de_VerifyCommand = async (output, context) => {
|
|
|
2694
907
|
};
|
|
2695
908
|
return response;
|
|
2696
909
|
};
|
|
2697
|
-
const
|
|
910
|
+
const de_CommandError = async (output, context) => {
|
|
2698
911
|
const parsedOutput = {
|
|
2699
912
|
...output,
|
|
2700
913
|
body: await parseErrorBody(output.body, context),
|
|
@@ -2704,62 +917,78 @@ const de_VerifyCommandError = async (output, context) => {
|
|
|
2704
917
|
case "DependencyTimeoutException":
|
|
2705
918
|
case "com.amazonaws.kms#DependencyTimeoutException":
|
|
2706
919
|
throw await de_DependencyTimeoutExceptionRes(parsedOutput, context);
|
|
2707
|
-
case "
|
|
2708
|
-
case "com.amazonaws.kms#
|
|
2709
|
-
throw await
|
|
2710
|
-
case "DryRunOperationException":
|
|
2711
|
-
case "com.amazonaws.kms#DryRunOperationException":
|
|
2712
|
-
throw await de_DryRunOperationExceptionRes(parsedOutput, context);
|
|
2713
|
-
case "InvalidGrantTokenException":
|
|
2714
|
-
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2715
|
-
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
2716
|
-
case "InvalidKeyUsageException":
|
|
2717
|
-
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2718
|
-
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
920
|
+
case "InvalidArnException":
|
|
921
|
+
case "com.amazonaws.kms#InvalidArnException":
|
|
922
|
+
throw await de_InvalidArnExceptionRes(parsedOutput, context);
|
|
2719
923
|
case "KMSInternalException":
|
|
2720
924
|
case "com.amazonaws.kms#KMSInternalException":
|
|
2721
925
|
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2722
|
-
case "KMSInvalidSignatureException":
|
|
2723
|
-
case "com.amazonaws.kms#KMSInvalidSignatureException":
|
|
2724
|
-
throw await de_KMSInvalidSignatureExceptionRes(parsedOutput, context);
|
|
2725
926
|
case "KMSInvalidStateException":
|
|
2726
927
|
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2727
928
|
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2728
|
-
case "KeyUnavailableException":
|
|
2729
|
-
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2730
|
-
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2731
929
|
case "NotFoundException":
|
|
2732
930
|
case "com.amazonaws.kms#NotFoundException":
|
|
2733
931
|
throw await de_NotFoundExceptionRes(parsedOutput, context);
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
932
|
+
case "CloudHsmClusterInvalidConfigurationException":
|
|
933
|
+
case "com.amazonaws.kms#CloudHsmClusterInvalidConfigurationException":
|
|
934
|
+
throw await de_CloudHsmClusterInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
935
|
+
case "CloudHsmClusterNotActiveException":
|
|
936
|
+
case "com.amazonaws.kms#CloudHsmClusterNotActiveException":
|
|
937
|
+
throw await de_CloudHsmClusterNotActiveExceptionRes(parsedOutput, context);
|
|
938
|
+
case "CustomKeyStoreInvalidStateException":
|
|
939
|
+
case "com.amazonaws.kms#CustomKeyStoreInvalidStateException":
|
|
940
|
+
throw await de_CustomKeyStoreInvalidStateExceptionRes(parsedOutput, context);
|
|
941
|
+
case "CustomKeyStoreNotFoundException":
|
|
942
|
+
case "com.amazonaws.kms#CustomKeyStoreNotFoundException":
|
|
943
|
+
throw await de_CustomKeyStoreNotFoundExceptionRes(parsedOutput, context);
|
|
944
|
+
case "AlreadyExistsException":
|
|
945
|
+
case "com.amazonaws.kms#AlreadyExistsException":
|
|
946
|
+
throw await de_AlreadyExistsExceptionRes(parsedOutput, context);
|
|
947
|
+
case "InvalidAliasNameException":
|
|
948
|
+
case "com.amazonaws.kms#InvalidAliasNameException":
|
|
949
|
+
throw await de_InvalidAliasNameExceptionRes(parsedOutput, context);
|
|
950
|
+
case "LimitExceededException":
|
|
951
|
+
case "com.amazonaws.kms#LimitExceededException":
|
|
952
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
953
|
+
case "CloudHsmClusterInUseException":
|
|
954
|
+
case "com.amazonaws.kms#CloudHsmClusterInUseException":
|
|
955
|
+
throw await de_CloudHsmClusterInUseExceptionRes(parsedOutput, context);
|
|
956
|
+
case "CloudHsmClusterNotFoundException":
|
|
957
|
+
case "com.amazonaws.kms#CloudHsmClusterNotFoundException":
|
|
958
|
+
throw await de_CloudHsmClusterNotFoundExceptionRes(parsedOutput, context);
|
|
959
|
+
case "CustomKeyStoreNameInUseException":
|
|
960
|
+
case "com.amazonaws.kms#CustomKeyStoreNameInUseException":
|
|
961
|
+
throw await de_CustomKeyStoreNameInUseExceptionRes(parsedOutput, context);
|
|
962
|
+
case "IncorrectTrustAnchorException":
|
|
963
|
+
case "com.amazonaws.kms#IncorrectTrustAnchorException":
|
|
964
|
+
throw await de_IncorrectTrustAnchorExceptionRes(parsedOutput, context);
|
|
965
|
+
case "XksProxyIncorrectAuthenticationCredentialException":
|
|
966
|
+
case "com.amazonaws.kms#XksProxyIncorrectAuthenticationCredentialException":
|
|
967
|
+
throw await de_XksProxyIncorrectAuthenticationCredentialExceptionRes(parsedOutput, context);
|
|
968
|
+
case "XksProxyInvalidConfigurationException":
|
|
969
|
+
case "com.amazonaws.kms#XksProxyInvalidConfigurationException":
|
|
970
|
+
throw await de_XksProxyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
971
|
+
case "XksProxyInvalidResponseException":
|
|
972
|
+
case "com.amazonaws.kms#XksProxyInvalidResponseException":
|
|
973
|
+
throw await de_XksProxyInvalidResponseExceptionRes(parsedOutput, context);
|
|
974
|
+
case "XksProxyUriEndpointInUseException":
|
|
975
|
+
case "com.amazonaws.kms#XksProxyUriEndpointInUseException":
|
|
976
|
+
throw await de_XksProxyUriEndpointInUseExceptionRes(parsedOutput, context);
|
|
977
|
+
case "XksProxyUriInUseException":
|
|
978
|
+
case "com.amazonaws.kms#XksProxyUriInUseException":
|
|
979
|
+
throw await de_XksProxyUriInUseExceptionRes(parsedOutput, context);
|
|
980
|
+
case "XksProxyUriUnreachableException":
|
|
981
|
+
case "com.amazonaws.kms#XksProxyUriUnreachableException":
|
|
982
|
+
throw await de_XksProxyUriUnreachableExceptionRes(parsedOutput, context);
|
|
983
|
+
case "XksProxyVpcEndpointServiceInUseException":
|
|
984
|
+
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInUseException":
|
|
985
|
+
throw await de_XksProxyVpcEndpointServiceInUseExceptionRes(parsedOutput, context);
|
|
986
|
+
case "XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
987
|
+
case "com.amazonaws.kms#XksProxyVpcEndpointServiceInvalidConfigurationException":
|
|
988
|
+
throw await de_XksProxyVpcEndpointServiceInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
989
|
+
case "XksProxyVpcEndpointServiceNotFoundException":
|
|
990
|
+
case "com.amazonaws.kms#XksProxyVpcEndpointServiceNotFoundException":
|
|
991
|
+
throw await de_XksProxyVpcEndpointServiceNotFoundExceptionRes(parsedOutput, context);
|
|
2763
992
|
case "DisabledException":
|
|
2764
993
|
case "com.amazonaws.kms#DisabledException":
|
|
2765
994
|
throw await de_DisabledExceptionRes(parsedOutput, context);
|
|
@@ -2769,24 +998,63 @@ const de_VerifyMacCommandError = async (output, context) => {
|
|
|
2769
998
|
case "InvalidGrantTokenException":
|
|
2770
999
|
case "com.amazonaws.kms#InvalidGrantTokenException":
|
|
2771
1000
|
throw await de_InvalidGrantTokenExceptionRes(parsedOutput, context);
|
|
1001
|
+
case "MalformedPolicyDocumentException":
|
|
1002
|
+
case "com.amazonaws.kms#MalformedPolicyDocumentException":
|
|
1003
|
+
throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);
|
|
1004
|
+
case "TagException":
|
|
1005
|
+
case "com.amazonaws.kms#TagException":
|
|
1006
|
+
throw await de_TagExceptionRes(parsedOutput, context);
|
|
1007
|
+
case "UnsupportedOperationException":
|
|
1008
|
+
case "com.amazonaws.kms#UnsupportedOperationException":
|
|
1009
|
+
throw await de_UnsupportedOperationExceptionRes(parsedOutput, context);
|
|
1010
|
+
case "XksKeyAlreadyInUseException":
|
|
1011
|
+
case "com.amazonaws.kms#XksKeyAlreadyInUseException":
|
|
1012
|
+
throw await de_XksKeyAlreadyInUseExceptionRes(parsedOutput, context);
|
|
1013
|
+
case "XksKeyInvalidConfigurationException":
|
|
1014
|
+
case "com.amazonaws.kms#XksKeyInvalidConfigurationException":
|
|
1015
|
+
throw await de_XksKeyInvalidConfigurationExceptionRes(parsedOutput, context);
|
|
1016
|
+
case "XksKeyNotFoundException":
|
|
1017
|
+
case "com.amazonaws.kms#XksKeyNotFoundException":
|
|
1018
|
+
throw await de_XksKeyNotFoundExceptionRes(parsedOutput, context);
|
|
1019
|
+
case "IncorrectKeyException":
|
|
1020
|
+
case "com.amazonaws.kms#IncorrectKeyException":
|
|
1021
|
+
throw await de_IncorrectKeyExceptionRes(parsedOutput, context);
|
|
1022
|
+
case "InvalidCiphertextException":
|
|
1023
|
+
case "com.amazonaws.kms#InvalidCiphertextException":
|
|
1024
|
+
throw await de_InvalidCiphertextExceptionRes(parsedOutput, context);
|
|
2772
1025
|
case "InvalidKeyUsageException":
|
|
2773
1026
|
case "com.amazonaws.kms#InvalidKeyUsageException":
|
|
2774
1027
|
throw await de_InvalidKeyUsageExceptionRes(parsedOutput, context);
|
|
2775
|
-
case "KMSInternalException":
|
|
2776
|
-
case "com.amazonaws.kms#KMSInternalException":
|
|
2777
|
-
throw await de_KMSInternalExceptionRes(parsedOutput, context);
|
|
2778
|
-
case "KMSInvalidMacException":
|
|
2779
|
-
case "com.amazonaws.kms#KMSInvalidMacException":
|
|
2780
|
-
throw await de_KMSInvalidMacExceptionRes(parsedOutput, context);
|
|
2781
|
-
case "KMSInvalidStateException":
|
|
2782
|
-
case "com.amazonaws.kms#KMSInvalidStateException":
|
|
2783
|
-
throw await de_KMSInvalidStateExceptionRes(parsedOutput, context);
|
|
2784
1028
|
case "KeyUnavailableException":
|
|
2785
1029
|
case "com.amazonaws.kms#KeyUnavailableException":
|
|
2786
1030
|
throw await de_KeyUnavailableExceptionRes(parsedOutput, context);
|
|
2787
|
-
case "
|
|
2788
|
-
case "com.amazonaws.kms#
|
|
2789
|
-
throw await
|
|
1031
|
+
case "CustomKeyStoreHasCMKsException":
|
|
1032
|
+
case "com.amazonaws.kms#CustomKeyStoreHasCMKsException":
|
|
1033
|
+
throw await de_CustomKeyStoreHasCMKsExceptionRes(parsedOutput, context);
|
|
1034
|
+
case "InvalidMarkerException":
|
|
1035
|
+
case "com.amazonaws.kms#InvalidMarkerException":
|
|
1036
|
+
throw await de_InvalidMarkerExceptionRes(parsedOutput, context);
|
|
1037
|
+
case "ExpiredImportTokenException":
|
|
1038
|
+
case "com.amazonaws.kms#ExpiredImportTokenException":
|
|
1039
|
+
throw await de_ExpiredImportTokenExceptionRes(parsedOutput, context);
|
|
1040
|
+
case "IncorrectKeyMaterialException":
|
|
1041
|
+
case "com.amazonaws.kms#IncorrectKeyMaterialException":
|
|
1042
|
+
throw await de_IncorrectKeyMaterialExceptionRes(parsedOutput, context);
|
|
1043
|
+
case "InvalidImportTokenException":
|
|
1044
|
+
case "com.amazonaws.kms#InvalidImportTokenException":
|
|
1045
|
+
throw await de_InvalidImportTokenExceptionRes(parsedOutput, context);
|
|
1046
|
+
case "InvalidGrantIdException":
|
|
1047
|
+
case "com.amazonaws.kms#InvalidGrantIdException":
|
|
1048
|
+
throw await de_InvalidGrantIdExceptionRes(parsedOutput, context);
|
|
1049
|
+
case "CloudHsmClusterNotRelatedException":
|
|
1050
|
+
case "com.amazonaws.kms#CloudHsmClusterNotRelatedException":
|
|
1051
|
+
throw await de_CloudHsmClusterNotRelatedExceptionRes(parsedOutput, context);
|
|
1052
|
+
case "KMSInvalidSignatureException":
|
|
1053
|
+
case "com.amazonaws.kms#KMSInvalidSignatureException":
|
|
1054
|
+
throw await de_KMSInvalidSignatureExceptionRes(parsedOutput, context);
|
|
1055
|
+
case "KMSInvalidMacException":
|
|
1056
|
+
case "com.amazonaws.kms#KMSInvalidMacException":
|
|
1057
|
+
throw await de_KMSInvalidMacExceptionRes(parsedOutput, context);
|
|
2790
1058
|
default:
|
|
2791
1059
|
const parsedBody = parsedOutput.body;
|
|
2792
1060
|
return throwDefaultError({
|