@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:39.042Z") @Stability(value=Stable) public interface HealthCheck extends software.amazon.jsii.JsiiSerializable
Example:
IVpc vpc;
AutoScalingGroup myAutoScalingGroup;
LoadBalancer lb = LoadBalancer.Builder.create(this, "LB")
.vpc(vpc)
.internetFacing(true)
.healthCheck(HealthCheck.builder()
.port(80)
.build())
.build();
lb.addTarget(myAutoScalingGroup);
lb.addListener(LoadBalancerListener.builder()
.externalPort(80)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
HealthCheck.Builder
A builder for
HealthCheck |
static class |
HealthCheck.Jsii$Proxy
An implementation for
HealthCheck |
| Modifier and Type | Method and Description |
|---|---|
static HealthCheck.Builder |
builder() |
default Number |
getHealthyThreshold()
After how many successful checks is an instance considered healthy.
|
default Duration |
getInterval()
Number of seconds between health checks.
|
default String |
getPath()
What path to use for HTTP or HTTPS health check (must return 200).
|
Number |
getPort()
What port number to health check on.
|
default LoadBalancingProtocol |
getProtocol()
What protocol to use for health checking.
|
default Duration |
getTimeout()
Health check timeout.
|
default Number |
getUnhealthyThreshold()
After how many unsuccessful checks is an instance considered unhealthy.
|
@Stability(value=Stable) @NotNull Number getPort()
@Stability(value=Stable) @Nullable default Number getHealthyThreshold()
Default: 2
@Stability(value=Stable) @Nullable default Duration getInterval()
Default: Duration.seconds(30)
@Stability(value=Stable) @Nullable default String getPath()
For SSL and TCP health checks, accepting connections is enough to be considered healthy.
Default: "/"
@Stability(value=Stable) @Nullable default LoadBalancingProtocol getProtocol()
The protocol is automatically determined from the port if it's not supplied.
Default: Automatic
@Stability(value=Stable) @Nullable default Duration getTimeout()
Default: Duration.seconds(5)
@Stability(value=Stable) @Nullable default Number getUnhealthyThreshold()
Default: 5
@Stability(value=Stable) static HealthCheck.Builder builder()
HealthCheck.Builder of HealthCheckCopyright © 2022. All rights reserved.