Queries task statistics from the task center.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
kvstore:DescribeHistoryTasksStat |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the pending event. You can call the DescribeRegions operation to query the most recent region list. |
cn-beijing |
| Status |
string |
No |
The task status. Valid values:
Note
Empty by default, which queries tasks in all states. Separate multiple states with commas (,). |
Scheduled |
| InstanceId |
string |
No |
The instance ID. |
r-bp1zxszhcgatnx**** |
| TaskId |
string |
No |
The task IDs. Empty by default, which queries all tasks. Separate multiple IDs with commas (,). Maximum: 30. |
t-0mq1yyhm3ffl2bxxxx |
| TaskType |
string |
No |
The type of the task. |
all |
| FromStartTime |
string |
Yes |
The beginning of the time range to query. The time must be in UTC and formatted as yyyy-MM-ddthh:mmZ. |
2022-01-02T11:31:03Z |
| ToStartTime |
string |
Yes |
The end of the time range to query. The time must be in UTC and formatted as yyyy-MM-ddthh:mmZ. |
2022-02-02T11:31:03Z |
| FromExecTime |
integer |
No |
The minimum execution duration. Tasks whose execution duration exceeds this value are returned. Unit: seconds. Default value: 0, which indicates no minimum limit. |
0 |
| ToExecTime |
integer |
No |
The maximum execution duration. Tasks whose execution duration is shorter than or equal to this value are returned. Unit: seconds. Default value: 0, which indicates no maximum limit. |
0 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
ABAF95F6-35C1-4177-AF3A-70969EBD**** |
| Items |
array<object> |
The task list. |
|
|
object |
The tasks. |
||
| Status |
string |
The task state.
|
Scheduled |
| TotalCount |
integer |
The total number of tasks. |
10 |
Examples
Success response
JSON format
{
"RequestId": "ABAF95F6-35C1-4177-AF3A-70969EBD****",
"Items": [
{
"Status": "Scheduled",
"TotalCount": 10
}
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Param.Invalid | Param invalid | |
| 400 | Param.Invalid.TimeEndBeforeStart | Param invalid. End time before start time |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.