AWS::FSx::Volume - AWS CloudFormation

AWS::FSx::Volume

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

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "Type" : "AWS::FSx::Volume", "Properties" : { "BackupId" : String, "Name" : String, "OntapConfiguration" : OntapConfiguration, "OpenZFSConfiguration" : OpenZFSConfiguration, "Tags" : [ Tag, ... ], "VolumeType" : String } }

YAML

Type: AWS::FSx::Volume Properties: BackupId: String Name: String OntapConfiguration: OntapConfiguration OpenZFSConfiguration: OpenZFSConfiguration Tags: - Tag VolumeType: String

Properties

BackupId

Specifies the ID of the volume backup to use to create a new volume.

Required: No

Type: String

Update requires: Replacement

Name

The name of the volume.

Required: Yes

Type: String

Minimum: 1

Maximum: 203

Pattern: ^[^\u0000\u0085\u2028\u2029\r\n]{1,203}$

Update requires: No interruption

OntapConfiguration

The configuration of an Amazon FSx for NetApp ONTAP volume.

Required: No

Type: OntapConfiguration

Update requires: No interruption

OpenZFSConfiguration

The configuration of an Amazon FSx for OpenZFS volume.

Required: No

Type: OpenZFSConfiguration

Update requires: No interruption

Tags

An array of key-value pairs to apply to this resource.

For more information, see Tag.

Required: No

Type: List of Tag

Update requires: No interruption

VolumeType

The type of the volume.

Required: No

Type: String

Allowed values: ONTAP | OPENZFS

Update requires: Replacement

Return values

Ref

When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ID for the volume. For example:

{"Ref":"vol_logical_id"}

Returns fsvol-0123456789abcdef6.

For more information about using the Ref function, see Ref.

Fn::GetAtt

The Fn::GetAtt intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAtt intrinsic function, see Fn::GetAtt.

ResourceARN

Returns the volume's Amazon Resource Name (ARN).

Example: arn:aws:fsx:us-east-2:111122223333:volume/fs-0123456789abcdef9/fsvol-01234567891112223

UUID

Returns the volume's universally unique identifier (UUID).

Example: abcd0123-cd45-ef67-11aa-1111aaaa23bc

VolumeId

Returns the volume's ID.

Example: fsvol-0123456789abcdefa

Examples

Create an ONTAP volume

JSON

{ "OntapVolumeWithAllConfigs": { "Type": "AWS::FSx::Volume", "Properties": { "Name": "volume1", "OntapConfiguration": { "JunctionPath": "/volume1", "SecurityStyle": "MIXED", "SizeInMegabytes": 40, "StorageEfficiencyEnabled": true, "StorageVirtualMachineId": { "Ref": "OntapStorageVirtualMachineWithAllConfigs" }, "TieringPolicy": { "CoolingPeriod": 41, "Name": "AUTO" } }, "Tags": [ { "Key": "Name", "Value": "OntapVolume" } ], "VolumeType": "ONTAP" } } }

YAML

OntapVolumeWithAllConfigs: Type: 'AWS::FSx::Volume' Properties: Name: volume1 OntapConfiguration: JunctionPath: /volume1 SecurityStyle: MIXED SizeInMegabytes: 40 StorageEfficiencyEnabled: true StorageVirtualMachineId: !Ref OntapStorageVirtualMachineWithAllConfigs TieringPolicy: CoolingPeriod: 41 Name: AUTO Tags: - Key: Name Value: OntapVolume VolumeType: ONTAP

Create an ONTAP volume from a backup

This example creates a volume from an existing backup: backup-0123abc456defghij

JSON

{ "OntapVolumeFromBackupWithAllConfigs": { "Type": "AWS::FSx::Volume", "Properties": { "BackupId": "backup-0123abc456defghij", "Name": "volume11", "OntapConfiguration": { "JunctionPath": "/volume11", "SecurityStyle": "UNIX", "SizeInMegabytes": 41, "StorageEfficiencyEnabled": true, "StorageVirtualMachineId": { "Ref": "StorageVirtualMachineWithAllConfigs" }, "TieringPolicy": { "CoolingPeriod": 42, "Name": "AUTO" } } } } }

YAML

OntapVolumeFromBackupWithAllConfigs: Type: "AWS::FSx::Volume" Properties: BackupId: "backup-0123abc456defghij" Name: "volume11" OntapConfiguration: JunctionPath: "/volume11" SecurityStyle: "UNIX" SizeInMegabytes: 41 StorageEfficiencyEnabled: True StorageVirtualMachineId: !Ref StorageVirtualMachineWithAllConfigs TieringPolicy: CoolingPeriod: 42 Name: "AUTO"