Skip to main content

volumes

Creates, updates, deletes or gets a volume resource or lists volumes in a region

Overview

Namevolumes
TypeResource
DescriptionResource Type definition for AWS::WorkspacesInstances::Volume - Manages WorkSpaces Volume resources
Idawscc.workspacesinstances.volumes

Fields

NameDatatypeDescription
volume_idstringUnique identifier for the volume
availability_zonestringThe Availability Zone in which to create the volume
encryptedbooleanIndicates whether the volume should be encrypted
iopsintegerThe number of I/O operations per second (IOPS)
kms_key_idstringThe identifier of the AWS Key Management Service (AWS KMS) customer master key (CMK) to use for Amazon EBS encryption
size_in_gbintegerThe size of the volume, in GiBs
snapshot_idstringThe snapshot from which to create the volume
throughputintegerThe throughput to provision for a volume, with a maximum of 1,000 MiB/s
volume_typestringThe volume type
tag_specificationsarrayThe tags passed to EBS volume
regionstringAWS region.

For more information, see AWS::WorkspacesInstances::Volume.

Methods

NameResourceAccessible byRequired Params
create_resourcevolumesINSERTAvailabilityZone, region
delete_resourcevolumesDELETEIdentifier, region
list_resourcesvolumes_list_onlySELECTregion
get_resourcevolumesSELECTIdentifier, 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 = '{{ region }}' AND
Identifier = '{{ volume_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.workspacesinstances.volumes (
AvailabilityZone,
region
)
SELECT
'{{ availability_zone }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.workspacesinstances.volumes
WHERE
Identifier = '{{ volume_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

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

workspaces-instances:CreateVolume,
ec2:CreateVolume,
ec2:CreateTags