Skip to main content

firewalls

Creates, updates, deletes or gets a firewall resource or lists firewalls in a region

Overview

Namefirewalls
TypeResource
DescriptionResource type definition for AWS::NetworkFirewall::Firewall
Idawscc.networkfirewall.firewalls

Fields

NameDatatypeDescription
firewall_namestring
firewall_arnstringA resource ARN.
firewall_idstring
vpc_idstring
subnet_mappingsarray
availability_zone_mappingsarray
delete_protectionboolean
subnet_change_protectionboolean
availability_zone_change_protectionboolean
firewall_policy_change_protectionboolean
transit_gateway_idstring
descriptionstring
endpoint_idsarray
enabled_analysis_typesarrayThe types of analysis to enable for the firewall. Can be TLS_SNI, HTTP_HOST, or both.
tagsarray
regionstringAWS region.

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

Methods

NameResourceAccessible byRequired Params
create_resourcefirewallsINSERTFirewallName, FirewallPolicyArn, region
delete_resourcefirewallsDELETEIdentifier, region
update_resourcefirewallsUPDATEIdentifier, PatchDocument, region
list_resourcesfirewalls_list_onlySELECTregion
get_resourcefirewallsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual firewall.

SELECT
region,
firewall_name,
firewall_arn,
firewall_id,
firewall_policy_arn,
vpc_id,
subnet_mappings,
availability_zone_mappings,
delete_protection,
subnet_change_protection,
availability_zone_change_protection,
firewall_policy_change_protection,
transit_gateway_id,
description,
endpoint_ids,
enabled_analysis_types,
tags
FROM awscc.networkfirewall.firewalls
WHERE
region = '{{ region }}' AND
Identifier = '{{ firewall_arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.networkfirewall.firewalls (
FirewallName,
FirewallPolicyArn,
region
)
SELECT
'{{ firewall_name }}',
'{{ firewall_policy_arn }}',
'{{ 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 resource, using stack-deploy.

/*+ update */
UPDATE awscc.networkfirewall.firewalls
SET PatchDocument = string('{{ {
"FirewallPolicyArn": firewall_policy_arn,
"SubnetMappings": subnet_mappings,
"AvailabilityZoneMappings": availability_zone_mappings,
"DeleteProtection": delete_protection,
"SubnetChangeProtection": subnet_change_protection,
"AvailabilityZoneChangeProtection": availability_zone_change_protection,
"FirewallPolicyChangeProtection": firewall_policy_change_protection,
"TransitGatewayId": transit_gateway_id,
"Description": description,
"EnabledAnalysisTypes": enabled_analysis_types,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ firewall_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.networkfirewall.firewalls
WHERE
Identifier = '{{ firewall_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 firewalls resource, the following permissions are required:

ec2:CreateVpcEndpoint,
ec2:DescribeVpcEndpoints,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
iam:CreateServiceLinkedRole,
network-firewall:CreateFirewall,
network-firewall:DescribeFirewallPolicy,
network-firewall:DescribeRuleGroup,
network-firewall:TagResource,
network-firewall:AssociateSubnets,
network-firewall:AssociateAvailabilityZones,
network-firewall:AssociateFirewallPolicy,
network-firewall:DescribeFirewall