Queries the historical task list for PolarDB for MySQL.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeHistoryTasks |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. Note
You can call the DescribeRegions operation to query region information. |
cn-beijing |
| PageSize |
integer |
No |
The number of entries per page. Valid values: 10 to 100. Default value: 10. |
10 |
| PageNumber |
integer |
No |
The page number of the query results. Valid values: positive integers. Default value: 1. |
1 |
| InstanceType |
string |
No |
Currently, only Instance is supported. |
Instance |
| Status |
string |
No |
The task status. Valid values:
Separate multiple statuses with commas (,). Default value: empty, which indicates all statuses. |
Running |
| InstanceId |
string |
No |
The resource ID. Specify this parameter to query tasks for the corresponding resource. Separate multiple IDs with commas (,). A maximum of 30 IDs are supported. Default value: empty, which indicates no restriction. Note
Currently, only cluster IDs are supported. |
pc-2zed3m89cw*** |
| TaskId |
string |
No |
The task ID. Separate multiple task IDs with commas (,). A maximum of 30 IDs are supported. Default value: empty, which indicates no restriction. |
t-0mqi38ho0cgjv*** |
| TaskType |
string |
No |
The task type. Specify this parameter to query tasks of a specific type. Separate multiple types with commas (,). A maximum of 30 types are supported. Default value: empty, which indicates no restriction. |
ChangeVariable |
| FromStartTime |
string |
Yes |
The beginning of the time range for the task start time. Tasks whose start time is later than this time are queried. Specify the time in the ISO 8601 standard in the |
2025-01-02T11:31:03Z |
| ToStartTime |
string |
Yes |
The end of the time range for the task start time. Tasks whose start time is earlier than this time are queried. Specify the time in the ISO 8601 standard in the |
2025-01-03T11:31:03Z |
| FromExecTime |
integer |
No |
The minimum execution duration. Filters tasks whose execution duration is greater than this value. Unit: seconds. Default value: 0, which indicates no restriction. |
0 |
| ToExecTime |
integer |
No |
The maximum execution duration. Filters tasks whose execution duration is not less than this value. Unit: seconds. Default value: 0, which indicates no restriction. |
0 |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-************ |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| PageNumber |
integer |
The page number of the query results. |
1 |
| RequestId |
string |
The request ID. |
F90D7C14-2D1C-5B88-9CD1-23AB2CF89*** |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
string |
The total number of tasks that meet the filter conditions, regardless of pagination. |
2 |
| Items |
array<object> |
The task list. |
|
|
object |
The task object. |
||
| Status |
string |
The task status.
|
Succeed |
| TaskId |
string |
The task ID. |
t-0mqt8qhnw04ipz0*** |
| CurrentStepName |
string |
The name of the current step being executed. An empty value indicates that the task has not started. |
finish_task |
| StartTime |
string |
The task start time. The time is in the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. The time is displayed in UTC. |
2025-03-03T07:25:16Z |
| EndTime |
string |
The task end time. The time is in the ISO 8601 standard in the YYYY-MM-DDTHH:mm:ssZ format. The time is displayed in UTC. |
2025-03-03T07:30:57Z |
| TaskType |
string |
The task type. |
ChangeVariable |
| RemainTime |
integer |
The estimated remaining execution duration. Unit: seconds. Note
This value is for reference only. The actual execution duration may vary. |
0 |
| Progress |
number |
The current progress. |
100.0 |
| RegionId |
string |
The region ID. |
cn-beijing |
| InstanceType |
string |
The resource type. |
Instance |
| InstanceId |
string |
The resource ID. |
pc-2zed3m89cw*** |
| InstanceName |
string |
The resource name. |
pc-2zed3m89cw*** |
| DbType |
string |
The database type. |
polardb_mysql |
| Product |
string |
The product. |
polardb |
| TaskDetail |
string |
The task details. |
{\"steps\":[{\"step_name\":\"init_task\"},{\"step_name\":\"exec_task\"},{\"step_name\":\"finish_task\"}]} |
| ReasonCode |
string |
The reason why the current task was initiated. |
"" |
| ActionInfo |
string |
The allowed operation information. Note
This feature is not supported. |
{} |
| Uid |
string |
The ID of the user to whom the resource belongs. |
1816563541899*** |
| CallerSource |
string |
The request source. Valid values:
|
User |
| CallerUid |
string |
The ID of the requesting user. When CallerSource is set to User, this value represents the user UID. |
1816563541899*** |
Examples
Success response
JSON format
{
"PageNumber": 1,
"RequestId": "F90D7C14-2D1C-5B88-9CD1-23AB2CF89***",
"PageSize": 10,
"TotalCount": "2",
"Items": [
{
"Status": "Succeed",
"TaskId": "t-0mqt8qhnw04ipz0***",
"CurrentStepName": "finish_task",
"StartTime": "2025-03-03T07:25:16Z",
"EndTime": "2025-03-03T07:30:57Z",
"TaskType": "ChangeVariable",
"RemainTime": 0,
"Progress": 100,
"RegionId": "cn-beijing",
"InstanceType": "Instance",
"InstanceId": "pc-2zed3m89cw***",
"InstanceName": "pc-2zed3m89cw***",
"DbType": "polardb_mysql",
"Product": "polardb",
"TaskDetail": "{\\\"steps\\\":[{\\\"step_name\\\":\\\"init_task\\\"},{\\\"step_name\\\":\\\"exec_task\\\"},{\\\"step_name\\\":\\\"finish_task\\\"}]}",
"ReasonCode": "\"\"",
"ActionInfo": "{}",
"Uid": "1816563541899***",
"CallerSource": "User",
"CallerUid": "1816563541899***"
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Param.Invalid | The parameter is invalid. | The parameter is invalid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.