You can call this operation to perform queries on asynchronous tasks.

Request parameters

Name Type Required Description
TaskType Integer No The type of the task that you want to query. Valid values:
  • 1: A value of 1 indicates that the task is to export multiple layer 4 forwarding rules.
  • 2: A value of 2 indicates that the task is to export multiple layer 7 forwarding rules.
  • 3: A value of 3 indicates that the task is to export session and health check settings.
  • 4: A value of 4 indicates that the task is to export anti-DDoS protection policies.
Note If this parameter is not specified, all types of tasks are returned.
TaskStatus Integer No The status of the task that you want to query. Valid values:
  • 0: A value of 0 indicates that the task is initializing.
  • 1: A value of 1 indicates that the task is in progress.
  • 2: A value of 2 indicates that the task is successful.
  • 3: A value of 3 indicates that the task has failed.
Note If this parameter is not specified, tasks of all statuses are returned.
PageNo Integer Yes The number of the starting page that is displayed. Must be an integer no less than 1.
PageSize Integer Yes The number of records per page. Maximum value: 20.

Response parameters

Name Type Description
RequestId String The GUID generated by Alibaba Cloud for the request.
Total Integer The total number of domain names.
AsyncTasks []AsyncTask The list of tasks. For more information, see AsyncTask.
Table 1. AsyncTask
Name Type Description
TaskId Long The ID of the task. You can delete tasks by ID.
TaskType Integer The type of the task. Valid values:
  • 1: A value of 1 indicates that the task is to export multiple layer 4 forwarding rules.
  • 2: A value of 2 indicates that the task is to export multiple layer 7 forwarding rules.
  • 3: A value of 3 indicates that the task is to export session and health check settings.
  • 4: A value of 4 indicates that the task is to export anti-DDoS protection policies.
TaskStatus Integer The status of the task. Valid values:
  • 0: A value of 0 indicates that the task is initializing.
  • 1: A value of 1 indicates that the task is in progress.
  • 2: A value of 2 indicates that the task is successful.
  • 3: A value of 3 indicates that the task has failed.
StartTime Long The start timestamp of the task. Unit: milliseconds.
EndTime Long The end timestamp of the task. Unit: milliseconds.
TaskParams TaskParam The task parameter represented as a JSONObject string. For more information, see TaskParam.
TaskResult TaskResult The task execution result represented as a JSONObject string. For more information, see TaskResult.
Table 2. TaskParam
Name Type Description
instanceId String The ID of the Anti-DDoS Pro instance.
domain String The domain name.
Table 3. TaskResult
Name Type Description
instanceId String The ID of the Anti-DDoS Pro instance.
url String The OSS URL where the files were downloaded.

Examples

Sample requests
{
  "TaskType": 1,
  "TaskStatus": 0,
  "PageNo":1,
  "PageSize":10
}
Sample responses
{
  "Total": 2,
  "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc",
  "AsyncTasks": [
  	{
		"TaskId": 1,
	    "TaskType": 1,
	    "TaskStatus": 2,
	    "StartTime": 156927362,
	 	"EndTime": 156927362
	    "TaskParams": "{}", // Layer 4 task: {"instanceId": "ddoscoo-1234-qrq2134"}, Layer 7 task: {"domain": "www.aliyun.com"}
  	    "TaskResult": "{}" // Layer 4 task: {"instanceId": "ddoscoo-1234-qrq2134", "url": "https://oss.xxx.xxx"}, Layer 7 task: {"domain": "www.aliyun.com", "url": "https://oss.xxx.xxx"}, Session and health check task: {"instanceId": "ddoscoo-1234-qrq2134", "url": "https://oss.xxx.xxx"}, Anti-DDoS protection policy task: {"instanceId": "ddoscoo-1234-qrq2134", "url": "https://oss.xxx.xxx"}
	}
  ]
}