Creates a file system.

Precautions

You can call the CreateFileSystem operation to create only pay-as-you-go file systems of the NAS General-purpose type.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description 
Action String Yes CreateFileSystem

The operation that you want to perform. Set the value to CreateFileSystem.

EncryptType Integer Yes 1

Specifies whether to encrypt data. You can use keys that are hosted by Key Management Service (KMS) to encrypt data stored on a file system. Data is automatically decrypted when you access encrypted data. Valid values:

  • 0: specifies that no encryption is applied to data on the file system.
  • 1: specifies that encryption is applied to data on the file system.
ProtocolType String Yes NFS

The protocol type of the file system. Valid values: NFS and SMB.

StorageType String Yes Performance

The type of file system. Valid values: Performance and Capacity.

The maximum capacity of an NAS Performance file system is 1 PB. The maximum capacity of an NAS Capacity file system is 10 PB.

ZoneId String Yes cn-hangzhou-b

The ID of the zone.

Each region has multiple isolated locations known as zones. The power supply and network of each zone are independent. In the same region but different zones, an Elastic Compute Service (ECS) instance can access a file system. We recommend that the zone you specify is the same as the zone where the ECS instance resides. This eliminates extra latency due to cross-zone communication between the file system and the ECS instance.

Description String No balabala

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

Response parameters

Parameter Type Example Description 
RequestId String 98696EF0-1607-4E9D-B01D-F20930B68845

The ID of the request.

FileSystemId String 1ca404a666

The ID of the file system that is created.

Examples

Sample requests

GET https://nas.cn-hangzhou.aliyuncs.com/?Action=CreateFileSystem
&StorageType=Performance
&ProtocolType=NFS
&Description=balabala
&<Common request parameters>

Sample success responses

XML format

<CreateFileSystemResponse>
    <FileSystemId>1ca404a666</FileSystemId>
    <RequestId>98696EF0-1607-4E9D-B01D-F20930B68845</RequestId>
</CreateFileSystemResponse>

JSON format

{
  "RequestId": "98696EF0-1607-4E9D-B01D-F20930B68845",
  "FileSystemId": "1ca404a666"
}

Error codes

For a list of error codes, visit the API Error Center.