aws-sdk-kms 1.58.0 → 1.60.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
30
30
  require 'aws-sdk-core/plugins/checksum_algorithm.rb'
31
31
  require 'aws-sdk-core/plugins/defaults_mode.rb'
32
32
  require 'aws-sdk-core/plugins/recursion_detection.rb'
33
- require 'aws-sdk-core/plugins/signature_v4.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
34
  require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
35
35
 
36
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:kms)
@@ -79,8 +79,9 @@ module Aws::KMS
79
79
  add_plugin(Aws::Plugins::ChecksumAlgorithm)
80
80
  add_plugin(Aws::Plugins::DefaultsMode)
81
81
  add_plugin(Aws::Plugins::RecursionDetection)
82
- add_plugin(Aws::Plugins::SignatureV4)
82
+ add_plugin(Aws::Plugins::Sign)
83
83
  add_plugin(Aws::Plugins::Protocols::JsonRpc)
84
+ add_plugin(Aws::KMS::Plugins::Endpoints)
84
85
 
85
86
  # @overload initialize(options)
86
87
  # @param [Hash] options
@@ -297,6 +298,19 @@ module Aws::KMS
297
298
  # ** Please note ** When response stubbing is enabled, no HTTP
298
299
  # requests are made, and retries are disabled.
299
300
  #
301
+ # @option options [Aws::TokenProvider] :token_provider
302
+ # A Bearer Token Provider. This can be an instance of any one of the
303
+ # following classes:
304
+ #
305
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
306
+ # tokens.
307
+ #
308
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
309
+ # access token generated from `aws login`.
310
+ #
311
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
312
+ # will be used to search for tokens configured for your profile in shared configuration files.
313
+ #
300
314
  # @option options [Boolean] :use_dualstack_endpoint
301
315
  # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
302
316
  # will be used if available.
@@ -310,6 +324,9 @@ module Aws::KMS
310
324
  # When `true`, request parameters are validated before
311
325
  # sending the request.
312
326
  #
327
+ # @option options [Aws::KMS::EndpointProvider] :endpoint_provider
328
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::KMS::EndpointParameters`
329
+ #
313
330
  # @option options [URI::HTTP,String] :http_proxy A proxy to send
314
331
  # requests through. Formatted like 'http://proxy.com:123'.
315
332
  #
@@ -438,32 +455,27 @@ module Aws::KMS
438
455
  req.send_request(options)
439
456
  end
440
457
 
441
- # Connects or reconnects a [custom key store][1] to its associated
442
- # 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.
443
463
  #
444
464
  # The custom key store must be connected before you can create KMS keys
445
465
  # in the key store or use the KMS keys it contains. You can disconnect
446
466
  # and reconnect a custom key store at any time.
447
467
  #
448
- # To connect a custom key store, its associated CloudHSM cluster must
449
- # have at least one active HSM. To get the number of active HSMs in a
450
- # cluster, use the [DescribeClusters][2] operation. To add HSMs to the
451
- # cluster, use the [CreateHsm][3] operation. Also, the [ `kmsuser`
452
- # crypto user][4] (CU) must not be logged into the cluster. This
453
- # prevents KMS from using this account to log in.
454
- #
455
- # The connection process can take an extended amount of time to
456
- # 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
457
470
  # process, but it does not wait for it to complete. When it succeeds,
458
471
  # this operation quickly returns an HTTP 200 response and a JSON object
459
472
  # with no properties. However, this response does not indicate that the
460
473
  # custom key store is connected. To get the connection state of the
461
474
  # custom key store, use the DescribeCustomKeyStores operation.
462
475
  #
463
- # During the connection process, KMS finds the CloudHSM cluster that is
464
- # associated with the custom key store, creates the connection
465
- # infrastructure, connects to the cluster, logs into the CloudHSM client
466
- # 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.
467
479
  #
468
480
  # The `ConnectCustomKeyStore` operation might fail for various reasons.
469
481
  # To find the reason, use the DescribeCustomKeyStores operation and see
@@ -475,14 +487,50 @@ module Aws::KMS
475
487
  # UpdateCustomKeyStore operation if necessary, and then use
476
488
  # `ConnectCustomKeyStore` again.
477
489
  #
478
- # If you are having trouble connecting or disconnecting a custom key
479
- # 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
480
528
  # Management Service Developer Guide*.
481
529
  #
482
530
  # **Cross-account use**\: No. You cannot perform this operation on a
483
531
  # custom key store in a different Amazon Web Services account.
484
532
  #
485
- # **Required permissions**\: [kms:ConnectCustomKeyStore][6] (IAM policy)
533
+ # **Required permissions**\: [kms:ConnectCustomKeyStore][7] (IAM policy)
486
534
  #
487
535
  # **Related operations**
488
536
  #
@@ -503,7 +551,8 @@ module Aws::KMS
503
551
  # [3]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
504
552
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
505
553
  # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
506
- # [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
507
556
  #
508
557
  # @option params [required, String] :custom_key_store_id
509
558
  # Enter the key store ID of the custom key store that you want to
@@ -513,10 +562,12 @@ module Aws::KMS
513
562
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
514
563
  #
515
564
  #
516
- # @example Example: To connect a custom key store to its CloudHSM cluster
565
+ # @example Example: To connect a custom key store
517
566
  #
518
- # # This example connects an AWS KMS custom key store to its AWS CloudHSM cluster. This operation does not return any data.
519
- # # 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.
520
571
  #
521
572
  # resp = client.connect_custom_key_store({
522
573
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the AWS KMS custom key store.
@@ -544,7 +595,7 @@ module Aws::KMS
544
595
  # Creates a friendly name for a KMS key.
545
596
  #
546
597
  # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
547
- # 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
548
599
  # Service Developer Guide*.
549
600
  #
550
601
  # </note>
@@ -671,34 +722,76 @@ module Aws::KMS
671
722
  req.send_request(options)
672
723
  end
673
724
 
674
- # Creates a [custom key store][1] that is associated with an [CloudHSM
675
- # 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*.
676
744
  #
677
- # This operation is part of the [custom key store feature][1] feature in
678
- # KMS, which combines the convenience and extensive integration of KMS
679
- # with the isolation and control of a single-tenant key store.
745
+ # To create a custom key store, use the following parameters.
680
746
  #
681
- # Before you create the custom key store, you must assemble the required
682
- # elements, including an CloudHSM cluster that fulfills the requirements
683
- # for a custom key store. For details about the required elements, see
684
- # [Assemble the Prerequisites][3] in the *Key Management Service
685
- # 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>
686
778
  #
687
779
  # When the operation completes successfully, it returns the ID of the
688
780
  # new custom key store. Before you can use your new custom key store,
689
- # you need to use the ConnectCustomKeyStore operation to connect the new
690
- # key store to its CloudHSM cluster. Even if you are not going to use
691
- # your custom key store immediately, you might want to connect it to
692
- # verify that all settings are correct and then disconnect it until you
693
- # are ready to use it.
694
- #
695
- # 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
696
789
  # the *Key Management Service Developer Guide*.
697
790
  #
698
791
  # **Cross-account use**\: No. You cannot perform this operation on a
699
792
  # custom key store in a different Amazon Web Services account.
700
793
  #
701
- # **Required permissions**\: [kms:CreateCustomKeyStore][5] (IAM policy).
794
+ # **Required permissions**\: [kms:CreateCustomKeyStore][9] (IAM policy).
702
795
  #
703
796
  # **Related operations:**
704
797
  #
@@ -715,35 +808,53 @@ module Aws::KMS
715
808
  #
716
809
  #
717
810
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
718
- # [2]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
719
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
720
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
721
- # [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
722
819
  #
723
820
  # @option params [required, String] :custom_key_store_name
724
821
  # Specifies a friendly name for the custom key store. The name must be
725
- # 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.
726
824
  #
727
825
  # @option params [String] :cloud_hsm_cluster_id
728
- # Identifies the CloudHSM cluster for the custom key store. Enter the
729
- # cluster ID of any active CloudHSM cluster that is not already
730
- # associated with a custom key store. To find the cluster ID, use the
731
- # [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.
732
833
  #
733
834
  #
734
835
  #
735
836
  # [1]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
736
837
  #
737
838
  # @option params [String] :trust_anchor_certificate
738
- # Enter the content of the trust anchor certificate for the cluster.
739
- # This is the content of the `customerCA.crt` file that you created when
740
- # you [initialized the cluster][1].
839
+ # * CreateCustom
840
+ #
841
+ # Specifies the certificate for an CloudHSM key store. This parameter is
842
+ # required for custom key stores with a `CustomKeyStoreType` of
843
+ # `AWS_CLOUDHSM`.
844
+ #
845
+ # Enter the content of the trust anchor certificate for the CloudHSM
846
+ # cluster. This is the content of the `customerCA.crt` file that you
847
+ # created when you [initialized the cluster][1].
741
848
  #
742
849
  #
743
850
  #
744
851
  # [1]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html
745
852
  #
746
853
  # @option params [String] :key_store_password
854
+ # Specifies the `kmsuser` password for an CloudHSM key store. This
855
+ # parameter is required for custom key stores with a
856
+ # `CustomKeyStoreType` of `AWS_CLOUDHSM`.
857
+ #
747
858
  # Enter the password of the [ `kmsuser` crypto user (CU) account][1] in
748
859
  # the specified CloudHSM cluster. KMS logs into the cluster as this user
749
860
  # to manage key material on your behalf.
@@ -758,26 +869,150 @@ module Aws::KMS
758
869
  #
759
870
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
760
871
  #
761
- # @return [Types::CreateCustomKeyStoreResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
872
+ # @option params [String] :custom_key_store_type
873
+ # Specifies the type of custom key store. The default value is
874
+ # `AWS_CLOUDHSM`.
875
+ #
876
+ # For a custom key store backed by an CloudHSM cluster, omit the
877
+ # parameter or enter `AWS_CLOUDHSM`. For a custom key store backed by an
878
+ # external key manager outside of Amazon Web Services, enter
879
+ # `EXTERNAL_KEY_STORE`. You cannot change this property after the key
880
+ # store is created.
881
+ #
882
+ # @option params [String] :xks_proxy_uri_endpoint
883
+ # Specifies the endpoint that KMS uses to send requests to the external
884
+ # key store proxy (XKS proxy). This parameter is required for custom key
885
+ # stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
886
+ #
887
+ # The protocol must be HTTPS. KMS communicates on port 443. Do not
888
+ # specify the port in the `XksProxyUriEndpoint` value.
889
+ #
890
+ # For external key stores with `XksProxyConnectivity` value of
891
+ # `VPC_ENDPOINT_SERVICE`, specify `https://` followed by the private DNS
892
+ # name of the VPC endpoint service.
893
+ #
894
+ # For external key stores with `PUBLIC_ENDPOINT` connectivity, this
895
+ # endpoint must be reachable before you create the custom key store. KMS
896
+ # connects to the external key store proxy while creating the custom key
897
+ # store. For external key stores with `VPC_ENDPOINT_SERVICE`
898
+ # connectivity, KMS connects when you call the ConnectCustomKeyStore
899
+ # operation.
762
900
  #
763
- # * {Types::CreateCustomKeyStoreResponse#custom_key_store_id #custom_key_store_id} => String
901
+ # The value of this parameter must begin with `https://`. The remainder
902
+ # can contain upper and lower case letters (A-Z and a-z), numbers (0-9),
903
+ # dots (`.`), and hyphens (`-`). Additional slashes (`/` and ``) are
904
+ # not permitted.
764
905
  #
906
+ # <b>Uniqueness requirements: </b>
765
907
  #
766
- # @example Example: To create an AWS CloudHSM custom key store
908
+ # * The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
909
+ # be unique in the Amazon Web Services account and Region.
767
910
  #
768
- # # This example creates a custom key store that is associated with an AWS CloudHSM cluster.
911
+ # * An external key store with `PUBLIC_ENDPOINT` connectivity cannot use
912
+ # the same `XksProxyUriEndpoint` value as an external key store with
913
+ # `VPC_ENDPOINT_SERVICE` connectivity in the same Amazon Web Services
914
+ # Region.
769
915
  #
770
- # resp = client.create_custom_key_store({
771
- # cloud_hsm_cluster_id: "cluster-1a23b4cdefg", # The ID of the CloudHSM cluster.
772
- # custom_key_store_name: "ExampleKeyStore", # A friendly name for the custom key store.
773
- # key_store_password: "kmsPswd", # The password for the kmsuser CU account in the specified cluster.
774
- # trust_anchor_certificate: "<certificate-goes-here>", # The content of the customerCA.crt file that you created when you initialized the cluster.
775
- # })
916
+ # * Each external key store with `VPC_ENDPOINT_SERVICE` connectivity
917
+ # must have its own private DNS name. The `XksProxyUriEndpoint` value
918
+ # for external key stores with `VPC_ENDPOINT_SERVICE` connectivity
919
+ # (private DNS name) must be unique in the Amazon Web Services account
920
+ # and Region.
776
921
  #
777
- # resp.to_h outputs the following:
778
- # {
779
- # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the new custom key store.
780
- # }
922
+ # @option params [String] :xks_proxy_uri_path
923
+ # Specifies the base path to the proxy APIs for this external key store.
924
+ # To find this value, see the documentation for your external key store
925
+ # proxy. This parameter is required for all custom key stores with a
926
+ # `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
927
+ #
928
+ # The value must start with `/` and must end with `/kms/xks/v1` where
929
+ # `v1` represents the version of the KMS external key store proxy API.
930
+ # This path can include an optional prefix between the required elements
931
+ # such as `/prefix/kms/xks/v1`.
932
+ #
933
+ # <b>Uniqueness requirements: </b>
934
+ #
935
+ # * The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
936
+ # be unique in the Amazon Web Services account and Region.
937
+ #
938
+ # ^
939
+ #
940
+ # @option params [String] :xks_proxy_vpc_endpoint_service_name
941
+ # Specifies the name of the Amazon VPC endpoint service for interface
942
+ # endpoints that is used to communicate with your external key store
943
+ # proxy (XKS proxy). This parameter is required when the value of
944
+ # `CustomKeyStoreType` is `EXTERNAL_KEY_STORE` and the value of
945
+ # `XksProxyConnectivity` is `VPC_ENDPOINT_SERVICE`.
946
+ #
947
+ # The Amazon VPC endpoint service must [fulfill all requirements][1] for
948
+ # use with an external key store.
949
+ #
950
+ # **Uniqueness requirements:**
951
+ #
952
+ # * External key stores with `VPC_ENDPOINT_SERVICE` connectivity can
953
+ # share an Amazon VPC, but each external key store must have its own
954
+ # VPC endpoint service and private DNS name.
955
+ #
956
+ # ^
957
+ #
958
+ #
959
+ #
960
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
961
+ #
962
+ # @option params [Types::XksProxyAuthenticationCredentialType] :xks_proxy_authentication_credential
963
+ # Specifies an authentication credential for the external key store
964
+ # proxy (XKS proxy). This parameter is required for all custom key
965
+ # stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
966
+ #
967
+ # The `XksProxyAuthenticationCredential` has two required elements:
968
+ # `RawSecretAccessKey`, a secret key, and `AccessKeyId`, a unique
969
+ # identifier for the `RawSecretAccessKey`. For character requirements,
970
+ # see
971
+ # [XksProxyAuthenticationCredentialType](kms/latest/APIReference/API_XksProxyAuthenticationCredentialType.html).
972
+ #
973
+ # KMS uses this authentication credential to sign requests to the
974
+ # external key store proxy on your behalf. This credential is unrelated
975
+ # to Identity and Access Management (IAM) and Amazon Web Services
976
+ # credentials.
977
+ #
978
+ # This parameter doesn't set or change the authentication credentials
979
+ # on the XKS proxy. It just tells KMS the credential that you
980
+ # established on your external key store proxy. If you rotate your proxy
981
+ # authentication credential, use the UpdateCustomKeyStore operation to
982
+ # provide the new credential to KMS.
983
+ #
984
+ # @option params [String] :xks_proxy_connectivity
985
+ # Indicates how KMS communicates with the external key store proxy. This
986
+ # parameter is required for custom key stores with a
987
+ # `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
988
+ #
989
+ # If the external key store proxy uses a public endpoint, specify
990
+ # `PUBLIC_ENDPOINT`. If the external key store proxy uses a Amazon VPC
991
+ # endpoint service for communication with KMS, specify
992
+ # `VPC_ENDPOINT_SERVICE`. For help making this choice, see [Choosing a
993
+ # connectivity option][1] in the *Key Management Service Developer
994
+ # Guide*.
995
+ #
996
+ # An Amazon VPC endpoint service keeps your communication with KMS in a
997
+ # private address space entirely within Amazon Web Services, but it
998
+ # requires more configuration, including establishing a Amazon VPC with
999
+ # multiple subnets, a VPC endpoint service, a network load balancer, and
1000
+ # a verified private DNS name. A public endpoint is simpler to set up,
1001
+ # but it might be slower and might not fulfill your security
1002
+ # requirements. You might consider testing with a public endpoint, and
1003
+ # then establishing a VPC endpoint service for production tasks. Note
1004
+ # that this choice does not determine the location of the external key
1005
+ # store proxy. Even if you choose a VPC endpoint service, the proxy can
1006
+ # be hosted within the VPC or outside of Amazon Web Services such as in
1007
+ # your corporate data center.
1008
+ #
1009
+ #
1010
+ #
1011
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/plan-xks-keystore.html#choose-xks-connectivity
1012
+ #
1013
+ # @return [Types::CreateCustomKeyStoreResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1014
+ #
1015
+ # * {Types::CreateCustomKeyStoreResponse#custom_key_store_id #custom_key_store_id} => String
781
1016
  #
