Skip to main content

firewalls

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

Overview

Namefirewalls
TypeResource
Iddigitalocean.droplets.firewalls

Fields

NameDatatypeDescription
idstringA unique ID that can be used to identify and reference a firewall.
namestringA human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-).
created_atstringA time value given in ISO8601 combined date and time format that represents when the firewall was created.
droplet_idsarrayAn array containing the IDs of the Droplets assigned to the firewall.
inbound_rulesarray
outbound_rulesarray
pending_changesarrayAn array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied.
statusstringA status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed".
tagsarrayAn array containing the names of the Tags assigned to the firewall.

Methods

NameAccessible byRequired ParamsDescription
droplets_list_firewallsSELECTdroplet_idTo retrieve a list of all firewalls available to a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/firewalls The response will be a JSON object that has a key called firewalls. This will be set to an array of firewall objects, each of which contain the standard firewall attributes.

SELECT examples

To retrieve a list of all firewalls available to a Droplet, send a GET request to /v2/droplets/$DROPLET_ID/firewalls The response will be a JSON object that has a key called firewalls. This will be set to an array of firewall objects, each of which contain the standard firewall attributes.

SELECT
id,
name,
created_at,
droplet_ids,
inbound_rules,
outbound_rules,
pending_changes,
status,
tags
FROM digitalocean.droplets.firewalls
WHERE droplet_id = '{{ droplet_id }}';