Class HealthCheck
Amazon Route 53 health checks monitor the health and performance of your web applications, web servers, and other resources.
Inherited Members
Namespace: Amazon.CDK.AWS.Route53
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class HealthCheck : Resource, IHealthCheck, IResource, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class HealthCheck Inherits Resource Implements IHealthCheck, IResource, IConstruct, IDependable, IEnvironmentAware
Remarks
Each health check that you create can monitor one of the following:
ExampleMetadata: infused
Examples
HostedZone myZone;
var healthCheck = new HealthCheck(this, "HealthCheck", new HealthCheckProps {
Type = HealthCheckType.HTTP,
Fqdn = "example.com",
Port = 80,
ResourcePath = "/health",
FailureThreshold = 3,
RequestInterval = Duration.Seconds(30)
});
new ARecord(this, "ARecord", new ARecordProps {
Zone = myZone,
Target = RecordTarget.FromIpAddresses("1.2.3.4"),
HealthCheck = healthCheck,
Weight = 100
});
new ARecord(this, "ARecord2", new ARecordProps {
Zone = myZone,
Target = RecordTarget.FromIpAddresses("5.6.7.8"),
Weight = 0
});
Synopsis
Constructors
| HealthCheck(Construct, string, IHealthCheckProps) | Creates a new health check. |
Properties
| HealthCheckId | The ID of the health check. |
| PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
| FromHealthCheckId(Construct, string, string) | Import an existing health check into this CDK app. |
Constructors
HealthCheck(Construct, string, IHealthCheckProps)
Creates a new health check.
public HealthCheck(Construct scope, string id, IHealthCheckProps props)
Parameters
- scope Construct
The parent creating construct (usually
this).- id string
The construct's name.
- props IHealthCheckProps
the properties of the new health check.
Remarks
Each health check that you create can monitor one of the following:
ExampleMetadata: infused
Properties
HealthCheckId
The ID of the health check.
public virtual string HealthCheckId { get; }
Property Value
Remarks
Each health check that you create can monitor one of the following:
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
Each health check that you create can monitor one of the following:
ExampleMetadata: infused
Methods
FromHealthCheckId(Construct, string, string)
Import an existing health check into this CDK app.
public static IHealthCheck FromHealthCheckId(Construct scope, string id, string healthCheckId)
Parameters
- scope Construct
The parent creating construct (usually
this).- id string
The construct's name.
- healthCheckId string
ID of the health check.
Returns
a reference to the existing health check.
Remarks
Each health check that you create can monitor one of the following:
ExampleMetadata: infused