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. |
toTrafficConfig()
public toTrafficConfig(): AclTrafficConfig
Returns
static allTraffic()
public 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.
static tcpPort(port)
public static tcpPort(port: number): AclTraffic
Parameters
- port
number
Returns
Apply the ACL entry to TCP traffic on a given port.
static tcpPortRange(startPort, endPort)
public 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.
static udpPort(port)
public static udpPort(port: number): AclTraffic
Parameters
- port
number
Returns
Apply the ACL entry to UDP traffic on a given port.
static udpPortRange(startPort, endPort)
public 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.