Interface HealthCheckConfig
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
HealthCheckConfig.Jsii$Proxy
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-14T03:25:05.572Z")
@Stability(Stable)
public interface HealthCheckConfig
extends software.amazon.jsii.JsiiSerializable
Settings for an optional Amazon Route 53 health check.
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.*; import software.amazon.awscdk.*; App app = new App(); Stack stack = new Stack(app, "aws-servicediscovery-integ"); HttpNamespace namespace = HttpNamespace.Builder.create(stack, "MyNamespace") .name("MyHTTPNamespace") .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:::amzn-s3-demo-bucket")) .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();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forHealthCheckConfig
static final class
An implementation forHealthCheckConfig
-
Method Summary
Modifier and TypeMethodDescriptionstatic HealthCheckConfig.Builder
builder()
default Number
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 String
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.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
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: 1
-
getResourcePath
The path that you want Route 53 to request when performing health checks.Do not use when health check type is TCP.
Default: '/'
-
getType
The type of health check that you want to create, which indicates how Route 53 determines whether an endpoint is healthy.Cannot be modified once created. Supported values are HTTP, HTTPS, and TCP.
Default: HTTP
-
builder
- Returns:
- a
HealthCheckConfig.Builder
ofHealthCheckConfig
-