Retrieves a list of historical administrative tasks for PolarDB for MySQL instances, such as parameter changes, and instance restarts.
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 For more information, see DescribeRegions. | cn-beijing |
PageSize | integer | No | The number of records per page. Valid values: 10 to 100. Default value: 10. | 10 |
PageNumber | integer | No | The page number. 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:
You can provide a comma-separated list. Default value: empty, which indicates all statuses. | Running |
InstanceId | string | No | The resource ID to filter by. You can provide a comma-separated list of up to 30 IDs. Default value: empty, indicating no restriction. Note Currently, only PolarDB cluster IDs are supported. | pc-2zed3m89cw*** |
TaskId | string | No | The task ID. You can provide a comma-separated list of up to 30 IDs. Default value: empty, indicating no restriction. | t-0mqi38ho0cgjv*** |
TaskType | string | No | The task type. You can provide a comma-separated list of up to 30 task types. Default value: empty, indicating no restriction. | ChangeVariable |
FromStartTime | string | Yes | The start of the time range to query, based on task start time. The time follows the ISO8601 standard and must be in The earliest supported time is 30 days ago. If the specified time is more than 30 days ago, it will be automatically converted to 30 days ago. | 2025-01-02T11:31:03Z |
ToStartTime | string | Yes | The end of the time range to query, based on task start time. The time follows the ISO8601 standard and must be in | 2025-01-03T11:31:03Z |
FromExecTime | integer | No | The minimum task execution time in seconds. Filters for tasks that took longer than this value. Default value: 0. | 0 |
ToExecTime | integer | No | The maximum task execution time in seconds. Filters for tasks that took less than this value. Default value: 0. | 0 |
ResourceGroupId | string | No | The resource group ID. | rg-************ |
Response elements
Element | Type | Description | Example |
object | Details of the returned parameters. | ||
PageNumber | integer | The page number of the query result. | 1 |
RequestId | string | The unique ID of the request. | F90D7C14-2D1C-5B88-9CD1-23AB2CF89*** |
PageSize | integer | The number of records per page. | 10 |
TotalCount | string | The total number of tasks that meet the conditions, regardless of paging factors. | 2 |
| Items | array<object> | The list of tasks. | |
object | The task object. | ||
Status | string | The final status of the task.
| Succeed |
TaskId | string | The task ID. | t-0mqt8qhnw04ipz0*** |
CurrentStepName | string | The name of the current step being executed. If this parameter is empty, the task has not started. | finish_task |
StartTime | string | The start time of the task. | 2025-03-03T07:25:16Z |
EndTime | string | The end time of the task. | 2025-03-03T07:30:57Z |
TaskType | string | The task type. | ChangeVariable |
RemainTime | integer | The estimated remaining execution time, in seconds (s). Note This value is for reference only. The actual execution time prevails. | 0 |
Progress | number | The completion progress of the task, from 0.0 to 100.0. | 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 for initiating the current task. | "" |
ActionInfo | string | The allowed operation information. Note This feature is not supported yet. | {} |
Uid | string | The UID of the account that owns the resource. | 1816563541899*** |
CallerSource | string | The request source. Valid values:
| User |
CallerUid | string | The ID of the requesting user. If | 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.