Help Center/ Cloud Firewall/ API Reference/ API/ EIP Management/ Using the Kill Switch or Restoring Protection
Updated on 2025-08-12 GMT+08:00

Using the Kill Switch or Restoring Protection

Function

This API is used to enable the kill switch or restore protection.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/eip/protect/all/{fw_instance_id}/operation

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID, which can be obtained by calling an API or from the console. For details, see Obtaining a Project ID.

fw_instance_id

Yes

String

Firewall ID, which can be obtained by referring to Obtaining a Firewall ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

bypass_operation

No

String

Protection operation type. 1 indicates the kill switch (one-click unprotection) is used. 0 indicates one-click protection restoration.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

data

data object

Return value of the kill switch (one-click unprotection) or one-click protection restoration

trace_id

String

Call path ID.

error_code

String

Error Code

fail_reason

String

Error Cause

error_description

String

Error description.

Table 4 data

Parameter

Type

Description

protection_status

Integer

Firewall protection status: 0 (normal), 1 (bypass in progress), 2 (bypass succeeded), 3 (bypass failed), 4 (recovery in progress), or 5 (recovery failed).

id

String

Firewall ID.

object_id

String

Protected object ID.

Example Requests

Use the kill switch to disable the protection of the EIPs protected by the firewall instance whose ID is 713e174b-cea6-4190-8dfc-c83634eadf2d.

/cfw/v1/82ae1aa0-883c-4428-b2e1-2910798d95fd/eip/protect/all/713e174b-cea6-4190-8dfc-c83634eadf2d/operation

{
  "bypass_operation" : 1
}

Example Responses

Status code: 200

OK

{
  "data" : {
    "protection_status" : 1,
    "id" : "713e174b-cea6-4190-8dfc-c83634eadf2d",
    "object_id" : "82ae1aa0-883c-4428-b2e1-2910798d95fd"
  }
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.