tencent cloud

Cloud File Storage

CreateDataFlow

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-11-26 16:30:28

1. API Description

Domain name for API request: cfs.intl.tencentcloudapi.com.

This API is used to create a data flow.

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: CreateDataFlow.
Version Yes String Common Params. The value used for this API: 2019-07-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
FileSystemId Yes String

File system ID, which can be obtained through the API for querying file systems DescribeCfsFileSystems.

SourceStorageType Yes String

Source data type. Valid values: S3_COS and S3_L5.

SourceStorageAddress Yes String

Source storage address

SourcePath Yes String

Source path

TargetPath Yes String

Target path in the file system specified when setting data flow. It must start with /cfs/ and represents a logical path inside the file storage instance, not a local mount point path.
Example:

  • If the CFS root directory / is mounted, and you need to map the source directory on object storage to test1/test2 under the mount path, the value of this parameter is /cfs/test1/test2.
  • If the CFS subdirectory /subdir is mounted, and you need to map the source directory on object storage to test1/test2 under the mount path, the value of this parameter is /cfs/subdir/test1/test2.
SecretId Yes String

Secret ID

SecretKey Yes String

Secret key

DataFlowName No String

Data flow name. It supports up to 64 characters, including Chinese characters, digits, underscores (_), and hyphens (-).

AutoRefresh No Integer

0: Automatic update disabled. 1: Automatic update enabled.

UserKafkaTopic No String

Topic parameter used by KafkaConsumer for consumption

ServerAddr No String

Service address. Example: kafkaconsumer-ap-beijing.cls.tencentyun.com:9095

UserName No String

Kafka consumer username. Example: name

Password No String

Kafka consumer password. Default value: ${SecretId}#${SecretKey}.

3. Output Parameters

Parameter Name Type Description
DataFlowId String

Data flow management ID

RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Creating a Data Flow

Input Example

POST / HTTP/1.1
Host: cfs.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateDataFlow
<Common request parameters>

{
    "FileSystemId": "cfs-44d53b63e",
    "SourceStorageType": "S3_COS",
    "SourceStorageAddress": "https://aileen-data-flow-1251000004.cos.ap-guangzhou.myqcloud.com",
    "SourcePath": "test3",
    "TargetPath": "/cfs/test11",
    "SecretId": "AKIDbzzYj65vue75sC1yg8P4cyBHBpLk",
    "SecretKey": "onE8m9NN82ik6h3FCvXt2uc3Sjp",
    "DataFlowName": "abctest"
}

Output Example

{
    "Response": {
        "DataFlowId": "cfs-dataflow-4f827203",
        "RequestId": "c5369436-a47c-4504-9cfa-f1f40c2c969f"
    }
}

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
InvalidParameterValue.InvalidDataFlowName Invalid data flow name.
InvalidParameterValue.InvalidDataFlowSourceInfo Parameter value error: invalid data flow source information. check the key and path.
InvalidParameterValue.InvalidDataFlowSourceStorageType Parameter value error: data flow source storage type invalid.
InvalidParameterValue.InvalidDataFlowTargetPath Parameter value error: data flow target path invalid.
InvalidParameterValue.InvalidFileSystemId FileSystemId is invalid.
InvalidParameterValue.InvalidLifecycleDataTaskType Parameter value error: lifecycle task type invalid.
ResourceInsufficient.DataFlowLimitExceeded Insufficient resources: the number of data flows exceeds the limit.
ResourceNotFound.FileSystemNotFound The file system does not exist.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック