# NetworkAclProps

Properties to create NetworkAcl.

Extends: NetworkAclProps
Used as props by: NetworkAcl

- Source: [`aws-ec2/lib/network-acl.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-ec2/lib/network-acl.ts#L71)
- Type last changed: v2.94.0 · 1 Sep 2023

## 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';

declare const subnet: ec2.Subnet;
declare const subnetFilter: ec2.SubnetFilter;
declare const vpc: ec2.Vpc;
const networkAclProps: ec2.NetworkAclProps = {
  vpc: vpc,

  // the properties below are optional
  networkAclName: 'networkAclName',
  subnetSelection: {
    availabilityZones: ['availabilityZones'],
    onePerAz: false,
    subnetFilters: [subnetFilter],
    subnetGroupName: 'subnetGroupName',
    subnets: [subnet],
    subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
  },
};
```

## Properties

- `networkAclName`: string — The name of the NetworkAcl.

  **Default:** CDK generated name

  Since the NetworkAcl resource doesn't support providing a physical name, the value provided here will be recorded in the `Name` tag.

- `subnetSelection`: [SubnetSelection](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.SubnetSelection.html) — Subnets in the given VPC to associate the ACL with.

  **Default:** No subnets associated

  More subnets can always be added later by calling
  `associateWithSubnets()`.

- `vpc`: [IVpc](/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.IVpc.html) (required) — The VPC in which to create the NetworkACL.
