Enum HealthCheckType

java.lang.Object
java.lang.Enum<HealthCheckType>
software.amazon.awscdk.services.servicediscovery.HealthCheckType
All Implemented Interfaces:
Serializable, Comparable<HealthCheckType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:37.562Z") @Stability(Stable) public enum HealthCheckType extends Enum<HealthCheckType>
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:::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();
 
  • Enum Constant Details

    • HTTP

      @Stability(Stable) public static final HealthCheckType HTTP
      Route 53 tries to establish a TCP connection.

      If successful, Route 53 submits an HTTP request and waits for an HTTP status code of 200 or greater and less than 400.

    • HTTPS

      @Stability(Stable) public static final HealthCheckType HTTPS
      Route 53 tries to establish a TCP connection.

      If successful, Route 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater and less than 400. If you specify HTTPS for the value of Type, the endpoint must support TLS v1.0 or later.

    • TCP

      @Stability(Stable) public static final HealthCheckType TCP
      Route 53 tries to establish a TCP connection.

      If you specify TCP for Type, don't specify a value for ResourcePath.

  • Method Details

    • values

      public static HealthCheckType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static HealthCheckType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null