Class ApplicationLoadBalancerRedirectConfig.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationLoadBalancerRedirectConfig.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationLoadBalancerRedirectConfig>
- Enclosing interface:
ApplicationLoadBalancerRedirectConfig
@Stability(Stable)
public static final class ApplicationLoadBalancerRedirectConfig.Builder
extends Object
implements software.amazon.jsii.Builder<ApplicationLoadBalancerRedirectConfig>
A builder for
ApplicationLoadBalancerRedirectConfig
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.Sets the value ofApplicationLoadBalancerRedirectConfig.getOpen()
sourcePort
(Number sourcePort) Sets the value ofApplicationLoadBalancerRedirectConfig.getSourcePort()
sourceProtocol
(ApplicationProtocol sourceProtocol) Sets the value ofApplicationLoadBalancerRedirectConfig.getSourceProtocol()
targetPort
(Number targetPort) Sets the value ofApplicationLoadBalancerRedirectConfig.getTargetPort()
targetProtocol
(ApplicationProtocol targetProtocol) Sets the value ofApplicationLoadBalancerRedirectConfig.getTargetProtocol()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
open
Sets the value ofApplicationLoadBalancerRedirectConfig.getOpen()
- Parameters:
open
- Allow anyone to connect to this listener. If this is specified, the listener will be opened up to anyone who can reach it. For internal load balancers this is anyone in the same VPC. For public load balancers, this is anyone on the internet.If you want to be more selective about who can access this load balancer, set this to
false
and use the listener'sconnections
object to selectively grant access to the listener.- Returns:
this
-
sourcePort
@Stability(Stable) public ApplicationLoadBalancerRedirectConfig.Builder sourcePort(Number sourcePort) Sets the value ofApplicationLoadBalancerRedirectConfig.getSourcePort()
- Parameters:
sourcePort
- The port number to listen to.- Returns:
this
-
sourceProtocol
@Stability(Stable) public ApplicationLoadBalancerRedirectConfig.Builder sourceProtocol(ApplicationProtocol sourceProtocol) Sets the value ofApplicationLoadBalancerRedirectConfig.getSourceProtocol()
- Parameters:
sourceProtocol
- The protocol of the listener being created.- Returns:
this
-
targetPort
@Stability(Stable) public ApplicationLoadBalancerRedirectConfig.Builder targetPort(Number targetPort) Sets the value ofApplicationLoadBalancerRedirectConfig.getTargetPort()
- Parameters:
targetPort
- The port number to redirect to.- Returns:
this
-
targetProtocol
@Stability(Stable) public ApplicationLoadBalancerRedirectConfig.Builder targetProtocol(ApplicationProtocol targetProtocol) Sets the value ofApplicationLoadBalancerRedirectConfig.getTargetProtocol()
- Parameters:
targetProtocol
- The protocol of the redirection target.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ApplicationLoadBalancerRedirectConfig>
- Returns:
- a new instance of
ApplicationLoadBalancerRedirectConfig
- Throws:
NullPointerException
- if any required attribute was not provided
-