aws-sdk-kms 1.59.0 → 1.61.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -455,32 +455,27 @@ module Aws::KMS
455
455
  req.send_request(options)
456
456
  end
457
457
 
458
- # Connects or reconnects a [custom key store][1] to its associated
459
- # CloudHSM cluster.
458
+ # Connects or reconnects a [custom key store][1] to its backing key
459
+ # store. For an CloudHSM key store, `ConnectCustomKeyStore` connects the
460
+ # key store to its associated CloudHSM cluster. For an external key
461
+ # store, `ConnectCustomKeyStore` connects the key store to the external
462
+ # key store proxy that communicates with your external key manager.
460
463
  #
461
464
  # The custom key store must be connected before you can create KMS keys
462
465
  # in the key store or use the KMS keys it contains. You can disconnect
463
466
  # and reconnect a custom key store at any time.
464
467
  #
465
- # To connect a custom key store, its associated CloudHSM cluster must
466
- # have at least one active HSM. To get the number of active HSMs in a
467
- # cluster, use the [DescribeClusters][2] operation. To add HSMs to the
468
- # cluster, use the [CreateHsm][3] operation. Also, the [ `kmsuser`
469
- # crypto user][4] (CU) must not be logged into the cluster. This
470
- # prevents KMS from using this account to log in.
471
- #
472
- # The connection process can take an extended amount of time to
473
- # complete; up to 20 minutes. This operation starts the connection
468
+ # The connection process for a custom key store can take an extended
469
+ # amount of time to complete. This operation starts the connection
474
470
  # process, but it does not wait for it to complete. When it succeeds,
475
471
  # this operation quickly returns an HTTP 200 response and a JSON object
476
472
  # with no properties. However, this response does not indicate that the
477
473
  # custom key store is connected. To get the connection state of the
478
474
  # custom key store, use the DescribeCustomKeyStores operation.
479
475
  #
480
- # During the connection process, KMS finds the CloudHSM cluster that is
481
- # associated with the custom key store, creates the connection
482
- # infrastructure, connects to the cluster, logs into the CloudHSM client
483
- # as the `kmsuser` CU, and rotates its password.
476
+ # This operation is part of the [custom key stores][1] feature in KMS,
477
+ # which combines the convenience and extensive integration of KMS with
478
+ # the isolation and control of a key store that you own and manage.
484
479
  #
485
480
  # The `ConnectCustomKeyStore` operation might fail for various reasons.
486
481
  # To find the reason, use the DescribeCustomKeyStores operation and see
@@ -492,14 +487,50 @@ module Aws::KMS
492
487
  # UpdateCustomKeyStore operation if necessary, and then use
493
488
  # `ConnectCustomKeyStore` again.
494
489
  #
495
- # If you are having trouble connecting or disconnecting a custom key
496
- # store, see [Troubleshooting a Custom Key Store][5] in the *Key
490
+ # **CloudHSM key store**
491
+ #
492
+ # During the connection process for an CloudHSM key store, KMS finds the
493
+ # CloudHSM cluster that is associated with the custom key store, creates
494
+ # the connection infrastructure, connects to the cluster, logs into the
495
+ # CloudHSM client as the `kmsuser` CU, and rotates its password.
496
+ #
497
+ # To connect an CloudHSM key store, its associated CloudHSM cluster must
498
+ # have at least one active HSM. To get the number of active HSMs in a
499
+ # cluster, use the [DescribeClusters][2] operation. To add HSMs to the
500
+ # cluster, use the [CreateHsm][3] operation. Also, the [ `kmsuser`
501
+ # crypto user][4] (CU) must not be logged into the cluster. This
502
+ # prevents KMS from using this account to log in.
503
+ #
504
+ # If you are having trouble connecting or disconnecting a CloudHSM key
505
+ # store, see [Troubleshooting an CloudHSM key store][5] in the *Key
506
+ # Management Service Developer Guide*.
507
+ #
508
+ # **External key store**
509
+ #
510
+ # When you connect an external key store that uses public endpoint
511
+ # connectivity, KMS tests its ability to communicate with your external
512
+ # key manager by sending a request via the external key store proxy.
513
+ #
514
+ # When you connect to an external key store that uses VPC endpoint
515
+ # service connectivity, KMS establishes the networking elements that it
516
+ # needs to communicate with your external key manager via the external
517
+ # key store proxy. This includes creating an interface endpoint to the
518
+ # VPC endpoint service and a private hosted zone for traffic between KMS
519
+ # and the VPC endpoint service.
520
+ #
521
+ # To connect an external key store, KMS must be able to connect to the
522
+ # external key store proxy, the external key store proxy must be able to
523
+ # communicate with your external key manager, and the external key
524
+ # manager must be available for cryptographic operations.
525
+ #
526
+ # If you are having trouble connecting or disconnecting an external key
527
+ # store, see [Troubleshooting an external key store][6] in the *Key
497
528
  # Management Service Developer Guide*.
498
529
  #
499
530
  # **Cross-account use**\: No. You cannot perform this operation on a
500
531
  # custom key store in a different Amazon Web Services account.
501
532
  #
502
- # **Required permissions**\: [kms:ConnectCustomKeyStore][6] (IAM policy)
533
+ # **Required permissions**\: [kms:ConnectCustomKeyStore][7] (IAM policy)
503
534
  #
504
535
  # **Related operations**
505
536
  #
@@ -520,7 +551,8 @@ module Aws::KMS
520
551
  # [3]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
521
552
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
522
553
  # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
523
- # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
554
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
555
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
524
556
  #
525
557
  # @option params [required, String] :custom_key_store_id
526
558
  # Enter the key store ID of the custom key store that you want to
@@ -530,10 +562,12 @@ module Aws::KMS
530
562
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
531
563
  #
532
564
  #
533
- # @example Example: To connect a custom key store to its CloudHSM cluster
565
+ # @example Example: To connect a custom key store
534
566
  #
535
- # # This example connects an AWS KMS custom key store to its AWS CloudHSM cluster. This operation does not return any data.
536
- # # To verify that the custom key store is connected, use the <code>DescribeCustomKeyStores</code> operation.
567
+ # # This example connects an AWS KMS custom key store to its backing key store. For an AWS CloudHSM key store, it connects
568
+ # # the key store to its AWS CloudHSM cluster. For an external key store, it connects the key store to the external key
569
+ # # store proxy that communicates with your external key manager. This operation does not return any data. To verify that
570
+ # # the custom key store is connected, use the <code>DescribeCustomKeyStores</code> operation.
537
571
  #
538
572
  # resp = client.connect_custom_key_store({
539
573
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the AWS KMS custom key store.
@@ -561,7 +595,7 @@ module Aws::KMS
561
595
  # Creates a friendly name for a KMS key.
562
596
  #
563
597
  # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
564
- # the KMS key. For details, see [ABAC in KMS][1] in the *Key Management
598
+ # the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
565
599
  # Service Developer Guide*.
566
600
  #
567
601
  # </note>
@@ -688,34 +722,76 @@ module Aws::KMS
688
722
  req.send_request(options)
689
723
  end
690
724
 
691
- # Creates a [custom key store][1] that is associated with an [CloudHSM
692
- # cluster][2] that you own and manage.
725
+ # Creates a [custom key store][1] backed by a key store that you own and
726
+ # manage. When you use a KMS key in a custom key store for a
727
+ # cryptographic operation, the cryptographic operation is actually
728
+ # performed in your key store using your keys. KMS supports [CloudHSM
729
+ # key stores][2] backed by an [CloudHSM cluster][3] and [external key
730
+ # stores][4] backed by an external key store proxy and external key
731
+ # manager outside of Amazon Web Services.
732
+ #
733
+ # This operation is part of the [custom key stores][1] feature in KMS,
734
+ # which combines the convenience and extensive integration of KMS with
735
+ # the isolation and control of a key store that you own and manage.
736
+ #
737
+ # Before you create the custom key store, the required elements must be
738
+ # in place and operational. We recommend that you use the test tools
739
+ # that KMS provides to verify the configuration your external key store
740
+ # proxy. For details about the required elements and verification tests,
741
+ # see [Assemble the prerequisites (for CloudHSM key stores)][5] or
742
+ # [Assemble the prerequisites (for external key stores)][6] in the *Key
743
+ # Management Service Developer Guide*.
693
744
  #
694
- # This operation is part of the [custom key store feature][1] feature in
695
- # KMS, which combines the convenience and extensive integration of KMS
696
- # with the isolation and control of a single-tenant key store.
745
+ # To create a custom key store, use the following parameters.
697
746
  #
698
- # Before you create the custom key store, you must assemble the required
699
- # elements, including an CloudHSM cluster that fulfills the requirements
700
- # for a custom key store. For details about the required elements, see
701
- # [Assemble the Prerequisites][3] in the *Key Management Service
702
- # Developer Guide*.
747
+ # * To create an CloudHSM key store, specify the `CustomKeyStoreName`,
748
+ # `CloudHsmClusterId`, `KeyStorePassword`, and
749
+ # `TrustAnchorCertificate`. The `CustomKeyStoreType` parameter is
750
+ # optional for CloudHSM key stores. If you include it, set it to the
751
+ # default value, `AWS_CLOUDHSM`. For help with failures, see
752
+ # [Troubleshooting an CloudHSM key store][7] in the *Key Management
753
+ # Service Developer Guide*.
754
+ #
755
+ # * To create an external key store, specify the `CustomKeyStoreName`
756
+ # and a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`. Also, specify
757
+ # values for `XksProxyConnectivity`,
758
+ # `XksProxyAuthenticationCredential`, `XksProxyUriEndpoint`, and
759
+ # `XksProxyUriPath`. If your `XksProxyConnectivity` value is
760
+ # `VPC_ENDPOINT_SERVICE`, specify the `XksProxyVpcEndpointServiceName`
761
+ # parameter. For help with failures, see [Troubleshooting an external
762
+ # key store][8] in the *Key Management Service Developer Guide*.
763
+ #
764
+ # <note markdown="1"> For external key stores:
765
+ #
766
+ # Some external key managers provide a simpler method for creating an
767
+ # external key store. For details, see your external key manager
768
+ # documentation.
769
+ #
770
+ # When creating an external key store in the KMS console, you can upload
771
+ # a JSON-based proxy configuration file with the desired values. You
772
+ # cannot use a proxy configuration with the `CreateCustomKeyStore`
773
+ # operation. However, you can use the values in the file to help you
774
+ # determine the correct values for the `CreateCustomKeyStore`
775
+ # parameters.
776
+ #
777
+ # </note>
703
778
  #
704
779
  # When the operation completes successfully, it returns the ID of the
705
780
  # new custom key store. Before you can use your new custom key store,
706
- # you need to use the ConnectCustomKeyStore operation to connect the new
707
- # key store to its CloudHSM cluster. Even if you are not going to use
708
- # your custom key store immediately, you might want to connect it to
709
- # verify that all settings are correct and then disconnect it until you
710
- # are ready to use it.
711
- #
712
- # For help with failures, see [Troubleshooting a Custom Key Store][4] in
781
+ # you need to use the ConnectCustomKeyStore operation to connect a new
782
+ # CloudHSM key store to its CloudHSM cluster, or to connect a new
783
+ # external key store to the external key store proxy for your external
784
+ # key manager. Even if you are not going to use your custom key store
785
+ # immediately, you might want to connect it to verify that all settings
786
+ # are correct and then disconnect it until you are ready to use it.
787
+ #
788
+ # For help with failures, see [Troubleshooting a custom key store][7] in
713
789
  # the *Key Management Service Developer Guide*.
714
790
  #
715
791
  # **Cross-account use**\: No. You cannot perform this operation on a
716
792
  # custom key store in a different Amazon Web Services account.
717
793
  #
718
- # **Required permissions**\: [kms:CreateCustomKeyStore][5] (IAM policy).
794
+ # **Required permissions**\: [kms:CreateCustomKeyStore][9] (IAM policy).
719
795
  #
720
796
  # **Related operations:**
721
797
  #
@@ -732,35 +808,51 @@ module Aws::KMS
732
808
  #
733
809
  #
734
810
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
735
- # [2]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
736
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
737
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
738
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
811
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
812
+ # [3]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
813
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
814
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
815
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
816
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
817
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
818
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
739
819
  #
740
820
  # @option params [required, String] :custom_key_store_name
741
821
  # Specifies a friendly name for the custom key store. The name must be
742
- # unique in your Amazon Web Services account.
822
+ # unique in your Amazon Web Services account and Region. This parameter
823
+ # is required for all custom key stores.
743
824
  #
744
825
  # @option params [String] :cloud_hsm_cluster_id
745
- # Identifies the CloudHSM cluster for the custom key store. Enter the
746
- # cluster ID of any active CloudHSM cluster that is not already
747
- # associated with a custom key store. To find the cluster ID, use the
748
- # [DescribeClusters][1] operation.
826
+ # Identifies the CloudHSM cluster for an CloudHSM key store. This
827
+ # parameter is required for custom key stores with `CustomKeyStoreType`
828
+ # of `AWS_CLOUDHSM`.
829
+ #
830
+ # Enter the cluster ID of any active CloudHSM cluster that is not
831
+ # already associated with a custom key store. To find the cluster ID,
832
+ # use the [DescribeClusters][1] operation.
749
833
  #
750
834
  #
751
835
  #
752
836
  # [1]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
753
837
  #
754
838
  # @option params [String] :trust_anchor_certificate
755
- # Enter the content of the trust anchor certificate for the cluster.
756
- # This is the content of the `customerCA.crt` file that you created when
757
- # you [initialized the cluster][1].
839
+ # Specifies the certificate for an CloudHSM key store. This parameter is
840
+ # required for custom key stores with a `CustomKeyStoreType` of
841
+ # `AWS_CLOUDHSM`.
842
+ #
843
+ # Enter the content of the trust anchor certificate for the CloudHSM
844
+ # cluster. This is the content of the `customerCA.crt` file that you
845
+ # created when you [initialized the cluster][1].
758
846
  #
759
847
  #
760
848
  #
761
849
  # [1]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html
762
850
  #
763
851
  # @option params [String] :key_store_password
852
+ # Specifies the `kmsuser` password for an CloudHSM key store. This
853
+ # parameter is required for custom key stores with a
854
+ # `CustomKeyStoreType` of `AWS_CLOUDHSM`.
855
+ #
764
856
  # Enter the password of the [ `kmsuser` crypto user (CU) account][1] in
765
857
  # the specified CloudHSM cluster. KMS logs into the cluster as this user
766
858
  # to manage key material on your behalf.
@@ -775,12 +867,153 @@ module Aws::KMS
775
867
  #
776
868
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
777
869
  #
