Skip to content
v2.278.0

CfnFirewallProps Struct ​

Properties for defining a CfnFirewall.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_networkfirewall as networkfirewall } from 'aws-cdk-lib';
const cfnFirewallProps: networkfirewall.CfnFirewallProps = {
  firewallName: 'firewallName',
  firewallPolicyArn: 'firewallPolicyArn',

  // the properties below are optional
  availabilityZoneChangeProtection: false,
  availabilityZoneMappings: [{
    availabilityZone: 'availabilityZone',
  }],
  deleteProtection: false,
  description: 'description',
  enabledAnalysisTypes: ['enabledAnalysisTypes'],
  firewallPolicyChangeProtection: false,
  natGatewayMappings: [{
    natGatewayId: 'natGatewayId',
  }],
  noSourcePreservation: false,
  proxySettings: {
    listenerProperties: [{
      port: 123,
      type: 'type',
    }],
  },
  subnetChangeProtection: false,
  subnetMappings: [{
    subnetId: 'subnetId',

    // the properties below are optional
    ipAddressType: 'ipAddressType',
  }],
  tags: [{
    key: 'key',
    value: 'value',
  }],
  transitGatewayId: 'transitGatewayId',
  vpcEndpoint: {
    subnetMappings: [{
      subnetId: 'subnetId',

      // the properties below are optional
      ipAddressType: 'ipAddressType',
    }],
    vpcId: 'vpcId',
  },
  vpcId: 'vpcId',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_networkfirewall as networkfirewall

cfn_firewall_props = networkfirewall.CfnFirewallProps(
    firewall_name="firewallName",
    firewall_policy_arn="firewallPolicyArn",

    # the properties below are optional
    availability_zone_change_protection=False,
    availability_zone_mappings=[networkfirewall.CfnFirewall.AvailabilityZoneMappingProperty(
        availability_zone="availabilityZone"
    )],
    delete_protection=False,
    description="description",
    enabled_analysis_types=["enabledAnalysisTypes"],
    firewall_policy_change_protection=False,
    nat_gateway_mappings=[networkfirewall.CfnFirewall.NatGatewayMappingProperty(
        nat_gateway_id="natGatewayId"
    )],
    no_source_preservation=False,
    proxy_settings=networkfirewall.CfnFirewall.ProxySettingsProperty(
        listener_properties=[networkfirewall.CfnFirewall.ListenerPropertyProperty(
            port=123,
            type="type"
        )]
    ),
    subnet_change_protection=False,
    subnet_mappings=[networkfirewall.CfnFirewall.SubnetMappingProperty(
        subnet_id="subnetId",

        # the properties below are optional
        ip_address_type="ipAddressType"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    transit_gateway_id="transitGatewayId",
    vpc_endpoint=networkfirewall.CfnFirewall.VpcEndpointProperty(
        subnet_mappings=[networkfirewall.CfnFirewall.SubnetMappingProperty(
            subnet_id="subnetId",

            # the properties below are optional
            ip_address_type="ipAddressType"
        )],
        vpc_id="vpcId"
    ),
    vpc_id="vpcId"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.networkfirewall.*;

CfnFirewallProps cfnFirewallProps = CfnFirewallProps.builder()
        .firewallName("firewallName")
        .firewallPolicyArn("firewallPolicyArn")

        // the properties below are optional
        .availabilityZoneChangeProtection(false)
        .availabilityZoneMappings(List.of(AvailabilityZoneMappingProperty.builder()
                .availabilityZone("availabilityZone")
                .build()))
        .deleteProtection(false)
        .description("description")
        .enabledAnalysisTypes(List.of("enabledAnalysisTypes"))
        .firewallPolicyChangeProtection(false)
        .natGatewayMappings(List.of(NatGatewayMappingProperty.builder()
                .natGatewayId("natGatewayId")
                .build()))
        .noSourcePreservation(false)
        .proxySettings(ProxySettingsProperty.builder()
                .listenerProperties(List.of(ListenerPropertyProperty.builder()
                        .port(123)
                        .type("type")
                        .build()))
                .build())
        .subnetChangeProtection(false)
        .subnetMappings(List.of(SubnetMappingProperty.builder()
                .subnetId("subnetId")

                // the properties below are optional
                .ipAddressType("ipAddressType")
                .build()))
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .transitGatewayId("transitGatewayId")
        .vpcEndpoint(VpcEndpointProperty.builder()
                .subnetMappings(List.of(SubnetMappingProperty.builder()
                        .subnetId("subnetId")

                        // the properties below are optional
                        .ipAddressType("ipAddressType")
                        .build()))
                .vpcId("vpcId")
                .build())
        .vpcId("vpcId")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.NetworkFirewall;

var cfnFirewallProps = new CfnFirewallProps {
    FirewallName = "firewallName",
    FirewallPolicyArn = "firewallPolicyArn",

    // the properties below are optional
    AvailabilityZoneChangeProtection = false,
    AvailabilityZoneMappings = new [] { new AvailabilityZoneMappingProperty {
        AvailabilityZone = "availabilityZone"
    } },
    DeleteProtection = false,
    Description = "description",
    EnabledAnalysisTypes = new [] { "enabledAnalysisTypes" },
    FirewallPolicyChangeProtection = false,
    NatGatewayMappings = new [] { new NatGatewayMappingProperty {
        NatGatewayId = "natGatewayId"
    } },
    NoSourcePreservation = false,
    ProxySettings = new ProxySettingsProperty {
        ListenerProperties = new [] { new ListenerPropertyProperty {
            Port = 123,
            Type = "type"
        } }
    },
    SubnetChangeProtection = false,
    SubnetMappings = new [] { new SubnetMappingProperty {
        SubnetId = "subnetId",

        // the properties below are optional
        IpAddressType = "ipAddressType"
    } },
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    TransitGatewayId = "transitGatewayId",
    VpcEndpoint = new VpcEndpointProperty {
        SubnetMappings = new [] { new SubnetMappingProperty {
            SubnetId = "subnetId",

            // the properties below are optional
            IpAddressType = "ipAddressType"
        } },
        VpcId = "vpcId"
    },
    VpcId = "vpcId"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnFirewallProps := &CfnFirewallProps{
	FirewallName: jsii.String("firewallName"),
	FirewallPolicyArn: jsii.String("firewallPolicyArn"),

	// the properties below are optional
	AvailabilityZoneChangeProtection: jsii.Boolean(false),
	AvailabilityZoneMappings: []interface{}{
		&AvailabilityZoneMappingProperty{
			AvailabilityZone: jsii.String("availabilityZone"),
		},
	},
	DeleteProtection: jsii.Boolean(false),
	Description: jsii.String("description"),
	EnabledAnalysisTypes: []*string{
		jsii.String("enabledAnalysisTypes"),
	},
	FirewallPolicyChangeProtection: jsii.Boolean(false),
	NatGatewayMappings: []interface{}{
		&NatGatewayMappingProperty{
			NatGatewayId: jsii.String("natGatewayId"),
		},
	},
	NoSourcePreservation: jsii.Boolean(false),
	ProxySettings: &ProxySettingsProperty{
		ListenerProperties: []interface{}{
			&ListenerPropertyProperty{
				Port: jsii.Number(123),
				Type: jsii.String("type"),
			},
		},
	},
	SubnetChangeProtection: jsii.Boolean(false),
	SubnetMappings: []interface{}{
		&SubnetMappingProperty{
			SubnetId: jsii.String("subnetId"),

			// the properties below are optional
			IpAddressType: jsii.String("ipAddressType"),
		},
	},
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	TransitGatewayId: jsii.String("transitGatewayId"),
	VpcEndpoint: &VpcEndpointProperty{
		SubnetMappings: []interface{}{
			&SubnetMappingProperty{
				SubnetId: jsii.String("subnetId"),

				// the properties below are optional
				IpAddressType: jsii.String("ipAddressType"),
			},
		},
		VpcId: jsii.String("vpcId"),
	},
	VpcId: jsii.String("vpcId"),
}

Properties ​

availabilityZoneChangeProtectionoptionalboolean | IResolvableavailability_zone_change_protectionoptionaltyping.Union[bool, IResolvable]availabilityZoneChangeProtectionoptionalBooleanAvailabilityZoneChangeProtectionoptionalboolAvailabilityZoneChangeProtectionoptionalinterface{} #
A setting indicating whether the firewall is protected against changes to its Availability Zone configuration.

When set to TRUE , you must first disable this protection before adding or removing Availability Zones.

availabilityZoneMappingsoptionalIResolvable | IResolvable | CfnFirewall.AvailabilityZoneMappingProperty[]availability_zone_mappingsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, AvailabilityZoneMappingProperty]]]availabilityZoneMappingsoptionalIResolvableAvailabilityZoneMappingsoptionalIResolvableAvailabilityZoneMappingsoptionalinterface{} #
The Availability Zones where the firewall endpoints are created for a transit gateway-attached firewall.

Each mapping specifies an Availability Zone where the firewall processes traffic.

deleteProtectionoptionalboolean | IResolvabledelete_protectionoptionaltyping.Union[bool, IResolvable]deleteProtectionoptionalBooleanDeleteProtectionoptionalboolDeleteProtectionoptionalinterface{} #
A flag indicating whether it is possible to delete the firewall.

A setting of TRUE indicates that the firewall is protected against deletion. Use this setting to protect against accidentally deleting a firewall that is in use. When you create a firewall, the operation initializes this flag to TRUE .

descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
A description of the firewall.
enabledAnalysisTypesoptionalstring[]enabled_analysis_typesoptionaltyping.List[str]enabledAnalysisTypesoptionalList<String>EnabledAnalysisTypesoptionalstring[]EnabledAnalysisTypesoptional*[]*string #
An optional setting indicating the specific traffic analysis types to enable on the firewall.
firewallNamestringfirewall_namestrfirewallNameStringFirewallNamestringFirewallName*string required #
The descriptive name of the firewall.

You can't change the name of a firewall after you create it.

firewallPolicyArnstring | IFirewallPolicyReffirewall_policy_arntyping.Union[str, IFirewallPolicyRef]firewallPolicyArnStringFirewallPolicyArnstringFirewallPolicyArninterface{} required #
The Amazon Resource Name (ARN) of the firewall policy.

The relationship of firewall to firewall policy is many to one. Each firewall requires one firewall policy association, and you can use the same firewall policy for multiple firewalls.

firewallPolicyChangeProtectionoptionalboolean | IResolvablefirewall_policy_change_protectionoptionaltyping.Union[bool, IResolvable]firewallPolicyChangeProtectionoptionalBooleanFirewallPolicyChangeProtectionoptionalboolFirewallPolicyChangeProtectionoptionalinterface{} #
A setting indicating whether the firewall is protected against a change to the firewall policy association.

Use this setting to protect against accidentally modifying the firewall policy for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE .

natGatewayMappingsoptionalIResolvable | IResolvable | CfnFirewall.NatGatewayMappingProperty[]nat_gateway_mappingsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, NatGatewayMappingProperty]]]natGatewayMappingsoptionalIResolvableNatGatewayMappingsoptionalIResolvableNatGatewayMappingsoptionalinterface{} #
The NAT gateways that the firewall proxies egress traffic through when NoSourcePreservation is true.
noSourcePreservationoptionalboolean | IResolvableno_source_preservationoptionaltyping.Union[bool, IResolvable]noSourcePreservationoptionalBooleanNoSourcePreservationoptionalboolNoSourcePreservationoptionalinterface{} #
Indicates whether the firewall operates in proxy mode, where the source IP address of traffic is not preserved.