782
1017
  # @example Request syntax with placeholder values
783
1018
  #
@@ -786,6 +1021,15 @@ module Aws::KMS
786
1021
  # cloud_hsm_cluster_id: "CloudHsmClusterIdType",
787
1022
  # trust_anchor_certificate: "TrustAnchorCertificateType",
788
1023
  # key_store_password: "KeyStorePasswordType",
1024
+ # custom_key_store_type: "AWS_CLOUDHSM", # accepts AWS_CLOUDHSM, EXTERNAL_KEY_STORE
1025
+ # xks_proxy_uri_endpoint: "XksProxyUriEndpointType",
1026
+ # xks_proxy_uri_path: "XksProxyUriPathType",
1027
+ # xks_proxy_vpc_endpoint_service_name: "XksProxyVpcEndpointServiceNameType",
1028
+ # xks_proxy_authentication_credential: {
1029
+ # access_key_id: "XksProxyAuthenticationAccessKeyIdType", # required
1030
+ # raw_secret_access_key: "XksProxyAuthenticationRawSecretAccessKeyType", # required
1031
+ # },
1032
+ # xks_proxy_connectivity: "PUBLIC_ENDPOINT", # accepts PUBLIC_ENDPOINT, VPC_ENDPOINT_SERVICE
789
1033
  # })
790
1034
  #
791
1035
  # @example Response structure
@@ -1060,13 +1304,22 @@ module Aws::KMS
1060
1304
  end
1061
1305
 
1062
1306
  # Creates a unique customer managed [KMS key][1] in your Amazon Web
1063
- # Services account and Region.
1064
- #
1065
- # In addition to the required parameters, you can use the optional
1066
- # parameters to specify a key policy, description, tags, and other
1067
- # useful elements for any key type.
1068
- #
1069
- # <note markdown="1"> KMS is replacing the term *customer master key (CMK)* with *KMS key*
1307
+ # Services account and Region. You can use a KMS key in cryptographic
1308
+ # operations, such as encryption and signing. Some Amazon Web Services
1309
+ # services let you use KMS keys that you create and manage to protect
1310
+ # your service resources.
1311
+ #
1312
+ # A KMS key is a logical representation of a cryptographic key. In
1313
+ # addition to the key material used in cryptographic operations, a KMS
1314
+ # key includes metadata, such as the key ID, key policy, creation date,
1315
+ # description, and key state. For details, see [Managing keys][2] in the
1316
+ # *Key Management Service Developer Guide*
1317
+ #
1318
+ # Use the parameters of `CreateKey` to specify the type of KMS key, the
1319
+ # source of its key material, its key policy, description, tags, and
1320
+ # other properties.
1321
+ #
1322
+ # <note markdown="1"> KMS has replaced the term *customer master key (CMK)* with *KMS key*
1070
1323
  # and *KMS key*. The concept has not changed. To prevent breaking
1071
1324
  # changes, KMS is keeping some variations of this term.
1072
1325
  #
@@ -1076,12 +1329,15 @@ module Aws::KMS
1076
1329
  #
1077
1330
  # Symmetric encryption KMS key
1078
1331
  #
1079
- # : To create a symmetric encryption KMS key, you aren't required to
1080
- # specify any parameters. The default value for `KeySpec`,
1081
- # `SYMMETRIC_DEFAULT`, and the default value for `KeyUsage`,
1082
- # `ENCRYPT_DECRYPT`, create a symmetric encryption KMS key. For
1083
- # technical details, see [ SYMMETRIC\_DEFAULT key spec][2] in the *Key
1084
- # Management Service Developer Guide*.
1332
+ # : By default, `CreateKey` creates a symmetric encryption KMS key with
1333
+ # key material that KMS generates. This is the basic and most widely
1334
+ # used type of KMS key, and provides the best performance.
1335
+ #
1336
+ # To create a symmetric encryption KMS key, you don't need to specify
1337
+ # any parameters. The default value for `KeySpec`,
1338
+ # `SYMMETRIC_DEFAULT`, the default value for `KeyUsage`,
1339
+ # `ENCRYPT_DECRYPT`, and the default value for `Origin`, `AWS_KMS`,
1340
+ # create a symmetric encryption KMS key with KMS key material.
1085
1341
  #
1086
1342
  # If you need a key for basic encryption and decryption or you are
1087
1343
  # creating a KMS key to protect your resources in an Amazon Web
@@ -1166,12 +1422,12 @@ module Aws::KMS
1166
1422
  #
1167
1423
  #
1168
1424
  #
1169
- # : To import your own key material, begin by creating a symmetric
1170
- # encryption KMS key with no key material. To do this, use the
1171
- # `Origin` parameter of `CreateKey` with a value of `EXTERNAL`. Next,
1172
- # use GetParametersForImport operation to get a public key and import
1173
- # token, and use the public key to encrypt your key material. Then,
1174
- # use ImportKeyMaterial with your import token to import the key
1425
+ # : To import your own key material into a KMS key, begin by creating a
1426
+ # symmetric encryption KMS key with no key material. To do this, use
1427
+ # the `Origin` parameter of `CreateKey` with a value of `EXTERNAL`.
1428
+ # Next, use GetParametersForImport operation to get a public key and
1429
+ # import token, and use the public key to encrypt your key material.
1430
+ # Then, use ImportKeyMaterial with your import token to import the key
1175
1431
  # material. For step-by-step instructions, see [Importing Key
1176
1432
  # Material][6] in the <i> <i>Key Management Service Developer
1177
1433
  # Guide</i> </i>.
@@ -1184,34 +1440,70 @@ module Aws::KMS
1184
1440
  # the `Origin` parameter of `CreateKey` with a value of `EXTERNAL` and
1185
1441
  # the `MultiRegion` parameter with a value of `True`. To create
1186
1442
  # replicas of the multi-Region primary key, use the ReplicateKey
1187
- # operation. For more information about multi-Region keys, see
1188
- # [Multi-Region keys in KMS][5] in the *Key Management Service
1443
+ # operation. For instructions, see [Importing key material into
1444
+ # multi-Region keys][7]. For more information about multi-Region keys,
1445
+ # see [Multi-Region keys in KMS][5] in the *Key Management Service
1189
1446
  # Developer Guide*.
1190
1447
  #
1191
1448
  #
1192
1449
  #
1193
1450
  # Custom key store
1194
1451
  #
1195
- # : To create a symmetric encryption KMS key in a [custom key store][7],
1196
- # use the `CustomKeyStoreId` parameter to specify the custom key
1197
- # store. You must also use the `Origin` parameter with a value of
1198
- # `AWS_CLOUDHSM`. The CloudHSM cluster that is associated with the
1199
- # custom key store must have at least two active HSMs in different
1200
- # Availability Zones in the Amazon Web Services Region.
1201
- #
1202
- # Custom key stores support only symmetric encryption KMS keys. You
1203
- # cannot create an HMAC KMS key or an asymmetric KMS key in a custom
1204
- # key store. For information about custom key stores in KMS see
1205
- # [Custom key stores in KMS][7] in the <i> <i>Key Management Service
1206
- # Developer Guide</i> </i>.
1452
+ # : A [custom key store][8] lets you protect your Amazon Web Services
1453
+ # resources using keys in a backing key store that you own and manage.
1454
+ # When you request a cryptographic operation with a KMS key in a
1455
+ # custom key store, the operation is performed in the backing key
1456
+ # store using its cryptographic keys.
1457
+ #
1458
+ # KMS supports [CloudHSM key stores][9] backed by an CloudHSM cluster
1459
+ # and [external key stores][10] backed by an external key manager
1460
+ # outside of Amazon Web Services. When you create a KMS key in an
1461
+ # CloudHSM key store, KMS generates an encryption key in the CloudHSM
1462
+ # cluster and associates it with the KMS key. When you create a KMS
1463
+ # key in an external key store, you specify an existing encryption key
1464
+ # in the external key manager.
1465
+ #
1466
+ # <note markdown="1"> Some external key managers provide a simpler method for creating a
1467
+ # KMS key in an external key store. For details, see your external key
1468
+ # manager documentation.
1469
+ #
1470
+ # </note>
1471
+ #
1472
+ # Before you create a KMS key in a custom key store, the
1473
+ # `ConnectionState` of the key store must be `CONNECTED`. To connect
1474
+ # the custom key store, use the ConnectCustomKeyStore operation. To
1475
+ # find the `ConnectionState`, use the DescribeCustomKeyStores
1476
+ # operation.
1477
+ #
1478
+ # To create a KMS key in a custom key store, use the
1479
+ # `CustomKeyStoreId`. Use the default `KeySpec` value,
1480
+ # `SYMMETRIC_DEFAULT`, and the default `KeyUsage` value,
1481
+ # `ENCRYPT_DECRYPT` to create a symmetric encryption key. No other key
1482
+ # type is supported in a custom key store.
1483
+ #
1484
+ # To create a KMS key in an [CloudHSM key store][9], use the `Origin`
1485
+ # parameter with a value of `AWS_CLOUDHSM`. The CloudHSM cluster that
1486
+ # is associated with the custom key store must have at least two
1487
+ # active HSMs in different Availability Zones in the Amazon Web
1488
+ # Services Region.
1489
+ #
1490
+ # To create a KMS key in an [external key store][10], use the `Origin`
1491
+ # parameter with a value of `EXTERNAL_KEY_STORE` and an `XksKeyId`
1492
+ # parameter that identifies an existing external key.
1493
+ #
1494
+ # <note markdown="1"> Some external key managers provide a simpler method for creating a
1495
+ # KMS key in an external key store. For details, see your external key
1496
+ # manager documentation.
1497
+ #
1498
+ # </note>
1207
1499
  #
1208
1500
  # **Cross-account use**\: No. You cannot use this operation to create a
1209
1501
  # KMS key in a different Amazon Web Services account.
1210
1502
  #
1211
- # **Required permissions**\: [kms:CreateKey][8] (IAM policy). To use the
1212
- # `Tags` parameter, [kms:TagResource][8] (IAM policy). For examples and
1213
- # information about related permissions, see [Allow a user to create KMS
1214
- # keys][9] in the *Key Management Service Developer Guide*.
1503
+ # **Required permissions**\: [kms:CreateKey][11] (IAM policy). To use
1504
+ # the `Tags` parameter, [kms:TagResource][11] (IAM policy). For examples
1505
+ # and information about related permissions, see [Allow a user to create
1506
+ # KMS keys][12] in the *Key Management Service Developer Guide*.
1215
1507
  #
1216
1508
  # **Related operations:**
1217
1509
  #
@@ -1224,29 +1516,29 @@ module Aws::KMS
1224
1516
  #
1225
1517
  #
1226
1518
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys
1227
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-symmetric-default
1519
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html
1228
1520
  # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
1229
1521
  # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
1230
1522
  # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
1231
1523
  # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1232
- # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1233
- # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1234
- # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
1524
+ # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html
1525
+ # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1526
+ # [9]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
1527
+ # [10]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
1528
+ # [11]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
1529
+ # [12]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
1235
1530
  #
1236
1531
  # @option params [String] :policy
1237
- # The key policy to attach to the KMS key. If you do not specify a key
1238
- # policy, KMS attaches a default key policy to the KMS key. For more
1239
- # information, see [Default key policy][1] in the *Key Management
1240
- # Service Developer Guide*.
1532
+ # The key policy to attach to the KMS key.
1241
1533
  #
1242
1534
  # If you provide a key policy, it must meet the following criteria:
1243
1535
  #
1244
- # * If you don't set `BypassPolicyLockoutSafetyCheck` to `True`, the
1245
- # key policy must allow the principal that is making the `CreateKey`
1536
+ # * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
1537
+ # policy must allow the principal that is making the `CreateKey`
1246
1538
  # request to make a subsequent PutKeyPolicy request on the KMS key.
1247
1539
  # This reduces the risk that the KMS key becomes unmanageable. For
1248
1540
  # more information, refer to the scenario in the [Default Key
1249
- # Policy][2] section of the <i> <i>Key Management Service Developer
1541
+ # Policy][1] section of the <i> <i>Key Management Service Developer
1250
1542
  # Guide</i> </i>.
1251
1543
  #
1252
1544
  # * Each statement in the key policy must contain one or more
@@ -1256,33 +1548,25 @@ module Aws::KMS
1256
1548
  # delay before including the new principal in a key policy because the
1257
1549
  # new principal might not be immediately visible to KMS. For more
1258
1550
  # information, see [Changes that I make are not always immediately
1259
- # visible][3] in the *Amazon Web Services Identity and Access
1551
+ # visible][2] in the *Amazon Web Services Identity and Access
1260
1552
  # Management User Guide*.
1261
1553
  #
1262
- # A key policy document can include only the following characters:
1554
+ # If you do not provide a key policy, KMS attaches a default key policy
1555
+ # to the KMS key. For more information, see [Default Key Policy][3] in
1556
+ # the *Key Management Service Developer Guide*.
1263
1557
  #
1264
- # * Printable ASCII characters from the space character (`\u0020`)
1265
- # through the end of the ASCII character range.
1558
+ # The key policy size quota is 32 kilobytes (32768 bytes).
1266
1559
  #
1267
- # * Printable characters in the Basic Latin and Latin-1 Supplement
1268
- # character set (through `\u00FF`).
1560
+ # For help writing and formatting a JSON policy document, see the [IAM
1561
+ # JSON Policy Reference][4] in the <i> <i>Identity and Access Management
1562
+ # User Guide</i> </i>.
1269
1563
  #
1270
- # * The tab (`\u0009`), line feed (`\u000A`), and carriage return
1271
- # (`\u000D`) special characters
1272
1564
  #
1273
- # For information about key policies, see [Key policies in KMS][4] in
1274
- # the *Key Management Service Developer Guide*. For help writing and
1275
- # formatting a JSON policy document, see the [IAM JSON Policy
1276
- # Reference][5] in the <i> <i>Identity and Access Management User
1277
- # Guide</i> </i>.
1278
1565
  #
1279
- #
1280
- #
1281
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
1282
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1283
- # [3]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
1284
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
1285
- # [5]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1566
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam
1567
+ # [2]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
1568
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
1569
+ # [4]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
1286
1570
  #
1287
1571
  # @option params [String] :description
