Class EndpointGroupOptions.Builder
java.lang.Object
software.amazon.awscdk.services.globalaccelerator.EndpointGroupOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EndpointGroupOptions>
- Enclosing interface:
EndpointGroupOptions
@Stability(Stable)
public static final class EndpointGroupOptions.Builder
extends Object
implements software.amazon.jsii.Builder<EndpointGroupOptions>
A builder for
EndpointGroupOptions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.endpointGroupName
(String endpointGroupName) Sets the value ofEndpointGroupOptions.getEndpointGroupName()
Sets the value ofEndpointGroupOptions.getEndpoints()
healthCheckInterval
(Duration healthCheckInterval) Sets the value ofEndpointGroupOptions.getHealthCheckInterval()
healthCheckPath
(String healthCheckPath) Sets the value ofEndpointGroupOptions.getHealthCheckPath()
healthCheckPort
(Number healthCheckPort) Sets the value ofEndpointGroupOptions.getHealthCheckPort()
healthCheckProtocol
(HealthCheckProtocol healthCheckProtocol) Sets the value ofEndpointGroupOptions.getHealthCheckProtocol()
healthCheckThreshold
(Number healthCheckThreshold) Sets the value ofEndpointGroupOptions.getHealthCheckThreshold()
portOverrides
(List<? extends PortOverride> portOverrides) Sets the value ofEndpointGroupOptions.getPortOverrides()
Sets the value ofEndpointGroupOptions.getRegion()
trafficDialPercentage
(Number trafficDialPercentage) Sets the value ofEndpointGroupOptions.getTrafficDialPercentage()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
endpointGroupName
Sets the value ofEndpointGroupOptions.getEndpointGroupName()
- Parameters:
endpointGroupName
- Name of the endpoint group.- Returns:
this
-
endpoints
@Stability(Stable) public EndpointGroupOptions.Builder endpoints(List<? extends IEndpoint> endpoints) Sets the value ofEndpointGroupOptions.getEndpoints()
- Parameters:
endpoints
- Initial list of endpoints for this group.- Returns:
this
-
healthCheckInterval
@Stability(Stable) public EndpointGroupOptions.Builder healthCheckInterval(Duration healthCheckInterval) Sets the value ofEndpointGroupOptions.getHealthCheckInterval()
- Parameters:
healthCheckInterval
- The time between health checks for each endpoint. Must be either 10 or 30 seconds.- Returns:
this
-
healthCheckPath
Sets the value ofEndpointGroupOptions.getHealthCheckPath()
- Parameters:
healthCheckPath
- The ping path for health checks (if the protocol is HTTP(S)).- Returns:
this
-
healthCheckPort
Sets the value ofEndpointGroupOptions.getHealthCheckPort()
- Parameters:
healthCheckPort
- The port used to perform health checks.- Returns:
this
-
healthCheckProtocol
@Stability(Stable) public EndpointGroupOptions.Builder healthCheckProtocol(HealthCheckProtocol healthCheckProtocol) Sets the value ofEndpointGroupOptions.getHealthCheckProtocol()
- Parameters:
healthCheckProtocol
- The protocol used to perform health checks.- Returns:
this
-
healthCheckThreshold
@Stability(Stable) public EndpointGroupOptions.Builder healthCheckThreshold(Number healthCheckThreshold) Sets the value ofEndpointGroupOptions.getHealthCheckThreshold()
- 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.- Returns:
this
-
portOverrides
@Stability(Stable) public EndpointGroupOptions.Builder portOverrides(List<? extends PortOverride> portOverrides) Sets the value ofEndpointGroupOptions.getPortOverrides()
- Parameters:
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.- Returns:
this
-
region
Sets the value ofEndpointGroupOptions.getRegion()
- Parameters:
region
- The AWS Region where the endpoint group is located.- Returns:
this
-
trafficDialPercentage
@Stability(Stable) public EndpointGroupOptions.Builder trafficDialPercentage(Number trafficDialPercentage) Sets the value ofEndpointGroupOptions.getTrafficDialPercentage()
- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EndpointGroupOptions>
- Returns:
- a new instance of
EndpointGroupOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-