Skip to content

aws.payment_cryptography.get_key

Example SQL Queries

SELECT * FROM
aws.payment_cryptography.get_key
WHERE
"key_identifier" = 'VALUE';

Description

Gets the key material for an Amazon Web Services Payment Cryptography key, including the immutable and mutable data specified when the key was created.

Cross-account use: This operation can't be used across different Amazon Web Services accounts.

Related operations:

Table Definition

Column NameColumn Data Type
key_identifier Required Input Column

The KeyARN of the Amazon Web Services Payment Cryptography key.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

key

The key material, including the immutable and mutable data for the key.

STRUCT(
"key_arn" VARCHAR,
"key_attributes" STRUCT(
"key_usage" VARCHAR,
"key_class" VARCHAR,
"key_algorithm" VARCHAR,
"key_modes_of_use" STRUCT(
"encrypt" BOOLEAN,
"decrypt" BOOLEAN,
"wrap" BOOLEAN,
"unwrap" BOOLEAN,
"generate" BOOLEAN,
"sign" BOOLEAN,
"verify" BOOLEAN,
"derive_key" BOOLEAN,
"no_restrictions" BOOLEAN
)
),
"key_check_value" VARCHAR,
"key_check_value_algorithm" VARCHAR,
"enabled" BOOLEAN,
"exportable" BOOLEAN,
"key_state" VARCHAR,
"key_origin" VARCHAR,
"create_timestamp" TIMESTAMP_S,
"usage_start_timestamp" TIMESTAMP_S,
"usage_stop_timestamp" TIMESTAMP_S,
"delete_pending_timestamp" TIMESTAMP_S,
"delete_timestamp" TIMESTAMP_S
)
Show child fields
key.create_timestamp

The date and time when the key was created.

key.delete_pending_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.

key.delete_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.

key.enabled

Specifies whether the key is enabled.

key.exportable

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

key.key_arn

The Amazon Resource Name (ARN) of the key.

key.key_attributes

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.

Show child fields
key.key_attributes.key_algorithm

The key algorithm to be use during creation of an Amazon Web Services Payment Cryptography key.

For symmetric keys, Amazon Web Services Payment Cryptography supports AES and TDES algorithms. For asymmetric keys, Amazon Web Services Payment Cryptography supports RSA and ECC_NIST algorithms.

key.key_attributes.key_class

The type of Amazon Web Services Payment Cryptography key to create, which determines the classification of the cryptographic method and whether Amazon Web Services Payment Cryptography key contains a symmetric key or an asymmetric key pair.

key.key_attributes.key_modes_of_use

The list of cryptographic operations that you can perform using the key.

Show child fields
key.key_attributes.key_modes_of_use.decrypt

Specifies whether an Amazon Web Services Payment Cryptography key can be used to decrypt data.

key.key_attributes.key_modes_of_use.derive_key

Specifies whether an Amazon Web Services Payment Cryptography key can be used to derive new keys.

key.key_attributes.key_modes_of_use.encrypt

Specifies whether an Amazon Web Services Payment Cryptography key can be used to encrypt data.

key.key_attributes.key_modes_of_use.generate

Specifies whether an Amazon Web Services Payment Cryptography key can be used to generate and verify other card and PIN verification keys.

key.key_attributes.key_modes_of_use.no_restrictions

Specifies whether an Amazon Web Services Payment Cryptography key has no special restrictions other than the restrictions implied by KeyUsage.

key.key_attributes.key_modes_of_use.sign

Specifies whether an Amazon Web Services Payment Cryptography key can be used for signing.

key.key_attributes.key_modes_of_use.unwrap

Specifies whether an Amazon Web Services Payment Cryptography key can be used to unwrap other keys.

key.key_attributes.key_modes_of_use.verify

Specifies whether an Amazon Web Services Payment Cryptography key can be used to verify signatures.

key.key_attributes.key_modes_of_use.wrap

Specifies whether an Amazon Web Services Payment Cryptography key can be used to wrap other keys.

key.key_attributes.key_usage

The cryptographic usage of an Amazon Web Services Payment Cryptography key as defined in section A.5.2 of the TR-31 spec.

key.key_check_value

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.key_check_value_algorithm

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.

key.key_origin

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.key_state

The state of key that is being created or deleted.

key.usage_start_timestamp

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

key.usage_stop_timestamp

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