DescribeTargetHealth
Describes the health of the specified targets or all of your targets.
Request Syntax
{
"Include": [ "string
" ],
"TargetGroupArn": "string
",
"Targets": [
{
"AvailabilityZone": "string
",
"Id": "string
",
"Port": number
}
]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Include
-
Used to include anomaly detection information.
Type: Array of strings
Valid Values:
AnomalyDetection | All
Required: No
- TargetGroupArn
-
The Amazon Resource Name (ARN) of the target group.
Type: String
Required: Yes
- Targets
-
The targets.
Type: Array of TargetDescription objects
Required: No
Response Syntax
{
"TargetHealthDescriptions": [
{
"AdministrativeOverride": {
"Description": "string",
"Reason": "string",
"State": "string"
},
"AnomalyDetection": {
"MitigationInEffect": "string",
"Result": "string"
},
"HealthCheckPort": "string",
"Target": {
"AvailabilityZone": "string",
"Id": "string",
"Port": number
},
"TargetHealth": {
"Description": "string",
"Reason": "string",
"State": "string"
}
}
]
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- TargetHealthDescriptions
-
Information about the health of the targets.
Type: Array of TargetHealthDescription objects
Errors
For information about the errors that are common to all actions, see Common Errors.
- HealthUnavailableException
-
The health of the specified targets could not be retrieved due to an internal error.
HTTP Status Code: 400
- InvalidTargetException
-
The specified target does not exist, is not in the same VPC as the target group, or has an unsupported instance type.
HTTP Status Code: 400
- TargetGroupNotFoundException
-
The specified target group does not exist.
HTTP Status Code: 400
Examples
Describe the health of the targets for a target group
This example describes the health of the targets for the specified target group. These targets are healthy.
Sample Request
https://elasticloadbalancing.amazonaws.com/?Action=DescribeTargetHealth
&TargetGroupArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067
&Version=2015-12-01
&AUTHPARAMS
Sample Response
<DescribeTargetHealthResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
<DescribeTargetHealthResult>
<TargetHealthDescriptions>
<member>
<HealthCheckPort>80</HealthCheckPort>
<TargetHealth>
<State>healthy</State>
</TargetHealth>
<Target>
<Port>80</Port>
<Id>i-0f76fade</Id>
</Target>
</member>
<member>
<HealthCheckPort>80</HealthCheckPort>
<TargetHealth>
<State>healthy</State>
</TargetHealth>
<Target>
<Port>80</Port>
<Id>i-0f76fade</Id>
</Target>
</member>
</TargetHealthDescriptions>
</DescribeTargetHealthResult>
<ResponseMetadata>
<RequestId>c534f810-f389-11e5-9192-3fff33344cfa</RequestId>
</ResponseMetadata>
</DescribeTargetHealthResponse>
Describe the health of the specified target
This example describes the health of the specified target. This target is healthy.
Sample Request
https://elasticloadbalancing.amazonaws.com/?Action=DescribeTargetHealth
&TargetGroupArn=arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067
&Targets.member.1.Id=i-0f76fade
&Targets.member.1.Port=80
&Version=2015-12-01
&AUTHPARAMS
Sample Response
<DescribeTargetHealthResponse xmlns="http://elasticloadbalancing.amazonaws.com/doc/2015-12-01/">
<DescribeTargetHealthResult>
<TargetHealthDescriptions>
<member>
<HealthCheckPort>80</HealthCheckPort>
<TargetHealth>
<State>healthy</State>
</TargetHealth>
<Target>
<Port>80</Port>
<Id>i-0f76fade</Id>
</Target>
</member>
</TargetHealthDescriptions>
</DescribeTargetHealthResult>
<ResponseMetadata>
<RequestId>c534f810-f389-11e5-9192-3fff33344cfa</RequestId>
</ResponseMetadata>
</DescribeTargetHealthResponse>
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: