Skip to main content

firewall_devices

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

Overview

Namefirewall_devices
TypeResource
Idlinode.networking.firewall_devices

Fields

The following fields are returned by SELECT queries:

The requested Firewall Device.

NameDatatypeDescription
idintegerFilterable The device's unique ID.
createdstring (date-time)Filterable, Read-only When this device was created. (example: 2018-01-01T00:01:01)
entityobjectRead-only The compute service or interface this firewall is assigned to.
updatedstring (date-time)Filterable, Read-only When this device was last updated. (example: 2018-01-02T00:01:01)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_firewall_deviceselectReturns information for a Firewall Device, which assigns a Firewall to a service (referred to as the Device's entity).

Learn more...

Learn more...
get_firewall_devicesselectpage, page_sizeReturns a paginated list of a firewall's devices. A firewall device assigns a firewall to a service (referred to as the device's entity).

Learn more...

Learn more...
post_firewall_deviceinsertdata__id, data__typeCreates a firewall device, which assigns a firewall to a service (referred to as the device's entity) and applies the firewall's rules to the device.

- Currently, devices with linode, interface, and nodebalancer entity types are accepted.
- The linode type is not allowed for Linodes using Linode interfaces.
- The interface type is not allowed for legacy config interfaces. For VPC and public legacy config profile interfaces, the firewall is applied through the linode device.

- Firewalls only apply to inbound TCP traffic to NodeBalancers.

- A firewall can be assigned to multiple services at a time.

- A service can have one assigned firewall at a time.

- Assigned Linodes must not have any ongoing live migrations.

- A firewall_device_add event is generated when the firewall device is added successfully.

Learn more...

Learn more...
delete_firewall_devicedeleteRemoves a Firewall Device, which removes a Firewall from the service it was assigned to by the Device. This removes all of the Firewall's Rules from the service. If any other Firewalls have been assigned to the service, then those Rules remain in effect.

- Assigned Linodes must not have any ongoing live migrations.

- A firewall_device_remove Event is generated when the Firewall Device is removed successfully.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pageintegerThe page of a collection to return.
page_sizeintegerThe number of items to return per page.

SELECT examples

Returns information for a Firewall Device, which assigns a Firewall to a service (referred to as the Device's entity).

Learn more...

Learn more...

SELECT
id,
created,
entity,
updated
FROM linode.networking.firewall_devices;

INSERT examples

Creates a firewall device, which assigns a firewall to a service (referred to as the device's entity) and applies the firewall's rules to the device.

- Currently, devices with linode, interface, and nodebalancer entity types are accepted.
- The linode type is not allowed for Linodes using Linode interfaces.
- The interface type is not allowed for legacy config interfaces. For VPC and public legacy config profile interfaces, the firewall is applied through the linode device.

- Firewalls only apply to inbound TCP traffic to NodeBalancers.

- A firewall can be assigned to multiple services at a time.

- A service can have one assigned firewall at a time.

- Assigned Linodes must not have any ongoing live migrations.

- A firewall_device_add event is generated when the firewall device is added successfully.

Learn more...

Learn more...

INSERT INTO linode.networking.firewall_devices (
data__id,
data__type
)
SELECT
{{ id }} --required,
'{{ type }}' --required
RETURNING
id,
created,
entity,
updated
;

DELETE examples

Removes a Firewall Device, which removes a Firewall from the service it was assigned to by the Device. This removes all of the Firewall's Rules from the service. If any other Firewalls have been assigned to the service, then those Rules remain in effect.

- Assigned Linodes must not have any ongoing live migrations.

- A firewall_device_remove Event is generated when the Firewall Device is removed successfully.

Learn more...

Learn more...

DELETE FROM linode.networking.firewall_devices;