volumes
Creates, updates, deletes, gets or lists a volumes resource.
Overview
| Name | volumes |
| Type | Resource |
| Id | aws.fsx.volumes |
Fields
The following fields are returned by SELECT queries:
- describe_volumes
| Name | Datatype | Description |
|---|---|---|
administrative_actions | array | A 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_time | string (date-time) | The time that the resource was created, in seconds (since 1970-01-01T00:00:00Z), also known as Unix time. |
file_system_id | string | The globally unique ID of the file system, assigned by Amazon FSx. (pattern: <code>^(fs-[0-9a-f]{8,})$</code>) |
lifecycle | string | The 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_reason | object | The reason why the volume lifecycle status changed. |
name | string | The name of the volume. (pattern: <code>^[^\u0000\u0085\u2028\u2029\r\n]{1,203}$</code>) |
ontap_configuration | object | The configuration of an Amazon FSx for NetApp ONTAP volume. |
open_zfs_configuration | object | The configuration of an Amazon FSx for OpenZFS volume. |
resource_arn | string | The 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>) |
tags | array | A list of Tag values, with a maximum of 50 elements. |
volume_id | string | The system-generated, unique ID of the volume. (pattern: <code>^(fsvol-[0-9a-f]{17,})$</code>) |
volume_type | string | The type of the volume. (ONTAP, OPENZFS) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_volumes | select | region | Describes one or more Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volumes. | |
create_volume | insert | region, VolumeType | Creates an FSx for ONTAP or Amazon FSx for OpenZFS storage volume. | |
update_volume | update | region, VolumeId | Updates the configuration of an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume. | |
delete_volume | delete | region | Deletes an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume. | |
restore_volume_from_snapshot | exec | region, VolumeId, SnapshotId | Returns 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_volumes
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
- create_volume
- Manifest
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
;
# Description fields are for documentation purposes
- name: volumes
props:
- name: region
value: "{{ region }}"
description: Required parameter for the volumes resource.
- name: ClientRequestToken
value: "{{ ClientRequestToken }}"
description: |
(Optional) An idempotency token for resource creation, in a string of up to 63 ASCII characters. This token is automatically filled on your behalf when you use the Command Line Interface (CLI) or an Amazon Web Services SDK.
- name: VolumeType
value: "{{ VolumeType }}"
description: |
Specifies the type of volume to create; ONTAP and OPENZFS are the only valid volume types.
valid_values: ['ONTAP', 'OPENZFS']
- name: Name
value: "{{ Name }}"
description: |
Specifies the name of the volume that you're creating.
- name: OntapConfiguration
description: |
Specifies the configuration to use when creating the ONTAP volume.
value:
JunctionPath: "{{ JunctionPath }}"
SecurityStyle: "{{ SecurityStyle }}"
SizeInMegabytes: {{ SizeInMegabytes }}
StorageEfficiencyEnabled: {{ StorageEfficiencyEnabled }}
StorageVirtualMachineId: "{{ StorageVirtualMachineId }}"
TieringPolicy:
CoolingPeriod: {{ CoolingPeriod }}
Name: "{{ Name }}"
OntapVolumeType: "{{ OntapVolumeType }}"
SnapshotPolicy: "{{ SnapshotPolicy }}"
CopyTagsToBackups: {{ CopyTagsToBackups }}
SnaplockConfiguration:
AuditLogVolume: {{ AuditLogVolume }}
AutocommitPeriod:
Type: "{{ Type }}"
Value: {{ Value }}
PrivilegedDelete: "{{ PrivilegedDelete }}"
RetentionPeriod:
DefaultRetention:
Type: "{{ Type }}"
Value: {{ Value }}
MinimumRetention:
Type: "{{ Type }}"
Value: {{ Value }}
MaximumRetention:
Type: "{{ Type }}"
Value: {{ Value }}
SnaplockType: "{{ SnaplockType }}"
VolumeAppendModeEnabled: {{ VolumeAppendModeEnabled }}
VolumeStyle: "{{ VolumeStyle }}"
AggregateConfiguration:
Aggregates:
- "{{ Aggregates }}"
ConstituentsPerAggregate: {{ ConstituentsPerAggregate }}
SizeInBytes: {{ SizeInBytes }}
- name: Tags
description: |
A list of Tag values, with a maximum of 50 elements.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: OpenZFSConfiguration
description: |
Specifies the configuration to use when creating the OpenZFS volume.
value:
ParentVolumeId: "{{ ParentVolumeId }}"
StorageCapacityReservationGiB: {{ StorageCapacityReservationGiB }}
StorageCapacityQuotaGiB: {{ StorageCapacityQuotaGiB }}
RecordSizeKiB: {{ RecordSizeKiB }}
DataCompressionType: "{{ DataCompressionType }}"
CopyTagsToSnapshots: {{ CopyTagsToSnapshots }}
OriginSnapshot:
SnapshotARN: "{{ SnapshotARN }}"
CopyStrategy: "{{ CopyStrategy }}"
ReadOnly: {{ ReadOnly }}
NfsExports:
- ClientConfigurations: "{{ ClientConfigurations }}"
UserAndGroupQuotas:
- Type: "{{ Type }}"
Id: {{ Id }}
StorageCapacityQuotaGiB: {{ StorageCapacityQuotaGiB }}
UPDATE examples
- update_volume
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
- delete_volume
Deletes an Amazon FSx for NetApp ONTAP or Amazon FSx for OpenZFS volume.
DELETE FROM aws.fsx.volumes
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- restore_volume_from_snapshot
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 }}"
}'
;