Class BaseNetworkListenerProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.BaseNetworkListenerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BaseNetworkListenerProps>
- Enclosing interface:
BaseNetworkListenerProps
@Stability(Stable)
public static final class BaseNetworkListenerProps.Builder
extends Object
implements software.amazon.jsii.Builder<BaseNetworkListenerProps>
A builder for
BaseNetworkListenerProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionalpnPolicy
(AlpnPolicy alpnPolicy) Sets the value ofBaseNetworkListenerProps.getAlpnPolicy()
build()
Builds the configured instance.certificates
(List<? extends IListenerCertificate> certificates) Sets the value ofBaseNetworkListenerProps.getCertificates()
defaultAction
(NetworkListenerAction defaultAction) Sets the value ofBaseNetworkListenerProps.getDefaultAction()
defaultTargetGroups
(List<? extends INetworkTargetGroup> defaultTargetGroups) Sets the value ofBaseNetworkListenerProps.getDefaultTargetGroups()
Sets the value ofBaseNetworkListenerProps.getPort()
Sets the value ofBaseNetworkListenerProps.getProtocol()
Sets the value ofBaseNetworkListenerProps.getSslPolicy()
tcpIdleTimeout
(Duration tcpIdleTimeout) Sets the value ofBaseNetworkListenerProps.getTcpIdleTimeout()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
port
Sets the value ofBaseNetworkListenerProps.getPort()
- Parameters:
port
- The port on which the listener listens for requests. This parameter is required.- Returns:
this
-
alpnPolicy
Sets the value ofBaseNetworkListenerProps.getAlpnPolicy()
- Parameters:
alpnPolicy
- Application-Layer Protocol Negotiation (ALPN) is a TLS extension that is sent on the initial TLS handshake hello messages. ALPN enables the application layer to negotiate which protocols should be used over a secure connection, such as HTTP/1 and HTTP/2.Can only be specified together with Protocol TLS.
- Returns:
this
-
certificates
@Stability(Stable) public BaseNetworkListenerProps.Builder certificates(List<? extends IListenerCertificate> certificates) Sets the value ofBaseNetworkListenerProps.getCertificates()
- Parameters:
certificates
- Certificate list of ACM cert ARNs. You must provide exactly one certificate if the listener protocol is HTTPS or TLS.- Returns:
this
-
defaultAction
@Stability(Stable) public BaseNetworkListenerProps.Builder defaultAction(NetworkListenerAction defaultAction) Sets the value ofBaseNetworkListenerProps.getDefaultAction()
- Parameters:
defaultAction
- Default action to take for requests to this listener. This allows full control of the default Action of the load balancer, including weighted forwarding. See theNetworkListenerAction
class for all options.Cannot be specified together with
defaultTargetGroups
.- Returns:
this
-
defaultTargetGroups
@Stability(Stable) public BaseNetworkListenerProps.Builder defaultTargetGroups(List<? extends INetworkTargetGroup> defaultTargetGroups) Sets the value ofBaseNetworkListenerProps.getDefaultTargetGroups()
- Parameters:
defaultTargetGroups
- Default target groups to load balance to. All target groups will be load balanced to with equal weight and without stickiness. For a more complex configuration than that, use eitherdefaultAction
oraddAction()
.Cannot be specified together with
defaultAction
.- Returns:
this
-
protocol
Sets the value ofBaseNetworkListenerProps.getProtocol()
- Parameters:
protocol
- Protocol for listener, expects TCP, TLS, UDP, or TCP_UDP.- Returns:
this
-
sslPolicy
Sets the value ofBaseNetworkListenerProps.getSslPolicy()
- Parameters:
sslPolicy
- SSL Policy.- Returns:
this
-
tcpIdleTimeout
Sets the value ofBaseNetworkListenerProps.getTcpIdleTimeout()
- Parameters:
tcpIdleTimeout
- The load balancer TCP idle timeout.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BaseNetworkListenerProps>
- Returns:
- a new instance of
BaseNetworkListenerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-