Changes the status of the specified access key from Active to Inactive, or vice versa. This action can be used to disable a user’s key as part of a key rotation work flow.
If the UserName
field is not specified, the UserName is determined implicitly
based on the AWS Access Key ID used to sign the request. Because this action works for access
keys under the AWS account, this API can be used to manage root credentials even if the AWS
account has no associated users.
For information about rotating keys, see Managing Keys and Certificates in Using AWS Identity and Access Management.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Required |
The Access Key ID of the Secret Access Key you want to update. [Constraints: The value must be between 16 and 32 characters, and must match the following regular expression pattern: |
|
|
Required |
The status you want to assign to the Secret Access Key. |
|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
Update an access key for a user.
// Instantiate the class $iam = new AmazonIAM(); $response = $iam->update_access_key('AKIAIN7OWEXAMPLENN2A', 'Active', array( 'UserName' => 'johndoe2' )); // 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