firewall_devices
Creates, updates, deletes, gets or lists a firewall_devices resource.
Overview
| Name | firewall_devices |
| Type | Resource |
| Id | linode.networking.firewall_devices |
Fields
The following fields are returned by SELECT queries:
- get
- list
The requested Firewall Device.
| Name | Datatype | Description |
|---|---|---|
id | integer | Filterable The device's unique ID. |
created | string (date-time) | Filterable, Read-only When this device was created. (example: 2025-01-01T00:01:01) |
entity | object | The Linode, NodeBalancer, or Linode interface this firewall is assigned to. |
updated | string (date-time) | Filterable, Read-only When this device was last updated. (example: 2025-01-02T00:01:01) |
A paginated list of Firewall Devices.
| Name | Datatype | Description |
|---|---|---|
id | integer | Filterable The device's unique ID. |
created | string (date-time) | Filterable, Read-only When this device was created. (example: 2025-01-01T00:01:01) |
entity | object | The Linode, NodeBalancer, or Linode interface this firewall is assigned to. |
updated | string (date-time) | Filterable, Read-only When this device was last updated. (example: 2025-01-02T00:01:01) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | firewallId, deviceId | Returns information for a Firewall Device, which assigns a Firewall to a service (referred to as the Device's entity).Learn more... Learn more... | |
list | select | firewallId | page, page_size | Returns 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... |
create | insert | firewallId, id, type | 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, linode_interface, and nodebalancer entity types are accepted.- The linode type is not allowed for Linodes using Linode interfaces.- The linode_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 | delete | firewallId, deviceId | 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... |
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.
| Name | Datatype | Description |
|---|---|---|
deviceId | string | ID of the Firewall Device to access. |
firewallId | string | ID of the Firewall to access. |
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT examples
- get
- list
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
WHERE firewallId = '{{ firewallId }}' -- required
AND deviceId = '{{ deviceId }}' -- required
;
Returns 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...
SELECT
id,
created,
entity,
updated
FROM linode.networking.firewall_devices
WHERE firewallId = '{{ firewallId }}' -- required
AND page = '{{ page }}'
AND page_size = '{{ page_size }}'
;
INSERT examples
- create
- Manifest
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, linode_interface, and nodebalancer entity types are accepted.
- The linode type is not allowed for Linodes using Linode interfaces.
- The linode_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 (
id,
type,
firewallId
)
SELECT
{{ id }} /* required */,
'{{ type }}' /* required */,
'{{ firewallId }}'
RETURNING
id,
created,
entity,
updated
;
# Description fields are for documentation purposes
- name: firewall_devices
props:
- name: firewallId
value: "{{ firewallId }}"
description: Required parameter for the firewall_devices resource.
- name: id
value: {{ id }}
description: |
The entity's ID.
- name: type
value: "{{ type }}"
description: |
The entity's type.
valid_values: ['linode', 'nodebalancer', 'linode_interface']
DELETE examples
- delete
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
WHERE firewallId = '{{ firewallId }}' --required
AND deviceId = '{{ deviceId }}' --required
;