POST /firewalls/{id}/actions/apply_to_resources
Applies a Firewall to multiple resources.
Supported resources:
- Servers (with a public network interface)
- Label Selectors
A server can be applied to a maximum of 5 Firewalls.
Error Codes specific to this Call
Code | Description |
---|---|
firewall_already_applied | Firewall is already applied to resource |
incompatible_network_type | The network type of the resource is not supported by Firewalls |
firewall_resource_not_found | The resource the Firewall should be applied to was not found |
private_net_only_server | The Server the Firewall should be applied to has no public interface |
Servers
- https://api.hetzner.cloud/v1
Path parameters
Name | Type | Required | Description |
---|---|---|---|
id |
Integer | Yes |
ID of the Firewall. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
apply_to[] |
Array | Yes |
Resources to apply the Firewall to. Extends existing resources. |
apply_to[].label_selector |
Object | No |
Label Selector the Firewall is applied to. Only set for |
apply_to[].label_selector.selector |
String | Yes |
The selector. |
apply_to[].type |
String | Yes |
Type of the resource. Possible values:
|
apply_to[].server |
Object | No |
Server the Firewall is applied to. Only set for |
apply_to[].server.id |
Integer | Yes |
ID of the Server. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.