Skip to content
v2.278.0

NetworkAclEntryProperty Struct ​

Describes a rule in a network ACL.

Each network ACL has a set of numbered ingress rules and a separate set of numbered egress rules. When determining whether a packet should be allowed in or out of a subnet associated with the network ACL, AWS processes the entries in the network ACL according to the rule numbers, in ascending order.

When you manage an individual network ACL, you explicitly specify the rule numbers. When you specify the network ACL rules in a Firewall Manager policy, you provide the rules to run first, in the order that you want them to run, and the rules to run last, in the order that you want them to run. Firewall Manager assigns the rule numbers for you when you save the network ACL policy specification.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_fms as fms } from 'aws-cdk-lib';
const networkAclEntryProperty: fms.CfnPolicy.NetworkAclEntryProperty = {
  egress: false,
  protocol: 'protocol',
  ruleAction: 'ruleAction',

  // the properties below are optional
  cidrBlock: 'cidrBlock',
  icmpTypeCode: {
    code: 123,
    type: 123,
  },
  ipv6CidrBlock: 'ipv6CidrBlock',
  portRange: {
    from: 123,
    to: 123,
  },
};
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_fms as fms

network_acl_entry_property = fms.CfnPolicy.NetworkAclEntryProperty(
    egress=False,
    protocol="protocol",
    rule_action="ruleAction",

    # the properties below are optional
    cidr_block="cidrBlock",
    icmp_type_code=fms.CfnPolicy.IcmpTypeCodeProperty(
        code=123,
        type=123
    ),
    ipv6_cidr_block="ipv6CidrBlock",
    port_range=fms.CfnPolicy.PortRangeProperty(
        from=123,
        to=123
    )
)
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.fms.*;

NetworkAclEntryProperty networkAclEntryProperty = NetworkAclEntryProperty.builder()
        .egress(false)
        .protocol("protocol")
        .ruleAction("ruleAction")

        // the properties below are optional
        .cidrBlock("cidrBlock")
        .icmpTypeCode(IcmpTypeCodeProperty.builder()
                .code(123)
                .type(123)
                .build())
        .ipv6CidrBlock("ipv6CidrBlock")
        .portRange(PortRangeProperty.builder()
                .from(123)
                .to(123)
                .build())
        .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.FMS;

var networkAclEntryProperty = new NetworkAclEntryProperty {
    Egress = false,
    Protocol = "protocol",
    RuleAction = "ruleAction",

    // the properties below are optional
    CidrBlock = "cidrBlock",
    IcmpTypeCode = new IcmpTypeCodeProperty {
        Code = 123,
        Type = 123
    },
    Ipv6CidrBlock = "ipv6CidrBlock",
    PortRange = new PortRangeProperty {
        From = 123,
        To = 123
    }
};
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"

networkAclEntryProperty := &NetworkAclEntryProperty{
	Egress: jsii.Boolean(false),
	Protocol: jsii.String("protocol"),
	RuleAction: jsii.String("ruleAction"),

	// the properties below are optional
	CidrBlock: jsii.String("cidrBlock"),
	IcmpTypeCode: &IcmpTypeCodeProperty{
		Code: jsii.Number(123),
		Type: jsii.Number(123),
	},
	Ipv6CidrBlock: jsii.String("ipv6CidrBlock"),
	PortRange: &PortRangeProperty{
		From: jsii.Number(123),
		To: jsii.Number(123),
	},
}

Properties ​

cidrBlockoptionalstringcidr_blockoptionalstrcidrBlockoptionalStringCidrBlockoptionalstringCidrBlockoptional*string #
The IPv4 network range to allow or deny, in CIDR notation.
egressboolean | IResolvableegresstyping.Union[bool, IResolvable]egressBooleanEgressboolEgressinterface{} required #
Indicates whether the rule is an egress, or outbound, rule (applied to traffic leaving the subnet).

If it's not an egress rule, then it's an ingress, or inbound, rule.

icmpTypeCodeoptionalIResolvable | CfnPolicy.IcmpTypeCodePropertyicmp_type_codeoptionaltyping.Union[IResolvable, IcmpTypeCodeProperty]icmpTypeCodeoptionalIResolvableIcmpTypeCodeoptionalIResolvableIcmpTypeCodeoptionalinterface{} #
ICMP protocol: The ICMP type and code.
ipv6CidrBlockoptionalstringipv6_cidr_blockoptionalstripv6CidrBlockoptionalStringIpv6CidrBlockoptionalstringIpv6CidrBlockoptional*string #
The IPv6 network range to allow or deny, in CIDR notation.
portRangeoptionalIResolvable | CfnPolicy.PortRangePropertyport_rangeoptionaltyping.Union[IResolvable, PortRangeProperty]portRangeoptionalIResolvablePortRangeoptionalIResolvablePortRangeoptionalinterface{} #
TCP or UDP protocols: The range of ports the rule applies to.
protocolstringprotocolstrprotocolStringProtocolstringProtocol*string required #
The protocol number.

A value of "-1" means all protocols.

ruleActionstringrule_actionstrruleActionStringRuleActionstringRuleAction*string required #
Indicates whether to allow or deny the traffic that matches the rule.