HealthCheck

class HealthCheck : KotlinCustomResource

Provides a Route53 health check.

Example Usage

Connectivity and HTTP Status Code Check

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.HealthCheck;
import com.pulumi.aws.route53.HealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new HealthCheck("example", HealthCheckArgs.builder()
.failureThreshold("5")
.fqdn("example.com")
.port(80)
.requestInterval("30")
.resourcePath("/")
.tags(Map.of("Name", "tf-test-health-check"))
.type("HTTP")
.build());
}
}

Connectivity and String Matching Check

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.HealthCheck;
import com.pulumi.aws.route53.HealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new HealthCheck("example", HealthCheckArgs.builder()
.failureThreshold("5")
.fqdn("example.com")
.port(443)
.requestInterval("30")
.resourcePath("/")
.searchString("example")
.type("HTTPS_STR_MATCH")
.build());
}
}

Aggregate Check

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.route53.HealthCheck;
import com.pulumi.aws.route53.HealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var parent = new HealthCheck("parent", HealthCheckArgs.builder()
.type("CALCULATED")
.childHealthThreshold(1)
.childHealthchecks(aws_route53_health_check.child().id())
.tags(Map.of("Name", "tf-test-calculated-health-check"))
.build());
}
}

CloudWatch Alarm Check

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudwatch.MetricAlarm;
import com.pulumi.aws.cloudwatch.MetricAlarmArgs;
import com.pulumi.aws.route53.HealthCheck;
import com.pulumi.aws.route53.HealthCheckArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var foobar = new MetricAlarm("foobar", MetricAlarmArgs.builder()
.comparisonOperator("GreaterThanOrEqualToThreshold")
.evaluationPeriods("2")
.metricName("CPUUtilization")
.namespace("AWS/EC2")
.period("120")
.statistic("Average")
.threshold("80")
.alarmDescription("This metric monitors ec2 cpu utilization")
.build());
var foo = new HealthCheck("foo", HealthCheckArgs.builder()
.type("CLOUDWATCH_METRIC")
.cloudwatchAlarmName(foobar.name())
.cloudwatchAlarmRegion("us-west-2")
.insufficientDataHealthStatus("Healthy")
.build());
}
}

Import

Route53 Health Checks can be imported using the health check id, e.g.,

$ pulumi import aws:route53/healthCheck:HealthCheck http_check abcdef11-2222-3333-4444-555555fedcba

Properties

Link copied to clipboard
val arn: Output<String>

The Amazon Resource Name (ARN) of the Health Check.

Link copied to clipboard

For a specified parent health check, a list of HealthCheckId values for the associated child health checks.

Link copied to clipboard

The minimum number of child health checks that must be healthy for Route 53 to consider the parent health check to be healthy. Valid values are integers between 0 and 256, inclusive

Link copied to clipboard

The name of the CloudWatch alarm.

Link copied to clipboard

The CloudWatchRegion that the CloudWatch alarm was created in.

Link copied to clipboard
val disabled: Output<Boolean>?

A boolean value that stops Route 53 from performing health checks. When set to true, Route 53 will do the following depending on the type of health check:

Link copied to clipboard
val enableSni: Output<Boolean>

A boolean value that indicates whether Route53 should send the fqdn to the endpoint when performing the health check. This defaults to AWS' defaults: when the type is "HTTPS" enable_sni defaults to true, when type is anything else enable_sni defaults to false.

Link copied to clipboard
val failureThreshold: Output<Int>

The number of consecutive health checks that an endpoint must pass or fail.

Link copied to clipboard
val fqdn: Output<String>?

The fully qualified domain name of the endpoint to be checked.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are Healthy , Unhealthy and LastKnownStatus.

Link copied to clipboard

A boolean value that indicates whether the status of health check should be inverted. For example, if a health check is healthy but Inverted is True , then Route 53 considers the health check to be unhealthy.

Link copied to clipboard
val ipAddress: Output<String>?

The IP address of the endpoint to be checked.

Link copied to clipboard
val measureLatency: Output<Boolean>?

A Boolean value that indicates whether you want Route 53 to measure the latency between health checkers in multiple AWS regions and your endpoint and to display CloudWatch latency graphs in the Route 53 console.

Link copied to clipboard
val port: Output<Int>?

The port of the endpoint to be checked.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val referenceName: Output<String>?

This is a reference name used in Caller Reference (helpful for identifying single health_check set amongst others)

Link copied to clipboard
val regions: Output<List<String>>?

A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.

Link copied to clipboard
val requestInterval: Output<Int>?

The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request.

Link copied to clipboard
val resourcePath: Output<String>?

The path that you want Amazon Route 53 to request when performing health checks.

Link copied to clipboard

The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is RECOVERY_CONTROL

Link copied to clipboard
val searchString: Output<String>?

String searched in the first 5120 bytes of the response body for check to be considered healthy. Only valid with HTTP_STR_MATCH and HTTPS_STR_MATCH.

Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the health check. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val type: Output<String>

The protocol to use when performing health checks. Valid values are HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP, CALCULATED, CLOUDWATCH_METRIC and RECOVERY_CONTROL.

Link copied to clipboard
val urn: Output<String>