Help Center> Anti-DDoS Service> API Reference> API> Default Protection Policy Management> Configuring the Default Protection Policy for Newly Purchased Public IP Addresses
Updated on 2023-06-19 GMT+08:00

Configuring the Default Protection Policy for Newly Purchased Public IP Addresses

Function

This API enables you to configure the default protection policy. After a protection policy is configured, it applies to the newly purchased public IP addresses.

URI

POST /v1/{project_id}/antiddos/default-config

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

poject id

Minimum: 32

Maximum: 64

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

token

Minimum: 32

Maximum: 2097152

Content-Type

Yes

String

Content-Type请求头

Default: application/json;charset=utf8

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

enable_L7

Yes

Boolean

Whether L7 defense has been enabled

traffic_pos_id

Yes

Long

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

http_request_pos_id

Yes

Long

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

cleaning_access_pos_id

Yes

Long

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

app_type_id

Yes

Long

Application type ID.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Internal error code

error_msg

String

Internal error description

Example Requests

{
  "app_type_id" : 0,
  "cleaning_access_pos_id" : 8,
  "enable_L7" : false,
  "http_request_pos_id" : 1,
  "traffic_pos_id" : 1
}

Example Responses

Status code: 200

OK

{
  "error_code" : "10000000",
  "error_msg" : "Ok",
  "task_id" : ""
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.