870
+ # @option params [String] :custom_key_store_type
871
+ # Specifies the type of custom key store. The default value is
872
+ # `AWS_CLOUDHSM`.
873
+ #
874
+ # For a custom key store backed by an CloudHSM cluster, omit the
875
+ # parameter or enter `AWS_CLOUDHSM`. For a custom key store backed by an
876
+ # external key manager outside of Amazon Web Services, enter
877
+ # `EXTERNAL_KEY_STORE`. You cannot change this property after the key
878
+ # store is created.
879
+ #
880
+ # @option params [String] :xks_proxy_uri_endpoint
881
+ # Specifies the endpoint that KMS uses to send requests to the external
882
+ # key store proxy (XKS proxy). This parameter is required for custom key
883
+ # stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
884
+ #
885
+ # The protocol must be HTTPS. KMS communicates on port 443. Do not
886
+ # specify the port in the `XksProxyUriEndpoint` value.
887
+ #
888
+ # For external key stores with `XksProxyConnectivity` value of
889
+ # `VPC_ENDPOINT_SERVICE`, specify `https://` followed by the private DNS
890
+ # name of the VPC endpoint service.
891
+ #
892
+ # For external key stores with `PUBLIC_ENDPOINT` connectivity, this
893
+ # endpoint must be reachable before you create the custom key store. KMS
894
+ # connects to the external key store proxy while creating the custom key
895
+ # store. For external key stores with `VPC_ENDPOINT_SERVICE`
896
+ # connectivity, KMS connects when you call the ConnectCustomKeyStore
897
+ # operation.
898
+ #
899
+ # The value of this parameter must begin with `https://`. The remainder
900
+ # can contain upper and lower case letters (A-Z and a-z), numbers (0-9),
901
+ # dots (`.`), and hyphens (`-`). Additional slashes (`/` and ``) are
902
+ # not permitted.
903
+ #
904
+ # <b>Uniqueness requirements: </b>
905
+ #
906
+ # * The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
907
+ # be unique in the Amazon Web Services account and Region.
908
+ #
909
+ # * An external key store with `PUBLIC_ENDPOINT` connectivity cannot use
910
+ # the same `XksProxyUriEndpoint` value as an external key store with
911
+ # `VPC_ENDPOINT_SERVICE` connectivity in the same Amazon Web Services
912
+ # Region.
913
+ #
914
+ # * Each external key store with `VPC_ENDPOINT_SERVICE` connectivity
915
+ # must have its own private DNS name. The `XksProxyUriEndpoint` value
916
+ # for external key stores with `VPC_ENDPOINT_SERVICE` connectivity
917
+ # (private DNS name) must be unique in the Amazon Web Services account
918
+ # and Region.
919
+ #
920
+ # @option params [String] :xks_proxy_uri_path
921
+ # Specifies the base path to the proxy APIs for this external key store.
922
+ # To find this value, see the documentation for your external key store
923
+ # proxy. This parameter is required for all custom key stores with a
924
+ # `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
925
+ #
926
+ # The value must start with `/` and must end with `/kms/xks/v1` where
927
+ # `v1` represents the version of the KMS external key store proxy API.
928
+ # This path can include an optional prefix between the required elements
929
+ # such as `/prefix/kms/xks/v1`.
930
+ #
931
+ # <b>Uniqueness requirements: </b>
932
+ #
933
+ # * The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
934
+ # be unique in the Amazon Web Services account and Region.
935
+ #
936
+ # ^
937
+ #
938
+ # @option params [String] :xks_proxy_vpc_endpoint_service_name
939
+ # Specifies the name of the Amazon VPC endpoint service for interface
940
+ # endpoints that is used to communicate with your external key store
941
+ # proxy (XKS proxy). This parameter is required when the value of
942
+ # `CustomKeyStoreType` is `EXTERNAL_KEY_STORE` and the value of
943
+ # `XksProxyConnectivity` is `VPC_ENDPOINT_SERVICE`.
944
+ #
945
+ # The Amazon VPC endpoint service must [fulfill all requirements][1] for
946
+ # use with an external key store.
947
+ #
948
+ # **Uniqueness requirements:**
949
+ #
950
+ # * External key stores with `VPC_ENDPOINT_SERVICE` connectivity can
951
+ # share an Amazon VPC, but each external key store must have its own
952
+ # VPC endpoint service and private DNS name.
953
+ #
954
+ # ^
955
+ #
956
+ #
957
+ #
958
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
959
+ #
960
+ # @option params [Types::XksProxyAuthenticationCredentialType] :xks_proxy_authentication_credential
961
+ # Specifies an authentication credential for the external key store
962
+ # proxy (XKS proxy). This parameter is required for all custom key
963
+ # stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
964
+ #
965
+ # The `XksProxyAuthenticationCredential` has two required elements:
966
+ # `RawSecretAccessKey`, a secret key, and `AccessKeyId`, a unique
967
+ # identifier for the `RawSecretAccessKey`. For character requirements,
968
+ # see
969
+ # [XksProxyAuthenticationCredentialType](kms/latest/APIReference/API_XksProxyAuthenticationCredentialType.html).
970
+ #
971
+ # KMS uses this authentication credential to sign requests to the
972
+ # external key store proxy on your behalf. This credential is unrelated
973
+ # to Identity and Access Management (IAM) and Amazon Web Services
974
+ # credentials.
975
+ #
976
+ # This parameter doesn't set or change the authentication credentials
977
+ # on the XKS proxy. It just tells KMS the credential that you
978
+ # established on your external key store proxy. If you rotate your proxy
979
+ # authentication credential, use the UpdateCustomKeyStore operation to
980
+ # provide the new credential to KMS.
981
+ #
982
+ # @option params [String] :xks_proxy_connectivity
983
+ # Indicates how KMS communicates with the external key store proxy. This
984
+ # parameter is required for custom key stores with a
985
+ # `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
986
+ #
987
+ # If the external key store proxy uses a public endpoint, specify
988
+ # `PUBLIC_ENDPOINT`. If the external key store proxy uses a Amazon VPC
989
+ # endpoint service for communication with KMS, specify
990
+ # `VPC_ENDPOINT_SERVICE`. For help making this choice, see [Choosing a
991
+ # connectivity option][1] in the *Key Management Service Developer
992
+ # Guide*.
993
+ #
994
+ # An Amazon VPC endpoint service keeps your communication with KMS in a
995
+ # private address space entirely within Amazon Web Services, but it
996
+ # requires more configuration, including establishing a Amazon VPC with
997
+ # multiple subnets, a VPC endpoint service, a network load balancer, and
998
+ # a verified private DNS name. A public endpoint is simpler to set up,
999
+ # but it might be slower and might not fulfill your security
1000
+ # requirements. You might consider testing with a public endpoint, and
1001
+ # then establishing a VPC endpoint service for production tasks. Note
1002
+ # that this choice does not determine the location of the external key
1003
+ # store proxy. Even if you choose a VPC endpoint service, the proxy can
1004
+ # be hosted within the VPC or outside of Amazon Web Services such as in
1005
+ # your corporate data center.
1006
+ #
1007
+ #
1008
+ #
1009
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/plan-xks-keystore.html#choose-xks-connectivity
1010
+ #
778
1011
  # @return [Types::CreateCustomKeyStoreResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
779
1012
  #
780
1013
  # * {Types::CreateCustomKeyStoreResponse#custom_key_store_id #custom_key_store_id} => String
781
1014
  #
782
1015
  #
783
- # @example Example: To create an AWS CloudHSM custom key store
1016
+ # @example Example: To create an AWS CloudHSM key store
784
1017
  #
785
1018
  # # This example creates a custom key store that is associated with an AWS CloudHSM cluster.
786
1019
  #
@@ -796,6 +1029,49 @@ module Aws::KMS
796
1029
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the new custom key store.
797
1030
  # }
798
1031
  #
1032
+ # @example Example: To create an external key store with VPC endpoint service connectivity
1033
+ #
1034
+ # # This example creates an external key store that uses an Amazon VPC endpoint service to communicate with AWS KMS.
1035
+ #
1036
+ # resp = client.create_custom_key_store({
1037
+ # custom_key_store_name: "ExampleVPCEndpointKeyStore", # A friendly name for the custom key store
1038
+ # custom_key_store_type: "EXTERNAL_KEY_STORE", # For external key stores, the value must be EXTERNAL_KEY_STORE
1039
+ # xks_proxy_authentication_credential: {
1040
+ # access_key_id: "ABCDE12345670EXAMPLE",
1041
+ # raw_secret_access_key: "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo=",
1042
+ # }, # The access key ID and secret access key that KMS uses to authenticate to your external key store proxy
1043
+ # xks_proxy_connectivity: "VPC_ENDPOINT_SERVICE", # Indicates how AWS KMS communicates with the external key store proxy
1044
+ # xks_proxy_uri_endpoint: "https://myproxy-private.xks.example.com", # The URI that AWS KMS uses to connect to the external key store proxy
1045
+ # xks_proxy_uri_path: "/example-prefix/kms/xks/v1", # The URI path to the external key store proxy APIs
1046
+ # xks_proxy_vpc_endpoint_service_name: "com.amazonaws.vpce.us-east-1.vpce-svc-example1", # The VPC endpoint service that KMS uses to communicate with the external key store proxy
1047
+ # })
1048
+ #
1049
+ # resp.to_h outputs the following:
1050
+ # {
1051
+ # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the new custom key store.
1052
+ # }
1053
+ #
1054
+ # @example Example: To create an external key store with public endpoint connectivity
1055
+ #
1056
+ # # This example creates an external key store with public endpoint connectivity.
1057
+ #
1058
+ # resp = client.create_custom_key_store({
1059
+ # custom_key_store_name: "ExamplePublicEndpointKeyStore", # A friendly name for the custom key store
1060
+ # custom_key_store_type: "EXTERNAL_KEY_STORE", # For external key stores, the value must be EXTERNAL_KEY_STORE
1061
+ # xks_proxy_authentication_credential: {
1062
+ # access_key_id: "ABCDE12345670EXAMPLE",
1063
+ # raw_secret_access_key: "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo=",
1064
+ # }, # The access key ID and secret access key that KMS uses to authenticate to your external key store proxy
1065
+ # xks_proxy_connectivity: "PUBLIC_ENDPOINT", # Indicates how AWS KMS communicates with the external key store proxy
1066
+ # xks_proxy_uri_endpoint: "https://myproxy.xks.example.com", # The URI that AWS KMS uses to connect to the external key store proxy
1067
+ # xks_proxy_uri_path: "/kms/xks/v1", # The URI path to your external key store proxy API
1068
+ # })
1069
+ #
1070
+ # resp.to_h outputs the following:
1071
+ # {
1072
+ # custom_key_store_id: "cks-987654321abcdef0", # The ID of the new custom key store.
1073
+ # }
1074
+ #
799
1075
  # @example Request syntax with placeholder values
800
1076
  #
801
1077
  # resp = client.create_custom_key_store({
@@ -803,6 +1079,15 @@ module Aws::KMS
803
1079
  # cloud_hsm_cluster_id: "CloudHsmClusterIdType",
804
1080
  # trust_anchor_certificate: "TrustAnchorCertificateType",
805
1081
  # key_store_password: "KeyStorePasswordType",
1082
+ # custom_key_store_type: "AWS_CLOUDHSM", # accepts AWS_CLOUDHSM, EXTERNAL_KEY_STORE
1083
+ # xks_proxy_uri_endpoint: "XksProxyUriEndpointType",
1084
+ # xks_proxy_uri_path: "XksProxyUriPathType",
1085
+ # xks_proxy_vpc_endpoint_service_name: "XksProxyVpcEndpointServiceNameType",
1086
+ # xks_proxy_authentication_credential: {
1087
+ # access_key_id: "XksProxyAuthenticationAccessKeyIdType", # required
1088
+ # raw_secret_access_key: "XksProxyAuthenticationRawSecretAccessKeyType", # required
1089
+ # },
1090
+ # xks_proxy_connectivity: "PUBLIC_ENDPOINT", # accepts PUBLIC_ENDPOINT, VPC_ENDPOINT_SERVICE
806
1091
  # })
807
1092
  #
808
1093
  # @example Response structure
@@ -1077,13 +1362,22 @@ module Aws::KMS
1077
1362
  end
1078
1363
 
1079
1364
  # Creates a unique customer managed [KMS key][1] in your Amazon Web
1080
- # Services account and Region.
1081
- #
1082
- # In addition to the required parameters, you can use the optional
1083
- # parameters to specify a key policy, description, tags, and other
1084
- # useful elements for any key type.
1085
- #
1086
- # <note markdown="1"> KMS is replacing the term *customer master key (CMK)* with *KMS key*
1365
+ # Services account and Region. You can use a KMS key in cryptographic
1366
+ # operations, such as encryption and signing. Some Amazon Web Services
1367
+ # services let you use KMS keys that you create and manage to protect
1368
+ # your service resources.
1369
+ #
1370
+ # A KMS key is a logical representation of a cryptographic key. In
1371
+ # addition to the key material used in cryptographic operations, a KMS
1372
+ # key includes metadata, such as the key ID, key policy, creation date,
1373
+ # description, and key state. For details, see [Managing keys][2] in the
1374
+ # *Key Management Service Developer Guide*
1375
+ #
1376
+ # Use the parameters of `CreateKey` to specify the type of KMS key, the
1377
+ # source of its key material, its key policy, description, tags, and
1378
+ # other properties.
1379
+ #
1380
+ # <note markdown="1"> KMS has replaced the term *customer master key (CMK)* with *KMS key*
1087
1381
  # and *KMS key*. The concept has not changed. To prevent breaking
1088
1382
  # changes, KMS is keeping some variations of this term.
1089
1383
  #
@@ -1093,12 +1387,15 @@ module Aws::KMS
1093
1387
  #
1094
1388
  # Symmetric encryption KMS key
1095
1389
  #
1096
- # : To create a symmetric encryption KMS key, you aren't required to
1097
- # specify any parameters. The default value for `KeySpec`,
1098
- # `SYMMETRIC_DEFAULT`, and the default value for `KeyUsage`,
1099
- # `ENCRYPT_DECRYPT`, create a symmetric encryption KMS key. For
1100
- # technical details, see [ SYMMETRIC\_DEFAULT key spec][2] in the *Key
1101
- # Management Service Developer Guide*.
1390
+ # : By default, `CreateKey` creates a symmetric encryption KMS key with
1391
+ # key material that KMS generates. This is the basic and most widely
1392
+ # used type of KMS key, and provides the best performance.
1393
+ #
1394
+ # To create a symmetric encryption KMS key, you don't need to specify
1395
+ # any parameters. The default value for `KeySpec`,
1396
+ # `SYMMETRIC_DEFAULT`, the default value for `KeyUsage`,
1397
+ # `ENCRYPT_DECRYPT`, and the default value for `Origin`, `AWS_KMS`,
1398
+ # create a symmetric encryption KMS key with KMS key material.
1102
1399
  #
1103
1400
  # If you need a key for basic encryption and decryption or you are
1104
1401
  # creating a KMS key to protect your resources in an Amazon Web
@@ -1183,12 +1480,12 @@ module Aws::KMS
1183
1480
  #
1184
1481
  #
1185
1482
  #
1186
- # : To import your own key material, begin by creating a symmetric
1187
- # encryption KMS key with no key material. To do this, use the
1188
- # `Origin` parameter of `CreateKey` with a value of `EXTERNAL`. Next,
1189
- # use GetParametersForImport operation to get a public key and import
1190
- # token, and use the public key to encrypt your key material. Then,
1191
- # use ImportKeyMaterial with your import token to import the key
1483
+ # : To import your own key material into a KMS key, begin by creating a
1484
+ # symmetric encryption KMS key with no key material. To do this, use
1485
+ # the `Origin` parameter of `CreateKey` with a value of `EXTERNAL`.
1486
+ # Next, use GetParametersForImport operation to get a public key and
1487
+ # import token, and use the public key to encrypt your key material.
1488
+ # Then, use ImportKeyMaterial with your import token to import the key
1192
1489
  # material. For step-by-step instructions, see [Importing Key
1193
1490
  # Material][6] in the <i> <i>Key Management Service Developer
1194
1491
  # Guide</i> </i>.
@@ -1201,34 +1498,70 @@ module Aws::KMS
1201
1498
  # the `Origin` parameter of `CreateKey` with a value of `EXTERNAL` and
1202
1499
  # the `MultiRegion` parameter with a value of `True`. To create
1203
1500
  # replicas of the multi-Region primary key, use the ReplicateKey
1204
- # operation. For more information about multi-Region keys, see
1205
- # [Multi-Region keys in KMS][5] in the *Key Management Service
1501
+ # operation. For instructions, see [Importing key material into
1502
+ # multi-Region keys][7]. For more information about multi-Region keys,
1503
+ # see [Multi-Region keys in KMS][5] in the *Key Management Service
1206
1504
  # Developer Guide*.
1207
1505
  #
1208
1506
  #
1209
1507
  #
1210
1508
  # Custom key store
1211
1509
  #
1212
- # : To create a symmetric encryption KMS key in a [custom key store][7],
1213
- # use the `CustomKeyStoreId` parameter to specify the custom key
1214
- # store. You must also use the `Origin` parameter with a value of
1215
- # `AWS_CLOUDHSM`. The CloudHSM cluster that is associated with the
1216
- # custom key store must have at least two active HSMs in different
1217
- # Availability Zones in the Amazon Web Services Region.
1218
- #
1219
- # Custom key stores support only symmetric encryption KMS keys. You
1220
- # cannot create an HMAC KMS key or an asymmetric KMS key in a custom
1221
- # key store. For information about custom key stores in KMS see
1222
- # [Custom key stores in KMS][7] in the <i> <i>Key Management Service
1223
- # Developer Guide</i> </i>.
1510
+ # : A [custom key store][8] lets you protect your Amazon Web Services
1511
+ # resources using keys in a backing key store that you own and manage.
1512
+ # When you request a cryptographic operation with a KMS key in a
1513
+ # custom key store, the operation is performed in the backing key
1514
+ # store using its cryptographic keys.
1515
+ #
1516
+ # KMS supports [CloudHSM key stores][9] backed by an CloudHSM cluster
1517
+ # and [external key stores][10] backed by an external key manager
1518
+ # outside of Amazon Web Services. When you create a KMS key in an
1519
+ # CloudHSM key store, KMS generates an encryption key in the CloudHSM
1520
+ # cluster and associates it with the KMS key. When you create a KMS
1521
+ # key in an external key store, you specify an existing encryption key
1522
+ # in the external key manager.
1523
+ #
1524
+ # <note markdown="1"> Some external key managers provide a simpler method for creating a
1525
+ # KMS key in an external key store. For details, see your external key
1526
+ # manager documentation.
1527
+ #
1528
+ # </note>
1529
+ #
1530
+ # Before you create a KMS key in a custom key store, the
1531
+ # `ConnectionState` of the key store must be `CONNECTED`. To connect
1532
+ # the custom key store, use the ConnectCustomKeyStore operation. To
1533
+ # find the `ConnectionState`, use the DescribeCustomKeyStores
1534
+ # operation.
1535
+ #
1536
+ # To create a KMS key in a custom key store, use the
1537
+ # `CustomKeyStoreId`. Use the default `KeySpec` value,
1538
+ # `SYMMETRIC_DEFAULT`, and the default `KeyUsage` value,
1539
+ # `ENCRYPT_DECRYPT` to create a symmetric encryption key. No other key
1540
+ # type is supported in a custom key store.
1541
+ #
1542
+ # To create a KMS key in an [CloudHSM key store][9], use the `Origin`
1543
+ # parameter with a value of `AWS_CLOUDHSM`. The CloudHSM cluster that
1544
+ # is associated with the custom key store must have at least two
1545
+ # active HSMs in different Availability Zones in the Amazon Web
1546
+ # Services Region.
1547
+ #
1548
+ # To create a KMS key in an [external key store][10], use the `Origin`
1549
+ # parameter with a value of `EXTERNAL_KEY_STORE` and an `XksKeyId`
1550
+ # parameter that identifies an existing external key.
1551
+ #
1552
+ # <note markdown="1"> Some external key managers provide a simpler method for creating a
1553
+ # KMS key in an external key store. For details, see your external key
1554
+ # manager documentation.
1555
+ #
1556
+ # </note>
1224
1557
  #
