Updated on 2025-10-09 GMT+08:00

Querying Anti-DDoS Policies

Function

This API enables you to query configured Anti-DDoS defense policies. You can query the policy of a specified EIP.

Calling Method

For details, see Calling APIs.

URI

GET /v1/{project_id}/antiddos/{floating_ip_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

floating_ip_id

Yes

String

ID corresponding to the EIP of a user.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

ip

No

String

EIP of a user.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Content-Type

Yes

String

Content-Type request header.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

enable_L7

Boolean

Whether to enable layer-7 protection. The value is fixed to false.

traffic_pos_id

Long

Position ID of traffic. The options are as follows: 1: 10 Mbit/s; 2: 30 Mbit/s; 3: 50 Mbit/s; 4: 70 Mbit/s; 5: 100 Mbit/s; 6: 150 Mbit/s; 7: 200 Mbit/s; 8: 250 Mbit/s; 9: 300 Mbit/s; 10: 500 Mbit/s; 11: 800 Mbit/s;88: 1,000 Mbit/s; 99: default protection

http_request_pos_id

Long

Segment ID of the HTTP request counts. The value is fixed to 1.

cleaning_access_pos_id

Long

Position ID of access limit during cleaning. The options are as follows: 1: 10 Mbit/s; 2: 30 Mbit/s; 3: 50 Mbit/s; 4: 70 Mbit/s; 5: 100 Mbit/s; 6: 150 Mbit/s; 7: 200 Mbit/s; 8: 250 Mbit/s; 9: 300 Mbit/s; 10: 500 Mbit/s; 11: 800 Mbit/s;88: 1,000 Mbit/s; 99: default protection

app_type_id

Long

Application type ID. The value is fixed to 0.

antiddos_config_name

String

Protection level name.

antiddos_config_id

String

Protection level ID.

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "enable_L7" : false,
  "traffic_pos_id" : 8,
  "http_request_pos_id" : 8,
  "cleaning_access_pos_id" : 8,
  "app_type_id" : 1,
  "antiddos_config_name" : "test",
  "antiddos_config_id" : "1234567890"
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.