@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)",
date="2023-03-14T16:25:33.965Z")
public interface HealthCheckConfig
If you specify settings for a health check, AWS Cloud Map associates the health check with all the records that you specify in DnsConfig. Only valid with a PublicDnsNamespace.
Example:
import software.amazon.awscdk.core.*; import software.amazon.awscdk.services.servicediscovery.*; App app = new App(); Stack stack = new Stack(app, "aws-servicediscovery-integ"); HttpNamespace namespace = HttpNamespace.Builder.create(stack, "MyNamespace") .name("covfefe") .build(); Service service1 = namespace.createService("NonIpService", BaseServiceProps.builder() .description("service registering non-ip instances") .build()); service1.registerNonIpInstance("NonIpInstance", NonIpInstanceBaseProps.builder() .customAttributes(Map.of("arn", "arn:aws:s3:::mybucket")) .build()); Service service2 = namespace.createService("IpService", BaseServiceProps.builder() .description("service registering ip instances") .healthCheck(HealthCheckConfig.builder() .type(HealthCheckType.HTTP) .resourcePath("/check") .build()) .build()); service2.registerIpInstance("IpInstance", IpInstanceBaseProps.builder() .ipv4("54.239.25.192") .build()); app.synth();
Modifier and Type | Interface and Description |
---|---|
static class |
HealthCheckConfig.Builder
A builder for
HealthCheckConfig |
static class |
HealthCheckConfig.Jsii$Proxy
An implementation for
HealthCheckConfig |
Modifier and Type | Method and Description |
---|---|
static HealthCheckConfig.Builder |
builder() |
default java.lang.Number |
getFailureThreshold()
The number of consecutive health checks that an endpoint must pass or fail for Route 53 to change the current status of the endpoint from unhealthy to healthy or vice versa.
|
default java.lang.String |
getResourcePath()
The path that you want Route 53 to request when performing health checks.
|
default HealthCheckType |
getType()
The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.
|
default java.lang.Number getFailureThreshold()
Default: 1
default java.lang.String getResourcePath()
Do not use when health check type is TCP.
Default: '/'
default HealthCheckType getType()
Cannot be modified once created. Supported values are HTTP, HTTPS, and TCP.
Default: HTTP
static HealthCheckConfig.Builder builder()
HealthCheckConfig.Builder
of HealthCheckConfig