Skip to main content

instance_healths

Creates, updates, deletes, gets or lists an instance_healths resource.

Overview

Nameinstance_healths
TypeResource
Idaws.elb.instance_healths

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringA description of the instance state. This string can contain one or more of the following messages. N/A A transient error occurred. Please try again later. Instance has failed at least the UnhealthyThreshold number of health checks consecutively. Instance has not passed the configured HealthyThreshold number of health checks consecutively. Instance registration is still in progress. Instance is in the EC2 Availability Zone for which LoadBalancer is not configured to route traffic to. Instance is not currently registered with the LoadBalancer. Instance deregistration currently in progress. Disable Availability Zone is currently in progress. Instance is in pending state. Instance is in stopped state. Instance is in terminated state.
instance_idstringThe ID of the instance.
reason_codestringInformation about the cause of OutOfService instances. Specifically, whether the cause is Elastic Load Balancing or the instance. Valid values: ELB | Instance | N/A
statestringThe current state of the instance. Valid values: InService | OutOfService | Unknown

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_instance_healthselectLoadBalancerName, regionInstancesDescribes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.

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
LoadBalancerNamestringThe name of the load balancer.
regionstringAWS region (default: us-east-1)
InstancesarrayThe IDs of the instances.

SELECT examples

Describes the state of the specified instances with respect to the specified load balancer. If no instances are specified, the call describes the state of all instances that are currently registered with the load balancer. If instances are specified, their state is returned even if they are no longer registered with the load balancer. The state of terminated instances is not returned.

SELECT
description,
instance_id,
reason_code,
state
FROM aws.elb.instance_healths
WHERE LoadBalancerName = '{{ LoadBalancerName }}' -- required
AND region = '{{ region }}' -- required
AND Instances = '{{ Instances }}'
;