Query the task list

Last Updated: Jul 25, 2017

Description

Query the progress of a specified asynchronous request.

Request parameters

Name Type Required Description
Action String Yes Operation interface name; value: DescribeTasks.
RegionId String Yes Region ID. See Regions and zones for region IDs.
TaskAction String No Task interface name;
Supported interfaces:
  • ImportImage
  • ExportImage
TaskIds String No Task ID; up to 100 task IDs are supported, and they are separated by comma.
TaskStatus String No Task status;
Optional values:
  • Finished
  • Processing
  • Pending
  • Deleted
  • Paused
Default value: None
StartTime String No Query by creation time, start time of the creation time period. The time is displayed in the format specified in the ISO8601 standard, and the UTC time is used. It is in the format of YYYY-MM-DDThh:mmZ.
EndTime String No Query by creation time, end time of the creation time period. The time is displayed in the format specified in the ISO8601 standard, and the UTC time is used. It is in the format of YYYY-MM-DDThh:mmZ.
PageNumber Integer No Page number of the query result; initial value: 1; default value: 1
PageSize Integer No Number of lines on each page, set for pagination query; maximum value: 100; default value: 10

Return parameters

Name Type Description
TaskSet TaskType Task set
RegionId String Region ID. See Regions and zones for region IDs.
TotalCount Integer Number of items in the list
PageNumber Integer Current page number
PageSize Integer Number of items included in the current page

Error codes

Error code Description HTTP status code Meaning
MissingParameter An input parameter RegionId that is mandatory for processing the request is not supplied. 400 The required parameter RegionId is missing. See Regions and zones for region IDs.
InvalidRegionId.NotFound The specified region not found. 400 The specified RegionID does not exist. See Regions and zones for region IDs.

Example

Request example

  1. https://ecs.aliyuncs.com/?Action=DescribeTasks
  2. &RegionId=cn-hangzhou
  3. &<Public Request Parameters>

Return Example

XML format

  1. <DescribeTasksResponse>
  2. <PageNumber>1</PageNumber>
  3. <TotalCount>2</TotalCount>
  4. <PageSize>2</PageSize>
  5. <RegionId>cn-hangzhou</RegionId>
  6. <RequestId>E5C82807-5588-4661-9A96-350B206A7623</RequestId>
  7. <TaskSet>
  8. <Task>
  9. <CreationTime>2015-11-24T12:50Z</CreationTime>
  10. <FinishedTime>2015-11-24T12:50Z</FinishedTime>
  11. <SupportCancel>true</SupportCancel>
  12. <TaskAction>IMPORT_IMAGE</TaskAction>
  13. <TaskStatus>Finished</TaskStatus>
  14. <TaskId>t-23mo8zf9w</TaskId>
  15. </Task>
  16. <Task>
  17. <CreationTime>2015-11-23T15:10Z</CreationTime>
  18. <FinishedTime>2015-11-23T15:16Z</FinishedTime>
  19. <SupportCancel>true</SupportCancel>
  20. <TaskAction>IMPORT_IMAGE</TaskAction>
  21. <TaskStatus>Finished</TaskStatus>
  22. <TaskId>t-23sgu0dyj</TaskId>
  23. </Task>
  24. </TaskSet>
  25. </DescribeTasksResponse>

JSON format

  1. {
  2. "PageNumber": 1,
  3. "TotalCount": 2,
  4. "PageSize": 2,
  5. "RegionId": "cn-hangzhou",
  6. "RequestId": "F746C690-D9EA-4F87-AF31-8E1910FAB541",
  7. "TaskSet": {
  8. "Task": [
  9. {
  10. "CreationTime": "2015-11-24T12:50Z",
  11. "FinishedTime": "2015-11-24T12:50Z",
  12. "SupportCancel": true,
  13. "TaskAction": "ImportImage",
  14. "TaskStatus": "Finished",
  15. "TaskId": "t-23mo8zf9w"
  16. },
  17. {
  18. "CreationTime": "2015-11-23T15:10Z",
  19. "FinishedTime": "2015-11-23T15:16Z",
  20. "SupportCancel": true,
  21. "TaskAction": "ImportImage",
  22. "TaskStatus": "Finished",
  23. "TaskId": "t-23sgu0dyj"
  24. }
  25. ]
  26. }
  27. }
Thank you! We've received your feedback.