Class EndpointGroup.Builder

java.lang.Object
software.amazon.awscdk.services.globalaccelerator.EndpointGroup.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<EndpointGroup>
Enclosing class:
EndpointGroup

@Stability(Stable) public static final class EndpointGroup.Builder extends Object implements software.amazon.jsii.Builder<EndpointGroup>
A fluent builder for EndpointGroup.
  • Method Details

    • create

      @Stability(Stable) public static EndpointGroup.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of EndpointGroup.Builder.
    • endpointGroupName

      @Stability(Stable) public EndpointGroup.Builder endpointGroupName(String endpointGroupName)
      Name of the endpoint group.

      Default: - logical ID of the resource

      Parameters:
      endpointGroupName - Name of the endpoint group. This parameter is required.
      Returns:
      this
    • endpoints

      @Stability(Stable) public EndpointGroup.Builder endpoints(List<? extends IEndpoint> endpoints)
      Initial list of endpoints for this group.

      Default: - Group is initially empty

      Parameters:
      endpoints - Initial list of endpoints for this group. This parameter is required.
      Returns:
      this
    • healthCheckInterval

      @Stability(Stable) public EndpointGroup.Builder healthCheckInterval(Duration healthCheckInterval)
      The time between health checks for each endpoint.

      Must be either 10 or 30 seconds.

      Default: Duration.seconds(30)

      Parameters:
      healthCheckInterval - The time between health checks for each endpoint. This parameter is required.
      Returns:
      this
    • healthCheckPath

      @Stability(Stable) public EndpointGroup.Builder healthCheckPath(String healthCheckPath)
      The ping path for health checks (if the protocol is HTTP(S)).

      Default: '/'

      Parameters:
      healthCheckPath - The ping path for health checks (if the protocol is HTTP(S)). This parameter is required.
      Returns:
      this
    • healthCheckPort

      @Stability(Stable) public EndpointGroup.Builder healthCheckPort(Number healthCheckPort)
      The port used to perform health checks.

      Default: - The listener's port

      Parameters:
      healthCheckPort - The port used to perform health checks. This parameter is required.
      Returns:
      this
    • healthCheckProtocol

      @Stability(Stable) public EndpointGroup.Builder healthCheckProtocol(HealthCheckProtocol healthCheckProtocol)
      The protocol used to perform health checks.

      Default: HealthCheckProtocol.TCP

      Parameters:
      healthCheckProtocol - The protocol used to perform health checks. This parameter is required.
      Returns:
      this
    • healthCheckThreshold

      @Stability(Stable) public EndpointGroup.Builder healthCheckThreshold(Number healthCheckThreshold)
      The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy.

      Default: 3

      Parameters:
      healthCheckThreshold - The number of consecutive health checks required to set the state of a healthy endpoint to unhealthy, or to set an unhealthy endpoint to healthy. This parameter is required.
      Returns:
      this
    • portOverrides

      @Stability(Stable) public EndpointGroup.Builder portOverrides(List<? extends PortOverride> portOverrides)
      Override the destination ports used to route traffic to an endpoint.

      Unless overridden, the port used to hit the endpoint will be the same as the port that traffic arrives on at the listener.

      Default: - No overrides

      Parameters:
      portOverrides - Override the destination ports used to route traffic to an endpoint. This parameter is required.
      Returns:
      this
    • region

      @Stability(Stable) public EndpointGroup.Builder region(String region)
      The AWS Region where the endpoint group is located.

      Default: - region of the first endpoint in this group, or the stack region if that region can't be determined

      Parameters:
      region - The AWS Region where the endpoint group is located. This parameter is required.
      Returns:
      this
    • trafficDialPercentage

      @Stability(Stable) public EndpointGroup.Builder trafficDialPercentage(Number trafficDialPercentage)
      The percentage of traffic to send to this AWS Region.

      The percentage is applied to the traffic that would otherwise have been routed to the Region based on optimal routing. Additional traffic is distributed to other endpoint groups for this listener.

      Default: 100

      Parameters:
      trafficDialPercentage - The percentage of traffic to send to this AWS Region. This parameter is required.
      Returns:
      this
    • listener

      @Stability(Stable) public EndpointGroup.Builder listener(IListener listener)
      The Amazon Resource Name (ARN) of the listener.

      Parameters:
      listener - The Amazon Resource Name (ARN) of the listener. This parameter is required.
      Returns:
      this
    • build

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