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
| 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. |
For more information, see AWS::WorkspacesInstances::Volume.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | AvailabilityZone, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
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 data__Identifier = '<VolumeId>';
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
'{{ AvailabilityZone }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.workspacesinstances.volumes (
AvailabilityZone,
Encrypted,
Iops,
KmsKeyId,
SizeInGB,
SnapshotId,
Throughput,
VolumeType,
TagSpecifications,
region
)
SELECT
'{{ AvailabilityZone }}',
'{{ Encrypted }}',
'{{ Iops }}',
'{{ KmsKeyId }}',
'{{ SizeInGB }}',
'{{ SnapshotId }}',
'{{ Throughput }}',
'{{ VolumeType }}',
'{{ TagSpecifications }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: volume
props:
- name: AvailabilityZone
value: '{{ AvailabilityZone }}'
- name: Encrypted
value: '{{ Encrypted }}'
- name: Iops
value: '{{ Iops }}'
- name: KmsKeyId
value: '{{ KmsKeyId }}'
- name: SizeInGB
value: '{{ SizeInGB }}'
- name: SnapshotId
value: '{{ SnapshotId }}'
- name: Throughput
value: '{{ Throughput }}'
- name: VolumeType
value: '{{ VolumeType }}'
- name: TagSpecifications
value:
- ResourceType: '{{ ResourceType }}'
Tags:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.workspacesinstances.volumes
WHERE data__Identifier = '<VolumeId>'
AND region = 'us-east-1';
Permissions
To operate on the volumes resource, the following permissions are required:
Create
workspaces-instances:CreateVolume,
ec2:CreateVolume,
ec2:CreateTags
Read
ec2:DescribeVolumes
Delete
workspaces-instances:DeleteVolume,
ec2:DescribeVolumes,
ec2:DeleteVolume
List
ec2:DescribeVolumes