updateAssumeRolePolicy

Updates the policy that grants an IAM entity permission to assume a role. This is typically referred to as the "role trust policy". For more information about roles, see Using roles to delegate permissions and federate identities.

Samples


fun main() { 
   //sampleStart 
   // The following command updates the role trust policy for the role named Test Role
iamClient.updateAssumeRolePolicy {
    policyDocument = "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}"
    roleName = "S3AccessForEC2Instances"
} 
   //sampleEnd
}