Health Check
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
For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
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
The name of the CloudWatch alarm.
The CloudWatchRegion that the CloudWatch alarm was created in.
The number of consecutive health checks that an endpoint must pass or fail.
The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are Healthy
, Unhealthy
and LastKnownStatus
.
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.
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.
This is a reference name used in Caller Reference (helpful for identifying single health_check set amongst others)
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.
The path that you want Amazon Route 53 to request when performing health checks.
The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller routing control. This is used when health check type is RECOVERY_CONTROL
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
.