1225
1558
  # **Cross-account use**\: No. You cannot use this operation to create a
1226
1559
  # KMS key in a different Amazon Web Services account.
1227
1560
  #
1228
- # **Required permissions**\: [kms:CreateKey][8] (IAM policy). To use the
1229
- # `Tags` parameter, [kms:TagResource][8] (IAM policy). For examples and
1230
- # information about related permissions, see [Allow a user to create KMS
1231
- # keys][9] in the *Key Management Service Developer Guide*.
1561
+ # **Required permissions**\: [kms:CreateKey][11] (IAM policy). To use
1562
+ # the `Tags` parameter, [kms:TagResource][11] (IAM policy). For examples
1563
+ # and information about related permissions, see [Allow a user to create
1564
+ # KMS keys][12] in the *Key Management Service Developer Guide*.
1232
1565
  #
1233
1566
  # **Related operations:**
1234
1567
  #
@@ -1241,29 +1574,29 @@ module Aws::KMS
1241
1574
  #
1242
1575
  #
1243
1576
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys
1244
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-symmetric-default
1577
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html
1245
1578
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
1246
1579
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
1247
1580
  # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
1248
1581
  # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1249
- # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1250
- # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1251
- # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
1582
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html
1583
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1584
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
1585
+ # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
1586
+ # [11]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1587
+ # [12]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
1252
1588
  #
1253
1589
  # @option params [String] :policy
1254
- # The key policy to attach to the KMS key. If you do not specify a key
1255
- # policy, KMS attaches a default key policy to the KMS key. For more
1256
- # information, see [Default key policy][1] in the *Key Management
1257
- # Service Developer Guide*.
1590
+ # The key policy to attach to the KMS key.
1258
1591
  #
1259
1592
  # If you provide a key policy, it must meet the following criteria:
1260
1593
  #
1261
- # * If you don't set `BypassPolicyLockoutSafetyCheck` to `True`, the
1262
- # key policy must allow the principal that is making the `CreateKey`
1594
+ # * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
1595
+ # policy must allow the principal that is making the `CreateKey`
1263
1596
  # request to make a subsequent PutKeyPolicy request on the KMS key.
1264
1597
  # This reduces the risk that the KMS key becomes unmanageable. For
1265
1598
  # more information, refer to the scenario in the [Default Key
1266
- # Policy][2] section of the <i> <i>Key Management Service Developer
1599
+ # Policy][1] section of the <i> <i>Key Management Service Developer
1267
1600
  # Guide</i> </i>.
1268
1601
  #
1269
1602
  # * Each statement in the key policy must contain one or more
@@ -1273,33 +1606,25 @@ module Aws::KMS
1273
1606
  # delay before including the new principal in a key policy because the
1274
1607
  # new principal might not be immediately visible to KMS. For more
1275
1608
  # information, see [Changes that I make are not always immediately
1276
- # visible][3] in the *Amazon Web Services Identity and Access
1609
+ # visible][2] in the *Amazon Web Services Identity and Access
1277
1610
  # Management User Guide*.
1278
1611
  #
1279
- # A key policy document can include only the following characters:
1280
- #
1281
- # * Printable ASCII characters from the space character (`\u0020`)
1282
- # through the end of the ASCII character range.
1283
- #
1284
- # * Printable characters in the Basic Latin and Latin-1 Supplement
1285
- # character set (through `\u00FF`).
1612
+ # If you do not provide a key policy, KMS attaches a default key policy
1613
+ # to the KMS key. For more information, see [Default Key Policy][3] in
1614
+ # the *Key Management Service Developer Guide*.
1286
1615
  #
1287
- # * The tab (`\u0009`), line feed (`\u000A`), and carriage return
1288
- # (`\u000D`) special characters
1616
+ # The key policy size quota is 32 kilobytes (32768 bytes).
1289
1617
  #
1290
- # For information about key policies, see [Key policies in KMS][4] in
1291
- # the *Key Management Service Developer Guide*. For help writing and
1292
- # formatting a JSON policy document, see the [IAM JSON Policy
1293
- # Reference][5] in the <i> <i>Identity and Access Management User
1294
- # Guide</i> </i>.
1618
+ # For help writing and formatting a JSON policy document, see the [IAM
1619
+ # JSON Policy Reference][4] in the <i> <i>Identity and Access Management
1620
+ # User Guide</i> </i>.
1295
1621
  #
1296
1622
  #
1297
1623
  #
1298
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
1299
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1300
- # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
1301
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
1302
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1624
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1625
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
1626
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
1627
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1303
1628
  #
1304
1629
  # @option params [String] :description
1305
1630
  # A description of the KMS key.
@@ -1343,8 +1668,8 @@ module Aws::KMS
1343
1668
  #
1344
1669
  # The `KeySpec` and `CustomerMasterKeySpec` parameters work the same
1345
1670
  # way. Only the names differ. We recommend that you use `KeySpec`
1346
- # parameter in your code. However, to avoid breaking changes, KMS will
1347
- # support both parameters.
1671
+ # parameter in your code. However, to avoid breaking changes, KMS
1672
+ # supports both parameters.
1348
1673
  #
1349
1674
  # @option params [String] :key_spec
1350
1675
  # Specifies the type of KMS key to create. The default value,
@@ -1355,13 +1680,13 @@ module Aws::KMS
1355
1680
  # in the <i> <i>Key Management Service Developer Guide</i> </i>.
1356
1681
  #
1357
1682
  # The `KeySpec` determines whether the KMS key contains a symmetric key
1358
- # or an asymmetric key pair. It also determines the cryptographic
1359
- # algorithms that the KMS key supports. You can't change the `KeySpec`
1360
- # after the KMS key is created. To further restrict the algorithms that
1361
- # can be used with the KMS key, use a condition key in its key policy or
1362
- # IAM policy. For more information, see [kms:EncryptionAlgorithm][2],
1363
- # [kms:MacAlgorithm][3] or [kms:Signing Algorithm][4] in the <i> <i>Key
1364
- # Management Service Developer Guide</i> </i>.
1683
+ # or an asymmetric key pair. It also determines the algorithms that the
1684
+ # KMS key supports. You can't change the `KeySpec` after the KMS key is
1685
+ # created. To further restrict the algorithms that can be used with the
1686
+ # KMS key, use a condition key in its key policy or IAM policy. For more
1687
+ # information, see [kms:EncryptionAlgorithm][2], [kms:MacAlgorithm][3]
1688
+ # or [kms:Signing Algorithm][4] in the <i> <i>Key Management Service
1689
+ # Developer Guide</i> </i>.
1365
1690
  #
1366
1691
  # [Amazon Web Services services that are integrated with KMS][5] use
1367
1692
  # symmetric encryption KMS keys to protect your data. These services do
@@ -1426,44 +1751,46 @@ module Aws::KMS
1426
1751
  # origin after you create the KMS key. The default is `AWS_KMS`, which
1427
1752
  # means that KMS creates the key material.
1428
1753
  #
1429
- # To create a KMS key with no key material (for imported key material),
1430
- # set the value to `EXTERNAL`. For more information about importing key
1431
- # material into KMS, see [Importing Key Material][1] in the *Key
1432
- # Management Service Developer Guide*. This value is valid only for
1433
- # symmetric encryption KMS keys.
1754
+ # To [create a KMS key with no key material][1] (for imported key
1755
+ # material), set this value to `EXTERNAL`. For more information about
1756
+ # importing key material into KMS, see [Importing Key Material][2] in
1757
+ # the *Key Management Service Developer Guide*. The `EXTERNAL` origin
1758
+ # value is valid only for symmetric KMS keys.
1434
1759
  #
1435
- # To create a KMS key in an KMS [custom key store][2] and create its key
1760
+ # To [create a KMS key in an CloudHSM key store][3] and create its key
1436
1761
  # material in the associated CloudHSM cluster, set this value to
1437
1762
  # `AWS_CLOUDHSM`. You must also use the `CustomKeyStoreId` parameter to
1438
- # identify the custom key store. This value is valid only for symmetric
1439
- # encryption KMS keys.
1763
+ # identify the CloudHSM key store. The `KeySpec` value must be
1764
+ # `SYMMETRIC_DEFAULT`.
1440
1765
  #
1766
+ # To [create a KMS key in an external key store][4], set this value to
1767
+ # `EXTERNAL_KEY_STORE`. You must also use the `CustomKeyStoreId`
1768
+ # parameter to identify the external key store and the `XksKeyId`
1769
+ # parameter to identify the associated external key. The `KeySpec` value
1770
+ # must be `SYMMETRIC_DEFAULT`.
1441
1771
  #
1442
1772
  #
1443
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1444
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1773
+ #
1774
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html
1775
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1776
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/create-cmk-keystore.html
1777
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keys.html
1445
1778
  #
1446
1779
  # @option params [String] :custom_key_store_id
1447
- # Creates the KMS key in the specified [custom key store][1] and the key
1448
- # material in its associated CloudHSM cluster. To create a KMS key in a
1449
- # custom key store, you must also specify the `Origin` parameter with a
1450
- # value of `AWS_CLOUDHSM`. The CloudHSM cluster that is associated with
1451
- # the custom key store must have at least two active HSMs, each in a
1452
- # different Availability Zone in the Region.
1780
+ # Creates the KMS key in the specified [custom key store][1]. The
1781
+ # `ConnectionState` of the custom key store must be `CONNECTED`. To find
1782
+ # the CustomKeyStoreID and ConnectionState use the
1783
+ # DescribeCustomKeyStores operation.
1453
1784
  #
1454
1785
  # This parameter is valid only for symmetric encryption KMS keys in a
1455
1786
  # single Region. You cannot create any other type of KMS key in a custom
1456
1787
  # key store.
1457
1788
  #
1458
- # To find the ID of a custom key store, use the DescribeCustomKeyStores
1459
- # operation.
1460
- #
1461
- # The response includes the custom key store ID and the ID of the
1462
- # CloudHSM cluster.
1463
- #
1464
- # This operation is part of the [custom key store feature][1] feature in
1465
- # KMS, which combines the convenience and extensive integration of KMS
1466
- # with the isolation and control of a single-tenant key store.
1789
+ # When you create a KMS key in an CloudHSM key store, KMS generates a
1790
+ # non-exportable 256-bit symmetric key in its associated CloudHSM
1791
+ # cluster and associates it with the KMS key. When you create a KMS key
1792
+ # in an external key store, you must use the `XksKeyId` parameter to
1793
+ # specify an external key that serves as key material for the KMS key.
1467
1794
  #
1468
1795
  #
1469
1796
  #
@@ -1496,7 +1823,7 @@ module Aws::KMS
1496
1823
  # TagResource operation.
1497
1824
  #
1498
1825
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
1499
- # key. For details, see [ABAC in KMS][1] in the *Key Management Service
1826
+ # key. For details, see [ABAC for KMS][1] in the *Key Management Service
1500
1827
  # Developer Guide*.
1501
1828
  #
1502
1829
  # </note>
@@ -1543,15 +1870,50 @@ module Aws::KMS
1543
1870
  # This value creates a *primary key*, not a replica. To create a
1544
1871
  # *replica key*, use the ReplicateKey operation.
1545
1872
  #
1546
- # You can create a multi-Region version of a symmetric encryption KMS
1547
- # key, an HMAC KMS key, an asymmetric KMS key, or a KMS key with
1548
- # imported key material. However, you cannot create a multi-Region key
1549
- # in a custom key store.
1873
+ # You can create a symmetric or asymmetric multi-Region key, and you can
1874
+ # create a multi-Region key with imported key material. However, you
1875
+ # cannot create a multi-Region key in a custom key store.
1550
1876
  #
1551
1877
  #
1552
1878
  #
1553
1879
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
1554
1880
  #
1881
+ # @option params [String] :xks_key_id
1882
+ # Identifies the [external key][1] that serves as key material for the
1883
+ # KMS key in an [external key store][2]. Specify the ID that the
1884
+ # [external key store proxy][3] uses to refer to the external key. For
1885
+ # help, see the documentation for your external key store proxy.
1886
+ #
1887
+ # This parameter is required for a KMS key with an `Origin` value of
1888
+ # `EXTERNAL_KEY_STORE`. It is not valid for KMS keys with any other
1889
+ # `Origin` value.
1890
+ #
1891
+ # The external key must be an existing 256-bit AES symmetric encryption
1892
+ # key hosted outside of Amazon Web Services in an external key manager
1893
+ # associated with the external key store specified by the
1894
+ # `CustomKeyStoreId` parameter. This key must be enabled and configured
1895
+ # to perform encryption and decryption. Each KMS key in an external key
1896
+ # store must use a different external key. For details, see
1897
+ # [Requirements for a KMS key in an external key store][4] in the *Key
1898
+ # Management Service Developer Guide*.
1899
+ #
1900
+ # Each KMS key in an external key store is associated two backing keys.
1901
+ # One is key material that KMS generates. The other is the external key
1902
+ # specified by this parameter. When you use the KMS key in an external
1903
+ # key store to encrypt data, the encryption operation is performed first
1904
+ # by KMS using the KMS key material, and then by the external key
1905
+ # manager using the specified external key, a process known as *double
1906
+ # encryption*. For details, see [Double encryption][5] in the *Key
1907
+ # Management Service Developer Guide*.
1908
+ #
1909
+ #
1910
+ #
1911
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
1912
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
1913
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-xks-proxy
1914
+ # [4]: https://docs.aws.amazon.com/create-xks-keys.html#xks-key-requirements
1915
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-double-encryption
1916
+ #
1555
1917
  # @return [Types::CreateKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1556
1918
  #
1557
1919
  # * {Types::CreateKeyResponse#key_metadata #key_metadata} => Types::KeyMetadata
@@ -1653,6 +2015,38 @@ module Aws::KMS
1653
2015
  # }, # Detailed information about the KMS key that this operation creates.
1654
2016
  # }
1655
2017
  #
2018
+ # @example Example: To create an HMAC KMS key
2019
+ #
2020
+ # # This example creates a 384-bit symmetric HMAC KMS key. The GENERATE_VERIFY_MAC key usage value is required even though
2021
+ # # it's the only valid value for HMAC KMS keys. The key spec and key usage can't be changed after the key is created.
2022
+ #
2023
+ # resp = client.create_key({
2024
+ # key_spec: "HMAC_384", # Describes the type of key material in the KMS key.
2025
+ # key_usage: "GENERATE_VERIFY_MAC", # The cryptographic operations for which you can use the KMS key.
2026
+ # })
2027
+ #
2028
+ # resp.to_h outputs the following:
2029
+ # {
2030
+ # key_metadata: {
2031
+ # aws_account_id: "111122223333",
2032
+ # arn: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
2033
+ # creation_date: Time.parse("2022-04-05T14:04:55-07:00"),
2034
+ # customer_master_key_spec: "HMAC_384",
2035
+ # description: "",
2036
+ # enabled: true,
2037
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
2038
+ # key_manager: "CUSTOMER",
2039
+ # key_spec: "HMAC_384",
2040
+ # key_state: "Enabled",
2041
+ # key_usage: "GENERATE_VERIFY_MAC",
2042
+ # mac_algorithms: [
2043
+ # "HMAC_SHA_384",
2044
+ # ],
2045
+ # multi_region: false,
2046
+ # origin: "AWS_KMS",
2047
+ # }, # Detailed information about the KMS key that this operation creates.
2048
+ # }
2049
+ #
1656
2050
  # @example Example: To create a multi-Region primary KMS key
1657
2051
  #
1658
2052
  # # This example creates a multi-Region primary symmetric encryption key. Because the default values for all parameters
@@ -1696,7 +2090,7 @@ module Aws::KMS
1696
2090
  # @example Example: To create a KMS key for imported key material
1697
2091
  #
1698
2092
  # # This example creates a KMS key with no key material. When the operation is complete, you can import your own key
1699
- # # material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
2093
+ # # material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
1700
2094
  #
1701
2095
  # resp = client.create_key({
1702
2096
  # origin: "EXTERNAL", # The source of the key material for the KMS key.
@@ -1724,11 +2118,11 @@ module Aws::KMS
1724
2118
  # }, # Detailed information about the KMS key that this operation creates.
1725
2119
  # }
1726
2120
  #
1727
- # @example Example: To create a KMS key in a custom key store
2121
+ # @example Example: To create a KMS key in an AWS CloudHSM key store
1728
2122
  #
1729
- # # This example creates a KMS key in the specified custom key store. The operation creates the KMS key and its metadata in
1730
- # # AWS KMS and the key material in the AWS CloudHSM cluster associated with the custom key store. This example requires the
1731
- # # Origin and CustomKeyStoreId parameters.
2123
+ # # This example creates a KMS key in the specified AWS CloudHSM key store. The operation creates the KMS key and its
2124
+ # # metadata in AWS KMS and creates the key material in the AWS CloudHSM cluster associated with the custom key store. This
2125
+ # # example requires the CustomKeyStoreId and Origin parameters.
1732
2126
  #
1733
2127
  # resp = client.create_key({
1734
2128
  # custom_key_store_id: "cks-1234567890abcdef0", # Identifies the custom key store that hosts the KMS key.
@@ -1759,35 +2153,41 @@ module Aws::KMS
1759
2153
  # }, # Detailed information about the KMS key that this operation creates.
1760
2154
  # }
1761
2155
  #
