Enum Class HealthCheckType

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

@Generated(value="jsii-pacmak/1.110.0 (build 336b265)", date="2025-04-22T23:08:19.700Z") @Stability(Stable) public enum HealthCheckType extends Enum<HealthCheckType>
The type of health check to be associated with the record.

Example:

 HostedZone myZone;
 HealthCheck healthCheck = HealthCheck.Builder.create(this, "HealthCheck")
         .type(HealthCheckType.HTTP)
         .fqdn("example.com")
         .port(80)
         .resourcePath("/health")
         .failureThreshold(3)
         .requestInterval(Duration.seconds(30))
         .build();
 ARecord.Builder.create(this, "ARecord")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("1.2.3.4"))
         .healthCheck(healthCheck)
         .weight(100)
         .build();
 ARecord.Builder.create(this, "ARecord2")
         .zone(myZone)
         .target(RecordTarget.fromIpAddresses("5.6.7.8"))
         .weight(0)
         .build();
 
  • Enum Constant Details

    • HTTP

      @Stability(Stable) public static final HealthCheckType HTTP
      HTTP health check.

      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
      HTTPS health check.

      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.

    • HTTP_STR_MATCH

      @Stability(Stable) public static final HealthCheckType HTTP_STR_MATCH
      HTTP health check with string matching.

      Route 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTP request and searches the first 5,120 bytes of the response body for the string that you specify in SearchString.

    • HTTPS_STR_MATCH

      @Stability(Stable) public static final HealthCheckType HTTPS_STR_MATCH
      HTTPS health check with string matching.

      Route 53 tries to establish a TCP connection. If successful, Route 53 submits an HTTPS request and searches the first 5,120 bytes of the response body for the string that you specify in SearchString.

    • TCP

      @Stability(Stable) public static final HealthCheckType TCP
      TCP health check.

      Route 53 tries to establish a TCP connection.

    • CLOUDWATCH_METRIC

      @Stability(Stable) public static final HealthCheckType CLOUDWATCH_METRIC
      CloudWatch metric health check.

      The health check is associated with a CloudWatch alarm. If the state of the alarm is OK, the health check is considered healthy. If the state is ALARM, the health check is considered unhealthy. If CloudWatch doesn't have sufficient data to determine whether the state is OK or ALARM, the health check status depends on the setting for InsufficientDataHealthStatus: Healthy, Unhealthy, or LastKnownStatus.

    • CALCULATED

      @Stability(Stable) public static final HealthCheckType CALCULATED
      Calculated health check.

      For health checks that monitor the status of other health checks, Route 53 adds up the number of health checks that Route 53 health checkers consider to be healthy and compares that number with the value of HealthThreshold.

    • RECOVERY_CONTROL

      @Stability(Stable) public static final HealthCheckType RECOVERY_CONTROL
      Recovery control health check.

      The health check is associated with a Route53 Application Recovery Controller routing control. If the routing control state is ON, the health check is considered healthy. If the state is OFF, the health check is considered unhealthy.

  • Method Details

    • values

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

      public static HealthCheckType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null