AWS Identity and Access Management
API Reference (API Version 2010-05-08)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

UpdateAssumeRolePolicy

Description

Updates the policy that grants an entity permission to assume a role. Currently, only an Amazon EC2 instance can assume a role. For more information about roles, go to Working with Roles.

Request Parameters

For information about the common parameters that all actions use, see Common Parameters.

PolicyDocument

The policy that grants an entity permission to assume the role.

Type: String

Length constraints: Minimum length of 1. Maximum length of 131072.

Required: Yes

RoleName

Name of the role to update.

Type: String

Length constraints: Minimum length of 1. Maximum length of 64.

Required: Yes

Errors

For information about the errors that are common to all actions, see Common Errors.

MalformedPolicyDocument

The request was rejected because the policy document was malformed. The error message describes the specific error.

HTTP Status Code: 400

NoSuchEntity

The request was rejected because it referenced an entity that does not exist. The error message describes the entity.

HTTP Status Code: 404

Examples

Sample Request

https://iam.amazonaws.com/
?Action=UpdateAssumeRolePolicy
&PolicyDocument={"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"Service":["ec2.amazonaws.com"]},"Action":["sts:AssumeRole"]}]}
&RoleName=S3Access
&Version=2010-05-08
&AUTHPARAMS
      

Sample Response

<UpdateAssumeRolePolicyResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
  <ResponseMetadata>
    <RequestId>309c1671-99ed-11e1-a4c3-270EXAMPLE04</RequestId>
  </ResponseMetadata>
</UpdateAssumeRolePolicyResponse>