@Stability(value=Stable) public static final class ConnectionRule.Builder extends Object
ConnectionRule
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ConnectionRule |
build()
Builds the configured instance.
|
ConnectionRule.Builder |
description(String description)
Sets the value of Description
|
ConnectionRule.Builder |
fromPort(Number fromPort)
Sets the value of FromPort
|
ConnectionRule.Builder |
protocol(String protocol)
Sets the value of Protocol
|
ConnectionRule.Builder |
toPort(Number toPort)
Sets the value of ToPort
|
@Stability(value=Stable) public ConnectionRule.Builder fromPort(Number fromPort)
fromPort
- Start of port range for the TCP and UDP protocols, or an ICMP type number. This parameter is required.this
@Stability(value=Stable) public ConnectionRule.Builder description(String description)
description
- Description of this connection.this
@Stability(value=Stable) public ConnectionRule.Builder protocol(String protocol)
protocol
- The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers). Use -1 to specify all protocols. If you specify -1, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6), traffic on all ports is allowed, regardless of any ports you specify. For tcp, udp, and icmp, you must specify a port range. For protocol 58 (ICMPv6), you can optionally specify a port range; if you don't, traffic for all types and codes is allowed.this
@Stability(value=Stable) public ConnectionRule.Builder toPort(Number toPort)
toPort
- End of port range for the TCP and UDP protocols, or an ICMP code.this
@Stability(value=Stable) public ConnectionRule build()
ConnectionRule
NullPointerException
- if any required attribute was not providedCopyright © 2019. All rights reserved.