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 |
---|---|---|---|---|
dds:DescribeHistoryTasks | list |
|
| 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 |
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 |
Response parameters
Examples
Sample success responses
JSON
format
{
"PageNumber": 1,
"RequestId": "3C4A2494-XXXX-XXXX-93CF-548DB3375193",
"PageSize": 10,
"TotalCount": 5,
"Items": [
{
"Status": 0,
"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": "test",
"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 |
---|---|---|
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.