AclTraffic
- class aws_cdk.aws_ec2.AclTraffic
Bases:
object
The traffic that is configured using a Network ACL entry.
- 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_traffic = ec2.AclTraffic.all_traffic()
Methods
- abstract to_traffic_config()
- Return type:
Static Methods
- classmethod all_traffic()
Apply the ACL entry to all traffic.
- Return type:
- classmethod icmp(*, code=None, type=None)
Apply the ACL entry to ICMP traffic of given type and code.
- Parameters:
code (
Union
[int
,float
,None
]) – The Internet Control Message Protocol (ICMP) code. You can use -1 to specify all ICMP codes for the given ICMP type. Requirement is conditional: Required if you specify 1 (ICMP) for the protocol parameter.type (
Union
[int
,float
,None
]) – The Internet Control Message Protocol (ICMP) type. You can use -1 to specify all ICMP types. Conditional requirement: Required if you specify 1 (ICMP) for the CreateNetworkAclEntry protocol parameter.
- Return type:
- classmethod icmpv6(*, code=None, type=None)
Apply the ACL entry to ICMPv6 traffic of given type and code.
Requires an IPv6 CIDR block.
- Parameters:
code (
Union
[int
,float
,None
]) – The Internet Control Message Protocol (ICMP) code. You can use -1 to specify all ICMP codes for the given ICMP type. Requirement is conditional: Required if you specify 1 (ICMP) for the protocol parameter.type (
Union
[int
,float
,None
]) – The Internet Control Message Protocol (ICMP) type. You can use -1 to specify all ICMP types. Conditional requirement: Required if you specify 1 (ICMP) for the CreateNetworkAclEntry protocol parameter.
- Return type:
- classmethod tcp_port(port)
Apply the ACL entry to TCP traffic on a given port.
- Parameters:
port (
Union
[int
,float
]) –- Return type:
- classmethod tcp_port_range(start_port, end_port)
Apply the ACL entry to TCP traffic on a given port range.
- Parameters:
start_port (
Union
[int
,float
]) –end_port (
Union
[int
,float
]) –
- Return type:
- classmethod udp_port(port)
Apply the ACL entry to UDP traffic on a given port.
- Parameters:
port (
Union
[int
,float
]) –- Return type:
- classmethod udp_port_range(start_port, end_port)
Apply the ACL entry to UDP traffic on a given port range.
- Parameters:
start_port (
Union
[int
,float
]) –end_port (
Union
[int
,float
]) –
- Return type: