DescribeInstanceHealth
Description
This API returns the current state of the instances of the specified LoadBalancer. If no instances are specified, the state of all the instances for the LoadBalancer is returned.
You must have been the one who created in the LoadBalancer. In other words, in order to successfully call this API, you must provide the same account credentials as those that were used to create the LoadBalancer.
Request Parameters
Name | Description | Required |
---|---|---|
|
List of instances IDs whose state is being queried. Type: |
Default: If the list is empty, it returns the state of all the instances registered with this LoadBalancer
No
LoadBalancerName
The mnemonic name associated with the LoadBalancer. The name must be unique within your AWS account.
Type: String
Default: None
Constraints: Must only use alphanumeric characters (case sensitive) and dash (-). Dash cannot be first or last character. Maximum length of name is 32 characters (characters are 16-bit Unicode).
Yes
Response Elements
Name | Description |
---|---|
|
Structure containing instance Health information for the specified instances, such as InService or OutOfService and any reasons associated with the OutOfService state. Type: InstanceStates Availability: Always returned &attribute.member.1=this &attribute.member.2=that |
Special Errors
Common errors for all calls are listed and described in a separate section, please see API Error Codes.
Error | Description | HTTP Status Code | SOAP Prefix |
---|---|---|---|
LoadBalancerNotFound |
LoadBalancer name does not exist for the account. (For more information, please see LoadBalancer.) |
400 Bad Request | Client |
InvalidInstance |
This error is returned if any of the specified instances are invalid. This error is returned if any of the specified instances are not registered with this LoadBalancer. |
400 Bad Request | Client |
ValidationError |
One or more input parameters are invalid. |
400 Bad Request | Client |
Examples
Sample Request
Sample Response
Example Query Response
<DescribeInstanceHealthResult> <InstanceStates> <member> <Description>N/A</Description> <State>InService</State> <InstanceId>i-8e0ea3e7</InstanceId> <ReasonCode>N/A</ReasonCode> </member> <member> <Description>Instance registration is still in progress</Description> <State>OutOfService</State> <InstanceId>i-6055fa09</InstanceId> <ReasonCode>ELB</ReasonCode> </member> </InstanceStates> </DescribeInstanceHealthResult>
Related Operations
The following operations also return information on the LoadBalancer and/or its instances.