@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)",
date="2023-01-31T18:36:57.647Z")
public interface HealthCheck
Example:
Cluster cluster; ApplicationLoadBalancedFargateService loadBalancedFargateService = ApplicationLoadBalancedFargateService.Builder.create(this, "Service") .cluster(cluster) .memoryLimitMiB(1024) .cpu(512) .taskImageOptions(ApplicationLoadBalancedTaskImageOptions.builder() .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .build()) .build(); loadBalancedFargateService.targetGroup.configureHealthCheck(HealthCheck.builder() .path("/custom-health-path") .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 java.lang.Boolean |
getEnabled()
Indicates whether health checks are enabled.
|
default java.lang.String |
getHealthyGrpcCodes()
GRPC code to use when checking for a successful response from a target.
|
default java.lang.String |
getHealthyHttpCodes()
HTTP code to use when checking for a successful response from a target.
|
default java.lang.Number |
getHealthyThresholdCount()
The number of consecutive health checks successes required before considering an unhealthy target healthy.
|
default Duration |
getInterval()
The approximate number of seconds between health checks for an individual target.
|
default java.lang.String |
getPath()
The ping path destination where Elastic Load Balancing sends health check requests.
|
default java.lang.String |
getPort()
The port that the load balancer uses when performing health checks on the targets.
|
default Protocol |
getProtocol()
The protocol the load balancer uses when performing health checks on targets.
|
default Duration |
getTimeout()
The amount of time, in seconds, during which no response from a target means a failed health check.
|
default java.lang.Number |
getUnhealthyThresholdCount()
The number of consecutive health check failures required before considering a target unhealthy.
|
default java.lang.Boolean getEnabled()
If the target type is lambda, health checks are disabled by default but can be enabled. If the target type is instance or ip, health checks are always enabled and cannot be disabled.
Default: - Determined automatically.
default java.lang.String getHealthyGrpcCodes()
You can specify values between 0 and 99. You can specify multiple values (for example, "0,1") or a range of values (for example, "0-5").
Default: - 12
default java.lang.String getHealthyHttpCodes()
For Application Load Balancers, you can specify values between 200 and 499, and the default value is 200. You can specify multiple values (for example, "200,202") or a range of values (for example, "200-299").
default java.lang.Number getHealthyThresholdCount()
For Application Load Balancers, the default is 5. For Network Load Balancers, the default is 3.
Default: 5 for ALBs, 3 for NLBs
default Duration getInterval()
Default: Duration.seconds(30)
default java.lang.String getPath()
Default: /
default java.lang.String getPort()
Default: 'traffic-port'
default Protocol getProtocol()
The TCP protocol is supported for health checks only if the protocol of the target group is TCP, TLS, UDP, or TCP_UDP. The TLS, UDP, and TCP_UDP protocols are not supported for health checks.
Default: HTTP for ALBs, TCP for NLBs
default Duration getTimeout()
For Application Load Balancers, the range is 2-60 seconds and the default is 5 seconds. For Network Load Balancers, this is 10 seconds for TCP and HTTPS health checks and 6 seconds for HTTP health checks.
Default: Duration.seconds(5) for ALBs, Duration.seconds(10) or Duration.seconds(6) for NLBs
default java.lang.Number getUnhealthyThresholdCount()
For Application Load Balancers, the default is 2. For Network Load Balancers, this value must be the same as the healthy threshold count.
Default: 2
static HealthCheck.Builder builder()
HealthCheck.Builder
of HealthCheck