aws-sdk-kms 1.39.0 → 1.44.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.44.0
data/lib/aws-sdk-kms.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -48,6 +48,6 @@ require_relative 'aws-sdk-kms/customizations'
48
48
  # @!group service
49
49
  module Aws::KMS
50
50
 
51
- GEM_VERSION = '1.39.0'
51
+ GEM_VERSION = '1.44.0'
52
52
 
53
53
  end
@@ -3,7 +3,7 @@
3
3
  # WARNING ABOUT GENERATED CODE
4
4
  #
5
5
  # This file is generated. See the contributing guide for more information:
6
- # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
7
  #
8
8
  # WARNING ABOUT GENERATED CODE
9
9
 
@@ -339,27 +339,34 @@ module Aws::KMS
339
339
 
340
340
  # Cancels the deletion of a customer master key (CMK). When this
341
341
  # operation succeeds, the key state of the CMK is `Disabled`. To enable
342
- # the CMK, use EnableKey. You cannot perform this operation on a CMK in
343
- # a different AWS account.
342
+ # the CMK, use EnableKey.
344
343
  #
345
344
  # For more information about scheduling and canceling deletion of a CMK,
346
345
  # see [Deleting Customer Master Keys][1] in the *AWS Key Management
347
346
  # Service Developer Guide*.
348
347
  #
349
348
  # The CMK that you use for this operation must be in a compatible key
350
- # state. For details, see [How Key State Affects Use of a Customer
351
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
349
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
350
+ # Key Management Service Developer Guide*.
351
+ #
352
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
353
+ # in a different AWS account.
354
+ #
355
+ # **Required permissions**\: [kms:CancelKeyDeletion][3] (key policy)
356
+ #
357
+ # **Related operations**\: ScheduleKeyDeletion
352
358
  #
353
359
  #
354
360
  #
355
361
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
356
362
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
363
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
357
364
  #
358
365
  # @option params [required, String] :key_id
359
- # The unique identifier for the customer master key (CMK) for which to
360
- # cancel deletion.
366
+ # Identifies the customer master key (CMK) whose deletion is being
367
+ # canceled.
361
368
  #
362
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
369
+ # Specify the key ID or key ARN of the CMK.
363
370
  #
364
371
  # For example:
365
372
  #
@@ -448,6 +455,23 @@ module Aws::KMS
448
455
  # store, see [Troubleshooting a Custom Key Store][5] in the *AWS Key
449
456
  # Management Service Developer Guide*.
450
457
  #
458
+ # **Cross-account use**\: No. You cannot perform this operation on a
459
+ # custom key store in a different AWS account.
460
+ #
461
+ # **Required permissions**\: [kms:ConnectCustomKeyStore][6] (IAM policy)
462
+ #
463
+ # **Related operations**
464
+ #
465
+ # * CreateCustomKeyStore
466
+ #
467
+ # * DeleteCustomKeyStore
468
+ #
469
+ # * DescribeCustomKeyStores
470
+ #
471
+ # * DisconnectCustomKeyStore
472
+ #
473
+ # * UpdateCustomKeyStore
474
+ #
451
475
  #
452
476
  #
453
477
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
@@ -455,6 +479,7 @@ module Aws::KMS
455
479
  # [3]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
456
480
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
457
481
  # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
482
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
458
483
  #
459
484
  # @option params [required, String] :custom_key_store_id
460
485
  # Enter the key store ID of the custom key store that you want to
@@ -478,96 +503,105 @@ module Aws::KMS
478
503
  req.send_request(options)
479
504
  end
480
505
 
481
- # Creates a display name for a customer managed customer master key
482
- # (CMK). You can use an alias to identify a CMK in [cryptographic
483
- # operations][1], such as Encrypt and GenerateDataKey. You can change
484
- # the CMK associated with the alias at any time.
485
- #
486
- # Aliases are easier to remember than key IDs. They can also help to
487
- # simplify your applications. For example, if you use an alias in your
488
- # code, you can change the CMK your code uses by associating a given
489
- # alias with a different CMK.
490
- #
491
- # To run the same code in multiple AWS regions, use an alias in your
492
- # code, such as `alias/ApplicationKey`. Then, in each AWS Region, create
493
- # an `alias/ApplicationKey` alias that is associated with a CMK in that
494
- # Region. When you run your code, it uses the `alias/ApplicationKey` CMK
495
- # for that AWS Region without any Region-specific code.
506
+ # Creates a friendly name for a customer master key (CMK).
507
+ #
508
+ # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
509
+ # the CMK. For details, see [Using ABAC in AWS KMS][1] in the *AWS Key
510
+ # Management Service Developer Guide*.
511
+ #
512
+ # </note>
513
+ #
514
+ # You can use an alias to identify a CMK in the AWS KMS console, in the
515
+ # DescribeKey operation and in [cryptographic operations][2], such as
516
+ # Encrypt and GenerateDataKey. You can also change the CMK that's
517
+ # associated with the alias (UpdateAlias) or delete the alias
518
+ # (DeleteAlias) at any time. These operations don't affect the
519
+ # underlying CMK.
520
+ #
521
+ # You can associate the alias with any customer managed CMK in the same
522
+ # AWS Region. Each alias is associated with only one CMK at a time, but
523
+ # a CMK can have multiple aliases. A valid CMK is required. You can't
524
+ # create an alias without a CMK.
525
+ #
526
+ # The alias must be unique in the account and Region, but you can have
527
+ # aliases with the same name in different Regions. For detailed
528
+ # information about aliases, see [Using aliases][3] in the *AWS Key
529
+ # Management Service Developer Guide*.
496
530
  #
497
531
  # This operation does not return a response. To get the alias that you
498
532
  # created, use the ListAliases operation.
499
533
  #
500
- # To use aliases successfully, be aware of the following information.
534
+ # The CMK that you use for this operation must be in a compatible key
535
+ # state. For details, see [Key state: Effect on your CMK][4] in the *AWS
536
+ # Key Management Service Developer Guide*.
501
537
  #
502
- # * Each alias points to only one CMK at a time, although a single CMK
503
- # can have multiple aliases. The alias and its associated CMK must be
504
- # in the same AWS account and Region.
538
+ # **Cross-account use**\: No. You cannot perform this operation on an
539
+ # alias in a different AWS account.
505
540
  #
506
- # * You can associate an alias with any customer managed CMK in the same
507
- # AWS account and Region. However, you do not have permission to
508
- # associate an alias with an [AWS managed CMK][2] or an [AWS owned
509
- # CMK][3].
541
+ # **Required permissions**
510
542
  #
511
- # * To change the CMK associated with an alias, use the UpdateAlias
512
- # operation. The current CMK and the new CMK must be the same type
513
- # (both symmetric or both asymmetric) and they must have the same key
514
- # usage (`ENCRYPT_DECRYPT` or `SIGN_VERIFY`). This restriction
515
- # prevents cryptographic errors in code that uses aliases.
516
- #
517
- # * The alias name must begin with `alias/` followed by a name, such as
518
- # `alias/ExampleAlias`. It can contain only alphanumeric characters,
519
- # forward slashes (/), underscores (\_), and dashes (-). The alias
520
- # name cannot begin with `alias/aws/`. The `alias/aws/` prefix is
521
- # reserved for [AWS managed CMKs][2].
522
- #
523
- # * The alias name must be unique within an AWS Region. However, you can
524
- # use the same alias name in multiple Regions of the same AWS account.
525
- # Each instance of the alias is associated with a CMK in its Region.
526
- #
527
- # * After you create an alias, you cannot change its alias name.
528
- # However, you can use the DeleteAlias operation to delete the alias
529
- # and then create a new alias with the desired name.
530
- #
531
- # * You can use an alias name or alias ARN to identify a CMK in AWS KMS
532
- # [cryptographic operations][1] and in the DescribeKey operation.
533
- # However, you cannot use alias names or alias ARNs in API operations
534
- # that manage CMKs, such as DisableKey or GetKeyPolicy. For
535
- # information about the valid CMK identifiers for each AWS KMS API
536
- # operation, see the descriptions of the `KeyId` parameter in the API
537
- # operation documentation.
543
+ # * [kms:CreateAlias][5] on the alias (IAM policy).
538
544
  #
539
- # Because an alias is not a property of a CMK, you can delete and change
540
- # the aliases of a CMK without affecting the CMK. Also, aliases do not
541
- # appear in the response from the DescribeKey operation. To get the
542
- # aliases and alias ARNs of CMKs in each AWS account and Region, use the
543
- # ListAliases operation.
545
+ # * [kms:CreateAlias][5] on the CMK (key policy).
544
546
  #
545
- # The CMK that you use for this operation must be in a compatible key
546
- # state. For details, see [How Key State Affects Use of a Customer
547
- # Master Key][4] in the *AWS Key Management Service Developer Guide*.
547
+ # For details, see [Controlling access to aliases][6] in the *AWS Key
548
+ # Management Service Developer Guide*.
548
549
  #
550
+ # **Related operations:**
549
551
  #
552
+ # * DeleteAlias
550
553
  #
551
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
552
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
553
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
554
+ # * ListAliases
555
+ #
556
+ # * UpdateAlias
557
+ #
558
+ #
559
+ #
560
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
561
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
562
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
554
563
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
564
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
565
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
555
566
  #
556
567
  # @option params [required, String] :alias_name
557
568
  # Specifies the alias name. This value must begin with `alias/` followed
558
- # by a name, such as `alias/ExampleAlias`. The alias name cannot begin
559
- # with `alias/aws/`. The `alias/aws/` prefix is reserved for AWS managed
560
- # CMKs.
569
+ # by a name, such as `alias/ExampleAlias`.
570
+ #
571
+ # The `AliasName` value must be string of 1-256 characters. It can
572
+ # contain only alphanumeric characters, forward slashes (/), underscores
573
+ # (\_), and dashes (-). The alias name cannot begin with `alias/aws/`.
574
+ # The `alias/aws/` prefix is reserved for [AWS managed CMKs][1].
575
+ #
576
+ #
577
+ #
578
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
561
579
  #
562
580
  # @option params [required, String] :target_key_id
563
- # Identifies the CMK to which the alias refers. Specify the key ID or
564
- # the Amazon Resource Name (ARN) of the CMK. You cannot specify another
565
- # alias. For help finding the key ID and ARN, see [Finding the Key ID
566
- # and ARN][1] in the *AWS Key Management Service Developer Guide*.
581
+ # Associates the alias with the specified [customer managed CMK][1]. The
582
+ # CMK must be in the same AWS Region.
583
+ #
584
+ # A valid CMK ID is required. If you supply a null or empty string
585
+ # value, this operation returns an error.
586
+ #
587
+ # For help finding the key ID and ARN, see [Finding the Key ID and
588
+ # ARN][2] in the *AWS Key Management Service Developer Guide*.
589
+ #
590
+ # Specify the key ID or key ARN of the CMK.
591
+ #
592
+ # For example:
593
+ #
594
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
595
+ #
596
+ # * Key ARN:
597
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
598
+ #
599
+ # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
567
600
  #
568
601
  #
569
602
  #
570
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn
603
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
604
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn
571
605
  #
572
606
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
573
607
  #
@@ -621,12 +655,30 @@ module Aws::KMS
621
655
  # For help with failures, see [Troubleshooting a Custom Key Store][4] in
622
656
  # the *AWS Key Management Service Developer Guide*.
623
657
  #
658
+ # **Cross-account use**\: No. You cannot perform this operation on a
659
+ # custom key store in a different AWS account.
660
+ #
661
+ # **Required permissions**\: [kms:CreateCustomKeyStore][5] (IAM policy).
662
+ #
663
+ # **Related operations:**
664
+ #
665
+ # * ConnectCustomKeyStore
666
+ #
667
+ # * DeleteCustomKeyStore
668
+ #
669
+ # * DescribeCustomKeyStores
670
+ #
671
+ # * DisconnectCustomKeyStore
672
+ #
673
+ # * UpdateCustomKeyStore
674
+ #
624
675
  #
625
676
  #
626
677
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
627
678
  # [2]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
628
679
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
629
680
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
681
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
630
682
  #
631
683
  # @option params [required, String] :custom_key_store_name
632
684
  # Specifies a friendly name for the custom key store. The name must be
@@ -692,72 +744,80 @@ module Aws::KMS
692
744
  req.send_request(options)
693
745
  end
694
746
 
695
- # Adds a grant to a customer master key (CMK). The grant allows the
696
- # grantee principal to use the CMK when the conditions specified in the
697
- # grant are met. When setting permissions, grants are an alternative to
698
- # key policies.
699
- #
700
- # To create a grant that allows a [cryptographic operation][1] only when
701
- # the request includes a particular [encryption context][2], use the
702
- # `Constraints` parameter. For details, see GrantConstraints.
703
- #
704
- # You can create grants on symmetric and asymmetric CMKs. However, if
705
- # the grant allows an operation that the CMK does not support,
706
- # `CreateGrant` fails with a `ValidationException`.
707
- #
708
- # * Grants for symmetric CMKs cannot allow operations that are not
709
- # supported for symmetric CMKs, including Sign, Verify, and
710
- # GetPublicKey. (There are limited exceptions to this rule for legacy
711
- # operations, but you should not create a grant for an operation that
712
- # AWS KMS does not support.)
713
- #
714
- # * Grants for asymmetric CMKs cannot allow operations that are not
715
- # supported for asymmetric CMKs, including operations that [generate
716
- # data keys][3] or [data key pairs][4], or operations related to
717
- # [automatic key rotation][5], [imported key material][6], or CMKs in
718
- # [custom key stores][7].
719
- #
720
- # * Grants for asymmetric CMKs with a `KeyUsage` of `ENCRYPT_DECRYPT`
721
- # cannot allow the Sign or Verify operations. Grants for asymmetric
722
- # CMKs with a `KeyUsage` of `SIGN_VERIFY` cannot allow the Encrypt or
723
- # Decrypt operations.
724
- #
725
- # * Grants for asymmetric CMKs cannot include an encryption context
726
- # grant constraint. An encryption context is not supported on
727
- # asymmetric CMKs.
747
+ # Adds a grant to a customer master key (CMK).
748
+ #
749
+ # A *grant* is a policy instrument that allows AWS principals to use AWS
750
+ # KMS customer master keys (CMKs) in cryptographic operations. It also
751
+ # can allow them to view a CMK (DescribeKey) and create and manage
752
+ # grants. When authorizing access to a CMK, grants are considered along
753
+ # with key policies and IAM policies. Grants are often used for
754
+ # temporary permissions because you can create one, use its permissions,
755
+ # and delete it without changing your key policies or IAM policies.
756
+ #
757
+ # For detailed information about grants, including grant terminology,
758
+ # see [Using grants][1] in the <i> <i>AWS Key Management Service
759
+ # Developer Guide</i> </i>. For examples of working with grants in
760
+ # several programming languages, see [Programming grants][2].
761
+ #
762
+ # The `CreateGrant` operation returns a `GrantToken` and a `GrantId`.
763
+ #
764
+ # * When you create, retire, or revoke a grant, there might be a brief
765
+ # delay, usually less than five minutes, until the grant is available
766
+ # throughout AWS KMS. This state is known as *eventual consistency*.
767
+ # Once the grant has achieved eventual consistency, the grantee
768
+ # principal can use the permissions in the grant without identifying
769
+ # the grant.
770
+ #
771
+ # However, to use the permissions in the grant immediately, use the
772
+ # `GrantToken` that `CreateGrant` returns. For details, see [Using a
773
+ # grant token][3] in the <i> <i>AWS Key Management Service Developer
774
+ # Guide</i> </i>.
728
775
  #
729
- # For information about symmetric and asymmetric CMKs, see [Using
730
- # Symmetric and Asymmetric CMKs][8] in the *AWS Key Management Service
731
- # Developer Guide*.
776
+ # * The `CreateGrant` operation also returns a `GrantId`. You can use
777
+ # the `GrantId` and a key identifier to identify the grant in the
778
+ # RetireGrant and RevokeGrant operations. To find the grant ID, use
779
+ # the ListGrants or ListRetirableGrants operations.
732
780
  #
733
- # To perform this operation on a CMK in a different AWS account, specify
734
- # the key ARN in the value of the `KeyId` parameter. For more
735
- # information about grants, see [Grants][9] in the <i> <i>AWS Key
736
- # Management Service Developer Guide</i> </i>.
781
+ # For information about symmetric and asymmetric CMKs, see [Using
782
+ # Symmetric and Asymmetric CMKs][4] in the *AWS Key Management Service
783
+ # Developer Guide*. For more information about grants, see [Grants][1]
784
+ # in the <i> <i>AWS Key Management Service Developer Guide</i> </i>.
737
785
  #
738
786
  # The CMK that you use for this operation must be in a compatible key
739
- # state. For details, see [How Key State Affects Use of a Customer
740
- # Master Key][10] in the *AWS Key Management Service Developer Guide*.
787
+ # state. For details, see [Key state: Effect on your CMK][5] in the *AWS
788
+ # Key Management Service Developer Guide*.
741
789
  #
790
+ # **Cross-account use**\: Yes. To perform this operation on a CMK in a
791
+ # different AWS account, specify the key ARN in the value of the `KeyId`
792
+ # parameter.
742
793
  #
794
+ # **Required permissions**\: [kms:CreateGrant][6] (key policy)
743
795
  #
744
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
745
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
746
- # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey
747
- # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyPair
748
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
749
- # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
750
- # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
751
- # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
752
- # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
753
- # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
796
+ # **Related operations:**
797
+ #
798
+ # * ListGrants
799
+ #
800
+ # * ListRetirableGrants
801
+ #
802
+ # * RetireGrant
803
+ #
804
+ # * RevokeGrant
805
+ #
806
+ #
807
+ #
808
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
809
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
810
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html
811
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
812
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
813
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
754
814
  #
755
815
  # @option params [required, String] :key_id
756
- # The unique identifier for the customer master key (CMK) that the grant
757
- # applies to.
816
+ # Identifies the customer master key (CMK) for the grant. The grant
817
+ # gives principals permission to use this CMK.
758
818
  #
759
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To
760
- # specify a CMK in a different AWS account, you must use the key ARN.
819
+ # Specify the key ID or key ARN of the CMK. To specify a CMK in a
820
+ # different AWS account, you must use the key ARN.
761
821
  #
762
822
  # For example:
763
823
  #
@@ -769,8 +829,7 @@ module Aws::KMS
769
829
  # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
770
830
  #
771
831
  # @option params [required, String] :grantee_principal
772
- # The principal that is given permission to perform the operations that
773
- # the grant permits.
832
+ # The identity that gets the permissions specified in the grant.
774
833
  #
775
834
  # To specify the principal, use the [Amazon Resource Name (ARN)][1] of
776
835
  # an AWS principal. Valid AWS principals include AWS accounts (root),
@@ -803,22 +862,52 @@ module Aws::KMS
803
862
  # @option params [required, Array<String>] :operations
804
863
  # A list of operations that the grant permits.
805
864
  #
865
+ # The operation must be supported on the CMK. For example, you cannot
866
+ # create a grant for a symmetric CMK that allows the Sign operation, or
867
+ # a grant for an asymmetric CMK that allows the GenerateDataKey
868
+ # operation. If you try, AWS KMS returns a `ValidationError` exception.
869
+ # For details, see [Grant operations][1] in the *AWS Key Management
870
+ # Service Developer Guide*.
871
+ #
872
+ #
873
+ #
874
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
875
+ #
806
876
  # @option params [Types::GrantConstraints] :constraints
