All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::NAS::FileSystem

Last Updated:Sep 14, 2023

ALIYUN::NAS::FileSystem is used to create a file system in Apsara File Storage NAS (NAS).

Syntax

{
  "Type": "ALIYUN::NAS::FileSystem",
  "Properties": {
    "SnapshotId": String,
    "Description": String,
    "StorageType": String,
    "DeletionForce": Boolean,
    "EncryptType": Integer,
    "VpcId": String,
    "ZoneId": String,
    "Capacity": Integer,
    "Tags": List,
    "ProtocolType": String,
    "FileSystemType": String,
    "Bandwidth": Integer,
    "VSwitchId": String,
    "Duration": Integer,
    "ChargeType": String
  }
}  

Properties

Property

Type

Required

Editable

Description

Constraint

ProtocolType

String

Yes

No

The protocol type.

Valid values:

  • NFS: Network File System (NFS)

  • SMB: Server Message Block (SMB)

StorageType

String

Yes

No

The storage type.

Valid values:

  • Valid values when FileSystemType is set to standard:

    • Performance

    • Capacity

  • Valid values when FileSystemType is set to extreme or cpfs:

    • standard

    • advance

DeletionForce

Boolean

No

Yes

Specifies whether to forcefully delete the file system.

Valid values:

  • true

  • false (default)

Description

String

No

Yes

The description of the file system.

The description must be 2 to 128 characters in length, and can contain letters, digits, colons (:), underscores (_), and hyphens (-). It must start with a letter and cannot start with http:// or https://.

ZoneId

String

No

No

The zone ID.

None.

Tags

List

No

Yes

The tags of the file system.

You can add up to 20 tags to each file system.

For more information, see Tags properties.

SnapshotId

String

No

No

The snapshot ID.

You can use this property to specify a snapshot from which you create a NAS file system. This property is supported only for Extreme NAS file systems.

Note

If you create a file system from a snapshot, the version of the new file system must be the same as the version of the source file system that is contained in the snapshot. If the version of a file system that you create is different from the version of the source file system, you must perform the following operations:

  1. Create a file system and copy the data that is stored in the source file of the snapshot to the file system.

  2. After you copy the data, migrate the data to the file system.

EncryptType

Integer

No

No

Specifies whether to encrypt the file system. You can use keys that are managed by Key Management Service (KMS) to encrypt data stored in the file system. When you read and write the encrypted data, you do not need to decrypt the data.

This property takes effect when FileSystemType is set to standard or extreme. Valid values:

  • 0: does not encrypt the file system.

  • 1: encrypts the file system.

Capacity

Integer

No

Yes

The capacity of the file system.

This property is required if FileSystemType is set to extreme or cpfs.

Valid values:

  • Valid values when FileSystemType is set to extreme: 100 to 262144.

  • Valid values when FileSystemType is set to cpfs: 2048 to 512000.

Unit: GB.

FileSystemType

String

No

No

The type of the file system.

Valid values:

  • standard (default): General-purpose NAS file system

  • extreme: Extreme NAS file system

  • cpfs: Cloud Paralleled File System (CPFS) file system

VpcId

String

No

No

The virtual private cloud (VPC) ID. If you specify VpcId and VSwitchId, a default mount target is preconfigured when the file system is created.

This property is required if FileSystemType is set to cpfs.

Bandwidth

Integer

No

No

The maximum throughput of the file system.

This property is required if FileSystemType is set to cpfs. The value of Bandwidth varies based on the value of Capacity. For more information, visit the CPFS buy page.

Unit: Mbit/s.

VSwitchId

String

No

No

The vSwitch ID. If you specify VpcId and VSwitchId, a default mount target is preconfigured when the file system is created.

This property is required if FileSystemType is set to cpfs.

Duration

Integer

No

No

The subscription duration of the file system.

This property is required if ChargeType is set to Subscription. If you do not renew a subscription file system when it expires, the file system is automatically released. Valid values:

  • 1

  • 2

  • 3

  • 6

  • 12

  • 36

Unit: month.

ChargeType

String

No

No

The billing method of the file system.

Valid values:

  • PayAsYouGo

  • Subscription

Tags syntax

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]  

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The key of the tag.

The tag key must be 1 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Value

String

No

No

The value of the tag.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Return values

Fn::GetAtt

FileSystemId: the ID of the file system.

Examples

  • YAML format

    ROSTemplateFormatVersion: '2015-09-01'
    Description: Test NAS FileSystem
    Parameters: {}
    Resources:
      FileSystem:
        Type: ALIYUN::NAS::FileSystem
        Properties:
          ProtocolType: NFS
          StorageType: Capacity
    Outputs:
      FileSystemId:
        Description: ID of the file system created
        Value:
          Fn::GetAtt:
            - FileSystem
            - FileSystemId
  • JSON format

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Description": "Test NAS FileSystem",
      "Parameters": {
      },
      "Resources": {
        "FileSystem": {
          "Type": "ALIYUN::NAS::FileSystem",
          "Properties": {
            "ProtocolType": "NFS",
            "StorageType": "Capacity"
          }
        }
      },
      "Outputs": {
        "FileSystemId": {
          "Description": "ID of the file system created",
          "Value": {
            "Fn::GetAtt": [
              "FileSystem",
              "FileSystemId"
            ]
          }
        }
      }
    }

For more examples, visit NAS.json and NAS.yml. In the examples, the following resource types are used: ALIYUN::NAS::FileSystem, ALIYUN::NAS::AccessGroup, ALIYUN::NAS::AccessRule, and ALIYUN::NAS::MountTarget.