create_login_profile ( $user_name, $password, $opt )

Creates a password for the specified user, giving the user the ability to access AWS services through the AWS Management Console. For more information about managing passwords, see Managing Passwords in Using IAM.

Access

public

Parameters

Parameter

Type

Required

Description

$user_name

string

Required

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

$password

string

Required

The new password for the user name. [Constraints: The value must be between 1 and 128 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.

Examples

Create a login profile for a user.

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

$response = $iam->create_login_profile('johndoe2', 'password');

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

Related Methods

Source

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

public function create_login_profile($user_name, $password, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['UserName'] = $user_name;
    $opt['Password'] = $password;
    
    return $this->authenticate('CreateLoginProfile', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback