All Products
Search
Document Center

Anti-DDoS:DescribeAsyncTasks

Last Updated:Apr 29, 2024

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

Operation description

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.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-ddoscoo:DescribeAsyncTasksRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceGroupIdstringNo

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

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

rg-acfm2pz25js****
PageNumberintegerYes

The number of the page to return.

1
PageSizeintegerYes

The number of entries to return on each page.

10

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

ParameterTypeDescriptionExample
object
TotalCountinteger

The total number of asynchronous export tasks that are returned.

1
RequestIdstring

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

6623EA1F-30FB-5BC8-BEC9-74D55F6F08F1
AsyncTasksobject []

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

EndTimelong

The end time of the task. This value is a UNIX timestamp. Unit: milliseconds.

157927362000
TaskTypeinteger

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
5
StartTimelong

The start time of the task. The value is a UNIX timestamp. Unit: milliseconds.

156927362000
TaskParamsstring

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.
{"instanceId": "ddoscoo-cn-mp91j1ao****"}
TaskStatusinteger

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.
2
TaskResultstring

The execution 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.
{"instanceId": "ddoscoo-cn-mp91j1ao****","url": "https://****.oss-cn-beijing.aliyuncs.com/heap.bin?Expires=1584785140&OSSAccessKeyId=TMP.3KfzD82FyRJevJdEkRX6JEFHhbvRBBb75PZJnyJmksA2QkMm47xFAFDgMhEV8Nm6Vxr8xExMfiy9LsUFAcLcTBrN3r****&Signature=Sj8BNcsxJLE8l5qm4cjNlDt8gv****"}
TaskIdlong

The ID of the job.

1

Examples

Sample success responses

JSONformat

{
  "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 Service error codes.