Skip to content
v2.277.0

SubnetNetworkAclAssociationProps Struct ​

Properties to create a SubnetNetworkAclAssociation.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
import { aws_ec2 as interfaces_ec2 } from 'aws-cdk-lib/interfaces';

declare const networkAclRef: interfaces_ec2.INetworkAclRef;
declare const subnet: ec2.Subnet;
const subnetNetworkAclAssociationProps: ec2.SubnetNetworkAclAssociationProps = {
  networkAcl: networkAclRef,
  subnet: subnet,

  // the properties below are optional
  subnetNetworkAclAssociationName: 'subnetNetworkAclAssociationName',
};
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_ec2 as ec2
from aws_cdk.interfaces import aws_ec2 as interfaces_ec2

# network_acl_ref: interfaces_ec2.INetworkAclRef
# subnet: ec2.Subnet

subnet_network_acl_association_props = ec2.SubnetNetworkAclAssociationProps(
    network_acl=network_acl_ref,
    subnet=subnet,

    # the properties below are optional
    subnet_network_acl_association_name="subnetNetworkAclAssociationName"
)
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.ec2.*;
import software.amazon.awscdk.interfaces.ec2.*;

INetworkAclRef networkAclRef;
Subnet subnet;

SubnetNetworkAclAssociationProps subnetNetworkAclAssociationProps = SubnetNetworkAclAssociationProps.builder()
        .networkAcl(networkAclRef)
        .subnet(subnet)

        // the properties below are optional
        .subnetNetworkAclAssociationName("subnetNetworkAclAssociationName")
        .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.EC2;
using Amazon.CDK.Interfaces.EC2;

INetworkAclRef networkAclRef;
Subnet subnet;

var subnetNetworkAclAssociationProps = new SubnetNetworkAclAssociationProps {
    NetworkAcl = networkAclRef,
    Subnet = subnet,

    // the properties below are optional
    SubnetNetworkAclAssociationName = "subnetNetworkAclAssociationName"
};
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"
import "github.com/aws/aws-cdk-go/awscdk"

var networkAclRef INetworkAclRef
var subnet Subnet

subnetNetworkAclAssociationProps := &SubnetNetworkAclAssociationProps{
	NetworkAcl: networkAclRef,
	Subnet: subnet,

	// the properties below are optional
	SubnetNetworkAclAssociationName: jsii.String("subnetNetworkAclAssociationName"),
}

Properties ​

networkAclINetworkAclRefnetwork_aclINetworkAclRefnetworkAclINetworkAclRefNetworkAclINetworkAclRefNetworkAclINetworkAclRef required #
The Network ACL this association is defined for.
subnetISubnetsubnetISubnetsubnetISubnetSubnetISubnetSubnetISubnet required #
ID of the Subnet.
subnetNetworkAclAssociationNameoptionalstringsubnet_network_acl_association_nameoptionalstrsubnetNetworkAclAssociationNameoptionalStringSubnetNetworkAclAssociationNameoptionalstringSubnetNetworkAclAssociationNameoptional*string #
The name of the SubnetNetworkAclAssociation.

Default: If you don't specify a SubnetNetworkAclAssociationName, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.

It is not recommended to use an explicit name.