Skip to main content

firewalls

Creates, updates, deletes, gets or lists a firewalls resource.

Overview

Namefirewalls
TypeResource
Iddigitalocean.firewalls.firewalls

Fields

NameDatatypeDescription
column_anon``

Methods

NameAccessible byRequired ParamsDescription
firewalls_getSELECTfirewall_idTo show information about an existing firewall, send a GET request to /v2/firewalls/$FIREWALL_ID.
firewalls_listSELECTTo list all of the firewalls available on your account, send a GET request to /v2/firewalls.
firewalls_createINSERTTo create a new firewall, send a POST request to /v2/firewalls. The request must contain at least one inbound or outbound access rule.
firewalls_deleteDELETEfirewall_idTo delete a firewall send a DELETE request to /v2/firewalls/$FIREWALL_ID. 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.
firewalls_updateEXECfirewall_idTo update the configuration of an existing firewall, send a PUT request to /v2/firewalls/$FIREWALL_ID. The request should contain a full representation of the firewall including existing attributes. Note that any attributes that are not provided will be reset to their default values.

SELECT examples

To list all of the firewalls available on your account, send a GET request to /v2/firewalls.

SELECT
column_anon
FROM digitalocean.firewalls.firewalls
;

INSERT example

Use the following StackQL query and manifest file to create a new firewalls resource.

/*+ create */
INSERT INTO digitalocean.firewalls.firewalls (
data__name,
data__droplet_ids,
data__tags,
data__inbound_rules,
data__outbound_rules
)
SELECT
'{{ name }}',
'{{ droplet_ids }}',
'{{ tags }}',
'{{ inbound_rules }}',
'{{ outbound_rules }}'
;

DELETE example

Deletes the specified firewalls resource.

/*+ delete */
DELETE FROM digitalocean.firewalls.firewalls
WHERE firewall_id = '{{ firewall_id }}';