1762
- # @example Example: To create an HMAC KMS key
2156
+ # @example Example: To create a KMS key in an external key store
1763
2157
  #
1764
- # # This example creates a 384-bit symmetric HMAC KMS key. The GENERATE_VERIFY_MAC key usage value is required even though
1765
- # # it's the only valid value for HMAC KMS keys. The key spec and key usage can't be changed after the key is created.
2158
+ # # This example creates a KMS key in the specified external key store. It uses the XksKeyId parameter to associate the KMS
2159
+ # # key with an existing symmetric encryption key in your external key manager. This CustomKeyStoreId, Origin, and XksKeyId
2160
+ # # parameters are required in this operation.
1766
2161
  #
1767
2162
  # resp = client.create_key({
1768
- # key_spec: "HMAC_384", # Describes the type of key material in the KMS key.
1769
- # key_usage: "GENERATE_VERIFY_MAC", # The cryptographic operations for which you can use the KMS key.
2163
+ # custom_key_store_id: "cks-9876543210fedcba9", # Identifies the custom key store that hosts the KMS key.
2164
+ # origin: "EXTERNAL_KEY_STORE", # Indicates the source of the key material for the KMS key.
2165
+ # xks_key_id: "bb8562717f809024", # Identifies the encryption key in your external key manager that is associated with the KMS key
1770
2166
  # })
1771
2167
  #
1772
2168
  # resp.to_h outputs the following:
1773
2169
  # {
1774
2170
  # key_metadata: {
1775
2171
  # aws_account_id: "111122223333",
1776
- # arn: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
1777
- # creation_date: Time.parse("2022-04-05T14:04:55-07:00"),
1778
- # customer_master_key_spec: "HMAC_384",
2172
+ # arn: "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
2173
+ # creation_date: Time.parse("2022-02-02T07:48:55-07:00"),
2174
+ # custom_key_store_id: "cks-9876543210fedcba9",
2175
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
1779
2176
  # description: "",
1780
2177
  # enabled: true,
1781
- # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
2178
+ # encryption_algorithms: [
2179
+ # "SYMMETRIC_DEFAULT",
2180
+ # ],
2181
+ # key_id: "0987dcba-09fe-87dc-65ba-ab0987654321",
1782
2182
  # key_manager: "CUSTOMER",
1783
- # key_spec: "HMAC_384",
2183
+ # key_spec: "SYMMETRIC_DEFAULT",
1784
2184
  # key_state: "Enabled",
1785
- # key_usage: "GENERATE_VERIFY_MAC",
1786
- # mac_algorithms: [
1787
- # "HMAC_SHA_384",
1788
- # ],
2185
+ # key_usage: "ENCRYPT_DECRYPT",
1789
2186
  # multi_region: false,
1790
- # origin: "AWS_KMS",
2187
+ # origin: "EXTERNAL_KEY_STORE",
2188
+ # xks_key_configuration: {
2189
+ # id: "bb8562717f809024",
2190
+ # },
1791
2191
  # }, # Detailed information about the KMS key that this operation creates.
1792
2192
  # }
1793
2193
  #
@@ -1799,7 +2199,7 @@ module Aws::KMS
1799
2199
  # key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC
1800
2200
  # customer_master_key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT, HMAC_224, HMAC_256, HMAC_384, HMAC_512, SM2
1801
2201
  # key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT, HMAC_224, HMAC_256, HMAC_384, HMAC_512, SM2
1802
- # origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM
2202
+ # origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM, EXTERNAL_KEY_STORE
1803
2203
  # custom_key_store_id: "CustomKeyStoreIdType",
1804
2204
  # bypass_policy_lockout_safety_check: false,
1805
2205
  # tags: [
@@ -1809,6 +2209,7 @@ module Aws::KMS
1809
2209
  # },
1810
2210
  # ],
1811
2211
  # multi_region: false,
2212
+ # xks_key_id: "XksKeyIdType",
1812
2213
  # })
1813
2214
  #
1814
2215
  # @example Response structure
@@ -1823,7 +2224,7 @@ module Aws::KMS
1823
2224
  # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
1824
2225
  # resp.key_metadata.deletion_date #=> Time
1825
2226
  # resp.key_metadata.valid_to #=> Time
1826
- # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
2227
+ # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
1827
2228
  # resp.key_metadata.custom_key_store_id #=> String
1828
2229
  # resp.key_metadata.cloud_hsm_cluster_id #=> String
1829
2230
  # resp.key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
@@ -1844,6 +2245,7 @@ module Aws::KMS
1844
2245
  # resp.key_metadata.pending_deletion_window_in_days #=> Integer
1845
2246
  # resp.key_metadata.mac_algorithms #=> Array
1846
2247
  # resp.key_metadata.mac_algorithms[0] #=> String, one of "HMAC_SHA_224", "HMAC_SHA_256", "HMAC_SHA_384", "HMAC_SHA_512"
2248
+ # resp.key_metadata.xks_key_configuration.id #=> String
1847
2249
  #
1848
2250
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey AWS API Documentation
1849
2251
  #
@@ -1876,10 +2278,10 @@ module Aws::KMS
1876
2278
  #
1877
2279
  # The `Decrypt` operation also decrypts ciphertext that was encrypted
1878
2280
  # outside of KMS by the public key in an KMS asymmetric KMS key.
1879
- # However, it cannot decrypt ciphertext produced by other libraries,
1880
- # such as the [Amazon Web Services Encryption SDK][2] or [Amazon S3
1881
- # client-side encryption][3]. These libraries return a ciphertext format
1882
- # that is incompatible with KMS.
2281
+ # However, it cannot decrypt symmetric ciphertext produced by other
2282
+ # libraries, such as the [Amazon Web Services Encryption SDK][2] or
2283
+ # [Amazon S3 client-side encryption][3]. These libraries return a
2284
+ # ciphertext format that is incompatible with KMS.
1883
2285
  #
1884
2286
  # If the ciphertext was encrypted under a symmetric encryption KMS key,
1885
2287
  # the `KeyId` parameter is optional. KMS can get this information from
@@ -2075,7 +2477,7 @@ module Aws::KMS
2075
2477
  # Deletes the specified alias.
2076
2478
  #
2077
2479
  # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
2078
- # the KMS key. For details, see [ABAC in KMS][1] in the *Key Management
2480
+ # the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
2079
2481
  # Service Developer Guide*.
2080
2482
  #
2081
2483
  # </note>
@@ -2146,37 +2548,44 @@ module Aws::KMS
2146
2548
  req.send_request(options)
2147
2549
  end
2148
2550
 
2149
- # Deletes a [custom key store][1]. This operation does not delete the
2150
- # CloudHSM cluster that is associated with the custom key store, or
2151
- # affect any users or keys in the cluster.
2551
+ # Deletes a [custom key store][1]. This operation does not affect any
2552
+ # backing elements of the custom key store. It does not delete the
2553
+ # CloudHSM cluster that is associated with an CloudHSM key store, or
2554
+ # affect any users or keys in the cluster. For an external key store, it
2555
+ # does not affect the external key store proxy, external key manager, or
2556
+ # any external keys.
2557
+ #
2558
+ # This operation is part of the [custom key stores][1] feature in KMS,
2559
+ # which combines the convenience and extensive integration of KMS with
2560
+ # the isolation and control of a key store that you own and manage.
2152
2561
  #
2153
2562
  # The custom key store that you delete cannot contain any [KMS keys][2].
2154
2563
  # Before deleting the key store, verify that you will never need to use
2155
2564
  # any of the KMS keys in the key store for any [cryptographic
2156
2565
  # operations][3]. Then, use ScheduleKeyDeletion to delete the KMS keys
2157
- # from the key store. When the scheduled waiting period expires, the
2158
- # `ScheduleKeyDeletion` operation deletes the KMS keys. Then it makes a
2159
- # best effort to delete the key material from the associated cluster.
2160
- # However, you might need to manually [delete the orphaned key
2161
- # material][4] from the cluster and its backups.
2162
- #
2163
- # After all KMS keys are deleted from KMS, use DisconnectCustomKeyStore
2164
- # to disconnect the key store from KMS. Then, you can delete the custom
2165
- # key store.
2166
- #
2167
- # Instead of deleting the custom key store, consider using
2168
- # DisconnectCustomKeyStore to disconnect it from KMS. While the key
2169
- # store is disconnected, you cannot create or use the KMS keys in the
2170
- # key store. But, you do not need to delete KMS keys and you can
2171
- # reconnect a disconnected custom key store at any time.
2566
+ # from the key store. After the required waiting period expires and all
2567
+ # KMS keys are deleted from the custom key store, use
2568
+ # DisconnectCustomKeyStore to disconnect the key store from KMS. Then,
2569
+ # you can delete the custom key store.
2570
+ #
2571
+ # For keys in an CloudHSM key store, the `ScheduleKeyDeletion` operation
2572
+ # makes a best effort to delete the key material from the associated
2573
+ # cluster. However, you might need to manually [delete the orphaned key
2574
+ # material][4] from the cluster and its backups. KMS never creates,
2575
+ # manages, or deletes cryptographic keys in the external key manager
2576
+ # associated with an external key store. You must manage them using your
2577
+ # external key manager tools.
2578
+ #
2579
+ # Instead of deleting the custom key store, consider using the
2580
+ # DisconnectCustomKeyStore operation to disconnect the custom key store
2581
+ # from its backing key store. While the key store is disconnected, you
2582
+ # cannot create or use the KMS keys in the key store. But, you do not
2583
+ # need to delete KMS keys and you can reconnect a disconnected custom
2584
+ # key store at any time.
2172
2585
  #
2173
2586
  # If the operation succeeds, it returns a JSON object with no
2174
2587
  # properties.
2175
2588
  #
2176
- # This operation is part of the [custom key store feature][1] feature in
2177
- # KMS, which combines the convenience and extensive integration of KMS
2178
- # with the isolation and control of a single-tenant key store.
2179
- #
2180
2589
  # **Cross-account use**\: No. You cannot perform this operation on a
2181
2590
  # custom key store in a different Amazon Web Services account.
2182
2591
  #
@@ -2211,9 +2620,9 @@ module Aws::KMS
2211
2620
  #
2212
2621
  # @example Example: To delete a custom key store from AWS KMS
2213
2622
  #
2214
- # # This example deletes a custom key store from AWS KMS. This operation does not delete the AWS CloudHSM cluster that was
2215
- # # associated with the CloudHSM cluster. This operation doesn't return any data. To verify that the operation was
2216
- # # successful, use the DescribeCustomKeyStores operation.
2623
+ # # This example deletes a custom key store from AWS KMS. This operation does not affect the backing key store, such as a
2624
+ # # CloudHSM cluster, external key store proxy, or your external key manager. This operation doesn't return any data. To
2625
+ # # verify that the operation was successful, use the DescribeCustomKeyStores operation.
2217
2626
  #
2218
2627
  # resp = client.delete_custom_key_store({
2219
2628
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store to be deleted.
@@ -2317,9 +2726,9 @@ module Aws::KMS
2317
2726
  # Gets information about [custom key stores][1] in the account and
2318
2727
  # Region.
2319
2728
  #
2320
- # This operation is part of the [custom key store feature][1] feature in
2321
- # KMS, which combines the convenience and extensive integration of KMS
2322
- # with the isolation and control of a single-tenant key store.
2729
+ # This operation is part of the [custom key stores][1] feature in KMS,
2730
+ # which combines the convenience and extensive integration of KMS with
2731
+ # the isolation and control of a key store that you own and manage.
2323
2732
  #
2324
2733
  # By default, this operation returns information about all custom key
2325
2734
  # stores in the account and Region. To get only information about a
@@ -2327,27 +2736,32 @@ module Aws::KMS
2327
2736
  # `CustomKeyStoreId` parameter (but not both).
2328
2737
  #
2329
2738
  # To determine whether the custom key store is connected to its CloudHSM
2330
- # cluster, use the `ConnectionState` element in the response. If an
2331
- # attempt to connect the custom key store failed, the `ConnectionState`
2332
- # value is `FAILED` and the `ConnectionErrorCode` element in the
2333
- # response indicates the cause of the failure. For help interpreting the
2334
- # `ConnectionErrorCode`, see CustomKeyStoresListEntry.
2739
+ # cluster or external key store proxy, use the `ConnectionState` element
2740
+ # in the response. If an attempt to connect the custom key store failed,
2741
+ # the `ConnectionState` value is `FAILED` and the `ConnectionErrorCode`
2742
+ # element in the response indicates the cause of the failure. For help
2743
+ # interpreting the `ConnectionErrorCode`, see CustomKeyStoresListEntry.
2335
2744
  #
2336
2745
  # Custom key stores have a `DISCONNECTED` connection state if the key
2337
- # store has never been connected or you use the DisconnectCustomKeyStore
2338
- # operation to disconnect it. If your custom key store state is
2339
- # `CONNECTED` but you are having trouble using it, make sure that its
2340
- # associated CloudHSM cluster is active and contains the minimum number
2341
- # of HSMs required for the operation, if any.
2342
- #
2343
- # For help repairing your custom key store, see the [Troubleshooting
2344
- # Custom Key Stores][2] topic in the *Key Management Service Developer
2345
- # Guide*.
2746
+ # store has never been connected or you used the
2747
+ # DisconnectCustomKeyStore operation to disconnect it. Otherwise, the
2748
+ # connection state is CONNECTED. If your custom key store connection
2749
+ # state is `CONNECTED` but you are having trouble using it, verify that
2750
+ # the backing store is active and available. For an CloudHSM key store,
2751
+ # verify that the associated CloudHSM cluster is active and contains the
2752
+ # minimum number of HSMs required for the operation, if any. For an
2753
+ # external key store, verify that the external key store proxy and its
2754
+ # associated external key manager are reachable and enabled.
2755
+ #
2756
+ # For help repairing your CloudHSM key store, see the [Troubleshooting
2757
+ # CloudHSM key stores][2]. For help repairing your external key store,
2758
+ # see the [Troubleshooting external key stores][3]. Both topics are in
2759
+ # the *Key Management Service Developer Guide*.
2346
2760
  #
2347
2761
  # **Cross-account use**\: No. You cannot perform this operation on a
2348
2762
  # custom key store in a different Amazon Web Services account.
2349
2763
  #
2350
- # **Required permissions**\: [kms:DescribeCustomKeyStores][3] (IAM
2764
+ # **Required permissions**\: [kms:DescribeCustomKeyStores][4] (IAM
2351
2765
  # policy)
2352
2766
  #
2353
2767
  # **Related operations:**
@@ -2366,7 +2780,8 @@ module Aws::KMS
2366
2780
  #
2367
2781
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2368
2782
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
2369
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2783
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
2784
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2370
2785
  #
2371
2786
  # @option params [String] :custom_key_store_id
2372
2787
  # Gets only information about the specified custom key store. Enter the
@@ -2374,7 +2789,7 @@ module Aws::KMS
2374
2789
  #
2375
2790
  # By default, this operation gets information about all custom key
2376
2791
  # stores in the account and Region. To limit the output to a particular
2377
- # custom key store, you can use either the `CustomKeyStoreId` or
2792
+ # custom key store, provide either the `CustomKeyStoreId` or
2378
2793
  # `CustomKeyStoreName` parameter, but not both.
2379
2794
  #
2380
2795
  # @option params [String] :custom_key_store_name
@@ -2383,7 +2798,7 @@ module Aws::KMS
2383
2798
  #
2384
2799
  # By default, this operation gets information about all custom key
2385
2800
  # stores in the account and Region. To limit the output to a particular
2386
- # custom key store, you can use either the `CustomKeyStoreId` or
2801
+ # custom key store, provide either the `CustomKeyStoreId` or
2387
2802
  # `CustomKeyStoreName` parameter, but not both.
2388
2803
  #
2389
2804
  # @option params [Integer] :limit
@@ -2419,10 +2834,10 @@ module Aws::KMS
2419
2834
  # ], # Details about each custom key store in the account and Region.
2420
2835
  # }
2421
2836
  #
2422
- # @example Example: To get detailed information about a custom key store associated with a CloudHSM cluster.
2837
+ # @example Example: To get detailed information about an AWS CloudHSM key store by specifying its friendly name
2423
2838
  #
2424
- # # This example gets detailed information about a particular AWS KMS custom key store that is associate with an AWS
2425
- # # CloudHSM cluster. To limit the output to a particular custom key store, provide the custom key store name or ID.
2839
+ # # This example gets detailed information about a particular AWS CloudHSM key store by specifying its friendly name. To
2840
+ # # limit the output to a particular custom key store, provide either the custom key store name or ID.
2426
2841
  #
2427
2842
  # resp = client.describe_custom_key_stores({
2428
2843
  # custom_key_store_name: "ExampleKeyStore", # The friendly name of the custom key store.
@@ -2437,11 +2852,71 @@ module Aws::KMS
2437
2852
  # creation_date: Time.parse("1.499288695918E9"),
2438
2853
  # custom_key_store_id: "cks-1234567890abcdef0",
2439
2854
  # custom_key_store_name: "ExampleKeyStore",
2855
+ # custom_key_store_type: "AWS_CLOUDHSM",
2440
2856
  # trust_anchor_certificate: "<certificate appears here>",
2441
2857
  # },
2442
2858
  # ], # Detailed information about the specified custom key store.
2443
2859
  # }
2444
2860
  #
