DescribeLoadTasksRecords

Updated at:
Copy as MD

Queries the details of asynchronous import and export tasks.

Operation description

For more information about asynchronous commit import and export tasks, refer to Asynchronous commit 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

You can call the DescribeRegions operation to query the region IDs supported by AnalyticDB for MySQL Data Warehouse Edition.

cn-shanghai

DBClusterId

string

Yes

The cluster ID.

Note

You can call the DescribeDBClusters operation to query the details of all AnalyticDB for MySQL Data Warehouse Edition clusters in a specified region, including the cluster IDs.

am-bp2590j****

StartTime

string

Yes

The start time of the query. Format: yyyy-MM-ddTHH:mm:ssZ (UTC time).

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 time of the query, which must be later than the start time. Format: yyyy-MM-ddTHH:mm:ssZ (UTC time).

2021-05-18T06:30:00Z

DBName

string

No

The name of the database involved in the import and export task.

adb_demo

PageSize

integer

No

The number of entries per page. Valid values:

  • 30 (default).

  • 50.

  • 100.

30

PageNumber

integer

No

The page number. The value must be a positive integer that does not exceed the maximum value of the Integer data type. Default value: 1.

1

Order

string

No

Sorts tasks in ascending or descending order based on a specified field. The parameter value must be a JSON string. Example: [{"Field":"CreateTime", "Type":"desc"}].

Note
  • Field specifies the name of the field to sort by. Supported fields: State, CreateTime, DBName, ProcessID, UpdateTime, JobName, and ProcessRows.

  • Type specifies the sort order. Valid values: Desc (descending order) and Asc (ascending order). The value is case-insensitive.

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

State

string

No

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

  • INIT: The task is initialized.

  • RUNNING: The task is running.

  • FINISH: The task succeeded.

  • FAILED: The task failed.

FINISH

Response elements

Element

Type

Description

Example

object

The parameter list.

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 parameter list.

Sql

string

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

insert overwrite into courses_external_table\nselect * from courses

State

string

The task status.

FINISH

CreateTime

string

The start time of the task, accurate to milliseconds. Format: yyyy-MM-ddTHH:mm:ss.SSSZ.

2021-05-18 18:47:27.0

DBName

string

The name of the database involved in the import and export task.

adb_demo

ProcessID

string

The process ID.

2021051818472717201616624903453******

UpdateTime

string

The time when the task status was updated, accurate to milliseconds. Format: yyyy-MM-ddTHH:mm:ss.SSSZ.

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 and 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.