Queries the details of asynchronous export tasks.

Usage notes

You can call the DescribeAsyncTasks operation to query the details of asynchronous export tasks, such as the IDs, start time, end time, status, parameters, and results.

Limits

You can call this operation up to 10 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limit when you call this operation.

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 DescribeAsyncTasks

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

RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: Chinese mainland, which indicates Anti-DDoS Pro instances. This is the default value.
  • ap-southeast-1: outside the Chinese mainland, which indicates Anti-DDoS Premium instances.
ResourceGroupId String No rg-acfm2pz25js****

The ID of the resource group to which the instance belongs in Resource Management.

If you do not specify this parameter, the instance belongs to the default resource group.

PageNumber Integer Yes 1

The number of the page to return.

PageSize Integer Yes 10

The number of entries to return on each page.

All Alibaba Cloud API operations must include common request parameters. For more information about common request parameters, see Common parameters.

For more information about sample requests, see the "Examples" section of this topic.

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The total number of asynchronous export tasks that are returned.

RequestId String 6623EA1F-30FB-5BC8-BEC9-74D55F6F08F1

The ID of the request, which is used to locate and troubleshoot issues.

AsyncTasks Array of AsyncTask

An array that consists of the details of the asynchronous export tasks.

EndTime Long 157927362000

The time when the task ended. This value is a UNIX timestamp. Unit: milliseconds.

TaskType Integer 5

The type of the task. Valid values:

  • 1: the task to export the port forwarding rules of an instance
  • 2: the task to export the forwarding rules of a website protected by an instance
  • 3: the task to export the sessions and health check settings of an instance
  • 4: the task to export the mitigation policies of an instance
  • 5: the task to download the blacklist for destination IP addresses of an instance
  • 6: the task to download the whitelist for destination IP addresses of an instance
StartTime Long 156927362000

The time when the task started. This value is a UNIX timestamp. Unit: milliseconds.

TaskParams String {"instanceId": "ddoscoo-cn-mp91j1ao****"}

The task parameter. The value is a JSON string. The returned field in the value varies based on the value of TaskType.

If TaskType is set to 1, 3, 4, 5, or 6, the following filed is returned:

  • instanceId: the ID of the instance. Data type: string.

If TaskType is set to 2, the following field is returned:

  • domain: the domain name of the website. Data type: string.
TaskStatus Integer 2

The status of the task. Valid values:

  • 0: indicates that the task is being initialized.
  • 1: indicates that the task is in progress.
  • 2: indicates that the task is successful.
  • 3: indicates that the task failed.
TaskResult String {"instanceId": "ddoscoo-cn-mp91j1ao****","url": "https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3r****&Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****"}

The result of the task. The value is a JSON string. The returned fields in the value vary based on the value of TaskType.

If TaskType is set to 1, 3, 4, 5, or 6, the following fields are returned:

  • instanceId: the ID of the instance. Data type: string.
  • url: the URL to download the exported file from Object Storage Service (OSS). Data type: string.

If TaskType is set to 2, the following fields are returned:

  • domain: the domain name of the website. Data type: string.
  • url: the URL to download the exported file from OSS. Data type: string.
TaskId Long 1

The ID of the task.

Examples

Sample request

http(s)://[Endpoint]/?Action=DescribeAsyncTasks
&ResourceGroupId=rg-acfm2pz25js****
&PageNumber=1
&PageSize=10
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAsyncTasksResponse>
    <TotalCount>1</TotalCount>
    <RequestId>6623EA1F-30FB-5BC8-BEC9-74D55F6F08F1</RequestId>
    <AsyncTasks>
        <EndTime>157927362000</EndTime>
        <TaskType>5</TaskType>
        <StartTime>156927362000</StartTime>
        <TaskParams>{"instanceId": "ddoscoo-cn-mp91j1ao****"}</TaskParams>
        <TaskStatus>2</TaskStatus>
        <TaskResult>{"instanceId": "ddoscoo-cn-mp91j1ao****","url": "https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&amp;OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3r****&amp;Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****"}</TaskResult>
        <TaskId>1</TaskId>
    </AsyncTasks>
</DescribeAsyncTasksResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "RequestId" : "6623EA1F-30FB-5BC8-BEC9-74D55F6F08F1",
  "AsyncTasks" : [ {
    "EndTime" : 157927362000,
    "TaskType" : 5,
    "StartTime" : 156927362000,
    "TaskParams" : "{\"instanceId\": \"ddoscoo-cn-mp91j1ao****\"}",
    "TaskStatus" : 2,
    "TaskResult" : "{\"instanceId\": \"ddoscoo-cn-mp91j1ao****\",\"url\": \"https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3r****&Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****\"}",
    "TaskId" : 1
  } ]
}

Error codes

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