2861
+ # @example Example: To get detailed information about an external key store by specifying its ID
2862
+ #
2863
+ # # This example gets detailed information about an external key store by specifying its ID. The example external key store
2864
+ # # proxy uses public endpoint connectivity.
2865
+ #
2866
+ # resp = client.describe_custom_key_stores({
2867
+ # custom_key_store_id: "cks-9876543210fedcba9", # The ID of the custom key store.
2868
+ # })
2869
+ #
2870
+ # resp.to_h outputs the following:
2871
+ # {
2872
+ # custom_key_stores: [
2873
+ # {
2874
+ # connection_state: "CONNECTED",
2875
+ # creation_date: Time.parse("1.599288695918E9"),
2876
+ # custom_key_store_id: "cks-9876543210fedcba9",
2877
+ # custom_key_store_name: "ExampleExternalKeyStore",
2878
+ # custom_key_store_type: "EXTERNAL_KEY_STORE",
2879
+ # xks_proxy_configuration: {
2880
+ # access_key_id: "ABCDE12345670EXAMPLE",
2881
+ # connectivity: "PUBLIC_ENDPOINT",
2882
+ # uri_endpoint: "https://myproxy.xks.example.com",
2883
+ # uri_path: "/kms/xks/v1",
2884
+ # },
2885
+ # },
2886
+ # ], # Detailed information about the specified custom key store.
2887
+ # }
2888
+ #
2889
+ # @example Example: To get detailed information about an external key store VPC endpoint connectivity by specifying its friendly name
2890
+ #
2891
+ # # This example gets detailed information about a particular external key store by specifying its friendly name. To limit
2892
+ # # the output to a particular custom key store, provide either the custom key store name or ID. The proxy URI path for this
2893
+ # # external key store includes an optional prefix. Also, because this example external key store uses VPC endpoint
2894
+ # # connectivity, the response includes the associated VPC endpoint service name.
2895
+ #
2896
+ # resp = client.describe_custom_key_stores({
2897
+ # custom_key_store_name: "VPCExternalKeystore",
2898
+ # })
2899
+ #
2900
+ # resp.to_h outputs the following:
2901
+ # {
2902
+ # custom_key_stores: [
2903
+ # {
2904
+ # connection_state: "CONNECTED",
2905
+ # creation_date: Time.parse("1.643057863.842"),
2906
+ # custom_key_store_id: "cks-876543210fedcba98",
2907
+ # custom_key_store_name: "ExampleVPCExternalKeyStore",
2908
+ # custom_key_store_type: "EXTERNAL_KEY_STORE",
2909
+ # xks_proxy_configuration: {
2910
+ # access_key_id: "ABCDE12345670EXAMPLE",
2911
+ # connectivity: "VPC_ENDPOINT_SERVICE",
2912
+ # uri_endpoint: "https://myproxy-private.xks.example.com",
2913
+ # uri_path: "/example-prefix/kms/xks/v1",
2914
+ # vpc_endpoint_service_name: "com.amazonaws.vpce.us-east-1.vpce-svc-example1",
2915
+ # },
2916
+ # },
2917
+ # ], # Detailed information about the specified custom key store.
2918
+ # }
2919
+ #
2445
2920
  # @example Request syntax with placeholder values
2446
2921
  #
2447
2922
  # resp = client.describe_custom_key_stores({
@@ -2459,8 +2934,14 @@ module Aws::KMS
2459
2934
  # resp.custom_key_stores[0].cloud_hsm_cluster_id #=> String
2460
2935
  # resp.custom_key_stores[0].trust_anchor_certificate #=> String
2461
2936
  # resp.custom_key_stores[0].connection_state #=> String, one of "CONNECTED", "CONNECTING", "FAILED", "DISCONNECTED", "DISCONNECTING"
2462
- # resp.custom_key_stores[0].connection_error_code #=> String, one of "INVALID_CREDENTIALS", "CLUSTER_NOT_FOUND", "NETWORK_ERRORS", "INTERNAL_ERROR", "INSUFFICIENT_CLOUDHSM_HSMS", "USER_LOCKED_OUT", "USER_NOT_FOUND", "USER_LOGGED_IN", "SUBNET_NOT_FOUND", "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET"
2937
+ # resp.custom_key_stores[0].connection_error_code #=> String, one of "INVALID_CREDENTIALS", "CLUSTER_NOT_FOUND", "NETWORK_ERRORS", "INTERNAL_ERROR", "INSUFFICIENT_CLOUDHSM_HSMS", "USER_LOCKED_OUT", "USER_NOT_FOUND", "USER_LOGGED_IN", "SUBNET_NOT_FOUND", "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET", "XKS_PROXY_ACCESS_DENIED", "XKS_PROXY_NOT_REACHABLE", "XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND", "XKS_PROXY_INVALID_RESPONSE", "XKS_PROXY_INVALID_CONFIGURATION", "XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION", "XKS_PROXY_TIMED_OUT", "XKS_PROXY_INVALID_TLS_CONFIGURATION"
2463
2938
  # resp.custom_key_stores[0].creation_date #=> Time
2939
+ # resp.custom_key_stores[0].custom_key_store_type #=> String, one of "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
2940
+ # resp.custom_key_stores[0].xks_proxy_configuration.connectivity #=> String, one of "PUBLIC_ENDPOINT", "VPC_ENDPOINT_SERVICE"
2941
+ # resp.custom_key_stores[0].xks_proxy_configuration.access_key_id #=> String
2942
+ # resp.custom_key_stores[0].xks_proxy_configuration.uri_endpoint #=> String
2943
+ # resp.custom_key_stores[0].xks_proxy_configuration.uri_path #=> String
2944
+ # resp.custom_key_stores[0].xks_proxy_configuration.vpc_endpoint_service_name #=> String
2464
2945
  # resp.next_marker #=> String
2465
2946
  # resp.truncated #=> Boolean
2466
2947
  #
@@ -2482,11 +2963,17 @@ module Aws::KMS
2482
2963
  # expiration date (if any) of the key material. It includes fields, like
2483
2964
  # `KeySpec`, that help you distinguish different types of KMS keys. It
2484
2965
  # also displays the key usage (encryption, signing, or generating and
2485
- # verifying MACs) and the algorithms that the KMS key supports. For KMS
2486
- # keys in custom key stores, it includes information about the custom
2487
- # key store, such as the key store ID and the CloudHSM cluster ID. For
2488
- # multi-Region keys, it displays the primary key and all related replica
2489
- # keys.
2966
+ # verifying MACs) and the algorithms that the KMS key supports.
2967
+ #
2968
+ # For [multi-Region
2969
+ # keys](kms/latest/developerguide/multi-region-keys-overview.html),
2970
+ # `DescribeKey` displays the primary key and all related replica keys.
2971
+ # For KMS keys in [CloudHSM key
2972
+ # stores](kms/latest/developerguide/keystore-cloudhsm.html), it includes
2973
+ # information about the key store, such as the key store ID and the
2974
+ # CloudHSM cluster ID. For KMS keys in [external key
2975
+ # stores](kms/latest/developerguide/keystore-external.html), it includes
2976
+ # the custom key store ID and the ID of the external key.
2490
2977
  #
2491
2978
  # `DescribeKey` does not return the following information:
2492
2979
  #
@@ -2705,7 +3192,7 @@ module Aws::KMS
2705
3192
  #
2706
3193
  # @example Example: To get details about an HMAC KMS key
2707
3194
  #
2708
- # # The following example gets the metadata of an HMAC KMS key.
3195
+ # # The following example gets the metadata of an HMAC KMS key.
2709
3196
  #
2710
3197
  # resp = client.describe_key({
2711
3198
  # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # An identifier for the KMS key. You can use the key ID, key ARN, alias name, alias ARN of the KMS key.
@@ -2732,6 +3219,72 @@ module Aws::KMS
2732
3219
  # }, # An object that contains information about the specified KMS key.
2733
3220
  # }
2734
3221
  #
3222
+ # @example Example: To get details about a KMS key in an AWS CloudHSM key store
3223
+ #
3224
+ # # The following example gets the metadata of a KMS key in an AWS CloudHSM key store.
3225
+ #
3226
+ # resp = client.describe_key({
3227
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # An identifier for the KMS key. You can use the key ID, key ARN, alias name, alias ARN of the KMS key.
3228
+ # })
3229
+ #
3230
+ # resp.to_h outputs the following:
3231
+ # {
3232
+ # key_metadata: {
3233
+ # aws_account_id: "123456789012",
3234
+ # arn: "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
3235
+ # cloud_hsm_cluster_id: "cluster-1a23b4cdefg",
3236
+ # creation_date: Time.parse(1646160362.664),
3237
+ # custom_key_store_id: "cks-1234567890abcdef0",
3238
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
3239
+ # description: "CloudHSM key store test key",
3240
+ # enabled: true,
3241
+ # encryption_algorithms: [
3242
+ # "SYMMETRIC_DEFAULT",
3243
+ # ],
3244
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
3245
+ # key_manager: "CUSTOMER",
3246
+ # key_spec: "SYMMETRIC_DEFAULT",
3247
+ # key_state: "Enabled",
3248
+ # key_usage: "ENCRYPT_DECRYPT",
3249
+ # multi_region: false,
3250
+ # origin: "AWS_CLOUDHSM",
3251
+ # }, # An object that contains information about the specified KMS key.
3252
+ # }
3253
+ #
3254
+ # @example Example: To get details about a KMS key in an external key store
3255
+ #
3256
+ # # The following example gets the metadata of a KMS key in an external key store.
3257
+ #
3258
+ # resp = client.describe_key({
3259
+ # key_id: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", # An identifier for the KMS key. You can use the key ID, key ARN, alias name, alias ARN of the KMS key.
3260
+ # })
3261
+ #
3262
+ # resp.to_h outputs the following:
3263
+ # {
3264
+ # key_metadata: {
3265
+ # aws_account_id: "123456789012",
3266
+ # arn: "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
3267
+ # creation_date: Time.parse(1646160362.664),
3268
+ # custom_key_store_id: "cks-1234567890abcdef0",
3269
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
3270
+ # description: "External key store test key",
3271
+ # enabled: true,
3272
+ # encryption_algorithms: [
3273
+ # "SYMMETRIC_DEFAULT",
3274
+ # ],
3275
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
3276
+ # key_manager: "CUSTOMER",
3277
+ # key_spec: "SYMMETRIC_DEFAULT",
3278
+ # key_state: "Enabled",
3279
+ # key_usage: "ENCRYPT_DECRYPT",
3280
+ # multi_region: false,
3281
+ # origin: "EXTERNAL_KEY_STORE",
3282
+ # xks_key_configuration: {
3283
+ # id: "bb8562717f809024",
3284
+ # },
3285
+ # }, # An object that contains information about the specified KMS key.
3286
+ # }
3287
+ #
2735
3288
  # @example Request syntax with placeholder values
2736
3289
  #
2737
3290
  # resp = client.describe_key({
@@ -2751,7 +3304,7 @@ module Aws::KMS
2751
3304
  # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
2752
3305
  # resp.key_metadata.deletion_date #=> Time
2753
3306
  # resp.key_metadata.valid_to #=> Time
2754
- # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
3307
+ # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
2755
3308
  # resp.key_metadata.custom_key_store_id #=> String
2756
3309
  # resp.key_metadata.cloud_hsm_cluster_id #=> String
2757
3310
  # resp.key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
@@ -2772,6 +3325,7 @@ module Aws::KMS
2772
3325
  # resp.key_metadata.pending_deletion_window_in_days #=> Integer
2773
3326
  # resp.key_metadata.mac_algorithms #=> Array
2774
3327
  # resp.key_metadata.mac_algorithms[0] #=> String, one of "HMAC_SHA_224", "HMAC_SHA_256", "HMAC_SHA_384", "HMAC_SHA_512"
3328
+ # resp.key_metadata.xks_key_configuration.id #=> String
2775
3329
  #
2776
3330
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey AWS API Documentation
2777
3331
  #
@@ -2851,12 +3405,11 @@ module Aws::KMS
2851
3405
  # symmetric encryption KMS key.
2852
3406
  #
2853
3407
  # Automatic key rotation is supported only on symmetric encryption KMS
2854
- # keys. You cannot enable or disable automatic rotation of [asymmetric
2855
- # KMS keys][2], [HMAC KMS keys][3], KMS keys with [imported key
2856
- # material][4], or KMS keys in a [custom key store][5]. The key rotation
2857
- # status of these KMS keys is always `false`. To enable or disable
2858
- # automatic rotation of a set of related [multi-Region keys][6], set the
2859
- # property on the primary key.
3408
+ # keys. You cannot enable automatic rotation of [asymmetric KMS
3409
+ # keys][2], [HMAC KMS keys][3], KMS keys with [imported key
3410
+ # material][4], or KMS keys in a [custom key store][5]. To enable or
3411
+ # disable automatic rotation of a set of related [multi-Region keys][6],
3412
+ # set the property on the primary key.
2860
3413
  #
2861
3414
  # You can enable (EnableKeyRotation) and disable automatic rotation of
2862
3415
  # the key material in [customer managed KMS keys][7]. Key material
@@ -2950,11 +3503,19 @@ module Aws::KMS
2950
3503
  req.send_request(options)
2951
3504
  end
2952
3505
 
2953
- # Disconnects the [custom key store][1] from its associated CloudHSM
2954
- # cluster. While a custom key store is disconnected, you can manage the
2955
- # custom key store and its KMS keys, but you cannot create or use KMS
2956
- # keys in the custom key store. You can reconnect the custom key store
2957
- # at any time.
3506
+ # Disconnects the [custom key store][1] from its backing key store. This
3507
+ # operation disconnects an CloudHSM key store from its associated
3508
+ # CloudHSM cluster or disconnects an external key store from the
3509
+ # external key store proxy that communicates with your external key
3510
+ # manager.
3511
+ #
3512
+ # This operation is part of the [custom key stores][1] feature in KMS,
3513
+ # which combines the convenience and extensive integration of KMS with
3514
+ # the isolation and control of a key store that you own and manage.
3515
+ #
3516
+ # While a custom key store is disconnected, you can manage the custom
3517
+ # key store and its KMS keys, but you cannot create or use its KMS keys.
3518
+ # You can reconnect the custom key store at any time.
2958
3519
  #
2959
3520
  # <note markdown="1"> While a custom key store is disconnected, all attempts to create KMS
2960
3521
  # keys in the custom key store or to use existing KMS keys in
@@ -2963,19 +3524,14 @@ module Aws::KMS
2963
3524
  #
2964
3525
  # </note>
2965
3526
  #
2966
- #
2967
- #
2968
- # To find the connection state of a custom key store, use the
2969
- # DescribeCustomKeyStores operation. To reconnect a custom key store,
2970
- # use the ConnectCustomKeyStore operation.
3527
+ # When you disconnect a custom key store, its `ConnectionState` changes
3528
+ # to `Disconnected`. To find the connection state of a custom key store,
3529
+ # use the DescribeCustomKeyStores operation. To reconnect a custom key
3530
+ # store, use the ConnectCustomKeyStore operation.
2971
3531
  #
2972
3532
  # If the operation succeeds, it returns a JSON object with no
2973
3533
  # properties.
2974
3534
  #
2975
- # This operation is part of the [custom key store feature][1] feature in
2976
- # KMS, which combines the convenience and extensive integration of KMS
2977
- # with the isolation and control of a single-tenant key store.
2978
- #
2979
3535
  # **Cross-account use**\: No. You cannot perform this operation on a
2980
3536
  # custom key store in a different Amazon Web Services account.
2981
3537
  #
@@ -3010,8 +3566,10 @@ module Aws::KMS
3010
3566
  #
3011
3567
  # @example Example: To disconnect a custom key store from its CloudHSM cluster
3012
3568
  #
3013
- # # This example disconnects an AWS KMS custom key store from its AWS CloudHSM cluster. This operation doesn't return any
3014
- # # data. To verify that the custom key store is disconnected, use the <code>DescribeCustomKeyStores</code> operation.
3569
+ # # This example disconnects an AWS KMS custom key store from its backing key store. For an AWS CloudHSM key store, it
3570
+ # # disconnects the key store from its AWS CloudHSM cluster. For an external key store, it disconnects the key store from
3571
+ # # the external key store proxy that communicates with your external key manager. This operation doesn't return any data.
3572
+ # # To verify that the custom key store is disconnected, use the <code>DescribeCustomKeyStores</code> operation.
3015
3573
  #
3016
3574
  # resp = client.disconnect_custom_key_store({
3017
3575
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store.
@@ -3108,10 +3666,9 @@ module Aws::KMS
3108
3666
  # customer managed KMS key, use the DisableKeyRotation operation.
3109
3667
  #
3110
3668
  # Automatic key rotation is supported only on [symmetric encryption KMS
3111
- # keys][3]. You cannot enable or disable automatic rotation of
3112
- # [asymmetric KMS keys][4], [HMAC KMS keys][5], KMS keys with [imported
3113
- # key material][6], or KMS keys in a [custom key store][7]. The key
3114
- # rotation status of these KMS keys is always `false`. To enable or
3669
+ # keys][3]. You cannot enable automatic rotation of [asymmetric KMS
3670
+ # keys][4], [HMAC KMS keys][5], KMS keys with [imported key
3671
+ # material][6], or KMS keys in a [custom key store][7]. To enable or
3115
3672
  # disable automatic rotation of a set of related [multi-Region keys][8],
3116
3673
  # set the property on the primary key.
3117
3674
  #
@@ -3163,12 +3720,11 @@ module Aws::KMS
3163
3720
  # [12]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3164
