Enabling Anti-DDoS

Functions

This asynchronous API allows you to enable the Anti-DDoS traffic scrubbing. Successfully invoking this API only means that the service node has received the enabling request. You need to use the task querying API to check the task execution status. For details about the task querying API, see Querying Anti-DDoS Tasks.

URI

Request

Table 1 Parameter description

Parameter

Mandatory

Type

Description

enable_L7

No

Boolean

Whether to enable L7 defense

traffic_pos_id

Yes

Integer

Position ID of traffic. The value ranges from 1 to 9 and 33 to 36.

http_request_pos_id

Yes

Integer

Position ID of number of HTTP requests. The value ranges from 1 to 15 and 33 to 36.

cleaning_access_pos_id

Yes

Integer

Position ID of access limit during cleaning. The value ranges from 1 to 8 and 33 to 36.

app_type_id

No

Integer

Application type ID. Possible values:
  • 0
  • 1

If values of traffic_pos_id, http_request_pos_id, cleaning_access_pos_id are set between 33 to 36, their values must be the same.

Response

Table 2 Parameter description

Name

Type

Description

error_code

String

Internal error code

error_description

String

Internal error description

task_id

String

ID of a task. This ID can be used to query the status of the task.

This field is reserved for use in task auditing later. It is temporarily unused.

Example

Status Code

See Status Code.