Updated on 2025-11-03 GMT+08:00

Creating a File System

Function

This API is used to create a file system.

URI

POST /v1/{project_id}/sfs-turbo/shares

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

The project ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

The account token.

Content-Type

Yes

String

The MIME type.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

share

Yes

Share object

The parameters for creating a file system.

Table 4 Share

Parameter

Mandatory

Type

Description

availability_zone

Yes

String

The code of the AZ where the file system resides.

description

No

String

The file system description. It can contain 0 to 255 characters.

metadata

No

Metadata object

The file system metadata. The value consists of one or multiple key-value pairs organized as a directory of strings.

name

Yes

String

The file system name. The name can contain 4 to 64 characters and must start with a letter. It can contain letters (case insensitive), digits, hyphens (-), and underscores (_), and cannot contain other special characters.

security_group_id

Yes

String

The security group ID of a tenant in a region.

share_proto

Yes

String

  • Network File System (NFS) is a distributed file system protocol that allows different computers and OSs to share data over a network. You are advised to use NFS file systems with Linux servers.

share_type

Yes

String

The file system type. Valid values are STANDARD and PERFORMANCE. This field is not returned when the file system is being created.

  • For a previous-generation SFS Turbo file system, specify STANDARD for a Standard or Standard-Enhanced file system, and PERFORMANCE for a Performance or Performance-Enhanced file system.

size

Yes

Integer

  • For a previous-generation SFS Turbo file system, the capacity ranges from 500 to 32768, in GiB.

  • For a previous-generation SFS Turbo file system with expand_type="bandwidth" configured under metadata, the capacity ranges from 10240 to 327680, in GiB.

subnet_id

Yes

String

The subnet ID of a tenant in a VPC.

vpc_id

Yes

String

The VPC ID of a tenant in a region.

backup_id

No

String

The backup ID. This parameter is mandatory if you create a file system from a backup.

tags

No

Array of ResourceTag objects

The tag list.

Table 5 Metadata

Parameter

Mandatory

Type

Description

crypt_key_id

No

String

The ID of a KMS professional key, which is used to create an encrypted file system.

expand_type

No

String

The extension type. This parameter is not returned when the file system is being created.

  • Specify bandwidth when you are creating a Standard-Enhanced or Performance-Enhanced file system.

Enumeration values:

  • bandwidth

Table 6 ResourceTag

Parameter

Mandatory

Type

Description

key

Yes

String

The tag key.

It can contain a maximum of 128 characters.

It cannot be left empty and cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_).

value

Yes

String

The tag value.

Each tag value can contain a maximum of 255 characters and can be an empty string.

It cannot contain the following characters: ASCII (0-31), equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (), commas (,), vertical bars (|), and slashes (/). It can contain only letters, digits, hyphens (-), and underscores (_).

Response Parameters

Status code: 202

Table 7 Response body parameters

Parameter

Type

Description

id

String

The ID of the created SFS Turbo file system.

name

String

The name of the created SFS Turbo file system.

status

String

The status of the created SFS Turbo file system.

Example Requests

  • Previous-generation SFS Turbo file system type:

    POST HTTPS://{endpoint}/v1/{project_id}/sfs-turbo/shares
    
    {
      "share" : {
        "name" : "sfs-turbo-test",
        "availability_zone" : "example",
        "security_group_id" : "8c4ebbd0-6edf-4aae-8353-xxx",
        "share_proto" : "NFS",
        "share_type" : "STANDARD",
        "size" : 500,
        "subnet_id" : "b8884abe-f47b-4917-9f6c-xxx",
        "vpc_id" : "d651ea2b-2b20-4c6d-8bbf-xxx"
      }
    }

This example creates an SFS Turbo Standard file system in the AZ whose AZ code is example, with the file system name set to sfs-turbo-test, protocol type to NFS, capacity to 500 GB. The security group ID is 8c4ebbd0-6edf-4aae-8353-xxx, the subnet ID is b8884abe-f47b-4917-9f6c-xxx, and the VPC ID is d651ea2b-2b20-4c6d-8bbf-xxx.

This example creates an SFS Turbo Standard file system in the AZ whose AZ code is example, with the file system name set to sfs-turbo-dedicated-test, protocol type to NFS, capacity to 500 GB. The dedicated storage pool ID is 198f0704-xxx-4d85-xxx-c25caa4d3264, the dedicated ECS flavor is c6.xlarge.2, the security group ID is 8c4ebbd0-6edf-4aae-8353-xxx, the subnet ID is b8884abe-f47b-4917-9f6c-xxx, and the VPC ID is d651ea2b-2b20-4c6d-8bbf-xxx.

This example creates a 125 MB/s/TiB file system in the AZ whose AZ code is example, with the file system name set to sfs-turbo-test, protocol type to NFS, and capacity to 3686GB. The security group ID is 8c4ebbd0-6edf-4aae-8353-xxx, the subnet ID is b8884abe-f47b-4917-9f6c-xxx, and the VPC ID is d651ea2b-2b20-4c6d-8bbf-xxx.

This example creates a 125 MB/s/TiB file system in the AZ whose AZ code is example, with secure transmission enabled, the file system name set to sfs-turbo-test, protocol type to NFS, and capacity to 3686GB. The security group ID is 8c4ebbd0-6edf-4aae-8353-xxx, the subnet ID is b8884abe-f47b-4917-9f6c-xxx, and the VPC ID is d651ea2b-2b20-4c6d-8bbf-xxx.

This example creates a 125 MB/s/TiB for Intelligent Compute file system in the AZ whose AZ code is example, with the file system name set to sfs-turbo-test, protocol type to NFS, and capacity to 61440GB. The security group ID is 8c4ebbd0-6edf-4aae-8353-xxx, the subnet ID is b8884abe-f47b-4917-9f6c-xxx, and the VPC ID is d651ea2b-2b20-4c6d-8bbf-xxx.

This example creates an SFS Turbo file system with cross-AZ DR deployment in the AZ whose AZ code is example, with the file system name set to sfs-turbo-test, protocol type to NFS, and capacity to 61440GB. The security group ID is 8c4ebbd0-6edf-4aae-8353-xxx, the subnet ID is b8884abe-f47b-4917-9f6c-xxx, and the VPC ID is d651ea2b-2b20-4c6d-8bbf-xxx.

Example Responses

Status code: 202

Successful file system creation

{
  "id" : "708c017c-54b5-429a-a098-7692e23fa518",
  "name" : "sfs-turbo-test",
  "status" : "100"
}

Status Codes

Status Code

Description

202

Successful file system creation

Error Codes

See Error Codes.