Interface HttpHealthCheckOptions

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

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:25.561Z") @Stability(Stable) public interface HttpHealthCheckOptions extends software.amazon.jsii.JsiiSerializable
Properties used to define HTTP Based healthchecks.

Example:

 Mesh mesh;
 Vpc vpc = new Vpc(this, "vpc");
 PrivateDnsNamespace namespace = PrivateDnsNamespace.Builder.create(this, "test-namespace")
         .vpc(vpc)
         .name("domain.local")
         .build();
 Service service = namespace.createService("Svc");
 VirtualNode node = mesh.addVirtualNode("virtual-node", VirtualNodeBaseProps.builder()
         .serviceDiscovery(ServiceDiscovery.cloudMap(service))
         .listeners(List.of(VirtualNodeListener.http(HttpVirtualNodeListenerOptions.builder()
                 .port(8081)
                 .healthCheck(HealthCheck.http(HttpHealthCheckOptions.builder()
                         .healthyThreshold(3)
                         .interval(Duration.seconds(5)) // minimum
                         .path("/health-check-path")
                         .timeout(Duration.seconds(2)) // minimum
                         .unhealthyThreshold(2)
                         .build()))
                 .build())))
         .accessLog(AccessLog.fromFilePath("/dev/stdout"))
         .build());
 
  • Method Details

    • getHealthyThreshold

      @Stability(Stable) @Nullable default Number getHealthyThreshold()
      The number of consecutive successful health checks that must occur before declaring listener healthy.

      Default: 2

    • getInterval

      @Stability(Stable) @Nullable default Duration getInterval()
      The time period between each health check execution.

      Default: Duration.seconds(5)

    • getPath

      @Stability(Stable) @Nullable default String getPath()
      The destination path for the health check request.

      Default: /

    • getTimeout

      @Stability(Stable) @Nullable default Duration getTimeout()
      The amount of time to wait when receiving a response from the health check.

      Default: Duration.seconds(2)

    • getUnhealthyThreshold

      @Stability(Stable) @Nullable default Number getUnhealthyThreshold()
      The number of consecutive failed health checks that must occur before declaring a listener unhealthy.

      Default: - 2

    • builder

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