Skip to content

Delete Firewall Rule From Virtual Machine

Remove a specific network security policy by deleting an existing firewall rule from a virtual machine instance. Both the instance identifier and rule identifier are required for precise rule removal.

HTTP Request

DELETE {API_URL}/virtual-machines/{id}/firewall-rules/{rule_id}

Path Parameters

ParameterRequirementTypeDescription
idRequiredstringTarget virtual machine's unique identifier
rule_idRequiredstringTarget firewall rule's unique identifier

Response Structure

status boolean

Operation result indicator. Returns true for successful execution, false when encountering an error.

message string

Descriptive response indicating the outcome of the rule deletion request.

Implementation Example

Request

bash
curl -X DELETE '{API_URL}virtual-machines/{id}/firewall-rules/{rule_id}' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json'

Response

json
{
    "status": true,
    "message": "Firewall rule successfully removed"
}