Skip to content

KeyMetadata

Source code in docs_src/capo_kms/types/key_metadata.py
class KeyMetadata(TypedDict, closed=True):
    aws_account_id: NotRequired["capo_kms.types.aws_account_id_type.AWSAccountIdType"]
    """<p>The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.</p>"""
    key_id: "capo_kms.types.key_id_type.KeyIdType"
    """<p>The globally unique identifier for the KMS key.</p>"""
    arn: NotRequired["capo_kms.types.arn_type.ArnType"]
    """<p>The Amazon Resource Name (ARN) of the KMS key. For examples, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms">Key Management Service (KMS)</a> in the Example ARNs section of the <i>Amazon Web Services General Reference</i>.</p>"""
    creation_date: NotRequired["capo_kms.types.date_type.DateType"]
    """<p>The date and time when the KMS key was created.</p>"""
    enabled: "capo_kms.types.boolean_type.BooleanType"
    """<p>Specifies whether the KMS key is enabled. When <code>KeyState</code> is <code>Enabled</code> this value is true, otherwise it is false.</p>"""
    description: NotRequired["capo_kms.types.description_type.DescriptionType"]
    """<p>The description of the KMS key.</p>"""
    key_usage: NotRequired["capo_kms.types.key_usage_type.KeyUsageType"]
    """<p>The <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-cryptography.html#cryptographic-operations">cryptographic operations</a> for which you can use the KMS key.</p>"""
    key_state: NotRequired["capo_kms.types.key_state.KeyState"]
    """<p>The current status of the KMS key.</p> <p>For more information about how key state affects the use of a KMS key, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>"""
    deletion_date: NotRequired["capo_kms.types.date_type.DateType"]
    """<p>The date and time after which KMS deletes this KMS key. This value is present only when the KMS key is scheduled for deletion, that is, when its <code>KeyState</code> is <code>PendingDeletion</code>.</p> <p>When the primary key in a multi-Region key is scheduled for deletion but still has replica keys, its key state is <code>PendingReplicaDeletion</code> and the length of its waiting period is displayed in the <code>PendingDeletionWindowInDays</code> field.</p>"""
    valid_to: NotRequired["capo_kms.types.date_type.DateType"]
    """<p>The earliest time at which any imported key material permanently associated with this KMS key expires. When a key material expires, KMS deletes the key material and the KMS key becomes unusable. This value is present only for KMS keys whose <code>Origin</code> is <code>EXTERNAL</code> and the <code>ExpirationModel</code> is <code>KEY_MATERIAL_EXPIRES</code>, otherwise this value is omitted.</p>"""
    origin: NotRequired["capo_kms.types.origin_type.OriginType"]
    """<p>The source of the key material for the KMS key. When this value is <code>AWS_KMS</code>, KMS created the key material. When this value is <code>EXTERNAL</code>, the key material was imported or the KMS key doesn't have any key material. When this value is <code>AWS_CLOUDHSM</code>, the key material was created in the CloudHSM cluster associated with a custom key store.</p>"""
    custom_key_store_id: NotRequired[
        "capo_kms.types.custom_key_store_id_type.CustomKeyStoreIdType"
    ]
    """<p>A unique identifier for the <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html">custom key store</a> that contains the KMS key. This field is present only when the KMS key is created in a custom key store.</p>"""
    cloud_hsm_cluster_id: NotRequired[
        "capo_kms.types.cloud_hsm_cluster_id_type.CloudHsmClusterIdType"
    ]
    """<p>The cluster ID of the CloudHSM cluster that contains the key material for the KMS key. When you create a KMS key in an CloudHSM <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-store-overview.html">custom key store</a>, KMS creates the key material for the KMS key in the associated CloudHSM cluster. This field is present only when the KMS key is created in an CloudHSM key store.</p>"""
    expiration_model: NotRequired[
        "capo_kms.types.expiration_model_type.ExpirationModelType"
    ]
    """<p>Specifies whether the KMS key's key material expires. This value is present only when <code>Origin</code> is <code>EXTERNAL</code>, otherwise this value is omitted.</p>"""
    key_manager: NotRequired["capo_kms.types.key_manager_type.KeyManagerType"]
    """<p>The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys">KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>"""
    customer_master_key_spec: NotRequired[
        "capo_kms.types.customer_master_key_spec.CustomerMasterKeySpec"
    ]
    """<p>Instead, use the <code>KeySpec</code> field.</p> <p>The <code>KeySpec</code> and <code>CustomerMasterKeySpec</code> fields have the same value. We recommend that you use the <code>KeySpec</code> field in your code. However, to avoid breaking changes, KMS supports both fields.</p>"""
    key_spec: NotRequired["capo_kms.types.key_spec.KeySpec"]
    """<p>Describes the type of key material in the KMS key.</p>"""
    encryption_algorithms: NotRequired[
        "capo_kms.types.encryption_algorithm_spec_list.EncryptionAlgorithmSpecList"
    ]
    """<p>The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.</p> <p>This value is present only when the <code>KeyUsage</code> of the KMS key is <code>ENCRYPT_DECRYPT</code>.</p>"""
    signing_algorithms: NotRequired[
        "capo_kms.types.signing_algorithm_spec_list.SigningAlgorithmSpecList"
    ]
    """<p>The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.</p> <p>This field appears only when the <code>KeyUsage</code> of the KMS key is <code>SIGN_VERIFY</code>.</p>"""
    key_agreement_algorithms: NotRequired[
        "capo_kms.types.key_agreement_algorithm_spec_list.KeyAgreementAlgorithmSpecList"
    ]
    """<p>The key agreement algorithm used to derive a shared secret.</p>"""
    multi_region: NotRequired[
        "capo_kms.types.nullable_boolean_type.NullableBooleanType"
    ]
    """<p>Indicates whether the KMS key is a multi-Region (<code>True</code>) or regional (<code>False</code>) key. This value is <code>True</code> for multi-Region primary and replica keys and <code>False</code> for regional KMS keys.</p> <p>For more information about multi-Region keys, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html">Multi-Region keys in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>"""
    multi_region_configuration: NotRequired[
        "capo_kms.types.multi_region_configuration.MultiRegionConfiguration"
    ]
    """<p>Lists the primary and replica keys in same multi-Region key. This field is present only when the value of the <code>MultiRegion</code> field is <code>True</code>.</p> <p>For more information about any listed KMS key, use the <a>DescribeKey</a> operation.</p> <ul> <li> <p> <code>MultiRegionKeyType</code> indicates whether the KMS key is a <code>PRIMARY</code> or <code>REPLICA</code> key.</p> </li> <li> <p> <code>PrimaryKey</code> displays the key ARN and Region of the primary key. This field displays the current KMS key if it is the primary key.</p> </li> <li> <p> <code>ReplicaKeys</code> displays the key ARNs and Regions of all replica keys. This field includes the current KMS key if it is a replica key.</p> </li> </ul>"""
    pending_deletion_window_in_days: NotRequired[
        "capo_kms.types.pending_window_in_days_type.PendingWindowInDaysType"
    ]
    """<p>The waiting period before the primary key in a multi-Region key is deleted. This waiting period begins when the last of its replica keys is deleted. This value is present only when the <code>KeyState</code> of the KMS key is <code>PendingReplicaDeletion</code>. That indicates that the KMS key is the primary key in a multi-Region key, it is scheduled for deletion, and it still has existing replica keys.</p> <p>When a single-Region KMS key or a multi-Region replica key is scheduled for deletion, its deletion date is displayed in the <code>DeletionDate</code> field. However, when the primary key in a multi-Region key is scheduled for deletion, its waiting period doesn't begin until all of its replica keys are deleted. This value displays that waiting period. When the last replica key in the multi-Region key is deleted, the <code>KeyState</code> of the scheduled primary key changes from <code>PendingReplicaDeletion</code> to <code>PendingDeletion</code> and the deletion date appears in the <code>DeletionDate</code> field.</p>"""
    mac_algorithms: NotRequired[
        "capo_kms.types.mac_algorithm_spec_list.MacAlgorithmSpecList"
    ]
    """<p>The message authentication code (MAC) algorithm that the HMAC KMS key supports.</p> <p>This value is present only when the <code>KeyUsage</code> of the KMS key is <code>GENERATE_VERIFY_MAC</code>.</p>"""
    xks_key_configuration: NotRequired[
        "capo_kms.types.xks_key_configuration_type.XksKeyConfigurationType"
    ]
    """<p>Information about the external key that is associated with a KMS key in an external key store.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key">External key</a> in the <i>Key Management Service Developer Guide</i>.</p>"""
    current_key_material_id: NotRequired[
        "capo_kms.types.backing_key_id_type.BackingKeyIdType"
    ]
    """<p>Identifies the current key material. This value is present for symmetric encryption keys with <code>AWS_KMS</code> or <code>EXTERNAL</code> origin. These KMS keys support automatic or on-demand key rotation and can have multiple key materials associated with them. KMS uses the current key material for both encryption and decryption, and the non-current key material for decryption operations only.</p>"""

