v1

latestOpenAPI 3.0.0Apache 2.0 License2026-07-1426158150.9 KB

Gets the current health status (Healthy, Unhealthy, or Unknown) of one or more instances that are associated with a specified service.

There's a brief delay between when you register an instance and when the health status for the instance is available.

post/#X-Amz-Target=Route53AutoNaming_v20170314.GetInstancesHealthStatus

Query parameters

MaxResultsstring

Pagination limit

NextTokenstring

Pagination token

Headers

X-Amz-Target'Route53AutoNaming_v20170314.GetInstancesHealthStatus' required

Request body

ServiceIdstring required

The ID of the service that the instance is associated with.

InstancesResourceId[]
<p>An array that contains the IDs of all the instances that you want to get the health status for.</p> <p>If you omit <code>Instances</code>, Cloud Map returns the health status for all the instances that are associated with the specified service.</p> <note> <p>To get the IDs for the instances that you've registered by using a specified service, submit a <a href="https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html">ListInstances</a> request.</p> </note>
MaxResultsinteger

The maximum number of instances that you want Cloud Map to return in the response to a <code>GetInstancesHealthStatus</code> request. If you don't specify a value for <code>MaxResults</code>, Cloud Map returns up to 100 instances.

NextTokenstring
<p>For the first <code>GetInstancesHealthStatus</code> request, omit this value.</p> <p>If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>GetInstancesHealthStatus</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.</p>

Response

Success

Statusobject

A complex type that contains the IDs and the health status of the instances that you specified in the <code>GetInstancesHealthStatus</code> request.

NextTokenstring

If more than <code>MaxResults</code> instances match the specified criteria, you can submit another <code>GetInstancesHealthStatus</code> request to get the next group of results. Specify the value of <code>NextToken</code> from the previous response in the next request.

Example response

{
  "Status": {
    "i-abcd1234": "HEALTHY",
    "i-abcd1235": "UNHEALTHY"
  }
}