1288
1572
  # A description of the KMS key.
@@ -1326,8 +1610,8 @@ module Aws::KMS
1326
1610
  #
1327
1611
  # The `KeySpec` and `CustomerMasterKeySpec` parameters work the same
1328
1612
  # way. Only the names differ. We recommend that you use `KeySpec`
1329
- # parameter in your code. However, to avoid breaking changes, KMS will
1330
- # support both parameters.
1613
+ # parameter in your code. However, to avoid breaking changes, KMS
1614
+ # supports both parameters.
1331
1615
  #
1332
1616
  # @option params [String] :key_spec
1333
1617
  # Specifies the type of KMS key to create. The default value,
@@ -1338,13 +1622,13 @@ module Aws::KMS
1338
1622
  # in the <i> <i>Key Management Service Developer Guide</i> </i>.
1339
1623
  #
1340
1624
  # The `KeySpec` determines whether the KMS key contains a symmetric key
1341
- # or an asymmetric key pair. It also determines the cryptographic
1342
- # algorithms that the KMS key supports. You can't change the `KeySpec`
1343
- # after the KMS key is created. To further restrict the algorithms that
1344
- # can be used with the KMS key, use a condition key in its key policy or
1345
- # IAM policy. For more information, see [kms:EncryptionAlgorithm][2],
1346
- # [kms:MacAlgorithm][3] or [kms:Signing Algorithm][4] in the <i> <i>Key
1347
- # Management Service Developer Guide</i> </i>.
1625
+ # or an asymmetric key pair. It also determines the algorithms that the
1626
+ # KMS key supports. You can't change the `KeySpec` after the KMS key is
1627
+ # created. To further restrict the algorithms that can be used with the
1628
+ # KMS key, use a condition key in its key policy or IAM policy. For more
1629
+ # information, see [kms:EncryptionAlgorithm][2], [kms:MacAlgorithm][3]
1630
+ # or [kms:Signing Algorithm][4] in the <i> <i>Key Management Service
1631
+ # Developer Guide</i> </i>.
1348
1632
  #
1349
1633
  # [Amazon Web Services services that are integrated with KMS][5] use
1350
1634
  # symmetric encryption KMS keys to protect your data. These services do
@@ -1409,44 +1693,46 @@ module Aws::KMS
1409
1693
  # origin after you create the KMS key. The default is `AWS_KMS`, which
1410
1694
  # means that KMS creates the key material.
1411
1695
  #
1412
- # To create a KMS key with no key material (for imported key material),
1413
- # set the value to `EXTERNAL`. For more information about importing key
1414
- # material into KMS, see [Importing Key Material][1] in the *Key
1415
- # Management Service Developer Guide*. This value is valid only for
1416
- # symmetric encryption KMS keys.
1696
+ # To [create a KMS key with no key material][1] (for imported key
1697
+ # material), set this value to `EXTERNAL`. For more information about
1698
+ # importing key material into KMS, see [Importing Key Material][2] in
1699
+ # the *Key Management Service Developer Guide*. The `EXTERNAL` origin
1700
+ # value is valid only for symmetric KMS keys.
1417
1701
  #
1418
- # To create a KMS key in an KMS [custom key store][2] and create its key
1702
+ # To [create a KMS key in an CloudHSM key store][3] and create its key
1419
1703
  # material in the associated CloudHSM cluster, set this value to
1420
1704
  # `AWS_CLOUDHSM`. You must also use the `CustomKeyStoreId` parameter to
1421
- # identify the custom key store. This value is valid only for symmetric
1422
- # encryption KMS keys.
1705
+ # identify the CloudHSM key store. The `KeySpec` value must be
1706
+ # `SYMMETRIC_DEFAULT`.
1707
+ #
1708
+ # To [create a KMS key in an external key store][4], set this value to
1709
+ # `EXTERNAL_KEY_STORE`. You must also use the `CustomKeyStoreId`
1710
+ # parameter to identify the external key store and the `XksKeyId`
1711
+ # parameter to identify the associated external key. The `KeySpec` value
1712
+ # must be `SYMMETRIC_DEFAULT`.
1423
1713
  #
1424
1714
  #
1425
1715
  #
1426
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1427
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
1716
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html
1717
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
1718
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/create-cmk-keystore.html
1719
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keys.html
1428
1720
  #
1429
1721
  # @option params [String] :custom_key_store_id
1430
- # Creates the KMS key in the specified [custom key store][1] and the key
1431
- # material in its associated CloudHSM cluster. To create a KMS key in a
1432
- # custom key store, you must also specify the `Origin` parameter with a
1433
- # value of `AWS_CLOUDHSM`. The CloudHSM cluster that is associated with
1434
- # the custom key store must have at least two active HSMs, each in a
1435
- # different Availability Zone in the Region.
1722
+ # Creates the KMS key in the specified [custom key store][1]. The
1723
+ # `ConnectionState` of the custom key store must be `CONNECTED`. To find
1724
+ # the CustomKeyStoreID and ConnectionState use the
1725
+ # DescribeCustomKeyStores operation.
1436
1726
  #
1437
1727
  # This parameter is valid only for symmetric encryption KMS keys in a
1438
1728
  # single Region. You cannot create any other type of KMS key in a custom
1439
1729
  # key store.
1440
1730
  #
1441
- # To find the ID of a custom key store, use the DescribeCustomKeyStores
1442
- # operation.
1443
- #
1444
- # The response includes the custom key store ID and the ID of the
1445
- # CloudHSM cluster.
1446
- #
1447
- # This operation is part of the [custom key store feature][1] feature in
1448
- # KMS, which combines the convenience and extensive integration of KMS
1449
- # with the isolation and control of a single-tenant key store.
1731
+ # When you create a KMS key in an CloudHSM key store, KMS generates a
1732
+ # non-exportable 256-bit symmetric key in its associated CloudHSM
1733
+ # cluster and associates it with the KMS key. When you create a KMS key
1734
+ # in an external key store, you must use the `XksKeyId` parameter to
1735
+ # specify an external key that serves as key material for the KMS key.
1450
1736
  #
1451
1737
  #
1452
1738
  #
@@ -1479,7 +1765,7 @@ module Aws::KMS
1479
1765
  # TagResource operation.
1480
1766
  #
1481
1767
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
1482
- # key. For details, see [ABAC in KMS][1] in the *Key Management Service
1768
+ # key. For details, see [ABAC for KMS][1] in the *Key Management Service
1483
1769
  # Developer Guide*.
1484
1770
  #
1485
1771
  # </note>
@@ -1526,15 +1812,50 @@ module Aws::KMS
1526
1812
  # This value creates a *primary key*, not a replica. To create a
1527
1813
  # *replica key*, use the ReplicateKey operation.
1528
1814
  #
1529
- # You can create a multi-Region version of a symmetric encryption KMS
1530
- # key, an HMAC KMS key, an asymmetric KMS key, or a KMS key with
1531
- # imported key material. However, you cannot create a multi-Region key
1532
- # in a custom key store.
1815
+ # You can create a symmetric or asymmetric multi-Region key, and you can
1816
+ # create a multi-Region key with imported key material. However, you
1817
+ # cannot create a multi-Region key in a custom key store.
1533
1818
  #
1534
1819
  #
1535
1820
  #
1536
1821
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
1537
1822
  #
1823
+ # @option params [String] :xks_key_id
1824
+ # Identifies the [external key][1] that serves as key material for the
1825
+ # KMS key in an [external key store][2]. Specify the ID that the
1826
+ # [external key store proxy][3] uses to refer to the external key. For
1827
+ # help, see the documentation for your external key store proxy.
1828
+ #
1829
+ # This parameter is required for a KMS key with an `Origin` value of
1830
+ # `EXTERNAL_KEY_STORE`. It is not valid for KMS keys with any other
1831
+ # `Origin` value.
1832
+ #
1833
+ # The external key must be an existing 256-bit AES symmetric encryption
1834
+ # key hosted outside of Amazon Web Services in an external key manager
1835
+ # associated with the external key store specified by the
1836
+ # `CustomKeyStoreId` parameter. This key must be enabled and configured
1837
+ # to perform encryption and decryption. Each KMS key in an external key
1838
+ # store must use a different external key. For details, see
1839
+ # [Requirements for a KMS key in an external key store][4] in the *Key
1840
+ # Management Service Developer Guide*.
1841
+ #
1842
+ # Each KMS key in an external key store is associated two backing keys.
1843
+ # One is key material that KMS generates. The other is the external key
1844
+ # specified by this parameter. When you use the KMS key in an external
1845
+ # key store to encrypt data, the encryption operation is performed first
1846
+ # by KMS using the KMS key material, and then by the external key
1847
+ # manager using the specified external key, a process known as *double
1848
+ # encryption*. For details, see [Double encryption][5] in the *Key
1849
+ # Management Service Developer Guide*.
1850
+ #
1851
+ #
1852
+ #
1853
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
1854
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
1855
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-xks-proxy
1856
+ # [4]: https://docs.aws.amazon.com/create-xks-keys.html#xks-key-requirements
1857
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-double-encryption
1858
+ #
1538
1859
  # @return [Types::CreateKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
1539
1860
  #
1540
1861
  # * {Types::CreateKeyResponse#key_metadata #key_metadata} => Types::KeyMetadata
@@ -1636,6 +1957,38 @@ module Aws::KMS
1636
1957
  # }, # Detailed information about the KMS key that this operation creates.
1637
1958
  # }
1638
1959
  #
1960
+ # @example Example: To create an HMAC KMS key
1961
+ #
1962
+ # # This example creates a 384-bit symmetric HMAC KMS key. The GENERATE_VERIFY_MAC key usage value is required even though
1963
+ # # 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.
1964
+ #
1965
+ # resp = client.create_key({
1966
+ # key_spec: "HMAC_384", # Describes the type of key material in the KMS key.
1967
+ # key_usage: "GENERATE_VERIFY_MAC", # The cryptographic operations for which you can use the KMS key.
1968
+ # })
1969
+ #
1970
+ # resp.to_h outputs the following:
1971
+ # {
1972
+ # key_metadata: {
1973
+ # aws_account_id: "111122223333",
1974
+ # arn: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
1975
+ # creation_date: Time.parse("2022-04-05T14:04:55-07:00"),
1976
+ # customer_master_key_spec: "HMAC_384",
1977
+ # description: "",
1978
+ # enabled: true,
1979
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
1980
+ # key_manager: "CUSTOMER",
1981
+ # key_spec: "HMAC_384",
1982
+ # key_state: "Enabled",
1983
+ # key_usage: "GENERATE_VERIFY_MAC",
1984
+ # mac_algorithms: [
1985
+ # "HMAC_SHA_384",
1986
+ # ],
1987
+ # multi_region: false,
1988
+ # origin: "AWS_KMS",
1989
+ # }, # Detailed information about the KMS key that this operation creates.
1990
+ # }
1991
+ #
1639
1992
  # @example Example: To create a multi-Region primary KMS key
1640
1993
  #
1641
1994
  # # This example creates a multi-Region primary symmetric encryption key. Because the default values for all parameters
@@ -1679,7 +2032,7 @@ module Aws::KMS
1679
2032
  # @example Example: To create a KMS key for imported key material
1680
2033
  #
1681
2034
  # # This example creates a KMS key with no key material. When the operation is complete, you can import your own key
1682
- # # material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
2035
+ # # material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
1683
2036
  #
1684
2037
  # resp = client.create_key({
1685
2038
  # origin: "EXTERNAL", # The source of the key material for the KMS key.
@@ -1707,11 +2060,11 @@ module Aws::KMS
1707
2060
  # }, # Detailed information about the KMS key that this operation creates.
1708
2061
  # }
1709
2062
  #
1710
- # @example Example: To create a KMS key in a custom key store
2063
+ # @example Example: To create a KMS key in an AWS CloudHSM key store
1711
2064
  #
1712
- # # This example creates a KMS key in the specified custom key store. The operation creates the KMS key and its metadata in
1713
- # # AWS KMS and the key material in the AWS CloudHSM cluster associated with the custom key store. This example requires the
1714
- # # Origin and CustomKeyStoreId parameters.
2065
+ # # This example creates a KMS key in the specified AWS CloudHSM key store. The operation creates the KMS key and its
2066
+ # # metadata in AWS KMS and creates the key material in the AWS CloudHSM cluster associated with the custom key store. This
2067
+ # # example requires the CustomKeyStoreId and Origin parameters.
1715
2068
  #
1716
2069
  # resp = client.create_key({
1717
2070
  # custom_key_store_id: "cks-1234567890abcdef0", # Identifies the custom key store that hosts the KMS key.
@@ -1742,35 +2095,41 @@ module Aws::KMS
1742
2095
  # }, # Detailed information about the KMS key that this operation creates.
1743
2096
  # }
1744
2097
  #
1745
- # @example Example: To create an HMAC KMS key
2098
+ # @example Example: To create a KMS key in an external key store
1746
2099
  #
1747
- # # This example creates a 384-bit symmetric HMAC KMS key. The GENERATE_VERIFY_MAC key usage value is required even though
1748
- # # 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.
2100
+ # # This example creates a KMS key in the specified external key store. It uses the XksKeyId parameter to associate the KMS
2101
+ # # key with an existing symmetric encryption key in your external key manager. This CustomKeyStoreId, Origin, and XksKeyId
2102
+ # # parameters are required in this operation.
1749
2103
  #
1750
2104
  # resp = client.create_key({
1751
- # key_spec: "HMAC_384", # Describes the type of key material in the KMS key.
1752
- # key_usage: "GENERATE_VERIFY_MAC", # The cryptographic operations for which you can use the KMS key.
2105
+ # custom_key_store_id: "cks-9876543210fedcba9", # Identifies the custom key store that hosts the KMS key.
2106
+ # origin: "EXTERNAL_KEY_STORE", # Indicates the source of the key material for the KMS key.
2107
+ # xks_key_id: "bb8562717f809024", # Identifies the encryption key in your external key manager that is associated with the KMS key
1753
2108
  # })
1754
2109
  #
1755
2110
  # resp.to_h outputs the following:
1756
2111
  # {
1757
2112
  # key_metadata: {
1758
2113
  # aws_account_id: "111122223333",
1759
- # arn: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
1760
- # creation_date: Time.parse("2022-04-05T14:04:55-07:00"),
1761
- # customer_master_key_spec: "HMAC_384",
2114
+ # arn: "arn:aws:kms:us-east-2:111122223333:key/0987dcba-09fe-87dc-65ba-ab0987654321",
2115
+ # creation_date: Time.parse("2022-02-02T07:48:55-07:00"),
2116
+ # custom_key_store_id: "cks-9876543210fedcba9",
2117
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
1762
2118
  # description: "",
1763
2119
  # enabled: true,
1764
- # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
2120
+ # encryption_algorithms: [
2121
+ # "SYMMETRIC_DEFAULT",
2122
+ # ],
2123
+ # key_id: "0987dcba-09fe-87dc-65ba-ab0987654321",
1765
2124
  # key_manager: "CUSTOMER",
1766
- # key_spec: "HMAC_384",
2125
+ # key_spec: "SYMMETRIC_DEFAULT",
1767
2126
  # key_state: "Enabled",
1768
- # key_usage: "GENERATE_VERIFY_MAC",
1769
- # mac_algorithms: [
1770
- # "HMAC_SHA_384",
1771
- # ],
2127
+ # key_usage: "ENCRYPT_DECRYPT",
1772
2128
  # multi_region: false,
1773
- # origin: "AWS_KMS",
2129
+ # origin: "EXTERNAL_KEY_STORE",
2130
+ # xks_key_configuration: {
2131
+ # id: "bb8562717f809024",
2132
+ # },
1774
2133
  # }, # Detailed information about the KMS key that this operation creates.
1775
2134
  # }
1776
2135
  #
@@ -1782,7 +2141,7 @@ module Aws::KMS
1782
2141
  # key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC
1783
2142
  # 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
1784
2143
  # 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
