Queries details about asynchronous export tasks, such as the task IDs, start time, end time, task status, task parameters, and task results.

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.

PageNumber Integer Yes 1

The number of the page to return. For example, to query the returned results on the first page, set the value to 1.

PageSize Integer Yes 10

The number of entries to return on each page. Maximum value: 20.

RegionId String No cn-hangzhou

The region ID of the instance. Valid values:

  • cn-hangzhou: mainland China, which indicates an Anti-DDoS Pro instance
  • ap-southeast-1: outside mainland China, which indicates an Anti-DDoS Premium instance
ResourceGroupId String No default

The ID of the resource group to which the instance belongs in Resource Management. This parameter is empty by default, which indicates that the instance belongs to the default resource group.

Response parameters

Parameter Type Example Description
AsyncTasks Array

Details about the asynchronous export task.

EndTime Long 157927362000

The end time of the task. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

StartTime Long 156927362000

The start time of the task. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.

TaskId Long 1

The ID of the task.

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

Details about the asynchronous export task. The parameter is a JSON string. The returned field in the value varies with TaskType.

If the value of TaskType is 1, 3, 4, 5, or 6, the returned fields in the value are described as follows:

  • instanceId: the ID of the instance. This field must be of the STRING type.

If the value of TaskType is 2, the returned field in the value is described as follows:

  • domain: the domain name of the website. This field must be of the STRING type.
TaskResult String {"instanceId": "ddoscoo-cn-mp91j1ao****","url": "https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3rDu3v&Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****"}

The task result. This parameter is a JSON string. The returned fields vary with TaskType.

If the value of TaskType is 1, 3, 4, 5, or 6, the returned fields in the value are described as follows:

  • instanceId: the ID of the instance. This field must be of the STRING type.
  • url: the URL to download the exported file from OSS. This field must be of the STRING type.

If the value of TaskType is 2, the returned fields in the value are described as follows:

  • domain: the domain name of the website. This field must be of the STRING type.
  • url: the URL to download the exported file from OSS. This field must be of the STRING type.
TaskStatus Integer 2

The status of the task. Valid values:

  • 0: The task is initializing.
  • 1: The task is in progress.
  • 2: The task is succeeded.
  • 3: The task failed.
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 website forwarding rules of an instance
  • 3: the task to export the session persistence and health check settings of an instance
  • 4: the task to export the anti-DDoS protection policies of an instance
  • 5: the task to download the blacklist for source IP addresses of an instance
  • 6: the task to download the whitelist for source IP addresses of an instance
RequestId String 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

The ID of the request.

TotalCount Integer 1

The total number of returned asynchronous export tasks.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeAsyncTasksResponse>
      <TotalCount>1</TotalCount>
      <RequestId>0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc</RequestId>
      <AsyncTasks>
            <TaskId>1</TaskId>
            <TaskType>5</TaskType>
            <TaskStatus>2</TaskStatus>
            <StartTime>156927362</StartTime>
            <EndTime>157927362</EndTime>
            <TaskParams>
                  <instanceId>ddoscoo-cn-mp91j1ao****</instanceId>
            </TaskParams>
            <TaskResult>
                  <instanceId>ddoscoo-cn-mp91j1ao****</instanceId>
                  <url>https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&amp;OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3rDu3v&amp;Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****</url>
            </TaskResult>
      </AsyncTasks>
</DescribeAsyncTasksResponse>

JSON format

{
    "TotalCount": 1,
    "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc",
    "AsyncTasks": [
        {
            "TaskId": 1,
            "TaskType": 5,
            "TaskStatus": 2,
            "StartTime": 156927362,
            "EndTime": 157927362,
            "TaskParams": {
                "instanceId": "ddoscoo-cn-mp91j1ao****"
            },
            "TaskResult": {
                "instanceId": "ddoscoo-cn-mp91j1ao****",
                "url": "https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3rDu3v&Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****"
            }
        }
    ]
}

Error codes

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