Skip to content

Key

Source code in docs_src/capo_payment_cryptography/types/key.py
class Key(TypedDict, closed=True):
    key_arn: "capo_payment_cryptography.types.key_arn.KeyArn"
    """<p>The Amazon Resource Name (ARN) of the key.</p>"""
    key_attributes: "capo_payment_cryptography.types.key_attributes.KeyAttributes"
    """<p>The role of the key, the algorithm it supports, and the cryptographic operations allowed with the key. This data is immutable after the key is created.</p>"""
    key_check_value: "capo_payment_cryptography.types.key_check_value.KeyCheckValue"
    """<p>The key check value (KCV) is used to check if all parties holding a given key have the same key or to detect that a key has changed.</p>"""
    key_check_value_algorithm: "capo_payment_cryptography.types.key_check_value_algorithm.KeyCheckValueAlgorithm"
    """<p>The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV). It is used to validate the key integrity.</p> <p>For TDES keys, the KCV is computed by encrypting 8 bytes, each with value of zero, with the key to be checked and retaining the 3 highest order bytes of the encrypted result. For AES keys, the KCV is computed using a CMAC algorithm where the input data is 16 bytes of zero and retaining the 3 highest order bytes of the encrypted result. For HMAC keys, the KCV is computed using the hash selected at key creation on a zero-length message, taking the leftmost 3 bytes.</p>"""
    enabled: "bool"
    """<p>Specifies whether the key is enabled. </p>"""
    exportable: "bool"
    """<p>Specifies whether the key is exportable. This data is immutable after the key is created.</p>"""
    key_state: "capo_payment_cryptography.types.key_state.KeyState"
    """<p>The state of key that is being created or deleted.</p>"""
    key_origin: "capo_payment_cryptography.types.key_origin.KeyOrigin"
    """<p>The source of the key material. For keys created within Amazon Web Services Payment Cryptography, the value is <code>AWS_PAYMENT_CRYPTOGRAPHY</code>. For keys imported into Amazon Web Services Payment Cryptography, the value is <code>EXTERNAL</code>.</p>"""
    create_timestamp: "capo_payment_cryptography.types.timestamp.Timestamp"
    """<p>The date and time when the key was created.</p>"""
    usage_start_timestamp: NotRequired[
        "capo_payment_cryptography.types.timestamp.Timestamp"
    ]
    """<p>The date and time after which Amazon Web Services Payment Cryptography will start using the key material for cryptographic operations.</p>"""
    usage_stop_timestamp: NotRequired[
        "capo_payment_cryptography.types.timestamp.Timestamp"
    ]
    """<p>The date and time after which Amazon Web Services Payment Cryptography will stop using the key material for cryptographic operations.</p>"""
    delete_pending_timestamp: NotRequired[
        "capo_payment_cryptography.types.timestamp.Timestamp"
    ]
    """<p>The date and time after which Amazon Web Services Payment Cryptography will delete the key. This value is present only when <code>KeyState</code> is <code>DELETE_PENDING</code> and the key is scheduled for deletion.</p>"""
    delete_timestamp: NotRequired["capo_payment_cryptography.types.timestamp.Timestamp"]
    """<p>The date and time after which Amazon Web Services Payment Cryptography will delete the key. This value is present only when when the <code>KeyState</code> is <code>DELETE_COMPLETE</code> and the Amazon Web Services Payment Cryptography key is deleted.</p>"""
    derive_key_usage: NotRequired[
        "capo_payment_cryptography.types.derive_key_usage.DeriveKeyUsage"
    ]
    """<p>The cryptographic usage of an ECDH derived key as defined in section A.5.2 of the TR-31 spec.</p>"""
    multi_region_key_type: NotRequired[
        "capo_payment_cryptography.types.multi_region_key_type.MultiRegionKeyType"
    ]
    """<p>Indicates whether this key is a Multi-Region key and its role in the Multi-Region key hierarchy.</p> <p>Multi-Region replication keys allow the same key material to be used across multiple Amazon Web Services Regions. This field specifies whether the key is a Primary Region key (PRK) (which can be replicated to other Amazon Web Services Regions) or a Replica Region key (RRK) (which is a copy of a PRK in another Region). For more information, see <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-multi-region-replication.html">Multi-Region key replication</a>.</p>"""
    primary_region: NotRequired["capo_payment_cryptography.types.region.Region"]
    replication_status: NotRequired[
        "capo_payment_cryptography.types.replication_status.ReplicationStatus"
    ]
    """<p>Information about the replication status of the key across different Amazon Web Services Regions.</p> <p>This field provides details about the current state of key replication, including any status messages or operational information. It helps track the progress and health of key replication operations.</p>"""
    using_default_replication_regions: NotRequired["bool"]
    """<p>Indicates whether this key is using the account's default replication regions configuration for <a href="https://docs.aws.amazon.com/payment-cryptography/latest/userguide/keys-multi-region-replication.html">Multi-Region key replication</a>.</p> <p>When set to <code>true</code>, the key automatically replicates to the regions specified in the account's default replication settings. When set to <code>false</code>, the key has a custom replication configuration that overrides the account defaults.</p>"""
    mpa_status: NotRequired["capo_payment_cryptography.types.mpa_status.MpaStatus"]
    """<p>The Multi-Party Approval (MPA) status for the key, if applicable.</p>"""