1785
- # origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM
2144
+ # origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM, EXTERNAL_KEY_STORE
1786
2145
  # custom_key_store_id: "CustomKeyStoreIdType",
1787
2146
  # bypass_policy_lockout_safety_check: false,
1788
2147
  # tags: [
@@ -1792,6 +2151,7 @@ module Aws::KMS
1792
2151
  # },
1793
2152
  # ],
1794
2153
  # multi_region: false,
2154
+ # xks_key_id: "XksKeyIdType",
1795
2155
  # })
1796
2156
  #
1797
2157
  # @example Response structure
@@ -1806,7 +2166,7 @@ module Aws::KMS
1806
2166
  # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
1807
2167
  # resp.key_metadata.deletion_date #=> Time
1808
2168
  # resp.key_metadata.valid_to #=> Time
1809
- # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
2169
+ # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
1810
2170
  # resp.key_metadata.custom_key_store_id #=> String
1811
2171
  # resp.key_metadata.cloud_hsm_cluster_id #=> String
1812
2172
  # resp.key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
@@ -1827,6 +2187,7 @@ module Aws::KMS
1827
2187
  # resp.key_metadata.pending_deletion_window_in_days #=> Integer
1828
2188
  # resp.key_metadata.mac_algorithms #=> Array
1829
2189
  # resp.key_metadata.mac_algorithms[0] #=> String, one of "HMAC_SHA_224", "HMAC_SHA_256", "HMAC_SHA_384", "HMAC_SHA_512"
2190
+ # resp.key_metadata.xks_key_configuration.id #=> String
1830
2191
  #
1831
2192
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey AWS API Documentation
1832
2193
  #
@@ -1859,10 +2220,10 @@ module Aws::KMS
1859
2220
  #
1860
2221
  # The `Decrypt` operation also decrypts ciphertext that was encrypted
1861
2222
  # outside of KMS by the public key in an KMS asymmetric KMS key.
1862
- # However, it cannot decrypt ciphertext produced by other libraries,
1863
- # such as the [Amazon Web Services Encryption SDK][2] or [Amazon S3
1864
- # client-side encryption][3]. These libraries return a ciphertext format
1865
- # that is incompatible with KMS.
2223
+ # However, it cannot decrypt symmetric ciphertext produced by other
2224
+ # libraries, such as the [Amazon Web Services Encryption SDK][2] or
2225
+ # [Amazon S3 client-side encryption][3]. These libraries return a
2226
+ # ciphertext format that is incompatible with KMS.
1866
2227
  #
1867
2228
  # If the ciphertext was encrypted under a symmetric encryption KMS key,
1868
2229
  # the `KeyId` parameter is optional. KMS can get this information from
@@ -2058,7 +2419,7 @@ module Aws::KMS
2058
2419
  # Deletes the specified alias.
2059
2420
  #
2060
2421
  # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
2061
- # the KMS key. For details, see [ABAC in KMS][1] in the *Key Management
2422
+ # the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
2062
2423
  # Service Developer Guide*.
2063
2424
  #
2064
2425
  # </note>
@@ -2129,37 +2490,44 @@ module Aws::KMS
2129
2490
  req.send_request(options)
2130
2491
  end
2131
2492
 
2132
- # Deletes a [custom key store][1]. This operation does not delete the
2133
- # CloudHSM cluster that is associated with the custom key store, or
2134
- # affect any users or keys in the cluster.
2493
+ # Deletes a [custom key store][1]. This operation does not affect any
2494
+ # backing elements of the custom key store. It does not delete the
2495
+ # CloudHSM cluster that is associated with an CloudHSM key store, or
2496
+ # affect any users or keys in the cluster. For an external key store, it
2497
+ # does not affect the external key store proxy, external key manager, or
2498
+ # any external keys.
2499
+ #
2500
+ # This operation is part of the [custom key stores][1] feature in KMS,
2501
+ # which combines the convenience and extensive integration of KMS with
2502
+ # the isolation and control of a key store that you own and manage.
2135
2503
  #
2136
2504
  # The custom key store that you delete cannot contain any [KMS keys][2].
2137
2505
  # Before deleting the key store, verify that you will never need to use
2138
2506
  # any of the KMS keys in the key store for any [cryptographic
2139
2507
  # operations][3]. Then, use ScheduleKeyDeletion to delete the KMS keys
2140
- # from the key store. When the scheduled waiting period expires, the
2141
- # `ScheduleKeyDeletion` operation deletes the KMS keys. Then it makes a
2142
- # best effort to delete the key material from the associated cluster.
2143
- # However, you might need to manually [delete the orphaned key
2144
- # material][4] from the cluster and its backups.
2145
- #
2146
- # After all KMS keys are deleted from KMS, use DisconnectCustomKeyStore
2147
- # to disconnect the key store from KMS. Then, you can delete the custom
2148
- # key store.
2149
- #
2150
- # Instead of deleting the custom key store, consider using
2151
- # DisconnectCustomKeyStore to disconnect it from KMS. While the key
2152
- # store is disconnected, you cannot create or use the KMS keys in the
2153
- # key store. But, you do not need to delete KMS keys and you can
2154
- # reconnect a disconnected custom key store at any time.
2508
+ # from the key store. After the required waiting period expires and all
2509
+ # KMS keys are deleted from the custom key store, use
2510
+ # DisconnectCustomKeyStore to disconnect the key store from KMS. Then,
2511
+ # you can delete the custom key store.
2512
+ #
2513
+ # For keys in an CloudHSM key store, the `ScheduleKeyDeletion` operation
2514
+ # makes a best effort to delete the key material from the associated
2515
+ # cluster. However, you might need to manually [delete the orphaned key
2516
+ # material][4] from the cluster and its backups. KMS never creates,
2517
+ # manages, or deletes cryptographic keys in the external key manager
2518
+ # associated with an external key store. You must manage them using your
2519
+ # external key manager tools.
2520
+ #
2521
+ # Instead of deleting the custom key store, consider using the
2522
+ # DisconnectCustomKeyStore operation to disconnect the custom key store
2523
+ # from its backing key store. While the key store is disconnected, you
2524
+ # cannot create or use the KMS keys in the key store. But, you do not
2525
+ # need to delete KMS keys and you can reconnect a disconnected custom
2526
+ # key store at any time.
2155
2527
  #
2156
2528
  # If the operation succeeds, it returns a JSON object with no
2157
2529
  # properties.
2158
2530
  #
2159
- # This operation is part of the [custom key store feature][1] feature in
2160
- # KMS, which combines the convenience and extensive integration of KMS
2161
- # with the isolation and control of a single-tenant key store.
2162
- #
2163
2531
  # **Cross-account use**\: No. You cannot perform this operation on a
2164
2532
  # custom key store in a different Amazon Web Services account.
2165
2533
  #
@@ -2194,9 +2562,9 @@ module Aws::KMS
2194
2562
  #
2195
2563
  # @example Example: To delete a custom key store from AWS KMS
2196
2564
  #
2197
- # # This example deletes a custom key store from AWS KMS. This operation does not delete the AWS CloudHSM cluster that was
2198
- # # associated with the CloudHSM cluster. This operation doesn't return any data. To verify that the operation was
2199
- # # successful, use the DescribeCustomKeyStores operation.
2565
+ # # This example deletes a custom key store from AWS KMS. This operation does not affect the backing key store, such as a
2566
+ # # CloudHSM cluster, external key store proxy, or your external key manager. This operation doesn't return any data. To
2567
+ # # verify that the operation was successful, use the DescribeCustomKeyStores operation.
2200
2568
  #
2201
2569
  # resp = client.delete_custom_key_store({
2202
2570
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store to be deleted.
@@ -2300,9 +2668,9 @@ module Aws::KMS
2300
2668
  # Gets information about [custom key stores][1] in the account and
2301
2669
  # Region.
2302
2670
  #
2303
- # This operation is part of the [custom key store feature][1] feature in
2304
- # KMS, which combines the convenience and extensive integration of KMS
2305
- # with the isolation and control of a single-tenant key store.
2671
+ # This operation is part of the [custom key stores][1] feature in KMS,
2672
+ # which combines the convenience and extensive integration of KMS with
2673
+ # the isolation and control of a key store that you own and manage.
2306
2674
  #
2307
2675
  # By default, this operation returns information about all custom key
2308
2676
  # stores in the account and Region. To get only information about a
@@ -2310,27 +2678,32 @@ module Aws::KMS
2310
2678
  # `CustomKeyStoreId` parameter (but not both).
2311
2679
  #
2312
2680
  # To determine whether the custom key store is connected to its CloudHSM
2313
- # cluster, use the `ConnectionState` element in the response. If an
2314
- # attempt to connect the custom key store failed, the `ConnectionState`
2315
- # value is `FAILED` and the `ConnectionErrorCode` element in the
2316
- # response indicates the cause of the failure. For help interpreting the
2317
- # `ConnectionErrorCode`, see CustomKeyStoresListEntry.
2681
+ # cluster or external key store proxy, use the `ConnectionState` element
2682
+ # in the response. If an attempt to connect the custom key store failed,
2683
+ # the `ConnectionState` value is `FAILED` and the `ConnectionErrorCode`
2684
+ # element in the response indicates the cause of the failure. For help
2685
+ # interpreting the `ConnectionErrorCode`, see CustomKeyStoresListEntry.
2318
2686
  #
2319
2687
  # Custom key stores have a `DISCONNECTED` connection state if the key
2320
- # store has never been connected or you use the DisconnectCustomKeyStore
2321
- # operation to disconnect it. If your custom key store state is
2322
- # `CONNECTED` but you are having trouble using it, make sure that its
2323
- # associated CloudHSM cluster is active and contains the minimum number
2324
- # of HSMs required for the operation, if any.
2325
- #
2326
- # For help repairing your custom key store, see the [Troubleshooting
2327
- # Custom Key Stores][2] topic in the *Key Management Service Developer
2328
- # Guide*.
2688
+ # store has never been connected or you used the
2689
+ # DisconnectCustomKeyStore operation to disconnect it. Otherwise, the
2690
+ # connection state is CONNECTED. If your custom key store connection
2691
+ # state is `CONNECTED` but you are having trouble using it, verify that
2692
+ # the backing store is active and available. For an CloudHSM key store,
2693
+ # verify that the associated CloudHSM cluster is active and contains the
2694
+ # minimum number of HSMs required for the operation, if any. For an
2695
+ # external key store, verify that the external key store proxy and its
2696
+ # associated external key manager are reachable and enabled.
2697
+ #
2698
+ # For help repairing your CloudHSM key store, see the [Troubleshooting
2699
+ # CloudHSM key stores][2]. For help repairing your external key store,
2700
+ # see the [Troubleshooting external key stores][3]. Both topics are in
2701
+ # the *Key Management Service Developer Guide*.
2329
2702
  #
2330
2703
  # **Cross-account use**\: No. You cannot perform this operation on a
2331
2704
  # custom key store in a different Amazon Web Services account.
2332
2705
  #
2333
- # **Required permissions**\: [kms:DescribeCustomKeyStores][3] (IAM
2706
+ # **Required permissions**\: [kms:DescribeCustomKeyStores][4] (IAM
2334
2707
  # policy)
2335
2708
  #
2336
2709
  # **Related operations:**
@@ -2349,7 +2722,8 @@ module Aws::KMS
2349
2722
  #
2350
2723
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
2351
2724
  # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
2352
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2725
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
2726
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
2353
2727
  #
2354
2728
  # @option params [String] :custom_key_store_id
2355
2729
  # Gets only information about the specified custom key store. Enter the
@@ -2357,7 +2731,7 @@ module Aws::KMS
2357
2731
  #
2358
2732
  # By default, this operation gets information about all custom key
2359
2733
  # stores in the account and Region. To limit the output to a particular
2360
- # custom key store, you can use either the `CustomKeyStoreId` or
2734
+ # custom key store, provide either the `CustomKeyStoreId` or
2361
2735
  # `CustomKeyStoreName` parameter, but not both.
2362
2736
  #
2363
2737
  # @option params [String] :custom_key_store_name
@@ -2366,7 +2740,7 @@ module Aws::KMS
2366
2740
  #
2367
2741
  # By default, this operation gets information about all custom key
2368
2742
  # stores in the account and Region. To limit the output to a particular
2369
- # custom key store, you can use either the `CustomKeyStoreId` or
2743
+ # custom key store, provide either the `CustomKeyStoreId` or
2370
2744
  # `CustomKeyStoreName` parameter, but not both.
2371
2745
  #
2372
2746
  # @option params [Integer] :limit
@@ -2402,10 +2776,10 @@ module Aws::KMS
2402
2776
  # ], # Details about each custom key store in the account and Region.
2403
2777
  # }
2404
2778
  #
2405
- # @example Example: To get detailed information about a custom key store associated with a CloudHSM cluster.
2779
+ # @example Example: To get detailed information about an AWS CloudHSM key store by specifying its friendly name
2406
2780
  #
2407
- # # This example gets detailed information about a particular AWS KMS custom key store that is associate with an AWS
2408
- # # CloudHSM cluster. To limit the output to a particular custom key store, provide the custom key store name or ID.
2781
+ # # This example gets detailed information about a particular AWS CloudHSM key store by specifying its friendly name. To
2782
+ # # limit the output to a particular custom key store, provide either the custom key store name or ID.
2409
2783
  #
2410
2784
  # resp = client.describe_custom_key_stores({
2411
2785
  # custom_key_store_name: "ExampleKeyStore", # The friendly name of the custom key store.
@@ -2420,11 +2794,71 @@ module Aws::KMS
2420
2794
  # creation_date: Time.parse("1.499288695918E9"),
2421
2795
  # custom_key_store_id: "cks-1234567890abcdef0",
2422
2796
  # custom_key_store_name: "ExampleKeyStore",
2797
+ # custom_key_store_type: "AWS_CLOUDHSM",
2423
2798
  # trust_anchor_certificate: "<certificate appears here>",
2424
2799
  # },
2425
2800
  # ], # Detailed information about the specified custom key store.
2426
2801
  # }
2427
2802
  #
2803
+ # @example Example: To get detailed information about an external key store by specifying its ID
2804
+ #
2805
+ # # This example gets detailed information about an external key store by specifying its ID. The example external key store
2806
+ # # proxy uses public endpoint connectivity.
2807
+ #
2808
+ # resp = client.describe_custom_key_stores({
2809
+ # custom_key_store_id: "cks-9876543210fedcba9", # The ID of the custom key store.
2810
+ # })
2811
+ #
2812
+ # resp.to_h outputs the following:
2813
+ # {
2814
+ # custom_key_stores: [
2815
+ # {
2816
+ # connection_state: "CONNECTED",
2817
+ # creation_date: Time.parse("1.599288695918E9"),
2818
+ # custom_key_store_id: "cks-9876543210fedcba9",
2819
+ # custom_key_store_name: "ExampleExternalKeyStore",
2820
+ # custom_key_store_type: "EXTERNAL_KEY_STORE",
2821
+ # xks_proxy_configuration: {
2822
+ # access_key_id: "ABCDE12345670EXAMPLE",
2823
+ # connectivity: "PUBLIC_ENDPOINT",
2824
+ # uri_endpoint: "https://myproxy.xks.example.com",
2825
+ # uri_path: "/kms/xks/v1",
2826
+ # },
2827
+ # },
2828
+ # ], # Detailed information about the specified custom key store.
2829
+ # }
2830
+ #
2831
+ # @example Example: To get detailed information about an external key store VPC endpoint connectivity by specifying its friendly name
2832
+ #
2833
+ # # This example gets detailed information about a particular external key store by specifying its friendly name. To limit
2834
+ # # the output to a particular custom key store, provide either the custom key store name or ID. The proxy URI path for this
2835
+ # # external key store includes an optional prefix. Also, because this example external key store uses VPC endpoint
2836
+ # # connectivity, the response includes the associated VPC endpoint service name.
2837
+ #
2838
+ # resp = client.describe_custom_key_stores({
2839
+ # custom_key_store_name: "VPCExternalKeystore",
2840
+ # })
2841
+ #
2842
+ # resp.to_h outputs the following:
2843
+ # {
2844
+ # custom_key_stores: [
2845
+ # {
2846
+ # connection_state: "CONNECTED",
2847
+ # creation_date: Time.parse("1.643057863.842"),
2848
+ # custom_key_store_id: "cks-876543210fedcba98",
2849
+ # custom_key_store_name: "ExampleVPCExternalKeyStore",
2850
+ # custom_key_store_type: "EXTERNAL_KEY_STORE",
2851
+ # xks_proxy_configuration: {
2852
+ # access_key_id: "ABCDE12345670EXAMPLE",
2853
+ # connectivity: "VPC_ENDPOINT_SERVICE",
2854
+ # uri_endpoint: "https://myproxy-private.xks.example.com",
2855
+ # uri_path: "/example-prefix/kms/xks/v1",
2856
+ # vpc_endpoint_service_name: "com.amazonaws.vpce.us-east-1.vpce-svc-example1",
2857
+ # },
2858
+ # },
2859
+ # ], # Detailed information about the specified custom key store.
2860
+ # }
2861
+ #
2428
2862
  # @example Request syntax with placeholder values
