public class DeleteAliasRequest extends AmazonWebServiceRequest implements java.io.Serializable
Deletes the specified alias.
Because an alias is not a property of a CMK, you can delete and change 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, use the ListAliases operation.
Each CMK can have multiple aliases. To change the alias of a CMK, use DeleteAlias to delete the current alias and CreateAlias to create a new alias. To associate an existing alias with a different customer master key (CMK), call UpdateAlias.
Cross-account use: No. You cannot perform this operation on an alias in a different AWS account.
Required permissions
kms:DeleteAlias on the alias (IAM policy).
kms:DeleteAlias on the CMK (key policy).
For details, see Controlling access to aliases in the AWS Key Management Service Developer Guide.
Related operations:
Constructor and Description |
---|
DeleteAliasRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAliasName()
The alias to be deleted.
|
int |
hashCode() |
void |
setAliasName(java.lang.String aliasName)
The alias to be deleted.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DeleteAliasRequest |
withAliasName(java.lang.String aliasName)
The alias to be deleted.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getAliasName()
The alias to be deleted. The alias name must begin with
alias/
followed by the alias name, such as
alias/ExampleAlias
.
Constraints:
Length: 1 - 256
Pattern: ^[a-zA-Z0-9:/_-]+$
The alias to be deleted. The alias name must begin with
alias/
followed by the alias name, such as
alias/ExampleAlias
.
public void setAliasName(java.lang.String aliasName)
The alias to be deleted. The alias name must begin with
alias/
followed by the alias name, such as
alias/ExampleAlias
.
Constraints:
Length: 1 - 256
Pattern: ^[a-zA-Z0-9:/_-]+$
aliasName
-
The alias to be deleted. The alias name must begin with
alias/
followed by the alias name, such as
alias/ExampleAlias
.
public DeleteAliasRequest withAliasName(java.lang.String aliasName)
The alias to be deleted. The alias name must begin with
alias/
followed by the alias name, such as
alias/ExampleAlias
.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 256
Pattern: ^[a-zA-Z0-9:/_-]+$
aliasName
-
The alias to be deleted. The alias name must begin with
alias/
followed by the alias name, such as
alias/ExampleAlias
.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.