Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Network.AWS.KMS.UpdateAlias
Description
Associates an existing alias with a different customer master key (CMK). Each CMK can have multiple aliases, but the aliases must be unique within the account and region. You cannot perform this operation on an alias in a different AWS account.
This operation works only on existing aliases. To change the alias of a CMK to a new value, use CreateAlias
to create a new alias and DeleteAlias
to delete the old alias.
Because an alias is not a property of a CMK, you can create, update, and delete the aliases of a CMK without affecting the CMK. Also, aliases do not appear in the response from the DescribeKey
operation. To get the aliases of all CMKs in the account, use the ListAliases
operation.
An alias name can contain only alphanumeric characters, forward slashes (), underscores (_), and dashes (-). An alias must start with the word alias
followed by a forward slash (@alias ). The alias name can contain only alphanumeric characters, forward slashes (/), underscores (_), and dashes (-). Alias names cannot begin with
aws@ ; that alias name prefix is reserved by Amazon Web Services (AWS).
Synopsis
Creating a Request
Arguments
:: Text | |
-> Text | |
-> UpdateAlias |
Creates a value of UpdateAlias
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
uaAliasName
- String that contains the name of the alias to be modified. The name must start with the word "alias" followed by a forward slash (alias). Aliases that begin with "aliasaws" are reserved.uaTargetKeyId
- Unique identifier of the customer master key to be mapped to the alias. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID:1234abcd-12ab-34cd-56ef-1234567890ab
* Key ARN:arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a CMK, useListKeys
orDescribeKey
. To verify that the alias is mapped to the correct CMK, useListAliases
.
data UpdateAlias Source #
See: updateAlias
smart constructor.
Instances
Request Lenses
uaAliasName :: Lens' UpdateAlias Text Source #
String that contains the name of the alias to be modified. The name must start with the word "alias" followed by a forward slash (alias). Aliases that begin with "aliasaws" are reserved.
uaTargetKeyId :: Lens' UpdateAlias Text Source #
Unique identifier of the customer master key to be mapped to the alias. Specify the key ID or the Amazon Resource Name (ARN) of the CMK. For example: * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
* Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
To get the key ID and key ARN for a CMK, use ListKeys
or DescribeKey
. To verify that the alias is mapped to the correct CMK, use ListAliases
.
Destructuring the Response
updateAliasResponse :: UpdateAliasResponse Source #
Creates a value of UpdateAliasResponse
with the minimum fields required to make a request.
data UpdateAliasResponse Source #
See: updateAliasResponse
smart constructor.