2429
2863
  #
2430
2864
  # resp = client.describe_custom_key_stores({
@@ -2442,8 +2876,14 @@ module Aws::KMS
2442
2876
  # resp.custom_key_stores[0].cloud_hsm_cluster_id #=> String
2443
2877
  # resp.custom_key_stores[0].trust_anchor_certificate #=> String
2444
2878
  # resp.custom_key_stores[0].connection_state #=> String, one of "CONNECTED", "CONNECTING", "FAILED", "DISCONNECTED", "DISCONNECTING"
2445
- # 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"
2879
+ # 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"
2446
2880
  # resp.custom_key_stores[0].creation_date #=> Time
2881
+ # resp.custom_key_stores[0].custom_key_store_type #=> String, one of "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
2882
+ # resp.custom_key_stores[0].xks_proxy_configuration.connectivity #=> String, one of "PUBLIC_ENDPOINT", "VPC_ENDPOINT_SERVICE"
2883
+ # resp.custom_key_stores[0].xks_proxy_configuration.access_key_id #=> String
2884
+ # resp.custom_key_stores[0].xks_proxy_configuration.uri_endpoint #=> String
2885
+ # resp.custom_key_stores[0].xks_proxy_configuration.uri_path #=> String
2886
+ # resp.custom_key_stores[0].xks_proxy_configuration.vpc_endpoint_service_name #=> String
2447
2887
  # resp.next_marker #=> String
2448
2888
  # resp.truncated #=> Boolean
2449
2889
  #
@@ -2465,11 +2905,17 @@ module Aws::KMS
2465
2905
  # expiration date (if any) of the key material. It includes fields, like
2466
2906
  # `KeySpec`, that help you distinguish different types of KMS keys. It
2467
2907
  # also displays the key usage (encryption, signing, or generating and
2468
- # verifying MACs) and the algorithms that the KMS key supports. For KMS
2469
- # keys in custom key stores, it includes information about the custom
2470
- # key store, such as the key store ID and the CloudHSM cluster ID. For
2471
- # multi-Region keys, it displays the primary key and all related replica
2472
- # keys.
2908
+ # verifying MACs) and the algorithms that the KMS key supports. For
2909
+ # [multi-Region
2910
+ # keys](kms/latest/developerguide/multi-region-keys-overview.html), it
2911
+ # displays the primary key and all related replica keys. For KMS keys in
2912
+ # [CloudHSM key
2913
+ # stores](kms/latest/developerguide/keystore-cloudhsm.html), it includes
2914
+ # information about the custom key store, such as the key store ID and
2915
+ # the CloudHSM cluster ID. For KMS key in [external key
2916
+ # stores](kms/latest/developerguide/keystore-external.html), it includes
2917
+ # the custom key store ID and the ID and status of the associated
2918
+ # external key.
2473
2919
  #
2474
2920
  # `DescribeKey` does not return the following information:
2475
2921
  #
@@ -2688,7 +3134,7 @@ module Aws::KMS
2688
3134
  #
2689
3135
  # @example Example: To get details about an HMAC KMS key
2690
3136
  #
2691
- # # The following example gets the metadata of an HMAC KMS key.
3137
+ # # The following example gets the metadata of an HMAC KMS key.
2692
3138
  #
2693
3139
  # resp = client.describe_key({
2694
3140
  # 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.
@@ -2715,6 +3161,72 @@ module Aws::KMS
2715
3161
  # }, # An object that contains information about the specified KMS key.
2716
3162
  # }
2717
3163
  #
3164
+ # @example Example: To get details about a KMS key in an AWS CloudHSM key store
3165
+ #
3166
+ # # The following example gets the metadata of a KMS key in an AWS CloudHSM key store.
3167
+ #
3168
+ # resp = client.describe_key({
3169
+ # 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.
3170
+ # })
3171
+ #
3172
+ # resp.to_h outputs the following:
3173
+ # {
3174
+ # key_metadata: {
3175
+ # aws_account_id: "123456789012",
3176
+ # arn: "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
3177
+ # cloud_hsm_cluster_id: "cluster-1a23b4cdefg",
3178
+ # creation_date: Time.parse(1646160362.664),
3179
+ # custom_key_store_id: "cks-1234567890abcdef0",
3180
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
3181
+ # description: "CloudHSM key store test key",
3182
+ # enabled: true,
3183
+ # encryption_algorithms: [
3184
+ # "SYMMETRIC_DEFAULT",
3185
+ # ],
3186
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
3187
+ # key_manager: "CUSTOMER",
3188
+ # key_spec: "SYMMETRIC_DEFAULT",
3189
+ # key_state: "Enabled",
3190
+ # key_usage: "ENCRYPT_DECRYPT",
3191
+ # multi_region: false,
3192
+ # origin: "AWS_CLOUDHSM",
3193
+ # }, # An object that contains information about the specified KMS key.
3194
+ # }
3195
+ #
3196
+ # @example Example: To get details about a KMS key in an external key store
3197
+ #
3198
+ # # The following example gets the metadata of a KMS key in an external key store.
3199
+ #
3200
+ # resp = client.describe_key({
3201
+ # 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.
3202
+ # })
3203
+ #
3204
+ # resp.to_h outputs the following:
3205
+ # {
3206
+ # key_metadata: {
3207
+ # aws_account_id: "123456789012",
3208
+ # arn: "arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab",
3209
+ # creation_date: Time.parse(1646160362.664),
3210
+ # custom_key_store_id: "cks-1234567890abcdef0",
3211
+ # customer_master_key_spec: "SYMMETRIC_DEFAULT",
3212
+ # description: "External key store test key",
3213
+ # enabled: true,
3214
+ # encryption_algorithms: [
3215
+ # "SYMMETRIC_DEFAULT",
3216
+ # ],
3217
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab",
3218
+ # key_manager: "CUSTOMER",
3219
+ # key_spec: "SYMMETRIC_DEFAULT",
3220
+ # key_state: "Enabled",
3221
+ # key_usage: "ENCRYPT_DECRYPT",
3222
+ # multi_region: false,
3223
+ # origin: "EXTERNAL_KEY_STORE",
3224
+ # xks_key_configuration: {
3225
+ # id: "bb8562717f809024",
3226
+ # },
3227
+ # }, # An object that contains information about the specified KMS key.
3228
+ # }
3229
+ #
2718
3230
  # @example Request syntax with placeholder values
2719
3231
  #
2720
3232
  # resp = client.describe_key({
@@ -2734,7 +3246,7 @@ module Aws::KMS
2734
3246
  # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
2735
3247
  # resp.key_metadata.deletion_date #=> Time
2736
3248
  # resp.key_metadata.valid_to #=> Time
2737
- # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
3249
+ # resp.key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
2738
3250
  # resp.key_metadata.custom_key_store_id #=> String
2739
3251
  # resp.key_metadata.cloud_hsm_cluster_id #=> String
2740
3252
  # resp.key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
@@ -2755,6 +3267,7 @@ module Aws::KMS
2755
3267
  # resp.key_metadata.pending_deletion_window_in_days #=> Integer
2756
3268
  # resp.key_metadata.mac_algorithms #=> Array
2757
3269
  # resp.key_metadata.mac_algorithms[0] #=> String, one of "HMAC_SHA_224", "HMAC_SHA_256", "HMAC_SHA_384", "HMAC_SHA_512"
3270
+ # resp.key_metadata.xks_key_configuration.id #=> String
2758
3271
  #
2759
3272
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey AWS API Documentation
2760
3273
  #
@@ -2834,12 +3347,11 @@ module Aws::KMS
2834
3347
  # symmetric encryption KMS key.
2835
3348
  #
2836
3349
  # Automatic key rotation is supported only on symmetric encryption KMS
2837
- # keys. You cannot enable or disable automatic rotation of [asymmetric
2838
- # KMS keys][2], [HMAC KMS keys][3], KMS keys with [imported key
2839
- # material][4], or KMS keys in a [custom key store][5]. The key rotation
2840
- # status of these KMS keys is always `false`. To enable or disable
2841
- # automatic rotation of a set of related [multi-Region keys][6], set the
2842
- # property on the primary key.
3350
+ # keys. You cannot enable automatic rotation of [asymmetric KMS
3351
+ # keys][2], [HMAC KMS keys][3], KMS keys with [imported key
3352
+ # material][4], or KMS keys in a [custom key store][5]. To enable or
3353
+ # disable automatic rotation of a set of related [multi-Region keys][6],
3354
+ # set the property on the primary key.
2843
3355
  #
2844
3356
  # You can enable (EnableKeyRotation) and disable automatic rotation of
2845
3357
  # the key material in [customer managed KMS keys][7]. Key material
@@ -2933,11 +3445,19 @@ module Aws::KMS
2933
3445
  req.send_request(options)
2934
3446
  end
2935
3447
 
2936
- # Disconnects the [custom key store][1] from its associated CloudHSM
2937
- # cluster. While a custom key store is disconnected, you can manage the
2938
- # custom key store and its KMS keys, but you cannot create or use KMS
2939
- # keys in the custom key store. You can reconnect the custom key store
2940
- # at any time.
3448
+ # Disconnects the [custom key store][1] from its backing key store. This
3449
+ # operation disconnects an CloudHSM key store from its associated
3450
+ # CloudHSM cluster or disconnects an external key store from the
3451
+ # external key store proxy that communicates with your external key
3452
+ # manager.
3453
+ #
3454
+ # This operation is part of the [custom key stores][1] feature in KMS,
3455
+ # which combines the convenience and extensive integration of KMS with
3456
+ # the isolation and control of a key store that you own and manage.
3457
+ #
3458
+ # While a custom key store is disconnected, you can manage the custom
3459
+ # key store and its KMS keys, but you cannot create or use its KMS keys.
3460
+ # You can reconnect the custom key store at any time.
2941
3461
  #
2942
3462
  # <note markdown="1"> While a custom key store is disconnected, all attempts to create KMS
2943
3463
  # keys in the custom key store or to use existing KMS keys in
@@ -2946,19 +3466,14 @@ module Aws::KMS
2946
3466
  #
2947
3467
  # </note>
2948
3468
  #
2949
- #
2950
- #
2951
- # To find the connection state of a custom key store, use the
2952
- # DescribeCustomKeyStores operation. To reconnect a custom key store,
2953
- # use the ConnectCustomKeyStore operation.
3469
+ # When you disconnect a custom key store, its `ConnectionState` changes
3470
+ # to `Disconnected`. To find the connection state of a custom key store,
3471
+ # use the DescribeCustomKeyStores operation. To reconnect a custom key
3472
+ # store, use the ConnectCustomKeyStore operation.
2954
3473
  #
2955
3474
  # If the operation succeeds, it returns a JSON object with no
2956
3475
  # properties.
2957
3476
  #
2958
- # This operation is part of the [custom key store feature][1] feature in
2959
- # KMS, which combines the convenience and extensive integration of KMS
2960
- # with the isolation and control of a single-tenant key store.
2961
- #
2962
3477
  # **Cross-account use**\: No. You cannot perform this operation on a
2963
3478
  # custom key store in a different Amazon Web Services account.
2964
3479
  #
@@ -2993,8 +3508,10 @@ module Aws::KMS
2993
3508
  #
2994
3509
  # @example Example: To disconnect a custom key store from its CloudHSM cluster
2995
3510
  #
2996
- # # This example disconnects an AWS KMS custom key store from its AWS CloudHSM cluster. This operation doesn't return any
2997
- # # data. To verify that the custom key store is disconnected, use the <code>DescribeCustomKeyStores</code> operation.
3511
+ # # This example disconnects an AWS KMS custom key store from its backing key store. For an AWS CloudHSM key store, it
3512
+ # # disconnects the key store from its AWS CloudHSM cluster. For an external key store, it disconnects the key store from
3513
+ # # the external key store proxy that communicates with your external key manager. This operation doesn't return any data.
3514
+ # # To verify that the custom key store is disconnected, use the <code>DescribeCustomKeyStores</code> operation.
2998
3515
  #
2999
3516
  # resp = client.disconnect_custom_key_store({
3000
3517
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store.
@@ -3091,10 +3608,9 @@ module Aws::KMS
3091
3608
  # customer managed KMS key, use the DisableKeyRotation operation.
3092
3609
  #
3093
3610
  # Automatic key rotation is supported only on [symmetric encryption KMS
3094
- # keys][3]. You cannot enable or disable automatic rotation of
3095
- # [asymmetric KMS keys][4], [HMAC KMS keys][5], KMS keys with [imported
3096
- # key material][6], or KMS keys in a [custom key store][7]. The key
3097
- # rotation status of these KMS keys is always `false`. To enable or
3611
+ # keys][3]. You cannot enable automatic rotation of [asymmetric KMS
3612
+ # keys][4], [HMAC KMS keys][5], KMS keys with [imported key
3613
+ # material][6], or KMS keys in a [custom key store][7]. To enable or
3098
3614
  # disable automatic rotation of a set of related [multi-Region keys][8],
3099
3615
  # set the property on the primary key.
3100
3616
  #
@@ -3146,12 +3662,11 @@ module Aws::KMS
3146
3662
  # [12]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3147
3663
  #
3148
3664
  # @option params [required, String] :key_id
3149
- # Identifies a symmetric encryption KMS key. You cannot enable or
3150
- # disable automatic rotation of [asymmetric KMS keys][1], [HMAC KMS
3151
- # keys][2], KMS keys with [imported key material][3], or KMS keys in a
3152
- # [custom key store][4]. The key rotation status of these KMS keys is
3153
- # always `false`. To enable or disable automatic rotation of a set of
3154
- # related [multi-Region keys][5], set the property on the primary key.
3665
+ # Identifies a symmetric encryption KMS key. You cannot enable automatic
3666
+ # rotation of [asymmetric KMS keys][1], [HMAC KMS keys][2], KMS keys
3667
+ # with [imported key material][3], or KMS keys in a [custom key
3668
+ # store][4]. To enable or disable automatic rotation of a set of related
3669
+ # [multi-Region keys][5], set the property on the primary key.
3155
3670
  #
3156
3671
  # Specify the key ID or key ARN of the KMS key.
3157
3672
  #
@@ -3360,6 +3875,8 @@ module Aws::KMS
3360
3875
  # encryption KMS keys. If you are using an asymmetric KMS key, we
3361
3876
  # recommend RSAES\_OAEP\_SHA\_256.
3362
3877
  #
3878
+ # The SM2PKE algorithm is only available in China Regions.
3879
+ #
3363
3880
  # @return [Types::EncryptResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3364
3881
  #
3365
3882
  # * {Types::EncryptResponse#ciphertext_blob #ciphertext_blob} => String
@@ -3767,8 +4284,7 @@ module Aws::KMS
3767
4284
  # to encrypt and decrypt or to sign and verify (but not both), and the
3768
4285
  # rule that permits you to use ECC KMS keys only to sign and verify, are
3769
4286
  # not effective on data key pairs, which are used outside of KMS. The
3770
- # SM2 key spec is only available in China Regions. RSA and ECC
3771
- # asymmetric key pairs are also available in China Regions.
4287
+ # SM2 key spec is only available in China Regions.
3772
4288
  #
3773
4289
  # @option params [Array<String>] :grant_tokens
3774
4290
  # A list of grant tokens.
@@ -3959,8 +4475,7 @@ module Aws::KMS
3959
4475
  # to encrypt and decrypt or to sign and verify (but not both), and the
3960
4476
  # rule that permits you to use ECC KMS keys only to sign and verify, are
3961
4477
  # not effective on data key pairs, which are used outside of KMS. The
3962
- # SM2 key spec is only available in China Regions. RSA and ECC
3963
- # asymmetric key pairs are also available in China Regions.
4478
+ # SM2 key spec is only available in China Regions.
3964
4479
  #
3965
4480
  # @option params [Array<String>] :grant_tokens
3966
4481
  # A list of grant tokens.
@@ -4059,6 +4574,15 @@ module Aws::KMS
4059
4574
  # KMS key or a key in a custom key store to generate a data key. To get
4060
4575
  # the type of your KMS key, use the DescribeKey operation.
4061
4576
  #
4577
+ # You must also specify the length of the data key. Use either the
4578
+ # `KeySpec` or `NumberOfBytes` parameters (but not both). For 128-bit
4579
+ # and 256-bit data keys, use the `KeySpec` parameter.
4580
+ #
4581
+ # To generate an SM4 data key (China Regions only), specify a `KeySpec`
4582
+ # value of `AES_128` or `NumberOfBytes` value of `128`. The symmetric
4583
+ # encryption key used in China Regions to encrypt your data key is an
4584
+ # SM4 encryption key.
4585
+ #
4062
4586
  # If the operation succeeds, you will find the encrypted copy of the
4063
4587
  # data key in the `CiphertextBlob` field.
4064
4588
  #
@@ -4216,16 +4740,17 @@ module Aws::KMS
4216
4740
 
4217
4741
  # Generates a hash-based message authentication code (HMAC) for a
4218
4742
  # message using an HMAC KMS key and a MAC algorithm that the key
4219
- # supports. The MAC algorithm computes the HMAC for the message and the
4220
- # key as described in [RFC 2104][1].
4221
- #
4222
- # You can use the HMAC that this operation generates with the VerifyMac
4223
- # operation to demonstrate that the original message has not changed.
4224
- # Also, because a secret key is used to create the hash, you can verify
4225
- # that the party that generated the hash has the required secret key.
4226
- # This operation is part of KMS support for HMAC KMS keys. For details,
4227
- # see [HMAC keys in KMS][2] in the <i> <i>Key Management Service
4228
- # Developer Guide</i> </i>.
4743
+ # supports. HMAC KMS keys and the HMAC algorithms that KMS uses conform
4744
+ # to industry standards defined in [RFC 2104][1].
4745
+ #
4746
+ # You can use value that GenerateMac returns in the VerifyMac operation
4747
+ # to demonstrate that the original message has not changed. Also,
4748
+ # because a secret key is used to create the hash, you can verify that
4749
+ # the party that generated the hash has the required secret key. You can
4750
+ # also use the raw result to implement HMAC-based algorithms such as key
4751
+ # derivation functions. This operation is part of KMS support for HMAC
4752
+ # KMS keys. For details, see [HMAC keys in KMS][2] in the <i> <i>Key
4753
+ # Management Service Developer Guide</i> </i>.
4229
4754
  #
4230
4755
  # <note markdown="1"> Best practices recommend that you limit the time during which any
4231
4756
  # signing mechanism, including an HMAC, is effective. This deters an
@@ -4349,42 +4874,41 @@ module Aws::KMS
4349
4874
  # the random byte string. There is no default value for string length.
4350
4875
  #
4351
4876
  # By default, the random byte string is generated in KMS. To generate
4352
- # the byte string in the CloudHSM cluster that is associated with a
4353
- # [custom key store][1], specify the custom key store ID.
4877
+ # the byte string in the CloudHSM cluster associated with an CloudHSM
4878
+ # key store, use the `CustomKeyStoreId` parameter.
4354
4879
  #
4355
4880
  # Applications in Amazon Web Services Nitro Enclaves can call this
4356
4881
  # operation by using the [Amazon Web Services Nitro Enclaves Development
4357
- # Kit][2]. For information about the supporting parameters, see [How
4358
- # Amazon Web Services Nitro Enclaves use KMS][3] in the *Key Management
4882
+ # Kit][1]. For information about the supporting parameters, see [How
4883
+ # Amazon Web Services Nitro Enclaves use KMS][2] in the *Key Management
4359
4884
  # Service Developer Guide*.
4360
4885
  #
4361
4886
  # For more information about entropy and random number generation, see
4362
- # [Key Management Service Cryptographic Details][4].
4887
+ # [Key Management Service Cryptographic Details][3].
4363
4888
  #
4364
4889
  # **Cross-account use**\: Not applicable. `GenerateRandom` does not use
4365
4890
  # any account-specific resources, such as KMS keys.
4366
4891
  #
4367
- # **Required permissions**\: [kms:GenerateRandom][5] (IAM policy)
4892
+ # **Required permissions**\: [kms:GenerateRandom][4] (IAM policy)
4368
4893
  #
4369
4894
  #
4370
4895
  #
4371
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
4372
- # [2]: https://github.com/aws/aws-nitro-enclaves-sdk-c
4373
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4374
- # [4]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
4375
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4896
+ # [1]: https://github.com/aws/aws-nitro-enclaves-sdk-c
4897
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
4898
+ # [3]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
4899
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4376
4900
  #
4377
4901
  # @option params [Integer] :number_of_bytes
4378
4902
  # The length of the random byte string. This parameter is required.
4379
4903
  #
4380
4904
  # @option params [String] :custom_key_store_id
4381
4905
  # Generates the random byte string in the CloudHSM cluster that is
4382
- # associated with the specified [custom key store][1]. To find the ID of
4383
- # a custom key store, use the DescribeCustomKeyStores operation.
4384
- #
4906
+ # associated with the specified CloudHSM key store. To find the ID of a
4907
+ # custom key store, use the DescribeCustomKeyStores operation.
4385
4908
  #
4386
- #
4387
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
4909
+ # External key store IDs are not valid for this parameter. If you
4910
+ # specify the ID of an external key store, `GenerateRandom` throws an
4911
+ # `UnsupportedOperationException`.
4388
4912
  #
4389
4913
  # @return [Types::GenerateRandomResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
4390
4914
  #
@@ -4505,10 +5029,9 @@ module Aws::KMS
4505
5029
  # and Amazon CloudWatch.
4506
5030
  #
4507
5031
  # Automatic key rotation is supported only on [symmetric encryption KMS
4508
- # keys][3]. You cannot enable or disable automatic rotation of
4509
- # [asymmetric KMS keys][4], [HMAC KMS keys][5], KMS keys with [imported
4510
- # key material][6], or KMS keys in a [custom key store][7]. The key
4511
- # rotation status of these KMS keys is always `false`. To enable or
5032
+ # keys][3]. You cannot enable automatic rotation of [asymmetric KMS
5033
+ # keys][4], [HMAC KMS keys][5], KMS keys with [imported key
5034
+ # material][6], or KMS keys in a [custom key store][7]. To enable or
4512
5035
  # disable automatic rotation of a set of related [multi-Region keys][8],
4513
5036
  # set the property on the primary key..
4514
5037
  #
@@ -4632,7 +5155,7 @@ module Aws::KMS
4632
5155
  # token to send with a subsequent ImportKeyMaterial request.
4633
5156
  #
4634
5157
  # You must specify the key ID of the symmetric encryption KMS key into
4635
- # which you will import key material. This KMS key's `Origin` must be
5158
+ # which you will import key material. The KMS key `Origin` must be
4636
5159
  # `EXTERNAL`. You must also specify the wrapping algorithm and type of
4637
5160
  # wrapping key (public key) that you will use to encrypt the key
4638
5161
  # material. You cannot perform this operation on an asymmetric KMS key,
@@ -4764,21 +5287,16 @@ module Aws::KMS
4764
5287
  # also reduce of risk of encrypting data that cannot be decrypted. These
4765
5288
  # features are not effective outside of KMS.
4766
5289
  #
4767
- # To verify a signature outside of KMS with an SM2 public key (China
4768
- # Regions only), you must specify the distinguishing ID. By default, KMS
4769
- # uses `1234567812345678` as the distinguishing ID. For more
4770
- # information, see [Offline verification with SM2 key pairs][2].
4771
- #
4772
5290
  # To help you use the public key safely outside of KMS, `GetPublicKey`
4773
5291
  # returns important information about the public key in the response,
4774
5292
  # including:
4775
5293
  #
4776
- # * [KeySpec][3]\: The type of key material in the public key, such as
5294
+ # * [KeySpec][2]\: The type of key material in the public key, such as
4777
5295
  # `RSA_4096` or `ECC_NIST_P521`.
4778
5296
  #
4779
- # * [KeyUsage][4]\: Whether the key is used for encryption or signing.
5297
+ # * [KeyUsage][3]\: Whether the key is used for encryption or signing.
4780
5298
  #
4781
- # * [EncryptionAlgorithms][5] or [SigningAlgorithms][6]\: A list of the
5299
+ # * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]\: A list of the
4782
5300
  # encryption algorithms or the signing algorithms for the key.
4783
5301
  #
4784
5302
  # Although KMS cannot enforce these restrictions on external operations,
@@ -4789,6 +5307,11 @@ module Aws::KMS
4789
5307
  # You can also avoid errors, such as using the wrong signing algorithm
4790
5308
  # in a verification operation.
4791
5309
  #
5310
+ # To verify a signature outside of KMS with an SM2 public key (China
5311
+ # Regions only), you must specify the distinguishing ID. By default, KMS
5312
+ # uses `1234567812345678` as the distinguishing ID. For more
5313
+ # information, see [Offline verification with SM2 key pairs][6].
5314
+ #
4792
5315
  # The KMS key that you use for this operation must be in a compatible
4793
5316
  # key state. For details, see [Key states of KMS keys][7] in the *Key
4794
5317
  # Management Service Developer Guide*.
@@ -4804,11 +5327,11 @@ module Aws::KMS
4804
5327
  #
4805
5328
  #
4806
5329
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
4807
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
4808
- # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec
4809
- # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage
4810
- # [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
4811
- # [6]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms
5330
+ # [2]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec
5331
+ # [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage
5332
+ # [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
5333
+ # [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms
5334
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
4812
5335
  # [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
4813
5336
  # [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
4814
5337
  #
@@ -4941,12 +5464,13 @@ module Aws::KMS
4941
5464
  # a public key and token from the same `GetParametersForImport`
4942
5465
  # response.
4943
5466
  #
4944
- # * Whether the key material expires and if so, when. If you set an
4945
- # expiration date, KMS deletes the key material from the KMS key on
4946
- # the specified date, and the KMS key becomes unusable. To use the KMS
4947
- # key again, you must reimport the same key material. The only way to
4948
- # change an expiration date is by reimporting the same key material
4949
- # and specifying a new expiration date.
5467
+ # * Whether the key material expires (`ExpirationModel`) and, if so,
5468
+ # when (`ValidTo`). If you set an expiration date, on the specified
5469
+ # date, KMS deletes the key material from the KMS key, making the KMS
5470
+ # key unusable. To use the KMS key in cryptographic operations again,
5471
+ # you must reimport the same key material. The only way to change the
5472
+ # expiration model or expiration date is by reimporting the same key
5473
+ # material and specifying a new expiration date.
4950
5474
  #
4951
5475
  # When this operation is successful, the key state of the KMS key
4952
5476
  # changes from `PendingImport` to `Enabled`, and you can use the KMS
@@ -5015,18 +5539,36 @@ module Aws::KMS
5015
5539
  # `GetParametersForImport` request.
5016
5540
  #
5017
5541
  # @option params [Time,DateTime,Date,Integer,String] :valid_to
5018
- # The time at which the imported key material expires. When the key
5019
- # material expires, KMS deletes the key material and the KMS key becomes
5020
- # unusable. You must omit this parameter when the `ExpirationModel`
5021
- # parameter is set to `KEY_MATERIAL_DOES_NOT_EXPIRE`. Otherwise it is
5022
- # required.
5542
+ # The date and time when the imported key material expires. This
5543
+ # parameter is required when the value of the `ExpirationModel`
5544
+ # parameter is `KEY_MATERIAL_EXPIRES`. Otherwise it is not valid.
5545
+ #
5546
+ # The value of this parameter must be a future date and time. The
5547
+ # maximum value is 365 days from the request date.
5548
+ #
5549
+ # When the key material expires, KMS deletes the key material from the
5550
+ # KMS key. Without its key material, the KMS key is unusable. To use the
5551
+ # KMS key in cryptographic operations, you must reimport the same key
5552
+ # material.
5553
+ #
5554
+ # You cannot change the `ExpirationModel` or `ValidTo` values for the
5555
+ # current import after the request completes. To change either value,
5556
+ # you must delete (DeleteImportedKeyMaterial) and reimport the key
5557
+ # material.
5023
5558
  #
5024
5559
  # @option params [String] :expiration_model
5025
5560
  # Specifies whether the key material expires. The default is
5026
- # `KEY_MATERIAL_EXPIRES`, in which case you must include the `ValidTo`
5027
- # parameter. When this parameter is set to
5561
+ # `KEY_MATERIAL_EXPIRES`.
5562
+ #
5563
+ # When the value of `ExpirationModel` is `KEY_MATERIAL_EXPIRES`, you
5564
+ # must specify a value for the `ValidTo` parameter. When value is
5028
5565
  # `KEY_MATERIAL_DOES_NOT_EXPIRE`, you must omit the `ValidTo` parameter.
5029
5566
  #
5567
+ # You cannot change the `ExpirationModel` or `ValidTo` values for the
5568
+ # current import after the request completes. To change either value,
5569
+ # you must delete (DeleteImportedKeyMaterial) and reimport the key
5570
+ # material.
5571
+ #
5030
5572
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
5031
5573
  #
5032
5574
  #
@@ -5966,7 +6508,7 @@ module Aws::KMS
5966
6508
  # (`\u000D`) special characters
5967
6509
  #
5968
6510
  # For information about key policies, see [Key policies in KMS][3] in
5969
- # the *Key Management Service Developer Guide*. For help writing and
6511
+ # the *Key Management Service Developer Guide*.For help writing and
5970
6512
  # formatting a JSON policy document, see the [IAM JSON Policy
5971
6513
  # Reference][4] in the <i> <i>Identity and Access Management User
5972
6514
  # Guide</i> </i>.
@@ -6069,10 +6611,10 @@ module Aws::KMS
6069
6611
  # intend.
6070
6612
  #
6071
6613
  # * To reencrypt the data, you must use the `DestinationKeyId` parameter
6072
- # specify the KMS key that re-encrypts the data after it is decrypted.
6073
- # If the destination KMS key is an asymmetric KMS key, you must also
6074
- # provide the encryption algorithm. The algorithm that you choose must
6075
- # be compatible with the KMS key.
6614
+ # to specify the KMS key that re-encrypts the data after it is
6615
+ # decrypted. If the destination KMS key is an asymmetric KMS key, you
6616
+ # must also provide the encryption algorithm. The algorithm that you
6617
+ # choose must be compatible with the KMS key.
6076
6618
  #
6077
6619
  # When you use an asymmetric KMS key to encrypt or reencrypt data, be
6078
6620
  # sure to record the KMS key and encryption algorithm that you choose.
@@ -6574,7 +7116,7 @@ module Aws::KMS
6574
7116
  # TagResource operation.
6575
7117
  #