807
- # Allows a [cryptographic operation][1] only when the encryption context
808
- # matches or includes the encryption context specified in this
809
- # structure. For more information about encryption context, see
810
- # [Encryption Context][2] in the <i> <i>AWS Key Management Service
811
- # Developer Guide</i> </i>.
877
+ # Specifies a grant constraint.
878
+ #
879
+ # AWS KMS supports the `EncryptionContextEquals` and
880
+ # `EncryptionContextSubset` grant constraints. Each constraint value can
881
+ # include up to 8 encryption context pairs. The encryption context value
882
+ # in each constraint cannot exceed 384 characters.
883
+ #
884
+ # These grant constraints allow a [cryptographic operation][1] only when
885
+ # the encryption context in the request matches
886
+ # (`EncryptionContextEquals`) or includes (`EncryptionContextSubset`)
887
+ # the encryption context specified in this structure. For more
888
+ # information about encryption context, see [Encryption Context][2] in
889
+ # the <i> <i>AWS Key Management Service Developer Guide</i> </i>. For
890
+ # information about grant constraints, see [Using grant constraints][3]
891
+ # in the *AWS Key Management Service Developer Guide*.
892
+ #
893
+ # The encryption context grant constraints are supported only on
894
+ # operations that include an encryption context. You cannot use an
895
+ # encryption context grant constraint for cryptographic operations with
896
+ # asymmetric CMKs or for management operations, such as DescribeKey or
897
+ # RetireGrant.
812
898
  #
813
899
  #
814
900
  #
815
901
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
816
902
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
903
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
817
904
  #
818
905
  # @option params [Array<String>] :grant_tokens
819
906
  # A list of grant tokens.
820
907
  #
821
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
908
+ # Use a grant token when your permission to call this operation comes
909
+ # from a new grant that has not yet achieved *eventual consistency*. For
910
+ # more information, see [Grant token][1] in the *AWS Key Management
822
911
  # Service Developer Guide*.
823
912
  #
824
913
  #
@@ -826,9 +915,8 @@ module Aws::KMS
826
915
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
827
916
  #
828
917
  # @option params [String] :name
829
- # A friendly name for identifying the grant. Use this value to prevent
830
- # the unintended creation of duplicate grants when retrying this
831
- # request.
918
+ # A friendly name for the grant. Use this value to prevent the
919
+ # unintended creation of duplicate grants when retrying this request.
832
920
  #
833
921
  # When this value is absent, all `CreateGrant` requests result in a new
834
922
  # grant with a unique `GrantId` even if all the supplied parameters are
@@ -839,8 +927,8 @@ module Aws::KMS
839
927
  # identical parameters; if the grant already exists, the original
840
928
  # `GrantId` is returned without creating a new grant. Note that the
841
929
  # returned grant token is unique with every `CreateGrant` request, even
842
- # when a duplicate `GrantId` is returned. All grant tokens obtained in
843
- # this way can be used interchangeably.
930
+ # when a duplicate `GrantId` is returned. All grant tokens for the same
931
+ # grant ID can be used interchangeably.
844
932
  #
845
933
  # @return [Types::CreateGrantResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
846
934
  #
@@ -902,8 +990,7 @@ module Aws::KMS
902
990
  end
903
991
 
904
992
  # Creates a unique customer managed [customer master key][1] (CMK) in
905
- # your AWS account and Region. You cannot use this operation to create a
906
- # CMK in a different AWS account.
993
+ # your AWS account and Region.
907
994
  #
908
995
  # You can use the `CreateKey` operation to create symmetric or
909
996
  # asymmetric CMKs.
@@ -949,7 +1036,31 @@ module Aws::KMS
949
1036
  #
950
1037
  #
951
1038
  #
952
- # Imported Key Material
1039
+ # Multi-Region primary keys
1040
+ # Imported key material
1041
+ #
1042
+ # : To create a multi-Region *primary key* in the local AWS Region, use
1043
+ # the `MultiRegion` parameter with a value of `True`. To create a
1044
+ # multi-Region *replica key*, that is, a CMK with the same key ID and
1045
+ # key material as a primary key, but in a different AWS Region, use
1046
+ # the ReplicateKey operation. To change a replica key to a primary
1047
+ # key, and its primary key to a replica key, use the
1048
+ # UpdatePrimaryRegion operation.
1049
+ #
1050
+ # This operation supports *multi-Region keys*, an AWS KMS feature that
1051
+ # lets you create multiple interoperable CMKs in different AWS
1052
+ # Regions. Because these CMKs have the same key ID, key material, and
1053
+ # other metadata, you can use them to encrypt data in one AWS Region
1054
+ # and decrypt it in a different AWS Region without making a
1055
+ # cross-Region call or exposing the plaintext data. For more
1056
+ # information about multi-Region keys, see [Using multi-Region
1057
+ # keys][5] in the *AWS Key Management Service Developer Guide*.
1058
+ #
1059
+ # You can create symmetric and asymmetric multi-Region keys and
1060
+ # multi-Region keys with imported key material. You cannot create
1061
+ # multi-Region keys in a custom key store.
1062
+ #
1063
+ #
953
1064
  #
954
1065
  # : To import your own key material, begin by creating a symmetric CMK
955
1066
  # with no key material. To do this, use the `Origin` parameter of
@@ -958,25 +1069,49 @@ module Aws::KMS
958
1069
  # token, and use the public key to encrypt your key material. Then,
959
1070
  # use ImportKeyMaterial with your import token to import the key
960
1071
  # material. For step-by-step instructions, see [Importing Key
961
- # Material][5] in the <i> <i>AWS Key Management Service Developer
1072
+ # Material][6] in the <i> <i>AWS Key Management Service Developer
962
1073
  # Guide</i> </i>. You cannot import the key material into an
963
1074
  # asymmetric CMK.
964
1075
  #
1076
+ # To create a multi-Region primary key with imported key material, use
1077
+ # the `Origin` parameter of `CreateKey` with a value of `EXTERNAL` and
1078
+ # the `MultiRegion` parameter with a value of `True`. To create
1079
+ # replicas of the multi-Region primary key, use the ReplicateKey
1080
+ # operation. For more information about multi-Region keys, see [Using
1081
+ # multi-Region keys][5] in the *AWS Key Management Service Developer
1082
+ # Guide*.
1083
+ #
965
1084
  #
966
1085
  #
967
- # Custom Key Stores
1086
+ # Custom key store
968
1087
  #
969
- # : To create a symmetric CMK in a [custom key store][6], use the
1088
+ # : To create a symmetric CMK in a [custom key store][7], use the
970
1089
  # `CustomKeyStoreId` parameter to specify the custom key store. You
971
1090
  # must also use the `Origin` parameter with a value of `AWS_CLOUDHSM`.
972
1091
  # The AWS CloudHSM cluster that is associated with the custom key
973
1092
  # store must have at least two active HSMs in different Availability
974
1093
  # Zones in the AWS Region.
975
1094
  #
976
- # You cannot create an asymmetric CMK in a custom key store. For
977
- # information about custom key stores in AWS KMS see [Using Custom Key
978
- # Stores][6] in the <i> <i>AWS Key Management Service Developer
979
- # Guide</i> </i>.
1095
+ # You cannot create an asymmetric CMK or a multi-Region CMK in a
1096
+ # custom key store. For information about custom key stores in AWS KMS
1097
+ # see [Using Custom Key Stores][7] in the <i> <i>AWS Key Management
1098
+ # Service Developer Guide</i> </i>.
1099
+ #
1100
+ # **Cross-account use**\: No. You cannot use this operation to create a
1101
+ # CMK in a different AWS account.
1102
+ #
1103
+ # **Required permissions**\: [kms:CreateKey][8] (IAM policy). To use the
1104
+ # `Tags` parameter, [kms:TagResource][8] (IAM policy). For examples and
1105
+ # information about related permissions, see [Allow a user to create
1106
+ # CMKs][9] in the *AWS Key Management Service Developer Guide*.
1107
+ #
1108
+ # **Related operations:**
1109
+ #
1110
+ # * DescribeKey
1111
+ #
1112
+ # * ListKeys
1113
+ #
1114
+ # * ScheduleKeyDeletion
980
1115
  #
981
1116
  #
982
1117
  #
@@ -984,8 +1119,11 @@ module Aws::KMS
984
1119
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys
985
1120
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-key-pairs
986
1121
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
987
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
988
- # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1122
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
1123
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1124
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1125
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1126
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
989
1127
  #
990
1128
  # @option params [String] :policy
991
1129
  # The key policy to attach to the CMK.
@@ -1015,17 +1153,21 @@ module Aws::KMS
1015
1153
  #
1016
1154
  # The key policy size quota is 32 kilobytes (32768 bytes).
1017
1155
  #
1156
+ # For help writing and formatting a JSON policy document, see the [IAM
1157
+ # JSON Policy Reference][4] in the <i> <i>IAM User Guide</i> </i>.
1158
+ #
1018
1159
  #
1019
1160
  #
1020
1161
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1021
1162
  # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
1022
1163
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
1164
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1023
1165
  #
1024
1166
  # @option params [String] :description
1025
1167
  # A description of the CMK.
1026
1168
  #
1027
1169
  # Use a description that helps you decide whether the CMK is appropriate
1028
- # for a task.
1170
+ # for a task. The default value is an empty string (no description).
1029
1171
  #
1030
1172
  # @option params [String] :key_usage
1031
1173
  # Determines the [cryptographic operations][1] for which you can use the
@@ -1109,20 +1251,19 @@ module Aws::KMS
1109
1251
  # @option params [String] :origin
1110
1252
  # The source of the key material for the CMK. You cannot change the
1111
1253
  # origin after you create the CMK. The default is `AWS_KMS`, which means
1112
- # AWS KMS creates the key material.
1254
+ # that AWS KMS creates the key material.
1113
1255
  #
1114
- # When the parameter value is `EXTERNAL`, AWS KMS creates a CMK without
1115
- # key material so that you can import key material from your existing
1116
- # key management infrastructure. For more information about importing
1117
- # key material into AWS KMS, see [Importing Key Material][1] in the *AWS
1118
- # Key Management Service Developer Guide*. This value is valid only for
1256
+ # To create a CMK with no key material (for imported key material), set
1257
+ # the value to `EXTERNAL`. For more information about importing key
1258
+ # material into AWS KMS, see [Importing Key Material][1] in the *AWS Key
1259
+ # Management Service Developer Guide*. This value is valid only for
1119
1260
  # symmetric CMKs.
1120
1261
  #
1121
- # When the parameter value is `AWS_CLOUDHSM`, AWS KMS creates the CMK in
1122
- # an AWS KMS [custom key store][2] and creates its key material in the
1123
- # associated AWS CloudHSM cluster. You must also use the
1124
- # `CustomKeyStoreId` parameter to identify the custom key store. This
1125
- # value is valid only for symmetric CMKs.
1262
+ # To create a CMK in an AWS KMS [custom key store][2] and create its key
1263
+ # material in the associated AWS CloudHSM cluster, set this value to
1264
+ # `AWS_CLOUDHSM`. You must also use the `CustomKeyStoreId` parameter to
1265
+ # identify the custom key store. This value is valid only for symmetric
1266
+ # CMKs.
1126
1267
  #
1127
1268
  #
1128
1269
  #
@@ -1137,8 +1278,9 @@ module Aws::KMS
1137
1278
  # with the custom key store must have at least two active HSMs, each in
1138
1279
  # a different Availability Zone in the Region.
1139
1280
  #
1140
- # This parameter is valid only for symmetric CMKs. You cannot create an
1141
- # asymmetric CMK in a custom key store.
1281
+ # This parameter is valid only for symmetric CMKs and regional CMKs. You
1282
+ # cannot create an asymmetric CMK or a multi-Region CMK in a custom key
1283
+ # store.
1142
1284
  #
1143
1285
  # To find the ID of a custom key store, use the DescribeCustomKeyStores
1144
1286
  # operation.
@@ -1176,21 +1318,63 @@ module Aws::KMS
1176
1318
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1177
1319
  #
1178
1320
  # @option params [Array<Types::Tag>] :tags
1179
- # One or more tags. Each tag consists of a tag key and a tag value. Both
1180
- # the tag key and the tag value are required, but the tag value can be
1181
- # an empty (null) string.
1321
+ # Assigns one or more tags to the CMK. Use this parameter to tag the CMK
1322
+ # when it is created. To tag an existing CMK, use the TagResource
1323
+ # operation.
1324
+ #
1325
+ # <note markdown="1"> Tagging or untagging a CMK can allow or deny permission to the CMK.
1326
+ # For details, see [Using ABAC in AWS KMS][1] in the *AWS Key Management
1327
+ # Service Developer Guide*.
1328
+ #
1329
+ # </note>
1330
+ #
1331
+ # To use this parameter, you must have [kms:TagResource][2] permission
1332
+ # in an IAM policy.
1333
+ #
1334
+ # Each tag consists of a tag key and a tag value. Both the tag key and
1335
+ # the tag value are required, but the tag value can be an empty (null)
1336
+ # string. You cannot have more than one tag on a CMK with the same tag
1337
+ # key. If you specify an existing tag key with a different tag value,
1338
+ # AWS KMS replaces the current tag value with the specified one.
1339
+ #
1340
+ # When you assign tags to an AWS resource, AWS generates a cost
1341
+ # allocation report with usage and costs aggregated by tags. Tags can
1342
+ # also be used to control access to a CMK. For details, see [Tagging
1343
+ # Keys][3].
1182
1344
  #
1183
- # When you add tags to an AWS resource, AWS generates a cost allocation
1184
- # report with usage and costs aggregated by tags. For information about
1185
- # adding, changing, deleting and listing tags for CMKs, see [Tagging
1186
- # Keys][1].
1187
1345
  #
1188
- # Use this parameter to tag the CMK when it is created. To add tags to
1189
- # an existing CMK, use the TagResource operation.
1190
1346
  #
1347
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
1348
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1349
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
1191
1350
  #
1351
+ # @option params [Boolean] :multi_region
1352
+ # Creates a multi-Region primary key that you can replicate into other
1353
+ # AWS Regions. You cannot change this value after you create the CMK.
1192
1354
  #
1193
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
1355
+ # For a multi-Region key, set this parameter to `True`. For a
1356
+ # single-Region CMK, omit this parameter or set it to `False`. The
1357
+ # default value is `False`.
1358
+ #
1359
+ # This operation supports *multi-Region keys*, an AWS KMS feature that
1360
+ # lets you create multiple interoperable CMKs in different AWS Regions.
1361
+ # Because these CMKs have the same key ID, key material, and other
1362
+ # metadata, you can use them to encrypt data in one AWS Region and
1363
+ # decrypt it in a different AWS Region without making a cross-Region
1364
+ # call or exposing the plaintext data. For more information about
1365
+ # multi-Region keys, see [Using multi-Region keys][1] in the *AWS Key
1366
+ # Management Service Developer Guide*.
1367
+ #
1368
+ # This value creates a *primary key*, not a replica. To create a
1369
+ # *replica key*, use the ReplicateKey operation.
1370
+ #
1371
+ # You can create a symmetric or asymmetric multi-Region CMK, and you can
1372
+ # create a multi-Region CMK with imported key material. However, you
1373
+ # cannot create a multi-Region CMK in a custom key store.
1374
+ #
1375
+ #
1376
+ #
1377
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
1194
1378
  #
1195
1379
  # @return [Types::CreateKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1196
1380
  #
@@ -1242,6 +1426,7 @@ module Aws::KMS
1242
1426
  # tag_value: "TagValueType", # required
1243
1427
  # },
1244
1428
  # ],
1429
+ # multi_region: false,
1245
1430
  # })
1246
1431
  #
1247
1432
  # @example Response structure
@@ -1253,7 +1438,7 @@ module Aws::KMS
1253
1438
  # resp.key_metadata.enabled #=> Boolean
1254
1439
  # resp.key_metadata.description #=> String
1255
1440
  # resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT"
1256
- # resp.key_metadata.key_state #=> String, one of "Enabled", "Disabled", "PendingDeletion", "PendingImport", "Unavailable"
1441
+ # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
1257
1442
  # resp.key_metadata.deletion_date #=> Time
1258
1443
  # resp.key_metadata.valid_to #=> Time
1259
1444
  # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
@@ -1266,6 +1451,14 @@ module Aws::KMS
1266
1451
  # resp.key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256"
1267
1452
  # resp.key_metadata.signing_algorithms #=> Array
1268
1453
  # resp.key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512"
1454
+ # resp.key_metadata.multi_region #=> Boolean
1455
+ # resp.key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
1456
+ # resp.key_metadata.multi_region_configuration.primary_key.arn #=> String
1457
+ # resp.key_metadata.multi_region_configuration.primary_key.region #=> String
1458
+ # resp.key_metadata.multi_region_configuration.replica_keys #=> Array
1459
+ # resp.key_metadata.multi_region_configuration.replica_keys[0].arn #=> String
1460
+ # resp.key_metadata.multi_region_configuration.replica_keys[0].region #=> String
1461
+ # resp.key_metadata.pending_deletion_window_in_days #=> Integer
1269
1462
  #
1270
1463
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey AWS API Documentation
1271
1464
  #
@@ -1303,33 +1496,55 @@ module Aws::KMS
1303
1496
  # encryption][3]. These libraries return a ciphertext format that is
1304
1497
  # incompatible with AWS KMS.
1305
1498
  #
1306
- # If the ciphertext was encrypted under a symmetric CMK, you do not need
1307
- # to specify the CMK or the encryption algorithm. AWS KMS can get this
1308
- # information from metadata that it adds to the symmetric ciphertext
1309
- # blob. However, if you prefer, you can specify the `KeyId` to ensure
1310
- # that a particular CMK is used to decrypt the ciphertext. If you
1311
- # specify a different CMK than the one used to encrypt the ciphertext,
1312
- # the `Decrypt` operation fails.
1499
+ # If the ciphertext was encrypted under a symmetric CMK, the `KeyId`
1500
+ # parameter is optional. AWS KMS can get this information from metadata
1501
+ # that it adds to the symmetric ciphertext blob. This feature adds
1502
+ # durability to your implementation by ensuring that authorized users
1503
+ # can decrypt ciphertext decades after it was encrypted, even if
1504
+ # they've lost track of the CMK ID. However, specifying the CMK is
1505
+ # always recommended as a best practice. When you use the `KeyId`
1506
+ # parameter to specify a CMK, AWS KMS only uses the CMK you specify. If
1507
+ # the ciphertext was encrypted under a different CMK, the `Decrypt`
1508
+ # operation fails. This practice ensures that you use the CMK that you
1509
+ # intend.
1313
1510
  #
1314
1511
  # Whenever possible, use key policies to give users permission to call
1315
- # the Decrypt operation on a particular CMK, instead of using IAM
1512
+ # the `Decrypt` operation on a particular CMK, instead of using IAM
1316
1513
  # policies. Otherwise, you might create an IAM user policy that gives
1317
- # the user Decrypt permission on all CMKs. This user could decrypt
1514
+ # the user `Decrypt` permission on all CMKs. This user could decrypt
1318
1515
  # ciphertext that was encrypted by CMKs in other accounts if the key
1319
1516
  # policy for the cross-account CMK permits it. If you must use an IAM
1320
1517
  # policy for `Decrypt` permissions, limit the user to particular CMKs or
1321
- # particular trusted accounts.
1518
+ # particular trusted accounts. For details, see [Best practices for IAM
1519
+ # policies][4] in the *AWS Key Management Service Developer Guide*.
1322
1520
  #
1323
1521
  # The CMK that you use for this operation must be in a compatible key
1324
- # state. For details, see [How Key State Affects Use of a Customer
1325
- # Master Key][4] in the *AWS Key Management Service Developer Guide*.
1522
+ # state. For details, see [Key state: Effect on your CMK][5] in the *AWS
1523
+ # Key Management Service Developer Guide*.
1524
+ #
1525
+ # **Cross-account use**\: Yes. You can decrypt a ciphertext using a CMK
1526
+ # in a different AWS account.
1527
+ #
1528
+ # **Required permissions**\: [kms:Decrypt][6] (key policy)
1529
+ #
1530
+ # **Related operations:**
1531
+ #
1532
+ # * Encrypt
1533
+ #
1534
+ # * GenerateDataKey
1535
+ #
1536
+ # * GenerateDataKeyPair
1537
+ #
1538
+ # * ReEncrypt
1326
1539
  #
1327
1540
  #
1328
1541
  #
1329
1542
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
1330
1543
  # [2]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
1331
1544
  # [3]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
1332
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
1545
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices
1546
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
1547
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1333
1548
  #
1334
1549
  # @option params [required, String, StringIO, File] :ciphertext_blob
