Get Key Result
Constructors
Properties
A description of the KMS key. Use a description that helps you to distinguish this KMS key from others in the account, such as its intended use.
Specifies whether the KMS key is enabled. Disabled KMS keys cannot be used in cryptographic operations. When `Enabled`
is `true`
, the key state of the KMS key is `Enabled`
. When `Enabled`
is `false`
, the key state of the KMS key is `Disabled`
. The default value is `true`
. The actual key state of the KMS key might be affected by actions taken outside of CloudFormation, such as running the EnableKey, DisableKey, or ScheduleKeyDeletion operations. For information about the key states of a KMS key, see Key state: Effect on your KMS key in the Developer Guide.
Enables automatic rotation of the key material for the specified KMS key. By default, automatic key rotation is not enabled. KMS supports automatic rotation only for symmetric encryption KMS keys (`KeySpec`
= `SYMMETRIC_DEFAULT`
). For asymmetric KMS keys, HMAC KMS keys, and KMS keys with Origin `EXTERNAL`
, omit the `EnableKeyRotation`
property or set it to `false`
. To enable automatic key rotation of the key material for a multi-Region KMS key, set `EnableKeyRotation`
to `true`
on the primary key (created by using `AWS::KMS::Key`
). KMS copies the rotation status to all replica keys. For details, see Rotating multi-Region keys in the Developer Guide. When you enable automatic rotation, KMS automatically creates new key material for the KMS key one year after the enable date and every year thereafter. KMS retains all key material until you delete the KMS key. For detailed information about automatic key rotation, see Rotating KMS keys in the Developer Guide.
Specifies the type of KMS key to create. The default value, `SYMMETRIC_DEFAULT`
, creates a KMS key with a 256-bit symmetric key for encryption and decryption. In China Regions, `SYMMETRIC_DEFAULT`
creates a 128-bit symmetric key that uses SM4 encryption. You can't change the `KeySpec`
value after the KMS key is created. For help choosing a key spec for your KMS key, see Choosing a KMS key type in the Developer Guide. The `KeySpec`
property determines the type of key material in the KMS key and the algorithms that the KMS key supports. To further restrict the algorithms that can be used with the KMS key, use a condition key in its key policy or IAM policy. For more information, see condition keys in the Developer Guide. If you change the value of the `KeySpec`
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. services that are integrated with use symmetric encryption KMS keys to protect your data. These services do not support encryption with asymmetric KMS keys. For help determining whether a KMS key is asymmetric, see Identifying asymmetric KMS keys in the Developer Guide. KMS supports the following key specs for KMS keys:
Determines the cryptographic operations for which you can use the KMS key. The default value is `ENCRYPT_DECRYPT`
. This property is required for asymmetric KMS keys and HMAC KMS keys. You can't change the `KeyUsage`
value after the KMS key is created. If you change the value of the `KeyUsage`
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. Select only one valid value.
Creates a multi-Region primary key that you can replicate in other AWS-Regions. You can't change the `MultiRegion`
value after the KMS key is created. For a list of AWS-Regions in which multi-Region keys are supported, see Multi-Region keys in in the **. If you change the value of the `MultiRegion`
property on an existing KMS key, the update request fails, regardless of the value of the UpdateReplacePolicy attribute. This prevents you from accidentally deleting a KMS key by changing an immutable property value. For a multi-Region key, set to this property to `true`
. For a single-Region key, omit this property or set it to `false`
. The default value is `false`
. Multi-Region keys are an KMS feature that lets you create multiple interoperable KMS keys in different AWS-Regions. Because these KMS keys have the same key ID, key material, and other metadata, you can use them to encrypt data in one AWS-Region and decrypt it in a different AWS-Region without making a cross-Region call or exposing the plaintext data. For more information, see Multi-Region keys in the Developer Guide. You can create a symmetric encryption, HMAC, or asymmetric multi-Region KMS key, and you can create a multi-Region key with imported key material. However, you cannot create a multi-Region key in a custom key store. To create a replica of this primary key in a different AWS-Region , create an AWS::KMS::ReplicaKey resource in a CloudFormation stack in the replica Region. Specify the key ARN of this primary key.
The source of the key material for the KMS key. You cannot change the origin after you create the KMS key. The default is `AWS_KMS`
, which means that KMS creates the key material. To create a KMS key with no key material (for imported key material), set this value to `EXTERNAL`
. For more information about importing key material into KMS, see Importing Key Material in the Developer Guide. You can ignore `ENABLED`
when Origin is `EXTERNAL`
. When a KMS key with Origin `EXTERNAL`
is created, the key state is `PENDING_IMPORT`
and `ENABLED`
is `false`
. After you import the key material, `ENABLED`
updated to `true`
. The KMS key can then be used for Cryptographic Operations. CFN doesn't support creating an `Origin`
parameter of the `AWS_CLOUDHSM`
or `EXTERNAL_KEY_STORE`
values.
Assigns one or more tags to the replica key. Tagging or untagging a KMS key can allow or deny permission to the KMS key. For details, see ABAC for in the Developer Guide. For information about tags in KMS, see Tagging keys in the Developer Guide. For information about tags in CloudFormation, see Tag.