You can call this operation to query the details of an asynchronous task. You can query the asynchronous tasks generated by calling the ImportImage and ExportImage operations.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeTaskAttribute

The operation that you want to perform. Set the value to DescribeTaskAttribute.

RegionId String Yes cn-hangzhou

The ID of the region. You can call the DescribeRegions operation to query the most recent region list.

TaskId String Yes t-ce946ntx4wr****

The ID of the task. You can call the DescribeTasks operation to query the list of task IDs.

Response parameters

Parameter Type Example Description
CreationTime String 2015-11-23T02:13Z

The time when the task was created.

FailedCount Integer 0

The number of failed tasks.

FinishedTime String 2015-11-23T02:19Z

The time when the task was completed.

OperationProgressSet Array of OperationProgress

An array consisting of OperationProgress data of each subtask.

OperationProgress
ErrorCode String ParameterInvalid

The error code.

ErrorMsg String The specified RegionId parameter is invalid.

The error message.

OperationStatus String Success

The status of the operation.

RelatedItemSet Array of RelatedItem

An array consisting of RelatedItem data.

RelatedItem
Name String OSSObject

The name of the related item.

Value String MYOSSPRE_m-23f8tcp***_t-23ym6mv***.vhd

The value of the related item.

RegionId String cn-hangzhou

The region ID of the image.

RequestId String 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

The ID of the request.

SuccessCount Integer 1

The number of completed tasks.

SupportCancel String true

Indicates whether the task can be canceled (CancelTask). Valid values:

  • true: The task can be canceled.
  • false: The task cannot be canceled.
TaskAction String ExportImage

The operation name of the task.

TaskId String t-ce946ntx4wr****

The ID of the task.

TaskProcess String 100%

The progress of the task.

TaskStatus String Finished

The status of the task.

TotalCount Integer 1

The total number of tasks.

Examples

Sample requests

https://ecs.aliyuncs.com/?Action=DescribeTaskAttribute
&RegionId=cn-hangzhou
&TaskId=t-ce946ntx4wr****
&<Common request parameters>

Sample success responses

XML format

<DescribeTaskAttributeResponse>
    <CreationTime>2015-11-23T02:13Z</CreationTime>
    <OperationProgressSet>
        <OperationProgress>
            <RelatedItemSet>
                <RelatedItem>
                    <Name>OSSBucket</Name>
                    <Value>image-temp</Value>
                </RelatedItem>
                <RelatedItem>
                    <Name>OSSObject</Name>
                    <Value>MYOSSPRE_m-23f8tcp***_t-23ym6mv***.vhd</Value>
                </RelatedItem>
                <RelatedItem>
                    <Name>ImageFormat</Name>
                    <Value>vhd</Value>
                </RelatedItem>
            </RelatedItemSet>
            <ErrorMsg></ErrorMsg>
            <ErrorCode></ErrorCode>
            <OperationStatus>Success</OperationStatus>
        </OperationProgress>
    </OperationProgressSet>
    <FinishedTime>2015-11-23T02:19Z</FinishedTime>
    <FailedCount>0</FailedCount>
    <SupportCancel>true</SupportCancel>
    <TotalCount>1</TotalCount>
    <SuccessCount>1</SuccessCount>
    <RequestId>EF0C5969-279B-49C8-AD83-BACCC74DD38C</RequestId>
    <RegionId>cn-hangzhou</RegionId>
    <TaskAction>ExportImage</TaskAction>
    <TaskStatus>Finished</TaskStatus>
    <TaskProcess>100%</TaskProcess>
    <TaskId>t-ce946ntx4wr****</TaskId>
</DescribeTaskAttributeResponse>

JSON format

{
    "CreationTime": "2015-11-23T02:13Z",
    "OperationProgressSet": {
        "OperationProgress": [
            {
                "RelatedItemSet": {
                    "RelatedItem": [
                        {
                            "Name": "OSSBucket",
                            "Value": "image-temp"
                        },
                        {
                            "Name": "OSSObject",
                            "Value": "MYOSSPRE_m-23f8tcp***_t-23ym6mv***.vhd"
                        },
                        {
                            "Name": "ImageFormat",
                            "Value": "vhd"
                        }
                    ]
                },
                "ErrorMsg": "",
                "ErrorCode": "",
                "OperationStatus": "Success"
            }
        ]
    },
    "FinishedTime": "2015-11-23T02:19Z",
    "FailedCount": 0,
    "SupportCancel": true,
    "TotalCount": 1,
    "SuccessCount": 1,
    "RequestId": "4BE2C7FE-C7A4-4675-A153-174E032AABFB",
    "RegionId": "cn-hangzhou",
    "TaskAction": "ExportImage",
    "TaskStatus": "Finished",
    "TaskProcess": "100%",
    "TaskId": "t-ce946ntx4wr****"
}

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.
400 MissingParameter An input parameter "RegionId" that is mandatory for processing the request is not supplied. The error message returned because the required RegionId parameter is not specified.
400 MissingParameter An input parameter "TaskId" that is mandatory for processing the request is not supplied. The error message returned because the required TaskId parameter is not specified.
400 InvalidTaskId.NotFound The specified "TaskId" is not found. The error message returned because the specified TaskId parameter does not exist.

For a list of error codes, visit the API Error Center.