When true, specify NatGatewayMappings and VpcEndpoint instead of the top-level VpcId and SubnetMappings. You can't change this setting after you create the firewall.

proxySettingsoptionalIResolvable | CfnFirewall.ProxySettingsPropertyproxy_settingsoptionaltyping.Union[IResolvable, ProxySettingsProperty]proxySettingsoptionalIResolvableProxySettingsoptionalIResolvableProxySettingsoptionalinterface{} #
The proxy listener configuration for a proxy-mode (no source preservation) firewall.
subnetChangeProtectionoptionalboolean | IResolvablesubnet_change_protectionoptionaltyping.Union[bool, IResolvable]subnetChangeProtectionoptionalBooleanSubnetChangeProtectionoptionalboolSubnetChangeProtectionoptionalinterface{} #
A setting indicating whether the firewall is protected against changes to the subnet associations.

Use this setting to protect against accidentally modifying the subnet associations for a firewall that is in use. When you create a firewall, the operation initializes this setting to TRUE .

subnetMappingsoptionalIResolvable | IResolvable | CfnFirewall.SubnetMappingProperty[]subnet_mappingsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, SubnetMappingProperty]]]subnetMappingsoptionalIResolvableSubnetMappingsoptionalIResolvableSubnetMappingsoptionalinterface{} #
The primary public subnets that Network Firewall is using for the firewall.
notes