1335
1550
  # Ciphertext to be decrypted. The blob includes metadata.
@@ -1358,30 +1573,31 @@ module Aws::KMS
1358
1573
  # @option params [Array<String>] :grant_tokens
1359
1574
  # A list of grant tokens.
1360
1575
  #
1361
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
1362
- # Service Developer Guide*.
1576
+ # Use a grant token when your permission to call this operation comes
1577
+ # from a newly created grant that has not yet achieved eventual
1578
+ # consistency. Use a grant token when your permission to call this
1579
+ # operation comes from a new grant that has not yet achieved *eventual
1580
+ # consistency*. For more information, see [Grant token][1] in the *AWS
1581
+ # Key Management Service Developer Guide*.
1363
1582
  #
1364
1583
  #
1365
1584
  #
1366
1585
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token
1367
1586
  #
1368
1587
  # @option params [String] :key_id
1369
- # Specifies the customer master key (CMK) that AWS KMS will use to
1370
- # decrypt the ciphertext. Enter a key ID of the CMK that was used to
1371
- # encrypt the ciphertext.
1372
- #
1373
- # If you specify a `KeyId` value, the `Decrypt` operation succeeds only
1374
- # if the specified CMK was used to encrypt the ciphertext.
1588
+ # Specifies the customer master key (CMK) that AWS KMS uses to decrypt
1589
+ # the ciphertext. Enter a key ID of the CMK that was used to encrypt the
1590
+ # ciphertext.
1375
1591
  #
1376
1592
  # This parameter is required only when the ciphertext was encrypted
1377
- # under an asymmetric CMK. Otherwise, AWS KMS uses the metadata that it
1378
- # adds to the ciphertext blob to determine which CMK was used to encrypt
1379
- # the ciphertext. However, you can use this parameter to ensure that a
1380
- # particular CMK (of any kind) is used to decrypt the ciphertext.
1593
+ # under an asymmetric CMK. If you used a symmetric CMK, AWS KMS can get
1594
+ # the CMK from metadata that it adds to the symmetric ciphertext blob.
1595
+ # However, it is always recommended as a best practice. This practice
1596
+ # ensures that you use the CMK that you intend.
1381
1597
  #
1382
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1383
- # name, or alias ARN. When using an alias name, prefix it with
1384
- # `"alias/"`.
1598
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
1599
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
1600
+ # in a different AWS account, you must use the key ARN or alias ARN.
1385
1601
  #
1386
1602
  # For example:
1387
1603
  #
@@ -1421,6 +1637,7 @@ module Aws::KMS
1421
1637
  #
1422
1638
  # resp = client.decrypt({
1423
1639
  # ciphertext_blob: "<binary data>", # The encrypted data (ciphertext).
1640
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # A key identifier for the CMK to use to decrypt the data.
1424
1641
  # })
1425
1642
  #
1426
1643
  # resp.to_h outputs the following:
@@ -1456,8 +1673,13 @@ module Aws::KMS
1456
1673
  req.send_request(options)
1457
1674
  end
1458
1675
 
1459
- # Deletes the specified alias. You cannot perform this operation on an
1460
- # alias in a different AWS account.
1676
+ # Deletes the specified alias.
1677
+ #
1678
+ # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
1679
+ # the CMK. For details, see [Using ABAC in AWS KMS][1] in the *AWS Key
1680
+ # Management Service Developer Guide*.
1681
+ #
1682
+ # </note>
1461
1683
  #
1462
1684
  # Because an alias is not a property of a CMK, you can delete and change
1463
1685
  # the aliases of a CMK without affecting the CMK. Also, aliases do not
@@ -1469,6 +1691,32 @@ module Aws::KMS
1469
1691
  # new alias. To associate an existing alias with a different customer
1470
1692
  # master key (CMK), call UpdateAlias.
1471
1693
  #
1694
+ # **Cross-account use**\: No. You cannot perform this operation on an
1695
+ # alias in a different AWS account.
1696
+ #
1697
+ # **Required permissions**
1698
+ #
1699
+ # * [kms:DeleteAlias][2] on the alias (IAM policy).
1700
+ #
1701
+ # * [kms:DeleteAlias][2] on the CMK (key policy).
1702
+ #
1703
+ # For details, see [Controlling access to aliases][3] in the *AWS Key
1704
+ # Management Service Developer Guide*.
1705
+ #
1706
+ # **Related operations:**
1707
+ #
1708
+ # * CreateAlias
1709
+ #
1710
+ # * ListAliases
1711
+ #
1712
+ # * UpdateAlias
1713
+ #
1714
+ #
1715
+ #
1716
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
1717
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1718
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
1719
+ #
1472
1720
  # @option params [required, String] :alias_name
1473
1721
  # The alias to be deleted. The alias name must begin with `alias/`
1474
1722
  # followed by the alias name, such as `alias/ExampleAlias`.
@@ -1531,12 +1779,30 @@ module Aws::KMS
1531
1779
  # AWS KMS, which combines the convenience and extensive integration of
1532
1780
  # AWS KMS with the isolation and control of a single-tenant key store.
1533
1781
  #
1782
+ # **Cross-account use**\: No. You cannot perform this operation on a
1783
+ # custom key store in a different AWS account.
1784
+ #
1785
+ # **Required permissions**\: [kms:DeleteCustomKeyStore][5] (IAM policy)
1786
+ #
1787
+ # **Related operations:**
1788
+ #
1789
+ # * ConnectCustomKeyStore
1790
+ #
1791
+ # * CreateCustomKeyStore
1792
+ #
1793
+ # * DescribeCustomKeyStores
1794
+ #
1795
+ # * DisconnectCustomKeyStore
1796
+ #
1797
+ # * UpdateCustomKeyStore
1798
+ #
1534
1799
  #
1535
1800
  #
1536
1801
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1537
1802
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
1538
1803
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
1539
1804
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
1805
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1540
1806
  #
1541
1807
  # @option params [required, String] :custom_key_store_id
1542
1808
  # Enter the ID of the custom key store you want to delete. To find the
@@ -1563,7 +1829,6 @@ module Aws::KMS
1563
1829
  # makes the specified customer master key (CMK) unusable. For more
1564
1830
  # information about importing key material into AWS KMS, see [Importing
1565
1831
  # Key Material][1] in the *AWS Key Management Service Developer Guide*.
1566
- # You cannot perform this operation on a CMK in a different AWS account.
1567
1832
  #
1568
1833
  # When the specified CMK is in the `PendingDeletion` state, this
1569
1834
  # operation does not change the CMK's state. Otherwise, it changes the
@@ -1573,19 +1838,32 @@ module Aws::KMS
1573
1838
  # reimport the same key material into the CMK.
1574
1839
  #
1575
1840
  # The CMK that you use for this operation must be in a compatible key
1576
- # state. For details, see [How Key State Affects Use of a Customer
1577
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
1841
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
1842
+ # Key Management Service Developer Guide*.
1843
+ #
1844
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
1845
+ # in a different AWS account.
1846
+ #
1847
+ # **Required permissions**\: [kms:DeleteImportedKeyMaterial][3] (key
1848
+ # policy)
1849
+ #
1850
+ # **Related operations:**
1851
+ #
1852
+ # * GetParametersForImport
1853
+ #
1854
+ # * ImportKeyMaterial
1578
1855
  #
1579
1856
  #
1580
1857
  #
1581
1858
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1582
1859
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
1860
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1583
1861
  #
1584
1862
  # @option params [required, String] :key_id
1585
1863
  # Identifies the CMK from which you are deleting imported key material.
1586
1864
  # The `Origin` of the CMK must be `EXTERNAL`.
1587
1865
  #
1588
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
1866
+ # Specify the key ID or key ARN of the CMK.
1589
1867
  #
1590
1868
  # For example:
1591
1869
  #
@@ -1623,14 +1901,14 @@ module Aws::KMS
1623
1901
  end
1624
1902
 
1625
1903
  # Gets information about [custom key stores][1] in the account and
1626
- # region.
1904
+ # Region.
1627
1905
  #
1628
1906
  # This operation is part of the [Custom Key Store feature][1] feature in
1629
1907
  # AWS KMS, which combines the convenience and extensive integration of
1630
1908
  # AWS KMS with the isolation and control of a single-tenant key store.
1631
1909
  #
1632
1910
  # By default, this operation returns information about all custom key
1633
- # stores in the account and region. To get only information about a
1911
+ # stores in the account and Region. To get only information about a
1634
1912
  # particular custom key store, use either the `CustomKeyStoreName` or
1635
1913
  # `CustomKeyStoreId` parameter (but not both).
1636
1914
  #
@@ -1652,17 +1930,36 @@ module Aws::KMS
1652
1930
  # Custom Key Stores][2] topic in the *AWS Key Management Service
1653
1931
  # Developer Guide*.
1654
1932
  #
1933
+ # **Cross-account use**\: No. You cannot perform this operation on a
1934
+ # custom key store in a different AWS account.
1935
+ #
1936
+ # **Required permissions**\: [kms:DescribeCustomKeyStores][3] (IAM
1937
+ # policy)
1938
+ #
1939
+ # **Related operations:**
1940
+ #
1941
+ # * ConnectCustomKeyStore
1942
+ #
1943
+ # * CreateCustomKeyStore
1944
+ #
1945
+ # * DeleteCustomKeyStore
1946
+ #
1947
+ # * DisconnectCustomKeyStore
1948
+ #
1949
+ # * UpdateCustomKeyStore
1950
+ #
1655
1951
  #
1656
1952
  #
1657
1953
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1658
1954
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
1955
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1659
1956
  #
1660
1957
  # @option params [String] :custom_key_store_id
1661
1958
  # Gets only information about the specified custom key store. Enter the
1662
1959
  # key store ID.
1663
1960
  #
1664
1961
  # By default, this operation gets information about all custom key
1665
- # stores in the account and region. To limit the output to a particular
1962
+ # stores in the account and Region. To limit the output to a particular
1666
1963
  # custom key store, you can use either the `CustomKeyStoreId` or
1667
1964
  # `CustomKeyStoreName` parameter, but not both.
1668
1965
  #
@@ -1671,7 +1968,7 @@ module Aws::KMS
1671
1968
  # friendly name of the custom key store.
1672
1969
  #
1673
1970
  # By default, this operation gets information about all custom key
1674
- # stores in the account and region. To limit the output to a particular
1971
+ # stores in the account and Region. To limit the output to a particular
1675
1972
  # custom key store, you can use either the `CustomKeyStoreId` or
1676
1973
  # `CustomKeyStoreName` parameter, but not both.
1677
1974
  #
@@ -1757,8 +2054,27 @@ module Aws::KMS
1757
2054
  # CMK][4]. Then, it associates the alias with the new CMK, and returns
1758
2055
  # the `KeyId` and `Arn` of the new CMK in the response.
1759
2056
  #
1760
- # To perform this operation on a CMK in a different AWS account, specify
1761
- # the key ARN or alias ARN in the value of the KeyId parameter.
2057
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
2058
+ # different AWS account, specify the key ARN or alias ARN in the value
2059
+ # of the `KeyId` parameter.
2060
+ #
2061
+ # **Required permissions**\: [kms:DescribeKey][5] (key policy)
2062
+ #
2063
+ # **Related operations:**
2064
+ #
2065
+ # * GetKeyPolicy
2066
+ #
2067
+ # * GetKeyRotationStatus
2068
+ #
2069
+ # * ListAliases
2070
+ #
2071
+ # * ListGrants
2072
+ #
2073
+ # * ListKeys
2074
+ #
2075
+ # * ListResourceTags
2076
+ #
2077
+ # * ListRetirableGrants
1762
2078
  #
1763
2079
  #
1764
2080
  #
@@ -1766,6 +2082,7 @@ module Aws::KMS
1766
2082
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
1767
2083
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works
1768
2084
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys
2085
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1769
2086
  #
1770
2087
  # @option params [required, String] :key_id
1771
2088
  # Describes the specified customer master key (CMK).
@@ -1774,10 +2091,9 @@ module Aws::KMS
1774
2091
  # KMS associates the alias with an [AWS managed CMK][1] and returns its
1775
2092
  # `KeyId` and `Arn` in the response.
1776
2093
  #
1777
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
1778
- # name, or alias ARN. When using an alias name, prefix it with
1779
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
1780
- # the key ARN or alias ARN.
2094
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
2095
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
2096
+ # in a different AWS account, you must use the key ARN or alias ARN.
1781
2097
  #
1782
2098
  # For example:
1783
2099
  #
@@ -1800,7 +2116,9 @@ module Aws::KMS
1800
2116
  # @option params [Array<String>] :grant_tokens
1801
2117
  # A list of grant tokens.
1802
2118
  #
1803
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
2119
+ # Use a grant token when your permission to call this operation comes
2120
+ # from a new grant that has not yet achieved *eventual consistency*. For
2121
+ # more information, see [Grant token][1] in the *AWS Key Management
1804
2122
  # Service Developer Guide*.
1805
2123
  #
1806
2124
  #
@@ -1812,9 +2130,9 @@ module Aws::KMS
1812
2130
  # * {Types::DescribeKeyResponse#key_metadata #key_metadata} => Types::KeyMetadata
1813
2131
  #
1814
2132
  #
1815
- # @example Example: To obtain information about a customer master key (CMK)
2133
+ # @example Example: To get details about a customer master key (CMK)
1816
2134
  #
1817
- # # The following example returns information (metadata) about the specified CMK.
2135
+ # # The following example gets metadata about a symmetric CMK.
1818
2136
  #
1819
2137
  # resp = client.describe_key({
1820
2138
  # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The identifier of the CMK that you want information about. You can use the key ID or the Amazon Resource Name (ARN) of the CMK.
@@ -1826,12 +2144,17 @@ module Aws::KMS
1826
2144
  # aws_account_id: "111122223333",
1827
2145
  # arn: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
1828
2146
  # creation_date: Time.parse("2017-07-05T14:04:55-07:00"),
2147
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
1829
2148
  # description: "",
1830
2149
  # enabled: true,
2150
+ # encryption_algorithms: [
2151
+ # "SYMMETRIC_DEFAULT",
2152
+ # ],
1831
2153
  # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
1832
2154
  # key_manager: "CUSTOMER",
1833
2155
  # key_state: "Enabled",
1834
2156
  # key_usage: "ENCRYPT_DECRYPT",
2157
+ # multi_region: false,
1835
2158
  # origin: "AWS_KMS",
1836
2159
  # }, # An object that contains information about the specified CMK.
1837
2160
  # }
@@ -1852,7 +2175,7 @@ module Aws::KMS
1852
2175
  # resp.key_metadata.enabled #=> Boolean
1853
2176
  # resp.key_metadata.description #=> String
1854
2177
  # resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT"
1855
- # resp.key_metadata.key_state #=> String, one of "Enabled", "Disabled", "PendingDeletion", "PendingImport", "Unavailable"
2178
+ # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
1856
2179
  # resp.key_metadata.deletion_date #=> Time
1857
2180
  # resp.key_metadata.valid_to #=> Time
1858
2181
  # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
@@ -1865,6 +2188,14 @@ module Aws::KMS
1865
2188
  # resp.key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256"
1866
2189
  # resp.key_metadata.signing_algorithms #=> Array
1867
2190
  # resp.key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512"
2191
+ # resp.key_metadata.multi_region #=> Boolean
2192
+ # resp.key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
2193
+ # resp.key_metadata.multi_region_configuration.primary_key.arn #=> String
2194
+ # resp.key_metadata.multi_region_configuration.primary_key.region #=> String
2195
+ # resp.key_metadata.multi_region_configuration.replica_keys #=> Array
2196
+ # resp.key_metadata.multi_region_configuration.replica_keys[0].arn #=> String
2197
+ # resp.key_metadata.multi_region_configuration.replica_keys[0].region #=> String
2198
+ # resp.key_metadata.pending_deletion_window_in_days #=> Integer
1868
2199
  #
1869
2200
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey AWS API Documentation
1870
2201
  #
@@ -1875,27 +2206,34 @@ module Aws::KMS
1875
2206
  req.send_request(options)
1876
2207
  end
1877
2208
 
1878
- # Sets the state of a customer master key (CMK) to disabled, thereby
1879
- # preventing its use for [cryptographic operations][1]. You cannot
1880
- # perform this operation on a CMK in a different AWS account.
2209
+ # Sets the state of a customer master key (CMK) to disabled. This change
2210
+ # temporarily prevents use of the CMK for [cryptographic operations][1].
1881
2211
  #
1882
2212
  # For more information about how key state affects the use of a CMK, see
1883
- # [How Key State Affects the Use of a Customer Master Key][2] in the <i>
1884
- # <i>AWS Key Management Service Developer Guide</i> </i>.
2213
+ # [Key state: Effect on your CMK][2] in the <i> <i>AWS Key Management
2214
+ # Service Developer Guide</i> </i>.
1885
2215
  #
1886
2216
  # The CMK that you use for this operation must be in a compatible key
1887
- # state. For details, see [How Key State Affects Use of a Customer
1888
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
2217
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
2218
+ # Key Management Service Developer Guide*.
2219
+ #
2220
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
2221
+ # in a different AWS account.
2222
+ #
2223
+ # **Required permissions**\: [kms:DisableKey][3] (key policy)
2224
+ #
2225
+ # **Related operations**\: EnableKey
1889
2226
  #
1890
2227
  #
1891
2228
  #
1892
2229
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
1893
2230
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2231
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1894
2232
  #
1895
2233
  # @option params [required, String] :key_id
1896
- # A unique identifier for the customer master key (CMK).
2234
+ # Identifies the customer master key (CMK) to disable.
1897
2235
  #
1898
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
2236
+ # Specify the key ID or key ARN of the CMK.
1899
2237
  #
1900
2238
  # For example:
1901
2239
  #
@@ -1935,26 +2273,42 @@ module Aws::KMS
1935
2273
  # Disables [automatic rotation of the key material][1] for the specified
1936
2274
  # symmetric customer master key (CMK).
1937
2275
  #
1938
- # You cannot enable automatic rotation of asymmetric CMKs, CMKs with
1939
- # imported key material, or CMKs in a [custom key store][2]. You cannot
1940
- # perform this operation on a CMK in a different AWS account.
2276
+ # You cannot enable automatic rotation of [asymmetric CMKs][2], CMKs
2277
+ # with [imported key material][3], or CMKs in a [custom key store][4].
2278
+ # To enable or disable automatic rotation of a set of related
2279
+ # [multi-Region keys][5], set the property on the primary key.
1941
2280
  #
1942
2281
  # The CMK that you use for this operation must be in a compatible key
1943
- # state. For details, see [How Key State Affects Use of a Customer
1944
- # Master Key][3] in the *AWS Key Management Service Developer Guide*.
2282
+ # state. For details, see [Key state: Effect on your CMK][6] in the *AWS
2283
+ # Key Management Service Developer Guide*.
2284
+ #
2285
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
2286
+ # in a different AWS account.
2287
+ #
2288
+ # **Required permissions**\: [kms:DisableKeyRotation][7] (key policy)
2289
+ #
2290
+ # **Related operations:**
2291
+ #
2292
+ # * EnableKeyRotation
2293
+ #
2294
+ # * GetKeyRotationStatus
1945
2295
  #
1946
2296
  #
1947
2297
  #
1948
2298
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
1949
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1950
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2299
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
2300
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
2301
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2302
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key
2303
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2304
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1951
2305
  #
1952
2306
  # @option params [required, String] :key_id
1953
- # Identifies a symmetric customer master key (CMK). You cannot enable
1954
- # automatic rotation of [asymmetric CMKs][1], CMKs with [imported key
1955
- # material][2], or CMKs in a [custom key store][3].
2307
+ # Identifies a symmetric customer master key (CMK). You cannot enable or
2308
+ # disable automatic rotation of [asymmetric CMKs][1], CMKs with
2309
+ # [imported key material][2], or CMKs in a [custom key store][3].
1956
2310
  #
1957
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
2311
+ # Specify the key ID or key ARN of the CMK.
1958
2312
  #
1959
2313
  # For example:
1960
2314
  #
