describeInstanceHealth method

Future<DescribeEndPointStateOutput> describeInstanceHealth({
  1. required String loadBalancerName,
  2. List<Instance>? instances,
})

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.

May throw AccessPointNotFoundException. May throw InvalidEndPointException.

Parameter loadBalancerName : The name of the load balancer.

Parameter instances : The IDs of the instances.

Implementation

Future<DescribeEndPointStateOutput> describeInstanceHealth({
  required String loadBalancerName,
  List<Instance>? instances,
}) async {
  ArgumentError.checkNotNull(loadBalancerName, 'loadBalancerName');
  final $request = <String, dynamic>{};
  $request['LoadBalancerName'] = loadBalancerName;
  instances?.also((arg) => $request['Instances'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeInstanceHealth',
    version: '2012-06-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeEndPointStateInput'],
    shapes: shapes,
    resultWrapper: 'DescribeInstanceHealthResult',
  );
  return DescribeEndPointStateOutput.fromXml($result);
}