Remove
Remove Rules from a Firewall
gpu_droplets.firewalls.rules.remove(strfirewall_id, RuleRemoveParams**kwargs)
/v2/firewalls/{firewall_id}/rules
To remove access rules from a firewall, send a DELETE request to
/v2/firewalls/$FIREWALL_ID/rules
. The body of the request may include an
inbound_rules
and/or outbound_rules
attribute containing an array of rules
to be removed.
No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data.
Parameters
firewall_id: str
Remove Rules from a Firewall
from gradient import Gradient
client = Gradient()
client.gpu_droplets.firewalls.rules.remove(
firewall_id="bb4b2611-3d72-467b-8602-280330ecd65c",
inbound_rules=[{
"protocol": "tcp",
"ports": "3306",
"sources": {
"droplet_ids": [49696269]
},
}],
outbound_rules=[{
"protocol": "tcp",
"ports": "3306",
"destinations": {
"droplet_ids": [49696269]
},
}],
)