Copyright | (c) 2013-2021 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 |
Amazonka.KMS.DeleteAlias
Description
Deletes the specified alias.
Adding, deleting, or updating an alias can allow or deny permission to the KMS key. For details, see Using ABAC in KMS in the Key Management Service Developer Guide.
Because an alias is not a property of a KMS key, you can delete and change the aliases of a KMS key without affecting the KMS key. Also, aliases do not appear in the response from the DescribeKey operation. To get the aliases of all KMS keys, use the ListAliases operation.
Each KMS key can have multiple aliases. To change the alias of a KMS key, use DeleteAlias to delete the current alias and CreateAlias to create a new alias. To associate an existing alias with a different KMS key, call UpdateAlias.
Cross-account use: No. You cannot perform this operation on an alias in a different Amazon Web Services account.
Required permissions
- kms:DeleteAlias on the alias (IAM policy).
- kms:DeleteAlias on the KMS key (key policy).
For details, see Controlling access to aliases in the Key Management Service Developer Guide.
Related operations:
- CreateAlias
- ListAliases
- UpdateAlias
Synopsis
Creating a Request
data DeleteAlias Source #
See: newDeleteAlias
smart constructor.
Constructors
DeleteAlias' | |
Instances
Arguments
:: Text | |
-> DeleteAlias |
Create a value of DeleteAlias
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:aliasName:DeleteAlias'
, deleteAlias_aliasName
- The alias to be deleted. The alias name must begin with alias/
followed by the alias name, such as alias/ExampleAlias
.
Request Lenses
deleteAlias_aliasName :: Lens' DeleteAlias Text Source #
The alias to be deleted. The alias name must begin with alias/
followed by the alias name, such as alias/ExampleAlias
.
Destructuring the Response
data DeleteAliasResponse Source #
See: newDeleteAliasResponse
smart constructor.
Constructors
DeleteAliasResponse' | |
Instances
Eq DeleteAliasResponse Source # | |
Defined in Amazonka.KMS.DeleteAlias Methods (==) :: DeleteAliasResponse -> DeleteAliasResponse -> Bool # (/=) :: DeleteAliasResponse -> DeleteAliasResponse -> Bool # | |
Read DeleteAliasResponse Source # | |
Defined in Amazonka.KMS.DeleteAlias Methods readsPrec :: Int -> ReadS DeleteAliasResponse # readList :: ReadS [DeleteAliasResponse] # | |
Show DeleteAliasResponse Source # | |
Defined in Amazonka.KMS.DeleteAlias Methods showsPrec :: Int -> DeleteAliasResponse -> ShowS # show :: DeleteAliasResponse -> String # showList :: [DeleteAliasResponse] -> ShowS # | |
Generic DeleteAliasResponse Source # | |
Defined in Amazonka.KMS.DeleteAlias Associated Types type Rep DeleteAliasResponse :: Type -> Type # Methods from :: DeleteAliasResponse -> Rep DeleteAliasResponse x # to :: Rep DeleteAliasResponse x -> DeleteAliasResponse # | |
NFData DeleteAliasResponse Source # | |
Defined in Amazonka.KMS.DeleteAlias Methods rnf :: DeleteAliasResponse -> () # | |
type Rep DeleteAliasResponse Source # | |
newDeleteAliasResponse :: DeleteAliasResponse Source #
Create a value of DeleteAliasResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.