Interface HealthCheckConfig

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
HealthCheckConfig.Jsii$Proxy

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:45.626Z") @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.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();
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    A builder for HealthCheckConfig
    static final class 
    An implementation for HealthCheckConfig
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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.
    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

      @Stability(Stable) @Nullable default 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: 1

    • getResourcePath

      @Stability(Stable) @Nullable default String 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

      @Stability(Stable) @Nullable default HealthCheckType 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

      @Stability(Stable) static HealthCheckConfig.Builder builder()
      Returns:
      a HealthCheckConfig.Builder of HealthCheckConfig