Class AclTrafficConfig.Builder

java.lang.Object
software.amazon.awscdk.services.ec2.AclTrafficConfig.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<AclTrafficConfig>
Enclosing interface:
AclTrafficConfig

@Stability(Stable) public static final class AclTrafficConfig.Builder extends Object implements software.amazon.jsii.Builder<AclTrafficConfig>
A builder for AclTrafficConfig
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • protocol

      @Stability(Stable) public AclTrafficConfig.Builder protocol(Number protocol)
      Parameters:
      protocol - The protocol number. This parameter is required. A value of "-1" means all protocols.

      If you specify "-1" or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on all ports is allowed, regardless of any ports or ICMP types or codes that you specify.

      If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, traffic for all ICMP types and codes allowed, regardless of any that you specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, you must specify an ICMP type and code.

      Returns:
      this
    • icmp

      @Stability(Stable) public AclTrafficConfig.Builder icmp(AclIcmp icmp)
      Sets the value of AclTrafficConfig.getIcmp()
      Parameters:
      icmp - The Internet Control Message Protocol (ICMP) code and type.
      Returns:
      this
    • portRange

      @Stability(Stable) public AclTrafficConfig.Builder portRange(AclPortRange portRange)
      Parameters:
      portRange - The range of port numbers for the UDP/TCP protocol.
      Returns:
      this
    • build

      @Stability(Stable) public AclTrafficConfig build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<AclTrafficConfig>
      Returns:
      a new instance of AclTrafficConfig
      Throws:
      NullPointerException - if any required attribute was not provided