arn instance-attribute

arn: NotRequired[ArnType]

The Amazon Resource Name (ARN) of the KMS key. For examples, see Key Management Service (KMS) in the Example ARNs section of the Amazon Web Services General Reference.

aws_account_id instance-attribute

aws_account_id: NotRequired[AWSAccountIdType]

The twelve-digit account ID of the Amazon Web Services account that owns the KMS key.

cloud_hsm_cluster_id instance-attribute

cloud_hsm_cluster_id: NotRequired[CloudHsmClusterIdType]

The cluster ID of the CloudHSM cluster that contains the key material for the KMS key. When you create a KMS key in an CloudHSM custom key store, KMS creates the key material for the KMS key in the associated CloudHSM cluster. This field is present only when the KMS key is created in an CloudHSM key store.

creation_date instance-attribute

creation_date: NotRequired[DateType]

The date and time when the KMS key was created.

current_key_material_id instance-attribute

current_key_material_id: NotRequired[BackingKeyIdType]

Identifies the current key material. This value is present for symmetric encryption keys with AWS_KMS or EXTERNAL origin. These KMS keys support automatic or on-demand key rotation and can have multiple key materials associated with them. KMS uses the current key material for both encryption and decryption, and the non-current key material for decryption operations only.

custom_key_store_id instance-attribute

