Skip to content

Create Alias

paymentcryptographycontrolplane_create_alias R Documentation

Creates an alias, or a friendly name, for an Amazon Web Services Payment Cryptography key

Description

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 update_alias. To delete the alias, call delete_alias. These operations don't affect the underlying key. To get the alias that you created, call list_aliases.

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

Related operations:

  • delete_alias

  • get_alias

  • list_aliases

  • update_alias

Usage

paymentcryptographycontrolplane_create_alias(AliasName, KeyArn)

Arguments

AliasName

[required] 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.

KeyArn

The KeyARN of the key to associate with the alias.

Value

A list with the following syntax:

list(
  Alias = list(
    AliasName = "string",
    KeyArn = "string"
  )
)

Request syntax

svc$create_alias(
  AliasName = "string",
  KeyArn = "string"
)