get_role ( $role_name, $opt )

Retrieves information about the specified role, including the role’s path, GUID, ARN, and the policy granting permission to EC2 to assume the role. For more information about ARNs, go to ARNs. 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.

Access

public

Parameters

Parameter

Type

Required

Description

$role_name

string

Required

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

$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 (7 lines) | View on GitHub

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback