aws-sdk-kms 1.59.0 → 1.60.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-kms/client.rb +1158 -447
- data/lib/aws-sdk-kms/client_api.rb +111 -7
- data/lib/aws-sdk-kms/endpoint_parameters.rb +3 -0
- data/lib/aws-sdk-kms/endpoint_provider.rb +76 -76
- data/lib/aws-sdk-kms/errors.rb +192 -0
- data/lib/aws-sdk-kms/types.rb +1034 -206
- data/lib/aws-sdk-kms.rb +1 -1
- metadata +2 -2
data/lib/aws-sdk-kms/client.rb
CHANGED
@@ -455,32 +455,27 @@ module Aws::KMS
|
|
455
455
|
req.send_request(options)
|
456
456
|
end
|
457
457
|
|
458
|
-
# Connects or reconnects a [custom key store][1] to its
|
459
|
-
# CloudHSM
|
458
|
+
# Connects or reconnects a [custom key store][1] to its backing key
|
459
|
+
# store. For an CloudHSM key store, `ConnectCustomKeyStore` connects the
|
460
|
+
# key store to its associated CloudHSM cluster. For an external key
|
461
|
+
# store, `ConnectCustomKeyStore` connects the key store to the external
|
462
|
+
# key store proxy that communicates with your external key manager.
|
460
463
|
#
|
461
464
|
# The custom key store must be connected before you can create KMS keys
|
462
465
|
# in the key store or use the KMS keys it contains. You can disconnect
|
463
466
|
# and reconnect a custom key store at any time.
|
464
467
|
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
# cluster, use the [DescribeClusters][2] operation. To add HSMs to the
|
468
|
-
# cluster, use the [CreateHsm][3] operation. Also, the [ `kmsuser`
|
469
|
-
# crypto user][4] (CU) must not be logged into the cluster. This
|
470
|
-
# prevents KMS from using this account to log in.
|
471
|
-
#
|
472
|
-
# The connection process can take an extended amount of time to
|
473
|
-
# complete; up to 20 minutes. This operation starts the connection
|
468
|
+
# The connection process for a custom key store can take an extended
|
469
|
+
# amount of time to complete. This operation starts the connection
|
474
470
|
# process, but it does not wait for it to complete. When it succeeds,
|
475
471
|
# this operation quickly returns an HTTP 200 response and a JSON object
|
476
472
|
# with no properties. However, this response does not indicate that the
|
477
473
|
# custom key store is connected. To get the connection state of the
|
478
474
|
# custom key store, use the DescribeCustomKeyStores operation.
|
479
475
|
#
|
480
|
-
#
|
481
|
-
#
|
482
|
-
#
|
483
|
-
# as the `kmsuser` CU, and rotates its password.
|
476
|
+
# This operation is part of the [custom key stores][1] feature in KMS,
|
477
|
+
# which combines the convenience and extensive integration of KMS with
|
478
|
+
# the isolation and control of a key store that you own and manage.
|
484
479
|
#
|
485
480
|
# The `ConnectCustomKeyStore` operation might fail for various reasons.
|
486
481
|
# To find the reason, use the DescribeCustomKeyStores operation and see
|
@@ -492,14 +487,50 @@ module Aws::KMS
|
|
492
487
|
# UpdateCustomKeyStore operation if necessary, and then use
|
493
488
|
# `ConnectCustomKeyStore` again.
|
494
489
|
#
|
495
|
-
#
|
496
|
-
#
|
490
|
+
# **CloudHSM key store**
|
491
|
+
#
|
492
|
+
# During the connection process for an CloudHSM key store, KMS finds the
|
493
|
+
# CloudHSM cluster that is associated with the custom key store, creates
|
494
|
+
# the connection infrastructure, connects to the cluster, logs into the
|
495
|
+
# CloudHSM client as the `kmsuser` CU, and rotates its password.
|
496
|
+
#
|
497
|
+
# To connect an CloudHSM key store, its associated CloudHSM cluster must
|
498
|
+
# have at least one active HSM. To get the number of active HSMs in a
|
499
|
+
# cluster, use the [DescribeClusters][2] operation. To add HSMs to the
|
500
|
+
# cluster, use the [CreateHsm][3] operation. Also, the [ `kmsuser`
|
501
|
+
# crypto user][4] (CU) must not be logged into the cluster. This
|
502
|
+
# prevents KMS from using this account to log in.
|
503
|
+
#
|
504
|
+
# If you are having trouble connecting or disconnecting a CloudHSM key
|
505
|
+
# store, see [Troubleshooting an CloudHSM key store][5] in the *Key
|
506
|
+
# Management Service Developer Guide*.
|
507
|
+
#
|
508
|
+
# **External key store**
|
509
|
+
#
|
510
|
+
# When you connect an external key store that uses public endpoint
|
511
|
+
# connectivity, KMS tests its ability to communicate with your external
|
512
|
+
# key manager by sending a request via the external key store proxy.
|
513
|
+
#
|
514
|
+
# When you connect to an external key store that uses VPC endpoint
|
515
|
+
# service connectivity, KMS establishes the networking elements that it
|
516
|
+
# needs to communicate with your external key manager via the external
|
517
|
+
# key store proxy. This includes creating an interface endpoint to the
|
518
|
+
# VPC endpoint service and a private hosted zone for traffic between KMS
|
519
|
+
# and the VPC endpoint service.
|
520
|
+
#
|
521
|
+
# To connect an external key store, KMS must be able to connect to the
|
522
|
+
# external key store proxy, the external key store proxy must be able to
|
523
|
+
# communicate with your external key manager, and the external key
|
524
|
+
# manager must be available for cryptographic operations.
|
525
|
+
#
|
526
|
+
# If you are having trouble connecting or disconnecting an external key
|
527
|
+
# store, see [Troubleshooting an external key store][6] in the *Key
|
497
528
|
# Management Service Developer Guide*.
|
498
529
|
#
|
499
530
|
# **Cross-account use**\: No. You cannot perform this operation on a
|
500
531
|
# custom key store in a different Amazon Web Services account.
|
501
532
|
#
|
502
|
-
# **Required permissions**\: [kms:ConnectCustomKeyStore][
|
533
|
+
# **Required permissions**\: [kms:ConnectCustomKeyStore][7] (IAM policy)
|
503
534
|
#
|
504
535
|
# **Related operations**
|
505
536
|
#
|
@@ -520,7 +551,8 @@ module Aws::KMS
|
|
520
551
|
# [3]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
|
521
552
|
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
|
522
553
|
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
|
523
|
-
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
554
|
+
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
|
555
|
+
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
524
556
|
#
|
525
557
|
# @option params [required, String] :custom_key_store_id
|
526
558
|
# Enter the key store ID of the custom key store that you want to
|
@@ -530,10 +562,12 @@ module Aws::KMS
|
|
530
562
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
531
563
|
#
|
532
564
|
#
|
533
|
-
# @example Example: To connect a custom key store
|
565
|
+
# @example Example: To connect a custom key store
|
534
566
|
#
|
535
|
-
# # This example connects an AWS KMS custom key store to its
|
536
|
-
# #
|
567
|
+
# # This example connects an AWS KMS custom key store to its backing key store. For an AWS CloudHSM key store, it connects
|
568
|
+
# # the key store to its AWS CloudHSM cluster. For an external key store, it connects the key store to the external key
|
569
|
+
# # store proxy that communicates with your external key manager. This operation does not return any data. To verify that
|
570
|
+
# # the custom key store is connected, use the <code>DescribeCustomKeyStores</code> operation.
|
537
571
|
#
|
538
572
|
# resp = client.connect_custom_key_store({
|
539
573
|
# custom_key_store_id: "cks-1234567890abcdef0", # The ID of the AWS KMS custom key store.
|
@@ -561,7 +595,7 @@ module Aws::KMS
|
|
561
595
|
# Creates a friendly name for a KMS key.
|
562
596
|
#
|
563
597
|
# <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
|
564
|
-
# the KMS key. For details, see [ABAC
|
598
|
+
# the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
|
565
599
|
# Service Developer Guide*.
|
566
600
|
#
|
567
601
|
# </note>
|
@@ -688,34 +722,76 @@ module Aws::KMS
|
|
688
722
|
req.send_request(options)
|
689
723
|
end
|
690
724
|
|
691
|
-
# Creates a [custom key store][1]
|
692
|
-
#
|
725
|
+
# Creates a [custom key store][1] backed by a key store that you own and
|
726
|
+
# manage. When you use a KMS key in a custom key store for a
|
727
|
+
# cryptographic operation, the cryptographic operation is actually
|
728
|
+
# performed in your key store using your keys. KMS supports [CloudHSM
|
729
|
+
# key stores][2] backed by an [CloudHSM cluster][3] and [external key
|
730
|
+
# stores][4] backed by an external key store proxy and external key
|
731
|
+
# manager outside of Amazon Web Services.
|
732
|
+
#
|
733
|
+
# This operation is part of the [custom key stores][1] feature in KMS,
|
734
|
+
# which combines the convenience and extensive integration of KMS with
|
735
|
+
# the isolation and control of a key store that you own and manage.
|
736
|
+
#
|
737
|
+
# Before you create the custom key store, the required elements must be
|
738
|
+
# in place and operational. We recommend that you use the test tools
|
739
|
+
# that KMS provides to verify the configuration your external key store
|
740
|
+
# proxy. For details about the required elements and verification tests,
|
741
|
+
# see [Assemble the prerequisites (for CloudHSM key stores)][5] or
|
742
|
+
# [Assemble the prerequisites (for external key stores)][6] in the *Key
|
743
|
+
# Management Service Developer Guide*.
|
693
744
|
#
|
694
|
-
#
|
695
|
-
# KMS, which combines the convenience and extensive integration of KMS
|
696
|
-
# with the isolation and control of a single-tenant key store.
|
745
|
+
# To create a custom key store, use the following parameters.
|
697
746
|
#
|
698
|
-
#
|
699
|
-
#
|
700
|
-
#
|
701
|
-
#
|
702
|
-
#
|
747
|
+
# * To create an CloudHSM key store, specify the `CustomKeyStoreName`,
|
748
|
+
# `CloudHsmClusterId`, `KeyStorePassword`, and
|
749
|
+
# `TrustAnchorCertificate`. The `CustomKeyStoreType` parameter is
|
750
|
+
# optional for CloudHSM key stores. If you include it, set it to the
|
751
|
+
# default value, `AWS_CLOUDHSM`. For help with failures, see
|
752
|
+
# [Troubleshooting an CloudHSM key store][7] in the *Key Management
|
753
|
+
# Service Developer Guide*.
|
754
|
+
#
|
755
|
+
# * To create an external key store, specify the `CustomKeyStoreName`
|
756
|
+
# and a `CustomKeyStoreType` of `EXTERNAL_KEY_STORE`. Also, specify
|
757
|
+
# values for `XksProxyConnectivity`,
|
758
|
+
# `XksProxyAuthenticationCredential`, `XksProxyUriEndpoint`, and
|
759
|
+
# `XksProxyUriPath`. If your `XksProxyConnectivity` value is
|
760
|
+
# `VPC_ENDPOINT_SERVICE`, specify the `XksProxyVpcEndpointServiceName`
|
761
|
+
# parameter. For help with failures, see [Troubleshooting an external
|
762
|
+
# key store][8] in the *Key Management Service Developer Guide*.
|
763
|
+
#
|
764
|
+
# <note markdown="1"> For external key stores:
|
765
|
+
#
|
766
|
+
# Some external key managers provide a simpler method for creating an
|
767
|
+
# external key store. For details, see your external key manager
|
768
|
+
# documentation.
|
769
|
+
#
|
770
|
+
# When creating an external key store in the KMS console, you can upload
|
771
|
+
# a JSON-based proxy configuration file with the desired values. You
|
772
|
+
# cannot use a proxy configuration with the `CreateCustomKeyStore`
|
773
|
+
# operation. However, you can use the values in the file to help you
|
774
|
+
# determine the correct values for the `CreateCustomKeyStore`
|
775
|
+
# parameters.
|
776
|
+
#
|
777
|
+
# </note>
|
703
778
|
#
|
704
779
|
# When the operation completes successfully, it returns the ID of the
|
705
780
|
# new custom key store. Before you can use your new custom key store,
|
706
|
-
# you need to use the ConnectCustomKeyStore operation to connect
|
707
|
-
# key store to its CloudHSM cluster
|
708
|
-
#
|
709
|
-
#
|
710
|
-
#
|
711
|
-
#
|
712
|
-
#
|
781
|
+
# you need to use the ConnectCustomKeyStore operation to connect a new
|
782
|
+
# CloudHSM key store to its CloudHSM cluster, or to connect a new
|
783
|
+
# external key store to the external key store proxy for your external
|
784
|
+
# key manager. Even if you are not going to use your custom key store
|
785
|
+
# immediately, you might want to connect it to verify that all settings
|
786
|
+
# are correct and then disconnect it until you are ready to use it.
|
787
|
+
#
|
788
|
+
# For help with failures, see [Troubleshooting a custom key store][7] in
|
713
789
|
# the *Key Management Service Developer Guide*.
|
714
790
|
#
|
715
791
|
# **Cross-account use**\: No. You cannot perform this operation on a
|
716
792
|
# custom key store in a different Amazon Web Services account.
|
717
793
|
#
|
718
|
-
# **Required permissions**\: [kms:CreateCustomKeyStore][
|
794
|
+
# **Required permissions**\: [kms:CreateCustomKeyStore][9] (IAM policy).
|
719
795
|
#
|
720
796
|
# **Related operations:**
|
721
797
|
#
|
@@ -732,35 +808,53 @@ module Aws::KMS
|
|
732
808
|
#
|
733
809
|
#
|
734
810
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
735
|
-
# [2]: https://docs.aws.amazon.com/
|
736
|
-
# [3]: https://docs.aws.amazon.com/
|
737
|
-
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
738
|
-
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
811
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
|
812
|
+
# [3]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
|
813
|
+
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
|
814
|
+
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
|
815
|
+
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
|
816
|
+
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
|
817
|
+
# [8]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
|
818
|
+
# [9]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
739
819
|
#
|
740
820
|
# @option params [required, String] :custom_key_store_name
|
741
821
|
# Specifies a friendly name for the custom key store. The name must be
|
742
|
-
# unique in your Amazon Web Services account.
|
822
|
+
# unique in your Amazon Web Services account and Region. This parameter
|
823
|
+
# is required for all custom key stores.
|
743
824
|
#
|
744
825
|
# @option params [String] :cloud_hsm_cluster_id
|
745
|
-
# Identifies the CloudHSM cluster for
|
746
|
-
#
|
747
|
-
#
|
748
|
-
#
|
826
|
+
# Identifies the CloudHSM cluster for an CloudHSM key store. This
|
827
|
+
# parameter is required for custom key stores with `CustomKeyStoreType`
|
828
|
+
# of `AWS_CLOUDHSM`.
|
829
|
+
#
|
830
|
+
# Enter the cluster ID of any active CloudHSM cluster that is not
|
831
|
+
# already associated with a custom key store. To find the cluster ID,
|
832
|
+
# use the [DescribeClusters][1] operation.
|
749
833
|
#
|
750
834
|
#
|
751
835
|
#
|
752
836
|
# [1]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
|
753
837
|
#
|
754
838
|
# @option params [String] :trust_anchor_certificate
|
755
|
-
#
|
756
|
-
#
|
757
|
-
#
|
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].
|
758
848
|
#
|
759
849
|
#
|
760
850
|
#
|
761
851
|
# [1]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html
|
762
852
|
#
|
763
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
|
+
#
|
764
858
|
# Enter the password of the [ `kmsuser` crypto user (CU) account][1] in
|
765
859
|
# the specified CloudHSM cluster. KMS logs into the cluster as this user
|
766
860
|
# to manage key material on your behalf.
|
@@ -775,26 +869,150 @@ module Aws::KMS
|
|
775
869
|
#
|
776
870
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
|
777
871
|
#
|
778
|
-
# @
|
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.
|
779
900
|
#
|
780
|
-
#
|
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.
|
781
905
|
#
|
906
|
+
# <b>Uniqueness requirements: </b>
|
782
907
|
#
|
783
|
-
#
|
908
|
+
# * The combined `XksProxyUriEndpoint` and `XksProxyUriPath` values must
|
909
|
+
# be unique in the Amazon Web Services account and Region.
|
784
910
|
#
|
785
|
-
#
|
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.
|
786
915
|
#
|
787
|
-
#
|
788
|
-
#
|
789
|
-
#
|
790
|
-
#
|
791
|
-
#
|
792
|
-
# })
|
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.
|
793
921
|
#
|
794
|
-
#
|
795
|
-
#
|
796
|
-
#
|
797
|
-
#
|
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
|
798
1016
|
#
|
799
1017
|
# @example Request syntax with placeholder values
|
800
1018
|
#
|
@@ -803,6 +1021,15 @@ module Aws::KMS
|
|
803
1021
|
# cloud_hsm_cluster_id: "CloudHsmClusterIdType",
|
804
1022
|
# trust_anchor_certificate: "TrustAnchorCertificateType",
|
805
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
|
806
1033
|
# })
|
807
1034
|
#
|
808
1035
|
# @example Response structure
|
@@ -1077,13 +1304,22 @@ module Aws::KMS
|
|
1077
1304
|
end
|
1078
1305
|
|
1079
1306
|
# Creates a unique customer managed [KMS key][1] in your Amazon Web
|
1080
|
-
# Services account and Region.
|
1081
|
-
#
|
1082
|
-
#
|
1083
|
-
#
|
1084
|
-
#
|
1085
|
-
#
|
1086
|
-
#
|
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*
|
1087
1323
|
# and *KMS key*. The concept has not changed. To prevent breaking
|
1088
1324
|
# changes, KMS is keeping some variations of this term.
|
1089
1325
|
#
|
@@ -1093,12 +1329,15 @@ module Aws::KMS
|
|
1093
1329
|
#
|
1094
1330
|
# Symmetric encryption KMS key
|
1095
1331
|
#
|
1096
|
-
# :
|
1097
|
-
#
|
1098
|
-
#
|
1099
|
-
#
|
1100
|
-
#
|
1101
|
-
#
|
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.
|
1102
1341
|
#
|
1103
1342
|
# If you need a key for basic encryption and decryption or you are
|
1104
1343
|
# creating a KMS key to protect your resources in an Amazon Web
|
@@ -1183,12 +1422,12 @@ module Aws::KMS
|
|
1183
1422
|
#
|
1184
1423
|
#
|
1185
1424
|
#
|
1186
|
-
# : To import your own key material, begin by creating a
|
1187
|
-
# encryption KMS key with no key material. To do this, use
|
1188
|
-
# `Origin` parameter of `CreateKey` with a value of `EXTERNAL`.
|
1189
|
-
# use GetParametersForImport operation to get a public key and
|
1190
|
-
# token, and use the public key to encrypt your key material.
|
1191
|
-
# 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
|
1192
1431
|
# material. For step-by-step instructions, see [Importing Key
|
1193
1432
|
# Material][6] in the <i> <i>Key Management Service Developer
|
1194
1433
|
# Guide</i> </i>.
|
@@ -1201,34 +1440,70 @@ module Aws::KMS
|
|
1201
1440
|
# the `Origin` parameter of `CreateKey` with a value of `EXTERNAL` and
|
1202
1441
|
# the `MultiRegion` parameter with a value of `True`. To create
|
1203
1442
|
# replicas of the multi-Region primary key, use the ReplicateKey
|
1204
|
-
# operation. For
|
1205
|
-
#
|
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
|
1206
1446
|
# Developer Guide*.
|
1207
1447
|
#
|
1208
1448
|
#
|
1209
1449
|
#
|
1210
1450
|
# Custom key store
|
1211
1451
|
#
|
1212
|
-
# :
|
1213
|
-
#
|
1214
|
-
#
|
1215
|
-
#
|
1216
|
-
#
|
1217
|
-
#
|
1218
|
-
#
|
1219
|
-
#
|
1220
|
-
#
|
1221
|
-
# key store
|
1222
|
-
#
|
1223
|
-
#
|
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>
|
1224
1499
|
#
|
1225
1500
|
# **Cross-account use**\: No. You cannot use this operation to create a
|
1226
1501
|
# KMS key in a different Amazon Web Services account.
|
1227
1502
|
#
|
1228
|
-
# **Required permissions**\: [kms:CreateKey][
|
1229
|
-
# `Tags` parameter, [kms:TagResource][
|
1230
|
-
# information about related permissions, see [Allow a user to create
|
1231
|
-
# keys][
|
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*.
|
1232
1507
|
#
|
1233
1508
|
# **Related operations:**
|
1234
1509
|
#
|
@@ -1241,29 +1516,29 @@ module Aws::KMS
|
|
1241
1516
|
#
|
1242
1517
|
#
|
1243
1518
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys
|
1244
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
1519
|
+
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html
|
1245
1520
|
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
|
1246
1521
|
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
|
1247
1522
|
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
|
1248
1523
|
# [6]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
|
1249
|
-
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
1250
|
-
# [8]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
1251
|
-
# [9]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
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
|
1252
1530
|
#
|
1253
1531
|
# @option params [String] :policy
|
1254
|
-
# The key policy to attach to the KMS key.
|
1255
|
-
# policy, KMS attaches a default key policy to the KMS key. For more
|
1256
|
-
# information, see [Default key policy][1] in the *Key Management
|
1257
|
-
# Service Developer Guide*.
|
1532
|
+
# The key policy to attach to the KMS key.
|
1258
1533
|
#
|
1259
1534
|
# If you provide a key policy, it must meet the following criteria:
|
1260
1535
|
#
|
1261
|
-
# * If you don't set `BypassPolicyLockoutSafetyCheck` to
|
1262
|
-
#
|
1536
|
+
# * If you don't set `BypassPolicyLockoutSafetyCheck` to true, the key
|
1537
|
+
# policy must allow the principal that is making the `CreateKey`
|
1263
1538
|
# request to make a subsequent PutKeyPolicy request on the KMS key.
|
1264
1539
|
# This reduces the risk that the KMS key becomes unmanageable. For
|
1265
1540
|
# more information, refer to the scenario in the [Default Key
|
1266
|
-
# Policy][
|
1541
|
+
# Policy][1] section of the <i> <i>Key Management Service Developer
|
1267
1542
|
# Guide</i> </i>.
|
1268
1543
|
#
|
1269
1544
|
# * Each statement in the key policy must contain one or more
|
@@ -1273,33 +1548,25 @@ module Aws::KMS
|
|
1273
1548
|
# delay before including the new principal in a key policy because the
|
1274
1549
|
# new principal might not be immediately visible to KMS. For more
|
1275
1550
|
# information, see [Changes that I make are not always immediately
|
1276
|
-
# visible][
|
1551
|
+
# visible][2] in the *Amazon Web Services Identity and Access
|
1277
1552
|
# Management User Guide*.
|
1278
1553
|
#
|
1279
|
-
#
|
1280
|
-
#
|
1281
|
-
# *
|
1282
|
-
# through the end of the ASCII character range.
|
1283
|
-
#
|
1284
|
-
# * Printable characters in the Basic Latin and Latin-1 Supplement
|
1285
|
-
# character set (through `\u00FF`).
|
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*.
|
1286
1557
|
#
|
1287
|
-
#
|
1288
|
-
# (`\u000D`) special characters
|
1558
|
+
# The key policy size quota is 32 kilobytes (32768 bytes).
|
1289
1559
|
#
|
1290
|
-
# For
|
1291
|
-
#
|
1292
|
-
#
|
1293
|
-
# Reference][5] in the <i> <i>Identity and Access Management User
|
1294
|
-
# Guide</i> </i>.
|
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>.
|
1295
1563
|
#
|
1296
1564
|
#
|
1297
1565
|
#
|
1298
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
|
1299
|
-
# [2]: https://docs.aws.amazon.com/
|
1300
|
-
# [3]: https://docs.aws.amazon.com/
|
1301
|
-
# [4]: https://docs.aws.amazon.com/
|
1302
|
-
# [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
|
1303
1570
|
#
|
1304
1571
|
# @option params [String] :description
|
1305
1572
|
# A description of the KMS key.
|
@@ -1343,8 +1610,8 @@ module Aws::KMS
|
|
1343
1610
|
#
|
1344
1611
|
# The `KeySpec` and `CustomerMasterKeySpec` parameters work the same
|
1345
1612
|
# way. Only the names differ. We recommend that you use `KeySpec`
|
1346
|
-
# parameter in your code. However, to avoid breaking changes, KMS
|
1347
|
-
#
|
1613
|
+
# parameter in your code. However, to avoid breaking changes, KMS
|
1614
|
+
# supports both parameters.
|
1348
1615
|
#
|
1349
1616
|
# @option params [String] :key_spec
|
1350
1617
|
# Specifies the type of KMS key to create. The default value,
|
@@ -1355,13 +1622,13 @@ module Aws::KMS
|
|
1355
1622
|
# in the <i> <i>Key Management Service Developer Guide</i> </i>.
|
1356
1623
|
#
|
1357
1624
|
# The `KeySpec` determines whether the KMS key contains a symmetric key
|
1358
|
-
# or an asymmetric key pair. It also determines the
|
1359
|
-
#
|
1360
|
-
#
|
1361
|
-
#
|
1362
|
-
#
|
1363
|
-
#
|
1364
|
-
#
|
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>.
|
1365
1632
|
#
|
1366
1633
|
# [Amazon Web Services services that are integrated with KMS][5] use
|
1367
1634
|
# symmetric encryption KMS keys to protect your data. These services do
|
@@ -1426,44 +1693,46 @@ module Aws::KMS
|
|
1426
1693
|
# origin after you create the KMS key. The default is `AWS_KMS`, which
|
1427
1694
|
# means that KMS creates the key material.
|
1428
1695
|
#
|
1429
|
-
# To create a KMS key with no key material (for imported key
|
1430
|
-
# set
|
1431
|
-
# material into KMS, see [Importing Key Material][
|
1432
|
-
# Management Service Developer Guide*.
|
1433
|
-
# symmetric
|
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.
|
1434
1701
|
#
|
1435
|
-
# To create a KMS key in an
|
1702
|
+
# To [create a KMS key in an CloudHSM key store][3] and create its key
|
1436
1703
|
# material in the associated CloudHSM cluster, set this value to
|
1437
1704
|
# `AWS_CLOUDHSM`. You must also use the `CustomKeyStoreId` parameter to
|
1438
|
-
# identify the
|
1439
|
-
#
|
1705
|
+
# identify the CloudHSM key store. The `KeySpec` value must be
|
1706
|
+
# `SYMMETRIC_DEFAULT`.
|
1440
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`.
|
1441
1713
|
#
|
1442
1714
|
#
|
1443
|
-
#
|
1444
|
-
# [
|
1715
|
+
#
|
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
|
1445
1720
|
#
|
1446
1721
|
# @option params [String] :custom_key_store_id
|
1447
|
-
# Creates the KMS key in the specified [custom key store][1]
|
1448
|
-
#
|
1449
|
-
#
|
1450
|
-
#
|
1451
|
-
# the custom key store must have at least two active HSMs, each in a
|
1452
|
-
# 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.
|
1453
1726
|
#
|
1454
1727
|
# This parameter is valid only for symmetric encryption KMS keys in a
|
1455
1728
|
# single Region. You cannot create any other type of KMS key in a custom
|
1456
1729
|
# key store.
|
1457
1730
|
#
|
1458
|
-
#
|
1459
|
-
#
|
1460
|
-
#
|
1461
|
-
#
|
1462
|
-
#
|
1463
|
-
#
|
1464
|
-
# This operation is part of the [custom key store feature][1] feature in
|
1465
|
-
# KMS, which combines the convenience and extensive integration of KMS
|
1466
|
-
# with the isolation and control of a single-tenant key store.
|
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.
|
1467
1736
|
#
|
1468
1737
|
#
|
1469
1738
|
#
|
@@ -1496,7 +1765,7 @@ module Aws::KMS
|
|
1496
1765
|
# TagResource operation.
|
1497
1766
|
#
|
1498
1767
|
# <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
|
1499
|
-
# key. For details, see [ABAC
|
1768
|
+
# key. For details, see [ABAC for KMS][1] in the *Key Management Service
|
1500
1769
|
# Developer Guide*.
|
1501
1770
|
#
|
1502
1771
|
# </note>
|
@@ -1543,15 +1812,50 @@ module Aws::KMS
|
|
1543
1812
|
# This value creates a *primary key*, not a replica. To create a
|
1544
1813
|
# *replica key*, use the ReplicateKey operation.
|
1545
1814
|
#
|
1546
|
-
# You can create a multi-Region
|
1547
|
-
#
|
1548
|
-
#
|
1549
|
-
# 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.
|
1550
1818
|
#
|
1551
1819
|
#
|
1552
1820
|
#
|
1553
1821
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
|
1554
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
|
+
#
|
1555
1859
|
# @return [Types::CreateKeyResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1556
1860
|
#
|
1557
1861
|
# * {Types::CreateKeyResponse#key_metadata #key_metadata} => Types::KeyMetadata
|
@@ -1653,6 +1957,38 @@ module Aws::KMS
|
|
1653
1957
|
# }, # Detailed information about the KMS key that this operation creates.
|
1654
1958
|
# }
|
1655
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
|
+
#
|
1656
1992
|
# @example Example: To create a multi-Region primary KMS key
|
1657
1993
|
#
|
1658
1994
|
# # This example creates a multi-Region primary symmetric encryption key. Because the default values for all parameters
|
@@ -1696,7 +2032,7 @@ module Aws::KMS
|
|
1696
2032
|
# @example Example: To create a KMS key for imported key material
|
1697
2033
|
#
|
1698
2034
|
# # This example creates a KMS key with no key material. When the operation is complete, you can import your own key
|
1699
|
-
# # material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
|
2035
|
+
# # material into the KMS key. To create this KMS key, set the Origin parameter to EXTERNAL.
|
1700
2036
|
#
|
1701
2037
|
# resp = client.create_key({
|
1702
2038
|
# origin: "EXTERNAL", # The source of the key material for the KMS key.
|
@@ -1724,11 +2060,11 @@ module Aws::KMS
|
|
1724
2060
|
# }, # Detailed information about the KMS key that this operation creates.
|
1725
2061
|
# }
|
1726
2062
|
#
|
1727
|
-
# @example Example: To create a KMS key in
|
2063
|
+
# @example Example: To create a KMS key in an AWS CloudHSM key store
|
1728
2064
|
#
|
1729
|
-
# # This example creates a KMS key in the specified
|
1730
|
-
# # AWS KMS and the key material in the AWS CloudHSM cluster associated with the custom key store. This
|
1731
|
-
# #
|
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.
|
1732
2068
|
#
|
1733
2069
|
# resp = client.create_key({
|
1734
2070
|
# custom_key_store_id: "cks-1234567890abcdef0", # Identifies the custom key store that hosts the KMS key.
|
@@ -1759,35 +2095,41 @@ module Aws::KMS
|
|
1759
2095
|
# }, # Detailed information about the KMS key that this operation creates.
|
1760
2096
|
# }
|
1761
2097
|
#
|
1762
|
-
# @example Example: To create an
|
2098
|
+
# @example Example: To create a KMS key in an external key store
|
1763
2099
|
#
|
1764
|
-
# # This example creates a
|
1765
|
-
# #
|
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.
|
1766
2103
|
#
|
1767
2104
|
# resp = client.create_key({
|
1768
|
-
#
|
1769
|
-
#
|
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
|
1770
2108
|
# })
|
1771
2109
|
#
|
1772
2110
|
# resp.to_h outputs the following:
|
1773
2111
|
# {
|
1774
2112
|
# key_metadata: {
|
1775
2113
|
# aws_account_id: "111122223333",
|
1776
|
-
# arn: "arn:aws:kms:us-east-2:111122223333:key/
|
1777
|
-
# creation_date: Time.parse("2022-
|
1778
|
-
#
|
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",
|
1779
2118
|
# description: "",
|
1780
2119
|
# enabled: true,
|
1781
|
-
#
|
2120
|
+
# encryption_algorithms: [
|
2121
|
+
# "SYMMETRIC_DEFAULT",
|
2122
|
+
# ],
|
2123
|
+
# key_id: "0987dcba-09fe-87dc-65ba-ab0987654321",
|
1782
2124
|
# key_manager: "CUSTOMER",
|
1783
|
-
# key_spec: "
|
2125
|
+
# key_spec: "SYMMETRIC_DEFAULT",
|
1784
2126
|
# key_state: "Enabled",
|
1785
|
-
# key_usage: "
|
1786
|
-
# mac_algorithms: [
|
1787
|
-
# "HMAC_SHA_384",
|
1788
|
-
# ],
|
2127
|
+
# key_usage: "ENCRYPT_DECRYPT",
|
1789
2128
|
# multi_region: false,
|
1790
|
-
# origin: "
|
2129
|
+
# origin: "EXTERNAL_KEY_STORE",
|
2130
|
+
# xks_key_configuration: {
|
2131
|
+
# id: "bb8562717f809024",
|
2132
|
+
# },
|
1791
2133
|
# }, # Detailed information about the KMS key that this operation creates.
|
1792
2134
|
# }
|
1793
2135
|
#
|
@@ -1799,7 +2141,7 @@ module Aws::KMS
|
|
1799
2141
|
# key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC
|
1800
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
|
1801
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
|
1802
|
-
# origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM
|
2144
|
+
# origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM, EXTERNAL_KEY_STORE
|
1803
2145
|
# custom_key_store_id: "CustomKeyStoreIdType",
|
1804
2146
|
# bypass_policy_lockout_safety_check: false,
|
1805
2147
|
# tags: [
|
@@ -1809,6 +2151,7 @@ module Aws::KMS
|
|
1809
2151
|
# },
|
1810
2152
|
# ],
|
1811
2153
|
# multi_region: false,
|
2154
|
+
# xks_key_id: "XksKeyIdType",
|
1812
2155
|
# })
|
1813
2156
|
#
|
1814
2157
|
# @example Response structure
|
@@ -1823,7 +2166,7 @@ module Aws::KMS
|
|
1823
2166
|
# resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
|
1824
2167
|
# resp.key_metadata.deletion_date #=> Time
|
1825
2168
|
# resp.key_metadata.valid_to #=> Time
|
1826
|
-
# 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"
|
1827
2170
|
# resp.key_metadata.custom_key_store_id #=> String
|
1828
2171
|
# resp.key_metadata.cloud_hsm_cluster_id #=> String
|
1829
2172
|
# resp.key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
|
@@ -1844,6 +2187,7 @@ module Aws::KMS
|
|
1844
2187
|
# resp.key_metadata.pending_deletion_window_in_days #=> Integer
|
1845
2188
|
# resp.key_metadata.mac_algorithms #=> Array
|
1846
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
|
1847
2191
|
#
|
1848
2192
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey AWS API Documentation
|
1849
2193
|
#
|
@@ -1876,10 +2220,10 @@ module Aws::KMS
|
|
1876
2220
|
#
|
1877
2221
|
# The `Decrypt` operation also decrypts ciphertext that was encrypted
|
1878
2222
|
# outside of KMS by the public key in an KMS asymmetric KMS key.
|
1879
|
-
# However, it cannot decrypt ciphertext produced by other
|
1880
|
-
# such as the [Amazon Web Services Encryption SDK][2] or
|
1881
|
-
# client-side encryption][3]. These libraries return a
|
1882
|
-
# 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.
|
1883
2227
|
#
|
1884
2228
|
# If the ciphertext was encrypted under a symmetric encryption KMS key,
|
1885
2229
|
# the `KeyId` parameter is optional. KMS can get this information from
|
@@ -2075,7 +2419,7 @@ module Aws::KMS
|
|
2075
2419
|
# Deletes the specified alias.
|
2076
2420
|
#
|
2077
2421
|
# <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
|
2078
|
-
# the KMS key. For details, see [ABAC
|
2422
|
+
# the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
|
2079
2423
|
# Service Developer Guide*.
|
2080
2424
|
#
|
2081
2425
|
# </note>
|
@@ -2146,37 +2490,44 @@ module Aws::KMS
|
|
2146
2490
|
req.send_request(options)
|
2147
2491
|
end
|
2148
2492
|
|
2149
|
-
# Deletes a [custom key store][1]. This operation does not
|
2150
|
-
#
|
2151
|
-
#
|
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.
|
2152
2503
|
#
|
2153
2504
|
# The custom key store that you delete cannot contain any [KMS keys][2].
|
2154
2505
|
# Before deleting the key store, verify that you will never need to use
|
2155
2506
|
# any of the KMS keys in the key store for any [cryptographic
|
2156
2507
|
# operations][3]. Then, use ScheduleKeyDeletion to delete the KMS keys
|
2157
|
-
# from the key store.
|
2158
|
-
#
|
2159
|
-
#
|
2160
|
-
#
|
2161
|
-
#
|
2162
|
-
#
|
2163
|
-
#
|
2164
|
-
#
|
2165
|
-
#
|
2166
|
-
#
|
2167
|
-
#
|
2168
|
-
#
|
2169
|
-
#
|
2170
|
-
#
|
2171
|
-
#
|
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.
|
2172
2527
|
#
|
2173
2528
|
# If the operation succeeds, it returns a JSON object with no
|
2174
2529
|
# properties.
|
2175
2530
|
#
|
2176
|
-
# This operation is part of the [custom key store feature][1] feature in
|
2177
|
-
# KMS, which combines the convenience and extensive integration of KMS
|
2178
|
-
# with the isolation and control of a single-tenant key store.
|
2179
|
-
#
|
2180
2531
|
# **Cross-account use**\: No. You cannot perform this operation on a
|
2181
2532
|
# custom key store in a different Amazon Web Services account.
|
2182
2533
|
#
|
@@ -2211,9 +2562,9 @@ module Aws::KMS
|
|
2211
2562
|
#
|
2212
2563
|
# @example Example: To delete a custom key store from AWS KMS
|
2213
2564
|
#
|
2214
|
-
# # This example deletes a custom key store from AWS KMS. This operation does not
|
2215
|
-
# #
|
2216
|
-
# # 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.
|
2217
2568
|
#
|
2218
2569
|
# resp = client.delete_custom_key_store({
|
2219
2570
|
# custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store to be deleted.
|
@@ -2317,9 +2668,9 @@ module Aws::KMS
|
|
2317
2668
|
# Gets information about [custom key stores][1] in the account and
|
2318
2669
|
# Region.
|
2319
2670
|
#
|
2320
|
-
# This operation is part of the [custom key
|
2321
|
-
#
|
2322
|
-
#
|
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.
|
2323
2674
|
#
|
2324
2675
|
# By default, this operation returns information about all custom key
|
2325
2676
|
# stores in the account and Region. To get only information about a
|
@@ -2327,27 +2678,32 @@ module Aws::KMS
|
|
2327
2678
|
# `CustomKeyStoreId` parameter (but not both).
|
2328
2679
|
#
|
2329
2680
|
# To determine whether the custom key store is connected to its CloudHSM
|
2330
|
-
# cluster, use the `ConnectionState` element
|
2331
|
-
# attempt to connect the custom key store failed,
|
2332
|
-
# value is `FAILED` and the `ConnectionErrorCode`
|
2333
|
-
# response indicates the cause of the failure. For help
|
2334
|
-
# `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.
|
2335
2686
|
#
|
2336
2687
|
# Custom key stores have a `DISCONNECTED` connection state if the key
|
2337
|
-
# store has never been connected or you
|
2338
|
-
# operation to disconnect it.
|
2339
|
-
#
|
2340
|
-
#
|
2341
|
-
#
|
2342
|
-
#
|
2343
|
-
#
|
2344
|
-
#
|
2345
|
-
#
|
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*.
|
2346
2702
|
#
|
2347
2703
|
# **Cross-account use**\: No. You cannot perform this operation on a
|
2348
2704
|
# custom key store in a different Amazon Web Services account.
|
2349
2705
|
#
|
2350
|
-
# **Required permissions**\: [kms:DescribeCustomKeyStores][
|
2706
|
+
# **Required permissions**\: [kms:DescribeCustomKeyStores][4] (IAM
|
2351
2707
|
# policy)
|
2352
2708
|
#
|
2353
2709
|
# **Related operations:**
|
@@ -2366,7 +2722,8 @@ module Aws::KMS
|
|
2366
2722
|
#
|
2367
2723
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
2368
2724
|
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
|
2369
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
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
|
2370
2727
|
#
|
2371
2728
|
# @option params [String] :custom_key_store_id
|
2372
2729
|
# Gets only information about the specified custom key store. Enter the
|
@@ -2374,7 +2731,7 @@ module Aws::KMS
|
|
2374
2731
|
#
|
2375
2732
|
# By default, this operation gets information about all custom key
|
2376
2733
|
# stores in the account and Region. To limit the output to a particular
|
2377
|
-
# custom key store,
|
2734
|
+
# custom key store, provide either the `CustomKeyStoreId` or
|
2378
2735
|
# `CustomKeyStoreName` parameter, but not both.
|
2379
2736
|
#
|
2380
2737
|
# @option params [String] :custom_key_store_name
|
@@ -2383,7 +2740,7 @@ module Aws::KMS
|
|
2383
2740
|
#
|
2384
2741
|
# By default, this operation gets information about all custom key
|
2385
2742
|
# stores in the account and Region. To limit the output to a particular
|
2386
|
-
# custom key store,
|
2743
|
+
# custom key store, provide either the `CustomKeyStoreId` or
|
2387
2744
|
# `CustomKeyStoreName` parameter, but not both.
|
2388
2745
|
#
|
2389
2746
|
# @option params [Integer] :limit
|
@@ -2419,10 +2776,10 @@ module Aws::KMS
|
|
2419
2776
|
# ], # Details about each custom key store in the account and Region.
|
2420
2777
|
# }
|
2421
2778
|
#
|
2422
|
-
# @example Example: To get detailed information about
|
2779
|
+
# @example Example: To get detailed information about an AWS CloudHSM key store by specifying its friendly name
|
2423
2780
|
#
|
2424
|
-
# # This example gets detailed information about a particular AWS
|
2425
|
-
# #
|
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.
|
2426
2783
|
#
|
2427
2784
|
# resp = client.describe_custom_key_stores({
|
2428
2785
|
# custom_key_store_name: "ExampleKeyStore", # The friendly name of the custom key store.
|
@@ -2437,11 +2794,71 @@ module Aws::KMS
|
|
2437
2794
|
# creation_date: Time.parse("1.499288695918E9"),
|
2438
2795
|
# custom_key_store_id: "cks-1234567890abcdef0",
|
2439
2796
|
# custom_key_store_name: "ExampleKeyStore",
|
2797
|
+
# custom_key_store_type: "AWS_CLOUDHSM",
|
2440
2798
|
# trust_anchor_certificate: "<certificate appears here>",
|
2441
2799
|
# },
|
2442
2800
|
# ], # Detailed information about the specified custom key store.
|
2443
2801
|
# }
|
2444
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
|
+
#
|
2445
2862
|
# @example Request syntax with placeholder values
|
2446
2863
|
#
|
2447
2864
|
# resp = client.describe_custom_key_stores({
|
@@ -2459,8 +2876,14 @@ module Aws::KMS
|
|
2459
2876
|
# resp.custom_key_stores[0].cloud_hsm_cluster_id #=> String
|
2460
2877
|
# resp.custom_key_stores[0].trust_anchor_certificate #=> String
|
2461
2878
|
# resp.custom_key_stores[0].connection_state #=> String, one of "CONNECTED", "CONNECTING", "FAILED", "DISCONNECTED", "DISCONNECTING"
|
2462
|
-
# resp.custom_key_stores[0].connection_error_code #=> String, one of "INVALID_CREDENTIALS", "CLUSTER_NOT_FOUND", "NETWORK_ERRORS", "INTERNAL_ERROR", "INSUFFICIENT_CLOUDHSM_HSMS", "USER_LOCKED_OUT", "USER_NOT_FOUND", "USER_LOGGED_IN", "SUBNET_NOT_FOUND", "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET"
|
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"
|
2463
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
|
2464
2887
|
# resp.next_marker #=> String
|
2465
2888
|
# resp.truncated #=> Boolean
|
2466
2889
|
#
|
@@ -2482,11 +2905,17 @@ module Aws::KMS
|
|
2482
2905
|
# expiration date (if any) of the key material. It includes fields, like
|
2483
2906
|
# `KeySpec`, that help you distinguish different types of KMS keys. It
|
2484
2907
|
# also displays the key usage (encryption, signing, or generating and
|
2485
|
-
# verifying MACs) and the algorithms that the KMS key supports. For
|
2486
|
-
#
|
2487
|
-
#
|
2488
|
-
#
|
2489
|
-
#
|
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.
|
2490
2919
|
#
|
2491
2920
|
# `DescribeKey` does not return the following information:
|
2492
2921
|
#
|
@@ -2705,7 +3134,7 @@ module Aws::KMS
|
|
2705
3134
|
#
|
2706
3135
|
# @example Example: To get details about an HMAC KMS key
|
2707
3136
|
#
|
2708
|
-
# # The following example gets the metadata of an HMAC KMS key.
|
3137
|
+
# # The following example gets the metadata of an HMAC KMS key.
|
2709
3138
|
#
|
2710
3139
|
# resp = client.describe_key({
|
2711
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.
|
@@ -2732,6 +3161,72 @@ module Aws::KMS
|
|
2732
3161
|
# }, # An object that contains information about the specified KMS key.
|
2733
3162
|
# }
|
2734
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
|
+
#
|
2735
3230
|
# @example Request syntax with placeholder values
|
2736
3231
|
#
|
2737
3232
|
# resp = client.describe_key({
|
@@ -2751,7 +3246,7 @@ module Aws::KMS
|
|
2751
3246
|
# resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
|
2752
3247
|
# resp.key_metadata.deletion_date #=> Time
|
2753
3248
|
# resp.key_metadata.valid_to #=> Time
|
2754
|
-
# 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"
|
2755
3250
|
# resp.key_metadata.custom_key_store_id #=> String
|
2756
3251
|
# resp.key_metadata.cloud_hsm_cluster_id #=> String
|
2757
3252
|
# resp.key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
|
@@ -2772,6 +3267,7 @@ module Aws::KMS
|
|
2772
3267
|
# resp.key_metadata.pending_deletion_window_in_days #=> Integer
|
2773
3268
|
# resp.key_metadata.mac_algorithms #=> Array
|
2774
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
|
2775
3271
|
#
|
2776
3272
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey AWS API Documentation
|
2777
3273
|
#
|
@@ -2851,12 +3347,11 @@ module Aws::KMS
|
|
2851
3347
|
# symmetric encryption KMS key.
|
2852
3348
|
#
|
2853
3349
|
# Automatic key rotation is supported only on symmetric encryption KMS
|
2854
|
-
# keys. You cannot enable
|
2855
|
-
#
|
2856
|
-
# material][4], or KMS keys in a [custom key store][5].
|
2857
|
-
#
|
2858
|
-
#
|
2859
|
-
# 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.
|
2860
3355
|
#
|
2861
3356
|
# You can enable (EnableKeyRotation) and disable automatic rotation of
|
2862
3357
|
# the key material in [customer managed KMS keys][7]. Key material
|
@@ -2950,11 +3445,19 @@ module Aws::KMS
|
|
2950
3445
|
req.send_request(options)
|
2951
3446
|
end
|
2952
3447
|
|
2953
|
-
# Disconnects the [custom key store][1] from its
|
2954
|
-
#
|
2955
|
-
#
|
2956
|
-
#
|
2957
|
-
#
|
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.
|
2958
3461
|
#
|
2959
3462
|
# <note markdown="1"> While a custom key store is disconnected, all attempts to create KMS
|
2960
3463
|
# keys in the custom key store or to use existing KMS keys in
|
@@ -2963,19 +3466,14 @@ module Aws::KMS
|
|
2963
3466
|
#
|
2964
3467
|
# </note>
|
2965
3468
|
#
|
2966
|
-
#
|
2967
|
-
#
|
2968
|
-
#
|
2969
|
-
#
|
2970
|
-
# 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.
|
2971
3473
|
#
|
2972
3474
|
# If the operation succeeds, it returns a JSON object with no
|
2973
3475
|
# properties.
|
2974
3476
|
#
|
2975
|
-
# This operation is part of the [custom key store feature][1] feature in
|
2976
|
-
# KMS, which combines the convenience and extensive integration of KMS
|
2977
|
-
# with the isolation and control of a single-tenant key store.
|
2978
|
-
#
|
2979
3477
|
# **Cross-account use**\: No. You cannot perform this operation on a
|
2980
3478
|
# custom key store in a different Amazon Web Services account.
|
2981
3479
|
#
|
@@ -3010,8 +3508,10 @@ module Aws::KMS
|
|
3010
3508
|
#
|
3011
3509
|
# @example Example: To disconnect a custom key store from its CloudHSM cluster
|
3012
3510
|
#
|
3013
|
-
# # This example disconnects an AWS KMS custom key store from its
|
3014
|
-
# #
|
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.
|
3015
3515
|
#
|
3016
3516
|
# resp = client.disconnect_custom_key_store({
|
3017
3517
|
# custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store.
|
@@ -3108,10 +3608,9 @@ module Aws::KMS
|
|
3108
3608
|
# customer managed KMS key, use the DisableKeyRotation operation.
|
3109
3609
|
#
|
3110
3610
|
# Automatic key rotation is supported only on [symmetric encryption KMS
|
3111
|
-
# keys][3]. You cannot enable
|
3112
|
-
#
|
3113
|
-
#
|
3114
|
-
# 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
|
3115
3614
|
# disable automatic rotation of a set of related [multi-Region keys][8],
|
3116
3615
|
# set the property on the primary key.
|
3117
3616
|
#
|
@@ -3163,12 +3662,11 @@ module Aws::KMS
|
|
3163
3662
|
# [12]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
3164
3663
|
#
|
3165
3664
|
# @option params [required, String] :key_id
|
3166
|
-
# Identifies a symmetric encryption KMS key. You cannot enable
|
3167
|
-
#
|
3168
|
-
#
|
3169
|
-
#
|
3170
|
-
#
|
3171
|
-
# 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.
|
3172
3670
|
#
|
3173
3671
|
# Specify the key ID or key ARN of the KMS key.
|
3174
3672
|
#
|
@@ -3377,6 +3875,8 @@ module Aws::KMS
|
|
3377
3875
|
# encryption KMS keys. If you are using an asymmetric KMS key, we
|
3378
3876
|
# recommend RSAES\_OAEP\_SHA\_256.
|
3379
3877
|
#
|
3878
|
+
# The SM2PKE algorithm is only available in China Regions.
|
3879
|
+
#
|
3380
3880
|
# @return [Types::EncryptResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
3381
3881
|
#
|
3382
3882
|
# * {Types::EncryptResponse#ciphertext_blob #ciphertext_blob} => String
|
@@ -3784,8 +4284,7 @@ module Aws::KMS
|
|
3784
4284
|
# to encrypt and decrypt or to sign and verify (but not both), and the
|
3785
4285
|
# rule that permits you to use ECC KMS keys only to sign and verify, are
|
3786
4286
|
# not effective on data key pairs, which are used outside of KMS. The
|
3787
|
-
# SM2 key spec is only available in China Regions.
|
3788
|
-
# asymmetric key pairs are also available in China Regions.
|
4287
|
+
# SM2 key spec is only available in China Regions.
|
3789
4288
|
#
|
3790
4289
|
# @option params [Array<String>] :grant_tokens
|
3791
4290
|
# A list of grant tokens.
|
@@ -3976,8 +4475,7 @@ module Aws::KMS
|
|
3976
4475
|
# to encrypt and decrypt or to sign and verify (but not both), and the
|
3977
4476
|
# rule that permits you to use ECC KMS keys only to sign and verify, are
|
3978
4477
|
# not effective on data key pairs, which are used outside of KMS. The
|
3979
|
-
# SM2 key spec is only available in China Regions.
|
3980
|
-
# asymmetric key pairs are also available in China Regions.
|
4478
|
+
# SM2 key spec is only available in China Regions.
|
3981
4479
|
#
|
3982
4480
|
# @option params [Array<String>] :grant_tokens
|
3983
4481
|
# A list of grant tokens.
|
@@ -4076,6 +4574,15 @@ module Aws::KMS
|
|
4076
4574
|
# KMS key or a key in a custom key store to generate a data key. To get
|
4077
4575
|
# the type of your KMS key, use the DescribeKey operation.
|
4078
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
|
+
#
|
4079
4586
|
# If the operation succeeds, you will find the encrypted copy of the
|
4080
4587
|
# data key in the `CiphertextBlob` field.
|
4081
4588
|
#
|
@@ -4233,16 +4740,17 @@ module Aws::KMS
|
|
4233
4740
|
|
4234
4741
|
# Generates a hash-based message authentication code (HMAC) for a
|
4235
4742
|
# message using an HMAC KMS key and a MAC algorithm that the key
|
4236
|
-
# supports.
|
4237
|
-
#
|
4238
|
-
#
|
4239
|
-
# You can use
|
4240
|
-
#
|
4241
|
-
#
|
4242
|
-
#
|
4243
|
-
#
|
4244
|
-
#
|
4245
|
-
#
|
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>.
|
4246
4754
|
#
|
4247
4755
|
# <note markdown="1"> Best practices recommend that you limit the time during which any
|
4248
4756
|
# signing mechanism, including an HMAC, is effective. This deters an
|
@@ -4366,42 +4874,41 @@ module Aws::KMS
|
|
4366
4874
|
# the random byte string. There is no default value for string length.
|
4367
4875
|
#
|
4368
4876
|
# By default, the random byte string is generated in KMS. To generate
|
4369
|
-
# the byte string in the CloudHSM cluster
|
4370
|
-
#
|
4877
|
+
# the byte string in the CloudHSM cluster associated with an CloudHSM
|
4878
|
+
# key store, use the `CustomKeyStoreId` parameter.
|
4371
4879
|
#
|
4372
4880
|
# Applications in Amazon Web Services Nitro Enclaves can call this
|
4373
4881
|
# operation by using the [Amazon Web Services Nitro Enclaves Development
|
4374
|
-
# Kit][
|
4375
|
-
# Amazon Web Services Nitro Enclaves use KMS][
|
4882
|
+
# Kit][1]. For information about the supporting parameters, see [How
|
4883
|
+
# Amazon Web Services Nitro Enclaves use KMS][2] in the *Key Management
|
4376
4884
|
# Service Developer Guide*.
|
4377
4885
|
#
|
4378
4886
|
# For more information about entropy and random number generation, see
|
4379
|
-
# [Key Management Service Cryptographic Details][
|
4887
|
+
# [Key Management Service Cryptographic Details][3].
|
4380
4888
|
#
|
4381
4889
|
# **Cross-account use**\: Not applicable. `GenerateRandom` does not use
|
4382
4890
|
# any account-specific resources, such as KMS keys.
|
4383
4891
|
#
|
4384
|
-
# **Required permissions**\: [kms:GenerateRandom][
|
4892
|
+
# **Required permissions**\: [kms:GenerateRandom][4] (IAM policy)
|
4385
4893
|
#
|
4386
4894
|
#
|
4387
4895
|
#
|
4388
|
-
# [1]: https://
|
4389
|
-
# [2]: https://
|
4390
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/
|
4391
|
-
# [4]: https://docs.aws.amazon.com/kms/latest/
|
4392
|
-
# [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
|
4393
4900
|
#
|
4394
4901
|
# @option params [Integer] :number_of_bytes
|
4395
4902
|
# The length of the random byte string. This parameter is required.
|
4396
4903
|
#
|
4397
4904
|
# @option params [String] :custom_key_store_id
|
4398
4905
|
# Generates the random byte string in the CloudHSM cluster that is
|
4399
|
-
# associated with the specified
|
4400
|
-
#
|
4401
|
-
#
|
4906
|
+
# associated with the specified CloudHSM key store. To find the ID of a
|
4907
|
+
# custom key store, use the DescribeCustomKeyStores operation.
|
4402
4908
|
#
|
4403
|
-
#
|
4404
|
-
#
|
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`.
|
4405
4912
|
#
|
4406
4913
|
# @return [Types::GenerateRandomResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
4407
4914
|
#
|
@@ -4522,10 +5029,9 @@ module Aws::KMS
|
|
4522
5029
|
# and Amazon CloudWatch.
|
4523
5030
|
#
|
4524
5031
|
# Automatic key rotation is supported only on [symmetric encryption KMS
|
4525
|
-
# keys][3]. You cannot enable
|
4526
|
-
#
|
4527
|
-
#
|
4528
|
-
# 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
|
4529
5035
|
# disable automatic rotation of a set of related [multi-Region keys][8],
|
4530
5036
|
# set the property on the primary key..
|
4531
5037
|
#
|
@@ -4649,7 +5155,7 @@ module Aws::KMS
|
|
4649
5155
|
# token to send with a subsequent ImportKeyMaterial request.
|
4650
5156
|
#
|
4651
5157
|
# You must specify the key ID of the symmetric encryption KMS key into
|
4652
|
-
# which you will import key material.
|
5158
|
+
# which you will import key material. The KMS key `Origin` must be
|
4653
5159
|
# `EXTERNAL`. You must also specify the wrapping algorithm and type of
|
4654
5160
|
# wrapping key (public key) that you will use to encrypt the key
|
4655
5161
|
# material. You cannot perform this operation on an asymmetric KMS key,
|
@@ -4781,21 +5287,16 @@ module Aws::KMS
|
|
4781
5287
|
# also reduce of risk of encrypting data that cannot be decrypted. These
|
4782
5288
|
# features are not effective outside of KMS.
|
4783
5289
|
#
|
4784
|
-
# To verify a signature outside of KMS with an SM2 public key (China
|
4785
|
-
# Regions only), you must specify the distinguishing ID. By default, KMS
|
4786
|
-
# uses `1234567812345678` as the distinguishing ID. For more
|
4787
|
-
# information, see [Offline verification with SM2 key pairs][2].
|
4788
|
-
#
|
4789
5290
|
# To help you use the public key safely outside of KMS, `GetPublicKey`
|
4790
5291
|
# returns important information about the public key in the response,
|
4791
5292
|
# including:
|
4792
5293
|
#
|
4793
|
-
# * [KeySpec][
|
5294
|
+
# * [KeySpec][2]\: The type of key material in the public key, such as
|
4794
5295
|
# `RSA_4096` or `ECC_NIST_P521`.
|
4795
5296
|
#
|
4796
|
-
# * [KeyUsage][
|
5297
|
+
# * [KeyUsage][3]\: Whether the key is used for encryption or signing.
|
4797
5298
|
#
|
4798
|
-
# * [EncryptionAlgorithms][
|
5299
|
+
# * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]\: A list of the
|
4799
5300
|
# encryption algorithms or the signing algorithms for the key.
|
4800
5301
|
#
|
4801
5302
|
# Although KMS cannot enforce these restrictions on external operations,
|
@@ -4806,6 +5307,11 @@ module Aws::KMS
|
|
4806
5307
|
# You can also avoid errors, such as using the wrong signing algorithm
|
4807
5308
|
# in a verification operation.
|
4808
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
|
+
#
|
4809
5315
|
# The KMS key that you use for this operation must be in a compatible
|
4810
5316
|
# key state. For details, see [Key states of KMS keys][7] in the *Key
|
4811
5317
|
# Management Service Developer Guide*.
|
@@ -4821,11 +5327,11 @@ module Aws::KMS
|
|
4821
5327
|
#
|
4822
5328
|
#
|
4823
5329
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
|
4824
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/
|
4825
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-
|
4826
|
-
# [4]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-
|
4827
|
-
# [5]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-
|
4828
|
-
# [6]: https://docs.aws.amazon.com/kms/latest/
|
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
|
4829
5335
|
# [7]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
|
4830
5336
|
# [8]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
4831
5337
|
#
|
@@ -4958,12 +5464,13 @@ module Aws::KMS
|
|
4958
5464
|
# a public key and token from the same `GetParametersForImport`
|
4959
5465
|
# response.
|
4960
5466
|
#
|
4961
|
-
# * Whether the key material expires and if so,
|
4962
|
-
#
|
4963
|
-
# the
|
4964
|
-
# key
|
4965
|
-
#
|
4966
|
-
#
|
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.
|
4967
5474
|
#
|
4968
5475
|
# When this operation is successful, the key state of the KMS key
|
4969
5476
|
# changes from `PendingImport` to `Enabled`, and you can use the KMS
|
@@ -5032,18 +5539,36 @@ module Aws::KMS
|
|
5032
5539
|
# `GetParametersForImport` request.
|
5033
5540
|
#
|
5034
5541
|
# @option params [Time,DateTime,Date,Integer,String] :valid_to
|
5035
|
-
# The time
|
5036
|
-
#
|
5037
|
-
#
|
5038
|
-
#
|
5039
|
-
#
|
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.
|
5040
5558
|
#
|
5041
5559
|
# @option params [String] :expiration_model
|
5042
5560
|
# Specifies whether the key material expires. The default is
|
5043
|
-
# `KEY_MATERIAL_EXPIRES
|
5044
|
-
#
|
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
|
5045
5565
|
# `KEY_MATERIAL_DOES_NOT_EXPIRE`, you must omit the `ValidTo` parameter.
|
5046
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
|
+
#
|
5047
5572
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5048
5573
|
#
|
5049
5574
|
#
|
@@ -5983,7 +6508,7 @@ module Aws::KMS
|
|
5983
6508
|
# (`\u000D`) special characters
|
5984
6509
|
#
|
5985
6510
|
# For information about key policies, see [Key policies in KMS][3] in
|
5986
|
-
# the *Key Management Service Developer Guide*.
|
6511
|
+
# the *Key Management Service Developer Guide*.For help writing and
|
5987
6512
|
# formatting a JSON policy document, see the [IAM JSON Policy
|
5988
6513
|
# Reference][4] in the <i> <i>Identity and Access Management User
|
5989
6514
|
# Guide</i> </i>.
|
@@ -6086,10 +6611,10 @@ module Aws::KMS
|
|
6086
6611
|
# intend.
|
6087
6612
|
#
|
6088
6613
|
# * To reencrypt the data, you must use the `DestinationKeyId` parameter
|
6089
|
-
# specify the KMS key that re-encrypts the data after it is
|
6090
|
-
# If the destination KMS key is an asymmetric KMS key, you
|
6091
|
-
# provide the encryption algorithm. The algorithm that you
|
6092
|
-
# 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.
|
6093
6618
|
#
|
6094
6619
|
# When you use an asymmetric KMS key to encrypt or reencrypt data, be
|
6095
6620
|
# sure to record the KMS key and encryption algorithm that you choose.
|
@@ -6591,7 +7116,7 @@ module Aws::KMS
|
|
6591
7116
|
# TagResource operation.
|
6592
7117
|
#
|
6593
7118
|
# <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
|
6594
|
-
# key. For details, see [ABAC
|
7119
|
+
# key. For details, see [ABAC for KMS][1] in the *Key Management Service
|
6595
7120
|
# Developer Guide*.
|
6596
7121
|
#
|
6597
7122
|
# </note>
|
@@ -6629,7 +7154,7 @@ module Aws::KMS
|
|
6629
7154
|
#
|
6630
7155
|
# @example Example: To replicate a multi-Region key in a different AWS Region
|
6631
7156
|
#
|
6632
|
-
# # 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.
|
6633
7158
|
#
|
6634
7159
|
# resp = client.replicate_key({
|
6635
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
|
@@ -6701,7 +7226,7 @@ module Aws::KMS
|
|
6701
7226
|
# resp.replica_key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
|
6702
7227
|
# resp.replica_key_metadata.deletion_date #=> Time
|
6703
7228
|
# resp.replica_key_metadata.valid_to #=> Time
|
6704
|
-
# 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"
|
6705
7230
|
# resp.replica_key_metadata.custom_key_store_id #=> String
|
6706
7231
|
# resp.replica_key_metadata.cloud_hsm_cluster_id #=> String
|
6707
7232
|
# resp.replica_key_metadata.expiration_model #=> String, one of "KEY_MATERIAL_EXPIRES", "KEY_MATERIAL_DOES_NOT_EXPIRE"
|
@@ -6722,6 +7247,7 @@ module Aws::KMS
|
|
6722
7247
|
# resp.replica_key_metadata.pending_deletion_window_in_days #=> Integer
|
6723
7248
|
# resp.replica_key_metadata.mac_algorithms #=> Array
|
6724
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
|
6725
7251
|
# resp.replica_policy #=> String
|
6726
7252
|
# resp.replica_tags #=> Array
|
6727
7253
|
# resp.replica_tags[0].tag_key #=> String
|
@@ -6941,13 +7467,6 @@ module Aws::KMS
|
|
6941
7467
|
# multi-Region replica key.) To prevent the use of a KMS key without
|
6942
7468
|
# deleting it, use DisableKey.
|
6943
7469
|
#
|
6944
|
-
# If you schedule deletion of a KMS key from a [custom key store][1],
|
6945
|
-
# when the waiting period expires, `ScheduleKeyDeletion` deletes the KMS
|
6946
|
-
# key from KMS. Then KMS makes a best effort to delete the key material
|
6947
|
-
# from the associated CloudHSM cluster. However, you might need to
|
6948
|
-
# manually [delete the orphaned key material][2] from the cluster and
|
6949
|
-
# its backups.
|
6950
|
-
#
|
6951
7470
|
# You can schedule the deletion of a multi-Region primary key and its
|
6952
7471
|
# replica keys at any time. However, KMS will not delete a multi-Region
|
6953
7472
|
# primary key with existing replica keys. If you schedule the deletion
|
@@ -6957,14 +7476,26 @@ module Aws::KMS
|
|
6957
7476
|
# the last of its replicas keys is deleted (not just scheduled), the key
|
6958
7477
|
# state of the primary key changes to `PendingDeletion` and its waiting
|
6959
7478
|
# period (`PendingWindowInDays`) begins. For details, see [Deleting
|
6960
|
-
# multi-Region keys][
|
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.
|
6961
7492
|
#
|
6962
7493
|
# For more information about scheduling a KMS key for deletion, see
|
6963
|
-
# [Deleting KMS keys][
|
7494
|
+
# [Deleting KMS keys][5] in the *Key Management Service Developer
|
6964
7495
|
# Guide*.
|
6965
7496
|
#
|
6966
7497
|
# The KMS key that you use for this operation must be in a compatible
|
6967
|
-
# key state. For details, see [Key states of KMS keys][
|
7498
|
+
# key state. For details, see [Key states of KMS keys][6] in the *Key
|
6968
7499
|
# Management Service Developer Guide*.
|
6969
7500
|
#
|
6970
7501
|
# **Cross-account use**\: No. You cannot perform this operation on a KMS
|
@@ -6980,11 +7511,12 @@ module Aws::KMS
|
|
6980
7511
|
#
|
6981
7512
|
#
|
6982
7513
|
#
|
6983
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
6984
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
6985
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
6986
|
-
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
6987
|
-
# [5]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
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
|
6988
7520
|
#
|
6989
7521
|
# @option params [required, String] :key_id
|
6990
7522
|
# The unique identifier of the KMS key to delete.
|
@@ -7234,7 +7766,7 @@ module Aws::KMS
|
|
7234
7766
|
# Adds or edits tags on a [customer managed key][1].
|
7235
7767
|
#
|
7236
7768
|
# <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
|
7237
|
-
# key. For details, see [ABAC
|
7769
|
+
# key. For details, see [ABAC for KMS][2] in the *Key Management Service
|
7238
7770
|
# Developer Guide*.
|
7239
7771
|
#
|
7240
7772
|
# </note>
|
@@ -7355,7 +7887,7 @@ module Aws::KMS
|
|
7355
7887
|
# specify the tag key and the KMS key.
|
7356
7888
|
#
|
7357
7889
|
# <note markdown="1"> Tagging or untagging a KMS key can allow or deny permission to the KMS
|
7358
|
-
# key. For details, see [ABAC
|
7890
|
+
# key. For details, see [ABAC for KMS][2] in the *Key Management Service
|
7359
7891
|
# Developer Guide*.
|
7360
7892
|
#
|
7361
7893
|
# </note>
|
@@ -7453,17 +7985,16 @@ module Aws::KMS
|
|
7453
7985
|
# Amazon Web Services account and Region.
|
7454
7986
|
#
|
7455
7987
|
# <note markdown="1"> Adding, deleting, or updating an alias can allow or deny permission to
|
7456
|
-
# the KMS key. For details, see [ABAC
|
7988
|
+
# the KMS key. For details, see [ABAC for KMS][1] in the *Key Management
|
7457
7989
|
# Service Developer Guide*.
|
7458
7990
|
#
|
7459
7991
|
# </note>
|
7460
7992
|
#
|
7461
7993
|
# The current and new KMS key must be the same type (both symmetric or
|
7462
|
-
# both asymmetric), and they must have the same key usage
|
7463
|
-
#
|
7464
|
-
#
|
7465
|
-
#
|
7466
|
-
# 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.
|
7467
7998
|
#
|
7468
7999
|
# You cannot use `UpdateAlias` to change an alias name. To change an
|
7469
8000
|
# alias name, use DeleteAlias to delete the old alias and CreateAlias to
|
@@ -7521,8 +8052,8 @@ module Aws::KMS
|
|
7521
8052
|
#
|
7522
8053
|
# The KMS key must be in the same Amazon Web Services account and Region
|
7523
8054
|
# as the alias. Also, the new target KMS key must be the same type as
|
7524
|
-
# the current target KMS key (both symmetric or both asymmetric
|
7525
|
-
# 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.
|
7526
8057
|
#
|
7527
8058
|
# Specify the key ID or key ARN of the KMS key.
|
7528
8059
|
#
|
@@ -7572,52 +8103,89 @@ module Aws::KMS
|
|
7572
8103
|
req.send_request(options)
|
7573
8104
|
end
|
7574
8105
|
|
7575
|
-
# Changes the properties of a custom key store.
|
7576
|
-
#
|
7577
|
-
#
|
7578
|
-
#
|
7579
|
-
#
|
7580
|
-
#
|
7581
|
-
#
|
7582
|
-
#
|
7583
|
-
#
|
7584
|
-
# store, use the DescribeCustomKeyStores operation.
|
7585
|
-
#
|
7586
|
-
# The `CustomKeyStoreId` parameter is required in all commands. Use the
|
7587
|
-
# other parameters of `UpdateCustomKeyStore` to edit your key store
|
7588
|
-
# settings.
|
7589
|
-
#
|
7590
|
-
# * Use the `NewCustomKeyStoreName` parameter to change the friendly
|
7591
|
-
# name of the custom key store to the value that you specify.
|
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.
|
7592
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.
|
7593
8142
|
#
|
8143
|
+
# </note>
|
7594
8144
|
#
|
7595
|
-
#
|
7596
|
-
#
|
7597
|
-
#
|
7598
|
-
#
|
7599
|
-
#
|
7600
|
-
#
|
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.
|
7601
8174
|
#
|
7602
8175
|
#
|
7603
8176
|
#
|
7604
|
-
#
|
7605
|
-
#
|
7606
|
-
#
|
7607
|
-
#
|
7608
|
-
# 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.
|
7609
8181
|
#
|
7610
8182
|
# If the operation succeeds, it returns a JSON object with no
|
7611
8183
|
# properties.
|
7612
8184
|
#
|
7613
|
-
# This operation is part of the [custom key store feature][3] feature in
|
7614
|
-
# KMS, which combines the convenience and extensive integration of KMS
|
7615
|
-
# with the isolation and control of a single-tenant key store.
|
7616
|
-
#
|
7617
8185
|
# **Cross-account use**\: No. You cannot perform this operation on a
|
7618
8186
|
# custom key store in a different Amazon Web Services account.
|
7619
8187
|
#
|
7620
|
-
# **Required permissions**\: [kms:UpdateCustomKeyStore][
|
8188
|
+
# **Required permissions**\: [kms:UpdateCustomKeyStore][2] (IAM policy)
|
7621
8189
|
#
|
7622
8190
|
# **Related operations:**
|
7623
8191
|
#
|
@@ -7633,10 +8201,8 @@ module Aws::KMS
|
|
7633
8201
|
#
|
7634
8202
|
#
|
7635
8203
|
#
|
7636
|
-
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-
|
7637
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
7638
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
|
7639
|
-
# [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
|
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
|
7640
8206
|
#
|
7641
8207
|
# @option params [required, String] :custom_key_store_id
|
7642
8208
|
# Identifies the custom key store that you want to update. Enter the ID
|
@@ -7648,16 +8214,25 @@ module Aws::KMS
|
|
7648
8214
|
# you specify. The custom key store name must be unique in the Amazon
|
7649
8215
|
# Web Services account.
|
7650
8216
|
#
|
8217
|
+
# To change this value, an CloudHSM key store must be disconnected. An
|
8218
|
+
# external key store can be connected or disconnected.
|
8219
|
+
#
|
7651
8220
|
# @option params [String] :key_store_password
|
7652
8221
|
# Enter the current password of the `kmsuser` crypto user (CU) in the
|
7653
|
-
# 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`.
|
7654
8225
|
#
|
7655
8226
|
# This parameter tells KMS the current password of the `kmsuser` crypto
|
7656
8227
|
# user (CU). It does not set or change the password of any users in the
|
7657
8228
|
# CloudHSM cluster.
|
7658
8229
|
#
|
8230
|
+
# To change this value, the CloudHSM key store must be disconnected.
|
8231
|
+
#
|
7659
8232
|
# @option params [String] :cloud_hsm_cluster_id
|
7660
|
-
# 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`.
|
7661
8236
|
#
|
7662
8237
|
# Enter the cluster ID of the cluster that you used to create the custom
|
7663
8238
|
# key store or a cluster that shares a backup history and has the same
|
@@ -7668,19 +8243,99 @@ module Aws::KMS
|
|
7668
8243
|
# view the cluster certificate of a cluster, use the
|
7669
8244
|
# [DescribeClusters][2] operation.
|
7670
8245
|
#
|
8246
|
+
# To change this value, the CloudHSM key store must be disconnected.
|
8247
|
+
#
|
7671
8248
|
#
|
7672
8249
|
#
|
7673
8250
|
# [1]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
|
7674
8251
|
# [2]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
|
7675
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
|
+
#
|
7676
8331
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7677
8332
|
#
|
7678
8333
|
#
|
7679
|
-
# @example Example: To edit the password of
|
8334
|
+
# @example Example: To edit the password of an AWS CloudHSM key store
|
7680
8335
|
#
|
7681
|
-
# # This example tells KMS the password for the kmsuser crypto user in the AWS CloudHSM cluster that is associated with
|
7682
|
-
# # AWS KMS custom key store. (It does not change the password in the CloudHSM cluster.) This operation does not return
|
7683
|
-
# # 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.
|
7684
8339
|
#
|
7685
8340
|
# resp = client.update_custom_key_store({
|
7686
8341
|
# custom_key_store_id: "cks-1234567890abcdef0", # The ID of the custom key store that you are updating.
|
@@ -7707,9 +8362,9 @@ module Aws::KMS
|
|
7707
8362
|
#
|
7708
8363
|
# @example Example: To associate the custom key store with a different, but related, AWS CloudHSM cluster.
|
7709
8364
|
#
|
7710
|
-
# # This example changes the cluster that is associated with
|
7711
|
-
# # backup of the same cluster. This operation does not return any data. To verify that the operation
|
7712
|
-
# # 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.
|
7713
8368
|
#
|
7714
8369
|
# resp = client.update_custom_key_store({
|
7715
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.
|
@@ -7720,6 +8375,37 @@ module Aws::KMS
|
|
7720
8375
|
# {
|
7721
8376
|
# }
|
7722
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
|
+
#
|
7723
8409
|
# @example Request syntax with placeholder values
|
7724
8410
|
#
|
7725
8411
|
# resp = client.update_custom_key_store({
|
@@ -7727,6 +8413,14 @@ module Aws::KMS
|
|
7727
8413
|
# new_custom_key_store_name: "CustomKeyStoreNameType",
|
7728
8414
|
# key_store_password: "KeyStorePasswordType",
|
7729
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
|
7730
8424
|
# })
|
7731
8425
|
#
|
7732
8426
|
# @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore AWS API Documentation
|
@@ -7917,6 +8611,20 @@ module Aws::KMS
|
|
7917
8611
|
#
|
7918
8612
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7919
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
|
+
#
|
7920
8628
|
# @example Request syntax with placeholder values
|
7921
8629
|
#
|
7922
8630
|
# resp = client.update_primary_region({
|
@@ -7957,17 +8665,18 @@ module Aws::KMS
|
|
7957
8665
|
# You can also verify the digital signature by using the public key of
|
7958
8666
|
# the KMS key outside of KMS. Use the GetPublicKey operation to download
|
7959
8667
|
# the public key in the asymmetric KMS key and then use the public key
|
7960
|
-
# to verify the signature outside of KMS.
|
7961
|
-
# of KMS with an SM2 public key, you must specify the distinguishing ID.
|
7962
|
-
# By default, KMS uses `1234567812345678` as the distinguishing ID. For
|
7963
|
-
# more information, see [Offline verification with SM2 key pairs][2] in
|
7964
|
-
# *Key Management Service Developer Guide*. The advantage of using the
|
8668
|
+
# to verify the signature outside of KMS. The advantage of using the
|
7965
8669
|
# `Verify` operation is that it is performed within KMS. As a result,
|
7966
8670
|
# it's easy to call, the operation is performed within the FIPS
|
7967
8671
|
# boundary, it is logged in CloudTrail, and you can use key policy and
|
7968
8672
|
# IAM policy to determine who is authorized to use the KMS key to verify
|
7969
8673
|
# signatures.
|
7970
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
|
+
#
|
7971
8680
|
# The KMS key that you use for this operation must be in a compatible
|
7972
8681
|
# key state. For details, see [Key states of KMS keys][3] in the *Key
|
7973
8682
|
# Management Service Developer Guide*.
|
@@ -8060,7 +8769,7 @@ module Aws::KMS
|
|
8060
8769
|
# @example Example: To use an asymmetric KMS key to verify a digital signature
|
8061
8770
|
#
|
8062
8771
|
# # This operation uses the public key in an elliptic curve (ECC) asymmetric key to verify a digital signature within AWS
|
8063
|
-
# # KMS.
|
8772
|
+
# # KMS.
|
8064
8773
|
#
|
8065
8774
|
# resp = client.verify({
|
8066
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.
|
@@ -8108,33 +8817,35 @@ module Aws::KMS
|
|
8108
8817
|
# HMAC, `VerifyMac` computes an HMAC using the message, HMAC KMS key,
|
8109
8818
|
# and MAC algorithm that you specify, and compares the computed HMAC to
|
8110
8819
|
# the HMAC that you specify. If the HMACs are identical, the
|
8111
|
-
# 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.
|
8112
8823
|
#
|
8113
|
-
#
|
8114
|
-
#
|
8115
|
-
# the HMAC.
|
8824
|
+
# HMAC KMS keys and the HMAC algorithms that KMS uses conform to
|
8825
|
+
# industry standards defined in [RFC 2104][1].
|
8116
8826
|
#
|
8117
8827
|
# This operation is part of KMS support for HMAC KMS keys. For details,
|
8118
|
-
# see [HMAC keys in KMS][
|
8828
|
+
# see [HMAC keys in KMS][2] in the *Key Management Service Developer
|
8119
8829
|
# Guide*.
|
8120
8830
|
#
|
8121
8831
|
# The KMS key that you use for this operation must be in a compatible
|
8122
|
-
# key state. For details, see [Key states of KMS keys][
|
8832
|
+
# key state. For details, see [Key states of KMS keys][3] in the *Key
|
8123
8833
|
# Management Service Developer Guide*.
|
8124
8834
|
#
|
8125
8835
|
# **Cross-account use**\: Yes. To perform this operation with a KMS key
|
8126
8836
|
# in a different Amazon Web Services account, specify the key ARN or
|
8127
8837
|
# alias ARN in the value of the `KeyId` parameter.
|
8128
8838
|
#
|
8129
|
-
# **Required permissions**\: [kms:VerifyMac][
|
8839
|
+
# **Required permissions**\: [kms:VerifyMac][4] (key policy)
|
8130
8840
|
#
|
8131
8841
|
# **Related operations**\: GenerateMac
|
8132
8842
|
#
|
8133
8843
|
#
|
8134
8844
|
#
|
8135
|
-
# [1]: https://
|
8136
|
-
# [2]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
8137
|
-
# [3]: https://docs.aws.amazon.com/kms/latest/developerguide/
|
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
|
8138
8849
|
#
|
8139
8850
|
# @option params [required, String, StringIO, File] :message
|
8140
8851
|
# The message that will be used in the verification. Enter the same
|
@@ -8238,7 +8949,7 @@ module Aws::KMS
|
|
8238
8949
|
params: params,
|
8239
8950
|
config: config)
|
8240
8951
|
context[:gem_name] = 'aws-sdk-kms'
|
8241
|
-
context[:gem_version] = '1.
|
8952
|
+
context[:gem_version] = '1.60.0'
|
8242
8953
|
Seahorse::Client::Request.new(handlers, context)
|
8243
8954
|
end
|
8244
8955
|
|