Class Listener.Builder
java.lang.Object
software.amazon.awscdk.services.globalaccelerator.Listener.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Listener>
- Enclosing class:
Listener
@Stability(Stable)
public static final class Listener.Builder
extends Object
implements software.amazon.jsii.Builder<Listener>
A fluent builder for
Listener
.-
Method Summary
Modifier and TypeMethodDescriptionaccelerator
(IAccelerator accelerator) The accelerator for this listener.build()
clientAffinity
(ClientAffinity clientAffinity) Client affinity to direct all requests from a user to the same endpoint.static Listener.Builder
listenerName
(String listenerName) Name of the listener.portRanges
(List<? extends PortRange> portRanges) The list of port ranges for the connections from clients to the accelerator.protocol
(ConnectionProtocol protocol) The protocol for the connections from clients to the accelerator.
-
Method Details
-
create
@Stability(Stable) public static Listener.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Listener.Builder
.
-
portRanges
The list of port ranges for the connections from clients to the accelerator.- Parameters:
portRanges
- The list of port ranges for the connections from clients to the accelerator. This parameter is required.- Returns:
this
-
clientAffinity
Client affinity to direct all requests from a user to the same endpoint.If you have stateful applications, client affinity lets you direct all requests from a user to the same endpoint.
By default, each connection from each client is routed to seperate endpoints. Set client affinity to SOURCE_IP to route all connections from a single client to the same endpoint.
Default: ClientAffinity.NONE
- Parameters:
clientAffinity
- Client affinity to direct all requests from a user to the same endpoint. This parameter is required.- Returns:
this
-
listenerName
Name of the listener.Default: - logical ID of the resource
- Parameters:
listenerName
- Name of the listener. This parameter is required.- Returns:
this
-
protocol
The protocol for the connections from clients to the accelerator.Default: ConnectionProtocol.TCP
- Parameters:
protocol
- The protocol for the connections from clients to the accelerator. This parameter is required.- Returns:
this
-
accelerator
The accelerator for this listener.- Parameters:
accelerator
- The accelerator for this listener. This parameter is required.- Returns:
this
-
build
-