# SubnetMappingProperty

The ID for a subnet that's used in an association with a firewall.

This is used in `CreateFirewall` , `AssociateSubnets` , and `CreateVpcEndpointAssociation` . 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.

- Source: Generated at build time
- Type last changed: v2.201.0 · 13 Jun 2025

## Example

TypeScript:

```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.CfnVpcEndpointAssociation.SubnetMappingProperty = {
  subnetId: 'subnetId',

  // the properties below are optional
  ipAddressType: 'ipAddressType',
};
```

Python:

```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.CfnVpcEndpointAssociation.SubnetMappingProperty(
    subnet_id="subnetId",

    # the properties below are optional
    ip_address_type="ipAddressType"
)
```

Java:

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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

- `ipAddressType`: string — The subnet's IP address type.

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

- `subnetId`: string (required) — The unique identifier for the subnet.
