Skip to main content

volume_associations

Creates, updates, deletes or gets a volume_association resource or lists volume_associations in a region

Overview

Namevolume_associations
TypeResource
DescriptionResource Type definition for AWS::WorkspacesInstances::VolumeAssociation
Idawscc.workspacesinstances.volume_associations

Fields

NameDatatypeDescription
workspace_instance_idstringID of the workspace instance to associate with the volume
volume_idstringID of the volume to attach to the workspace instance
devicestringThe device name for the volume attachment
disassociate_modestringMode to use when disassociating the volume
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcevolume_associationsINSERTWorkspaceInstanceId, VolumeId, Device, region
delete_resourcevolume_associationsDELETEIdentifier, region
list_resourcesvolume_associations_list_onlySELECTregion
get_resourcevolume_associationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual volume_association.

SELECT
region,
workspace_instance_id,
volume_id,
device,
disassociate_mode
FROM awscc.workspacesinstances.volume_associations
WHERE
region = 'us-east-1' AND
Identifier = '{{ workspace_instance_id }}|{{ volume_id }}|{{ device }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.workspacesinstances.volume_associations (
WorkspaceInstanceId,
VolumeId,
Device,
region
)
SELECT
'{{ workspace_instance_id }}',
'{{ volume_id }}',
'{{ device }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM awscc.workspacesinstances.volume_associations
WHERE
Identifier = '{{ workspace_instance_id }}|{{ volume_id }}|{{ device }}' AND
region = 'us-east-1';

Permissions

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

ec2:DescribeVolumes,
ec2:AttachVolume,
workspaces-instances:GetWorkspaceInstance,
workspaces-instances:AssociateVolume