Help Center/ Anti-DDoS/ API Reference/ API/ DDoS Protection Management/ Querying the List of a User's EIP Defense Statuses
Updated on 2025-10-09 GMT+08:00

Querying the List of a User's EIP Defense Statuses

Function

This API enables you to query the defense statuses of all EIPs, regardless whether an EIP has been bound to an Elastic Cloud Server (ECS) or not.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/antiddos

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

status

No

String

Values:

  • normal: normal

  • configging: configuration in progress

  • notConfig: not configured

  • packetcleaning: cleaning

  • packetdropping: blackhole

If this parameter is not specified, the defense statuses of all ECSs are displayed in the Neutron-queried order by default.

limit

No

String

Maximum number of returned results. The value ranges from 1 to 100.

offset

No

String

Offset. The value ranges from 0 to 2147483647.

ips

No

String

IP address, which can be in IPv4 or IPv6 format. Partial query is supported. For example, if you enter ?ip=192.168, the EIP protection status of 192.168.111.1 and 10.192.168.8 will be returned.

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

total

Integer

Total number of EIPs.

ddosStatus

Array of EipDDosStatus objects

Protection status list.

Table 5 EipDDosStatus

Parameter

Type

Description

floating_ip_id

String

EIP ID.

floating_ip_address

String

Floating IP address.

product_type

String

EIP type. The value can be:

  • Anti-DDoS: The EIP is protected by Anti-DDoS.

  • CNAD: The EIP is protected by Cloud Native Anti-DDoS (CNAD).

status

String

Protection status. The options are as follows:

  • normal: normal

  • configging: configuration in progress

  • notConfig: not configured

  • packetcleaning: cleaning

  • packetdropping: blackhole

clean_threshold

Long

Cleaning threshold.

block_threshold

String

Blackhole threshold.

Example Requests

None

Example Responses

Status code: 200

Request succeeded.

{
  "total" : 2,
  "ddosStatus" : [ {
    "floating_ip_id" : "xxxxxxxx-xxxx-4947-9fa8-dda843ae5d1d",
    "floating_ip_address" : "10.10.10.10",
    "status" : "normal",
    "product_type" : "CNAD",
    "clean_threshold" : 1000,
    "block_threshold" : ">=20Gbps"
  }, {
    "floating_ip_id" : "xxxxxxxx-xxxx-4d33-a2dc-2ace2d0283de",
    "floating_ip_address" : "11.11.11.11",
    "status" : "normal",
    "product_type" : "Anti-DDoS",
    "clean_threshold" : 120,
    "block_threshold" : ">=20Gbps"
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.