class AclTraffic
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EC2.AclTraffic |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsec2#AclTraffic |
Java | software.amazon.awscdk.services.ec2.AclTraffic |
Python | aws_cdk.aws_ec2.AclTraffic |
TypeScript (source) | aws-cdk-lib » aws_ec2 » AclTraffic |
The traffic that is configured using a Network ACL entry.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
const aclTraffic = ec2.AclTraffic.allTraffic();
Initializer
new AclTraffic()
Methods
Name | Description |
---|---|
to | |
static all | Apply the ACL entry to all traffic. |
static icmp(props) | Apply the ACL entry to ICMP traffic of given type and code. |
static icmpv6(props) | Apply the ACL entry to ICMPv6 traffic of given type and code. |
static tcp | Apply the ACL entry to TCP traffic on a given port. |
static tcp | Apply the ACL entry to TCP traffic on a given port range. |
static udp | Apply the ACL entry to UDP traffic on a given port. |
static udp | Apply the ACL entry to UDP traffic on a given port range. |
TrafficConfig()
topublic toTrafficConfig(): AclTrafficConfig
Returns
Traffic()
static allpublic static allTraffic(): AclTraffic
Returns
Apply the ACL entry to all traffic.
static icmp(props)
public static icmp(props: AclIcmp): AclTraffic
Parameters
- props
Acl
Icmp
Returns
Apply the ACL entry to ICMP traffic of given type and code.
static icmpv6(props)
public static icmpv6(props: AclIcmp): AclTraffic
Parameters
- props
Acl
Icmp
Returns
Apply the ACL entry to ICMPv6 traffic of given type and code.
Requires an IPv6 CIDR block.
Port(port)
static tcppublic static tcpPort(port: number): AclTraffic
Parameters
- port
number
Returns
Apply the ACL entry to TCP traffic on a given port.
PortRange(startPort, endPort)
static tcppublic static tcpPortRange(startPort: number, endPort: number): AclTraffic
Parameters
- startPort
number
- endPort
number
Returns
Apply the ACL entry to TCP traffic on a given port range.
Port(port)
static udppublic static udpPort(port: number): AclTraffic
Parameters
- port
number
Returns
Apply the ACL entry to UDP traffic on a given port.
PortRange(startPort, endPort)
static udppublic static udpPortRange(startPort: number, endPort: number): AclTraffic
Parameters
- startPort
number
- endPort
number
Returns
Apply the ACL entry to UDP traffic on a given port range.