---
title: "POST /#X-Amz-Target=PaymentCryptographyControlPlane.CreateAlias"
method: POST
path: "/#X-Amz-Target=PaymentCryptographyControlPlane.CreateAlias"
---

# POST /#X-Amz-Target=PaymentCryptographyControlPlane.CreateAlias

`POST /#X-Amz-Target=PaymentCryptographyControlPlane.CreateAlias`

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](https://docs.aws.amazon.com/payment-cryptography/latest/DataAPIReference/API_EncryptData.html) or [DecryptData](https://docs.aws.amazon.com/payment-cryptography/latest/DataAPIReference/API_DecryptData.html).

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](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_UpdateAlias.html). To delete the alias, call [DeleteAlias](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_DeleteAlias.html). These operations don't affect the underlying key. To get the alias that you created, call [ListAliases](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ListAliases.html).

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

**Related operations:**

*   [DeleteAlias](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_DeleteAlias.html)
    
*   [GetAlias](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetAlias.html)
    
*   [ListAliases](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ListAliases.html)
    
*   [UpdateAlias](https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_UpdateAlias.html)

## Headers

- `X-Amz-Target` 'PaymentCryptographyControlPlane.CreateAlias', required

## Request body

- CreateAliasInput
  - `AliasName` string, required — <p>A friendly name that you can use to refer to a key. An alias must begin with <code>alias/</code> followed by a name, for example <code>alias/ExampleAlias</code>. It can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-).</p> <important> <p>Don't include personal, confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.</p> </important>
  - `KeyArn` string — The <code>KeyARN</code> of the key to associate with the alias.

## Response `200`

Success

- CreateAliasOutput
  - `Alias` object, required — The alias for the key.
    - `AliasName` string, required — <p>A friendly name that you can use to refer to a key. The value must begin with <code>alias/</code>.</p> <important> <p>Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.</p> </important>
    - `KeyArn` string — The <code>KeyARN</code> of the key associated with the alias.

## Other responses

- `480` — ServiceQuotaExceededException
- `481` — ServiceUnavailableException
- `482` — ValidationException
- `483` — ConflictException
- `484` — AccessDeniedException
- `485` — ResourceNotFoundException
- `486` — ThrottlingException
- `487` — InternalServerException

---

[API](https://skmtc.net/aws/apis/payment-cryptography.md) · [All operations](https://skmtc.net/aws/apis/payment-cryptography/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/payment-cryptography/versions/1b0b83160e8d/schema)
