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_firewall_rules
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. (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. (example: DROP) |
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_firewall_rules | select | Returns the inbound and outbound Rules for a Firewall. Learn more... Learn more... | ||
put_firewall_rules | replace | 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 |
---|
SELECT
examples
- get_firewall_rules
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;
REPLACE
examples
- put_firewall_rules
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
data__inbound = '{{ inbound }}',
data__inbound_policy = '{{ inbound_policy }}',
data__outbound = '{{ outbound }}',
data__outbound_policy = '{{ outbound_policy }}'
WHERE
RETURNING
fingerprint,
inbound,
inbound_policy,
outbound,
outbound_policy,
version;