AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

NetworkAclEntry

Define an entry in a Network ACL table.

Import

import { NetworkAclEntry } from 'aws-cdk-lib/aws-ec2';

Or use the module namespace:

import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.NetworkAclEntry

Properties

Configuration passed to the constructor as NetworkAclEntryProps.

networkAclRequired
INetworkAcl

The network ACL this entry applies to.

6 properties inherited from CommonNetworkAclEntryOptions
cidrRequiredinherited from CommonNetworkAclEntryOptions
AclCidr

The CIDR range to allow or deny.

ruleNumberRequiredinherited from CommonNetworkAclEntryOptions
number

Rule number to assign to the entry, such as 100. ACL entries are processed in ascending order by rule number. Entries can't use the same rule number unless one is an egress rule and the other is an ingress rule.

trafficRequiredinherited from CommonNetworkAclEntryOptions
AclTraffic

What kind of traffic this ACL rule applies to.

directionOptionalinherited from CommonNetworkAclEntryOptions
TrafficDirection

Traffic direction, with respect to the subnet, this rule applies to.

Default: TrafficDirection.INGRESS

networkAclEntryNameOptionalinherited from CommonNetworkAclEntryOptions
string

The name of the NetworkAclEntry. It is not recommended to use an explicit group name.

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

ruleActionOptionalinherited from CommonNetworkAclEntryOptions
Action

Whether to allow or deny traffic that matches the rule; valid values are "allow" or "deny". Any traffic that is not explicitly allowed is automatically denied in a custom ACL, all traffic is automatically allowed in a default ACL.

Default: ALLOW

Get the Amazon EC2 Cheat Sheet

Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.

Download Free Infographic