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 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

      @Stability(Stable) public Listener.Builder portRanges(List<? extends PortRange> 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

      @Stability(Stable) public Listener.Builder clientAffinity(ClientAffinity 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

      @Stability(Stable) public Listener.Builder listenerName(String listenerName)
      Name of the listener.

      Default: - logical ID of the resource

      Parameters:
      listenerName - Name of the listener. This parameter is required.
      Returns:
      this
    • protocol

      @Stability(Stable) public Listener.Builder protocol(ConnectionProtocol 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

      @Stability(Stable) public Listener.Builder accelerator(IAccelerator accelerator)
      The accelerator for this listener.

      Parameters:
      accelerator - The accelerator for this listener. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Listener build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Listener>
      Returns:
      a newly built instance of Listener.