create_timestamp instance-attribute

create_timestamp: Timestamp

The date and time when the key was created.

delete_pending_timestamp instance-attribute

delete_pending_timestamp: NotRequired[Timestamp]

The date and time after which Amazon Web Services Payment Cryptography will delete the key. This value is present only when KeyState is DELETE_PENDING and the key is scheduled for deletion.

delete_timestamp instance-attribute

delete_timestamp: NotRequired[Timestamp]

The date and time after which Amazon Web Services Payment Cryptography will delete the key. This value is present only when when the KeyState is DELETE_COMPLETE and the Amazon Web Services Payment Cryptography key is deleted.

derive_key_usage instance-attribute

derive_key_usage: NotRequired[DeriveKeyUsage]

The cryptographic usage of an ECDH derived key as defined in section A.5.2 of the TR-31 spec.

enabled instance-attribute

enabled: bool

Specifies whether the key is enabled.

exportable instance-attribute

exportable: bool

Specifies whether the key is exportable. This data is immutable after the key is created.

key_arn instance-attribute

key_arn: KeyArn

The Amazon Resource Name (ARN) of the key.

key_attributes instance-attribute

key_attributes: KeyAttributes

The role of the key, the algorithm it supports, and the cryptographic operations allowed with the key. This data is immutable after the key is created.

key_check_value instance-attribute

key_check_value: KeyCheckValue

The key check value (KCV) is used to check if all parties holding a given key have the same key or to detect that a key has changed.

key_check_value_algorithm instance-attribute

key_check_value_algorithm: KeyCheckValueAlgorithm

The algorithm that Amazon Web Services Payment Cryptography uses to calculate the key check value (KCV). It is used to validate the key integrity.

For TDES keys, the KCV is computed by encrypting 8 bytes, each with value of zero, with the key to be checked and retaining the 3 highest order bytes of the encrypted result. For AES keys, the KCV is computed using a CMAC algorithm where the input data is 16 bytes of zero and retaining the 3 highest order bytes of the encrypted result. For HMAC keys, the KCV is computed using the hash selected at key creation on a zero-length message, taking the leftmost 3 bytes.

key_origin instance-attribute

key_origin: KeyOrigin

The source of the key material. For keys created within Amazon Web Services Payment Cryptography, the value is AWS_PAYMENT_CRYPTOGRAPHY. For keys imported into Amazon Web Services Payment Cryptography, the value is EXTERNAL.

key_state instance-attribute

key_state: KeyState

The state of key that is being created or deleted.

mpa_status instance-attribute

mpa_status: NotRequired[MpaStatus]

The Multi-Party Approval (MPA) status for the key, if applicable.

multi_region_key_type instance-attribute

multi_region_key_type: NotRequired[MultiRegionKeyType]

Indicates whether this key is a Multi-Region key and its role in the Multi-Region key hierarchy.

Multi-Region replication keys allow the same key material to be used across multiple Amazon Web Services Regions. This field specifies whether the key is a Primary Region key (PRK) (which can be replicated to other Amazon Web Services Regions) or a Replica Region key (RRK) (which is a copy of a PRK in another Region). For more information, see Multi-Region key replication.

primary_region instance-attribute

primary_region: NotRequired[Region]

replication_status instance-attribute

replication_status: NotRequired[ReplicationStatus]

Information about the replication status of the key across different Amazon Web Services Regions.

This field provides details about the current state of key replication, including any status messages or operational information. It helps track the progress and health of key replication operations.

usage_start_timestamp instance-attribute

usage_start_timestamp: NotRequired[Timestamp]

The date and time after which Amazon Web Services Payment Cryptography will start using the key material for cryptographic operations.

usage_stop_timestamp instance-attribute

usage_stop_timestamp: NotRequired[Timestamp]

The date and time after which Amazon Web Services Payment Cryptography will stop using the key material for cryptographic operations.

using_default_replication_regions instance-attribute

using_default_replication_regions: NotRequired[bool]

Indicates whether this key is using the account's default replication regions configuration for Multi-Region key replication.

When set to true, the key automatically replicates to the regions specified in the account's default replication settings. When set to false, the key has a custom replication configuration that overrides the account defaults.