Class HealthCheck
Provides a Route53 health check.
Example Usage
Connectivity and HTTP Status Code Check
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Route53.HealthCheck("example", new Aws.Route53.HealthCheckArgs
{
FailureThreshold = "5",
Fqdn = "example.com",
Port = 80,
RequestInterval = "30",
ResourcePath = "/",
Tags =
{
{ "Name", "tf-test-health-check" },
},
Type = "HTTP",
});
}
}
Connectivity and String Matching Check
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Route53.HealthCheck("example", new Aws.Route53.HealthCheckArgs
{
FailureThreshold = "5",
Fqdn = "example.com",
Port = 443,
RequestInterval = "30",
ResourcePath = "/",
SearchString = "example",
Type = "HTTPS_STR_MATCH",
});
}
}
Aggregate Check
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var parent = new Aws.Route53.HealthCheck("parent", new Aws.Route53.HealthCheckArgs
{
ChildHealthThreshold = 1,
ChildHealthchecks =
{
aws_route53_health_check.Child.Id,
},
Tags =
{
{ "Name", "tf-test-calculated-health-check" },
},
Type = "CALCULATED",
});
}
}
CloudWatch Alarm Check
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var foobar = new Aws.CloudWatch.MetricAlarm("foobar", new Aws.CloudWatch.MetricAlarmArgs
{
AlarmDescription = "This metric monitors ec2 cpu utilization",
ComparisonOperator = "GreaterThanOrEqualToThreshold",
EvaluationPeriods = "2",
MetricName = "CPUUtilization",
Namespace = "AWS/EC2",
Period = "120",
Statistic = "Average",
Threshold = "80",
});
var foo = new Aws.Route53.HealthCheck("foo", new Aws.Route53.HealthCheckArgs
{
CloudwatchAlarmName = foobar.Name,
CloudwatchAlarmRegion = "us-west-2",
InsufficientDataHealthStatus = "Healthy",
Type = "CLOUDWATCH_METRIC",
});
}
}
Inherited Members
Namespace: Pulumi.Aws.Route53
Assembly: Pulumi.Aws.dll
Syntax
public class HealthCheck : CustomResource
Constructors
View SourceHealthCheck(String, HealthCheckArgs, CustomResourceOptions)
Create a HealthCheck resource with the given unique name, arguments, and options.
Declaration
public HealthCheck(string name, HealthCheckArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| HealthCheckArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceChildHealthchecks
For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
Declaration
public Output<ImmutableArray<string>> ChildHealthchecks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
ChildHealthThreshold
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
Declaration
public Output<int?> ChildHealthThreshold { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
CloudwatchAlarmName
The name of the CloudWatch alarm.
Declaration
public Output<string> CloudwatchAlarmName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CloudwatchAlarmRegion
The CloudWatchRegion that the CloudWatch alarm was created in.
Declaration
public Output<string> CloudwatchAlarmRegion { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableSni
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.
Declaration
public Output<bool> EnableSni { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Boolean> |
FailureThreshold
The number of consecutive health checks that an endpoint must pass or fail.
Declaration
public Output<int?> FailureThreshold { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
Fqdn
The fully qualified domain name of the endpoint to be checked.
Declaration
public Output<string> Fqdn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InsufficientDataHealthStatus
The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are Healthy , Unhealthy and LastKnownStatus.
Declaration
public Output<string> InsufficientDataHealthStatus { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
InvertHealthcheck
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.
Declaration
public Output<bool?> InvertHealthcheck { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
IpAddress
The IP address of the endpoint to be checked.
Declaration
public Output<string> IpAddress { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
MeasureLatency
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.
Declaration
public Output<bool?> MeasureLatency { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Port
The port of the endpoint to be checked.
Declaration
public Output<int?> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ReferenceName
This is a reference name used in Caller Reference (helpful for identifying single health_check set amongst others)
Declaration
public Output<string> ReferenceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Regions
A list of AWS regions that you want Amazon Route 53 health checkers to check the specified endpoint from.
Declaration
public Output<ImmutableArray<string>> Regions { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
RequestInterval
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.
Declaration
public Output<int?> RequestInterval { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
ResourcePath
The path that you want Amazon Route 53 to request when performing health checks.
Declaration
public Output<string> ResourcePath { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SearchString
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.
Declaration
public Output<string> SearchString { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the health check.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Type
The protocol to use when performing health checks. Valid values are HTTP, HTTPS, HTTP_STR_MATCH, HTTPS_STR_MATCH, TCP, CALCULATED and CLOUDWATCH_METRIC.
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, HealthCheckState, CustomResourceOptions)
Get an existing HealthCheck resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static HealthCheck Get(string name, Input<string> id, HealthCheckState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| HealthCheckState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| HealthCheck |