You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Images
DescribeTasks - Queries request progress
Copy page
Download PDF
DescribeTasks - Queries request progress
Call the DescribeTasks operation to query the progress of one or more asynchronous requests.​
Request description​
  • You can view the task progress for custom image creation, copying, import, and export, such as task IDs, status, and start and end times.​
  • You can log on to the ECS console and then click "Maintenance & Monitoring > Executions" to view the task ID TaskIds or resource ID ResourceId. For details, see Managing custom image tasks.​
Debugging​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
Only the request parameters specific to this operation and some common parameters are listed below. For more information, refer to Common parameters.​
Action string required Sample value: DescribeTasks​
The action that you want to perform. Value: DescribeTasks.​
​
Version string required Sample value: 2020-04-01​
The version of the API. Valid value: 2020-04-01.​
​
MaxResults integer Optional Sample value: 20​
The number of entries per page.​
  • Maximum value: 100​
  • Default value: 20​
​
NextToken string Optional Sample value: 3tiegs1y963vj0******​
Pagination token marking the query position. Omit this parameter for initial API requests. In the next query, set the NextToken parameter to the value returned by the previous API call.​
​
ResourceId string Optional Sample value: image-ebgy1og99tfct0gw​
The resource ID.​
tip​
To improve compatibility, use the ResourceIds.N parameter.​
​
ResourceIds.N string[] Optional Sample value: ResourceIds.1=image-ebgy1og99tfc****&ResourceIds.2=image-opisd1og89tfc****​
The resource ID. A maximum of 100 resource IDs is supported.​
  • Argument - N: specifies the serial number of the task.​
  • Separate multiple resource IDs with &.​
​
TaskIds.N string[] Optional Sample value: TaskIds.1=t-ybnz9qci2sahiqdl****&TaskIds.2=t-ybnz9qci89sw*****​
The task ID. Up to 100 task IDs are supported per operation. You can obtain task IDs when you perform operations on custom images by calling ExportImage, CopyImage, or other operations.​
  • Argument - N: specifies the serial number of the task.​
  • Separate multiple task IDs with &.​
​
​
​
Response parameters​
Only the response parameters specific to this operation are listed below. For more information, refer to the response structure.​
NextToken string Sample value: bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq******​
The query credentials value returned by this call. If null is returned, this page is the last page.​
​
Tasks object[] Sample value: --​
The task list.​
CreatedAt string Sample value: 2022-05-06T00:01:00+08:00​
The creation time of the task.​
​
EndAt string Sample value: 2022-05-06T00:01:00+08:00​
The task end time.​
tip​
The returned value of this parameter is empty if the task is not completed.​
​
Id string Sample value: t-ybnz9qci2sahiqdl****​
The task ID.​
​
Process long Sample value: 100​
The progress of the task (expressed as a percentage). Unit: %.​
​
ResourceId string Sample value: image-ebgy1og99tfct0gw****​
The resource ID.​
​
Status string Sample value: Succeeded​
The status of the task. Value:​
  • Pending: To be executed​
  • Running: Running​
  • Succeeded: Successful execution​
  • Failed: Failed execution​
​
Type string Sample value: ExportImage​
The type of the task to be queried. Value:​
  • ImportImage: Custom image import​
  • ExportImage: Custom image export​
  • CreateImage: Custom image creation​
  • CopyImage: Custom image duplication​
tip​
The feature of copying custom images is in Beta. If you need a trial, contact your account manager.​
​
UpdatedAt string Sample value: 2022-05-06T00:01:00+08:00​
The update time of the task.​
​
​
​
​
Sample request​
​
GET /?Action=DescribeTasks&Version=2020-04-01 HTTP/1.1​
Host: ecs.cn-beijing.volcengineapi.com​
Region: cn-beijing​
Service: ecs​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "202106111445100102252431000052****",​
"Action": "DescribeTasks",​
"Version": "2020-04-01",​
"Service": "ecs",​
"Region": "cn-beijing"​
},​
"Result": {​
"NextToken": "",​
"Tasks": [​
{​
"Id": "t-ybnz9qci2sahiqdl****",​
"CreatedAt": "2022-05-06T00:01:00+08:00",​
"UpdatedAt": "2022-05-06T00:07:12+08:00",​
"EndAt": "2022-05-06T00:07:12+08:00",​
"ResourceId": "image-ybnz9qci2sahiqdl****",​
"Type": "ExportImage",​
"Process": 100,​
"Status": "Succeeded"​
}​
]​
}​
}​
​
Error codes​
The table below lists the business-related error codes of the operation. For more information, refer to Common error codes.​
​
Status code​
Error code​
Error message​
Description​
400​
LimitExceeded.MaximumMaxResults​
The number of specified MaxResults exceeds the maximum limit.​
The value specified for MaxResults exceeds the upper limit.​
400​
LimitExceeded.MaximumResourceIds​
You've reached the limit on the number of ResourceIds that you can set.​
The specified number of resource IDs exceeds the limit.​
400​
LimitExceeded.MinimumMaxResults​
The number of specified MaxResults exceeds the minimum limit.​
The value specified for MaxResults exceeds the lower limit.​
400​
LimitExceeded.MaximumTaskIds​
You've reached the limit on the number of TaskIds that you can set.​
The specified number of task IDs exceeds the limit.​
500​
InternalError​
An internal error has occurred.​
An internal error occurred. Try again. If multiple attempts fail, submit a ticket.​
​
​
Last updated: 2026.06.18 17:48:24