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 Summary
Modifier and TypeMethodDescriptionbuild()
static EndpointGroup.Builder
endpointGroupName
(String endpointGroupName) Name of the endpoint group.Initial list of endpoints for this group.healthCheckInterval
(Duration healthCheckInterval) The time between health checks for each endpoint.healthCheckPath
(String healthCheckPath) The ping path for health checks (if the protocol is HTTP(S)).healthCheckPort
(Number healthCheckPort) The port used to perform health checks.healthCheckProtocol
(HealthCheckProtocol healthCheckProtocol) The protocol used to perform health checks.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.The Amazon Resource Name (ARN) of the listener.portOverrides
(List<? extends PortOverride> portOverrides) Override the destination ports used to route traffic to an endpoint.The AWS Region where the endpoint group is located.trafficDialPercentage
(Number trafficDialPercentage) The percentage of traffic to send to this AWS Region.
-
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
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
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
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
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
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
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
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
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EndpointGroup>
- Returns:
- a newly built instance of
EndpointGroup
.
-