delete_login_profile ( $user_name, $opt )

Deletes the password for the specified user, which terminates the user’s ability to access AWS services through the AWS Management Console.

Deleting a user’s password does not prevent a user from accessing IAM through the command line interface or the API. To prevent all user access you must also either make the access key inactive or delete it. For more information about making keys inactive or deleting them, see UpdateAccessKey and DeleteAccessKey.

Access

public

Parameters

Parameter

Type

Required

Description

$user_name

string

Required

Name of the user whose password you want to delete. [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.

Examples

Delete a login profile for a user.

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

$response = $iam->delete_login_profile('johndoe2');

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

Related Methods

Source

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

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

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback