AWS::EC2::NetworkAclEntrySpecifies an entry, known as a rule, in a network ACL with a rule number you specify. Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. To create the network ACL, see [AWS::EC2::NetworkAcl](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-networkacl.html) . For information about the protocol value, see [Protocol Numbers](https://docs.aws.amazon.com/https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) on the Internet Assigned Numbers Authority (IANA) website.
import { CfnNetworkAclEntry } from 'aws-cdk-lib/aws-ec2';Or use the module namespace:
import * as ec2 from 'aws-cdk-lib/aws-ec2';
// ec2.CfnNetworkAclEntryConfiguration passed to the constructor as CfnNetworkAclEntryProps.
networkAclIdRequiredstringThe ID of the ACL for the entry.
protocolRequirednumberThe IP protocol that the rule applies to. You must specify -1 or a protocol number. You can specify -1 for all protocols. > If you specify -1, all ports are opened and the `PortRange` property is ignored.
ruleActionRequiredstringWhether to allow or deny traffic that matches the rule; valid values are "allow" or "deny".
ruleNumberRequirednumberRule 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.
cidrBlockOptionalstringThe IPv4 CIDR range to allow or deny, in CIDR notation (for example, 172.16.0.0/24). You must specify an IPv4 CIDR block or an IPv6 CIDR block.
egressOptionalboolean | IResolvableWhether this rule applies to egress traffic from the subnet ( `true` ) or ingress traffic to the subnet ( `false` ). By default, AWS CloudFormation specifies `false` .
icmpOptionalIResolvable | IcmpPropertyThe Internet Control Message Protocol (ICMP) code and type. Required if specifying 1 (ICMP) for the protocol parameter.
ipv6CidrBlockOptionalstringThe IPv6 network range to allow or deny, in CIDR notation. You must specify an IPv4 CIDR block or an IPv6 CIDR block.
portRangeOptionalIResolvable | PortRangePropertyThe range of port numbers for the UDP/TCP protocol. Required if specifying 6 (TCP) or 17 (UDP) for the protocol parameter.
This L1 construct maps directly to the following CloudFormation resource type.
Everything you need to know about Amazon EC2 on one page. HD quality, print-friendly.
Download Free Infographicaws-ec2AWS::EC2::NetworkAclEntry