Queries a list of tasks in the task center.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
kvstore:DescribeHistoryTasks | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID. You can call the DescribeRegions operation to query the most recent region list. | 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. Pages start from page 1. Default value: 1. | 1 |
InstanceType | string | No | Set the value to Instance. | Instance |
Status | string | No | The task status. Valid values:
Note
This parameter is empty by default, which indicates that tasks in all states are queried. Separate multiple states with commas (,).
| Scheduled |
InstanceId | string | No | The instance ID. This parameter is empty by default, which indicates that you can specify an unlimited number of instance IDs. Separate multiple instance IDs with commas (,). You can specify up to 30 instance IDs. | r-uf62br2491p5l**** |
TaskId | string | No | The task ID. This parameter is empty by default, which indicates that you can specify an unlimited number of task IDs. Separate multiple task IDs with commas (,). You can specify up to 30 task IDs. | t-83br18hloy3faf**** |
TaskType | string | No | The task type. This parameter is empty by default, which indicates that you can specify an unlimited number of task types.
Note
Separate multiple task types with commas (,).
| ModifyInsSpec |
FromStartTime | string | Yes | The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. The start time can be up to 30 days earlier than the current time. | 2022-01-02T11:31:03Z |
ToStartTime | string | Yes | The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Only tasks that have a start time earlier than or equal to the time specified by this parameter are queried. | 2022-03-02T11:31:03Z |
FromExecTime | integer | No | The minimum execution duration of a task. This parameter is used to filter tasks whose execution duration is longer than the minimum execution duration. Unit: seconds. The default value is 0, which indicates that no limit is imposed. | 0 |
ToExecTime | integer | No | The maximum execution duration of a task. This parameter is used to filter tasks whose execution duration is shorter than or equal to the maximum execution duration. Unit: seconds. The default value is 0, which indicates that no limit is imposed. | 0 |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageNumber": 1,
"RequestId": "5D622714-AEDD-4609-9167-F5DDD3D1****",
"PageSize": 10,
"TotalCount": 5,
"Items": [
{
"Status": 0,
"TaskId": "t-83br18hloy3faf****",
"CurrentStepName": "exec_task",
"StartTime": "2022-02-03T11:31:03Z",
"EndTime": "2022-02-03T12:06:17Z",
"TaskType": "ModifyInsSpec",
"RemainTime": 1000,
"Progress": 79,
"RegionId": "cn-shanghai",
"InstanceType": "Instance",
"InstanceId": "r-bp1zxszhcgatnx****",
"InstanceName": "dba-tair-test-qcloud",
"DbType": "redis",
"Product": "kvstore",
"TaskDetail": "{\\\"callerUid\\\":\\\"test\\\"}",
"ReasonCode": "",
"ActionInfo": "{\\\"steps\\\":[{\\\"action_info\\\":{\\\"Waiting\\\":[\\\"modifySwitchTime\\\"]},\\\"step_name\\\":\\\"exec_task\\\"}]}\n",
"Uid": "141345906006****",
"CallerSource": "141345906006****",
"CallerUid": "User"
}
]
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | Param.Invalid | Param invalid |
400 | Param.Invalid.TimeEndBeforeStart | Param invalid. End time before start time |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|