firewall_rules
Creates, updates, deletes, gets or lists a firewall_rules resource.
Overview
| Name | firewall_rules |
| Type | Resource |
| Id | linode.networking.firewall_rules |
Fields
The following fields are returned by SELECT queries:
- get
The requested Firewall Rules.
| Name | Datatype | Description |
|---|---|---|
fingerprint | string | Read-only The fingerprint is a 32-bit hash. It represents the firewall rules as an 8 character hex string. You can use fingerprint to compare rule versions. (example: 997dd135) |
inbound | array | The inbound rules for the firewall, as a JSON array. (x-linode-cli-format: json) |
inbound_policy | string | The default behavior for inbound traffic. This setting can be overridden by updating the inbound.action property of the Firewall Rule. (ACCEPT, DROP) (example: DROP) |
outbound | array | The outbound rules for the firewall, as a JSON array. (x-linode-cli-format: json) |
outbound_policy | string | The default behavior for outbound traffic. This setting can be overridden by updating the outbound.action property of the Firewall Rule. (ACCEPT, DROP) (example: ACCEPT) |
version | integer | Read-only The firewall's rule version. The first version is 1. The version number is incremented when the firewall's rules change. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | firewallId | Returns the inbound and outbound Rules for a Firewall. Learn more... Learn more... | |
update | replace | firewallId | Updates the inbound and outbound Rules for a Firewall. - Assigned Linodes must not have any ongoing live migrations. - Note. This operation replaces all of a Firewall's inbound and outbound rulesets with the values specified in your request.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 |
|---|---|---|
firewallId | string | ID of the Firewall to access. |
SELECT examples
- get
Returns the inbound and outbound Rules for a Firewall.
Learn more...
Learn more...
SELECT
fingerprint,
inbound,
inbound_policy,
outbound,
outbound_policy,
version
FROM linode.networking.firewall_rules
WHERE firewallId = '{{ firewallId }}' -- required
;
REPLACE examples
- update
Updates the inbound and outbound Rules for a Firewall.
- Assigned Linodes must not have any ongoing live migrations.
- Note. This operation replaces all of a Firewall's inbound and outbound rulesets with the values specified in your request.
Learn more...
Learn more...
REPLACE linode.networking.firewall_rules
SET
inbound = '{{ inbound }}',
outbound = '{{ outbound }}',
inbound_policy = '{{ inbound_policy }}',
outbound_policy = '{{ outbound_policy }}'
WHERE
firewallId = '{{ firewallId }}' --required
RETURNING
fingerprint,
inbound,
inbound_policy,
outbound,
outbound_policy,
version;