public class GetPolicyRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
GetPolicy operation
.
Retrieves information about the specified managed policy, including the policy's default version and the total number of users, groups, and roles that the policy is attached to. For a list of the specific users, groups, and roles that the policy is attached to, use the ListEntitiesForPolicy API. This API returns metadata about the policy. To retrieve the policy document for a specific version of the policy, use GetPolicyVersion.
This API retrieves information about managed policies. To retrieve information about an inline policy that is embedded with a user, group, or role, use the GetUserPolicy, GetGroupPolicy, or GetRolePolicy API.
For more information about policies, refer to Managed Policies and Inline Policies in the IAM User Guide .
NOOP
Constructor and Description |
---|
GetPolicyRequest() |
Modifier and Type | Method and Description |
---|---|
GetPolicyRequest |
clone()
Creates a shallow clone of this request.
|
boolean |
equals(Object obj) |
String |
getPolicyArn()
The Amazon Resource Name (ARN).
|
int |
hashCode() |
void |
setPolicyArn(String policyArn)
The Amazon Resource Name (ARN).
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
GetPolicyRequest |
withPolicyArn(String policyArn)
The Amazon Resource Name (ARN).
|
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public String getPolicyArn()
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Constraints:
Length: 20 - 2048
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
public void setPolicyArn(String policyArn)
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Constraints:
Length: 20 - 2048
policyArn
- The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS
resources. For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
public GetPolicyRequest withPolicyArn(String policyArn)
For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 20 - 2048
policyArn
- The Amazon Resource Name (ARN). ARNs are unique identifiers for AWS
resources. For more information about ARNs, go to Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference.
public String toString()
toString
in class Object
Object.toString()
public GetPolicyRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()
Copyright © 2015. All rights reserved.