Network Firewall creates a firewall endpoint in each subnet. Create a subnet mapping for each Availability Zone where you want to use the firewall.

These subnets are all defined for a single, primary VPC, and each must belong to a different Availability Zone. Each of these subnets establishes the availability of the firewall in its Availability Zone.

In addition to these subnets, you can define other endpoints for the firewall in VpcEndpointAssociation resources. You can define these additional endpoints for any VPC, and for any of the Availability Zones where the firewall resource already has a subnet mapping. VPC endpoint associations give you the ability to protect multiple VPCs using a single firewall, and to define multiple firewall endpoints for a VPC in a single Availability Zone.

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .

transitGatewayIdoptionalstringtransit_gateway_idoptionalstrtransitGatewayIdoptionalStringTransitGatewayIdoptionalstringTransitGatewayIdoptional*string #
The unique identifier of the transit gateway associated with this firewall.

This field is only present for transit gateway-attached firewalls.

vpcEndpointoptionalIResolvable | CfnFirewall.VpcEndpointPropertyvpc_endpointoptionaltyping.Union[IResolvable, VpcEndpointProperty]vpcEndpointoptionalIResolvableVpcEndpointoptionalIResolvableVpcEndpointoptionalinterface{} #
The VPC and subnets for a proxy-mode firewall's endpoint.

Provide this instead of the top-level VpcId and SubnetMappings when NoSourcePreservation is true.

vpcIdoptionalstring | IVPCRefvpc_idoptionaltyping.Union[str, IVPCRef]vpcIdoptionalStringVpcIdoptionalstringVpcIdoptionalinterface{} #
The unique identifier of the VPC where the firewall is in use.

You can't change the VPC of a firewall after you create the firewall.