Skip to main content

alias

Creates, updates, deletes, gets or lists an alias resource.

Overview

Namealias
TypeResource
Idaws.payment_cryptography.alias

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
alias_namestringA friendly name that you can use to refer to a key. The value must begin with alias/. Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output. (pattern: <code>alias/[a-zA-Z0-9/_-]+</code>)
key_arnstringThe KeyARN of the key associated with the alias. (pattern: <code>arn:aws:payment-cryptography:[a-z]{2}-[a-z]{1,16}-[0-9]+:[0-9]{12}:key/[0-9a-zA-Z]{16,64}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_aliasselectregionGets the Amazon Web Services Payment Cryptography key associated with the alias. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateAlias DeleteAlias ListAliases UpdateAlias
create_aliasinsertregion, AliasNameCreates an alias, or a friendly name, for an Amazon Web Services Payment Cryptography key. You can use an alias to identify a key in the console and when you call cryptographic operations such as EncryptData or DecryptData. You can associate the alias with any key in the same Amazon Web Services Region. Each alias is associated with only one key at a time, but a key can have multiple aliases. You can't create an alias without a key. The alias must be unique in the account and Amazon Web Services Region, but you can create another alias with the same name in a different Amazon Web Services Region. To change the key that's associated with the alias, call UpdateAlias. To delete the alias, call DeleteAlias. These operations don't affect the underlying key. To get the alias that you created, call ListAliases. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: DeleteAlias GetAlias ListAliases UpdateAlias
update_aliasupdateregion, AliasNameAssociates an existing Amazon Web Services Payment Cryptography alias with a different key. Each alias is associated with only one Amazon Web Services Payment Cryptography key at a time, although a key can have multiple aliases. The alias and the Amazon Web Services Payment Cryptography key must be in the same Amazon Web Services account and Amazon Web Services Region Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateAlias DeleteAlias GetAlias ListAliases
delete_aliasdeleteregionDeletes the alias, but doesn't affect the underlying key. Each key can have multiple aliases. To get the aliases of all keys, use the UpdateAlias operation. To change the alias of a key, first use DeleteAlias to delete the current alias and then use CreateAlias to create a new alias. To associate an existing alias with a different key, call UpdateAlias. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateAlias GetAlias ListAliases UpdateAlias

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Gets the Amazon Web Services Payment Cryptography key associated with the alias. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateAlias DeleteAlias ListAliases UpdateAlias

SELECT
alias_name,
key_arn
FROM aws.payment_cryptography.alias
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an alias, or a friendly name, for an Amazon Web Services Payment Cryptography key. You can use an alias to identify a key in the console and when you call cryptographic operations such as EncryptData or DecryptData. You can associate the alias with any key in the same Amazon Web Services Region. Each alias is associated with only one key at a time, but a key can have multiple aliases. You can't create an alias without a key. The alias must be unique in the account and Amazon Web Services Region, but you can create another alias with the same name in a different Amazon Web Services Region. To change the key that's associated with the alias, call UpdateAlias. To delete the alias, call DeleteAlias. These operations don't affect the underlying key. To get the alias that you created, call ListAliases. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: DeleteAlias GetAlias ListAliases UpdateAlias

INSERT INTO aws.payment_cryptography.alias (
AliasName,
KeyArn,
region
)
SELECT
'{{ AliasName }}' /* required */,
'{{ KeyArn }}',
'{{ region }}'
RETURNING
alias
;

UPDATE examples

Associates an existing Amazon Web Services Payment Cryptography alias with a different key. Each alias is associated with only one Amazon Web Services Payment Cryptography key at a time, although a key can have multiple aliases. The alias and the Amazon Web Services Payment Cryptography key must be in the same Amazon Web Services account and Amazon Web Services Region Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateAlias DeleteAlias GetAlias ListAliases

UPDATE aws.payment_cryptography.alias
SET
AliasName = '{{ AliasName }}',
KeyArn = '{{ KeyArn }}'
WHERE
region = '{{ region }}' --required
AND AliasName = '{{ AliasName }}' --required
RETURNING
alias;

DELETE examples

Deletes the alias, but doesn't affect the underlying key. Each key can have multiple aliases. To get the aliases of all keys, use the UpdateAlias operation. To change the alias of a key, first use DeleteAlias to delete the current alias and then use CreateAlias to create a new alias. To associate an existing alias with a different key, call UpdateAlias. Cross-account use: This operation can't be used across different Amazon Web Services accounts. Related operations: CreateAlias GetAlias ListAliases UpdateAlias

DELETE FROM aws.payment_cryptography.alias
WHERE region = '{{ region }}' --required
;