3721
  #
3165
3722
  # @option params [required, String] :key_id
3166
- # Identifies a symmetric encryption KMS key. You cannot enable or
3167
- # disable automatic rotation of [asymmetric KMS keys][1], [HMAC KMS
3168
- # keys][2], KMS keys with [imported key material][3], or KMS keys in a
3169
- # [custom key store][4]. The key rotation status of these KMS keys is
3170
- # always `false`. To enable or disable automatic rotation of a set of
3171
- # related [multi-Region keys][5], set the property on the primary key.
3723
+ # Identifies a symmetric encryption KMS key. You cannot enable automatic
3724
+ # rotation of [asymmetric KMS keys][1], [HMAC KMS keys][2], KMS keys
3725
+ # with [imported key material][3], or KMS keys in a [custom key
3726
+ # store][4]. To enable or disable automatic rotation of a set of related
3727
+ # [multi-Region keys][5], set the property on the primary key.
3172
3728
  #
3173
3729
  # Specify the key ID or key ARN of the KMS key.
3174
3730
  #
@@ -3377,6 +3933,8 @@ module Aws::KMS
3377
3933
  # encryption KMS keys. If you are using an asymmetric KMS key, we
3378
3934
  # recommend RSAES\_OAEP\_SHA\_256.
3379
3935
  #
3936
+ # The SM2PKE algorithm is only available in China Regions.
3937
+ #
3380
3938
  # @return [Types::EncryptResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3381
3939
  #
3382
3940
  # * {Types::EncryptResponse#ciphertext_blob #ciphertext_blob} => String
@@ -3784,8 +4342,7 @@ module Aws::KMS
3784
4342
  # to encrypt and decrypt or to sign and verify (but not both), and the
3785
4343
  # rule that permits you to use ECC KMS keys only to sign and verify, are
3786
4344
  # not effective on data key pairs, which are used outside of KMS. The
3787
- # SM2 key spec is only available in China Regions. RSA and ECC
3788
- # asymmetric key pairs are also available in China Regions.
4345
+ # SM2 key spec is only available in China Regions.
3789
4346
  #
3790
4347
  # @option params [Array<String>] :grant_tokens
3791
4348
  # A list of grant tokens.
@@ -3976,8 +4533,7 @@ module Aws::KMS
3976
4533
  # to encrypt and decrypt or to sign and verify (but not both), and the
3977
4534
  # rule that permits you to use ECC KMS keys only to sign and verify, are
3978
4535
  # not effective on data key pairs, which are used outside of KMS. The
3979
- # SM2 key spec is only available in China Regions. RSA and ECC
3980
- # asymmetric key pairs are also available in China Regions.
4536
+ # SM2 key spec is only available in China Regions.
3981
4537
  #
3982
4538
  # @option params [Array<String>] :grant_tokens
3983
4539
  # A list of grant tokens.
@@ -4076,6 +4632,15 @@ module Aws::KMS
4076
4632
  # KMS key or a key in a custom key store to generate a data key. To get
4077
4633
  # the type of your KMS key, use the DescribeKey operation.
4078
4634
  #
4635
+ # You must also specify the length of the data key. Use either the
4636
+ # `KeySpec` or `NumberOfBytes` parameters (but not both). For 128-bit
4637
+ # and 256-bit data keys, use the `KeySpec` parameter.
4638
+ #
4639
+ # To generate an SM4 data key (China Regions only), specify a `KeySpec`
4640
+ # value of `AES_128` or `NumberOfBytes` value of `128`. The symmetric
4641
+ # encryption key used in China Regions to encrypt your data key is an
4642
+ # SM4 encryption key.
4643
+ #
4079
4644
  # If the operation succeeds, you will find the encrypted copy of the
4080
4645
  # data key in the `CiphertextBlob` field.
4081
4646
  #
@@ -4233,16 +4798,17 @@ module Aws::KMS
4233
4798
 
4234
4799
  # Generates a hash-based message authentication code (HMAC) for a
4235
4800
  # message using an HMAC KMS key and a MAC algorithm that the key
4236
- # supports. The MAC algorithm computes the HMAC for the message and the
4237
- # key as described in [RFC 2104][1].
4238
- #
4239
- # You can use the HMAC that this operation generates with the VerifyMac
4240
- # operation to demonstrate that the original message has not changed.
4241
- # Also, because a secret key is used to create the hash, you can verify
4242
- # that the party that generated the hash has the required secret key.
4243
- # This operation is part of KMS support for HMAC KMS keys. For details,
4244
- # see [HMAC keys in KMS][2] in the <i> <i>Key Management Service
4245
- # Developer Guide</i> </i>.
4801
+ # supports. HMAC KMS keys and the HMAC algorithms that KMS uses conform
4802
+ # to industry standards defined in [RFC 2104][1].
4803
+ #
4804
+ # You can use value that GenerateMac returns in the VerifyMac operation
4805
+ # to demonstrate that the original message has not changed. Also,
4806
+ # because a secret key is used to create the hash, you can verify that
4807
+ # the party that generated the hash has the required secret key. You can
4808
+ # also use the raw result to implement HMAC-based algorithms such as key
4809
+ # derivation functions. This operation is part of KMS support for HMAC
4810
+ # KMS keys. For details, see [HMAC keys in KMS][2] in the <i> <i>Key
4811
+ # Management Service Developer Guide</i> </i>.
4246
4812
  #
4247
4813
  # <note markdown="1"> Best practices recommend that you limit the time during which any
4248
4814
  # signing mechanism, including an HMAC, is effective. This deters an
@@ -4366,42 +4932,41 @@ module Aws::KMS
4366
4932
  # the random byte string. There is no default value for string length.
4367
4933
  #
4368
4934
  # By default, the random byte string is generated in KMS. To generate
4369
- # the byte string in the CloudHSM cluster that is associated with a
4370
- # [custom key store][1], specify the custom key store ID.
4935
+ # the byte string in the CloudHSM cluster associated with an CloudHSM
4936
+ # key store, use the `CustomKeyStoreId` parameter.
4371
4937
  #
4372
4938
  # Applications in Amazon Web Services Nitro Enclaves can call this
4373
4939
  # operation by using the [Amazon Web Services Nitro Enclaves Development
4374
- # Kit][2]. For information about the supporting parameters, see [How
4375
- # Amazon Web Services Nitro Enclaves use KMS][3] in the *Key Management
4940
+ # Kit][1]. For information about the supporting parameters, see [How
4941
+ # Amazon Web Services Nitro Enclaves use KMS][2] in the *Key Management
4376
4942
  # Service Developer Guide*.
4377
4943
  #
4378
4944
  # For more information about entropy and random number generation, see
4379
- # [Key Management Service Cryptographic Details][4].
4945
+ # [Key Management Service Cryptographic Details][3].
4380
4946
  #
4381
4947
  # **Cross-account use**\: Not applicable. `GenerateRandom` does not use
4382
4948
  # any account-specific resources, such as KMS keys.
4383
4949
  #
4384
- # **Required permissions**\: [kms:GenerateRandom][5] (IAM policy)
4950
+ # **Required permissions**\: [kms:GenerateRandom][4] (IAM policy)
4385
4951
  #
4386
4952
  #
4387
4953
  #
4388
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
4389
- # [2]: https://github.com/aws/aws-nitro-enclaves-sdk-c
4390
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4391
- # [4]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
4392
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4954
+ # [1]: https://github.com/aws/aws-nitro-enclaves-sdk-c
4955
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4956
+ # [3]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
4957
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4393
4958
  #
4394
4959
  # @option params [Integer] :number_of_bytes
4395
4960
  # The length of the random byte string. This parameter is required.
4396
4961
  #
4397
4962
  # @option params [String] :custom_key_store_id
4398
4963
  # Generates the random byte string in the CloudHSM cluster that is
4399
- # associated with the specified [custom key store][1]. To find the ID of
4400
- # a custom key store, use the DescribeCustomKeyStores operation.
4964
+ # associated with the specified CloudHSM key store. To find the ID of a
4965
+ # custom key store, use the DescribeCustomKeyStores operation.
4401
4966
  #
4402
- #
4403
- #
4404
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
4967
+ # External key store IDs are not valid for this parameter. If you
4968
+ # specify the ID of an external key store, `GenerateRandom` throws an
4969
+ # `UnsupportedOperationException`.
4405
4970
  #
4406
4971
  # @return [Types::GenerateRandomResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4407
4972
  #
@@ -4522,10 +5087,9 @@ module Aws::KMS
4522
5087
  # and Amazon CloudWatch.
4523
5088
  #
4524
5089
  # Automatic key rotation is supported only on [symmetric encryption KMS
4525
- # keys][3]. You cannot enable or disable automatic rotation of
4526
- # [asymmetric KMS keys][4], [HMAC KMS keys][5], KMS keys with [imported
4527
- # key material][6], or KMS keys in a [custom key store][7]. The key
4528
- # rotation status of these KMS keys is always `false`. To enable or
5090
+ # keys][3]. You cannot enable automatic rotation of [asymmetric KMS
5091
+ # keys][4], [HMAC KMS keys][5], KMS keys with [imported key
5092
+ # material][6], or KMS keys in a [custom key store][7]. To enable or
4529
5093
  # disable automatic rotation of a set of related [multi-Region keys][8],
4530
5094
  # set the property on the primary key..
4531
5095
  #
@@ -4649,7 +5213,7 @@ module Aws::KMS
4649
5213
  # token to send with a subsequent ImportKeyMaterial request.
4650
5214
  #
4651
5215
  # You must specify the key ID of the symmetric encryption KMS key into
4652
- # which you will import key material. This KMS key's `Origin` must be
5216
+ # which you will import key material. The KMS key `Origin` must be
4653
5217
  # `EXTERNAL`. You must also specify the wrapping algorithm and type of
4654
5218
  # wrapping key (public key) that you will use to encrypt the key
4655
5219
  # material. You cannot perform this operation on an asymmetric KMS key,
@@ -4781,21 +5345,16 @@ module Aws::KMS
4781
5345
  # also reduce of risk of encrypting data that cannot be decrypted. These
4782
5346
  # features are not effective outside of KMS.
4783
5347
  #
4784
- # To verify a signature outside of KMS with an SM2 public key (China
4785
- # Regions only), you must specify the distinguishing ID. By default, KMS
4786
- # uses `1234567812345678` as the distinguishing ID. For more
4787
- # information, see [Offline verification with SM2 key pairs][2].
4788
- #
4789
5348
  # To help you use the public key safely outside of KMS, `GetPublicKey`
4790
5349
  # returns important information about the public key in the response,
4791
5350
  # including:
4792
5351
  #
4793
- # * [KeySpec][3]\: The type of key material in the public key, such as
5352
+ # * [KeySpec][2]\: The type of key material in the public key, such as
4794
5353
  # `RSA_4096` or `ECC_NIST_P521`.
4795
5354
  #
4796
- # * [KeyUsage][4]\: Whether the key is used for encryption or signing.
5355
+ # * [KeyUsage][3]\: Whether the key is used for encryption or signing.
4797
5356
  #
4798
- # * [EncryptionAlgorithms][5] or [SigningAlgorithms][6]\: A list of the
5357
+ # * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]\: A list of the
4799
5358
  # encryption algorithms or the signing algorithms for the key.
4800
5359
  #
4801
5360
  # Although KMS cannot enforce these restrictions on external operations,
@@ -4806,6 +5365,11 @@ module Aws::KMS
4806
5365
  # You can also avoid errors, such as using the wrong signing algorithm
4807
5366
  # in a verification operation.
4808
5367
  #
5368
+ # To verify a signature outside of KMS with an SM2 public key (China
5369
+ # Regions only), you must specify the distinguishing ID. By default, KMS
5370
+ # uses `1234567812345678` as the distinguishing ID. For more
5371
+ # information, see [Offline verification with SM2 key pairs][6].
5372
+ #
4809
5373
  # The KMS key that you use for this operation must be in a compatible
4810
5374
  # key state. For details, see [Key states of KMS keys][7] in the *Key
4811
5375
  # Management Service Developer Guide*.
@@ -4821,11 +5385,11 @@ module Aws::KMS
4821
5385
  #
4822
5386
  #
4823
5387
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
4824
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
4825
- # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec
4826
- # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage
4827
- # [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
4828
- # [6]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms
5388
+ # [2]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec
5389
+ # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage
5390
+ # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
5391
+ # [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms
5392
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
4829
5393
  # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4830
5394
  # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4831
5395
  #
@@ -4958,12 +5522,13 @@ module Aws::KMS
4958
5522
  # a public key and token from the same `GetParametersForImport`
4959
5523
  # response.
4960
5524
  #
4961
- # * Whether the key material expires and if so, when. If you set an
4962
- # expiration date, KMS deletes the key material from the KMS key on
4963
- # the specified date, and the KMS key becomes unusable. To use the KMS
4964
- # key again, you must reimport the same key material. The only way to
4965
- # change an expiration date is by reimporting the same key material
4966
- # and specifying a new expiration date.
5525
+ # * Whether the key material expires (`ExpirationModel`) and, if so,
5526
+ # when (`ValidTo`). If you set an expiration date, on the specified
5527
+ # date, KMS deletes the key material from the KMS key, making the KMS
5528
+ # key unusable. To use the KMS key in cryptographic operations again,
5529
+ # you must reimport the same key material. The only way to change the
5530
+ # expiration model or expiration date is by reimporting the same key
5531
+ # material and specifying a new expiration date.
4967
5532
  #
4968
5533
  # When this operation is successful, the key state of the KMS key
4969
5534
  # changes from `PendingImport` to `Enabled`, and you can use the KMS
@@ -5032,18 +5597,36 @@ module Aws::KMS
5032
5597
  # `GetParametersForImport` request.
5033
5598
  #
5034
5599
  # @option params [Time,DateTime,Date,Integer,String] :valid_to
5035
- # The time at which the imported key material expires. When the key
5036
- # material expires, KMS deletes the key material and the KMS key becomes
5037
- # unusable. You must omit this parameter when the `ExpirationModel`
5038
- # parameter is set to `KEY_MATERIAL_DOES_NOT_EXPIRE`. Otherwise it is
5039
- # required.
5600
+ # The date and time when the imported key material expires. This
5601
+ # parameter is required when the value of the `ExpirationModel`
5602
+ # parameter is `KEY_MATERIAL_EXPIRES`. Otherwise it is not valid.
5603
+ #
5604
+ # The value of this parameter must be a future date and time. The
5605
+ # maximum value is 365 days from the request date.
5606
+ #
5607
+ # When the key material expires, KMS deletes the key material from the
5608
+ # KMS key. Without its key material, the KMS key is unusable. To use the
5609
+ # KMS key in cryptographic operations, you must reimport the same key
5610
+ # material.
5611
+ #
5612
+ # You cannot change the `ExpirationModel` or `ValidTo` values for the
5613
+ # current import after the request completes. To change either value,
5614
+ # you must delete (DeleteImportedKeyMaterial) and reimport the key
5615
+ # material.
5040
5616
  #
5041
5617
  # @option params [String] :expiration_model
5042
5618
  # Specifies whether the key material expires. The default is
5043
- # `KEY_MATERIAL_EXPIRES`, in which case you must include the `ValidTo`
5044
- # parameter. When this parameter is set to
5619
+ # `KEY_MATERIAL_EXPIRES`.
5620
+ #
5621
+ # When the value of `ExpirationModel` is `KEY_MATERIAL_EXPIRES`, you
5622
+ # must specify a value for the `ValidTo` parameter. When value is
5045
5623
  # `KEY_MATERIAL_DOES_NOT_EXPIRE`, you must omit the `ValidTo` parameter.
5046
5624
  #
5625
+ # You cannot change the `ExpirationModel` or `ValidTo` values for the
5626
+ # current import after the request completes. To change either value,
5627
+ # you must delete (DeleteImportedKeyMaterial) and reimport the key
5628
+ # material.
5629
+ #
5047
5630
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5048
5631
  #
5049
5632
  #
@@ -5983,7 +6566,7 @@ module Aws::KMS
5983
6566
  # (`\u000D`) special characters
5984
6567
  #
5985
6568
  # For information about key policies, see [Key policies in KMS][3] in
5986
- # the *Key Management Service Developer Guide*. For help writing and
6569
+ # the *Key Management Service Developer Guide*.For help writing and
5987
6570
  # formatting a JSON policy document, see the [IAM JSON Policy
5988
6571
  # Reference][4] in the <i> <i>Identity and Access Management User
5989
6572
  # Guide</i> </i>.
@@ -6086,10 +6669,10 @@ module Aws::KMS
6086
6669
  # intend.
6087
6670
  #
6088
6671
  # * To reencrypt the data, you must use the `DestinationKeyId` parameter
6089
- # specify the KMS key that re-encrypts the data after it is decrypted.
6090
- # If the destination KMS key is an asymmetric KMS key, you must also
6091
- # provide the encryption algorithm. The algorithm that you choose must
6092
- # be compatible with the KMS key.
6672
+ # to specify the KMS key that re-encrypts the data after it is
6673
+ # decrypted. If the destination KMS key is an asymmetric KMS key, you
6674
+ # must also provide the encryption algorithm. The algorithm that you
6675
+ # choose must be compatible with the KMS key.
6093
6676
  #
6094
6677
  # When you use an asymmetric KMS key to encrypt or reencrypt data, be
6095
6678
  # sure to record the KMS key and encryption algorithm that you choose.