custom_key_store_id: NotRequired[CustomKeyStoreIdType]

A unique identifier for the custom key store that contains the KMS key. This field is present only when the KMS key is created in a custom key store.

customer_master_key_spec instance-attribute

customer_master_key_spec: NotRequired[CustomerMasterKeySpec]

Instead, use the KeySpec field.

The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend that you use the KeySpec field in your code. However, to avoid breaking changes, KMS supports both fields.

deletion_date instance-attribute

deletion_date: NotRequired[DateType]

The date and time after which KMS deletes this KMS key. This value is present only when the KMS key is scheduled for deletion, that is, when its KeyState is PendingDeletion.

When the primary key in a multi-Region key is scheduled for deletion but still has replica keys, its key state is PendingReplicaDeletion and the length of its waiting period is displayed in the PendingDeletionWindowInDays field.

description instance-attribute

description: NotRequired[DescriptionType]

The description of the KMS key.

enabled instance-attribute

enabled: BooleanType

Specifies whether the KMS key is enabled. When KeyState is Enabled this value is true, otherwise it is false.

encryption_algorithms instance-attribute

encryption_algorithms: NotRequired[EncryptionAlgorithmSpecList]

The encryption algorithms that the KMS key supports. You cannot use the KMS key with other encryption algorithms within KMS.

This value is present only when the KeyUsage of the KMS key is ENCRYPT_DECRYPT.

expiration_model instance-attribute

expiration_model: NotRequired[ExpirationModelType]

Specifies whether the KMS key's key material expires. This value is present only when Origin is EXTERNAL, otherwise this value is omitted.

key_agreement_algorithms instance-attribute

key_agreement_algorithms: NotRequired[KeyAgreementAlgorithmSpecList]

