Queries a list of tasks in the task center.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dds:DescribeHistoryTasks |
list |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID of the pending event. 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 number of the page to return. The value must be a positive integer. Default value: 1. |
1 |
| InstanceType |
string |
No |
The instance type of the instance. Set the value to Instance. |
Instance |
| Status |
string |
No |
The task status. Valid values:
Separate multiple states with commas (,). This parameter is empty by default, which indicates that tasks in all states are queried. |
Succeed,Running,Waiting |
| InstanceId |
string |
No |
The instance ID. Separate multiple instance IDs with commas (,). You can specify up to 30 instance IDs. This parameter is empty by default, which indicates that tasks of all instances are queried. |
dds-8vb38f0e7933xxxx |
| TaskId |
string |
No |
The task ID. Separate multiple task IDs with commas (,). You can specify up to 30 task IDs. This parameter is empty by default, which indicates that all tasks are queried. |
t-0mq1yyhm3ffl2bxxxx |
| TaskType |
string |
No |
The task type. This parameter is left empty by default, which indicates that all types of tasks are queried. Valid values:
|
DeleteInsNode |
| FromStartTime |
string |
Yes |
The start time of the O&M task to perform. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. You can query data within the last 30 days. |
2023-03-15T03:41:26Z |
| ToStartTime |
string |
Yes |
The end time of the O&M task to perform. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. You can query data within the last 30 days. |
2023-03-16T07:21:31Z |
| FromExecTime |
integer |
No |
The minimum execution duration of the 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 for the query. |
0 |
| ToExecTime |
integer |
No |
The maximum execution duration of the 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 for the query. |
0 |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-aek2inrfrnw3xby |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| PageNumber |
integer |
The page number of the returned page. |
1 |
| RequestId |
string |
The request ID. |
3C4A2494-XXXX-XXXX-93CF-548DB3375193 |
| PageSize |
integer |
The maximum number of entries returned per page. |
10 |
| TotalCount |
integer |
The total number of tasks that meet these conditions without taking pagination into account. |
5 |
| Items |
array<object> |
The task objects. |
|
|
object |
|||
| Status |
string |
The task status. Valid values:
|
Succeed |
| TaskId |
string |
The task ID. |
t-0mq1yyhm3ffl2bxxxx |
| CurrentStepName |
string |
The name of the current step. If this parameter is left empty, the task is not started. |
exec_task |
| StartTime |
string |
The start time of the performed O&M task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2023-02-11T02:33Z |
| EndTime |
string |
The end time of the performed O&M task. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2023-03-16T02:59Z |
| TaskType |
string |
The task type.
|
CreateIns |
| RemainTime |
integer |
The estimated remaining execution time. Unit: seconds. The value 0 indicates that the task is completed. |
1000 |
| Progress |
number |
The current progress of the task. The valid values range from 0 to 100. |
100.0 |
| RegionId |
string |
The region ID of the instance. |
cn-hangzhou |
| InstanceType |
string |
The instance type of the instance. The value is fixed to Instance. |
Instance |
| InstanceId |
string |
The instance ID |
dds-t4n18194768fxxxx |
| InstanceName |
string |
The name of the instance. |
test-dds |
| DbType |
string |
The database type. The value is fixed to mongodb. |
mongodb |
| Product |
string |
The product. The value is fixed to dds. |
dds |
| TaskDetail |
string |
The details of the task. The task details vary based on the value of the taskType parameter. |
{\"callerUid\":\"test\"} |
| ReasonCode |
string |
The reason why the current task was initiated. |
小版本升级 |
| ActionInfo |
string |
A set of allowed actions that can be taken on the task. The system matches the current step name and status of the task to the available actions specified by ActionInfo. If no matching action is found, the current status of the task does not support any action. Example:
The system may support the following actions:
|
`{\"steps\":[{\"action_info\":{\"Waiting\":[\"modifySwitchTime\"]},\"step_name\":\"exec_task\"}]}` |
| Uid |
string |
The ID of the user to which the resource belongs. |
141345906006**** |
| CallerSource |
string |
The request source. Valid values: System and User. |
System |
| CallerUid |
string |
The ID of the user who made the request. If CallerSource is set to User, CallerUid indicates the unique ID (UID) of the user. |
141345906006**** |
Examples
Success response
JSON format
{
"PageNumber": 1,
"RequestId": "3C4A2494-XXXX-XXXX-93CF-548DB3375193",
"PageSize": 10,
"TotalCount": 5,
"Items": [
{
"Status": "Succeed",
"TaskId": "t-0mq1yyhm3ffl2bxxxx",
"CurrentStepName": "exec_task",
"StartTime": "2023-02-11T02:33Z",
"EndTime": "2023-03-16T02:59Z",
"TaskType": "CreateIns",
"RemainTime": 1000,
"Progress": 100,
"RegionId": "cn-hangzhou",
"InstanceType": "Instance",
"InstanceId": "dds-t4n18194768fxxxx",
"InstanceName": "test-dds",
"DbType": "mongodb",
"Product": "dds",
"TaskDetail": "{\\\"callerUid\\\":\\\"test\\\"}",
"ReasonCode": "小版本升级",
"ActionInfo": "`{\\\"steps\\\":[{\\\"action_info\\\":{\\\"Waiting\\\":[\\\"modifySwitchTime\\\"]},\\\"step_name\\\":\\\"exec_task\\\"}]}`",
"Uid": "141345906006****",
"CallerSource": "System",
"CallerUid": "141345906006****"
}
]
}
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.