virtualmfa_devices
Used to retrieve a list of virtualmfa_devices
in a region or to create or delete a virtualmfa_devices
resource, use virtualmfa_device
to read or update an individual resource.
Overview
Name | virtualmfa_devices |
Type | Resource |
Description | Resource Type definition for AWS::IAM::VirtualMFADevice |
Id | aws.iam.virtualmfa_devices |
Fields
Name | Datatype | Description |
---|---|---|
serial_number | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Users, region |
delete_resource | DELETE | data__Identifier, region |
list_resource | SELECT | region |
SELECT
Example
SELECT
region,
serial_number
FROM aws.iam.virtualmfa_devices
;
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
Delete
iam:DeleteVirtualMFADevice,
iam:DeactivateMFADevice
List
iam:ListVirtualMFADevices