Queries the progress of one or more asynchronous requests.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeTasks |
The operation that you want to perform. Set the value to DescribeTasks. |
PageNumber | Integer | No | 1 |
The number of the page to return. Page start from page 1. Default value: 1. |
PageSize | Integer | No | 10 |
The number of entries to return on each page. Maximum value: 100. Default value: 10. |
RegionId | String | Yes | cn-hangzhou |
The region ID of the task. You can call the DescribeRegions operation to query the most recent region list. |
TaskIds | String | No | t-bp1hvgwromzv32iq****,t-bp179lofu2pv768w**** |
The ID of the task. You can specify up to 100 task IDs at a time. Separate the task IDs with commas (,). |
TaskAction | String | No | ImportImage |
The name of the operation that generates the task. Valid values:
|
TaskStatus | String | No | Finished |
The state of the task. Valid values:
This parameter is empty by default. Note The system only retrieves tasks in the Finished, Processing, and Failed states and
ignores other values.
|
StartTime | String | No | 2020-11-23T15:10:00Z |
The start point of the time period for which to query created tasks. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
EndTime | String | No | 2020-11-23T15:16:00Z |
The end point of the time period for which to query created tasks. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
ResourceIds.N | String | No | m-bp1i8huqm5u7**** |
The ID of resource N that is associated with the task. Valid values of N: 1 to 100.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PageSize | Integer | 10 |
The number of entries returned per page. |
PageNumber | Integer | 1 |
The page number of the returned page. |
RequestId | String | 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
The ID of the request. |
TotalCount | Integer | 1 |
The total number of entries returned. |
RegionId | String | cn-hangzhou |
The region ID of the task. |
TaskSet | Array of Task |
Details about the tasks. |
|
Task | |||
CreationTime | String | 2020-11-24T12:50Z |
The time when the task was created. |
TaskStatus | String | Finished |
The state of the task. |
FinishedTime | String | 2020-11-24T12:50Z |
The time when the task was completed. |
SupportCancel | String | true |
Indicates whether the task can be canceled. |
TaskId | String | t-bp1hvgwromzv32iq**** |
The ID of the task. |
TaskAction | String | ImportImage |
The name of the task. |
ResourceId | String | m-bp1i8huqm5u7**** |
The ID of the resource. |
Examples
Sample requests
http(s)://ecs.aliyuncs.com/?Action=DescribeTasks
&RegionId=cn-hangzhou
&PageNumber=1
&PageSize=10
&TaskIds=t-bp1hvgwromzv32iq****
&TaskAction=ImportImage
&TaskStatus=Finished
&StartTime=2020-11-23T15:10:00Z
&EndTime=2020-11-23T15:16:00Z
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeTasksResponse>
<TotalCount>1</TotalCount>
<RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId>
<PageSize>10</PageSize>
<PageNumber>1</PageNumber>
<TaskSet>
<Task>
<TaskId>t-bp1hvgwromzv32iq****</TaskId>
<TaskAction>ImportImage</TaskAction>
<SupportCancel>true</SupportCancel>
<CreationTime>2020-11-24T12:50Z</CreationTime>
<TaskStatus>Finished</TaskStatus>
<FinishedTime>2020-11-24T12:50Z</FinishedTime>
</Task>
</TaskSet>
<RegionId>cn-hangzhou</RegionId>
</DescribeTasksResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TotalCount" : 1,
"RequestId" : "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"PageSize" : 10,
"PageNumber" : 1,
"TaskSet" : {
"Task" : [ {
"TaskId" : "t-bp1hvgwromzv32iq****",
"TaskAction" : "ImportImage",
"SupportCancel" : true,
"CreationTime" : "2020-11-24T12:50Z",
"TaskStatus" : "Finished",
"FinishedTime" : "2020-11-24T12:50Z"
} ]
},
"RegionId" : "cn-hangzhou"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | The error message returned because the specified RegionId parameter does not exist. |
For a list of error codes, see Service error codes.