@@ -6591,7 +7174,7 @@ module Aws::KMS
6591
7174
  # TagResource operation.
6592
7175
  #
6593
7176
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
6594
- # key. For details, see [ABAC in KMS][1] in the *Key Management Service
7177
+ # key. For details, see [ABAC for KMS][1] in the *Key Management Service
6595
7178
  # Developer Guide*.
6596
7179
  #
6597
7180
  # </note>
@@ -6629,7 +7212,7 @@ module Aws::KMS
6629
7212
  #
6630
7213
  # @example Example: To replicate a multi-Region key in a different AWS Region
6631
7214
  #
6632
- # # This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.
7215
+ # # This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.
6633
7216
  #
6634
7217
  # resp = client.replicate_key({
6635
7218
  # key_id: "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", # The key ID or key ARN of the multi-Region primary key
@@ -6701,7 +7284,7 @@ module Aws::KMS
6701
7284
  # resp.replica_key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
6702
7285
  # resp.replica_key_metadata.deletion_date #=> Time
6703
7286
  # resp.replica_key_metadata.valid_to #=> Time
6704
- # resp.replica_key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
7287
+ # resp.replica_key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
6705
7288
  # resp.replica_key_metadata.custom_key_store_id #=> String
6706
7289
  # resp.replica_key_metadata.cloud_hsm_cluster_id #=> String
6707
7290
  # resp.replica_key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
@@ -6722,6 +7305,7 @@ module Aws::KMS
6722
7305
  # resp.replica_key_metadata.pending_deletion_window_in_days #=> Integer
6723
7306
  # resp.replica_key_metadata.mac_algorithms #=> Array
6724
7307
  # resp.replica_key_metadata.mac_algorithms[0] #=> String, one of "HMAC_SHA_224", "HMAC_SHA_256", "HMAC_SHA_384", "HMAC_SHA_512"
7308
+ # resp.replica_key_metadata.xks_key_configuration.id #=> String
6725
7309
  # resp.replica_policy #=> String
6726
7310
  # resp.replica_tags #=> Array
6727
7311
  # resp.replica_tags[0].tag_key #=> String
@@ -6941,13 +7525,6 @@ module Aws::KMS
6941
7525
  # multi-Region replica key.) To prevent the use of a KMS key without
6942
7526
  # deleting it, use DisableKey.
6943
7527
  #
6944
- # If you schedule deletion of a KMS key from a [custom key store][1],
6945
- # when the waiting period expires, `ScheduleKeyDeletion` deletes the KMS
6946
- # key from KMS. Then KMS makes a best effort to delete the key material
6947
- # from the associated CloudHSM cluster. However, you might need to
6948
- # manually [delete the orphaned key material][2] from the cluster and
6949
- # its backups.
6950
- #
6951
7528
  # You can schedule the deletion of a multi-Region primary key and its
6952
7529
  # replica keys at any time. However, KMS will not delete a multi-Region
6953
7530
  # primary key with existing replica keys. If you schedule the deletion
@@ -6957,14 +7534,26 @@ module Aws::KMS
6957
7534
  # the last of its replicas keys is deleted (not just scheduled), the key
6958
7535
  # state of the primary key changes to `PendingDeletion` and its waiting
6959
7536
  # period (`PendingWindowInDays`) begins. For details, see [Deleting
6960
- # multi-Region keys][3] in the *Key Management Service Developer Guide*.
7537
+ # multi-Region keys][1] in the *Key Management Service Developer Guide*.
7538
+ #
7539
+ # When KMS [deletes a KMS key from an CloudHSM key store][2], it makes a
7540
+ # best effort to delete the associated key material from the associated
7541
+ # CloudHSM cluster. However, you might need to manually [delete the
7542
+ # orphaned key material][3] from the cluster and its backups. [Deleting
7543
+ # a KMS key from an external key store][4] has no effect on the
7544
+ # associated external key. However, for both types of custom key stores,
7545
+ # deleting a KMS key is destructive and irreversible. You cannot decrypt
7546
+ # ciphertext encrypted under the KMS key by using only its associated
7547
+ # external key or CloudHSM key. Also, you cannot recreate a KMS key in
7548
+ # an external key store by creating a new KMS key with the same key
7549
+ # material.
6961
7550
  #
6962
7551
  # For more information about scheduling a KMS key for deletion, see
6963
- # [Deleting KMS keys][4] in the *Key Management Service Developer
7552
+ # [Deleting KMS keys][5] in the *Key Management Service Developer
6964
7553
  # Guide*.
6965
7554
  #
6966
7555
  # The KMS key that you use for this operation must be in a compatible
6967
- # key state. For details, see [Key states of KMS keys][5] in the *Key
7556
+ # key state. For details, see [Key states of KMS keys][6] in the *Key
6968
7557
  # Management Service Developer Guide*.
6969
7558
  #
6970
7559
  # **Cross-account use**\: No. You cannot perform this operation on a KMS
@@ -6980,11 +7569,12 @@ module Aws::KMS
6980
7569
  #
6981
7570
  #
6982
7571
  #
6983
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
6984
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
6985
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
6986
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
6987
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
7572
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
7573
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-cmk-keystore.html
7574
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
7575
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-xks-key.html
7576
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
7577
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6988
7578
  #
6989
7579
  # @option params [required, String] :key_id
6990
7580
  # The unique identifier of the KMS key to delete.
@@ -7234,7 +7824,7 @@ module Aws::KMS
7234
7824
  # Adds or edits tags on a [customer managed key][1].
7235
7825
  #
7236
7826
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
7237
- # key. For details, see [ABAC in KMS][2] in the *Key Management Service
7827
+ # key. For details, see [ABAC for KMS][2] in the *Key Management Service
7238
7828
  # Developer Guide*.
7239
7829
  #
7240
7830
  # </note>
@@ -7355,7 +7945,7 @@ module Aws::KMS
7355
7945
  # specify the tag key and the KMS key.
7356
7946
  #
7357
7947
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
7358
- # key. For details, see [ABAC in KMS][2] in the *Key Management Service
7948
+ # key. For details, see [ABAC for KMS][2] in the *Key Management Service
7359
7949
  # Developer Guide*.
7360
7950
  #
7361
7951
  # </note>
@@ -7453,17 +8043,16 @@ module Aws::KMS
7453
8043
  # Amazon Web Services account and Region.
7454
8044
  #
7455
8045
  # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
7456
- # the KMS key. For details, see [ABAC in KMS][1] in the *Key Management
8046
+ # the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
7457
8047
  # Service Developer Guide*.
7458
8048
  #
7459
8049
  # </note>
7460
8050
  #
7461
8051
  # The current and new KMS key must be the same type (both symmetric or
7462
- # both asymmetric), and they must have the same key usage
7463
- # (`ENCRYPT_DECRYPT` or `SIGN_VERIFY`). This restriction prevents errors
7464
- # in code that uses aliases. If you must assign an alias to a different
7465
- # type of KMS key, use DeleteAlias to delete the old alias and
7466
- # CreateAlias to create a new alias.
8052
+ # both asymmetric or both HMAC), and they must have the same key usage.
8053
+ # This restriction prevents errors in code that uses aliases. If you
8054
+ # must assign an alias to a different type of KMS key, use DeleteAlias
8055
+ # to delete the old alias and CreateAlias to create a new alias.
7467
8056
  #
7468
8057
  # You cannot use `UpdateAlias` to change an alias name. To change an
7469
8058
  # alias name, use DeleteAlias to delete the old alias and CreateAlias to
@@ -7521,8 +8110,8 @@ module Aws::KMS
7521
8110
  #
7522
8111
  # The KMS key must be in the same Amazon Web Services account and Region
7523
8112
  # as the alias. Also, the new target KMS key must be the same type as
7524
- # the current target KMS key (both symmetric or both asymmetric) and
7525
- # they must have the same key usage.
8113
+ # the current target KMS key (both symmetric or both asymmetric or both
8114
+ # HMAC) and they must have the same key usage.
7526
8115
  #
7527
8116
  # Specify the key ID or key ARN of the KMS key.
7528
8117
  #
@@ -7572,52 +8161,89 @@ module Aws::KMS
7572
8161
  req.send_request(options)
7573
8162
  end
7574
8163
 
7575
- # Changes the properties of a custom key store. Use the
7576
- # `CustomKeyStoreId` parameter to identify the custom key store you want
7577
- # to edit. Use the remaining parameters to change the properties of the
7578
- # custom key store.
7579
- #
7580
- # You can only update a custom key store that is disconnected. To
7581
- # disconnect the custom key store, use DisconnectCustomKeyStore. To
7582
- # reconnect the custom key store after the update completes, use
7583
- # ConnectCustomKeyStore. To find the connection state of a custom key
7584
- # store, use the DescribeCustomKeyStores operation.
7585
- #
7586
- # The `CustomKeyStoreId` parameter is required in all commands. Use the
7587
- # other parameters of `UpdateCustomKeyStore` to edit your key store
7588
- # settings.
7589
- #
7590
- # * Use the `NewCustomKeyStoreName` parameter to change the friendly
7591
- # name of the custom key store to the value that you specify.
8164
+ # Changes the properties of a custom key store. You can use this
8165
+ # operation to change the properties of an CloudHSM key store or an
8166
+ # external key store.
8167
+ #
8168
+ # Use the required `CustomKeyStoreId` parameter to identify the custom
8169
+ # key store. Use the remaining optional parameters to change its
8170
+ # properties. This operation does not return any property values. To
8171
+ # verify the updated property values, use the DescribeCustomKeyStores
8172
+ # operation.
7592
8173
  #
8174
+ # This operation is part of the [custom key stores][1] feature in KMS,
8175
+ # which combines the convenience and extensive integration of KMS with
8176
+ # the isolation and control of a key store that you own and manage.
8177
+ #
8178
+ # When updating the properties of an external key store, verify that the
8179
+ # updated settings connect your key store, via the external key store
8180
+ # proxy, to the same external key manager as the previous settings, or
8181
+ # to a backup or snapshot of the external key manager with the same
8182
+ # cryptographic keys. If the updated connection settings fail, you can
8183
+ # fix them and retry, although an extended delay might disrupt Amazon
8184
+ # Web Services services. However, if KMS permanently loses its access to
8185
+ # cryptographic keys, ciphertext encrypted under those keys is
8186
+ # unrecoverable.
8187
+ #
8188
+ # <note markdown="1"> For external key stores:
8189
+ #
8190
+ # Some external key managers provide a simpler method for updating an
8191
+ # external key store. For details, see your external key manager
8192
+ # documentation.
8193
+ #
8194
+ # When updating an external key store in the KMS console, you can upload
8195
+ # a JSON-based proxy configuration file with the desired values. You
8196
+ # cannot upload the proxy configuration file to the
8197
+ # `UpdateCustomKeyStore` operation. However, you can use the file to
8198
+ # help you determine the correct values for the `UpdateCustomKeyStore`
8199
+ # parameters.
7593
8200
  #
8201
+ # </note>
7594
8202
  #
7595
- # * Use the `KeyStorePassword` parameter tell KMS the current password
7596
- # of the [ `kmsuser` crypto user (CU)][1] in the associated CloudHSM
7597
- # cluster. You can use this parameter to [fix connection failures][2]
7598
- # that occur when KMS cannot log into the associated cluster because
7599
- # the `kmsuser` password has changed. This value does not change the
7600
- # password in the CloudHSM cluster.
8203
+ # For an CloudHSM key store, you can use this operation to change the
8204
+ # custom key store friendly name (`NewCustomKeyStoreName`), to tell KMS
8205
+ # about a change to the `kmsuser` crypto user password
8206
+ # (`KeyStorePassword`), or to associate the custom key store with a
8207
+ # different, but related, CloudHSM cluster (`CloudHsmClusterId`). To
8208
+ # update any property of an CloudHSM key store, the `ConnectionState` of
8209
+ # the CloudHSM key store must be `DISCONNECTED`.
8210
+ #
8211
+ # For an external key store, you can use this operation to change the
8212
+ # custom key store friendly name (`NewCustomKeyStoreName`), or to tell
8213
+ # KMS about a change to the external key store proxy authentication
8214
+ # credentials (`XksProxyAuthenticationCredential`), connection method
8215
+ # (`XksProxyConnectivity`), external proxy endpoint
8216
+ # (`XksProxyUriEndpoint`) and path (`XksProxyUriPath`). For external key
8217
+ # stores with an `XksProxyConnectivity` of `VPC_ENDPOINT_SERVICE`, you
8218
+ # can also update the Amazon VPC endpoint service name
8219
+ # (`XksProxyVpcEndpointServiceName`). To update most properties of an
8220
+ # external key store, the `ConnectionState` of the external key store
8221
+ # must be `DISCONNECTED`. However, you can update the
8222
+ # `CustomKeyStoreName`, `XksProxyAuthenticationCredential`, and
8223
+ # `XksProxyUriPath` of an external key store when it is in the CONNECTED
8224
+ # or DISCONNECTED state.
8225
+ #
8226
+ # If your update requires a `DISCONNECTED` state, before using
8227
+ # `UpdateCustomKeyStore`, use the DisconnectCustomKeyStore operation to
8228
+ # disconnect the custom key store. After the `UpdateCustomKeyStore`
8229
+ # operation completes, use the ConnectCustomKeyStore to reconnect the
8230
+ # custom key store. To find the `ConnectionState` of the custom key
8231
+ # store, use the DescribeCustomKeyStores operation.
7601
8232
  #
7602
8233
  #
7603
8234
  #
7604
- # * Use the `CloudHsmClusterId` parameter to associate the custom key
7605
- # store with a different, but related, CloudHSM cluster. You can use
7606
- # this parameter to repair a custom key store if its CloudHSM cluster
7607
- # becomes corrupted or is deleted, or when you need to create or
7608
- # restore a cluster from a backup.
8235
+ # Before updating the custom key store, verify that the new values allow
8236
+ # KMS to connect the custom key store to its backing key store. For
8237
+ # example, before you change the `XksProxyUriPath` value, verify that
8238
+ # the external key store proxy is reachable at the new path.
7609
8239
  #
7610
8240
  # If the operation succeeds, it returns a JSON object with no
7611
8241
  # properties.
7612
8242
  #
7613
- # This operation is part of the [custom key store feature][3] feature in
7614
- # KMS, which combines the convenience and extensive integration of KMS
7615
- # with the isolation and control of a single-tenant key store.
7616
- #
7617
8243
  # **Cross-account use**\: No. You cannot perform this operation on a
7618
8244
  # custom key store in a different Amazon Web Services account.
7619
8245
  #
7620
- # **Required permissions**\: [kms:UpdateCustomKeyStore][4] (IAM policy)
8246
+ # **Required permissions**\: [kms:UpdateCustomKeyStore][2] (IAM policy)
7621
8247
  #
7622
8248
  # **Related operations:**
7623
8249
  #
@@ -7633,10 +8259,8 @@ module Aws::KMS
7633
8259
  #
7634
8260
  #
7635
8261
  #
7636
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
7637
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-password
7638
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
7639
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8262
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
8263
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
7640
8264
  #
7641
8265
  # @option params [required, String] :custom_key_store_id
7642
8266
  # Identifies the custom key store that you want to update. Enter the ID
@@ -7648,16 +8272,25 @@ module Aws::KMS
7648
8272
  # you specify. The custom key store name must be unique in the Amazon
7649
8273
  # Web Services account.
7650
8274
  #
8275
+ # To change this value, an CloudHSM key store must be disconnected. An
8276
+ # external key store can be connected or disconnected.
8277
+ #
7651
8278
  # @option params [String] :key_store_password
7652
8279
  # Enter the current password of the `kmsuser` crypto user (CU) in the
7653
- # CloudHSM cluster that is associated with the custom key store.
8280
+ # CloudHSM cluster that is associated with the custom key store. This
8281
+ # parameter is valid only for custom key stores with a
8282
+ # `CustomKeyStoreType` of `AWS_CLOUDHSM`.
7654
8283
  #
7655
8284
  # This parameter tells KMS the current password of the `kmsuser` crypto
7656
8285
  # user (CU). It does not set or change the password of any users in the
7657
8286
  # CloudHSM cluster.
7658
8287
  #
8288
+ # To change this value, the CloudHSM key store must be disconnected.
8289
+ #
7659
8290
  # @option params [String] :cloud_hsm_cluster_id
7660
- # Associates the custom key store with a related CloudHSM cluster.
8291
+ # Associates the custom key store with a related CloudHSM cluster. This
8292
+ # parameter is valid only for custom key stores with a
8293
+ # `CustomKeyStoreType` of `AWS_CLOUDHSM`.
7661
8294
  #
7662
8295
  # Enter the cluster ID of the cluster that you used to create the custom
7663
8296
  # key store or a cluster that shares a backup history and has the same
@@ -7668,37 +8301,117 @@ module Aws::KMS
7668
8301
  # view the cluster certificate of a cluster, use the
7669
8302
  # [DescribeClusters][2] operation.
7670
8303
  #
8304
+ # To change this value, the CloudHSM key store must be disconnected.
8305
+ #
7671
8306
  #
7672
8307
  #
7673
8308
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
7674
8309
  # [2]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
7675
8310
  #
