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.
Parameters:
Raises:
Examples:
To describe the health of the instances for a load balancer
This example describes the health of the instances for the specified load balancer.
>>> await client.describe_instance_health(load_balancer_name='my-load-balancer')
Source code in docs_src/capo_elastic_load_balancing/_services/async_elastic_load_balancing.py
| async def describe_instance_health(
self,
load_balancer_name: "capo_elastic_load_balancing.types.access_point_name.AccessPointName",
*,
config_overrides: Optional[AsyncElasticLoadBalancingClientConfig] = None,
instances: Optional[
"capo_elastic_load_balancing.types.instances.Instances"
] = None,
) -> "capo_elastic_load_balancing.types.describe_end_point_state_output.DescribeEndPointStateOutput":
"""<p>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.</p>
Args:
load_balancer_name: <p>The name of the load balancer.</p>
instances: <p>The IDs of the instances.</p>
Raises:
capo_elastic_load_balancing.errors.access_point_not_found_exception.AccessPointNotFoundException: <p>The specified load balancer does not exist.</p>
capo_elastic_load_balancing.errors.invalid_end_point_exception.InvalidEndPointException: <p>The specified endpoint is not valid.</p>
capo_elastic_load_balancing.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe the health of the instances for a load balancer
This example describes the health of the instances for the specified load balancer.
>>> await client.describe_instance_health(load_balancer_name='my-load-balancer')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_load_balancing.types.describe_end_point_state_input.DescribeEndPointStateInput]",
) -> AsyncOperationResponse[
"capo_elastic_load_balancing.types.describe_end_point_state_output.DescribeEndPointStateOutput"
]:
import capo_elastic_load_balancing._operations.elastic_load_balancing_v7.describe_instance_health
(
output,
http_response,
) = await capo_elastic_load_balancing._operations.elastic_load_balancing_v7.describe_instance_health.async_describe_instance_health(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeInstanceHealth")
)
input_: capo_elastic_load_balancing.types.describe_end_point_state_input.DescribeEndPointStateInput = {
"load_balancer_name": load_balancer_name
}
if instances is not None:
input_["instances"] = instances
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|