Package-level declarations
Types
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.
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.