Skip to main content

firewall_policies

Creates, updates, deletes or gets a firewall_policy resource or lists firewall_policies in a region

Overview

Namefirewall_policies
TypeResource
DescriptionResource type definition for AWS::NetworkFirewall::FirewallPolicy
Idawscc.networkfirewall.firewall_policies

Fields

NameDatatypeDescription
firewall_policy_namestring
firewall_policy_arnstringA resource ARN.
firewall_policyobjectResource type definition for AWS::NetworkFirewall::FirewallPolicy
firewall_policy_idstring
descriptionstring
tagsarray
regionstringAWS region.

For more information, see AWS::NetworkFirewall::FirewallPolicy.

Methods

NameResourceAccessible byRequired Params
create_resourcefirewall_policiesINSERTFirewallPolicyName, FirewallPolicy, region
delete_resourcefirewall_policiesDELETEIdentifier, region
update_resourcefirewall_policiesUPDATEIdentifier, PatchDocument, region
list_resourcesfirewall_policies_list_onlySELECTregion
get_resourcefirewall_policiesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual firewall_policy.

SELECT
region,
firewall_policy_name,
firewall_policy_arn,
firewall_policy,
firewall_policy_id,
description,
tags
FROM awscc.networkfirewall.firewall_policies
WHERE
region = '{{ region }}' AND
Identifier = '{{ firewall_policy_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new firewall_policy resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.networkfirewall.firewall_policies (
FirewallPolicyName,
FirewallPolicy,
region
)
SELECT
'{{ firewall_policy_name }}',
'{{ firewall_policy }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a firewall_policy resource, using stack-deploy.

/*+ update */
UPDATE awscc.networkfirewall.firewall_policies
SET PatchDocument = string('{{ {
"FirewallPolicy": firewall_policy,
"Description": description,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ firewall_policy_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.networkfirewall.firewall_policies
WHERE
Identifier = '{{ firewall_policy_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the firewall_policies resource, the following permissions are required:

network-firewall:CreateFirewallPolicy,
network-firewall:DescribeFirewallPolicy,
network-firewall:ListTLSInspectionConfigurations,
network-firewall:TagResource,
network-firewall:ListRuleGroups