Help Center/ Cloud Firewall/ API Reference (Kuala Lumpur Region)/ API/ EIP Management/ Obtaining the Automatic EIP Protection Status
Updated on 2025-11-21 GMT+08:00

Obtaining the Automatic EIP Protection Status

Function

This API is used to obtain the automatic EIP protection status.

URI

GET /v1/{project_id}/eip/auto-protect-status/{object_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

object_id

Yes

String

Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the API for querying firewall instances. In the return value, find the ID in data.records.protect_objects.object_id (The period [.] is used to separate different levels of objects). If type is 0, object_id is the ID of a protected object on the Internet border. If type is 1, object_id is the ID of a protected object on the VPC border. Here, a protected object ID whose type is 1 is used. You can obtain the value of type from data.records.protect_objects.type (The period [.] is used to separate different levels of objects).

project_id

Yes

String

Project ID, which can be obtained by calling an API or from the console. You can obtain it by referring to Obtaining a Project ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Enterprise project ID, which is the ID of a project planned based on organizations. If the enterprise project function is not enabled, the value is 0.

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 (value of X-Subject-Token in the response header).

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

FirewallStatusVO object

Firewall status object.

Table 5 FirewallStatusVO

Parameter

Type

Description

available_eip_count

Integer

Number of EIPs that can be protected.

beyond_max_count

Boolean

Whether the number of EIPs exceeds the upper limit.

eip_protected_self

Integer

Number of protected EIPs.

eip_total

Integer

Total EIPs.

eip_un_protected

Integer

Number of unprotected EIPs.

object_id

String

Protected object ID.

status

Integer

Whether to enable automatic protection for new EIPs: 1 (yes), 0 (no).

Example Requests

Obtain the automatic EIP protection status of the project whose ID is 408972e72dcd4c1a9b033e955802a36b. The firewall ID is e743cfaf-8164-4807-aa13-d893d83313cf, the enterprise project ID is fb55459c-41b3-47fc-885d-540946fddda4, and the target object ID is 1b90f031-0c7b-4f25-95e2-b6d9940d269e.

https://{Endpoint}/v1/408972e72dcd4c1a9b033e955802a36b/eip/auto-protect-status/1b90f031-0c7b-4f25-95e2-b6d9940d269e?fw_instance_id=e743cfaf-8164-4807-aa13-d893d83313cf&enterprise_project_id=fb55459c-41b3-47fc-885d-540946fddda4&object_id=1b90f031-0c7b-4f25-95e2-b6d9940d269e&project_id=408972e72dcd4c1a9b033e955802a36b

Example Responses

Status code: 200

OK

{
  "data" : {
    "available_eip_count" : 50,
    "beyond_max_count" : false,
    "eip_protected_self" : 15,
    "eip_total" : 24,
    "eip_un_protected" : 9,
    "object_id" : "1b90f031-0c7b-4f25-95e2-b6d9940d269e",
    "status" : 1
  }
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized: Request error.

403

Forbidden: Access forbidden.

404

Not Found: Web page not found.

Error Codes

See Error Codes.