alias
Creates, updates, deletes, gets or lists an alias resource.
Overview
| Name | alias |
| Type | Resource |
| Id | aws.payment_cryptography.alias |
Fields
The following fields are returned by SELECT queries:
- get_alias
| Name | Datatype | Description |
|---|---|---|
alias_name | string | A 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_arn | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_alias | select | region | 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 | |
create_alias | insert | region, AliasName | 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 | |
update_alias | update | region, AliasName | 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 | |
delete_alias | delete | region | 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 |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_alias
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
- create_alias
- Manifest
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
;
# Description fields are for documentation purposes
- name: alias
props:
- name: region
value: "{{ region }}"
description: Required parameter for the alias resource.
- name: AliasName
value: "{{ AliasName }}"
description: |
A friendly name that you can use to refer to a key. An alias must begin with alias/ followed by a name, for example alias/ExampleAlias. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). Don't include personal, confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.
- name: KeyArn
value: "{{ KeyArn }}"
description: |
The KeyARN of the key to associate with the alias.
UPDATE examples
- update_alias
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
- delete_alias
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
;