8311
+ # @option params [String] :xks_proxy_uri_endpoint
8312
+ # Changes the URI endpoint that KMS uses to connect to your external key
8313
+ # store proxy (XKS proxy). This parameter is valid only for custom key
8314
+ # stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
8315
+ #
8316
+ # For external key stores with an `XksProxyConnectivity` value of
8317
+ # `PUBLIC_ENDPOINT`, the protocol must be HTTPS.
8318
+ #
8319
+ # For external key stores with an `XksProxyConnectivity` value of
8320
+ # `VPC_ENDPOINT_SERVICE`, specify `https://` followed by the private DNS
8321
+ # name associated with the VPC endpoint service. Each external key store
8322
+ # must use a different private DNS name.
8323
+ #
8324
+ # The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
8325
+ # be unique in the Amazon Web Services account and Region.
8326
+ #
8327
+ # To change this value, the external key store must be disconnected.
8328
+ #
8329
+ # @option params [String] :xks_proxy_uri_path
8330
+ # Changes the base path to the proxy APIs for this external key store.
8331
+ # To find this value, see the documentation for your external key
8332
+ # manager and external key store proxy (XKS proxy). This parameter is
8333
+ # valid only for custom key stores with a `CustomKeyStoreType` of
8334
+ # `EXTERNAL_KEY_STORE`.
8335
+ #
8336
+ # The value must start with `/` and must end with `/kms/xks/v1`, where
8337
+ # `v1` represents the version of the KMS external key store proxy API.
8338
+ # You can include an optional prefix between the required elements such
8339
+ # as `/example/kms/xks/v1`.
8340
+ #
8341
+ # The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
8342
+ # be unique in the Amazon Web Services account and Region.
8343
+ #
8344
+ # You can change this value when the external key store is connected or
8345
+ # disconnected.
8346
+ #
8347
+ # @option params [String] :xks_proxy_vpc_endpoint_service_name
8348
+ # Changes the name that KMS uses to identify the Amazon VPC endpoint
8349
+ # service for your external key store proxy (XKS proxy). This parameter
8350
+ # is valid when the `CustomKeyStoreType` is `EXTERNAL_KEY_STORE` and the
8351
+ # `XksProxyConnectivity` is `VPC_ENDPOINT_SERVICE`.
8352
+ #
8353
+ # To change this value, the external key store must be disconnected.
8354
+ #
8355
+ # @option params [Types::XksProxyAuthenticationCredentialType] :xks_proxy_authentication_credential
8356
+ # Changes the credentials that KMS uses to sign requests to the external
8357
+ # key store proxy (XKS proxy). This parameter is valid only for custom
8358
+ # key stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
8359
+ #
8360
+ # You must specify both the `AccessKeyId` and `SecretAccessKey` value in
8361
+ # the authentication credential, even if you are only updating one
8362
+ # value.
8363
+ #
8364
+ # This parameter doesn't establish or change your authentication
8365
+ # credentials on the proxy. It just tells KMS the credential that you
8366
+ # established with your external key store proxy. For example, if you
8367
+ # rotate the credential on your external key store proxy, you can use
8368
+ # this parameter to update the credential in KMS.
8369
+ #
8370
+ # You can change this value when the external key store is connected or
8371
+ # disconnected.
8372
+ #
8373
+ # @option params [String] :xks_proxy_connectivity
8374
+ # Changes the connectivity setting for the external key store. To
8375
+ # indicate that the external key store proxy uses a Amazon VPC endpoint
8376
+ # service to communicate with KMS, specify `VPC_ENDPOINT_SERVICE`.
8377
+ # Otherwise, specify `PUBLIC_ENDPOINT`.
8378
+ #
8379
+ # If you change the `XksProxyConnectivity` to `VPC_ENDPOINT_SERVICE`,
8380
+ # you must also change the `XksProxyUriEndpoint` and add an
8381
+ # `XksProxyVpcEndpointServiceName` value.
8382
+ #
8383
+ # If you change the `XksProxyConnectivity` to `PUBLIC_ENDPOINT`, you
8384
+ # must also change the `XksProxyUriEndpoint` and specify a null or empty
8385
+ # string for the `XksProxyVpcEndpointServiceName` value.
8386
+ #
8387
+ # To change this value, the external key store must be disconnected.
8388
+ #
7676
8389
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
7677
8390
  #
7678
8391
  #
7679
- # @example Example: To edit the password of a custom key store
8392
+ # @example Example: To edit the friendly name of a custom key store
7680
8393
  #
7681
- # # This example tells KMS the password for the kmsuser crypto user in the AWS CloudHSM cluster that is associated with the
7682
- # # AWS KMS custom key store. (It does not change the password in the CloudHSM cluster.) This operation does not return any
7683
- # # data.
8394
+ # # This example changes the friendly name of the AWS KMS custom key store to the name that you specify. This operation does
8395
+ # # not return any data. To verify that the operation worked, use the DescribeCustomKeyStores operation.
7684
8396
  #
7685
8397
  # resp = client.update_custom_key_store({
7686
8398
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating.
7687
- # key_store_password: "ExamplePassword", # The password for the kmsuser crypto user in the CloudHSM cluster.
8399
+ # new_custom_key_store_name: "DevelopmentKeys", # A new friendly name for the custom key store.
7688
8400
  # })
7689
8401
  #
7690
8402
  # resp.to_h outputs the following:
7691
8403
  # {
7692
8404
  # }
7693
8405
  #
7694
- # @example Example: To edit the friendly name of a custom key store
8406
+ # @example Example: To edit the password of an AWS CloudHSM key store
7695
8407
  #
7696
- # # This example changes the friendly name of the AWS KMS custom key store to the name that you specify. This operation does
7697
- # # not return any data. To verify that the operation worked, use the DescribeCustomKeyStores operation.
8408
+ # # This example tells AWS KMS the password for the kmsuser crypto user in the AWS CloudHSM cluster that is associated with
8409
+ # # the AWS KMS custom key store. (It does not change the password in the CloudHSM cluster.) This operation does not return
8410
+ # # any data.
7698
8411
  #
7699
8412
  # resp = client.update_custom_key_store({
7700
8413
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating.
7701
- # new_custom_key_store_name: "DevelopmentKeys", # A new friendly name for the custom key store.
8414
+ # key_store_password: "ExamplePassword", # The password for the kmsuser crypto user in the CloudHSM cluster.
7702
8415
  # })
7703
8416
  #
7704
8417
  # resp.to_h outputs the following:
@@ -7707,9 +8420,9 @@ module Aws::KMS
7707
8420
  #
7708
8421
  # @example Example: To associate the custom key store with a different, but related, AWS CloudHSM cluster.
7709
8422
  #
7710
- # # This example changes the cluster that is associated with a custom key store to a related cluster, such as a different
7711
- # # backup of the same cluster. This operation does not return any data. To verify that the operation worked, use the
7712
- # # DescribeCustomKeyStores operation.
8423
+ # # This example changes the AWS CloudHSM cluster that is associated with an AWS CloudHSM key store to a related cluster,
8424
+ # # such as a different backup of the same cluster. This operation does not return any data. To verify that the operation
8425
+ # # worked, use the DescribeCustomKeyStores operation.
7713
8426
  #
7714
8427
  # resp = client.update_custom_key_store({
7715
8428
  # cloud_hsm_cluster_id: "cluster-1a23b4cdefg", # The ID of the AWS CloudHSM cluster that you want to associate with the custom key store. This cluster must be related to the original CloudHSM cluster for this key store.
@@ -7720,6 +8433,56 @@ module Aws::KMS
7720
8433
  # {
7721
8434
  # }
7722
8435
  #
8436
+ # @example Example: To update the proxy authentication credential of an external key store
8437
+ #
8438
+ # # To update the proxy authentication credential for your external key store, specify both the
8439
+ # # <code>RawSecretAccessKey</code> and the <code>AccessKeyId</code>, even if you are changing only one of the values. You
8440
+ # # can use this feature to fix an invalid credential or to change the credential when the external key store proxy rotates
8441
+ # # it.
8442
+ #
8443
+ # resp = client.update_custom_key_store({
8444
+ # custom_key_store_id: "cks-1234567890abcdef0", # Identifies the custom key store
8445
+ # xks_proxy_authentication_credential: {
8446
+ # access_key_id: "ABCDE12345670EXAMPLE",
8447
+ # raw_secret_access_key: "DXjSUawnel2fr6SKC7G25CNxTyWKE5PF9XX6H/u9pSo=",
8448
+ # }, # Specifies the values in the proxy authentication credential
8449
+ # })
8450
+ #
8451
+ # resp.to_h outputs the following:
8452
+ # {
8453
+ # }
8454
+ #
8455
+ # @example Example: To edit the proxy URI path of an external key store.
8456
+ #
8457
+ # # This example updates the proxy URI path for an external key store
8458
+ #
8459
+ # resp = client.update_custom_key_store({
8460
+ # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating
8461
+ # xks_proxy_uri_path: "/new-path/kms/xks/v1", # The URI path to the external key store proxy APIs
8462
+ # })
8463
+ #
8464
+ # resp.to_h outputs the following:
8465
+ # {
8466
+ # }
8467
+ #
8468
+ # @example Example: To update the proxy connectivity of an external key store to VPC_ENDPOINT_SERVICE
8469
+ #
8470
+ # # To change the external key store proxy connectivity option from public endpoint connectivity to VPC endpoint service
8471
+ # # connectivity, in addition to changing the <code>XksProxyConnectivity</code> value, you must change the
8472
+ # # <code>XksProxyUriEndpoint</code> value to reflect the private DNS name associated with the VPC endpoint service. You
8473
+ # # must also add an <code>XksProxyVpcEndpointServiceName</code> value.
8474
+ #
8475
+ # resp = client.update_custom_key_store({
8476
+ # custom_key_store_id: "cks-1234567890abcdef0", # Identifies the custom key store
8477
+ # xks_proxy_connectivity: "VPC_ENDPOINT_SERVICE", # Specifies the connectivity option
8478
+ # xks_proxy_uri_endpoint: "https://myproxy-private.xks.example.com", # Specifies the URI endpoint that AWS KMS uses when communicating with the external key store proxy
8479
+ # xks_proxy_vpc_endpoint_service_name: "com.amazonaws.vpce.us-east-1.vpce-svc-example", # Specifies the name of the VPC endpoint service that the proxy uses for communication
8480
+ # })
8481
+ #
8482
+ # resp.to_h outputs the following:
8483
+ # {
8484
+ # }
8485
+ #
7723
8486
  # @example Request syntax with placeholder values
7724
8487
  #
7725
8488
  # resp = client.update_custom_key_store({
@@ -7727,6 +8490,14 @@ module Aws::KMS
7727
8490
  # new_custom_key_store_name: "CustomKeyStoreNameType",
7728
8491
  # key_store_password: "KeyStorePasswordType",
7729
8492
  # cloud_hsm_cluster_id: "CloudHsmClusterIdType",
8493
+ # xks_proxy_uri_endpoint: "XksProxyUriEndpointType",
8494
+ # xks_proxy_uri_path: "XksProxyUriPathType",
8495
+ # xks_proxy_vpc_endpoint_service_name: "XksProxyVpcEndpointServiceNameType",
8496
+ # xks_proxy_authentication_credential: {
8497
+ # access_key_id: "XksProxyAuthenticationAccessKeyIdType", # required
8498
+ # raw_secret_access_key: "XksProxyAuthenticationRawSecretAccessKeyType", # required
8499
+ # },
8500
+ # xks_proxy_connectivity: "PUBLIC_ENDPOINT", # accepts PUBLIC_ENDPOINT, VPC_ENDPOINT_SERVICE
7730
8501
  # })
7731
8502
  #
7732
8503
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore AWS API Documentation
@@ -7917,6 +8688,20 @@ module Aws::KMS
7917
8688
  #
7918
8689
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
7919
8690
  #
8691
+ #
8692
+ # @example Example: To update the primary Region of a multi-Region KMS key
8693
+ #
8694
+ # # The following UpdatePrimaryRegion example changes the multi-Region replica key in the eu-central-1 Region to the primary
8695
+ # # key. The current primary key in the us-west-1 Region becomes a replica key.
8696
+ # # The KeyId parameter identifies the current primary key in the us-west-1 Region. The PrimaryRegion parameter indicates
8697
+ # # the Region of the replica key that will become the new primary key.
8698
+ # # This operation does not return any output. To verify that primary key is changed, use the DescribeKey operation.
8699
+ #
8700
+ # resp = client.update_primary_region({
8701
+ # key_id: "arn:aws:kms:us-west-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", # The current primary key.
8702
+ # primary_region: "eu-central-1", # The Region of the replica key that will become the primary key.
8703
+ # })
8704
+ #
7920
8705
  # @example Request syntax with placeholder values
7921
8706
  #
7922
8707
  # resp = client.update_primary_region({
@@ -7957,17 +8742,18 @@ module Aws::KMS
7957
8742
  # You can also verify the digital signature by using the public key of
7958
8743
  # the KMS key outside of KMS. Use the GetPublicKey operation to download
7959
8744
  # the public key in the asymmetric KMS key and then use the public key
7960
- # to verify the signature outside of KMS. To verify a signature outside
7961
- # of KMS with an SM2 public key, you must specify the distinguishing ID.
7962
- # By default, KMS uses `1234567812345678` as the distinguishing ID. For
7963
- # more information, see [Offline verification with SM2 key pairs][2] in
7964
- # *Key Management Service Developer Guide*. The advantage of using the
8745
+ # to verify the signature outside of KMS. The advantage of using the
7965
8746
  # `Verify` operation is that it is performed within KMS. As a result,
7966
8747
  # it's easy to call, the operation is performed within the FIPS
7967
8748
  # boundary, it is logged in CloudTrail, and you can use key policy and
7968
8749
  # IAM policy to determine who is authorized to use the KMS key to verify
7969
8750
  # signatures.
7970
8751
  #
8752
+ # To verify a signature outside of KMS with an SM2 public key (China
8753
+ # Regions only), you must specify the distinguishing ID. By default, KMS
8754
+ # uses `1234567812345678` as the distinguishing ID. For more
8755
+ # information, see [Offline verification with SM2 key pairs][2].
8756
+ #
7971
8757
  # The KMS key that you use for this operation must be in a compatible
7972
8758
  # key state. For details, see [Key states of KMS keys][3] in the *Key
7973
8759
  # Management Service Developer Guide*.
@@ -8060,7 +8846,7 @@ module Aws::KMS
8060
8846
  # @example Example: To use an asymmetric KMS key to verify a digital signature
8061
8847
  #
8062
8848
  # # This operation uses the public key in an elliptic curve (ECC) asymmetric key to verify a digital signature within AWS
8063
- # # KMS.
8849
+ # # KMS.
8064
8850
  #
8065
8851
  # resp = client.verify({
8066
8852
  # key_id: "alias/ECC_signing_key", # The asymmetric KMS key to be used to verify the digital signature. This example uses an alias to identify the KMS key.
@@ -8108,33 +8894,35 @@ module Aws::KMS
8108
8894
  # HMAC, `VerifyMac` computes an HMAC using the message, HMAC KMS key,
8109
8895
  # and MAC algorithm that you specify, and compares the computed HMAC to
8110
8896
  # the HMAC that you specify. If the HMACs are identical, the
8111
- # verification succeeds; otherwise, it fails.
8897
+ # verification succeeds; otherwise, it fails. Verification indicates
8898
+ # that the message hasn't changed since the HMAC was calculated, and
8899
+ # the specified key was used to generate and verify the HMAC.
8112
8900
  #
8113
- # Verification indicates that the message hasn't changed since the HMAC
8114
- # was calculated, and the specified key was used to generate and verify
8115
- # the HMAC.
8901
+ # HMAC KMS keys and the HMAC algorithms that KMS uses conform to
8902
+ # industry standards defined in [RFC 2104][1].
8116
8903
  #
8117
8904
  # This operation is part of KMS support for HMAC KMS keys. For details,
8118
- # see [HMAC keys in KMS][1] in the *Key Management Service Developer
8905
+ # see [HMAC keys in KMS][2] in the *Key Management Service Developer
8119
8906
  # Guide*.
8120
8907
  #
8121
8908
  # The KMS key that you use for this operation must be in a compatible
8122
- # key state. For details, see [Key states of KMS keys][2] in the *Key
8909
+ # key state. For details, see [Key states of KMS keys][3] in the *Key
8123
8910
  # Management Service Developer Guide*.
8124
8911
  #
8125
8912
  # **Cross-account use**\: Yes. To perform this operation with a KMS key
8126
8913
  # in a different Amazon Web Services account, specify the key ARN or
8127
8914
  # alias ARN in the value of the `KeyId` parameter.
8128
8915
  #
8129
- # **Required permissions**\: [kms:VerifyMac][3] (key policy)
8916
+ # **Required permissions**\: [kms:VerifyMac][4] (key policy)
8130
8917
  #
8131
8918
  # **Related operations**\: GenerateMac
8132
8919
  #
8133
8920
  #
8134
8921
  #
8135
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
8136
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
8137
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8922
+ # [1]: https://datatracker.ietf.org/doc/html/rfc2104
8923
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
8924
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
8925
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8138
8926
  #
8139
8927
  # @option params [required, String, StringIO, File] :message
8140
8928
  # The message that will be used in the verification. Enter the same
@@ -8238,7 +9026,7 @@ module Aws::KMS
8238
9026
  params: params,
8239
9027
  config: config)
8240
9028
  context[:gem_name] = 'aws-sdk-kms'
8241
- context[:gem_version] = '1.59.0'
9029
+ context[:gem_version] = '1.61.0'
8242
9030
  Seahorse::Client::Request.new(handlers, context)
8243
9031
  end
8244
9032