6576
7118
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
6577
- # key. For details, see [ABAC in KMS][1] in the *Key Management Service
7119
+ # key. For details, see [ABAC for KMS][1] in the *Key Management Service
6578
7120
  # Developer Guide*.
6579
7121
  #
6580
7122
  # </note>
@@ -6612,7 +7154,7 @@ module Aws::KMS
6612
7154
  #
6613
7155
  # @example Example: To replicate a multi-Region key in a different AWS Region
6614
7156
  #
6615
- # # This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.
7157
+ # # This example creates a multi-Region replica key in us-west-2 of a multi-Region primary key in us-east-1.
6616
7158
  #
6617
7159
  # resp = client.replicate_key({
6618
7160
  # key_id: "arn:aws:kms:us-east-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", # The key ID or key ARN of the multi-Region primary key
@@ -6684,7 +7226,7 @@ module Aws::KMS
6684
7226
  # resp.replica_key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
6685
7227
  # resp.replica_key_metadata.deletion_date #=> Time
6686
7228
  # resp.replica_key_metadata.valid_to #=> Time
6687
- # resp.replica_key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM"
7229
+ # resp.replica_key_metadata.origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
6688
7230
  # resp.replica_key_metadata.custom_key_store_id #=> String
6689
7231
  # resp.replica_key_metadata.cloud_hsm_cluster_id #=> String
6690
7232
  # resp.replica_key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
@@ -6705,6 +7247,7 @@ module Aws::KMS
6705
7247
  # resp.replica_key_metadata.pending_deletion_window_in_days #=> Integer
6706
7248
  # resp.replica_key_metadata.mac_algorithms #=> Array
6707
7249
  # resp.replica_key_metadata.mac_algorithms[0] #=> String, one of "HMAC_SHA_224", "HMAC_SHA_256", "HMAC_SHA_384", "HMAC_SHA_512"
7250
+ # resp.replica_key_metadata.xks_key_configuration.id #=> String
6708
7251
  # resp.replica_policy #=> String
6709
7252
  # resp.replica_tags #=> Array
6710
7253
  # resp.replica_tags[0].tag_key #=> String
@@ -6924,13 +7467,6 @@ module Aws::KMS
6924
7467
  # multi-Region replica key.) To prevent the use of a KMS key without
6925
7468
  # deleting it, use DisableKey.
6926
7469
  #
6927
- # If you schedule deletion of a KMS key from a [custom key store][1],
6928
- # when the waiting period expires, `ScheduleKeyDeletion` deletes the KMS
6929
- # key from KMS. Then KMS makes a best effort to delete the key material
6930
- # from the associated CloudHSM cluster. However, you might need to
6931
- # manually [delete the orphaned key material][2] from the cluster and
6932
- # its backups.
6933
- #
6934
7470
  # You can schedule the deletion of a multi-Region primary key and its
6935
7471
  # replica keys at any time. However, KMS will not delete a multi-Region
6936
7472
  # primary key with existing replica keys. If you schedule the deletion
@@ -6940,14 +7476,26 @@ module Aws::KMS
6940
7476
  # the last of its replicas keys is deleted (not just scheduled), the key
6941
7477
  # state of the primary key changes to `PendingDeletion` and its waiting
6942
7478
  # period (`PendingWindowInDays`) begins. For details, see [Deleting
6943
- # multi-Region keys][3] in the *Key Management Service Developer Guide*.
7479
+ # multi-Region keys][1] in the *Key Management Service Developer Guide*.
7480
+ #
7481
+ # When KMS [deletes a KMS key from an CloudHSM key store][2], it makes a
7482
+ # best effort to delete the associated key material from the associated
7483
+ # CloudHSM cluster. However, you might need to manually [delete the
7484
+ # orphaned key material][3] from the cluster and its backups. [Deleting
7485
+ # a KMS key from an external key store][4] has no effect on the
7486
+ # associated external key. However, for both types of custom key stores,
7487
+ # deleting a KMS key is destructive and irreversible. You cannot decrypt
7488
+ # ciphertext encrypted under the KMS key by using only its associated
7489
+ # external key or CloudHSM key. Also, you cannot recreate a KMS key in
7490
+ # an external key store by creating a new KMS key with the same key
7491
+ # material.
6944
7492
  #
6945
7493
  # For more information about scheduling a KMS key for deletion, see
6946
- # [Deleting KMS keys][4] in the *Key Management Service Developer
7494
+ # [Deleting KMS keys][5] in the *Key Management Service Developer
6947
7495
  # Guide*.
6948
7496
  #
6949
7497
  # The KMS key that you use for this operation must be in a compatible
6950
- # key state. For details, see [Key states of KMS keys][5] in the *Key
7498
+ # key state. For details, see [Key states of KMS keys][6] in the *Key
6951
7499
  # Management Service Developer Guide*.
6952
7500
  #
6953
7501
  # **Cross-account use**\: No. You cannot perform this operation on a KMS
@@ -6963,11 +7511,12 @@ module Aws::KMS
6963
7511
  #
6964
7512
  #
6965
7513
  #
6966
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
6967
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
6968
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
6969
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
6970
- # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
7514
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
7515
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-cmk-keystore.html
7516
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
7517
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-xks-key.html
7518
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
7519
+ # [6]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
6971
7520
  #
6972
7521
  # @option params [required, String] :key_id
6973
7522
  # The unique identifier of the KMS key to delete.
@@ -7217,7 +7766,7 @@ module Aws::KMS
7217
7766
  # Adds or edits tags on a [customer managed key][1].
7218
7767
  #
7219
7768
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
7220
- # key. For details, see [ABAC in KMS][2] in the *Key Management Service
7769
+ # key. For details, see [ABAC for KMS][2] in the *Key Management Service
7221
7770
  # Developer Guide*.
7222
7771
  #
7223
7772
  # </note>
@@ -7338,7 +7887,7 @@ module Aws::KMS
7338
7887
  # specify the tag key and the KMS key.
7339
7888
  #
7340
7889
  # <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
7341
- # key. For details, see [ABAC in KMS][2] in the *Key Management Service
7890
+ # key. For details, see [ABAC for KMS][2] in the *Key Management Service
7342
7891
  # Developer Guide*.
7343
7892
  #
7344
7893
  # </note>
@@ -7436,17 +7985,16 @@ module Aws::KMS
7436
7985
  # Amazon Web Services account and Region.
7437
7986
  #
7438
7987
  # <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
7439
- # the KMS key. For details, see [ABAC in KMS][1] in the *Key Management
7988
+ # the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
7440
7989
  # Service Developer Guide*.
7441
7990
  #
7442
7991
  # </note>
7443
7992
  #
7444
7993
  # The current and new KMS key must be the same type (both symmetric or
7445
- # both asymmetric), and they must have the same key usage
7446
- # (`ENCRYPT_DECRYPT` or `SIGN_VERIFY`). This restriction prevents errors
7447
- # in code that uses aliases. If you must assign an alias to a different
7448
- # type of KMS key, use DeleteAlias to delete the old alias and
7449
- # CreateAlias to create a new alias.
7994
+ # both asymmetric or both HMAC), and they must have the same key usage.
7995
+ # This restriction prevents errors in code that uses aliases. If you
7996
+ # must assign an alias to a different type of KMS key, use DeleteAlias
7997
+ # to delete the old alias and CreateAlias to create a new alias.
7450
7998
  #
7451
7999
  # You cannot use `UpdateAlias` to change an alias name. To change an
7452
8000
  # alias name, use DeleteAlias to delete the old alias and CreateAlias to
@@ -7504,8 +8052,8 @@ module Aws::KMS
7504
8052
  #
7505
8053
  # The KMS key must be in the same Amazon Web Services account and Region
7506
8054
  # as the alias. Also, the new target KMS key must be the same type as
7507
- # the current target KMS key (both symmetric or both asymmetric) and
7508
- # they must have the same key usage.
8055
+ # the current target KMS key (both symmetric or both asymmetric or both
8056
+ # HMAC) and they must have the same key usage.
7509
8057
  #
7510
8058
  # Specify the key ID or key ARN of the KMS key.
7511
8059
  #
@@ -7555,52 +8103,89 @@ module Aws::KMS
7555
8103
  req.send_request(options)
7556
8104
  end
7557
8105
 
7558
- # Changes the properties of a custom key store. Use the
7559
- # `CustomKeyStoreId` parameter to identify the custom key store you want
7560
- # to edit. Use the remaining parameters to change the properties of the
7561
- # custom key store.
7562
- #
7563
- # You can only update a custom key store that is disconnected. To
7564
- # disconnect the custom key store, use DisconnectCustomKeyStore. To
7565
- # reconnect the custom key store after the update completes, use
7566
- # ConnectCustomKeyStore. To find the connection state of a custom key
7567
- # store, use the DescribeCustomKeyStores operation.
7568
- #
7569
- # The `CustomKeyStoreId` parameter is required in all commands. Use the
7570
- # other parameters of `UpdateCustomKeyStore` to edit your key store
7571
- # settings.
7572
- #
7573
- # * Use the `NewCustomKeyStoreName` parameter to change the friendly
7574
- # name of the custom key store to the value that you specify.
8106
+ # Changes the properties of a custom key store. You can use this
8107
+ # operation to change the properties of an CloudHSM key store or an
8108
+ # external key store.
8109
+ #
8110
+ # Use the required `CustomKeyStoreId` parameter to identify the custom
8111
+ # key store. Use the remaining optional parameters to change its
8112
+ # properties. This operation does not return any property values. To
8113
+ # verify the updated property values, use the DescribeCustomKeyStores
8114
+ # operation.
7575
8115
  #
8116
+ # This operation is part of the [custom key stores][1] feature in KMS,
8117
+ # which combines the convenience and extensive integration of KMS with
8118
+ # the isolation and control of a key store that you own and manage.
8119
+ #
8120
+ # When updating the properties of an external key store, verify that the
8121
+ # updated settings connect your key store, via the external key store
8122
+ # proxy, to the same external key manager as the previous settings, or
8123
+ # to a backup or snapshot of the external key manager with the same
8124
+ # cryptographic keys. If the updated connection settings fail, you can
8125
+ # fix them and retry, although an extended delay might disrupt Amazon
8126
+ # Web Services services. However, if KMS permanently loses its access to
8127
+ # cryptographic keys, ciphertext encrypted under those keys is
8128
+ # unrecoverable.
8129
+ #
8130
+ # <note markdown="1"> For external key stores:
8131
+ #
8132
+ # Some external key managers provide a simpler method for updating an
8133
+ # external key store. For details, see your external key manager
8134
+ # documentation.
8135
+ #
8136
+ # When updating an external key store in the KMS console, you can upload
8137
+ # a JSON-based proxy configuration file with the desired values. You
8138
+ # cannot upload the proxy configuration file to the
8139
+ # `UpdateCustomKeyStore` operation. However, you can use the file to
8140
+ # help you determine the correct values for the `UpdateCustomKeyStore`
8141
+ # parameters.
7576
8142
  #
8143
+ # </note>
7577
8144
  #
7578
- # * Use the `KeyStorePassword` parameter tell KMS the current password
7579
- # of the [ `kmsuser` crypto user (CU)][1] in the associated CloudHSM
7580
- # cluster. You can use this parameter to [fix connection failures][2]
7581
- # that occur when KMS cannot log into the associated cluster because
7582
- # the `kmsuser` password has changed. This value does not change the
7583
- # password in the CloudHSM cluster.
8145
+ # For an CloudHSM key store, you can use this operation to change the
8146
+ # custom key store friendly name (`NewCustomKeyStoreName`), to tell KMS
8147
+ # about a change to the `kmsuser` crypto user password
8148
+ # (`KeyStorePassword`), or to associate the custom key store with a
8149
+ # different, but related, CloudHSM cluster (`CloudHsmClusterId`). To
8150
+ # update any property of an CloudHSM key store, the `ConnectionState` of
8151
+ # the CloudHSM key store must be `DISCONNECTED`.
8152
+ #
8153
+ # For an external key store, you can use this operation to change the
8154
+ # custom key store friendly name (`NewCustomKeyStoreName`), or to tell
8155
+ # KMS about a change to the external key store proxy authentication
8156
+ # credentials (`XksProxyAuthenticationCredential`), connection method
8157
+ # (`XksProxyConnectivity`), external proxy endpoint
8158
+ # (`XksProxyUriEndpoint`) and path (`XksProxyUriPath`). For external key
8159
+ # stores with an `XksProxyConnectivity` of `VPC_ENDPOINT_SERVICE`, you
8160
+ # can also update the Amazon VPC endpoint service name
8161
+ # (`XksProxyVpcEndpointServiceName`). To update most properties of an
8162
+ # external key store, the `ConnectionState` of the external key store
8163
+ # must be `DISCONNECTED`. However, you can update the
8164
+ # `CustomKeyStoreName`, `XksProxyAuthenticationCredential`, and
8165
+ # `XksProxyUriPath` of an external key store when it is in the CONNECTED
8166
+ # or DISCONNECTED state.
8167
+ #
8168
+ # If your update requires a `DISCONNECTED` state, before using
8169
+ # `UpdateCustomKeyStore`, use the DisconnectCustomKeyStore operation to
8170
+ # disconnect the custom key store. After the `UpdateCustomKeyStore`
8171
+ # operation completes, use the ConnectCustomKeyStore to reconnect the
8172
+ # custom key store. To find the `ConnectionState` of the custom key
8173
+ # store, use the DescribeCustomKeyStores operation.
7584
8174
  #
7585
8175
  #
7586
8176
  #
7587
- # * Use the `CloudHsmClusterId` parameter to associate the custom key
7588
- # store with a different, but related, CloudHSM cluster. You can use
7589
- # this parameter to repair a custom key store if its CloudHSM cluster
7590
- # becomes corrupted or is deleted, or when you need to create or
7591
- # restore a cluster from a backup.
8177
+ # Before updating the custom key store, verify that the new values allow
8178
+ # KMS to connect the custom key store to its backing key store. For
8179
+ # example, before you change the `XksProxyUriPath` value, verify that
8180
+ # the external key store proxy is reachable at the new path.
7592
8181
  #
7593
8182
  # If the operation succeeds, it returns a JSON object with no
7594
8183
  # properties.
7595
8184
  #
7596
- # This operation is part of the [custom key store feature][3] feature in
7597
- # KMS, which combines the convenience and extensive integration of KMS
7598
- # with the isolation and control of a single-tenant key store.
7599
- #
7600
8185
  # **Cross-account use**\: No. You cannot perform this operation on a
7601
8186
  # custom key store in a different Amazon Web Services account.
7602
8187
  #
7603
- # **Required permissions**\: [kms:UpdateCustomKeyStore][4] (IAM policy)
8188
+ # **Required permissions**\: [kms:UpdateCustomKeyStore][2] (IAM policy)
7604
8189
  #
7605
8190
  # **Related operations:**
7606
8191
  #
@@ -7616,10 +8201,8 @@ module Aws::KMS
7616
8201
  #
7617
8202
  #
7618
8203
  #
7619
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
7620
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-password
7621
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
7622
- # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8204
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
8205
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
7623
8206
  #
7624
8207
  # @option params [required, String] :custom_key_store_id
7625
8208
  # Identifies the custom key store that you want to update. Enter the ID
@@ -7631,16 +8214,25 @@ module Aws::KMS
7631
8214
  # you specify. The custom key store name must be unique in the Amazon
7632
8215
  # Web Services account.
7633
8216
  #
8217
+ # To change this value, an CloudHSM key store must be disconnected. An
8218
+ # external key store can be connected or disconnected.
8219
+ #
7634
8220
  # @option params [String] :key_store_password
7635
8221
  # Enter the current password of the `kmsuser` crypto user (CU) in the
7636
- # CloudHSM cluster that is associated with the custom key store.
8222
+ # CloudHSM cluster that is associated with the custom key store. This
8223
+ # parameter is valid only for custom key stores with a
8224
+ # `CustomKeyStoreType` of `AWS_CLOUDHSM`.
7637
8225
  #
