update_assume_role_policy ( $role_name, $policy_document, $opt )

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.

Access

public

Parameters

Parameter

Type

Required

Description

$role_name

string

Required

Name of the role to update. [Constraints: The value must be between 1 and 64 characters, and must match the following regular expression pattern: [\w+=,.@-]*]

$policy_document

string

Required

The policy that grants an entity permission to assume the role. [Constraints: The value must be between 1 and 131072 characters, and must match the following regular expression pattern: [\u0009\u000A\u000D\u0020-\u00FF]+]

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Source

Method defined in services/iam.class.php | Toggle source view (8 lines) | View on GitHub

public function update_assume_role_policy($role_name, $policy_document, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['RoleName'] = $role_name;
    $opt['PolicyDocument'] = $policy_document;
    
    return $this->authenticate('UpdateAssumeRolePolicy', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback