Returns information about the Access Key IDs associated with the specified user. If there are none, the action returns an empty list.
Although each user is limited to a small number of keys, you can still paginate the results
using the MaxItems
and Marker
parameters.
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.
To ensure the security of your AWS account, the secret access key is accessible only during key and user creation.
Access
public
Parameters
Parameter |
Type |
Required |
Description |
---|---|---|---|
|
Optional |
An associative array of parameters that can have the following keys:
|
Returns
Type |
Description |
---|---|
A |
Examples
List all access keys.
// Instantiate the class $iam = new AmazonIAM(); $response = $iam->list_access_keys(); // Success? var_dump($response->isOK());Result:
bool(true)
List access keys for a user.
// Instantiate the class $iam = new AmazonIAM(); $response = $iam->list_access_keys(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