POST /firewalls/{id}/actions/apply_to_resources

Applies a Firewall to multiple resources.

Supported resources:

A server can be applied to a maximum of 5 Firewalls.

Error Codes specific to this Call

CodeDescription
firewall_already_appliedFirewall is already applied to resource
incompatible_network_typeThe network type of the resource is not supported by Firewalls
firewall_resource_not_foundThe resource the Firewall should be applied to was not found
private_net_only_serverThe Server the Firewall should be applied to has no public interface

Servers

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 type label_selector, otherwise null.

apply_to[].label_selector.selector String Yes

The selector.

apply_to[].type String Yes

Type of the resource.

Possible values:

  • "server"
  • "label_selector"
apply_to[].server Object No

Server the Firewall is applied to.

Only set for type server, otherwise null.

apply_to[].server.id Integer Yes

ID of the Server.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.