Skip to main content

mfa_devices

Creates, updates, deletes, gets or lists a mfa_devices resource.

Overview

Namemfa_devices
TypeResource
Idaws.iam.mfa_devices

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
certificationsstringThe certifications of a specified user's MFA device. We currently provide FIPS-140-2, FIPS-140-3, and FIDO certification levels obtained from FIDO Alliance Metadata Service (MDS).
enable_datestringThe date that a specified user's MFA device was first enabled.
serial_numberstringSerial number that uniquely identifies the MFA device. For this API, we only accept FIDO security key ARNs.
user_namestringThe friendly name identifying the user.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_mfa_deviceselectSerialNumber, regionUserNameRetrieves information about an MFA device for a specified user.
list_mfa_devicesselectregionUserName, Marker, MaxItemsLists the MFA devices for an IAM user. If the request includes a IAM user name, then this operation lists all the MFA devices associated with the specified user. If you do not specify a user name, IAM determines the user name implicitly based on the Amazon Web Services access key ID signing the request for this operation. You can paginate the results using the MaxItems and Marker parameters.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
SerialNumberstringSerial number that uniquely identifies the MFA device. For this API, we only accept FIDO security key ARNs.
regionstringAWS region (default: us-east-1)
MarkerstringUse this parameter only when paginating results and only after you receive a response indicating that the results are truncated. Set it to the value of the Marker element in the response that you received to indicate where the next call should start.
MaxItemsintegerUse this only when paginating results to indicate the maximum number of items you want in the response. If additional items exist beyond the maximum you specify, the IsTruncated response element is true. If you do not include this parameter, the number of items defaults to 100. Note that IAM might return fewer results, even when there are more results available. In that case, the IsTruncated response element returns true, and Marker contains a value to include in the subsequent call that tells the service where to continue from.
UserNamestringThe name of the user whose MFA devices you want to list. This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-

SELECT examples

Retrieves information about an MFA device for a specified user.

SELECT
certifications,
enable_date,
serial_number,
user_name
FROM aws.iam.mfa_devices
WHERE SerialNumber = '{{ SerialNumber }}' -- required
AND region = '{{ region }}' -- required
AND UserName = '{{ UserName }}'
;