@@ -2023,10 +2377,29 @@ module Aws::KMS
2023
2377
  # AWS KMS, which combines the convenience and extensive integration of
2024
2378
  # AWS KMS with the isolation and control of a single-tenant key store.
2025
2379
  #
2380
+ # **Cross-account use**\: No. You cannot perform this operation on a
2381
+ # custom key store in a different AWS account.
2382
+ #
2383
+ # **Required permissions**\: [kms:DisconnectCustomKeyStore][3] (IAM
2384
+ # policy)
2385
+ #
2386
+ # **Related operations:**
2387
+ #
2388
+ # * ConnectCustomKeyStore
2389
+ #
2390
+ # * CreateCustomKeyStore
2391
+ #
2392
+ # * DeleteCustomKeyStore
2393
+ #
2394
+ # * DescribeCustomKeyStores
2395
+ #
2396
+ # * UpdateCustomKeyStore
2397
+ #
2026
2398
  #
2027
2399
  #
2028
2400
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2029
2401
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
2402
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2030
2403
  #
2031
2404
  # @option params [required, String] :custom_key_store_id
2032
2405
  # Enter the ID of the custom key store you want to disconnect. To find
@@ -2051,22 +2424,29 @@ module Aws::KMS
2051
2424
  end
2052
2425
 
2053
2426
  # Sets the key state of a customer master key (CMK) to enabled. This
2054
- # allows you to use the CMK for [cryptographic operations][1]. You
2055
- # cannot perform this operation on a CMK in a different AWS account.
2427
+ # allows you to use the CMK for [cryptographic operations][1].
2056
2428
  #
2057
2429
  # The CMK that you use for this operation must be in a compatible key
2058
- # state. For details, see [How Key State Affects Use of a Customer
2059
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
2430
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
2431
+ # Key Management Service Developer Guide*.
2432
+ #
2433
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
2434
+ # in a different AWS account.
2435
+ #
2436
+ # **Required permissions**\: [kms:EnableKey][3] (key policy)
2437
+ #
2438
+ # **Related operations**\: DisableKey
2060
2439
  #
2061
2440
  #
2062
2441
  #
2063
2442
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
2064
2443
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2444
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2065
2445
  #
2066
2446
  # @option params [required, String] :key_id
2067
- # A unique identifier for the customer master key (CMK).
2447
+ # Identifies the customer master key (CMK) to enable.
2068
2448
  #
2069
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
2449
+ # Specify the key ID or key ARN of the CMK.
2070
2450
  #
2071
2451
  # For example:
2072
2452
  #
@@ -2104,28 +2484,46 @@ module Aws::KMS
2104
2484
  end
2105
2485
 
2106
2486
  # Enables [automatic rotation of the key material][1] for the specified
2107
- # symmetric customer master key (CMK). You cannot perform this operation
2108
- # on a CMK in a different AWS account.
2487
+ # symmetric customer master key (CMK).
2109
2488
  #
2110
- # You cannot enable automatic rotation of asymmetric CMKs, CMKs with
2111
- # imported key material, or CMKs in a [custom key store][2].
2489
+ # You cannot enable automatic rotation of [asymmetric CMKs][2], CMKs
2490
+ # with [imported key material][3], or CMKs in a [custom key store][4].
2491
+ # To enable or disable automatic rotation of a set of related
2492
+ # [multi-Region keys][5], set the property on the primary key.
2112
2493
  #
2113
2494
  # The CMK that you use for this operation must be in a compatible key
2114
- # state. For details, see [How Key State Affects Use of a Customer
2115
- # Master Key][3] in the *AWS Key Management Service Developer Guide*.
2495
+ # state. For details, see [Key state: Effect on your CMK][6] in the *AWS
2496
+ # Key Management Service Developer Guide*.
2497
+ #
2498
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
2499
+ # in a different AWS account.
2500
+ #
2501
+ # **Required permissions**\: [kms:EnableKeyRotation][7] (key policy)
2502
+ #
2503
+ # **Related operations:**
2504
+ #
2505
+ # * DisableKeyRotation
2506
+ #
2507
+ # * GetKeyRotationStatus
2116
2508
  #
2117
2509
  #
2118
2510
  #
2119
2511
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
2120
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2121
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2512
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
2513
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
2514
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2515
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key
2516
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2517
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2122
2518
  #
2123
2519
  # @option params [required, String] :key_id
2124
2520
  # Identifies a symmetric customer master key (CMK). You cannot enable
2125
- # automatic rotation of asymmetric CMKs, CMKs with imported key
2126
- # material, or CMKs in a [custom key store][1].
2521
+ # automatic rotation of [asymmetric CMKs][1], CMKs with [imported key
2522
+ # material][2], or CMKs in a [custom key store][3]. To enable or disable
2523
+ # automatic rotation of a set of related [multi-Region keys][4], set the
2524
+ # property on the primary key.
2127
2525
  #
2128
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
2526
+ # Specify the key ID or key ARN of the CMK.
2129
2527
  #
2130
2528
  # For example:
2131
2529
  #
@@ -2138,7 +2536,10 @@ module Aws::KMS
2138
2536
  #
2139
2537
  #
2140
2538
  #
2141
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2539
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
2540
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
2541
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2542
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key
2142
2543
  #
2143
2544
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2144
2545
  #
@@ -2241,24 +2642,36 @@ module Aws::KMS
2241
2642
  # * `RSAES_OAEP_SHA_256`\: 446 bytes
2242
2643
  #
2243
2644
  # The CMK that you use for this operation must be in a compatible key
2244
- # state. For details, see [How Key State Affects Use of a Customer
2245
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
2645
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
2646
+ # Key Management Service Developer Guide*.
2647
+ #
2648
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
2649
+ # different AWS account, specify the key ARN or alias ARN in the value
2650
+ # of the `KeyId` parameter.
2651
+ #
2652
+ # **Required permissions**\: [kms:Encrypt][3] (key policy)
2246
2653
  #
2247
- # To perform this operation on a CMK in a different AWS account, specify
2248
- # the key ARN or alias ARN in the value of the KeyId parameter.
2654
+ # **Related operations:**
2655
+ #
2656
+ # * Decrypt
2657
+ #
2658
+ # * GenerateDataKey
2659
+ #
2660
+ # * GenerateDataKeyPair
2249
2661
  #
2250
2662
  #
2251
2663
  #
2252
2664
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
2253
2665
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
2666
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2254
2667
  #
2255
2668
  # @option params [required, String] :key_id
2256
- # A unique identifier for the customer master key (CMK).
2669
+ # Identifies the customer master key (CMK) to use in the encryption
2670
+ # operation.
2257
2671
  #
2258
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2259
- # name, or alias ARN. When using an alias name, prefix it with
2260
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
2261
- # the key ARN or alias ARN.
2672
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
2673
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
2674
+ # in a different AWS account, you must use the key ARN or alias ARN.
2262
2675
  #
2263
2676
  # For example:
2264
2677
  #
@@ -2302,7 +2715,9 @@ module Aws::KMS
2302
2715
  # @option params [Array<String>] :grant_tokens
2303
2716
  # A list of grant tokens.
2304
2717
  #
2305
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
2718
+ # Use a grant token when your permission to call this operation comes
2719
+ # from a new grant that has not yet achieved *eventual consistency*. For
2720
+ # more information, see [Grant token][1] in the *AWS Key Management
2306
2721
  # Service Developer Guide*.
2307
2722
  #
2308
2723
  #
@@ -2399,8 +2814,8 @@ module Aws::KMS
2399
2814
  # Service Developer Guide*.
2400
2815
  #
2401
2816
  # The CMK that you use for this operation must be in a compatible key
2402
- # state. For details, see [How Key State Affects Use of a Customer
2403
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
2817
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
2818
+ # Key Management Service Developer Guide*.
2404
2819
  #
2405
2820
  # **How to use your data key**
2406
2821
  #
@@ -2429,6 +2844,24 @@ module Aws::KMS
2429
2844
  # 2. Use the plaintext data key to decrypt data outside of AWS KMS,
2430
2845
  # then erase the plaintext data key from memory.
2431
2846
  #
2847
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
2848
+ # different AWS account, specify the key ARN or alias ARN in the value
2849
+ # of the `KeyId` parameter.
2850
+ #
2851
+ # **Required permissions**\: [kms:GenerateDataKey][6] (key policy)
2852
+ #
2853
+ # **Related operations:**
2854
+ #
2855
+ # * Decrypt
2856
+ #
2857
+ # * Encrypt
2858
+ #
2859
+ # * GenerateDataKeyPair
2860
+ #
2861
+ # * GenerateDataKeyPairWithoutPlaintext
2862
+ #
2863
+ # * GenerateDataKeyWithoutPlaintext
2864
+ #
2432
2865
  #
2433
2866
  #
2434
2867
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
@@ -2436,14 +2869,14 @@ module Aws::KMS
2436
2869
  # [3]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
2437
2870
  # [4]: https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/
2438
2871
  # [5]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
2872
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2439
2873
  #
2440
2874
  # @option params [required, String] :key_id
2441
2875
  # Identifies the symmetric CMK that encrypts the data key.
2442
2876
  #
2443
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2444
- # name, or alias ARN. When using an alias name, prefix it with
2445
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
2446
- # the key ARN or alias ARN.
2877
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
2878
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
2879
+ # in a different AWS account, you must use the key ARN or alias ARN.
2447
2880
  #
2448
2881
  # For example:
2449
2882
  #
@@ -2497,7 +2930,9 @@ module Aws::KMS
2497
2930
  # @option params [Array<String>] :grant_tokens
2498
2931
  # A list of grant tokens.
2499
2932
  #
2500
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
2933
+ # Use a grant token when your permission to call this operation comes
2934
+ # from a new grant that has not yet achieved *eventual consistency*. For
2935
+ # more information, see [Grant token][1] in the *AWS Key Management
2501
2936
  # Service Developer Guide*.
2502
2937
  #
2503
2938
  #
@@ -2594,13 +3029,32 @@ module Aws::KMS
2594
3029
  # Service Developer Guide*.
2595
3030
  #
2596
3031
  # The CMK that you use for this operation must be in a compatible key
2597
- # state. For details, see [How Key State Affects Use of a Customer
2598
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
3032
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
3033
+ # Key Management Service Developer Guide*.
3034
+ #
3035
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
3036
+ # different AWS account, specify the key ARN or alias ARN in the value
3037
+ # of the `KeyId` parameter.
3038
+ #
3039
+ # **Required permissions**\: [kms:GenerateDataKeyPair][3] (key policy)
3040
+ #
3041
+ # **Related operations:**
3042
+ #
3043
+ # * Decrypt
3044
+ #
3045
+ # * Encrypt
3046
+ #
3047
+ # * GenerateDataKey
3048
+ #
3049
+ # * GenerateDataKeyPairWithoutPlaintext
3050
+ #
3051
+ # * GenerateDataKeyWithoutPlaintext
2599
3052
  #
2600
3053
  #
2601
3054
  #
2602
3055
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
2603
3056
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3057
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2604
3058
  #
2605
3059
  # @option params [Hash<String,String>] :encryption_context
2606
3060
  # Specifies the encryption context that will be used when encrypting the
@@ -2626,10 +3080,9 @@ module Aws::KMS
2626
3080
  # key store. To get the type and origin of your CMK, use the DescribeKey
2627
3081
  # operation.
2628
3082
  #
2629
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2630
- # name, or alias ARN. When using an alias name, prefix it with
2631
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
2632
- # the key ARN or alias ARN.
3083
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
3084
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
3085
+ # in a different AWS account, you must use the key ARN or alias ARN.
2633
3086
  #
2634
3087
  # For example:
2635
3088
  #
@@ -2656,7 +3109,9 @@ module Aws::KMS
2656
3109
  # @option params [Array<String>] :grant_tokens
2657
3110
  # A list of grant tokens.
2658
3111
  #
2659
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
3112
+ # Use a grant token when your permission to call this operation comes
3113
+ # from a new grant that has not yet achieved *eventual consistency*. For
3114
+ # more information, see [Grant token][1] in the *AWS Key Management
2660
3115
  # Service Developer Guide*.
2661
3116
  #
2662
3117
  #
@@ -2730,13 +3185,33 @@ module Aws::KMS
2730
3185
  # Service Developer Guide*.
2731
3186
  #
2732
3187
  # The CMK that you use for this operation must be in a compatible key
2733
- # state. For details, see [How Key State Affects Use of a Customer
2734
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
3188
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
3189
+ # Key Management Service Developer Guide*.
2735
3190
  #
3191
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
3192
+ # different AWS account, specify the key ARN or alias ARN in the value
3193
+ # of the `KeyId` parameter.
2736
3194
  #
3195
+ # **Required permissions**\:
3196
+ # [kms:GenerateDataKeyPairWithoutPlaintext][3] (key policy)
2737
3197
  #
2738
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
2739
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3198
+ # **Related operations:**
3199
+ #
3200
+ # * Decrypt
3201
+ #
3202
+ # * Encrypt
3203
+ #
3204
+ # * GenerateDataKey
3205
+ #
3206
+ # * GenerateDataKeyPair
3207
+ #
3208
+ # * GenerateDataKeyWithoutPlaintext
3209
+ #
3210
+ #
3211
+ #
3212
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
3213
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3214
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2740
3215
  #
2741
3216
  # @option params [Hash<String,String>] :encryption_context
2742
3217
  # Specifies the encryption context that will be used when encrypting the
@@ -2762,9 +3237,9 @@ module Aws::KMS
2762
3237
  # a CMK in a custom key store. To get the type and origin of your CMK,
2763
3238
  # use the DescribeKey operation.
2764
3239
  #
2765
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2766
- # name, or alias ARN. When using an alias name, prefix it with
2767
- # `"alias/"`.
3240
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
3241
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
3242
+ # in a different AWS account, you must use the key ARN or alias ARN.
2768
3243
  #
2769
3244
  # For example:
2770
3245
  #
@@ -2791,7 +3266,9 @@ module Aws::KMS
2791
3266
  # @option params [Array<String>] :grant_tokens
2792
3267
  # A list of grant tokens.
2793
3268
  #
2794
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
3269
+ # Use a grant token when your permission to call this operation comes
3270
+ # from a new grant that has not yet achieved *eventual consistency*. For
3271
+ # more information, see [Grant token][1] in the *AWS Key Management
2795
3272
  # Service Developer Guide*.
2796
3273
  #
2797
3274
  #
@@ -2874,22 +3351,41 @@ module Aws::KMS
2874
3351
  # Service Developer Guide*.
2875
3352
  #
2876
3353
  # The CMK that you use for this operation must be in a compatible key
2877
- # state. For details, see [How Key State Affects Use of a Customer
2878
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
3354
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
3355
+ # Key Management Service Developer Guide*.
3356
+ #
3357
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
3358
+ # different AWS account, specify the key ARN or alias ARN in the value
3359
+ # of the `KeyId` parameter.
3360
+ #
3361
+ # **Required permissions**\: [kms:GenerateDataKeyWithoutPlaintext][3]
3362
+ # (key policy)
3363
+ #
3364
+ # **Related operations:**
3365
+ #
3366
+ # * Decrypt
3367
+ #
3368
+ # * Encrypt
3369
+ #
3370
+ # * GenerateDataKey
3371
+ #
3372
+ # * GenerateDataKeyPair
3373
+ #
3374
+ # * GenerateDataKeyPairWithoutPlaintext
2879
3375
  #
2880
3376
  #
2881
3377
  #
2882
3378
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
2883
3379
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3380
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2884
3381
  #
2885
3382
  # @option params [required, String] :key_id
2886
3383
  # The identifier of the symmetric customer master key (CMK) that
2887
3384
  # encrypts the data key.
2888
3385
  #
2889
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
2890
- # name, or alias ARN. When using an alias name, prefix it with
2891
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
2892
- # the key ARN or alias ARN.
3386
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
3387
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
3388
+ # in a different AWS account, you must use the key ARN or alias ARN.
2893
3389
  #
2894
3390
  # For example:
2895
3391
  #
@@ -2936,7 +3432,9 @@ module Aws::KMS
2936
3432
  # @option params [Array<String>] :grant_tokens
2937
3433
  # A list of grant tokens.
2938
3434
  #
2939
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
3435
+ # Use a grant token when your permission to call this operation comes
3436
+ # from a new grant that has not yet achieved *eventual consistency*. For
3437
+ # more information, see [Grant token][1] in the *AWS Key Management
2940
3438
  # Service Developer Guide*.
2941
3439
  #
2942
3440
  #
@@ -2999,12 +3497,15 @@ module Aws::KMS
2999
3497
  # ID.
3000
3498
  #
3001
3499
  # For more information about entropy and random number generation, see
3002
- # the [AWS Key Management Service Cryptographic Details][2] whitepaper.
3500
+ # [AWS Key Management Service Cryptographic Details][2].
3501
+ #
3502
+ # **Required permissions**\: [kms:GenerateRandom][3] (IAM policy)
3003
3503
  #
3004
3504
  #
3005
3505
  #
3006
3506
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
3007
- # [2]: https://d0.awsstatic.com/whitepapers/KMS-Cryptographic-Details.pdf
3507
+ # [2]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
3508
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3008
3509
  #
3009
3510
  # @option params [Integer] :number_of_bytes
3010
3511
  # The length of the byte string.
@@ -3057,12 +3558,22 @@ module Aws::KMS
3057
3558
  end
3058
3559
 
3059
3560
  # Gets a key policy attached to the specified customer master key (CMK).
3060
- # You cannot perform this operation on a CMK in a different AWS account.
3561
+ #
3562
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
3563
+ # in a different AWS account.
3564
+ #
3565
+ # **Required permissions**\: [kms:GetKeyPolicy][1] (key policy)
3566
+ #
3567
+ # **Related operations**\: PutKeyPolicy
3568
+ #
3569
+ #
3570
+ #
3571
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3061
3572
  #
3062
3573
  # @option params [required, String] :key_id
3063
- # A unique identifier for the customer master key (CMK).
3574
+ # Gets the key policy for the specified customer master key (CMK).
3064
3575
  #
3065
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
3576
+ # Specify the key ID or key ARN of the CMK.
3066
3577
  #
3067
3578
  # For example:
3068
3579
  #
@@ -3120,13 +3631,15 @@ module Aws::KMS
3120
3631
  # key material][1] is enabled for the specified customer master key
3121
3632
  # (CMK).
3122
3633
  #
3123
- # You cannot enable automatic rotation of asymmetric CMKs, CMKs with
3124
- # imported key material, or CMKs in a [custom key store][2]. The key
3634
+ # You cannot enable automatic rotation of [asymmetric CMKs][2], CMKs
3635
+ # with [imported key material][3], or CMKs in a [custom key store][4].
3636
+ # To enable or disable automatic rotation of a set of related
3637
+ # [multi-Region keys][5], set the property on the primary key. The key
3125
3638
  # rotation status for these CMKs is always `false`.
3126
3639
  #
3127
3640
  # The CMK that you use for this operation must be in a compatible key
3128
- # state. For details, see [How Key State Affects Use of a Customer
3129
- # Master Key][3] in the *AWS Key Management Service Developer Guide*.
3641
+ # state. For details, see [Key state: Effect on your CMK][6] in the *AWS
3642
+ # Key Management Service Developer Guide*.
3130
3643
  #
3131
3644
  # * Disabled: The key rotation status does not change when you disable a
3132
3645
  # CMK. However, while the CMK is disabled, AWS KMS does not rotate the
@@ -3137,20 +3650,33 @@ module Aws::KMS
3137
3650
  # you cancel the deletion, the original key rotation status is
3138
3651
  # restored.
3139
3652
  #
3140
- # To perform this operation on a CMK in a different AWS account, specify
3141
- # the key ARN in the value of the `KeyId` parameter.
3653
+ # **Cross-account use**\: Yes. To perform this operation on a CMK in a
3654
+ # different AWS account, specify the key ARN in the value of the `KeyId`
3655
+ # parameter.
3656
+ #
3657
+ # **Required permissions**\: [kms:GetKeyRotationStatus][7] (key policy)
3658
+ #
3659
+ # **Related operations:**
3660
+ #
3661
+ # * DisableKeyRotation
3662
+ #
3663
+ # * EnableKeyRotation
3142
3664
  #
