Skip to content
v2.278.0

SubnetMappingProperty Struct ​

The ID for a subnet that you want to associate with the firewall.

AWS Network Firewall creates an instance of the associated firewall in each subnet that you specify, to filter traffic in the subnet's Availability Zone.

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 subnetMappingProperty: networkfirewall.CfnFirewall.SubnetMappingProperty = {
  subnetId: 'subnetId',

  // the properties below are optional
  ipAddressType: 'ipAddressType',
};
python
# 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

subnet_mapping_property = networkfirewall.CfnFirewall.SubnetMappingProperty(
    subnet_id="subnetId",

    # the properties below are optional
    ip_address_type="ipAddressType"
)
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.*;

SubnetMappingProperty subnetMappingProperty = SubnetMappingProperty.builder()
        .subnetId("subnetId")

        // the properties below are optional
        .ipAddressType("ipAddressType")
        .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 subnetMappingProperty = new SubnetMappingProperty {
    SubnetId = "subnetId",

    // the properties below are optional
    IpAddressType = "ipAddressType"
};
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"

subnetMappingProperty := &SubnetMappingProperty{
	SubnetId: jsii.String("subnetId"),

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

Properties ​

ipAddressTypeoptionalstringip_address_typeoptionalstripAddressTypeoptionalStringIpAddressTypeoptionalstringIpAddressTypeoptional*string #
The subnet's IP address type.

You can't change the IP address type after you create the subnet.

subnetIdstringsubnet_idstrsubnetIdStringSubnetIdstringSubnetId*string required #
The unique identifier for the subnet.