Class ApplicationListenerProps.Builder
java.lang.Object
software.amazon.awscdk.services.elasticloadbalancingv2.ApplicationListenerProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationListenerProps>
- Enclosing interface:
ApplicationListenerProps
@Stability(Stable)
public static final class ApplicationListenerProps.Builder
extends Object
implements software.amazon.jsii.Builder<ApplicationListenerProps>
A builder for
ApplicationListenerProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.certificates
(List<? extends IListenerCertificate> certificates) Sets the value ofBaseApplicationListenerProps.getCertificates()
defaultAction
(ListenerAction defaultAction) Sets the value ofBaseApplicationListenerProps.getDefaultAction()
defaultTargetGroups
(List<? extends IApplicationTargetGroup> defaultTargetGroups) Sets the value ofBaseApplicationListenerProps.getDefaultTargetGroups()
loadBalancer
(IApplicationLoadBalancer loadBalancer) Sets the value ofApplicationListenerProps.getLoadBalancer()
mutualAuthentication
(MutualAuthentication mutualAuthentication) Sets the value ofBaseApplicationListenerProps.getMutualAuthentication()
Sets the value ofBaseApplicationListenerProps.getOpen()
Sets the value ofBaseApplicationListenerProps.getPort()
protocol
(ApplicationProtocol protocol) Sets the value ofBaseApplicationListenerProps.getProtocol()
Sets the value ofBaseApplicationListenerProps.getSslPolicy()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
loadBalancer
@Stability(Stable) public ApplicationListenerProps.Builder loadBalancer(IApplicationLoadBalancer loadBalancer) Sets the value ofApplicationListenerProps.getLoadBalancer()
- Parameters:
loadBalancer
- The load balancer to attach this listener to. This parameter is required.- Returns:
this
-
certificates
@Stability(Stable) public ApplicationListenerProps.Builder certificates(List<? extends IListenerCertificate> certificates) Sets the value ofBaseApplicationListenerProps.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 ApplicationListenerProps.Builder defaultAction(ListenerAction defaultAction) Sets the value ofBaseApplicationListenerProps.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 Action chaining, fixed responses and redirect responses.See the
ListenerAction
class for all options.Cannot be specified together with
defaultTargetGroups
.- Returns:
this
-
defaultTargetGroups
@Stability(Stable) public ApplicationListenerProps.Builder defaultTargetGroups(List<? extends IApplicationTargetGroup> defaultTargetGroups) Sets the value ofBaseApplicationListenerProps.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
-
mutualAuthentication
@Stability(Stable) public ApplicationListenerProps.Builder mutualAuthentication(MutualAuthentication mutualAuthentication) Sets the value ofBaseApplicationListenerProps.getMutualAuthentication()
- Parameters:
mutualAuthentication
- The mutual authentication configuration information.- Returns:
this
-
open
Sets the value ofBaseApplicationListenerProps.getOpen()
- Parameters:
open
- Allow anyone to connect to the load balancer on the listener port. If this is specified, the load balancer 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 load balancer on the listener port.- Returns:
this
-
port
Sets the value ofBaseApplicationListenerProps.getPort()
- Parameters:
port
- The port on which the listener listens for requests.- Returns:
this
-
protocol
Sets the value ofBaseApplicationListenerProps.getProtocol()
- Parameters:
protocol
- The protocol to use.- Returns:
this
-
sslPolicy
Sets the value ofBaseApplicationListenerProps.getSslPolicy()
- Parameters:
sslPolicy
- The security policy that defines which ciphers and protocols are supported.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ApplicationListenerProps>
- Returns:
- a new instance of
ApplicationListenerProps
- Throws:
NullPointerException
- if any required attribute was not provided
-