public class DeletePolicyRequest extends AmazonWebServiceRequest implements java.io.Serializable
Deletes the specified policy.
A policy cannot be deleted if it has non-default versions or it is attached to any certificate.
To delete a policy, use the DeletePolicyVersion API to delete all non-default versions of the policy; use the DetachPrincipalPolicy API to detach the policy from any certificate; and then use the DeletePolicy API to delete the policy.
When a policy is deleted using DeletePolicy, its default version is deleted with it.
Constructor and Description |
---|
DeletePolicyRequest() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getPolicyName()
The name of the policy to delete.
|
int |
hashCode() |
void |
setPolicyName(java.lang.String policyName)
The name of the policy to delete.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DeletePolicyRequest |
withPolicyName(java.lang.String policyName)
The name of the policy to delete.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public java.lang.String getPolicyName()
The name of the policy to delete.
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
The name of the policy to delete.
public void setPolicyName(java.lang.String policyName)
The name of the policy to delete.
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
policyName
- The name of the policy to delete.
public DeletePolicyRequest withPolicyName(java.lang.String policyName)
The name of the policy to delete.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 128
Pattern: [\w+=,.@-]+
policyName
- The name of the policy to delete.
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.