AWS Identity and Access Management
CLI Reference (API Version 2010-05-08)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

iam-userlistkeys

Description

Returns information about the access keys belonging to the specified user. If the user has none, the action still succeeds. You can paginate the results using the MaxItems and Marker options.

Note

Calling this command without specifying a user name returns information about the access keys for the user who owns the requesting credentials.

Syntax

iam-userlistkeys [-u USERNAME]

Options

Name Description Required

-u USERNAME

Name of the user.

Type: String

Default: None

Optional

-i MAXITEMS

Use this only when paginating results to indicate the maximum number of items you want in the response. If there are additional items beyond the maximum you specify, the IsTruncated response element is true. This parameter is optional.  If you don't include it, it defaults to 100.

Type: String

Default: None

No

-m MARKER

Use this only when paginating results, and only in a subsequent request after you've received a response where the results are truncated. Set it to the value of the Marker element in the response you just received.

Type: String

Default: None

No

Output

The response lists the Access Key ID and the current status of the key (Active or Disabled).

Examples

The following example lists the keys for the user named Bob.

PROMPT> iam-userlistkeys -u Bob
AKIAIOSFODNN7EXAMPLE
Active