Creates a data flow task.
Operation description
-
Usage notes for CPFS
Only CPFS 2.2.0 and later support data flow. You can view the version information on the file system details page in the console.
Data flow tasks are executed asynchronously. You can call the DescribeDataFlowTasks operation to query the task execution status. The time required for a task depends on the amount of data to be imported or exported. If the data volume is large, split the data into multiple tasks.
You can create data flow tasks only for data flows in the Running state.
When you manually execute a data flow task, the automatic data update task of the data flow is interrupted and waits.
When you create an export task, make sure that the total length of the absolute paths of the files to be exported from CPFS does not exceed 1,023 characters.
-
Usage notes for CPFS for Lingjun
Only CPFS for Lingjun 2.4.0 and later support data flow. You can view the version information on the file system details page in the console.
Data flow tasks are executed asynchronously. You can call the DescribeDataFlowTasks operation to query the task execution status. The time required for a task depends on the amount of data to be imported or exported. If the data volume is large, split the data into multiple tasks.
You can create data flow tasks only for data flows in the Running state.
When you create an export task, make sure that the total length of the absolute paths of the files to be exported from CPFS for Lingjun does not exceed 1,023 characters.
CPFS for Lingjun supports batch tasks and streaming tasks. For more information, see Task types.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
nas:CreateDataFlowTask |
create |
*DataFlow
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| FileSystemId |
string |
Yes |
The file system ID.
|
cpfs-099394bd928c**** |
| DataFlowId |
string |
Yes |
The data flow ID. |
df-194433a5be31**** |
| SrcTaskId |
string |
No |
The ID of the source data flow task. If you specify SrcTaskId, you must enter a data flow task ID. The system copies the TaskAction, DataType, and EntryList parameters from the specified data flow task. You do not need to specify these parameters separately. Note
Streaming data flow tasks are not supported. |
task-29ee8e890f45**** |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the value is unique among different requests. The client token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence. Note
If you do not specify this parameter, the system automatically uses the RequestId of the API request as the ClientToken. The RequestId of each API request may be different. |
123e4567-e89b-12d3-a456-42665544**** |
| DryRun |
boolean |
No |
Specifies whether to perform a dry run on the creation request. A dry run checks whether the parameters are valid and whether resources are sufficient, but does not create the instance or incur fees. Valid values:
|
false |
| TaskAction |
string |
No |
The type of the data stream node. Valid values:
Note
CPFS for Lingjun supports only Import, Export, StreamImport, and StreamExport. StreamImport and StreamExport are supported only in CPFS for Lingjun 2.6.0 and later. Valid values:
|
Import |
| DataType |
string |
No |
The type of data on which the data flow task operates. Valid values:
Note
When TaskAction is set to Evict, the DataType parameter is required. Valid values:
|
Metadata |
| Directory |
string |
No |
The source directory of the data. Limits:
Note
StreamImport and StreamExport are supported only in CPFS for Lingjun 2.6.0 and later. The Directory, EntryList, and TransferFileListPath parameters are mutually exclusive. You can specify only one of them. |
/path_in_cpfs/ |
| EntryList |
string |
No |
The list of files on which the data flow task is executed. Limits:
Note
The Directory, EntryList, and TransferFileListPath parameters are mutually exclusive. You can specify only one of them. |
["/path_in_cpfs/file1", "/path_in_cpfs/file2"] |
| TransferFileListPath |
string |
No |
The OSS directory. Data is synchronized based on the content of the CSV file in the OSS directory. Limits:
Note
|
/test_oss_path/ |
| Includes |
string |
No |
The directories to be filtered under the specified directory. The content of the folders within the filtered directories is transferred. Note
|
["/test/","/test1/"] |
| DstDirectory |
string |
No |
The destination directory to which the data flow task maps. Limits:
Note
StreamImport and StreamExport are supported only in CPFS for Lingjun 2.6.0 and later. |
/path_in_cpfs/ |
| CreateDirIfNotExist |
boolean |
No |
Specifies whether to enable automatic creation of the folder if it does not exist. Valid values:
Note
|
false |
| ConflictPolicy |
string |
No |
The policy for handling files with the same name. Valid values:
Note
This parameter is required when the file system type is CPFS for Lingjun. Valid values:
|
SKIP_THE_FILE |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
2D69A58F-345C-4FDE-88E4-BF518948**** |
| TaskId |
string |
The data flow task ID. |
task-38aa8e890f45**** |
Examples
Success response
JSON format
{
"RequestId": "2D69A58F-345C-4FDE-88E4-BF518948****",
"TaskId": "task-38aa8e890f45****"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | IllegalCharacters | The parameter contains illegal characters. | The parameter contains illegal characters. |
| 400 | MissingFileSystemId | FileSystemId is mandatory for this action. | The FileSystemId parameter is not specified. |
| 400 | MissingDataFlowId | DataFlowId is mandatory for this action. | The DataFlowId parameter is not specified. |
| 400 | InvalidFilesystemVersion.NotSupport | This Api does not support this fileSystem version. | This Api does not support this fileSystem version. |
| 403 | OperationDenied.InvalidState | The operation is not permitted when the status is processing. | The operation is not permitted when the status is processing. |
| 403 | OperationDenied.DependencyViolation | The operation is denied due to dependancy violation. | The conditions for performing this operation are not met. |
| 403 | OperationDenied.DataFlowNotSupported | The operation is not supported. | The file system does not support data flow. |
| 404 | InvalidParameter.InvalidFormat | The EntryList format is invalid. | The format of the specified EntryList parameter is invalid. |
| 404 | InvalidParameter.SizeTooLarge | The specified EntryList size exceeds 64 KB. | The size of the specified EntryList exceeds 64 KB. |
| 404 | InvalidDataFlow.NotFound | The specified data flow does not exist. | The specified data flow does not exist. |
| 404 | InvalidTaskAction.NotSupported | The task action is not supported. | The specified task type is not supported. |
| 404 | InvalidTaskAction.PermissionDenied | The task action is not allowed. | The specified task type is not allowed, such as system replication. |
| 404 | InvalidSrcTaskId.NotFound | The SrcTaskId is not found. | The specified SrcTaskId does not exist. |
| 404 | InvalidDataType.NotSupported | The data type is not supported. | The specified data type is not supported. |
| 404 | InvalidSrcTaskId.TaskIdInvalid | Source task ID is invalid. | The specified task ID for replication is invalid. |
| 404 | InvalidSrcTaskId.TaskIdNotFound | Source task ID is not found. | The specified task ID for replication does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.