Skip to content
v2.278.0

NetworkAclCommonPolicyProperty Struct ​

Defines a Firewall Manager network ACL policy.

This is used in the PolicyOption of a SecurityServicePolicyData for a Policy , when the SecurityServicePolicyData type is set to NETWORK_ACL_COMMON .

For information about network ACLs, see Control traffic to subnets using network ACLs in the Amazon Virtual Private Cloud User Guide .

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 networkAclCommonPolicyProperty: fms.CfnPolicy.NetworkAclCommonPolicyProperty = {
  networkAclEntrySet: {
    forceRemediateForFirstEntries: false,
    forceRemediateForLastEntries: false,

    // the properties below are optional
    firstEntries: [{
      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,
      },
    }],
    lastEntries: [{
      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_common_policy_property = fms.CfnPolicy.NetworkAclCommonPolicyProperty(
    network_acl_entry_set=fms.CfnPolicy.NetworkAclEntrySetProperty(
        force_remediate_for_first_entries=False,
        force_remediate_for_last_entries=False,

        # the properties below are optional
        first_entries=[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
            )
        )],
        last_entries=[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.*;

NetworkAclCommonPolicyProperty networkAclCommonPolicyProperty = NetworkAclCommonPolicyProperty.builder()
        .networkAclEntrySet(NetworkAclEntrySetProperty.builder()
                .forceRemediateForFirstEntries(false)
                .forceRemediateForLastEntries(false)

                // the properties below are optional
                .firstEntries(List.of(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()))
                .lastEntries(List.of(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()))
                .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 networkAclCommonPolicyProperty = new NetworkAclCommonPolicyProperty {
    NetworkAclEntrySet = new NetworkAclEntrySetProperty {
        ForceRemediateForFirstEntries = false,
        ForceRemediateForLastEntries = false,

        // the properties below are optional
        FirstEntries = new [] { 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
            }
        } },
        LastEntries = new [] { 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"

networkAclCommonPolicyProperty := &NetworkAclCommonPolicyProperty{
	NetworkAclEntrySet: &NetworkAclEntrySetProperty{
		ForceRemediateForFirstEntries: jsii.Boolean(false),
		ForceRemediateForLastEntries: jsii.Boolean(false),

		// the properties below are optional
		FirstEntries: []interface{}{
			&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),
				},
			},
		},
		LastEntries: []interface{}{
			&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 ​

networkAclEntrySetIResolvable | CfnPolicy.NetworkAclEntrySetPropertynetwork_acl_entry_settyping.Union[IResolvable, NetworkAclEntrySetProperty]networkAclEntrySetIResolvableNetworkAclEntrySetIResolvableNetworkAclEntrySetinterface{} required #
The definition of the first and last rules for the network ACL policy.