Querying the Protection Status of a Firewall
Function
This API is used to query the protection status of a firewall.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/eip/protection-status/{fw_instance_id}
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
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
data |
FirewallProtectionStatusVO object |
Return value for querying the firewall protection status. |
trace_id |
String |
Call path ID. |
error_code |
String |
Error Code |
fail_reason |
String |
Error Cause |
error_description |
String |
Error description. |
Parameter |
Type |
Description |
---|---|---|
protection_status |
String |
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. |
failed_eip_list |
Array of strings |
EIPs where the kill switch (one-click unprotection) or one-click protection restoration failed. |
failed_eip_id_list |
Array of strings |
ID list of the EIPs where the kill switch (one-click unprotection) or one-click protection restoration failed. |
Example Requests
Query the protection status of the firewall whose ID is 713e174b-cea6-4190-8dfc-c83634eadf2d.
/cfw/v1/82ae1aa0-883c-4428-b2e1-2910798d95fd/eip/protection-status/713e174b-cea6-4190-8dfc-c83634eadf2d
Example Responses
Status code: 200
OK
{ "data": { "protection_status": "BYPASS_FAILED", "id": "713e174b-cea6-4190-8dfc-c83634eadf2d", "object_id": "82ae1aa0-883c-4428-b2e1-2910798d95fd", "failed_eip_list": [10.10.10.100, 10.10.10.101], "failed_eip_id_list": [0c45fa66-1dd3-459b-b6f3-55e6e2ccb31c, 1bb840a6-8158-45e6-8a76-279ec903887b] } }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot