NetworkAclProps
- class aws_cdk.aws_ec2.NetworkAclProps(*, vpc, network_acl_name=None, subnet_selection=None)
Bases:
object
Properties to create NetworkAcl.
- Parameters:
vpc (
IVpc
) – The VPC in which to create the NetworkACL.network_acl_name (
Optional
[str
]) – The name of the NetworkAcl. It is not recommended to use an explicit name. Default: If you don’t specify a networkAclName, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.subnet_selection (
Union
[SubnetSelection
,Dict
[str
,Any
],None
]) – Subnets in the given VPC to associate the ACL with. More subnets can always be added later by callingassociateWithSubnets()
. Default: - No subnets associated
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 # subnet: ec2.Subnet # subnet_filter: ec2.SubnetFilter # vpc: ec2.Vpc network_acl_props = ec2.NetworkAclProps( vpc=vpc, # the properties below are optional network_acl_name="networkAclName", subnet_selection=ec2.SubnetSelection( availability_zones=["availabilityZones"], one_per_az=False, subnet_filters=[subnet_filter], subnet_group_name="subnetGroupName", subnet_name="subnetName", subnets=[subnet], subnet_type=ec2.SubnetType.ISOLATED ) )
Attributes
- network_acl_name
The name of the NetworkAcl.
It is not recommended to use an explicit name.
- Default:
If you don’t specify a networkAclName, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.
- subnet_selection
Subnets in the given VPC to associate the ACL with.
More subnets can always be added later by calling
associateWithSubnets()
.- Default:
No subnets associated
- vpc
The VPC in which to create the NetworkACL.