3143
3665
  #
3144
3666
  #
3145
3667
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
3146
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
3147
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3668
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
3669
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
3670
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
3671
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key
3672
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3673
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3148
3674
  #
3149
3675
  # @option params [required, String] :key_id
3150
- # A unique identifier for the customer master key (CMK).
3676
+ # Gets the rotation status for the specified customer master key (CMK).
3151
3677
  #
3152
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To
3153
- # specify a CMK in a different AWS account, you must use the key ARN.
3678
+ # Specify the key ID or key ARN of the CMK. To specify a CMK in a
3679
+ # different AWS account, you must use the key ARN.
3154
3680
  #
3155
3681
  # For example:
3156
3682
  #
@@ -3222,19 +3748,32 @@ module Aws::KMS
3222
3748
  # `GetParametersForImport` request.
3223
3749
  #
3224
3750
  # The CMK that you use for this operation must be in a compatible key
3225
- # state. For details, see [How Key State Affects Use of a Customer
3226
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
3751
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
3752
+ # Key Management Service Developer Guide*.
3753
+ #
3754
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
3755
+ # in a different AWS account.
3756
+ #
3757
+ # **Required permissions**\: [kms:GetParametersForImport][3] (key
3758
+ # policy)
3759
+ #
3760
+ # **Related operations:**
3761
+ #
3762
+ # * ImportKeyMaterial
3763
+ #
3764
+ # * DeleteImportedKeyMaterial
3227
3765
  #
3228
3766
  #
3229
3767
  #
3230
3768
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
3231
3769
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3770
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3232
3771
  #
3233
3772
  # @option params [required, String] :key_id
3234
3773
  # The identifier of the symmetric CMK into which you will import key
3235
3774
  # material. The `Origin` of the CMK must be `EXTERNAL`.
3236
3775
  #
3237
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
3776
+ # Specify the key ID or key ARN of the CMK.
3238
3777
  #
3239
3778
  # For example:
3240
3779
  #
@@ -3348,8 +3887,16 @@ module Aws::KMS
3348
3887
  # algorithm in a verification operation.
3349
3888
  #
3350
3889
  # The CMK that you use for this operation must be in a compatible key
3351
- # state. For details, see [How Key State Affects Use of a Customer
3352
- # Master Key][7] in the *AWS Key Management Service Developer Guide*.
3890
+ # state. For details, see [Key state: Effect on your CMK][7] in the *AWS
3891
+ # Key Management Service Developer Guide*.
3892
+ #
3893
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
3894
+ # different AWS account, specify the key ARN or alias ARN in the value
3895
+ # of the `KeyId` parameter.
3896
+ #
3897
+ # **Required permissions**\: [kms:GetPublicKey][8] (key policy)
3898
+ #
3899
+ # **Related operations**\: CreateKey
3353
3900
  #
3354
3901
  #
3355
3902
  #
@@ -3360,14 +3907,14 @@ module Aws::KMS
3360
3907
  # [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
3361
3908
  # [6]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms
3362
3909
  # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3910
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3363
3911
  #
3364
3912
  # @option params [required, String] :key_id
3365
3913
  # Identifies the asymmetric CMK that includes the public key.
3366
3914
  #
3367
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
3368
- # name, or alias ARN. When using an alias name, prefix it with
3369
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
3370
- # the key ARN or alias ARN.
3915
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
3916
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
3917
+ # in a different AWS account, you must use the key ARN or alias ARN.
3371
3918
  #
3372
3919
  # For example:
3373
3920
  #
@@ -3386,7 +3933,9 @@ module Aws::KMS
3386
3933
  # @option params [Array<String>] :grant_tokens
3387
3934
  # A list of grant tokens.
3388
3935
  #
3389
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
3936
+ # Use a grant token when your permission to call this operation comes
3937
+ # from a new grant that has not yet achieved *eventual consistency*. For
3938
+ # more information, see [Grant token][1] in the *AWS Key Management
3390
3939
  # Service Developer Guide*.
3391
3940
  #
3392
3941
  #
@@ -3479,8 +4028,19 @@ module Aws::KMS
3479
4028
  # Service Developer Guide*.
3480
4029
  #
3481
4030
  # The CMK that you use for this operation must be in a compatible key
3482
- # state. For details, see [How Key State Affects Use of a Customer
3483
- # Master Key][4] in the *AWS Key Management Service Developer Guide*.
4031
+ # state. For details, see [Key state: Effect on your CMK][4] in the *AWS
4032
+ # Key Management Service Developer Guide*.
4033
+ #
4034
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
4035
+ # in a different AWS account.
4036
+ #
4037
+ # **Required permissions**\: [kms:ImportKeyMaterial][5] (key policy)
4038
+ #
4039
+ # **Related operations:**
4040
+ #
4041
+ # * DeleteImportedKeyMaterial
4042
+ #
4043
+ # * GetParametersForImport
3484
4044
  #
3485
4045
  #
3486
4046
  #
@@ -3488,6 +4048,7 @@ module Aws::KMS
3488
4048
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
3489
4049
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview
3490
4050
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4051
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3491
4052
  #
3492
4053
  # @option params [required, String] :key_id
3493
4054
  # The identifier of the symmetric CMK that receives the imported key
@@ -3495,7 +4056,7 @@ module Aws::KMS
3495
4056
  # same CMK specified in the `KeyID` parameter of the corresponding
3496
4057
  # GetParametersForImport request.
3497
4058
  #
3498
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
4059
+ # Specify the key ID or key ARN of the CMK.
3499
4060
  #
3500
4061
  # For example:
3501
4062
  #
@@ -3563,13 +4124,12 @@ module Aws::KMS
3563
4124
  req.send_request(options)
3564
4125
  end
3565
4126
 
3566
- # Gets a list of aliases in the caller's AWS account and region. You
3567
- # cannot list aliases in other accounts. For more information about
3568
- # aliases, see CreateAlias.
4127
+ # Gets a list of aliases in the caller's AWS account and region. For
4128
+ # more information about aliases, see CreateAlias.
3569
4129
  #
3570
- # By default, the ListAliases command returns all aliases in the account
3571
- # and region. To get only the aliases that point to a particular
3572
- # customer master key (CMK), use the `KeyId` parameter.
4130
+ # By default, the `ListAliases` operation returns all aliases in the
4131
+ # account and region. To get only the aliases associated with a
4132
+ # particular customer master key (CMK), use the `KeyId` parameter.
3573
4133
  #
3574
4134
  # The `ListAliases` response can include aliases that you created and
3575
4135
  # associated with your customer managed CMKs, and aliases that AWS
@@ -3583,18 +4143,45 @@ module Aws::KMS
3583
4143
  # including predefined aliases, do not count against your [AWS KMS
3584
4144
  # aliases quota][1].
3585
4145
  #
4146
+ # **Cross-account use**\: No. `ListAliases` does not return aliases in
4147
+ # other AWS accounts.
4148
+ #
4149
+ # **Required permissions**\: [kms:ListAliases][2] (IAM policy)
4150
+ #
4151
+ # For details, see [Controlling access to aliases][3] in the *AWS Key
4152
+ # Management Service Developer Guide*.
4153
+ #
4154
+ # **Related operations:**
4155
+ #
4156
+ # * CreateAlias
4157
+ #
4158
+ # * DeleteAlias
4159
+ #
4160
+ # * UpdateAlias
4161
+ #
3586
4162
  #
3587
4163
  #
3588
4164
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit
4165
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4166
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
3589
4167
  #
3590
4168
  # @option params [String] :key_id
3591
- # Lists only aliases that refer to the specified CMK. The value of this
3592
- # parameter can be the ID or Amazon Resource Name (ARN) of a CMK in the
3593
- # caller's account and region. You cannot use an alias name or alias
3594
- # ARN in this value.
4169
+ # Lists only aliases that are associated with the specified CMK. Enter a
4170
+ # CMK in your AWS account.
3595
4171
  #
3596
4172
  # This parameter is optional. If you omit it, `ListAliases` returns all
3597
- # aliases in the account and region.
4173
+ # aliases in the account and Region.
4174
+ #
4175
+ # Specify the key ID or key ARN of the CMK.
4176
+ #
4177
+ # For example:
4178
+ #
4179
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
4180
+ #
4181
+ # * Key ARN:
4182
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
4183
+ #
4184
+ # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
3598
4185
  #
3599
4186
  # @option params [Integer] :limit
3600
4187
  # Use this parameter to specify the maximum number of items to return.
@@ -3686,6 +4273,8 @@ module Aws::KMS
3686
4273
  # resp.aliases[0].alias_name #=> String
3687
4274
  # resp.aliases[0].alias_arn #=> String
3688
4275
  # resp.aliases[0].target_key_id #=> String
4276
+ # resp.aliases[0].creation_date #=> Time
4277
+ # resp.aliases[0].last_updated_date #=> Time
3689
4278
  # resp.next_marker #=> String
3690
4279
  # resp.truncated #=> Boolean
3691
4280
  #
@@ -3700,8 +4289,8 @@ module Aws::KMS
3700
4289
 
3701
4290
  # Gets a list of all grants for the specified customer master key (CMK).
3702
4291
  #
3703
- # To perform this operation on a CMK in a different AWS account, specify
3704
- # the key ARN in the value of the `KeyId` parameter.
4292
+ # You must specify the CMK in all requests. You can filter the grant
4293
+ # list by grant ID or grantee principal.
3705
4294
  #
3706
4295
  # <note markdown="1"> The `GranteePrincipal` field in the `ListGrants` response usually
3707
4296
  # contains the user or role designated as the grantee principal in the
@@ -3712,9 +4301,26 @@ module Aws::KMS
3712
4301
  #
3713
4302
  # </note>
3714
4303
  #
4304
+ # **Cross-account use**\: Yes. To perform this operation on a CMK in a
4305
+ # different AWS account, specify the key ARN in the value of the `KeyId`
4306
+ # parameter.
4307
+ #
4308
+ # **Required permissions**\: [kms:ListGrants][2] (key policy)
4309
+ #
4310
+ # **Related operations:**
4311
+ #
4312
+ # * CreateGrant
4313
+ #
4314
+ # * ListRetirableGrants
4315
+ #
4316
+ # * RetireGrant
4317
+ #
4318
+ # * RevokeGrant
4319
+ #
3715
4320
  #
3716
4321
  #
3717
4322
  # [1]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
4323
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3718
4324
  #
3719
4325
  # @option params [Integer] :limit
3720
4326
  # Use this parameter to specify the maximum number of items to return.
@@ -3730,10 +4336,11 @@ module Aws::KMS
3730
4336
  # from the truncated response you just received.
3731
4337
  #
3732
4338
  # @option params [required, String] :key_id
3733
- # A unique identifier for the customer master key (CMK).
4339
+ # Returns only grants for the specified customer master key (CMK). This
4340
+ # parameter is required.
3734
4341
  #
3735
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To
3736
- # specify a CMK in a different AWS account, you must use the key ARN.
4342
+ # Specify the key ID or key ARN of the CMK. To specify a CMK in a
4343
+ # different AWS account, you must use the key ARN.
3737
4344
  #
3738
4345
  # For example:
3739
4346
  #
@@ -3744,6 +4351,14 @@ module Aws::KMS
3744
4351
  #
3745
4352
  # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
3746
4353
  #
4354
+ # @option params [String] :grant_id
4355
+ # Returns only the grant with the specified grant ID. The grant ID
4356
+ # uniquely identifies the grant.
4357
+ #
4358
+ # @option params [String] :grantee_principal
4359
+ # Returns only grants where the specified principal is the grantee
4360
+ # principal for the grant.
4361
+ #
3747
4362
  # @return [Types::ListGrantsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3748
4363
  #
3749
4364
  # * {Types::ListGrantsResponse#grants #grants} => Array&lt;Types::GrantListEntry&gt;
@@ -3825,6 +4440,8 @@ module Aws::KMS
3825
4440
  # limit: 1,
3826
4441
  # marker: "MarkerType",
3827
4442
  # key_id: "KeyIdType", # required
4443
+ # grant_id: "GrantIdType",
4444
+ # grantee_principal: "PrincipalIdType",
3828
4445
  # })
3829
4446
  #
3830
4447
  # @example Response structure
@@ -3858,13 +4475,28 @@ module Aws::KMS
3858
4475
  # Gets the names of the key policies that are attached to a customer
3859
4476
  # master key (CMK). This operation is designed to get policy names that
3860
4477
  # you can use in a GetKeyPolicy operation. However, the only valid
3861
- # policy name is `default`. You cannot perform this operation on a CMK
4478
+ # policy name is `default`.
4479
+ #
4480
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
3862
4481
  # in a different AWS account.
3863
4482
  #
4483
+ # **Required permissions**\: [kms:ListKeyPolicies][1] (key policy)
4484
+ #
4485
+ # **Related operations:**
4486
+ #
4487
+ # * GetKeyPolicy
4488
+ #
4489
+ # * PutKeyPolicy
4490
+ #
4491
+ #
4492
+ #
4493
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4494
+ #
3864
4495
  # @option params [required, String] :key_id
3865
- # A unique identifier for the customer master key (CMK).
4496
+ # Gets the names of key policies for the specified customer master key
4497
+ # (CMK).
3866
4498
  #
3867
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
4499
+ # Specify the key ID or key ARN of the CMK.
3868
4500
  #
3869
4501
  # For example:
3870
4502
  #
@@ -3943,6 +4575,25 @@ module Aws::KMS
3943
4575
  # Gets a list of all customer master keys (CMKs) in the caller's AWS
3944
4576
  # account and Region.
3945
4577
  #
4578
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
4579
+ # in a different AWS account.
4580
+ #
4581
+ # **Required permissions**\: [kms:ListKeys][1] (IAM policy)
4582
+ #
4583
+ # **Related operations:**
4584
+ #
4585
+ # * CreateKey
4586
+ #
4587
+ # * DescribeKey
4588
+ #
4589
+ # * ListAliases
4590
+ #
4591
+ # * ListResourceTags
4592
+ #
4593
+ #
4594
+ #
4595
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4596
+ #
3946
4597
  # @option params [Integer] :limit
3947
4598
  # Use this parameter to specify the maximum number of items to return.
3948
4599
  # When this value is present, AWS KMS does not return more than the
@@ -4032,15 +4683,38 @@ module Aws::KMS
4032
4683
  req.send_request(options)
4033
4684
  end
4034
4685
 
4035
- # Returns a list of all tags for the specified customer master key
4036
- # (CMK).
4686
+ # Returns all tags on the specified customer master key (CMK).
4037
4687
  #
4038
- # You cannot perform this operation on a CMK in a different AWS account.
4688
+ # For general information about tags, including the format and syntax,
4689
+ # see [Tagging AWS resources][1] in the *Amazon Web Services General
4690
+ # Reference*. For information about using tags in AWS KMS, see [Tagging
4691
+ # keys][2].
4692
+ #
4693
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
4694
+ # in a different AWS account.
4695
+ #
4696
+ # **Required permissions**\: [kms:ListResourceTags][3] (key policy)
4697
+ #
4698
+ # **Related operations:**
4699
+ #
4700
+ # * CreateKey
4701
+ #
4702
+ # * ReplicateKey
4703
+ #
4704
+ # * TagResource
4705
+ #
4706
+ # * UntagResource
4707
+ #
4708
+ #
4709
+ #
4710
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
4711
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
4712
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4039
4713
  #
4040
4714
  # @option params [required, String] :key_id
4041
- # A unique identifier for the customer master key (CMK).
4715
+ # Gets tags on the specified customer master key (CMK).
4042
4716
  #
4043
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
4717
+ # Specify the key ID or key ARN of the CMK.
4044
4718
  #
4045
4719
  # For example:
4046
4720
  #
@@ -4126,11 +4800,40 @@ module Aws::KMS
4126
4800
  req.send_request(options)
4127
4801
  end
4128
4802
 
4129
- # Returns a list of all grants for which the grant's
4130
- # `RetiringPrincipal` matches the one specified.
4803
+ # Returns information about all grants in the AWS account and Region
4804
+ # that have the specified retiring principal. For more information about
4805
+ # grants, see [Grants][1] in the <i> <i>AWS Key Management Service
4806
+ # Developer Guide</i> </i>.
4807
+ #
4808
+ # You can specify any principal in your AWS account. The grants that are
4809
+ # returned include grants for CMKs in your AWS account and other AWS
4810
+ # accounts.
4811
+ #
4812
+ # You might use this operation to determine which grants you may retire.
4813
+ # To retire a grant, use the RetireGrant operation.
4131
4814
  #
4132
- # A typical use is to list all grants that you are able to retire. To
4133
- # retire a grant, use RetireGrant.
4815
+ # **Cross-account use**\: You must specify a principal in your AWS
4816
+ # account. However, this operation can return grants in any AWS account.
4817
+ # You do not need `kms:ListRetirableGrants` permission (or any other
4818
+ # additional permission) in any AWS account other than your own.
4819
+ #
4820
+ # **Required permissions**\: [kms:ListRetirableGrants][2] (IAM policy)
4821
+ # in your AWS account.
4822
+ #
4823
+ # **Related operations:**
4824
+ #
4825
+ # * CreateGrant
4826
+ #
4827
+ # * ListGrants
4828
+ #
4829
+ # * RetireGrant
4830
+ #
4831
+ # * RevokeGrant
4832
+ #
4833
+ #
4834
+ #
4835
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
4836
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4134
4837
  #
4135
4838
  # @option params [Integer] :limit
4136
4839
  # Use this parameter to specify the maximum number of items to return.
@@ -4146,7 +4849,8 @@ module Aws::KMS
4146
4849
  # from the truncated response you just received.
4147
4850
  #
4148
4851
  # @option params [required, String] :retiring_principal
4149
- # The retiring principal for which to list grants.
4852
+ # The retiring principal for which to list grants. Enter a principal in
4853
+ # your AWS account.
4150
4854
  #
4151
4855
  # To specify the retiring principal, use the [Amazon Resource Name
4152
4856
  # (ARN)][1] of an AWS principal. Valid AWS principals include AWS
@@ -4230,20 +4934,33 @@ module Aws::KMS
4230
4934
  req.send_request(options)
4231
4935
  end
4232
4936
 
4233
- # Attaches a key policy to the specified customer master key (CMK). You
4234
- # cannot perform this operation on a CMK in a different AWS account.
4937
+ # Attaches a key policy to the specified customer master key (CMK).
4235
4938
  #
4236
4939
  # For more information about key policies, see [Key Policies][1] in the
4237
- # *AWS Key Management Service Developer Guide*.
4940
+ # *AWS Key Management Service Developer Guide*. For help writing and
4941
+ # formatting a JSON policy document, see the [IAM JSON Policy
4942
+ # Reference][2] in the <i> <i>IAM User Guide</i> </i>. For examples of
4943
+ # adding a key policy in multiple programming languages, see [Setting a
4944
+ # key policy][3] in the *AWS Key Management Service Developer Guide*.
4945
+ #
4946
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
4947
+ # in a different AWS account.
4948
+ #
4949
+ # **Required permissions**\: [kms:PutKeyPolicy][4] (key policy)
4950
+ #
4951
+ # **Related operations**\: GetKeyPolicy
4238
4952
  #
4239
4953
  #
4240
4954
  #
4241
4955
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
4956
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
4957
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy
4958
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4242
4959
  #
4243
4960
  # @option params [required, String] :key_id
4244
- # A unique identifier for the customer master key (CMK).
4961
+ # Sets the key policy on the specified customer master key (CMK).
4245
4962
  #
4246
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
4963
+ # Specify the key ID or key ARN of the CMK.
4247
4964
  #
4248
4965
  # For example:
4249
4966
  #
@@ -4361,21 +5078,27 @@ module Aws::KMS
4361
5078
  # operation.
4362
5079
  #
4363
5080
  # * If your ciphertext was encrypted under an asymmetric CMK, you must
