最近更新时间:2023.07.07 10:54:52
首次发布时间:2022.07.01 09:24:38
调用 DescribeTasks 接口查询一个或多个异步请求的进度。
说明
名称 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeTasks | 要执行的操作,取值:DescribeTasks。 |
Version | String | 是 | 2020-04-01 | 接口的版本,取值:2020-04-01。 |
TaskIds.N | String | 否 | TaskIds.1=t-ybnz9qci2sahiqdl**** | 任务ID,单次最多支持100个任务ID。
|
ResourceId | String | 否 | image-ebgy1og99tfc**** | 资源ID。
|
ResourceIds.N | String | 否 | ResourceIds.1=image-ebgy1og99tfc****&ResourceIds.2=image-opisd1og89tfc**** | 资源ID,单次最多支持100个资源ID。您可以调用ExportImage接口导出,或调用CopyImage接口复制自定义镜像时获取。
|
NextToken | String | 否 | - | 分页查询凭证,用于标记分页的位置,初次调用该接口时无需设置。下次查询时,取值为上一次API调用返回的 |
MaxResults | Integer | 否 | 20 | 分页查询时设置的每页行数:
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
NextToken | String | bHpwdXJja2RxemU1eG5sb3NzdGcW1-RCEq****** | 本次调用返回的查询凭证值,返回为空表示该页为末页。 |
Tasks | Array of struct | - | 任务列表,具体请参见下表“ Tasks结构 ”。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Id | String | t-ybnz9qci2sahiqdl**** | 任务ID。 |
CreatedAt | String | 2022-05-06T17:33:34+08:00 | 任务创建时间。 |
UpdatedAt | String | 2022-05-06T17:33:52+08:00 | 任务更新时间。 |
EndAt | String | 2022-05-06T17:33:52+08:00 | 任务结束时间。
|
ResourceId | String | image-ebgy1og99tfct0gw**** | 资源ID。 |
Type | String | ExportImage | 待查询任务的类型。取值:
|
Process | Integer | 100% | 任务的进度,用百分数表示。 |
Status | String | Succeeded | 任务的状态。取值:
|
GET /?Action=DescribeTasks&Version=2020-04-01 HTTP/1.1 Host: open.volcengineapi.com Region: cn-beijing Service: ecs
{ "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" } ] } }
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | InvalidArgument | The specified argument is invalid. | 指定的参数不合法。 |
400 | LimitExceeded.MaximumMaxResults | The number of specified MaxResults exceeds the maximum limit. | 指定的MaxResults超过最大限制。 |
400 | LimitExceeded.MinimumMaxResults | The number of specified MaxResults exceeds the minimum limit. | 指定的MaxResults超过最小限制。 |
400 | LimitExceeded.MaximumTaskIds | You've reached the limit on the number of TaskIds that you can set. | 指定的任务ID数量超过限制。 |
400 | LimitExceeded.MaximumResourceIds | You've reached the limit on the number of ResourceIds that you can set. | 指定的资源ID数量超过限制。 |
500 | InternalError | An internal error has occurred. | 内部错误,请重试。如果多次尝试失败,请提交工单。 |