virtualmfa_devices
Creates, updates, deletes or gets a virtualmfa_device
resource or lists virtualmfa_devices
in a region
Overview
Name | virtualmfa_devices |
Type | Resource |
Description | Resource Type definition for AWS::IAM::VirtualMFADevice |
Id | aws.iam.virtualmfa_devices |
Fields
Name | Datatype | Description |
---|---|---|
virtual_mfa_device_name | string | |
path | string | |
serial_number | string | |
users | array | |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Users, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.iam.virtualmfa_devices (
Users,
region
)
SELECT
'{{ Users }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.iam.virtualmfa_devices (
VirtualMfaDeviceName,
Path,
Users,
Tags,
region
)
SELECT
'{{ VirtualMfaDeviceName }}',
'{{ Path }}',
'{{ Users }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: virtualmfa_device
props:
- name: VirtualMfaDeviceName
value: '{{ VirtualMfaDeviceName }}'
- name: Path
value: '{{ Path }}'
- name: Users
value:
- '{{ Users[0] }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
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