All Products
Search
Document Center

AnalyticDB:DescribeLoadTasksRecords

Last Updated:Aug 30, 2024

Queries the information about asynchronous import and export tasks of an AnalyticDB for MySQL cluster.

Operation description

For information about how to asynchronously submit import and export tasks, see Asynchronously submit an import or export task.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
adb:DescribeLoadTasksRecordsget
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-shanghai
DBClusterIdstringYes

The cluster ID.

Note You can call the DescribeDBClusters operation to query the information about all AnalyticDB for MySQL clusters in a region, including cluster IDs.
am-bp2590j****
StartTimestringYes

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note We recommend that you set the query start time to any point in time within 30 days.
2021-05-18T06:00:00Z
EndTimestringYes

The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

2021-05-18T06:30:00Z
DBNamestringNo

The name of the database that is involved in the import or export task.

adb_demo
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberintegerNo

The page number. Pages start from page 1. Default value: 1.

1
OrderstringNo

The order in which to sort the tasks by field. Specify the field and the sort order in the JSON format. Example: [{"Field":"CreateTime", "Type":"desc"}].

Note
  • Field specifies the field that is used to sort the tasks. Valid values of Field: State, CreateTime, DBName, ProcessID, UpdateTime, JobName, and ProcessRows.

  • Type specifies the sort order. Valid values of Type: Desc and Asc. The values are case-insensitive.

[{"Field":"CreateTime", "Type":"desc"}]
StatestringNo

The state of the asynchronous import or export task to be queried. Valid values:

  • INIT: The task is being initialized.
  • RUNNING: The task is running.
  • FINISH: The task is successful.
  • FAILED: The task fails.
FINISH

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountstring

The total number of entries returned.

1
PageSizestring

The number of entries per page.

30
RequestIdstring

The request ID.

C60B05DB-2B77-421A-98E9-92C20E******
PageNumberstring

The page number.

1
DBClusterIdstring

The cluster ID.

am-bp2590j****
LoadTasksRecordsarray<object>

The queried asynchronous import and export tasks.

object

The queried asynchronous import or export task.

Sqlstring

The SQL statement that is used in the asynchronous import or export task.

insert overwrite into courses_external_table\nselect * from courses
Statestring

The state of the task.

FINISH
CreateTimestring

The start time of the task. The time is accurate to milliseconds. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ss.SSSZ format. The time is displayed in UTC.

2021-05-18 18:47:27.0
DBNamestring

The name of the database that is involved in the import or export task.

adb_demo
ProcessIDstring

The process ID.

2021051818472717201616624903453******
UpdateTimestring

The time when the task state was updated. The time is accurate to milliseconds. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ss.SSSZ format. The time is displayed in UTC.

2021-05-18 18:47:31.0
JobNamestring

The task ID.

2021051818472717201616624903453******
ProcessRowslong

The number of rows that are processed in the asynchronous import or export task.

6

Examples

Sample success responses

JSONformat

{
  "TotalCount": "1",
  "PageSize": "30",
  "RequestId": "C60B05DB-2B77-421A-98E9-92C20E******",
  "PageNumber": "1",
  "DBClusterId": "am-bp2590j****",
  "LoadTasksRecords": [
    {
      "Sql": "insert overwrite into courses_external_table\\nselect * from courses",
      "State": "FINISH",
      "CreateTime": "2021-05-18 18:47:27.0",
      "DBName": "adb_demo",
      "ProcessID": "2021051818472717201616624903453******",
      "UpdateTime": "2021-05-18 18:47:31.0",
      "JobName": "2021051818472717201616624903453******",
      "ProcessRows": 6
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-28The Error code has changed. The request parameters of the API has changedView Change Details