volumes
Creates, updates, deletes or gets a volume resource or lists volumes in a region
Overview
| Name | volumes |
| Type | Resource |
| Description | Resource Type definition for AWS::WorkspacesInstances::Volume - Manages WorkSpaces Volume resources |
| Id | awscc.workspacesinstances.volumes |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
volume_id | string | Unique identifier for the volume |
availability_zone | string | The Availability Zone in which to create the volume |
encrypted | boolean | Indicates whether the volume should be encrypted |
iops | integer | The number of I/O operations per second (IOPS) |
kms_key_id | string | The identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption |
size_in_gb | integer | The size of the volume, in GiBs |
snapshot_id | string | The snapshot from which to create the volume |
throughput | integer | The throughput to provision for a volume, with a maximum of 1,000 MiB/s |
volume_type | string | The volume type |
tag_specifications | array | The tags passed to EBS volume |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
volume_id | string | Unique identifier for the volume |
region | string | AWS region. |
For more information, see AWS::WorkspacesInstances::Volume.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | volumes | INSERT | AvailabilityZone, region |
delete_resource | volumes | DELETE | Identifier, region |
list_resources | volumes_list_only | SELECT | region |
get_resource | volumes | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual volume.
SELECT
region,
volume_id,
availability_zone,
encrypted,
iops,
kms_key_id,
size_in_gb,
snapshot_id,
throughput,
volume_type,
tag_specifications
FROM awscc.workspacesinstances.volumes
WHERE
region = 'us-east-1' AND
Identifier = '{{ volume_id }}';
Lists all volumes in a region.
SELECT
region,
volume_id
FROM awscc.workspacesinstances.volumes_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new volume resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.workspacesinstances.volumes (
AvailabilityZone,
region
)
SELECT
'{{ availability_zone }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.workspacesinstances.volumes (
AvailabilityZone,
Encrypted,
Iops,
KmsKeyId,
SizeInGB,
SnapshotId,
Throughput,
VolumeType,
TagSpecifications,
region
)
SELECT
'{{ availability_zone }}',
'{{ encrypted }}',
'{{ iops }}',
'{{ kms_key_id }}',
'{{ size_in_gb }}',
'{{ snapshot_id }}',
'{{ throughput }}',
'{{ volume_type }}',
'{{ tag_specifications }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: volume
props:
- name: availability_zone
value: '{{ availability_zone }}'
- name: encrypted
value: '{{ encrypted }}'
- name: iops
value: '{{ iops }}'
- name: kms_key_id
value: '{{ kms_key_id }}'
- name: size_in_gb
value: '{{ size_in_gb }}'
- name: snapshot_id
value: '{{ snapshot_id }}'
- name: throughput
value: '{{ throughput }}'
- name: volume_type
value: '{{ volume_type }}'
- name: tag_specifications
value:
- resource_type: '{{ resource_type }}'
tags:
- key: '{{ key }}'
value: '{{ value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.workspacesinstances.volumes
WHERE
Identifier = '{{ volume_id }}' AND
region = 'us-east-1';
Permissions
To operate on the volumes resource, the following permissions are required:
- Create
- Read
- Delete
- List
workspaces-instances:CreateVolume,
ec2:CreateVolume,
ec2:CreateTags
ec2:DescribeVolumes
workspaces-instances:DeleteVolume,
ec2:DescribeVolumes,
ec2:DeleteVolume
ec2:DescribeVolumes