tencent cloud

Feedback

CreateFileSystem

Last updated: 2023-06-26 16:48:07

1. API Description

Domain name for API request: chdfs.tencentcloudapi.com.

This API is used to create a file system (asynchronously).

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateFileSystem.
Version Yes String Common Params. The value used for this API: 2020-11-12.
Region No String Common Params. This parameter is not required for this API.
FileSystemName Yes String File system name
CapacityQuota Yes Integer File system capacity (in bytes), which can range from 1 GB to 1 PB and must be an integer multiple of 1 GB
PosixAcl Yes Boolean Whether to verify POSIX ACL
Description No String File system description, which is an empty string by default
SuperUsers.N No Array of String List of superuser names, which is an empty array by default
RootInodeUser No String Username of the root directory Inode, which is hadoop by default
RootInodeGroup No String Group name of the root directory Inode, which is supergroup by default
EnableRanger No Boolean Whether to enable verification of Ranger service addresses
RangerServiceAddresses.N No Array of String List of Ranger service addresses (empty array by default)
Tags.N No Array of Tag Multiple resource tags, which can be an empty array

3. Output Parameters

Parameter Name Type Description
FileSystem FileSystem File system
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Creating a file system

This example shows you how to create a file system.

Input Example

https://chdfs.tencentcloudapi.com/?Action=CreateFileSystem
&FileSystemName=test
&Description=test
&CapacityQuota=1073741824
&SuperUsers.0=hadoop
&PosixAcl=true
&RootInodeUser=hadoop
&RootInodeGroup=supergroup
&<Common request parameters>

Output Example

{
    "Response": {
        "FileSystem": {
            "AppId": 1251006373,
            "FileSystemName": "test",
            "Description": "test",
            "Region": "ap-guangzhou",
            "FileSystemId": "f4mhaqkciq0",
            "CreateTime": "2019-07-30T16:51:41+08:00",
            "BlockSize": 4194304,
            "CapacityQuota": 1073741824,
            "SuperUsers": [
                "hadoop"
            ],
            "PosixAcl": true,
            "Status": 1,
            "EnableRanger": false,
            "RangerServiceAddresses": [
                "127.0.0.1:8080"
            ]
        },
        "RequestId": "ecba2ede-de08-41d5-99cc-b5444912b7f2"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.
FailedOperation.AccountInsufficientBalance The account balance is insufficient.
FailedOperation.AccountUnauthenticated The account identity is not verified.
InternalError Internal error.
InvalidParameter Incorrect parameter.
InvalidParameterValue Incorrect parameter value.
InvalidParameterValue.InvalidCapacityQuota Incorrect parameter value: CapacityQuota.
InvalidParameterValue.InvalidDescription Incorrect parameter value: Description.
InvalidParameterValue.InvalidFileSystemName Incorrect parameter value: FileSystemName.
LimitExceeded The quota limit is exceeded.
MissingParameter Missing parameter.
ResourceNotFound The resource does not exist.
ResourceUnavailable The resource is unavailable.
UnauthorizedOperation Unauthorized operation.