Skip to main content

health_checks

Creates, updates, deletes, gets or lists a health_checks resource.

Overview

Namehealth_checks
TypeResource
Idaws.route53.health_checks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
caller_referencestringA unique string that you specified when you created the health check.
cloud_watch_alarm_configurationstringA complex type that contains information about the CloudWatch alarm that Amazon Route 53 is monitoring for this health check.
health_check_configstringA complex type that contains detailed information about one health check.
health_check_versionintegerThe version of the health check. You can optionally pass this value in a call to UpdateHealthCheck to prevent overwriting another change to the health check.
idstringThe 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.
linked_servicestringIf the health check was created by another service, the service that created the health check. When a health check is created by another service, you can't edit or delete it using Amazon Route 53.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_health_checkselecthealth_check_id, regionGets information about a specified health check.
list_health_checksselectregionmarker, maxitemsRetrieve a list of the health checks that are associated with the current Amazon Web Services account.
create_health_checkinsertregion, CallerReference, HealthCheckConfigCreates a new health check. For information about adding health checks to resource record sets, see HealthCheckId in ChangeResourceRecordSets. 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 resource record sets 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 StatusCheckFailed metric, 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.
update_health_checkupdatehealth_check_id, regionUpdates an existing health check. Note that some values can't be updated. For more information about updating health checks, see Creating, Updating, and Deleting Health Checks in the Amazon Route 53 Developer Guide.
delete_health_checkdeletehealth_check_id, regionDeletes a health check. Amazon Route 53 does not prevent you from deleting a health check even if the health check is associated with one or more resource record sets. If you delete a health check and you don't update the associated resource record sets, the future status of the health check can't be predicted and may change. This will affect the routing of DNS queries for your DNS failover configuration. For more information, see Replacing and Deleting Health Checks in the Amazon Route 53 Developer Guide. If you're using Cloud Map and you configured Cloud Map to create a Route 53 health check when you register an instance, you can't use the Route 53 DeleteHealthCheck command to delete the health check. The health check is deleted automatically when you deregister the instance; there can be a delay of several hours before the health check is deleted from Route 53.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
health_check_idstringThe ID of the health check that you want to delete.
regionstringAWS region (default: us-east-1)
markerstringIf the value of IsTruncated in the previous response was true, you have more health checks. To get another group, submit another ListHealthChecks request. For the value of marker, specify the value of NextMarker from the previous response, which is the ID of the first health check that Amazon Route 53 will return if you submit another request. If the value of IsTruncated in the previous response was false, there are no more health checks to get.
maxitemsstringThe maximum number of health checks that you want ListHealthChecks to return in response to the current request. Amazon Route 53 returns a maximum of 1000 items. If you set MaxItems to a value greater than 1000, Route 53 returns only the first 1000 health checks.

SELECT examples

Gets information about a specified health check.

SELECT
caller_reference,
cloud_watch_alarm_configuration,
health_check_config,
health_check_version,
id,
linked_service
FROM aws.route53.health_checks
WHERE health_check_id = '{{ health_check_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new health check. For information about adding health checks to resource record sets, see HealthCheckId in ChangeResourceRecordSets. 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 resource record sets 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 StatusCheckFailed metric, 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.

INSERT INTO aws.route53.health_checks (
CallerReference,
HealthCheckConfig,
region
)
SELECT
'{{ CallerReference }}' /* required */,
'{{ HealthCheckConfig }}' /* required */,
'{{ region }}'
RETURNING
caller_reference,
cloud_watch_alarm_configuration,
health_check_config,
health_check_version,
id,
linked_service
;

UPDATE examples

Updates an existing health check. Note that some values can't be updated. For more information about updating health checks, see Creating, Updating, and Deleting Health Checks in the Amazon Route 53 Developer Guide.

UPDATE aws.route53.health_checks
SET
HealthCheckVersion = {{ HealthCheckVersion }},
IPAddress = '{{ IPAddress }}',
Port = {{ Port }},
ResourcePath = '{{ ResourcePath }}',
FullyQualifiedDomainName = '{{ FullyQualifiedDomainName }}',
SearchString = '{{ SearchString }}',
FailureThreshold = {{ FailureThreshold }},
Inverted = {{ Inverted }},
Disabled = {{ Disabled }},
HealthThreshold = {{ HealthThreshold }},
ChildHealthChecks = '{{ ChildHealthChecks }}',
EnableSNI = {{ EnableSNI }},
Regions = '{{ Regions }}',
AlarmIdentifier = '{{ AlarmIdentifier }}',
InsufficientDataHealthStatus = '{{ InsufficientDataHealthStatus }}',
ResetElements = '{{ ResetElements }}'
WHERE
health_check_id = '{{ health_check_id }}' --required
AND region = '{{ region }}' --required
RETURNING
caller_reference,
cloud_watch_alarm_configuration,
health_check_config,
health_check_version,
id,
linked_service;

DELETE examples

Deletes a health check. Amazon Route 53 does not prevent you from deleting a health check even if the health check is associated with one or more resource record sets. If you delete a health check and you don't update the associated resource record sets, the future status of the health check can't be predicted and may change. This will affect the routing of DNS queries for your DNS failover configuration. For more information, see Replacing and Deleting Health Checks in the Amazon Route 53 Developer Guide. If you're using Cloud Map and you configured Cloud Map to create a Route 53 health check when you register an instance, you can't use the Route 53 DeleteHealthCheck command to delete the health check. The health check is deleted automatically when you deregister the instance; there can be a delay of several hours before the health check is deleted from Route 53.

DELETE FROM aws.route53.health_checks
WHERE health_check_id = '{{ health_check_id }}' --required
AND region = '{{ region }}' --required
;