Class HealthCheck
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.route53.HealthCheck
- All Implemented Interfaces:
IResource,IHealthCheck,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.113.0 (build fc68b25)",
date="2025-10-14T12:28:19.350Z")
@Stability(Stable)
public class HealthCheck
extends Resource
implements IHealthCheck
Amazon Route 53 health checks monitor the health and performance of your web applications, web servers, and other resources.
Each health check that you create can monitor one of the following:
- The health of a resource, such as a web server,
- The status of other health checks, and
- The CloudWatch alarm that you specify,
- The status of an Amazon Route 53 routing control.
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();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.route53.IHealthCheck
IHealthCheck.Jsii$Default, IHealthCheck.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHealthCheck(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedHealthCheck(software.amazon.jsii.JsiiObjectRef objRef) HealthCheck(software.constructs.Construct scope, String id, HealthCheckProps props) Creates a new health check. -
Method Summary
Modifier and TypeMethodDescriptionstatic IHealthCheckfromHealthCheckId(software.constructs.Construct scope, String id, String healthCheckId) Import an existing health check into this CDK app.The ID of the health check.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
HealthCheck
protected HealthCheck(software.amazon.jsii.JsiiObjectRef objRef) -
HealthCheck
protected HealthCheck(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
HealthCheck
@Stability(Stable) public HealthCheck(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull HealthCheckProps props) Creates a new health check.- Parameters:
scope- The parent creating construct (usuallythis). This parameter is required.id- The construct's name. This parameter is required.props- the properties of the new health check. This parameter is required.
-
-
Method Details
-
fromHealthCheckId
@Stability(Stable) @NotNull public static IHealthCheck fromHealthCheckId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String healthCheckId) Import an existing health check into this CDK app.- Parameters:
scope- The parent creating construct (usuallythis). This parameter is required.id- The construct's name. This parameter is required.healthCheckId- ID of the health check. This parameter is required.- Returns:
- a reference to the existing health check.
-
getHealthCheckId
The ID of the health check.- Specified by:
getHealthCheckIdin interfaceIHealthCheck
-