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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofAclTrafficConfig.getIcmp()
portRange
(AclPortRange portRange) Sets the value ofAclTrafficConfig.getPortRange()
Sets the value ofAclTrafficConfig.getProtocol()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
protocol
Sets the value ofAclTrafficConfig.getProtocol()
- 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
Sets the value ofAclTrafficConfig.getIcmp()
- Parameters:
icmp
- The Internet Control Message Protocol (ICMP) code and type.- Returns:
this
-
portRange
Sets the value ofAclTrafficConfig.getPortRange()
- Parameters:
portRange
- The range of port numbers for the UDP/TCP protocol.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AclTrafficConfig>
- Returns:
- a new instance of
AclTrafficConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-