Updates the name and/or the path of the specified user.
You should understand the implications of changing a user’s path or name. For more information, see Renaming Users and Groups in Using AWS Identity and Access Management.
To change a user name the requester must have appropriate permissions on both the source object and the target object. For example, to change Bob to Robert, the entity making the request must have permission on Bob and Robert, or must have permission on all (*). For more information about permissions, see Permissions and Policies.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
Name of the user to update. If you’re changing the name of the user, this is the original user name. [Constraints: The value must be between 1 and 128 characters, and must match the following regular expression pattern: |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Update an existing user.
// Instantiate the class $iam = new AmazonIAM(); // Update a user $response = $iam->update_user('johndoe', array( 'NewUserName' => '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