All Products
Search
Document Center

PolarDB:DescribeActiveOperationTask

Last Updated:Nov 04, 2026

Queries the details of active operation 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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Region

string

Yes

The region ID. You can call the DescribeRegions operation to query the regions and zones supported by PolarDB.

Note
  • You can enter all to query all pending tasks under your account.

  • When Region is set to all, TaskType must also be set to all.

all

TaskType

string

Yes

The task type. You can call the [DescribeActiveOperationTaskType](还未生成 ID) operation to query the task types of pending tasks.

Note
  • You can also enter all to query all pending tasks under your account.

  • When TaskType is set to all, Region must also be set to all.

all

IsHistory

integer

No

Specifies whether to return historical tasks. Valid values:

  • 0: Returns current tasks.

  • 1: Returns historical tasks.

Default value: 0.

1

PageSize

integer

No

The number of entries per page. Valid values: 30, 50, and 100.

Default value: 30.

30

PageNumber

integer

No

The page number. The value must be greater than 0 and less than or equal to the maximum value of the Integer data type. Default value: 1.

1

ProductId

string

No

The commodity ID.

polardb

Response elements

Element

Type

Description

Example

object

Items

array<object>

The list of tasks.

object

CreatedTime

string

The time when the task was created. The time follows the yyyy-MM-ddTHH:mmZ format (UTC).

2020-06-09T22:00:42Z

DbType

string

The database engine type.

polardb_mysql

DbVersion

string

The database engine version.

8.0

Deadline

string

The deadline for adjusting the task execution time. The time follows the yyyy-MM-ddTHH:mmZ format (UTC).

2020-06-11T15:59:59Z

Id

integer

The task ID.

111111

InsName

string

The cluster name.

pc-*****************

ModifiedTime

string

The time when the task was modified. The time follows the yyyy-MM-ddTHH:mmZ format (UTC).

2020-06-09T22:00:42Z

PrepareInterval

string

The preparation time before the transient disconnection. The time follows the HH:mm:ss format.

04:00:00

Region

string

The region where the task is located.

cn-hangzhou

ResultInfo

string

The task execution result.

1

StartTime

string

The time when the task is executed in the background. The time follows the yyyy-MM-ddTHH:mmZ format (UTC).

2020-06-09T18:00:00Z

Status

integer

The task status.

  • If you set IsHistory to 0, the details of the pending task status are returned. Valid values:

    • 2: waiting for the user to set the task start time

    • 3: waiting to be processed

    • 4: the task is being processed

  • If you set IsHistory to 1, the details of the historical task status are returned. Valid values:

    • 5: the task is completed and executed successfully

    • 6: the task is completed but failed

    • 7: the task is canceled

5

SwitchTime

string

The time when the transient disconnection occurs. The time follows the yyyy-MM-ddTHH:mmZ format (UTC).

2020-06-09T22:00:00Z

TaskParams

string

The task parameters.

{\"action\": \"UpgradeDBVersion\", \"check_method\": \"check_cpu_usage\", \"params\": {\"RelativeDbtype\": \"maxscale\", \"DBInstanceName\": \"pc-*************\", \"User_ID\": \"11111\", \"UID\": \"1406926474******\", \"UpgradePolicy\": \"hot\"}}"

TaskType

string

The task type.

rds_apsaradb_upgrade

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

30

RequestId

string

The request ID.

ED2BD080-F9D9-4822-ACBB-AE5D87******

TotalRecordCount

integer

The total number of entries.

4

Examples

Success response

JSON format

{
  "Items": [
    {
      "CreatedTime": "2020-06-09T22:00:42Z",
      "DbType": "polardb_mysql",
      "DbVersion": "8.0",
      "Deadline": "2020-06-11T15:59:59Z",
      "Id": 111111,
      "InsName": "pc-*****************",
      "ModifiedTime": "2020-06-09T22:00:42Z",
      "PrepareInterval": "04:00:00",
      "Region": "cn-hangzhou",
      "ResultInfo": "1",
      "StartTime": "2020-06-09T18:00:00Z",
      "Status": 5,
      "SwitchTime": "2020-06-09T22:00:00Z",
      "TaskParams": "{\\\"action\\\": \\\"UpgradeDBVersion\\\", \\\"check_method\\\": \\\"check_cpu_usage\\\", \\\"params\\\": {\\\"RelativeDbtype\\\": \\\"maxscale\\\", \\\"DBInstanceName\\\": \\\"pc-*************\\\", \\\"User_ID\\\": \\\"11111\\\", \\\"UID\\\": \\\"1406926474******\\\", \\\"UpgradePolicy\\\": \\\"hot\\\"}}\"",
      "TaskType": "rds_apsaradb_upgrade"
    }
  ],
  "PageNumber": 1,
  "PageSize": 30,
  "RequestId": "ED2BD080-F9D9-4822-ACBB-AE5D87******",
  "TotalRecordCount": 4
}

Error codes

HTTP status code

Error code

Error message

Description

400 RequiredParam.NotFound Required input param is not found. The specified parameter does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.