All Products
Search
Document Center

AnalyticDB:DescribeLoadTasksRecords

Last Updated:Jan 13, 2026

Retrieves the details of asynchronous import and export tasks.

Operation description

For more information about how to asynchronously submit import and export tasks, see Asynchronously submit import and export tasks.

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

adb:DescribeLoadTasksRecords

get

DBCluster

acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

No

The region ID.

Note

Call the DescribeRegions operation to query the IDs of regions that are supported by AnalyticDB for MySQL.

cn-shanghai

DBClusterId

string

Yes

The cluster ID.

Note

Call the DescribeDBClusters operation to query the details of all AnalyticDB for MySQL clusters in a specific region, including cluster IDs.

am-bp2590j****

StartTime

string

Yes

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

Note

Set the start time to a point in time within the last 30 days.

2021-05-18T06:00:00Z

EndTime

string

Yes

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

2021-05-18T06:30:00Z

DBName

string

No

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

adb_demo

PageSize

integer

No

The number of entries to return on each page. Valid values:

  • 30 (Default)

  • 50

  • 100

30

PageNumber

integer

No

The page number. The value must be an integer that is greater than 0. The default value is 1.

1

Order

string

No

The order in which to sort the tasks by a specified field. Specify the parameter value as a JSON string. For example: [{"Field":"CreateTime", "Type":"desc"}]

Note
  • Field specifies the field by which to sort the tasks. Valid values: State, CreateTime, DBName, ProcessID, UpdateTime, JobName, and ProcessRows.

  • Type specifies the sorting order. Valid values: Desc (descending) and Asc (ascending). The values are not case-sensitive.

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

State

string

No

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

  • INIT: The task is being initialized.

  • RUNNING: The task is running.

  • FINISH: The task is complete.

  • FAILED: The task has failed.

FINISH

Response elements

Element

Type

Description

Example

object

The parameters.

TotalCount

string

The total number of tasks.

1

PageSize

string

The number of entries on the current page.

30

RequestId

string

The request ID.

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

PageNumber

string

The page number.

1

DBClusterId

string

The cluster ID.

am-bp2590j****

LoadTasksRecords

array<object>

The list of task information.

object

The parameters.

Sql

string

The details of the SQL statement used in the asynchronous import or export task.

insert overwrite into courses_external_table\nselect * from courses

State

string

The task state.

FINISH

CreateTime

string

The start time of the task. The time is accurate to the millisecond and is in the yyyy-MM-ddTHH:mm:ss.SSSZ format.

2021-05-18 18:47:27.0

DBName

string

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

adb_demo

ProcessID

string

The process ID.

2021051818472717201616624903453******

UpdateTime

string

The time when the task state was updated. The time is accurate to the millisecond and is in the yyyy-MM-ddTHH:mm:ss.SSSZ format.

2021-05-18 18:47:31.0

JobName

string

The task ID.

2021051818472717201616624903453******

ProcessRows

integer

The number of data rows processed by the asynchronous import or export task.

6

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.