Queries task statistics in Task Center.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
polardb:DescribeHistoryTasksStat | get | *All Resource
| None | None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | Yes | The region ID. | cn-beijing |
Status | string | No | The task status. Valid values:
To query tasks in multiple states, separate the states with commas (,). If you leave this parameter empty, tasks in all states are queried. | Running |
InstanceId | string | No | The instance ID. This corresponds to the ins_name parameter. You can specify up to 30 instance IDs. Separate multiple IDs with commas (,). | pc-2zed3m89cw*** |
TaskId | string | No | The task ID. You can specify up to 30 task IDs. Separate multiple IDs with commas (,). If you leave this parameter empty, this parameter is not used as a filter. | ec8c4723-eac5-4f12-becb-01ac08****** |
TaskType | string | No | The task type. This parameter is used to query tasks of a specific type. You can specify up to 30 task types. Separate multiple types with commas (,). If you leave this parameter empty, this parameter is not used as a filter. | DatabaseProxyUpgrading |
FromStartTime | string | Yes | The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | 2025-01-02T11:31:03Z |
ToStartTime | string | Yes | The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. | 2025-01-03T12:31:03Z |
FromExecTime | integer | No | The minimum running time. The query returns tasks with a running time greater than this value. Unit: seconds. | 0 |
ToExecTime | integer | No | The maximum running time. The query returns tasks with a running time less than or equal to this value. Unit: seconds. | 10 |
ResourceGroupId | string | No | The resource group ID. | rg-************ |
Response elements
Element | Type | Description | Example |
object | |||
RequestId | string | The request ID. | 45D24263-7E3A-4140-9472-************ |
| Items | array<object> | The list of tasks. | |
object | The details of a task. | ||
Status | string | The task status.
| Running |
TotalCount | integer | The total number of records. | 13 |
Examples
Success response
JSON format
{
"RequestId": "45D24263-7E3A-4140-9472-************",
"Items": [
{
"Status": "Running",
"TotalCount": 13
}
]
}Error codes
HTTP status code | Error code | Error message | Description |
400 | Param.Invalid | The parameter is invalid. | The parameter is invalid. |
400 | Param.Invalid.TimeEndBeforeStart | Param Invalid.End time before start time. | The end time must be greater than the start time. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.