Class CfnHealthCheck
- All Implemented Interfaces:
IInspectable,IEnvironmentAware,IHealthCheckRef,ITaggableV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
AWS::Route53::HealthCheck resource is a Route 53 resource type that contains settings for a Route 53 health check.
For information about associating health checks with records, see HealthCheckId in ChangeResourceRecordSets .
You can't create a health check with simple routing.
ELB Load Balancers
If you're registering EC2 instances with an Elastic Load Balancing (ELB) load balancer, do not create Amazon Route 53 health checks for the EC2 instances. When you register an EC2 instance with a load balancer, you configure settings for an ELB health check, which performs a similar function to a Route 53 health check.
Private Hosted Zones
You can associate health checks with failover records in a private hosted zone. Note the following:
- Route 53 health checkers are outside the VPC. To check the health of an endpoint within a VPC by IP address, you must assign a public IP address to the instance in the VPC.
- You can configure a health checker to check the health of an external resource that the instance relies on, such as a database server.
- You can create a CloudWatch metric, associate an alarm with the metric, and then create a health check that is based on the state of the alarm. For example, you might create a CloudWatch metric that checks the status of the Amazon EC2
StatusCheckFailedmetric, add an alarm to the metric, and then create a health check that is based on the state of the alarm. For information about creating CloudWatch metrics and alarms by using the CloudWatch console, see the Amazon CloudWatch User Guide .
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.route53.*;
CfnHealthCheck cfnHealthCheck = CfnHealthCheck.Builder.create(this, "MyCfnHealthCheck")
.healthCheckConfig(HealthCheckConfigProperty.builder()
.type("type")
// the properties below are optional
.alarmIdentifier(AlarmIdentifierProperty.builder()
.name("name")
.region("region")
.build())
.childHealthChecks(List.of("childHealthChecks"))
.enableSni(false)
.failureThreshold(123)
.fullyQualifiedDomainName("fullyQualifiedDomainName")
.healthThreshold(123)
.insufficientDataHealthStatus("insufficientDataHealthStatus")
.inverted(false)
.ipAddress("ipAddress")
.measureLatency(false)
.port(123)
.regions(List.of("regions"))
.requestInterval(123)
.resourcePath("resourcePath")
.routingControlArn("routingControlArn")
.searchString("searchString")
.build())
// the properties below are optional
.healthCheckTags(List.of(HealthCheckTagProperty.builder()
.key("key")
.value("value")
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA complex type that identifies the CloudWatch alarm that you want Amazon Route 53 health checkers to use to determine whether the specified health check is healthy.static final classA fluent builder forCfnHealthCheck.static interfaceA complex type that contains information about the health check.static interfaceTheHealthCheckTagproperty describes one key-value pair that is associated with anAWS::Route53::HealthCheckresource.Nested 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.interfaces.route53.IHealthCheckRef
IHealthCheckRef.Jsii$Default, IHealthCheckRef.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggableV2
ITaggableV2.Jsii$Default, ITaggableV2.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnHealthCheck(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnHealthCheck(software.amazon.jsii.JsiiObjectRef objRef) CfnHealthCheck(software.constructs.Construct scope, String id, CfnHealthCheckProps props) Create a newAWS::Route53::HealthCheck. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarnForHealthCheck(IHealthCheckRef resource) The identifier that Amazon Route 53 assigned to the health check when you created it.Tag Manager which manages the tags for this resource.A complex type that contains detailed information about one health check.A reference to a HealthCheck resource.TheHealthCheckTagsproperty describes key-value pairs that are associated with anAWS::Route53::HealthCheckresource.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.static BooleanChecks whether the given object is a CfnHealthCheck.renderProperties(Map<String, Object> props) voidsetHealthCheckConfig(IResolvable value) A complex type that contains detailed information about one health check.voidA complex type that contains detailed information about one health check.voidTheHealthCheckTagsproperty describes key-value pairs that are associated with anAWS::Route53::HealthCheckresource.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods 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.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnHealthCheck
protected CfnHealthCheck(software.amazon.jsii.JsiiObjectRef objRef) -
CfnHealthCheck
protected CfnHealthCheck(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnHealthCheck
@Stability(Stable) public CfnHealthCheck(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnHealthCheckProps props) Create a newAWS::Route53::HealthCheck.- Parameters:
scope- Scope in which this resource is defined. This parameter is required.id- Construct identifier for this resource (unique in its scope). This parameter is required.props- Resource properties. This parameter is required.
-
-
Method Details
-
arnForHealthCheck
@Stability(Stable) @NotNull public static String arnForHealthCheck(@NotNull IHealthCheckRef resource) - Parameters:
resource- This parameter is required.
-
isCfnHealthCheck
Checks whether the given object is a CfnHealthCheck.- Parameters:
x- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrHealthCheckId
The identifier that Amazon Route 53 assigned to the health check when you created it.When you add or update a resource record set, you use this value to specify which health check to use. The value can be up to 64 characters long.
-
getCdkTagManager
Tag Manager which manages the tags for this resource.- Specified by:
getCdkTagManagerin interfaceITaggableV2
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getHealthCheckRef
A reference to a HealthCheck resource.- Specified by:
getHealthCheckRefin interfaceIHealthCheckRef
-
getHealthCheckConfig
A complex type that contains detailed information about one health check.Returns union: either
IResolvableorCfnHealthCheck.HealthCheckConfigProperty -
setHealthCheckConfig
A complex type that contains detailed information about one health check. -
setHealthCheckConfig
@Stability(Stable) public void setHealthCheckConfig(@NotNull CfnHealthCheck.HealthCheckConfigProperty value) A complex type that contains detailed information about one health check. -
getHealthCheckTags
@Stability(Stable) @Nullable public List<CfnHealthCheck.HealthCheckTagProperty> getHealthCheckTags()TheHealthCheckTagsproperty describes key-value pairs that are associated with anAWS::Route53::HealthCheckresource. -
setHealthCheckTags
@Stability(Stable) public void setHealthCheckTags(@Nullable List<CfnHealthCheck.HealthCheckTagProperty> value) TheHealthCheckTagsproperty describes key-value pairs that are associated with anAWS::Route53::HealthCheckresource.
-