Class ApplicationListener.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<ApplicationListener>
- Enclosing class:
ApplicationListener
ApplicationListener
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
certificates
(List<? extends IListenerCertificate> certificates) Certificate list of ACM cert ARNs.static ApplicationListener.Builder
defaultAction
(ListenerAction defaultAction) Default action to take for requests to this listener.defaultTargetGroups
(List<? extends IApplicationTargetGroup> defaultTargetGroups) Default target groups to load balance to.loadBalancer
(IApplicationLoadBalancer loadBalancer) The load balancer to attach this listener to.mutualAuthentication
(MutualAuthentication mutualAuthentication) The mutual authentication configuration information.Allow anyone to connect to the load balancer on the listener port.The port on which the listener listens for requests.protocol
(ApplicationProtocol protocol) The protocol to use.The security policy that defines which ciphers and protocols are supported.
-
Method Details
-
create
@Stability(Stable) public static ApplicationListener.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
ApplicationListener.Builder
.
-
certificates
@Stability(Stable) public ApplicationListener.Builder certificates(List<? extends IListenerCertificate> certificates) Certificate list of ACM cert ARNs.You must provide exactly one certificate if the listener protocol is HTTPS or TLS.
Default: - No certificates.
- Parameters:
certificates
- Certificate list of ACM cert ARNs. This parameter is required.- Returns:
this
-
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
.Default: - None.
- Parameters:
defaultAction
- Default action to take for requests to this listener. This parameter is required.- Returns:
this
-
defaultTargetGroups
@Stability(Stable) public ApplicationListener.Builder defaultTargetGroups(List<? extends IApplicationTargetGroup> 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 either
defaultAction
oraddAction()
.Cannot be specified together with
defaultAction
.Default: - None.
- Parameters:
defaultTargetGroups
- Default target groups to load balance to. This parameter is required.- Returns:
this
-
mutualAuthentication
@Stability(Stable) public ApplicationListener.Builder mutualAuthentication(MutualAuthentication mutualAuthentication) The mutual authentication configuration information.Default: - No mutual authentication configuration
- Parameters:
mutualAuthentication
- The mutual authentication configuration information. This parameter is required.- Returns:
this
- See Also:
-
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.Default: true
- Parameters:
open
- Allow anyone to connect to the load balancer on the listener port. This parameter is required.- Returns:
this
-
port
The port on which the listener listens for requests.Default: - Determined from protocol if known.
- Parameters:
port
- The port on which the listener listens for requests. This parameter is required.- Returns:
this
-
protocol
The protocol to use.Default: - Determined from port if known.
- Parameters:
protocol
- The protocol to use. This parameter is required.- Returns:
this
-
sslPolicy
The security policy that defines which ciphers and protocols are supported.Default: - The current predefined security policy.
- Parameters:
sslPolicy
- The security policy that defines which ciphers and protocols are supported. This parameter is required.- Returns:
this
-
loadBalancer
@Stability(Stable) public ApplicationListener.Builder loadBalancer(IApplicationLoadBalancer loadBalancer) The load balancer to attach this listener to.- Parameters:
loadBalancer
- The load balancer to attach this listener to. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<ApplicationListener>
- Returns:
- a newly built instance of
ApplicationListener
.
-