Consulta os detalhes de uma tarefa assíncrona. Atualmente, as tarefas assíncronas que podem ser consultadas incluem ImportImage, ExportImage e ModifyDiskSpec.
Experimente agora
Testar
Autorização RAM
|
Ação |
Nível de acesso |
Tipo de recurso |
Chave de condição |
Ação dependente |
|
ecs:DescribeTaskAttribute |
get |
*All Resource
|
Nenhuma | Nenhuma |
Parâmetros da solicitação
|
Parâmetro |
Tipo |
Obrigatório |
Descrição |
Exemplo |
| RegionId |
string |
Sim |
O ID da região. Você pode chamar DescribeRegions para consultar a lista de regiões mais recente. |
cn-hangzhou |
| TaskId |
string |
Sim |
O ID da tarefa. Você pode chamar DescribeTasks para consultar os IDs das tarefas. |
t-ce946ntx4wr**** |
Elementos de resposta
|
Elemento |
Tipo |
Descrição |
Exemplo |
|
object |
|||
| CreationTime |
string |
A hora em que a tarefa foi criada. |
2015-11-23T02:13Z |
| SupportCancel |
string |
Indica se a tarefa pode ser cancelada (CancelTask). Valores válidos:\n \n- true: A tarefa pode ser cancelada.\n- false: A tarefa não pode ser cancelada. |
true |
| TotalCount |
integer |
O número total de tarefas. |
1 |
| SuccessCount |
integer |
O número de tarefas bem-sucedidas. |
1 |
| RegionId |
string |
O ID da região. |
cn-hangzhou |
| TaskAction |
string |
O nome da operação de API associada à tarefa. |
ExportImage |
| FailedCount |
integer |
O número de tarefas com falha. |
0 |
| RequestId |
string |
O ID da solicitação. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| TaskStatus |
string |
O status da tarefa. |
Finished |
| TaskProcess |
string |
O progresso da tarefa. |
100% |
| FinishedTime |
string |
A hora em que a tarefa foi concluída. |
2015-11-23T02:19Z |
| TaskId |
string |
O ID da tarefa. |
t-ce946ntx4wr**** |
| OperationProgressSet |
object |
||
| OperationProgress |
array<object> |
As informações sobre a tarefa, incluindo o status e as informações relacionadas de cada subtarefa. |
|
|
array<object> |
|||
| ErrorMsg |
string |
The error message. |
The specified RegionId parameter is invalid. |
| ErrorCode |
string |
The error code. |
ParameterInvalid |
| OperationStatus |
string |
The operation status. |
Success |
| RelatedItemSet |
object |
||
| RelatedItem |
array<object> |
The resource information type. |
|
|
object |
|||
| Name |
string |
The name of the related item. |
OSSObject |
| Value |
string |
The value of the related item. |
MYOSSPRE_m-23f8tcp***_t-23ym6mv***.vhd |
Exemplos
Resposta de sucesso
JSON formato
{
"CreationTime": "2015-11-23T02:13Z",
"SupportCancel": "true",
"TotalCount": 1,
"SuccessCount": 1,
"RegionId": "cn-hangzhou",
"TaskAction": "ExportImage",
"FailedCount": 0,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"TaskStatus": "Finished",
"TaskProcess": "100%",
"FinishedTime": "2015-11-23T02:19Z",
"TaskId": "t-ce946ntx4wr****",
"OperationProgressSet": {
"OperationProgress": [
{
"ErrorMsg": "The specified RegionId parameter is invalid.",
"ErrorCode": "ParameterInvalid",
"OperationStatus": "Success",
"RelatedItemSet": {
"RelatedItem": [
{
"Name": "OSSObject",
"Value": "MYOSSPRE_m-23f8tcp***_t-23ym6mv***.vhd"
}
]
}
}
]
}
}
Códigos de erro
|
Código de status HTTP |
Código de erro |
Mensagem de erro |
Descrição |
|---|---|---|---|
| 400 | InvalidRegionId.NotFound | The specified RegionId does not exist. | |
| 400 | MissingParameter | An input parameter "RegionId" that is mandatory for processing the request is not supplied. | |
| 400 | InvalidTaskId.NotFound | The specified "TaskId" is not found. | The specified task does not exist |
Consulte Códigos de Erro para uma lista completa.
Notas de versão
Consulte Notas de Versão para uma lista completa.