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.
The alias name must begin with alias/
followed by a name, such as
alias/ExampleAlias
. It can contain only alphanumeric characters,
forward slashes (/), underscores (\_), and dashes (-). The alias name
cannot begin with alias/aws/
. The alias/aws/
prefix is reserved for
AWS managed CMKs.
The result of this operation varies with the key state of the CMK. For
details, see How Key State Affects Use of a Customer Master Key
in the AWS Key Management Service Developer Guide.