| « PreviousNext » | |
![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
Lists the virtual MFA devices under the AWS account by assignment status. If you do not specify an
assignment status, the command returns a list of all virtual MFA devices. Assignment status can be Assigned,
Unassigned, or Any.
You can paginate the results using the MaxItems
and Marker options.
For more information about virtual MFA devices, go to Using a Virtual MFA Device in Using AWS Identity and Access Management.
iam-virtualmfadevicelist -t
ASSIGNMENTSTATUS [-v]
| Name | Description | Required |
|---|---|---|
|
|
The type of virtual MFA device to list. Type: String Valid Values: |
Yes |
|
|
If the virtual MFA device is assigned, displays the device serial number, the ARN of the user the device is assigned to, and the user ID. If the device is assigned at the root account level, the user ID is the account number. If the device is unassigned, only the MFA device serial number is returned. Type: String Default: None |
No |
|
|
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 Type: String Default: None |
No |
|
|
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 |
The output contains a list of virtual MFA devices associated with the AWS account.
The following example lists the virtual MFA devices associated with the account, where there are three
devices associated with the account and ASSIGNMENTSTATUS
is Any. The first serial number is for an unassigned device, the second serial number is for
a device assigned at the root account level, the third serial number is for a device assigned to a user
under the account named ExampleUser.
PROMPT> iam-virtualmfadevicelist -t Any –v
arn:aws:iam::123456789012:mfa/ExampleMFAdeviceName
arn:aws:iam::123456789012:mfa/RootMFAdeviceName
arn:aws:iam::123456789012:root
123456789012
arn:aws:iam::123456789012:mfa/ExampleUserMFAdeviceName
arn:aws:iam::123456789012:user/ExampleUser
AIDACKCEVSQ6C2EXAMPLE
IsTruncated: false