Firewall Actions
Set Rules
Set the rules of a Firewall.
Overwrites the existing rules with the given ones. Pass an empty array to remove all rules.
Rules are limited to 50 entries per Firewall and 500 effective rules.
post/firewalls/{id}/actions/set_rules
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/firewalls/{id}/actions/set_rules
- Auth: HTTP bearer
Path parameters
idinteger required
ID of the Firewall.
Example:42
ID of the Firewall.
Request body
Example request
{
"rules": [
{
"direction": "in",
"source_ips": [
"192.0.2.2/32",
"192.0.2.0/24",
"2001:0db8:9a3b:ee58:5ca:990c:8bc9:c03b/128"
],
"destination_ips": [],
"port": "80"
}
]
}Response
Request succeeded.
Example response
{
"actions": [
{
"id": 42,
"command": "start_resource",
"started": "2016-01-30T23:55:00Z",
"finished": "2016-01-30T23:55:00Z",
"progress": 100,
"resources": [
{
"id": 42,
"type": "server"
}
],
"error": {
"code": "action_failed",
"message": "Action failed"
}
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.