4364
- # identify the *source CMK*, that is, the CMK that encrypted the
4365
- # ciphertext. You must also supply the encryption algorithm that was
4366
- # used. This information is required to decrypt the data.
4367
- #
4368
- # * It is optional, but you can specify a source CMK even when the
4369
- # ciphertext was encrypted under a symmetric CMK. This ensures that
4370
- # the ciphertext is decrypted only by using a particular CMK. If the
4371
- # CMK that you specify cannot decrypt the ciphertext, the `ReEncrypt`
4372
- # operation fails.
4373
- #
4374
- # * To reencrypt the data, you must specify the *destination CMK*, that
4375
- # is, the CMK that re-encrypts the data after it is decrypted. You can
4376
- # select a symmetric or asymmetric CMK. If the destination CMK is an
4377
- # asymmetric CMK, you must also provide the encryption algorithm. The
4378
- # algorithm that you choose must be compatible with the CMK.
5081
+ # use the `SourceKeyId` parameter to identify the CMK that encrypted
5082
+ # the ciphertext. You must also supply the encryption algorithm that
5083
+ # was used. This information is required to decrypt the data.
5084
+ #
5085
+ # * If your ciphertext was encrypted under a symmetric CMK, the
5086
+ # `SourceKeyId` parameter is optional. AWS KMS can get this
5087
+ # information from metadata that it adds to the symmetric ciphertext
5088
+ # blob. This feature adds durability to your implementation by
5089
+ # ensuring that authorized users can decrypt ciphertext decades after
5090
+ # it was encrypted, even if they've lost track of the CMK ID.
5091
+ # However, specifying the source CMK is always recommended as a best
5092
+ # practice. When you use the `SourceKeyId` parameter to specify a CMK,
5093
+ # AWS KMS uses only the CMK you specify. If the ciphertext was
5094
+ # encrypted under a different CMK, the `ReEncrypt` operation fails.
5095
+ # This practice ensures that you use the CMK that you intend.
5096
+ #
5097
+ # * To reencrypt the data, you must use the `DestinationKeyId` parameter
5098
+ # specify the CMK that re-encrypts the data after it is decrypted. You
5099
+ # can select a symmetric or asymmetric CMK. If the destination CMK is
5100
+ # an asymmetric CMK, you must also provide the encryption algorithm.
5101
+ # The algorithm that you choose must be compatible with the CMK.
4379
5102
  #
4380
5103
  # When you use an asymmetric CMK to encrypt or reencrypt data, be sure
4381
5104
  # to record the CMK and encryption algorithm that you choose. You will
@@ -4389,23 +5112,36 @@ module Aws::KMS
4389
5112
  # ciphertext generated with asymmetric keys. The standard format for
4390
5113
  # asymmetric key ciphertext does not include configurable fields.
4391
5114
  #
4392
- # Unlike other AWS KMS API operations, `ReEncrypt` callers must have two
4393
- # permissions:
5115
+ # The CMK that you use for this operation must be in a compatible key
5116
+ # state. For details, see [Key state: Effect on your CMK][6] in the *AWS
5117
+ # Key Management Service Developer Guide*.
5118
+ #
5119
+ # **Cross-account use**\: Yes. The source CMK and destination CMK can be
5120
+ # in different AWS accounts. Either or both CMKs can be in a different
5121
+ # account than the caller.
5122
+ #
5123
+ # **Required permissions**\:
4394
5124
  #
4395
- # * `kms:ReEncryptFrom` permission on the source CMK
5125
+ # * [kms:ReEncryptFrom][7] permission on the source CMK (key policy)
4396
5126
  #
4397
- # * `kms:ReEncryptTo` permission on the destination CMK
5127
+ # * [kms:ReEncryptTo][7] permission on the destination CMK (key policy)
4398
5128
  #
4399
5129
  # To permit reencryption from or to a CMK, include the
4400
- # `"kms:ReEncrypt*"` permission in your [key policy][6]. This permission
5130
+ # `"kms:ReEncrypt*"` permission in your [key policy][8]. This permission
4401
5131
  # is automatically included in the key policy when you use the console
4402
5132
  # to create a CMK. But you must include it manually when you create a
4403
5133
  # CMK programmatically or when you use the PutKeyPolicy operation to set
4404
5134
  # a key policy.
4405
5135
  #
4406
- # The CMK that you use for this operation must be in a compatible key
4407
- # state. For details, see [How Key State Affects Use of a Customer
4408
- # Master Key][7] in the *AWS Key Management Service Developer Guide*.
5136
+ # **Related operations:**
5137
+ #
5138
+ # * Decrypt
5139
+ #
5140
+ # * Encrypt
5141
+ #
5142
+ # * GenerateDataKey
5143
+ #
5144
+ # * GenerateDataKeyPair
4409
5145
  #
4410
5146
  #
4411
5147
  #
@@ -4414,8 +5150,9 @@ module Aws::KMS
4414
5150
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
4415
5151
  # [4]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
4416
5152
  # [5]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
4417
- # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
4418
- # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
5153
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
5154
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5155
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
4419
5156
  #
4420
5157
  # @option params [required, String, StringIO, File] :ciphertext_blob
4421
5158
  # Ciphertext of the data to reencrypt.
@@ -4440,23 +5177,19 @@ module Aws::KMS
4440
5177
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
4441
5178
  #
4442
5179
  # @option params [String] :source_key_id
4443
- # A unique identifier for the CMK that is used to decrypt the ciphertext
4444
- # before it reencrypts it using the destination CMK.
5180
+ # Specifies the customer master key (CMK) that AWS KMS will use to
5181
+ # decrypt the ciphertext before it is re-encrypted. Enter a key ID of
5182
+ # the CMK that was used to encrypt the ciphertext.
4445
5183
  #
4446
5184
  # This parameter is required only when the ciphertext was encrypted
4447
- # under an asymmetric CMK. Otherwise, AWS KMS uses the metadata that it
4448
- # adds to the ciphertext blob to determine which CMK was used to encrypt
4449
- # the ciphertext. However, you can use this parameter to ensure that a
4450
- # particular CMK (of any kind) is used to decrypt the ciphertext before
4451
- # it is reencrypted.
4452
- #
4453
- # If you specify a `KeyId` value, the decrypt part of the `ReEncrypt`
4454
- # operation succeeds only if the specified CMK was used to encrypt the
4455
- # ciphertext.
5185
+ # under an asymmetric CMK. If you used a symmetric CMK, AWS KMS can get
5186
+ # the CMK from metadata that it adds to the symmetric ciphertext blob.
5187
+ # However, it is always recommended as a best practice. This practice
5188
+ # ensures that you use the CMK that you intend.
4456
5189
  #
4457
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
4458
- # name, or alias ARN. When using an alias name, prefix it with
4459
- # `"alias/"`.
5190
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
5191
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
5192
+ # in a different AWS account, you must use the key ARN or alias ARN.
4460
5193
  #
4461
5194
  # For example:
4462
5195
  #
@@ -4478,10 +5211,9 @@ module Aws::KMS
4478
5211
  # `ENCRYPT_DECRYPT`. To find the `KeyUsage` value of a CMK, use the
4479
5212
  # DescribeKey operation.
4480
5213
  #
4481
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
4482
- # name, or alias ARN. When using an alias name, prefix it with
4483
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
4484
- # the key ARN or alias ARN.
5214
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
5215
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
5216
+ # in a different AWS account, you must use the key ARN or alias ARN.
4485
5217
  #
4486
5218
  # For example:
4487
5219
  #
@@ -4542,7 +5274,9 @@ module Aws::KMS
4542
5274
  # @option params [Array<String>] :grant_tokens
4543
5275
  # A list of grant tokens.
4544
5276
  #
4545
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
5277
+ # Use a grant token when your permission to call this operation comes
5278
+ # from a new grant that has not yet achieved *eventual consistency*. For
5279
+ # more information, see [Grant token][1] in the *AWS Key Management
4546
5280
  # Service Developer Guide*.
4547
5281
  #
4548
5282
  #
@@ -4564,14 +5298,14 @@ module Aws::KMS
4564
5298
  #
4565
5299
  # resp = client.re_encrypt({
4566
5300
  # ciphertext_blob: "<binary data>", # The data to reencrypt.
4567
- # destination_key_id: "0987dcba-09fe-87dc-65ba-ab0987654321", # The identifier of the CMK to use to reencrypt the data. You can use the key ID or Amazon Resource Name (ARN) of the CMK, or the name or ARN of an alias that refers to the CMK.
5301
+ # destination_key_id: "0987dcba-09fe-87dc-65ba-ab0987654321", # The identifier of the CMK to use to reencrypt the data. You can use any valid key identifier.
4568
5302
  # })
4569
5303
  #
4570
5304
  # resp.to_h outputs the following:
4571
5305
  # {
4572
5306
  # ciphertext_blob: "<binary data>", # The reencrypted data.
4573
5307
  # key_id: "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321", # The ARN of the CMK that was used to reencrypt the data.
4574
- # source_key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The ARN of the CMK that was used to originally encrypt the data.
5308
+ # source_key_id: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # The ARN of the CMK that was originally used to encrypt the data.
4575
5309
  # }
4576
5310
  #
4577
5311
  # @example Request syntax with placeholder values
@@ -4608,36 +5342,372 @@ module Aws::KMS
4608
5342
  req.send_request(options)
4609
5343
  end
4610
5344
 
4611
- # Retires a grant. To clean up, you can retire a grant when you're done
4612
- # using it. You should revoke a grant when you intend to actively deny
4613
- # operations that depend on it. The following are permitted to call this
4614
- # API:
5345
+ # Replicates a multi-Region key into the specified Region. This
5346
+ # operation creates a multi-Region replica key based on a multi-Region
5347
+ # primary key in a different Region of the same AWS partition. You can
5348
+ # create multiple replicas of a primary key, but each must be in a
5349
+ # different Region. To create a multi-Region primary key, use the
5350
+ # CreateKey operation.
5351
+ #
5352
+ # This operation supports *multi-Region keys*, an AWS KMS feature that
5353
+ # lets you create multiple interoperable CMKs in different AWS Regions.
5354
+ # Because these CMKs have the same key ID, key material, and other
5355
+ # metadata, you can use them to encrypt data in one AWS Region and
5356
+ # decrypt it in a different AWS Region without making a cross-Region
5357
+ # call or exposing the plaintext data. For more information about
5358
+ # multi-Region keys, see [Using multi-Region keys][1] in the *AWS Key
5359
+ # Management Service Developer Guide*.
5360
+ #
5361
+ # A *replica key* is a fully-functional CMK that can be used
5362
+ # independently of its primary and peer replica keys. A primary key and
5363
+ # its replica keys share properties that make them interoperable. They
5364
+ # have the same [key ID][2] and key material. They also have the same
5365
+ # [key spec][3], [key usage][4], [key material origin][5], and
5366
+ # [automatic key rotation status][6]. AWS KMS automatically synchronizes
5367
+ # these shared properties among related multi-Region keys. All other
5368
+ # properties of a replica key can differ, including its [key policy][7],
5369
+ # [tags][8], [aliases][9], and [key state][10]. AWS KMS pricing and
5370
+ # quotas for CMKs apply to each primary key and replica key.
5371
+ #
5372
+ # When this operation completes, the new replica key has a transient key
5373
+ # state of `Creating`. This key state changes to `Enabled` (or
5374
+ # `PendingImport`) after a few seconds when the process of creating the
5375
+ # new replica key is complete. While the key state is `Creating`, you
5376
+ # can manage key, but you cannot yet use it in cryptographic operations.
5377
+ # If you are creating and using the replica key programmatically, retry
5378
+ # on `KMSInvalidStateException` or call `DescribeKey` to check its
5379
+ # `KeyState` value before using it. For details about the `Creating` key
5380
+ # state, see [Key state: Effect on your
5381
+ # CMK](kms/latest/developerguide/key-state.html) in the *AWS Key
5382
+ # Management Service Developer Guide*.
5383
+ #
5384
+ # The AWS CloudTrail log of a `ReplicateKey` operation records a
5385
+ # `ReplicateKey` operation in the primary key's Region and a CreateKey
5386
+ # operation in the replica key's Region.
5387
+ #
5388
+ # If you replicate a multi-Region primary key with imported key
5389
+ # material, the replica key is created with no key material. You must
5390
+ # import the same key material that you imported into the primary key.
5391
+ # For details, see [Importing key material into multi-Region
5392
+ # keys](kms/latest/developerguide/multi-region-keys-import.html) in the
5393
+ # *AWS Key Management Service Developer Guide*.
5394
+ #
5395
+ # To convert a replica key to a primary key, use the UpdatePrimaryRegion
5396
+ # operation.
5397
+ #
5398
+ # <note markdown="1"> `ReplicateKey` uses different default values for the `KeyPolicy` and
5399
+ # `Tags` parameters than those used in the AWS KMS console. For details,
5400
+ # see the parameter descriptions.
5401
+ #
5402
+ # </note>
5403
+ #
5404
+ # **Cross-account use**\: No. You cannot use this operation to create a
5405
+ # CMK in a different AWS account.
5406
+ #
5407
+ # **Required permissions**\:
5408
+ #
5409
+ # * `kms:ReplicateKey` on the primary CMK (in the primary CMK's
5410
+ # Region). Include this permission in the primary CMK's key policy.
5411
+ #
5412
+ # * `kms:CreateKey` in an IAM policy in the replica Region.
5413
+ #
5414
+ # * To use the `Tags` parameter, `kms:TagResource` in an IAM policy in
5415
+ # the replica Region.
5416
+ #
5417
+ # **Related operations**
5418
+ #
5419
+ # * CreateKey
5420
+ #
5421
+ # * UpdatePrimaryRegion
5422
+ #
5423
+ #
5424
+ #
5425
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
5426
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
5427
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec
5428
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage
5429
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin
5430
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
5431
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
5432
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
5433
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
5434
+ # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
5435
+ #
5436
+ # @option params [required, String] :key_id
5437
+ # Identifies the multi-Region primary key that is being replicated. To
5438
+ # determine whether a CMK is a multi-Region primary key, use the
5439
+ # DescribeKey operation to check the value of the `MultiRegionKeyType`
5440
+ # property.
5441
+ #
5442
+ # Specify the key ID or key ARN of a multi-Region primary key.
5443
+ #
5444
+ # For example:
5445
+ #
5446
+ # * Key ID: `mrk-1234abcd12ab34cd56ef1234567890ab`
5447
+ #
5448
+ # * Key ARN:
5449
+ # `arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab`
5450
+ #
5451
+ # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
5452
+ #
5453
+ # @option params [required, String] :replica_region
5454
+ # The Region ID of the AWS Region for this replica key.
5455
+ #
5456
+ # Enter the Region ID, such as `us-east-1` or `ap-southeast-2`. For a
5457
+ # list of AWS Regions in which AWS KMS is supported, see [AWS KMS
5458
+ # service endpoints][1] in the *Amazon Web Services General Reference*.
5459
+ #
5460
+ # The replica must be in a different AWS Region than its primary key and
5461
+ # other replicas of that primary key, but in the same AWS partition. AWS
5462
+ # KMS must be available in the replica Region. If the Region is not
5463
+ # enabled by default, the AWS account must be enabled in the Region.
5464
+ #
5465
+ # For information about AWS partitions, see [Amazon Resource Names
5466
+ # (ARNs) in the *Amazon Web Services General Reference*.][2] For
5467
+ # information about enabling and disabling Regions, see [Enabling a
5468
+ # Region][3] and [Disabling a Region][4] in the *Amazon Web Services
5469
+ # General Reference*.
5470
+ #
5471
+ #
5472
+ #
5473
+ # [1]: https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region
5474
+ # [2]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
5475
+ # [3]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable
5476
+ # [4]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable
5477
+ #
5478
+ # @option params [String] :policy
5479
+ # The key policy to attach to the CMK. This parameter is optional. If
5480
+ # you do not provide a key policy, AWS KMS attaches the [default key
5481
+ # policy][1] to the CMK.
5482
+ #
5483
+ # The key policy is not a shared property of multi-Region keys. You can
5484
+ # specify the same key policy or a different key policy for each key in
5485
+ # a set of related multi-Region keys. AWS KMS does not synchronize this
5486
+ # property.
5487
+ #
5488
+ # If you provide a key policy, it must meet the following criteria:
5489
+ #
5490
+ # * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
5491
+ # policy must give the caller `kms:PutKeyPolicy` permission on the
5492
+ # replica CMK. This reduces the risk that the CMK becomes
5493
+ # unmanageable. For more information, refer to the scenario in the
5494
+ # [Default Key Policy][2] section of the <i> <i>AWS Key Management
5495
+ # Service Developer Guide</i> </i>.
5496
+ #
5497
+ # * Each statement in the key policy must contain one or more
5498
+ # principals. The principals in the key policy must exist and be
5499
+ # visible to AWS KMS. When you create a new AWS principal (for
5500
+ # example, an IAM user or role), you might need to enforce a delay
5501
+ # before including the new principal in a key policy because the new
5502
+ # principal might not be immediately visible to AWS KMS. For more
5503
+ # information, see [Changes that I make are not always immediately
5504
+ # visible][3] in the *AWS Identity and Access Management User Guide*.
5505
+ #
5506
+ # * The key policy size quota is 32 kilobytes (32768 bytes).
5507
+ #
5508
+ #
5509
+ #
5510
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
5511
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
5512
+ # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
5513
+ #
5514
+ # @option params [Boolean] :bypass_policy_lockout_safety_check
5515
+ # A flag to indicate whether to bypass the key policy lockout safety
5516
+ # check.
5517
+ #
5518
+ # Setting this value to true increases the risk that the CMK becomes
5519
+ # unmanageable. Do not set this value to true indiscriminately.
5520
+ #
5521
+ # For more information, refer to the scenario in the [Default Key
5522
+ # Policy][1] section in the *AWS Key Management Service Developer
5523
+ # Guide*.
5524
+ #
5525
+ # Use this parameter only when you intend to prevent the principal that
5526
+ # is making the request from making a subsequent `PutKeyPolicy` request
5527
+ # on the CMK.
5528
+ #
5529
+ # The default value is false.
5530
+ #
5531
+ #
5532
+ #
5533
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
5534
+ #
5535
+ # @option params [String] :description
5536
+ # A description of the CMK. Use a description that helps you decide
5537
+ # whether the CMK is appropriate for a task. The default value is an
5538
+ # empty string (no description).
5539
+ #
5540
+ # The description is not a shared property of multi-Region keys. You can
5541
+ # specify the same description or a different description for each key
5542
+ # in a set of related multi-Region keys. AWS KMS does not synchronize
5543
+ # this property.
5544
+ #
5545
+ # @option params [Array<Types::Tag>] :tags
5546
+ # Assigns one or more tags to the replica key. Use this parameter to tag
5547
+ # the CMK when it is created. To tag an existing CMK, use the
5548
+ # TagResource operation.
5549
+ #
5550
+ # <note markdown="1"> Tagging or untagging a CMK can allow or deny permission to the CMK.
5551
+ # For details, see [Using ABAC in AWS KMS][1] in the *AWS Key Management
5552
+ # Service Developer Guide*.
5553
+ #
5554
+ # </note>
5555
+ #
5556
+ # To use this parameter, you must have [kms:TagResource][2] permission
5557
+ # in an IAM policy.
5558
+ #
5559
+ # Tags are not a shared property of multi-Region keys. You can specify
5560
+ # the same tags or different tags for each key in a set of related
5561
+ # multi-Region keys. AWS KMS does not synchronize this property.
5562
+ #
5563
+ # Each tag consists of a tag key and a tag value. Both the tag key and
5564
+ # the tag value are required, but the tag value can be an empty (null)
5565
+ # string. You cannot have more than one tag on a CMK with the same tag
5566
+ # key. If you specify an existing tag key with a different tag value,
5567
+ # AWS KMS replaces the current tag value with the specified one.
5568
+ #
5569
+ # When you assign tags to an AWS resource, AWS generates a cost
5570
+ # allocation report with usage and costs aggregated by tags. Tags can
5571
+ # also be used to control access to a CMK. For details, see [Tagging
5572
+ # Keys][3].
5573
+ #
5574
+ #
5575
+ #
5576
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
5577
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5578
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
5579
+ #
5580
+ # @return [Types::ReplicateKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
5581
+ #
5582
+ # * {Types::ReplicateKeyResponse#replica_key_metadata #replica_key_metadata} => Types::KeyMetadata
5583
+ # * {Types::ReplicateKeyResponse#replica_policy #replica_policy} => String
5584
+ # * {Types::ReplicateKeyResponse#replica_tags #replica_tags} => Array&lt;Types::Tag&gt;
5585
+ #
5586
+ # @example Request syntax with placeholder values
5587
+ #
5588
+ # resp = client.replicate_key({
5589
+ # key_id: "KeyIdType", # required
5590
+ # replica_region: "RegionType", # required
5591
+ # policy: "PolicyType",
5592
+ # bypass_policy_lockout_safety_check: false,
5593
+ # description: "DescriptionType",
5594
+ # tags: [
5595
+ # {
5596
+ # tag_key: "TagKeyType", # required
5597
+ # tag_value: "TagValueType", # required
5598
+ # },
5599
+ # ],
5600
+ # })
5601
+ #
5602
+ # @example Response structure
5603
+ #
5604
+ # resp.replica_key_metadata.aws_account_id #=> String
5605
+ # resp.replica_key_metadata.key_id #=> String
5606
+ # resp.replica_key_metadata.arn #=> String
5607
+ # resp.replica_key_metadata.creation_date #=> Time
5608
+ # resp.replica_key_metadata.enabled #=> Boolean
5609
+ # resp.replica_key_metadata.description #=> String
5610
+ # resp.replica_key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT"
5611
+ # resp.replica_key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
5612
+ # resp.replica_key_metadata.deletion_date #=> Time
5613
+ # resp.replica_key_metadata.valid_to #=> Time
5614
+ # resp.replica_key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
5615
+ # resp.replica_key_metadata.custom_key_store_id #=> String
5616
+ # resp.replica_key_metadata.cloud_hsm_cluster_id #=> String
5617
+ # resp.replica_key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
5618
+ # resp.replica_key_metadata.key_manager #=> String, one of "AWS", "CUSTOMER"
5619
+ # resp.replica_key_metadata.customer_master_key_spec #=> String, one of "RSA_2048", "RSA_3072", "RSA_4096", "ECC_NIST_P256", "ECC_NIST_P384", "ECC_NIST_P521", "ECC_SECG_P256K1", "SYMMETRIC_DEFAULT"
5620
+ # resp.replica_key_metadata.encryption_algorithms #=> Array
5621
+ # resp.replica_key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256"
5622
+ # resp.replica_key_metadata.signing_algorithms #=> Array
5623
+ # resp.replica_key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512"
5624
+ # resp.replica_key_metadata.multi_region #=> Boolean
5625
+ # resp.replica_key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
5626
+ # resp.replica_key_metadata.multi_region_configuration.primary_key.arn #=> String
5627
+ # resp.replica_key_metadata.multi_region_configuration.primary_key.region #=> String
5628
+ # resp.replica_key_metadata.multi_region_configuration.replica_keys #=> Array
5629
+ # resp.replica_key_metadata.multi_region_configuration.replica_keys[0].arn #=> String
5630
+ # resp.replica_key_metadata.multi_region_configuration.replica_keys[0].region #=> String
5631
+ # resp.replica_key_metadata.pending_deletion_window_in_days #=> Integer
5632
+ # resp.replica_policy #=> String
5633
+ # resp.replica_tags #=> Array
5634
+ # resp.replica_tags[0].tag_key #=> String
5635
+ # resp.replica_tags[0].tag_value #=> String
5636
+ #
5637
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReplicateKey AWS API Documentation
5638
+ #
5639
+ # @overload replicate_key(params = {})
5640
+ # @param [Hash] params ({})
5641
+ def replicate_key(params = {}, options = {})
5642
+ req = build_request(:replicate_key, params)
5643
+ req.send_request(options)
5644
+ end
5645
+
5646
+ # Deletes a grant. Typically, you retire a grant when you no longer need
5647
+ # its permissions. To identify the grant to retire, use a [grant
5648
+ # token][1], or both the grant ID and a key identifier (key ID or key
5649
+ # ARN) of the customer master key (CMK). The CreateGrant operation
5650
+ # returns both values.
5651
+ #
5652
+ # This operation can be called by the *retiring principal* for a grant,
5653
+ # by the *grantee principal* if the grant allows the `RetireGrant`
5654
+ # operation, and by the AWS account (root user) in which the grant is
5655
+ # created. It can also be called by principals to whom permission for
5656
+ # retiring a grant is delegated. For details, see [Retiring and revoking
5657
+ # grants][2] in the *AWS Key Management Service Developer Guide*.
5658
+ #
5659
+ # For detailed information about grants, including grant terminology,
5660
+ # see [Using grants][3] in the <i> <i>AWS Key Management Service
5661
+ # Developer Guide</i> </i>. For examples of working with grants in
5662
+ # several programming languages, see [Programming grants][4].
5663
+ #
5664
+ # **Cross-account use**\: Yes. You can retire a grant on a CMK in a
5665
+ # different AWS account.
5666
+ #
5667
+ # **Required permissions:**\:Permission to retire a grant is determined
5668
+ # primarily by the grant. For details, see [Retiring and revoking
5669
+ # grants][2] in the *AWS Key Management Service Developer Guide*.
5670
+ #
5671
+ # **Related operations:**
5672
+ #
5673
+ # * CreateGrant
5674
+ #
5675
+ # * ListGrants
4615
5676
  #
