Skip to main content

volumes

Creates, updates, deletes, gets or lists a volumes resource.

Overview

Namevolumes
TypeResource
Idaws.fsx.volumes

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
administrative_actionsarrayA list of administrative actions for the volume that are in process or waiting to be processed. Administrative actions describe changes to the volume that you have initiated using the UpdateVolume action.
creation_timestring (date-time)The time that the resource was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time.
file_system_idstringThe globally unique ID of the file system, assigned by Amazon FSx. (pattern: <code>^(fs-[0-9a-f]{8,})$</code>)
lifecyclestringThe lifecycle status of the volume. AVAILABLE - The volume is fully available for use. CREATED - The volume has been created. CREATING - Amazon FSx is creating the new volume. DELETING - Amazon FSx is deleting an existing volume. FAILED - Amazon FSx was unable to create the volume. MISCONFIGURED - The volume is in a failed but recoverable state. PENDING - Amazon FSx hasn't started creating the volume. (CREATING, CREATED, DELETING, FAILED, MISCONFIGURED, PENDING, AVAILABLE)
lifecycle_transition_reasonobjectThe reason why the volume lifecycle status changed.
namestringThe name of the volume. (pattern: <code>^[^\u0000\u0085\u2028\u2029\r\n]{1,203}$</code>)
ontap_configurationobjectThe configuration of an Amazon FSx for NetApp ONTAP volume.
open_zfs_configurationobjectThe configuration of an Amazon FSx for OpenZFS volume.
resource_arnstringThe Amazon Resource Name (ARN) for a given resource. ARNs uniquely identify Amazon Web Services resources. We require an ARN when you need to specify a resource unambiguously across all of Amazon Web Services. For more information, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference. (pattern: <code>^arn:(?=[^:]+:fsx:[^:]+:\d{12}:)((|(?=[a-z0-9-.]{1,63})(?!\d{1,3}(.\d{1,3}){3})(?![^:]-{2})(?![^:]-.)(?![^:].-)[a-z0-9].(?<!-)):){4}(?!/).{0,1024}$</code>)
tagsarrayA list of Tag values, with a maximum of 50 elements.
volume_idstringThe system-generated, unique ID of the volume. (pattern: <code>^(fsvol-[0-9a-f]{17,})$</code>)
volume_typestringThe type of the volume. (ONTAP, OPENZFS)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_volumesselectregionDescribes one or more Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volumes.
create_volumeinsertregion, VolumeTypeCreates an FSx for ONTAP or Amazon FSx for OpenZFS storage volume.
update_volumeupdateregion, VolumeIdUpdates the configuration of an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume.
delete_volumedeleteregionDeletes an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume.
restore_volume_from_snapshotexecregion, VolumeId, SnapshotIdReturns an Amazon FSx for OpenZFS volume to the state saved by the specified snapshot.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes one or more Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volumes.

SELECT
administrative_actions,
creation_time,
file_system_id,
lifecycle,
lifecycle_transition_reason,
name,
ontap_configuration,
open_zfs_configuration,
resource_arn,
tags,
volume_id,
volume_type
FROM aws.fsx.volumes
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an FSx for ONTAP or Amazon FSx for OpenZFS storage volume.

INSERT INTO aws.fsx.volumes (
ClientRequestToken,
VolumeType,
Name,
OntapConfiguration,
Tags,
OpenZFSConfiguration,
region
)
SELECT
'{{ ClientRequestToken }}',
'{{ VolumeType }}' /* required */,
'{{ Name }}',
'{{ OntapConfiguration }}',
'{{ Tags }}',
'{{ OpenZFSConfiguration }}',
'{{ region }}'
RETURNING
volume
;

UPDATE examples

Updates the configuration of an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume.

UPDATE aws.fsx.volumes
SET
ClientRequestToken = '{{ ClientRequestToken }}',
VolumeId = '{{ VolumeId }}',
OntapConfiguration = '{{ OntapConfiguration }}',
Name = '{{ Name }}',
OpenZFSConfiguration = '{{ OpenZFSConfiguration }}'
WHERE
region = '{{ region }}' --required
AND VolumeId = '{{ VolumeId }}' --required
RETURNING
volume;

DELETE examples

Deletes an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume.

DELETE FROM aws.fsx.volumes
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Returns an Amazon FSx for OpenZFS volume to the state saved by the specified snapshot.

EXEC aws.fsx.volumes.restore_volume_from_snapshot
@region='{{ region }}' --required
@@json=
'{
"ClientRequestToken": "{{ ClientRequestToken }}",
"VolumeId": "{{ VolumeId }}",
"SnapshotId": "{{ SnapshotId }}",
"Options": "{{ Options }}"
}'
;