7638
8226
  # This parameter tells KMS the current password of the `kmsuser` crypto
7639
8227
  # user (CU). It does not set or change the password of any users in the
7640
8228
  # CloudHSM cluster.
7641
8229
  #
8230
+ # To change this value, the CloudHSM key store must be disconnected.
8231
+ #
7642
8232
  # @option params [String] :cloud_hsm_cluster_id
7643
- # Associates the custom key store with a related CloudHSM cluster.
8233
+ # Associates the custom key store with a related CloudHSM cluster. This
8234
+ # parameter is valid only for custom key stores with a
8235
+ # `CustomKeyStoreType` of `AWS_CLOUDHSM`.
7644
8236
  #
7645
8237
  # Enter the cluster ID of the cluster that you used to create the custom
7646
8238
  # key store or a cluster that shares a backup history and has the same
@@ -7651,19 +8243,99 @@ module Aws::KMS
7651
8243
  # view the cluster certificate of a cluster, use the
7652
8244
  # [DescribeClusters][2] operation.
7653
8245
  #
8246
+ # To change this value, the CloudHSM key store must be disconnected.
8247
+ #
7654
8248
  #
7655
8249
  #
7656
8250
  # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
7657
8251
  # [2]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
7658
8252
  #
8253
+ # @option params [String] :xks_proxy_uri_endpoint
8254
+ # Changes the URI endpoint that KMS uses to connect to your external key
8255
+ # store proxy (XKS proxy). This parameter is valid only for custom key
8256
+ # stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
8257
+ #
8258
+ # For external key stores with an `XksProxyConnectivity` value of
8259
+ # `PUBLIC_ENDPOINT`, the protocol must be HTTPS.
8260
+ #
8261
+ # For external key stores with an `XksProxyConnectivity` value of
8262
+ # `VPC_ENDPOINT_SERVICE`, specify `https://` followed by the private DNS
8263
+ # name associated with the VPC endpoint service. Each external key store
8264
+ # must use a different private DNS name.
8265
+ #
8266
+ # The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
8267
+ # be unique in the Amazon Web Services account and Region.
8268
+ #
8269
+ # To change this value, the external key store must be disconnected.
8270
+ #
8271
+ # @option params [String] :xks_proxy_uri_path
8272
+ # Changes the base path to the proxy APIs for this external key store.
8273
+ # To find this value, see the documentation for your external key
8274
+ # manager and external key store proxy (XKS proxy). This parameter is
8275
+ # valid only for custom key stores with a `CustomKeyStoreType` of
8276
+ # `EXTERNAL_KEY_STORE`.
8277
+ #
8278
+ # The value must start with `/` and must end with `/kms/xks/v1`, where
8279
+ # `v1` represents the version of the KMS external key store proxy API.
8280
+ # You can include an optional prefix between the required elements such
8281
+ # as `/example/kms/xks/v1`.
8282
+ #
8283
+ # The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
8284
+ # be unique in the Amazon Web Services account and Region.
8285
+ #
8286
+ # You can change this value when the external key store is connected or
8287
+ # disconnected.
8288
+ #
8289
+ # @option params [String] :xks_proxy_vpc_endpoint_service_name
8290
+ # Changes the name that KMS uses to identify the Amazon VPC endpoint
8291
+ # service for your external key store proxy (XKS proxy). This parameter
8292
+ # is valid when the `CustomKeyStoreType` is `EXTERNAL_KEY_STORE` and the
8293
+ # `XksProxyConnectivity` is `VPC_ENDPOINT_SERVICE`.
8294
+ #
8295
+ # To change this value, the external key store must be disconnected.
8296
+ #
8297
+ # @option params [Types::XksProxyAuthenticationCredentialType] :xks_proxy_authentication_credential
8298
+ # Changes the credentials that KMS uses to sign requests to the external
8299
+ # key store proxy (XKS proxy). This parameter is valid only for custom
8300
+ # key stores with a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`.
8301
+ #
8302
+ # You must specify both the `AccessKeyId` and `SecretAccessKey` value in
8303
+ # the authentication credential, even if you are only updating one
8304
+ # value.
8305
+ #
8306
+ # This parameter doesn't establish or change your authentication
8307
+ # credentials on the proxy. It just tells KMS the credential that you
8308
+ # established with your external key store proxy. For example, if you
8309
+ # rotate the credential on your external key store proxy, you can use
8310
+ # this parameter to update the credential in KMS.
8311
+ #
8312
+ # You can change this value when the external key store is connected or
8313
+ # disconnected.
8314
+ #
8315
+ # @option params [String] :xks_proxy_connectivity
8316
+ # Changes the connectivity setting for the external key store. To
8317
+ # indicate that the external key store proxy uses a Amazon VPC endpoint
8318
+ # service to communicate with KMS, specify `VPC_ENDPOINT_SERVICE`.
8319
+ # Otherwise, specify `PUBLIC_ENDPOINT`.
8320
+ #
8321
+ # If you change the `XksProxyConnectivity` to `VPC_ENDPOINT_SERVICE`,
8322
+ # you must also change the `XksProxyUriEndpoint` and add an
8323
+ # `XksProxyVpcEndpointServiceName` value.
8324
+ #
8325
+ # If you change the `XksProxyConnectivity` to `PUBLIC_ENDPOINT`, you
8326
+ # must also change the `XksProxyUriEndpoint` and specify a null or empty
8327
+ # string for the `XksProxyVpcEndpointServiceName` value.
8328
+ #
8329
+ # To change this value, the external key store must be disconnected.
8330
+ #
7659
8331
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
7660
8332
  #
7661
8333
  #
7662
- # @example Example: To edit the password of a custom key store
8334
+ # @example Example: To edit the password of an AWS CloudHSM key store
7663
8335
  #
7664
- # # This example tells KMS the password for the kmsuser crypto user in the AWS CloudHSM cluster that is associated with the
7665
- # # AWS KMS custom key store. (It does not change the password in the CloudHSM cluster.) This operation does not return any
7666
- # # data.
8336
+ # # This example tells AWS KMS the password for the kmsuser crypto user in the AWS CloudHSM cluster that is associated with
8337
+ # # the AWS KMS custom key store. (It does not change the password in the CloudHSM cluster.) This operation does not return
8338
+ # # any data.
7667
8339
  #
7668
8340
  # resp = client.update_custom_key_store({
7669
8341
  # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating.
@@ -7690,9 +8362,9 @@ module Aws::KMS
7690
8362
  #
7691
8363
  # @example Example: To associate the custom key store with a different, but related, AWS CloudHSM cluster.
7692
8364
  #
7693
- # # This example changes the cluster that is associated with a custom key store to a related cluster, such as a different
7694
- # # backup of the same cluster. This operation does not return any data. To verify that the operation worked, use the
7695
- # # DescribeCustomKeyStores operation.
8365
+ # # This example changes the AWS CloudHSM cluster that is associated with an AWS CloudHSM key store to a related cluster,
8366
+ # # such as a different backup of the same cluster. This operation does not return any data. To verify that the operation
8367
+ # # worked, use the DescribeCustomKeyStores operation.
7696
8368
  #
7697
8369
  # resp = client.update_custom_key_store({
7698
8370
  # 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.
@@ -7703,6 +8375,37 @@ module Aws::KMS
7703
8375
  # {
7704
8376
  # }
7705
8377
  #
8378
+ # @example Example: To edit the proxy URI path of an external key store.
8379
+ #
8380
+ # # This example updates the proxy URI path for an external key store
8381
+ #
8382
+ # resp = client.update_custom_key_store({
8383
+ # custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating
8384
+ # xks_proxy_uri_path: "/new-path/kms/xks/v1", # The URI path to the external key store proxy APIs
8385
+ # })
8386
+ #
8387
+ # resp.to_h outputs the following:
8388
+ # {
8389
+ # }
8390
+ #
8391
+ # @example Example: To update the proxy connectivity of an external key store to VPC_ENDPOINT_SERVICE
8392
+ #
8393
+ # # To change the external key store proxy connectivity option from public endpoint connectivity to VPC endpoint service
8394
+ # # connectivity, in addition to changing the <code>XksProxyConnectivity</code> value, you must change the
8395
+ # # <code>XksProxyUriEndpoint</code> value to reflect the private DNS name associated with the VPC endpoint service. You
8396
+ # # must also add an <code>XksProxyVpcEndpointServiceName</code> value.
8397
+ #
8398
+ # resp = client.update_custom_key_store({
8399
+ # custom_key_store_id: "cks-1234567890abcdef0", # Identifies the custom key store
8400
+ # xks_proxy_connectivity: "VPC_ENDPOINT_SERVICE", # Specifies the connectivity option
8401
+ # 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
8402
+ # 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
8403
+ # })
8404
+ #
8405
+ # resp.to_h outputs the following:
8406
+ # {
8407
+ # }
8408
+ #
7706
8409
  # @example Request syntax with placeholder values
7707
8410
  #
7708
8411
  # resp = client.update_custom_key_store({
@@ -7710,6 +8413,14 @@ module Aws::KMS
7710
8413
  # new_custom_key_store_name: "CustomKeyStoreNameType",
7711
8414
  # key_store_password: "KeyStorePasswordType",
7712
8415
  # cloud_hsm_cluster_id: "CloudHsmClusterIdType",
8416
+ # xks_proxy_uri_endpoint: "XksProxyUriEndpointType",
8417
+ # xks_proxy_uri_path: "XksProxyUriPathType",
8418
+ # xks_proxy_vpc_endpoint_service_name: "XksProxyVpcEndpointServiceNameType",
8419
+ # xks_proxy_authentication_credential: {
8420
+ # access_key_id: "XksProxyAuthenticationAccessKeyIdType", # required
8421
+ # raw_secret_access_key: "XksProxyAuthenticationRawSecretAccessKeyType", # required
8422
+ # },
8423
+ # xks_proxy_connectivity: "PUBLIC_ENDPOINT", # accepts PUBLIC_ENDPOINT, VPC_ENDPOINT_SERVICE
7713
8424
  # })
7714
8425
  #
7715
8426
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore AWS API Documentation
@@ -7900,6 +8611,20 @@ module Aws::KMS
7900
8611
  #
7901
8612
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
7902
8613
  #
8614
+ #
8615
+ # @example Example: To update the primary Region of a multi-Region KMS key
8616
+ #
8617
+ # # The following UpdatePrimaryRegion example changes the multi-Region replica key in the eu-central-1 Region to the primary
8618
+ # # key. The current primary key in the us-west-1 Region becomes a replica key.
8619
+ # # The KeyId parameter identifies the current primary key in the us-west-1 Region. The PrimaryRegion parameter indicates
8620
+ # # the Region of the replica key that will become the new primary key.
8621
+ # # This operation does not return any output. To verify that primary key is changed, use the DescribeKey operation.
8622
+ #
8623
+ # resp = client.update_primary_region({
8624
+ # key_id: "arn:aws:kms:us-west-1:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab", # The current primary key.
8625
+ # primary_region: "eu-central-1", # The Region of the replica key that will become the primary key.
8626
+ # })
8627
+ #
7903
8628
  # @example Request syntax with placeholder values
7904
8629
  #
7905
8630
  # resp = client.update_primary_region({
@@ -7940,17 +8665,18 @@ module Aws::KMS
7940
8665
  # You can also verify the digital signature by using the public key of
7941
8666
  # the KMS key outside of KMS. Use the GetPublicKey operation to download
7942
8667
  # the public key in the asymmetric KMS key and then use the public key
7943
- # to verify the signature outside of KMS. To verify a signature outside
7944
- # of KMS with an SM2 public key, you must specify the distinguishing ID.
7945
- # By default, KMS uses `1234567812345678` as the distinguishing ID. For
7946
- # more information, see [Offline verification with SM2 key pairs][2] in
7947
- # *Key Management Service Developer Guide*. The advantage of using the
8668
+ # to verify the signature outside of KMS. The advantage of using the
7948
8669
  # `Verify` operation is that it is performed within KMS. As a result,
7949
8670
  # it's easy to call, the operation is performed within the FIPS
7950
8671
  # boundary, it is logged in CloudTrail, and you can use key policy and
7951
8672
  # IAM policy to determine who is authorized to use the KMS key to verify
7952
8673
  # signatures.
7953
8674
  #
8675
+ # To verify a signature outside of KMS with an SM2 public key (China
8676
+ # Regions only), you must specify the distinguishing ID. By default, KMS
8677
+ # uses `1234567812345678` as the distinguishing ID. For more
8678
+ # information, see [Offline verification with SM2 key pairs][2].
8679
+ #
7954
8680
  # The KMS key that you use for this operation must be in a compatible
7955
8681
  # key state. For details, see [Key states of KMS keys][3] in the *Key
7956
8682
  # Management Service Developer Guide*.
@@ -8043,7 +8769,7 @@ module Aws::KMS
8043
8769
  # @example Example: To use an asymmetric KMS key to verify a digital signature
8044
8770
  #
8045
8771
  # # This operation uses the public key in an elliptic curve (ECC) asymmetric key to verify a digital signature within AWS
8046
- # # KMS.
8772
+ # # KMS.
8047
8773
  #
8048
8774
  # resp = client.verify({
8049
8775
  # 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.
@@ -8091,33 +8817,35 @@ module Aws::KMS
8091
8817
  # HMAC, `VerifyMac` computes an HMAC using the message, HMAC KMS key,
8092
8818
  # and MAC algorithm that you specify, and compares the computed HMAC to
8093
8819
  # the HMAC that you specify. If the HMACs are identical, the
8094
- # verification succeeds; otherwise, it fails.
8820
+ # verification succeeds; otherwise, it fails. Verification indicates
8821
+ # that the message hasn't changed since the HMAC was calculated, and
8822
+ # the specified key was used to generate and verify the HMAC.
8095
8823
  #
8096
- # Verification indicates that the message hasn't changed since the HMAC
8097
- # was calculated, and the specified key was used to generate and verify
8098
- # the HMAC.
8824
+ # HMAC KMS keys and the HMAC algorithms that KMS uses conform to
8825
+ # industry standards defined in [RFC 2104][1].
8099
8826
  #
8100
8827
  # This operation is part of KMS support for HMAC KMS keys. For details,
8101
- # see [HMAC keys in KMS][1] in the *Key Management Service Developer
8828
+ # see [HMAC keys in KMS][2] in the *Key Management Service Developer
8102
8829
  # Guide*.
8103
8830
  #
8104
8831
  # The KMS key that you use for this operation must be in a compatible
8105
- # key state. For details, see [Key states of KMS keys][2] in the *Key
8832
+ # key state. For details, see [Key states of KMS keys][3] in the *Key
8106
8833
  # Management Service Developer Guide*.
8107
8834
  #
8108
8835
  # **Cross-account use**\: Yes. To perform this operation with a KMS key
8109
8836
  # in a different Amazon Web Services account, specify the key ARN or
8110
8837
  # alias ARN in the value of the `KeyId` parameter.
8111
8838
  #
8112
- # **Required permissions**\: [kms:VerifyMac][3] (key policy)
8839
+ # **Required permissions**\: [kms:VerifyMac][4] (key policy)
8113
8840
  #
8114
8841
  # **Related operations**\: GenerateMac
8115
8842
  #
8116
8843
  #
8117
8844
  #
8118
- # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
8119
- # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
8120
- # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8845
+ # [1]: https://datatracker.ietf.org/doc/html/rfc2104
8846
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
8847
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
8848
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
8121
8849
  #
8122
8850
  # @option params [required, String, StringIO, File] :message
8123
8851
  # The message that will be used in the verification. Enter the same
@@ -8221,7 +8949,7 @@ module Aws::KMS
8221
8949
  params: params,
8222
8950
  config: config)
8223
8951
  context[:gem_name] = 'aws-sdk-kms'
8224
- context[:gem_version] = '1.58.0'
8952
+ context[:gem_version] = '1.60.0'
8225
8953
  Seahorse::Client::Request.new(handlers, context)
8226
8954
  end
8227
8955