DescribeDataFlowTasks

Updated at:
Copy as MD

Queries the details of data flow tasks.

Operation description

Only CPFS 2.2.0 and later, and CPFS for Lingjun 2.4.0 and later support querying data flow tasks. You can view the version information on the file system details page in the console.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

nas:DescribeDataFlowTasks

get

*DataFlow

acs:nas:{#regionId}:{#accountId}:filesystem/{#filesystemId}

None None

Request parameters

Parameter

Type

Required

Description

Example

FileSystemId

string

Yes

The ID of the file system.

  • General-purpose CPFS: must start with cpfs-, for example, cpfs-099394bd928c****.

  • CPFS for Lingjun: must start with bmcpfs-, for example, bmcpfs-290w65p03ok64ya****.

bmcpfs-290w65p03ok64ya****

Filters

array<object>

No

The collection of filter keys.

object

No

Key

string

No

The name of the filter key.

Valid values:

  • DataFlowIds: Filters by data flow ID.

  • TaskIds: Filters by data flow task ID.

  • Originator: Filters by the originator of the data flow task.

  • TaskActions: Filters by the type of the data flow task.

  • DataTypes: Filters by the data type of the data flow task.

  • Status: Filters by the data flow status.

  • CreateTimeBegin: Filters data flow tasks created after a specified time.

  • CreateTimeEnd: Filters data flow tasks created before a specified time.

  • StartTimeBegin: Filters data flow tasks started after a specified time.

  • StartTimeEnd: Filters data flow tasks started before a specified time.

  • EndTimeBegin: Filters data flow tasks ended after a specified time.

  • EndTimeEnd: Filters data flow tasks ended before a specified time.

Valid values:

  • Status :

    Filters by the data flow status.

  • TaskIds :

    Filters by data flow task ID.

  • Originator :

    Filters by the originator of the data flow task.

  • CreateTimeEnd :

    Filters data flow tasks created before a specified time.

  • EndTimeBegin :

    Filters data flow tasks ended after a specified time.

  • DataFlowIds :

    Filters by data flow ID.

  • StartTimeEnd :

    Filters data flow tasks started before a specified time.

  • TaskActions :

    Filters by the type of the data flow task.

  • EndTimeEnd :

    Filters data flow tasks ended before a specified time.

  • StartTimeBegin :

    Filters data flow tasks started after a specified time.

  • CreateTimeBegin :

    Filters data flow tasks created after a specified time.

  • DataTypes :

    Filters by the data type of the data flow task.

DataFlowIds

Value

string

No

The value of the filter key. This parameter does not support wildcards.

  • When Key is set to DataFlowIds, Value is set to a data flow ID or a part of a data flow ID. You can specify one or more data flow IDs. A maximum of 10 data flow IDs can be specified. Example: df-194433a5be31**** or df-194433a512a2****,df-234533a5be31****.

  • When Key is set to TaskId, Value is set to a data flow task ID or a part of a data flow task ID. You can specify one or more data flow task IDs. A maximum of 10 data flow task IDs can be specified. Example: task-38aa8e890f45**** or task-38aa8e890f45****,task-29ae8e890f45****.

  • When Key is set to TaskActions, Value is set to the type of the data flow task. Valid values: Import, Export, Evict, Inventory, StreamImport, and StreamExport. Combined queries are supported. Currently, 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.

  • When Key is set to DataTypes, Value is set to the data type of the data flow task. Valid values: MetaAndData, Metadata, and Data. Combined queries are supported.

  • When Key is set to Originator, Value is set to the originator of the data flow task. Valid values: User and System.

  • When Key is set to Status, Value is set to the status of the data flow task. Valid values: Pending, Executing, Failed, Completed, Canceling, and Canceled. Combined queries are supported.

  • When Key is set to CreateTimeBegin, Value is set to the minimum creation time of the data flow task. Format: yyyy-MM-ddThh:mmZ.

  • When Key is set to CreateTimeEnd, Value is set to the maximum creation time of the data flow task. Format: yyyy-MM-ddThh:mmZ.

  • When Key is set to StartTimeBegin, Value is set to the minimum start time of the data flow task. Format: yyyy-MM-ddThh:mmZ.

  • When Key is set to StartTimeEnd, Value is set to the maximum start time of the data flow task. Format: yyyy-MM-ddThh:mmZ.

  • When Key is set to EndTimeBegin, Value is set to the minimum end time of the data flow task. Format: yyyy-MM-ddThh:mmZ.

  • When Key is set to EndTimeEnd, Value is set to the maximum end time of the data flow task. Format: yyyy-MM-ddThh:mmZ.

df-194433a5be31****

NextToken

string

No

The token used to retrieve the next page of results when the returned results are truncated.

TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0=

MaxResults

integer

No

The maximum number of results to return per query.

Valid values: 10 to 100.

Default value: 20.

20

WithReports

boolean

No

Specifies whether to query report information.

  • True: Queries reports. This is the default value.

  • False: Does not query reports.

Note
  • Setting this parameter to false can speed up the query.

  • This parameter is supported only by CPFS for Lingjun.

True

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

2D69A58F-345C-4FDE-88E4-BF518948****

NextToken

string

The token used to retrieve the next page of results when the returned results are truncated.

TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0=

TaskInfo

object

Task

array<object>

The collection of data flow task information.

array<object>

FilesystemId

string

The ID of the file system.

bmcpfs-290w65p03ok64ya****

DataFlowId

string

The ID of the data flow.

df-194433a5be31****

TaskId

string

The ID of the data flow task.

task-38aa8e890f45****

SourceStorage

string

The access address of the source storage. Format: <storage type>://[<account id>:]<path>.

where:

  • storage type: Currently, only oss is supported.

  • account id: The UID of the account to which the source storage belongs.

  • path: The name of the OSS bucket. Limits:

    • The name can contain only lowercase letters, digits, and hyphens (-), and must start and end with a lowercase letter or a digit.

    • The name can be up to 128 characters in length.

    • The name must be encoded in UTF-8.

Note
  • The OSS bucket must already exist in the region.

  • The account id parameter is supported only in CPFS for Lingjun 2.6.0 and later.

oss://178321033379****:bucket-01

FileSystemPath

string

The path of the fileset in the CPFS file system.

Limits:

  • The path must be 2 to 1,024 characters in length.

  • The path must be encoded in UTF-8.

  • The path must start and end with a forward slash (/).

  • The directory must be a fileset directory on CPFS.

Note

This parameter is supported only by CPFS.

/a/b/c/

Originator

string

The originator of the data flow task. Valid values:

  • User: The user is the originator of the task.

  • System: The task is an automatic update task initiated by CPFS based on the automatic update interval.

Note

This parameter is supported only by CPFS.

User

TaskAction

string

The type of the data flow task. Valid values:

  • Import: Imports specified data from the source storage to CPFS.

  • Export: Exports specified data from CPFS to the source storage.

  • StreamImport: Imports specified data from the source storage to CPFS as a streaming task.

  • StreamExport: Exports specified data from CPFS to the source storage as a streaming task.

  • Evict: Releases the data blocks of a file in CPFS. After the data blocks are released, only the metadata of the file is retained in CPFS. You can still query the file, but its data blocks are cleared and no longer consume storage capacity in CPFS. When the file data is accessed, it is loaded on demand from the source storage.

  • Inventory: Retrieves the inventory of files managed by data flow in CPFS, which provides the caching status of the files in the data flow.

Note

StreamImport and StreamExport are supported only in CPFS for Lingjun 2.6.0 and later.

Import

DataType

string

The data type operated by the data flow task. Valid values:

  • Metadata: The metadata of files, including attribute information such as timestamp, ownership, and permission. If you select Metadata, only the metadata of the files is imported. Users can only see the files, but when the file data is accessed, the data is loaded on demand from the source storage.

  • Data: The data blocks of files.

  • MetaAndData: The metadata and data blocks of files.

Note

CPFS for Lingjun supports only the MetaAndData type.

MetaAndData

Progress

integer

The progress of the data flow task. The number of operations that have been executed for the current data flow task.

50

Status

string

The status of the data flow task. Valid values:

  • Pending: The data flow task is created and queued, but has not started execution.

  • Executing: The data flow task is being executed.

  • Failed: The data flow task failed. You can view the data flow task report to check the cause of the failure.

  • Completed: The data flow task is completed. You can view the data flow task report to verify that all files have been transferred correctly.

  • Canceled: The data flow task is canceled and not completed.

  • Canceling: The data flow task is being canceled.

Failed

ReportPath deprecated

string

The path where the data flow task report is saved in the CPFS file system.

  • For CPFS, the task report is generated in the .dataflow_report directory of the CPFS file system.

  • For CPFS for Lingjun, an OSS download link is returned. You can download the task report by using the link.

/path_in_cpfs/reportfile.cvs

CreateTime

string

The time when the task was created. The time follows the ISO 8601 standard. Format: yyyy-MM-dd HH:mm:ss.

2021-08-04 18:27:35

StartTime

string

The time when the task started execution. The time follows the ISO 8601 standard. Format: yyyy-MM-dd HH:mm:ss.

2021-08-04 18:27:35

EndTime

string

The time when the task ended. The time follows the ISO 8601 standard. Format: yyyy-MM-dd HH:mm:ss.

2021-08-04 18:27:35

FsPath

string

The path of the smart directory.

/aa/

ConflictPolicy

string

The conflict policy for files with the same name.

  • SKIP_THE_FILE: Skips files with the same name.

  • KEEP_LATEST: Compares the update time and retains the latest version.

  • OVERWRITE_EXISTING: Forcibly overwrites files with the same name.

Valid values:

  • KEEP_LATEST :

    Compares the update time and retains the latest version.

  • OVERWRITE_EXISTING :

    Forcibly overwrites files with the same name.

  • SKIP_THE_FILE :

    Skips files with the same name.

KEEP_LATEST

Directory

string

The directory where the data flow task is executed.

/path_in_cpfs/

DstDirectory

string

The destination directory mapped by the data flow task.

/path_in_cpfs/

ErrorMsg

string

The cause of the task exception.

Note

If this field is not returned or is empty, no error message exists.

{"ErrorKey":"PATH_NOT_ACCESSIBLE","ErrorDetail":"lstat /cpfs/370lx1ev9ss27o****/test/abcdfnotfound: no such file or directory"}

ProgressStats

object

The progress information of the data flow task.

FilesTotal

integer

The number of files scanned in the source.

3

FilesDone

integer

The number of files for which data flow is completed, including skipped files.

3

ActualFiles

integer

The actual number of files transferred.

3

BytesTotal

integer

The amount of data scanned in the source. Unit: bytes.

131092971520

BytesDone

integer

The amount of data for which data flow is completed, including skipped data. Unit: bytes.

131092971520

ActualBytes

integer

The actual amount of data transferred. Unit: bytes.

131092971520

RemainTime

integer

The estimated remaining time for completion. Unit: seconds.

437

AverageSpeed

integer

The average transfer speed. Unit: Byte/s.

342279299

ScanFinished

boolean

Specifies whether the scan is complete. This parameter is valid only for executing tasks.

Reports

object

Report

array<object>

The list of reports.

Note
  • Streaming tasks do not support reports.

  • When WithReport is set to true, this parameter returns the report data for CPFS for Lingjun.

  • Only CPFS for Lingjun supports the WithReport parameter.

object

Name

string

The name of the report.

  • CPFS:

    TotalFilesReport: The task report.

  • CPFS for Lingjun:

    • FailedFilesReport: The report of failed files.

    • SkippedFilesReport: The report of skipped files.

    • SuccessFilesReport: The report of successful files.

TotalFilesReport

Path

string

The link to the report.

https://a-hbr-temp-cn-hangzhou-staging.oss-cn-hangzhou.aliyuncs.com/temp/report/162319438359****/job-000bb6fwqficjbxk****/job-000bb6fwqficjbxk****_failed.zip?Expires=1721201422&OSSAccessKeyId=LTA****************&Signature=Fp%2BvauORTIVxooXY2tec6z0T%2Bp4%3D

Includes

string

Filters directories under the directory and transfers the contents of the folders within the filtered directories.

Note

This feature is supported only by CPFS for Lingjun.

["/test/","/test1/"]

TransferFileListPath

string

Specifies an OSS directory and synchronizes data based on the content of the CSV file in the OSS directory.

Note

This feature is supported only by CPFS for Lingjun.

/path_in_cpfs/

EntryList

string

The list of files for the data flow task.

Limits:

  • The list must be encoded in UTF-8.

  • The total length of the file list must be less than 64 KB.

  • The file list must be in JSON format.

  • The path of a single file must be 1 to 1,023 characters in length and must start with a forward slash (/).

  • When TaskAction is set to Import, each element in the list represents an OSS object name.

  • When TaskAction is set to Export, each element in the list represents a CPFS file path.

Note

Directory, EntryList, and TransferFileListPath are mutually exclusive parameters. You can specify only one of them.

["/path_in_cpfs/file1", "/path_in_cpfs/file2"]

Examples

Success response

JSON format

{
  "RequestId": "2D69A58F-345C-4FDE-88E4-BF518948****",
  "NextToken": "TGlzdFJlc291cmNlU****mVzJjE1MTI2NjY4NzY5MTAzOTEmMiZORnI4NDhVeEtrUT0=",
  "TaskInfo": {
    "Task": [
      {
        "FilesystemId": "bmcpfs-290w65p03ok64ya****",
        "DataFlowId": "df-194433a5be31****",
        "TaskId": "task-38aa8e890f45****",
        "SourceStorage": "oss://178321033379****:bucket-01",
        "FileSystemPath": "/a/b/c/",
        "Originator": "User",
        "TaskAction": "Import",
        "DataType": "MetaAndData ",
        "Progress": 50,
        "Status": "Failed",
        "ReportPath": "/path_in_cpfs/reportfile.cvs",
        "CreateTime": "2021-08-04 18:27:35",
        "StartTime": "2021-08-04 18:27:35",
        "EndTime": "2021-08-04 18:27:35",
        "FsPath": "/aa/",
        "ConflictPolicy": "KEEP_LATEST",
        "Directory": "/path_in_cpfs/",
        "DstDirectory": "/path_in_cpfs/\n",
        "ErrorMsg": "{\"ErrorKey\":\"PATH_NOT_ACCESSIBLE\",\"ErrorDetail\":\"lstat /cpfs/370lx1ev9ss27o****/test/abcdfnotfound: no such file or directory\"}",
        "ProgressStats": {
          "FilesTotal": 3,
          "FilesDone": 3,
          "ActualFiles": 3,
          "BytesTotal": 131092971520,
          "BytesDone": 131092971520,
          "ActualBytes": 131092971520,
          "RemainTime": 437,
          "AverageSpeed": 342279299,
          "ScanFinished": false
        },
        "Reports": {
          "Report": [
            {
              "Name": "TotalFilesReport",
              "Path": "https://a-hbr-temp-cn-hangzhou-staging.oss-cn-hangzhou.aliyuncs.com/temp/report/162319438359****/job-000bb6fwqficjbxk****/job-000bb6fwqficjbxk****_failed.zip?Expires=1721201422&OSSAccessKeyId=LTA****************&Signature=Fp%2BvauORTIVxooXY2tec6z0T%2Bp4%3D"
            }
          ]
        },
        "Includes": "[\"/test/\",\"/test1/\"]\n",
        "TransferFileListPath": "/path_in_cpfs/\n",
        "EntryList": "[\"/path_in_cpfs/file1\", \"/path_in_cpfs/file2\"]"
      }
    ]
  }
}

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 InvalidFilesystemVersion.NotSupport This Api does not support this fileSystem version. This Api does not support this fileSystem version.
403 OperationDenied.DataFlowNotSupported The operation is not supported. The file system does not support data flows.
404 InvalidParameter.InvalidNextToken The specified NextToken is invaild.
404 InvalidFileSystem.NotFound The specified file system does not exist. The specified file system does not exist.
404 InvalidDataFlow.NotFound The specified data flow does not exist. The specified data flow does not exist.
404 InvalidParameter.InvalidMaxResults The specified MaxResults is invalid. The specified MaxResults parameter is invalid.
404 InvalidFilterParam The specified Filter.N.Key is invalid. The specified Filter.N.Key parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.