Creates an asynchronous export task to export forwarding rules for websites, port forwarding rules, session persistence and health check settings, anti-DDoS protection policies, IP address blacklist, or IP address whitelist.

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 CreateAsyncTask

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

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

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

If you set TaskType to 1, 3, 4, 5, or 6, the field in the value is described as follows:

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

If you set TaskType to 2, the field in the value is described as follows:

  • domain: the domain name of the website, which must be of the STRING type. If you do not specify this field, the forwarding rules of all websites are exported.
TaskType Integer Yes 5

The type of the asynchronous export 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 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
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
RequestId String 0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/? Action=CreateAsyncTask
&TaskParams={"instanceId": "ddoscoo-cn-mp91j1ao****"}
&TaskType=5
&<Common request parameters>

Sample success responses

XML format

<CreateAsyncTaskResponse>
	  <RequestId>0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc</RequestId>
</CreateAsyncTaskResponse>

JSON format

{
    "RequestId": "0bcf28g5-d57c-11e7-9bs0-d89d6717dxbc"
}

Error codes

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