describeTargetHealth method

Future<DescribeTargetHealthOutput> describeTargetHealth({
  1. required String targetGroupArn,
  2. List<TargetDescription>? targets,
})

Describes the health of the specified targets or all of your targets.

May throw InvalidTargetException. May throw TargetGroupNotFoundException. May throw HealthUnavailableException.

Parameter targetGroupArn : The Amazon Resource Name (ARN) of the target group.

Parameter targets : The targets.

Implementation

Future<DescribeTargetHealthOutput> describeTargetHealth({
  required String targetGroupArn,
  List<TargetDescription>? targets,
}) async {
  ArgumentError.checkNotNull(targetGroupArn, 'targetGroupArn');
  final $request = <String, dynamic>{};
  $request['TargetGroupArn'] = targetGroupArn;
  targets?.also((arg) => $request['Targets'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeTargetHealth',
    version: '2015-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeTargetHealthInput'],
    shapes: shapes,
    resultWrapper: 'DescribeTargetHealthResult',
  );
  return DescribeTargetHealthOutput.fromXml($result);
}