4616
- # * The AWS account (root user) under which the grant was created
5677
+ # * ListRetirableGrants
4617
5678
  #
4618
- # * The `RetiringPrincipal`, if present in the grant
5679
+ # * RevokeGrant
4619
5680
  #
4620
- # * The `GranteePrincipal`, if `RetireGrant` is an operation specified
4621
- # in the grant
4622
5681
  #
4623
- # You must identify the grant to retire by its grant token or by a
4624
- # combination of the grant ID and the Amazon Resource Name (ARN) of the
4625
- # customer master key (CMK). A grant token is a unique variable-length
4626
- # base64-encoded string. A grant ID is a 64 character unique identifier
4627
- # of a grant. The CreateGrant operation returns both.
5682
+ #
5683
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
5684
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
5685
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
5686
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
4628
5687
  #
4629
5688
  # @option params [String] :grant_token
4630
- # Token that identifies the grant to be retired.
5689
+ # Identifies the grant to be retired. You can use a grant token to
5690
+ # identify a new grant even before it has achieved eventual consistency.
5691
+ #
5692
+ # Only the CreateGrant operation returns a grant token. For details, see
5693
+ # [Grant token][1] and [Eventual consistency][2] in the *AWS Key
5694
+ # Management Service Developer Guide*.
5695
+ #
5696
+ #
5697
+ #
5698
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
5699
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency
4631
5700
  #
4632
5701
  # @option params [String] :key_id
4633
- # The Amazon Resource Name (ARN) of the CMK associated with the grant.
5702
+ # The key ARN CMK associated with the grant. To find the key ARN, use
5703
+ # the ListKeys operation.
4634
5704
  #
4635
5705
  # For example:
4636
5706
  # `arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab`
4637
5707
  #
4638
5708
  # @option params [String] :grant_id
4639
- # Unique identifier of the grant to retire. The grant ID is returned in
4640
- # the response to a `CreateGrant` operation.
5709
+ # Identifies the grant to retire. To get the grant ID, use CreateGrant,
5710
+ # ListGrants, or ListRetirableGrants.
4641
5711
  #
4642
5712
  # * Grant ID Example -
4643
5713
  # 0123456789012345678901234567890123456789012345678901234567890123
@@ -4673,19 +5743,46 @@ module Aws::KMS
4673
5743
  req.send_request(options)
4674
5744
  end
4675
5745
 
4676
- # Revokes the specified grant for the specified customer master key
4677
- # (CMK). You can revoke a grant to actively deny operations that depend
4678
- # on it.
5746
+ # Deletes the specified grant. You revoke a grant to terminate the
5747
+ # permissions that the grant allows. For more information, see [Retiring
5748
+ # and revoking grants][1] in the <i> <i>AWS Key Management Service
5749
+ # Developer Guide</i> </i>.
5750
+ #
5751
+ # When you create, retire, or revoke a grant, there might be a brief
5752
+ # delay, usually less than five minutes, until the grant is available
5753
+ # throughout AWS KMS. This state is known as *eventual consistency*. For
5754
+ # details, see [Eventual consistency][2] in the <i> <i>AWS Key
5755
+ # Management Service Developer Guide</i> </i>.
5756
+ #
5757
+ # **Cross-account use**\: Yes. To perform this operation on a CMK in a
5758
+ # different AWS account, specify the key ARN in the value of the `KeyId`
5759
+ # parameter.
5760
+ #
5761
+ # **Required permissions**\: [kms:RevokeGrant][3] (key policy).
5762
+ #
5763
+ # **Related operations:**
5764
+ #
5765
+ # * CreateGrant
5766
+ #
5767
+ # * ListGrants
5768
+ #
5769
+ # * ListRetirableGrants
4679
5770
  #
4680
- # To perform this operation on a CMK in a different AWS account, specify
4681
- # the key ARN in the value of the `KeyId` parameter.
5771
+ # * RetireGrant
5772
+ #
5773
+ #
5774
+ #
5775
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete
5776
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency
5777
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4682
5778
  #
4683
5779
  # @option params [required, String] :key_id
4684
- # A unique identifier for the customer master key associated with the
4685
- # grant.
5780
+ # A unique identifier for the customer master key (CMK) associated with
5781
+ # the grant. To get the key ID and key ARN for a CMK, use ListKeys or
5782
+ # DescribeKey.
4686
5783
  #
4687
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To
4688
- # specify a CMK in a different AWS account, you must use the key ARN.
5784
+ # Specify the key ID or key ARN of the CMK. To specify a CMK in a
5785
+ # different AWS account, you must use the key ARN.
4689
5786
  #
4690
5787
  # For example:
4691
5788
  #
@@ -4697,7 +5794,8 @@ module Aws::KMS
4697
5794
  # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
4698
5795
  #
4699
5796
  # @option params [required, String] :grant_id
4700
- # Identifier of the grant to be revoked.
5797
+ # Identifies the grant to revoke. To get the grant ID, use CreateGrant,
5798
+ # ListGrants, or ListRetirableGrants.
4701
5799
  #
4702
5800
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
4703
5801
  #
@@ -4727,19 +5825,21 @@ module Aws::KMS
4727
5825
  req.send_request(options)
4728
5826
  end
4729
5827
 
4730
- # Schedules the deletion of a customer master key (CMK). You may provide
4731
- # a waiting period, specified in days, before deletion occurs. If you do
4732
- # not provide a waiting period, the default period of 30 days is used.
4733
- # When this operation is successful, the key state of the CMK changes to
4734
- # `PendingDeletion`. Before the waiting period ends, you can use
4735
- # CancelKeyDeletion to cancel the deletion of the CMK. After the waiting
4736
- # period ends, AWS KMS deletes the CMK and all AWS KMS data associated
4737
- # with it, including all aliases that refer to it.
5828
+ # Schedules the deletion of a customer master key (CMK). By default, AWS
5829
+ # KMS applies a waiting period of 30 days, but you can specify a waiting
5830
+ # period of 7-30 days. When this operation is successful, the key state
5831
+ # of the CMK changes to `PendingDeletion` and the key can't be used in
5832
+ # any cryptographic operations. It remains in this state for the
5833
+ # duration of the waiting period. Before the waiting period ends, you
5834
+ # can use CancelKeyDeletion to cancel the deletion of the CMK. After the
5835
+ # waiting period ends, AWS KMS deletes the CMK, its key material, and
5836
+ # all AWS KMS data associated with it, including all aliases that refer
5837
+ # to it.
4738
5838
  #
4739
5839
  # Deleting a CMK is a destructive and potentially dangerous operation.
4740
5840
  # When a CMK is deleted, all data that was encrypted under the CMK is
4741
- # unrecoverable. To prevent the use of a CMK without deleting it, use
4742
- # DisableKey.
5841
+ # unrecoverable. (The only exception is a multi-Region replica key.) To
5842
+ # prevent the use of a CMK without deleting it, use DisableKey.
4743
5843
  #
4744
5844
  # If you schedule deletion of a CMK from a [custom key store][1], when
4745
5845
  # the waiting period expires, `ScheduleKeyDeletion` deletes the CMK from
@@ -4748,27 +5848,49 @@ module Aws::KMS
4748
5848
  # manually [delete the orphaned key material][2] from the cluster and
4749
5849
  # its backups.
4750
5850
  #
4751
- # You cannot perform this operation on a CMK in a different AWS account.
5851
+ # You can schedule the deletion of a multi-Region primary key and its
5852
+ # replica keys at any time. However, AWS KMS will not delete a
5853
+ # multi-Region primary key with existing replica keys. If you schedule
5854
+ # the deletion of a primary key with replicas, its key state changes to
5855
+ # `PendingReplicaDeletion` and it cannot be replicated or used in
5856
+ # cryptographic operations. This status can continue indefinitely. When
5857
+ # the last of its replicas keys is deleted (not just scheduled), the key
5858
+ # state of the primary key changes to `PendingDeletion` and its waiting
5859
+ # period (`PendingWindowInDays`) begins. For details, see [Deleting
5860
+ # multi-Region keys][3] in the *AWS Key Management Service Developer
5861
+ # Guide*.
4752
5862
  #
4753
5863
  # For more information about scheduling a CMK for deletion, see
4754
- # [Deleting Customer Master Keys][3] in the *AWS Key Management Service
5864
+ # [Deleting Customer Master Keys][4] in the *AWS Key Management Service
4755
5865
  # Developer Guide*.
4756
5866
  #
4757
5867
  # The CMK that you use for this operation must be in a compatible key
4758
- # state. For details, see [How Key State Affects Use of a Customer
4759
- # Master Key][4] in the *AWS Key Management Service Developer Guide*.
5868
+ # state. For details, see [Key state: Effect on your CMK][5] in the *AWS
5869
+ # Key Management Service Developer Guide*.
5870
+ #
5871
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
5872
+ # in a different AWS account.
5873
+ #
5874
+ # **Required permissions**\: kms:ScheduleKeyDeletion (key policy)
5875
+ #
5876
+ # **Related operations**
5877
+ #
5878
+ # * CancelKeyDeletion
5879
+ #
5880
+ # * DisableKey
4760
5881
  #
4761
5882
  #
4762
5883
  #
4763
5884
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
4764
5885
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
4765
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
4766
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
5886
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
5887
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
5888
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4767
5889
  #
4768
5890
  # @option params [required, String] :key_id
4769
5891
  # The unique identifier of the customer master key (CMK) to delete.
4770
5892
  #
4771
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
5893
+ # Specify the key ID or key ARN of the CMK.
4772
5894
  #
4773
5895
  # For example:
4774
5896
  #
@@ -4783,6 +5905,10 @@ module Aws::KMS
4783
5905
  # The waiting period, specified in number of days. After the waiting
4784
5906
  # period ends, AWS KMS deletes the customer master key (CMK).
4785
5907
  #
5908
+ # If the CMK is a multi-Region primary key with replicas, the waiting
5909
+ # period begins when the last of its replica keys is deleted. Otherwise,
5910
+ # the waiting period begins immediately.
5911
+ #
4786
5912
  # This value is optional. If you include a value, it must be between 7
4787
5913
  # and 30, inclusive. If you do not include a value, it defaults to 30.
4788
5914
  #
@@ -4790,6 +5916,8 @@ module Aws::KMS
4790
5916
  #
4791
5917
  # * {Types::ScheduleKeyDeletionResponse#key_id #key_id} => String
4792
5918
  # * {Types::ScheduleKeyDeletionResponse#deletion_date #deletion_date} => Time
5919
+ # * {Types::ScheduleKeyDeletionResponse#key_state #key_state} => String
5920
+ # * {Types::ScheduleKeyDeletionResponse#pending_window_in_days #pending_window_in_days} => Integer
4793
5921
  #
4794
5922
  #
4795
5923
  # @example Example: To schedule a customer master key (CMK) for deletion
@@ -4818,6 +5946,8 @@ module Aws::KMS
4818
5946
  #
4819
5947
  # resp.key_id #=> String
4820
5948
  # resp.deletion_date #=> Time
5949
+ # resp.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
5950
+ # resp.pending_window_in_days #=> Integer
4821
5951
  #
4822
5952
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ScheduleKeyDeletion AWS API Documentation
4823
5953
  #
@@ -4867,14 +5997,23 @@ module Aws::KMS
4867
5997
  # KMS.
4868
5998
  #
4869
5999
  # The CMK that you use for this operation must be in a compatible key
4870
- # state. For details, see [How Key State Affects Use of a Customer
4871
- # Master Key][3] in the *AWS Key Management Service Developer Guide*.
6000
+ # state. For details, see [Key state: Effect on your CMK][3] in the *AWS
6001
+ # Key Management Service Developer Guide*.
6002
+ #
6003
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
6004
+ # different AWS account, specify the key ARN or alias ARN in the value
6005
+ # of the `KeyId` parameter.
6006
+ #
6007
+ # **Required permissions**\: [kms:Sign][4] (key policy)
6008
+ #
6009
+ # **Related operations**\: Verify
4872
6010
  #
4873
6011
  #
4874
6012
  #
4875
6013
  # [1]: https://en.wikipedia.org/wiki/Digital_signature
4876
6014
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
4877
6015
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6016
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4878
6017
  #
4879
6018
  # @option params [required, String] :key_id
4880
6019
  # Identifies an asymmetric CMK. AWS KMS uses the private key in the
@@ -4882,10 +6021,9 @@ module Aws::KMS
4882
6021
  # must be `SIGN_VERIFY`. To find the `KeyUsage` of a CMK, use the
4883
6022
  # DescribeKey operation.
4884
6023
  #
4885
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
4886
- # name, or alias ARN. When using an alias name, prefix it with
4887
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
4888
- # the key ARN or alias ARN.
6024
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
6025
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
6026
+ # in a different AWS account, you must use the key ARN or alias ARN.
4889
6027
  #
4890
6028
  # For example:
4891
6029
  #
@@ -4916,7 +6054,9 @@ module Aws::KMS
4916
6054
  # @option params [Array<String>] :grant_tokens
4917
6055
  # A list of grant tokens.
4918
6056
  #
4919
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
6057
+ # Use a grant token when your permission to call this operation comes
6058
+ # from a new grant that has not yet achieved *eventual consistency*. For
6059
+ # more information, see [Grant token][1] in the *AWS Key Management
4920
6060
  # Service Developer Guide*.
4921
6061
  #
4922
6062
  #
@@ -4960,33 +6100,67 @@ module Aws::KMS
4960
6100
  req.send_request(options)
4961
6101
  end
4962
6102
 
4963
- # Adds or edits tags for a customer master key (CMK). You cannot perform
4964
- # this operation on a CMK in a different AWS account.
6103
+ # Adds or edits tags on a [customer managed CMK][1].
6104
+ #
6105
+ # <note markdown="1"> Tagging or untagging a CMK can allow or deny permission to the CMK.
6106
+ # For details, see [Using ABAC in AWS KMS][2] in the *AWS Key Management
6107
+ # Service Developer Guide*.
6108
+ #
6109
+ # </note>
4965
6110
  #
4966
- # Each tag consists of a tag key and a tag value. Tag keys and tag
4967
- # values are both required, but tag values can be empty (null) strings.
6111
+ # Each tag consists of a tag key and a tag value, both of which are
6112
+ # case-sensitive strings. The tag value can be an empty (null) string.
6113
+ # To add a tag, specify a new tag key and a tag value. To edit a tag,
6114
+ # specify an existing tag key and a new tag value.
4968
6115
  #
4969
- # You can only use a tag key once for each CMK. If you use the tag key
4970
- # again, AWS KMS replaces the current tag value with the specified
4971
- # value.
6116
+ # You can use this operation to tag a [customer managed CMK][1], but you
6117
+ # cannot tag an [AWS managed CMK][3], an [AWS owned CMK][4], a [custom
6118
+ # key store][5], or an [alias][6].
4972
6119
  #
