Interface HealthCheck
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
HealthCheck.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:40.174Z")
@Stability(Stable)
public interface HealthCheck
extends software.amazon.jsii.JsiiSerializable
Describe the health check to a load balancer.
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forHealthCheckstatic final classAn implementation forHealthCheck -
Method Summary
Modifier and TypeMethodDescriptionstatic HealthCheck.Builderbuilder()default NumberAfter how many successful checks is an instance considered healthy.default DurationNumber of seconds between health checks.default StringgetPath()What path to use for HTTP or HTTPS health check (must return 200).getPort()What port number to health check on.default LoadBalancingProtocolWhat protocol to use for health checking.default DurationHealth check timeout.default NumberAfter how many unsuccessful checks is an instance considered unhealthy.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getPort
What port number to health check on. -
getHealthyThreshold
After how many successful checks is an instance considered healthy.Default: 2
-
getInterval
Number of seconds between health checks.Default: Duration.seconds(30)
-
getPath
What path to use for HTTP or HTTPS health check (must return 200).For SSL and TCP health checks, accepting connections is enough to be considered healthy.
Default: "/"
-
getProtocol
What protocol to use for health checking.The protocol is automatically determined from the port if it's not supplied.
Default: Automatic
-
getTimeout
Health check timeout.Default: Duration.seconds(5)
-
getUnhealthyThreshold
After how many unsuccessful checks is an instance considered unhealthy.Default: 5
-
builder
- Returns:
- a
HealthCheck.BuilderofHealthCheck
-