aws-cdk-lib.aws_ec2.AclTraffic

class AclTraffic

LanguageType name
.NETAmazon.CDK.AWS.EC2.AclTraffic
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsec2#AclTraffic
Javasoftware.amazon.awscdk.services.ec2.AclTraffic
Pythonaws_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

NameDescription
toTrafficConfig()
static allTraffic()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 tcpPort(port)Apply the ACL entry to TCP traffic on a given port.
static tcpPortRange(startPort, endPort)Apply the ACL entry to TCP traffic on a given port range.
static udpPort(port)Apply the ACL entry to UDP traffic on a given port.
static udpPortRange(startPort, endPort)Apply the ACL entry to UDP traffic on a given port range.

toTrafficConfig()

public toTrafficConfig(): AclTrafficConfig

Returns

  • AclTrafficConfig

static allTraffic()

public static allTraffic(): AclTraffic

Returns

  • AclTraffic

Apply the ACL entry to all traffic.


static icmp(props)

public static icmp(props: AclIcmp): AclTraffic

Parameters

  • props AclIcmp

Returns

  • AclTraffic

Apply the ACL entry to ICMP traffic of given type and code.


static icmpv6(props)

public static icmpv6(props: AclIcmp): AclTraffic

Parameters

  • props AclIcmp

Returns

  • AclTraffic

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

  • AclTraffic

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

  • AclTraffic

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

  • AclTraffic

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

  • AclTraffic

Apply the ACL entry to UDP traffic on a given port range.