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 DescribeDataFlowTasks to query the task execution status. The time required for a task depends on the amount of data to be imported or exported. If a large amount of data is involved, split the data into multiple tasks.
You can create a data flow task only on a data flow that is 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 path of the file 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 DescribeDataFlowTasks to query the task execution status. The time required for a task depends on the amount of data to be imported or exported. If a large amount of data is involved, split the data into multiple tasks.
You can create a data flow task only on a data flow that is in the Running state.
When you create an export task, make sure that the total length of the absolute path of the file to be exported from CPFS for Lingjun does not exceed 1,023 characters.
CPFS for Lingjun supports two task types: batch tasks and streaming tasks. For more information, see Task type overview.
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 |
When you specify SrcTaskId, enter the data flow task ID. The system copies the TaskAction, DataType, and EntryList parameter information from the specified data flow task, and you do not need to specify these parameters separately. Note
Data flow streaming tasks are not supported. |
task-29ee8e890f45**** |
| TaskAction |
string |
No |
The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The 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 value of RequestId as the value of ClientToken. The value of RequestId may be different for each API request. |
123e4567-e89b-12d3-a456-42665544**** |
| DataType |
string |
No |
Specifies whether to perform a dry run. A dry run checks parameter validity, verifies inventory, and performs other checks without actually creating the instance or incurring fees. Valid values:
|
false |
| Directory |
string |
No |
The data flow node type. 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. |
Import |
| EntryList |
string |
No |
The type of data on which the data flow task operates. Valid values:
|
Metadata |
| DryRun |
boolean |
No |
The source directory of the data. Limits:
Note
StreamImport and StreamExport are supported only in CPFS for Lingjun 2.6.0 and later. |
/path_in_cpfs/ |
| ClientToken |
string |
No |
The list of files on which the data flow task is executed. Limits:
|
["/path_in_cpfs/file1", "/path_in_cpfs/file2"] |
| ConflictPolicy |
string |
No |
The OSS directory that contains CSV files whose content specifies the data to be synchronized. Limits:
Note
|
/test_oss_path/ |
| DstDirectory |
string |
No |
Filters directories under the specified directory and transfers the content of the included folders. Note
|
["/test/","/test1/"] |
| CreateDirIfNotExist |
boolean |
No |
The target 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/ |
| Includes |
string |
No |
Specifies whether to enable automatic creation of the folder if it does not exist. Valid values:
Note
|
false |
| TransferFileListPath |
string |
No |
The conflict policy for files with the same name. Valid values:
Note
This parameter is required when the file system type is CPFS for Lingjun. |
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 this operation are not met. |
| 403 | OperationDenied.DataFlowNotSupported | The operation is not supported. | The file system does not support dataflow. |
| 404 | InvalidParameter.InvalidFormat | The EntryList format is invalid. | The format of the specified EntryList does not meet the requirements. |
| 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 to be copied is invalid. |
| 404 | InvalidSrcTaskId.TaskIdNotFound | Source task ID is not found. | The specified task ID to be copied does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.