get_user ( $opt )

Retrieves information about the specified user, including the user’s path, GUID, and ARN.

If you do not specify a user name, IAM determines the user name implicitly based on the AWS Access Key ID signing the request.

Access

public

Parameters

Parameter

Type

Required

Description

$opt

array

Optional

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

  • UserName - string - Optional - Name of the user to get information about. This parameter is optional. If it is not included, it defaults to the user making the request. [Constraints: The value must be between 1 and 128 characters, and must match the following regular expression pattern: [\w+=,.@-]*]
  • 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.

Examples

Get an existing user.

// Instantiate the class
$iam = new AmazonIAM();

// Create a new parent group
$response = $iam->get_user(array(
	'UserName' => 'johndoe2'
));

// Success?
var_dump($response->isOK());
Result:
bool(true)

Related Methods

Source

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

public function get_user($opt = null)
{
    if (!$opt) $opt = array();
            
    return $this->authenticate('GetUser', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback