Skip to main content

firewall_policies

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

Overview

Namefirewall_policies
TypeResource
Idaws.network_firewall.firewall_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
firewall_policyobjectThe policy for the specified firewall policy.
firewall_policy_responseobjectThe high-level properties of a firewall policy. This, along with the FirewallPolicy, define the policy. You can retrieve all objects for a firewall policy by calling DescribeFirewallPolicy.
update_tokenstringA token used for optimistic locking. Network Firewall returns a token to your requests that access the firewall policy. The token marks the state of the policy resource at the time of the request. To make changes to the policy, you provide the token in your request. Network Firewall uses the token to ensure that the policy hasn't changed since you last retrieved it. If it has changed, the operation fails with an InvalidTokenException. If this happens, retrieve the firewall policy again to get a current copy of it with current token. Reapply your changes as needed, then try the operation again using the new token. (pattern: <code>^([0-9a-f]{8})-([0-9a-f]{4}-){3}([0-9a-f]{12})$</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_firewall_policyselectregionReturns the data objects for the specified firewall policy.
list_firewall_policiesselectregionRetrieves the metadata for the firewall policies that you have defined. Depending on your setting for max results and the number of firewall policies, a single call might not return the full list.
create_firewall_policyinsertregion, FirewallPolicyName, FirewallPolicyCreates the firewall policy for the firewall according to the specifications. An Network Firewall firewall policy defines the behavior of a firewall, in a collection of stateless and stateful rule groups and other settings. You can use one firewall policy for multiple firewalls.
update_firewall_policyupdateregion, UpdateToken, FirewallPolicyUpdates the properties of the specified firewall policy.
associate_firewall_policyupdateregion, FirewallPolicyArnAssociates a FirewallPolicy to a Firewall. A firewall policy defines how to monitor and manage your VPC network traffic, using a collection of inspection rule groups and other settings. Each firewall requires one firewall policy association, and you can use the same firewall policy for multiple firewalls.
update_firewall_policy_change_protectionupdateregion, FirewallPolicyChangeProtectionModifies the flag, ChangeProtection, which indicates whether it is possible to change the firewall. If the flag is set to TRUE, the firewall is protected from changes. This setting helps protect against accidentally changing a firewall that's in use.
delete_firewall_policydeleteregionDeletes the specified FirewallPolicy.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the data objects for the specified firewall policy.

SELECT
firewall_policy,
firewall_policy_response,
update_token
FROM aws.network_firewall.firewall_policies
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates the firewall policy for the firewall according to the specifications. An Network Firewall firewall policy defines the behavior of a firewall, in a collection of stateless and stateful rule groups and other settings. You can use one firewall policy for multiple firewalls.

INSERT INTO aws.network_firewall.firewall_policies (
FirewallPolicyName,
FirewallPolicy,
Description,
Tags,
DryRun,
EncryptionConfiguration,
region
)
SELECT
'{{ FirewallPolicyName }}' /* required */,
'{{ FirewallPolicy }}' /* required */,
'{{ Description }}',
'{{ Tags }}',
{{ DryRun }},
'{{ EncryptionConfiguration }}',
'{{ region }}'
RETURNING
firewall_policy_response,
update_token
;

UPDATE examples

Updates the properties of the specified firewall policy.

UPDATE aws.network_firewall.firewall_policies
SET
UpdateToken = '{{ UpdateToken }}',
FirewallPolicyArn = '{{ FirewallPolicyArn }}',
FirewallPolicyName = '{{ FirewallPolicyName }}',
FirewallPolicy = '{{ FirewallPolicy }}',
Description = '{{ Description }}',
DryRun = {{ DryRun }},
EncryptionConfiguration = '{{ EncryptionConfiguration }}'
WHERE
region = '{{ region }}' --required
AND UpdateToken = '{{ UpdateToken }}' --required
AND FirewallPolicy = '{{ FirewallPolicy }}' --required
RETURNING
firewall_policy_response,
update_token;

DELETE examples

Deletes the specified FirewallPolicy.

DELETE FROM aws.network_firewall.firewall_policies
WHERE region = '{{ region }}' --required
;