| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Retrieves the specified policy document for the specified role. For more information about roles, go to Working with Roles.
The returned policy is URL-encoded according to RFC 3986. For more information about RFC 3986, go to http://www.faqs.org/rfcs/rfc3986.html.
For information about the common parameters that all actions use, see Common Parameters.
Name of the policy document to get.
Type: String
Length constraints: Minimum length of 1. Maximum length of 128.
Required: Yes
Name of the role associated with the policy.
Type: String
Length constraints: Minimum length of 1. Maximum length of 64.
Required: Yes
The following
elements are
returned in a GetRolePolicyResult structure.
The policy document.
Type: String
The name of the policy.
Type: String
The role the policy is associated with.
Type: String
For information about the errors that are common to all actions, see Common Errors.
The request was rejected because it referenced an entity that does not exist. The error message describes the entity.
HTTP Status Code: 404
https://iam.amazonaws.com/
?Action=GetRolePolicy
&PolicyName=S3AccessPolicy
&RoleName=S3Access
&Version=2010-05-08
&AUTHPARAMS
<GetRolePolicyResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<GetRolePolicyResult>
<PolicyName>S3AccessPolicy</PolicyName>
<RoleName>S3Access</RoleName>
<PolicyDocument>{"Version":"2008-10-17","Statement":[{"Effect":"Allow","Action":["s3:*"],"Resource":["*"]}]}</PolicyDocument>
</GetRolePolicyResult>
<ResponseMetadata>
<RequestId>7e7cd8bc-99ef-11e1-a4c3-27EXAMPLE804</RequestId>
</ResponseMetadata>
</GetRolePolicyResponse>