Create file system
Updated at:2025-11-11
Description
- Create a CFS file system and retrieve the assigned FileSystem ID.
- Billing type: Postpay.
Request
Request structure
Plain Text
1POST /v{version}/cfs HTTP/1.1
2Host: cfs.bj.baidubce.com
3Authorization: authorization string
4
5{
6 "fsName": name,
7 "zone": zonB,
8 "type": type,
9 "protocol": protocol
10 "tags": [
11 {"tagKey": "aaa", "tagValue": "bbb"}
12 ]
13 "capacityQuota": 1075838976
14}
Request headers: No special headers beyond common headers
Request parameters
| Parameter name | Types | Whether required | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | The current API version number is 1. |
| fsName | String | Yes | RequestBody | Choose a FileSystem name that is easy to remember. It should be 1–65 bytes long, start with a letter, and may include letters, numbers, and the characters -_/. |
| zone | String | Yes | RequestBody | Specify the availability zone where the FileSystem will be located, such as zoneB. |
| type | String | No | RequestBody | File system type: 1.cap (capacity CFS) 2. ssd (performance) The Capacity CFS is the current default value |
| protocol | String | No | RequestBody | Protocol type: 1. NFS 2. SMB, with NFS as the default. |
| tags | List<Tag> | No | RequestBody | FileSystem tag |
| capacityQuota | uint64 | No | RequestBody | Set the file system’s quota value: A failed setting or a value of 0 implies no custom hard limit. Otherwise, it indicates the maximum capacity (minimum of 1 GB, maximum of 10 PB), measured in bytes. |
Response
Response status code: Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in Error Codes
Response headers: No special headers beyond common headers
Response parameters
| Parameter name | Types | Description |
|---|---|---|
| fsId | String | FileSystem ID: This ID is required for any subsequent operations related to this instance. |
Example
Request:
Plain Text
1POST /v1/cfs HTTP/1.1
2HOST cfs.bj.baidubce.com
3Authorization bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4{
5 "fsName":"cfs-for-test"
6}
Response:
Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7{
8 "fsId":"cfs-jVDkWrBBoj"
9}