4973
- # For information about the rules that apply to tag keys and tag values,
4974
- # see [User-Defined Tag Restrictions][1] in the *AWS Billing and Cost
4975
- # Management User Guide*.
6120
+ # You can also add tags to a CMK while creating it (CreateKey) or
6121
+ # replicating it (ReplicateKey).
6122
+ #
6123
+ # For information about using tags in AWS KMS, see [Tagging keys][7].
6124
+ # For general information about tags, including the format and syntax,
6125
+ # see [Tagging AWS resources][8] in the *Amazon Web Services General
6126
+ # Reference*.
4976
6127
  #
4977
6128
  # The CMK that you use for this operation must be in a compatible key
4978
- # state. For details, see [How Key State Affects Use of a Customer
4979
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
6129
+ # state. For details, see [Key state: Effect on your CMK][9] in the *AWS
6130
+ # Key Management Service Developer Guide*.
4980
6131
  #
6132
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
6133
+ # in a different AWS account.
4981
6134
  #
6135
+ # **Required permissions**\: [kms:TagResource][10] (key policy)
4982
6136
  #
4983
- # [1]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html
4984
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6137
+ # **Related operations**
6138
+ #
6139
+ # * CreateKey
6140
+ #
6141
+ # * ListResourceTags
6142
+ #
6143
+ # * ReplicateKey
6144
+ #
6145
+ # * UntagResource
6146
+ #
6147
+ #
6148
+ #
6149
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
6150
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
6151
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
6152
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
6153
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept
6154
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept
6155
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
6156
+ # [8]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
6157
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6158
+ # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4985
6159
  #
4986
6160
  # @option params [required, String] :key_id
4987
- # A unique identifier for the CMK you are tagging.
6161
+ # Identifies a customer managed CMK in the account and Region.
4988
6162
  #
4989
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
6163
+ # Specify the key ID or key ARN of the CMK.
4990
6164
  #
4991
6165
  # For example:
4992
6166
  #
@@ -4998,7 +6172,14 @@ module Aws::KMS
4998
6172
  # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
4999
6173
  #
5000
6174
  # @option params [required, Array<Types::Tag>] :tags
5001
- # One or more tags. Each tag consists of a tag key and a tag value.
6175
+ # One or more tags.
6176
+ #
6177
+ # Each tag consists of a tag key and a tag value. The tag value can be
6178
+ # an empty (null) string.
6179
+ #
6180
+ # You cannot have more than one tag on a CMK with the same tag key. If
6181
+ # you specify an existing tag key with a different tag value, AWS KMS
6182
+ # replaces the current tag value with the specified one.
5002
6183
  #
5003
6184
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5004
6185
  #
@@ -5038,25 +6219,57 @@ module Aws::KMS
5038
6219
  req.send_request(options)
5039
6220
  end
5040
6221
 
5041
- # Removes the specified tags from the specified customer master key
5042
- # (CMK). You cannot perform this operation on a CMK in a different AWS
5043
- # account.
6222
+ # Deletes tags from a [customer managed CMK][1]. To delete a tag,
6223
+ # specify the tag key and the CMK.
6224
+ #
6225
+ # <note markdown="1"> Tagging or untagging a CMK can allow or deny permission to the CMK.
6226
+ # For details, see [Using ABAC in AWS KMS][2] in the *AWS Key Management
6227
+ # Service Developer Guide*.
6228
+ #
6229
+ # </note>
5044
6230
  #
5045
- # To remove a tag, specify the tag key. To change the tag value of an
5046
- # existing tag key, use TagResource.
6231
+ # When it succeeds, the `UntagResource` operation doesn't return any
6232
+ # output. Also, if the specified tag key isn't found on the CMK, it
6233
+ # doesn't throw an exception or return a response. To confirm that the
6234
+ # operation worked, use the ListResourceTags operation.
6235
+ #
6236
+ # For information about using tags in AWS KMS, see [Tagging keys][3].
6237
+ # For general information about tags, including the format and syntax,
6238
+ # see [Tagging AWS resources][4] in the *Amazon Web Services General
6239
+ # Reference*.
5047
6240
  #
5048
6241
  # The CMK that you use for this operation must be in a compatible key
5049
- # state. For details, see [How Key State Affects Use of a Customer
5050
- # Master Key][1] in the *AWS Key Management Service Developer Guide*.
6242
+ # state. For details, see [Key state: Effect on your CMK][5] in the *AWS
6243
+ # Key Management Service Developer Guide*.
6244
+ #
6245
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
6246
+ # in a different AWS account.
5051
6247
  #
6248
+ # **Required permissions**\: [kms:UntagResource][6] (key policy)
5052
6249
  #
6250
+ # **Related operations**
5053
6251
  #
5054
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6252
+ # * CreateKey
6253
+ #
6254
+ # * ListResourceTags
6255
+ #
6256
+ # * ReplicateKey
6257
+ #
6258
+ # * TagResource
6259
+ #
6260
+ #
6261
+ #
6262
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
6263
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
6264
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
6265
+ # [4]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
6266
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6267
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5055
6268
  #
5056
6269
  # @option params [required, String] :key_id
5057
- # A unique identifier for the CMK from which you are removing tags.
6270
+ # Identifies the CMK from which you are removing tags.
5058
6271
  #
5059
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
6272
+ # Specify the key ID or key ARN of the CMK.
5060
6273
  #
5061
6274
  # For example:
5062
6275
  #
@@ -5104,8 +6317,13 @@ module Aws::KMS
5104
6317
  # Associates an existing AWS KMS alias with a different customer master
5105
6318
  # key (CMK). Each alias is associated with only one CMK at a time,
5106
6319
  # although a CMK can have multiple aliases. The alias and the CMK must
5107
- # be in the same AWS account and region. You cannot perform this
5108
- # operation on an alias in a different AWS account.
6320
+ # be in the same AWS account and Region.
6321
+ #
6322
+ # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
6323
+ # the CMK. For details, see [Using ABAC in AWS KMS][1] in the *AWS Key
6324
+ # Management Service Developer Guide*.
6325
+ #
6326
+ # </note>
5109
6327
  #
5110
6328
  # The current and new CMK must be the same type (both symmetric or both
5111
6329
  # asymmetric), and they must have the same key usage (`ENCRYPT_DECRYPT`
@@ -5125,12 +6343,37 @@ module Aws::KMS
5125
6343
  # operation.
5126
6344
  #
5127
6345
  # The CMK that you use for this operation must be in a compatible key
5128
- # state. For details, see [How Key State Affects Use of a Customer
5129
- # Master Key][1] in the *AWS Key Management Service Developer Guide*.
6346
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
6347
+ # Key Management Service Developer Guide*.
5130
6348
  #
6349
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
6350
+ # in a different AWS account.
5131
6351
  #
6352
+ # **Required permissions**
6353
+ #
6354
+ # * [kms:UpdateAlias][3] on the alias (IAM policy).
6355
+ #
6356
+ # * [kms:UpdateAlias][3] on the current CMK (key policy).
6357
+ #
6358
+ # * [kms:UpdateAlias][3] on the new CMK (key policy).
6359
+ #
6360
+ # For details, see [Controlling access to aliases][4] in the *AWS Key
6361
+ # Management Service Developer Guide*.
6362
+ #
6363
+ # **Related operations:**
6364
+ #
6365
+ # * CreateAlias
6366
+ #
6367
+ # * DeleteAlias
6368
+ #
6369
+ # * ListAliases
5132
6370
  #
5133
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6371
+ #
6372
+ #
6373
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
6374
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6375
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
6376
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
5134
6377
  #
5135
6378
  # @option params [required, String] :alias_name
5136
6379
  # Identifies the alias that is changing its CMK. This value must begin
@@ -5139,15 +6382,16 @@ module Aws::KMS
5139
6382
  # name.
5140
6383
  #
5141
6384
  # @option params [required, String] :target_key_id
5142
- # Identifies the CMK to associate with the alias. When the update
5143
- # operation completes, the alias will point to this CMK.
6385
+ # Identifies the [customer managed CMK][1] to associate with the alias.
6386
+ # You don't have permission to associate an alias with an [AWS managed
6387
+ # CMK][2].
5144
6388
  #
5145
6389
  # The CMK must be in the same AWS account and Region as the alias. Also,
5146
6390
  # the new target CMK must be the same type as the current target CMK
5147
6391
  # (both symmetric or both asymmetric) and they must have the same key
5148
6392
  # usage.
5149
6393
  #
5150
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
6394
+ # Specify the key ID or key ARN of the CMK.
5151
6395
  #
5152
6396
  # For example:
5153
6397
  #
@@ -5161,6 +6405,11 @@ module Aws::KMS
5161
6405
  # To verify that the alias is mapped to the correct CMK, use
5162
6406
  # ListAliases.
5163
6407
  #
6408
+ #
6409
+ #
6410
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
6411
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
6412
+ #
5164
6413
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5165
6414
  #
5166
6415
  #
@@ -5230,11 +6479,29 @@ module Aws::KMS
5230
6479
  # AWS KMS, which combines the convenience and extensive integration of
5231
6480
  # AWS KMS with the isolation and control of a single-tenant key store.
5232
6481
  #
6482
+ # **Cross-account use**\: No. You cannot perform this operation on a
6483
+ # custom key store in a different AWS account.
6484
+ #
6485
+ # **Required permissions**\: [kms:UpdateCustomKeyStore][4] (IAM policy)
6486
+ #
6487
+ # **Related operations:**
6488
+ #
6489
+ # * ConnectCustomKeyStore
6490
+ #
6491
+ # * CreateCustomKeyStore
6492
+ #
6493
+ # * DeleteCustomKeyStore
6494
+ #
6495
+ # * DescribeCustomKeyStores
6496
+ #
6497
+ # * DisconnectCustomKeyStore
6498
+ #
5233
6499
  #
5234
6500
  #
5235
6501
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
5236
6502
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-password
5237
6503
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
6504
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5238
6505
  #
5239
6506
  # @option params [required, String] :custom_key_store_id
5240
6507
  # Identifies the custom key store that you want to update. Enter the ID
@@ -5294,20 +6561,30 @@ module Aws::KMS
5294
6561
  # Updates the description of a customer master key (CMK). To see the
5295
6562
  # description of a CMK, use DescribeKey.
5296
6563
  #
5297
- # You cannot perform this operation on a CMK in a different AWS account.
5298
- #
5299
6564
  # The CMK that you use for this operation must be in a compatible key
5300
- # state. For details, see [How Key State Affects Use of a Customer
5301
- # Master Key][1] in the *AWS Key Management Service Developer Guide*.
6565
+ # state. For details, see [Key state: Effect on your CMK][1] in the *AWS
6566
+ # Key Management Service Developer Guide*.
6567
+ #
6568
+ # **Cross-account use**\: No. You cannot perform this operation on a CMK
6569
+ # in a different AWS account.
6570
+ #
6571
+ # **Required permissions**\: [kms:UpdateKeyDescription][2] (key policy)
6572
+ #
6573
+ # **Related operations**
6574
+ #
6575
+ # * CreateKey
6576
+ #
6577
+ # * DescribeKey
5302
6578
  #
5303
6579
  #
5304
6580
  #
5305
6581
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6582
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5306
6583
  #
5307
6584
  # @option params [required, String] :key_id
5308
- # A unique identifier for the customer master key (CMK).
6585
+ # Updates the description of the specified customer master key (CMK).
5309
6586
  #
5310
- # Specify the key ID or the Amazon Resource Name (ARN) of the CMK.
6587
+ # Specify the key ID or key ARN of the CMK.
5311
6588
  #
5312
6589
  # For example:
5313
6590
  #
@@ -5349,6 +6626,128 @@ module Aws::KMS
5349
6626
  req.send_request(options)
5350
6627
  end
5351
6628
 
6629
+ # Changes the primary key of a multi-Region key.
6630
+ #
6631
+ # This operation changes the replica key in the specified Region to a
6632
+ # primary key and changes the former primary key to a replica key. For
6633
+ # example, suppose you have a primary key in `us-east-1` and a replica
6634
+ # key in `eu-west-2`. If you run `UpdatePrimaryRegion` with a
6635
+ # `PrimaryRegion` value of `eu-west-2`, the primary key is now the key
6636
+ # in `eu-west-2`, and the key in `us-east-1` becomes a replica key. For
6637
+ # details, see
6638
+ #
6639
+ # This operation supports *multi-Region keys*, an AWS KMS feature that
6640
+ # lets you create multiple interoperable CMKs in different AWS Regions.
6641
+ # Because these CMKs have the same key ID, key material, and other
6642
+ # metadata, you can use them to encrypt data in one AWS Region and
6643
+ # decrypt it in a different AWS Region without making a cross-Region
6644
+ # call or exposing the plaintext data. For more information about
6645
+ # multi-Region keys, see [Using multi-Region keys][1] in the *AWS Key
6646
+ # Management Service Developer Guide*.
6647
+ #
6648
+ # The *primary key* of a multi-Region key is the source for properties
6649
+ # that are always shared by primary and replica keys, including the key
6650
+ # material, [key ID][2], [key spec][3], [key usage][4], [key material
6651
+ # origin][5], and [automatic key rotation][6]. It's the only key that
6652
+ # can be replicated. You cannot [delete the primary key][7] until all
6653
+ # replicas are deleted.
6654
+ #
6655
+ # The key ID and primary Region that you specify uniquely identify the
6656
+ # replica key that will become the primary key. The primary Region must
6657
+ # already have a replica key. This operation does not create a CMK in
6658
+ # the specified Region. To find the replica keys, use the DescribeKey
6659
+ # operation on the primary key or any replica key. To create a replica
6660
+ # key, use the ReplicateKey operation.
6661
+ #
6662
+ # You can run this operation while using the affected multi-Region keys
6663
+ # in cryptographic operations. This operation should not delay,
6664
+ # interrupt, or cause failures in cryptographic operations.
6665
+ #
6666
+ # Even after this operation completes, the process of updating the
6667
+ # primary Region might still be in progress for a few more seconds.
6668
+ # Operations such as `DescribeKey` might display both the old and new
6669
+ # primary keys as replicas. The old and new primary keys have a
6670
+ # transient key state of `Updating`. The original key state is restored
6671
+ # when the update is complete. While the key state is `Updating`, you
6672
+ # can use the keys in cryptographic operations, but you cannot replicate
6673
+ # the new primary key or perform certain management operations, such as
6674
+ # enabling or disabling these keys. For details about the `Updating` key
6675
+ # state, see [Key state: Effect on your
6676
+ # CMK](kms/latest/developerguide/key-state.html) in the *AWS Key
6677
+ # Management Service Developer Guide*.
6678
+ #
6679
+ # This operation does not return any output. To verify that primary key
6680
+ # is changed, use the DescribeKey operation.
6681
+ #
6682
+ # **Cross-account use**\: No. You cannot use this operation in a
6683
+ # different AWS account.
6684
+ #
6685
+ # **Required permissions**\:
6686
+ #
6687
+ # * `kms:UpdatePrimaryRegion` on the current primary CMK (in the primary
6688
+ # CMK's Region). Include this permission primary CMK's key policy.
6689
+ #
6690
+ # * `kms:UpdatePrimaryRegion` on the current replica CMK (in the replica
6691
+ # CMK's Region). Include this permission in the replica CMK's key
6692
+ # policy.
6693
+ #
6694
+ # **Related operations**
6695
+ #
6696
+ # * CreateKey
6697
+ #
6698
+ # * ReplicateKey
6699
+ #
6700
+ #
6701
+ #
6702
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
6703
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
6704
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec
6705
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage
6706
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin
6707
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
6708
+ # [7]: https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html
6709
+ #
6710
+ # @option params [required, String] :key_id
6711
+ # Identifies the current primary key. When the operation completes, this
6712
+ # CMK will be a replica key.
6713
+ #
6714
+ # Specify the key ID or key ARN of a multi-Region primary key.
6715
+ #
6716
+ # For example:
6717
+ #
6718
+ # * Key ID: `mrk-1234abcd12ab34cd56ef1234567890ab`
6719
+ #
6720
+ # * Key ARN:
6721
+ # `arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab`
6722
+ #
6723
+ # To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey.
6724
+ #
6725
+ # @option params [required, String] :primary_region
6726
+ # The AWS Region of the new primary key. Enter the Region ID, such as
6727
+ # `us-east-1` or `ap-southeast-2`. There must be an existing replica key
6728
+ # in this Region.
6729
+ #
6730
+ # When the operation completes, the multi-Region key in this Region will
6731
+ # be the primary key.
6732
+ #
6733
+ # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
6734
+ #
6735
+ # @example Request syntax with placeholder values
6736
+ #
6737
+ # resp = client.update_primary_region({
6738
+ # key_id: "KeyIdType", # required
6739
+ # primary_region: "RegionType", # required
6740
+ # })
6741
+ #
6742
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdatePrimaryRegion AWS API Documentation
6743
+ #
6744
+ # @overload update_primary_region(params = {})
6745
+ # @param [Hash] params ({})
6746
+ def update_primary_region(params = {}, options = {})
6747
+ req = build_request(:update_primary_region, params)
6748
+ req.send_request(options)
6749
+ end
6750
+
5352
6751
  # Verifies a digital signature that was generated by the Sign operation.
5353
6752
  #
5354
6753
  #
@@ -5381,13 +6780,22 @@ module Aws::KMS
5381
6780
  # signatures.
5382
6781
  #
5383
6782
  # The CMK that you use for this operation must be in a compatible key
5384
- # state. For details, see [How Key State Affects Use of a Customer
5385
- # Master Key][2] in the *AWS Key Management Service Developer Guide*.
6783
+ # state. For details, see [Key state: Effect on your CMK][2] in the *AWS
6784
+ # Key Management Service Developer Guide*.
6785
+ #
6786
+ # **Cross-account use**\: Yes. To perform this operation with a CMK in a
6787
+ # different AWS account, specify the key ARN or alias ARN in the value
6788
+ # of the `KeyId` parameter.
6789
+ #
6790
+ # **Required permissions**\: [kms:Verify][3] (key policy)
6791
+ #
6792
+ # **Related operations**\: Sign
5386
6793
  #
5387
6794
  #
5388
6795
  #
5389
6796
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
5390
6797
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6798
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
5391
6799
  #
5392
6800
  # @option params [required, String] :key_id
5393
6801
  # Identifies the asymmetric CMK that will be used to verify the
@@ -5395,10 +6803,9 @@ module Aws::KMS
5395
6803
  # signature. If you specify a different CMK, the signature verification
5396
6804
  # fails.
5397
6805
  #
5398
- # To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias
5399
- # name, or alias ARN. When using an alias name, prefix it with
5400
- # `"alias/"`. To specify a CMK in a different AWS account, you must use
5401
- # the key ARN or alias ARN.
6806
+ # To specify a CMK, use its key ID, key ARN, alias name, or alias ARN.
6807
+ # When using an alias name, prefix it with `"alias/"`. To specify a CMK
6808
+ # in a different AWS account, you must use the key ARN or alias ARN.
5402
6809
  #
5403
6810
  # For example:
5404
6811
  #
@@ -5442,7 +6849,9 @@ module Aws::KMS
5442
6849
  # @option params [Array<String>] :grant_tokens
5443
6850
  # A list of grant tokens.
5444
6851
  #
5445
- # For more information, see [Grant Tokens][1] in the *AWS Key Management
6852
+ # Use a grant token when your permission to call this operation comes
6853
+ # from a new grant that has not yet achieved *eventual consistency*. For
6854
+ # more information, see [Grant token][1] in the *AWS Key Management
5446
6855
  # Service Developer Guide*.
5447
6856
  #
5448
6857
  #
@@ -5494,7 +6903,7 @@ module Aws::KMS
5494
6903
  params: params,
5495
6904
  config: config)
5496
6905
  context[:gem_name] = 'aws-sdk-kms'
5497
- context[:gem_version] = '1.39.0'
6906
+ context[:gem_version] = '1.44.0'
5498
6907
  Seahorse::Client::Request.new(handlers, context)
5499
6908
  end
5500
6909