Skip to main content

virtualmfa_devices

Creates, updates, deletes or gets a virtualmfa_device resource or lists virtualmfa_devices in a region

Overview

Namevirtualmfa_devices
TypeResource
DescriptionResource Type definition for AWS::IAM::VirtualMFADevice
Idaws.iam.virtualmfa_devices

Fields

NameDatatypeDescription
virtual_mfa_device_namestring
pathstring
serial_numberstring
usersarray
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTUsers, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all virtualmfa_devices in a region.

SELECT
region,
virtual_mfa_device_name,
path,
serial_number,
users,
tags
FROM aws.iam.virtualmfa_devices
;

Gets all properties from an individual virtualmfa_device.

SELECT
region,
virtual_mfa_device_name,
path,
serial_number,
users,
tags
FROM aws.iam.virtualmfa_devices
WHERE data__Identifier = '<SerialNumber>';

INSERT example

Use the following StackQL query and manifest file to create a new virtualmfa_device resource, using stack-deploy.

/*+ create */
INSERT INTO aws.iam.virtualmfa_devices (
Users,
region
)
SELECT
'{{ Users }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.iam.virtualmfa_devices
WHERE data__Identifier = '<SerialNumber>'
AND region = 'us-east-1';

Permissions

To operate on the virtualmfa_devices resource, the following permissions are required:

Create

iam:CreateVirtualMFADevice,
iam:EnableMFADevice,
iam:ListVirtualMFADevices

Read

iam:ListVirtualMFADevices

Update

iam:TagMFADevice,
iam:UntagMFADevice

Delete

iam:DeleteVirtualMFADevice,
iam:DeactivateMFADevice

List

iam:ListVirtualMFADevices