CommonNetworkAclEntryOptions
- class aws_cdk.aws_ec2.CommonNetworkAclEntryOptions(*, cidr, rule_number, traffic, direction=None, network_acl_entry_name=None, rule_action=None)
Bases:
object
Basic NetworkACL entry props.
- Parameters:
cidr (
AclCidr
) – The CIDR range to allow or deny.rule_number (
Union
[int
,float
]) – 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.traffic (
AclTraffic
) – What kind of traffic this ACL rule applies to.direction (
Optional
[TrafficDirection
]) – Traffic direction, with respect to the subnet, this rule applies to. Default: TrafficDirection.INGRESSnetwork_acl_entry_name (
Optional
[str
]) – 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.rule_action (
Optional
[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
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import aws_ec2 as ec2 # acl_cidr: ec2.AclCidr # acl_traffic: ec2.AclTraffic common_network_acl_entry_options = ec2.CommonNetworkAclEntryOptions( cidr=acl_cidr, rule_number=123, traffic=acl_traffic, # the properties below are optional direction=ec2.TrafficDirection.EGRESS, network_acl_entry_name="networkAclEntryName", rule_action=ec2.Action.ALLOW )
Attributes
- cidr
The CIDR range to allow or deny.
- direction
Traffic direction, with respect to the subnet, this rule applies to.
- Default:
TrafficDirection.INGRESS
- network_acl_entry_name
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.
- rule_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
- rule_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.
- traffic
What kind of traffic this ACL rule applies to.