public class DeletePolicyRequest extends AmazonWebServiceRequest implements 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(Object obj) |
String |
getPolicyName()
The name of the policy to delete.
|
int |
hashCode() |
void |
setPolicyName(String policyName)
The name of the policy to delete.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DeletePolicyRequest |
withPolicyName(String policyName)
The name of the policy to delete.
|
clone, copyBaseTo, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollectorpublic 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(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(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 String toString()
toString in class ObjectObject.toString()Copyright © 2017. All rights reserved.