The key agreement algorithm used to derive a shared secret.

key_id instance-attribute

key_id: KeyIdType

The globally unique identifier for the KMS key.

key_manager instance-attribute

key_manager: NotRequired[KeyManagerType]

The manager of the KMS key. KMS keys in your Amazon Web Services account are either customer managed or Amazon Web Services managed. For more information about the difference, see KMS keys in the Key Management Service Developer Guide.

key_spec instance-attribute

key_spec: NotRequired[KeySpec]

Describes the type of key material in the KMS key.

key_state instance-attribute

key_state: NotRequired[KeyState]

The current status of the KMS key.

For more information about how key state affects the use of a KMS key, see Key states of KMS keys in the Key Management Service Developer Guide.

key_usage instance-attribute

key_usage: NotRequired[KeyUsageType]

The cryptographic operations for which you can use the KMS key.

mac_algorithms instance-attribute

mac_algorithms: NotRequired[MacAlgorithmSpecList]

The message authentication code (MAC) algorithm that the HMAC KMS key supports.

This value is present only when the KeyUsage of the KMS key is GENERATE_VERIFY_MAC.

multi_region instance-attribute

multi_region: NotRequired[NullableBooleanType]

Indicates whether the KMS key is a multi-Region (True) or regional (False) key. This value is True for multi-Region primary and replica keys and False for regional KMS keys.

For more information about multi-Region keys, see Multi-Region keys in KMS in the Key Management Service Developer Guide.

multi_region_configuration instance-attribute

multi_region_configuration: NotRequired[MultiRegionConfiguration]

Lists the primary and replica keys in same multi-Region key. This field is present only when the value of the MultiRegion field is True.

For more information about any listed KMS key, use the DescribeKey operation.

  • MultiRegionKeyType indicates whether the KMS key is a PRIMARY or REPLICA key.

  • PrimaryKey displays the key ARN and Region of the primary key. This field displays the current KMS key if it is the primary key.

  • ReplicaKeys displays the key ARNs and Regions of all replica keys. This field includes the current KMS key if it is a replica key.

origin instance-attribute

origin: NotRequired[OriginType]

The source of the key material for the KMS key. When this value is AWS_KMS, KMS created the key material. When this value is EXTERNAL, the key material was imported or the KMS key doesn't have any key material. When this value is AWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated with a custom key store.

pending_deletion_window_in_days instance-attribute

pending_deletion_window_in_days: NotRequired[PendingWindowInDaysType]

The waiting period before the primary key in a multi-Region key is deleted. This waiting period begins when the last of its replica keys is deleted. This value is present only when the KeyState of the KMS key is PendingReplicaDeletion. That indicates that the KMS key is the primary key in a multi-Region key, it is scheduled for deletion, and it still has existing replica keys.

When a single-Region KMS key or a multi-Region replica key is scheduled for deletion, its deletion date is displayed in the DeletionDate field. However, when the primary key in a multi-Region key is scheduled for deletion, its waiting period doesn't begin until all of its replica keys are deleted. This value displays that waiting period. When the last replica key in the multi-Region key is deleted, the KeyState of the scheduled primary key changes from PendingReplicaDeletion to PendingDeletion and the deletion date appears in the DeletionDate field.

signing_algorithms instance-attribute

signing_algorithms: NotRequired[SigningAlgorithmSpecList]

The signing algorithms that the KMS key supports. You cannot use the KMS key with other signing algorithms within KMS.

This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY.

valid_to instance-attribute

valid_to: NotRequired[DateType]

The earliest time at which any imported key material permanently associated with this KMS key expires. When a key material expires, KMS deletes the key material and the KMS key becomes unusable. This value is present only for KMS keys whose Origin is EXTERNAL and the ExpirationModel is KEY_MATERIAL_EXPIRES, otherwise this value is omitted.

xks_key_configuration instance-attribute

xks_key_configuration: NotRequired[XksKeyConfigurationType]

Information about the external key that is associated with a KMS key in an external key store.

For more information, see External key in the Key Management Service Developer Guide.