[ aws . servicediscovery ]

get-instances-health-status

Description

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

Note

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

See also: AWS API Documentation

See ‘aws help’ for descriptions of global parameters.

Synopsis

  get-instances-health-status
--service-id <value>
[--instances <value>]
[--max-results <value>]
[--next-token <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
[--cli-auto-prompt <value>]

Options

--service-id (string)

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

--instances (list)

An array that contains the IDs of all the instances that you want to get the health status for.

If you omit Instances , AWS Cloud Map returns the health status for all the instances that are associated with the specified service.

Note

To get the IDs for the instances that you’ve registered by using a specified service, submit a ListInstances request.

(string)

Syntax:

"string" "string" ...

--max-results (integer)

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

--next-token (string)

For the first GetInstancesHealthStatus request, omit this value.

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

--cli-input-json | --cli-input-yaml (string) Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. Similarly, if provided yaml-input it will print a sample input YAML that can be used with --cli-input-yaml. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

--cli-auto-prompt (boolean) Automatically prompt for CLI input parameters.

See ‘aws help’ for descriptions of global parameters.

Output

Status -> (map)

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

key -> (string)

value -> (string)

NextToken -> (string)

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