describeTargetHealth method
Describes the health of the specified targets or all of your targets.
May throw HealthUnavailableException.
May throw InvalidTargetException.
May throw TargetGroupNotFoundException.
Parameter targetGroupArn :
The Amazon Resource Name (ARN) of the target group.
Parameter include :
Used to include anomaly detection information.
Parameter targets :
The targets.
Implementation
Future<DescribeTargetHealthOutput> describeTargetHealth({
required String targetGroupArn,
List<DescribeTargetHealthInputIncludeEnum>? include,
List<TargetDescription>? targets,
}) async {
final $request = <String, String>{
'TargetGroupArn': targetGroupArn,
if (include != null)
if (include.isEmpty)
'Include': ''
else
for (var i1 = 0; i1 < include.length; i1++)
'Include.member.${i1 + 1}': include[i1].value,
if (targets != null)
if (targets.isEmpty)
'Targets': ''
else
for (var i1 = 0; i1 < targets.length; i1++)
for (var e3 in targets[i1].toQueryMap().entries)
'Targets.member.${i1 + 1}.${e3.key}': e3.value,
};
final $result = await _protocol.send(
$request,
action: 'DescribeTargetHealth',
version: '2015-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'DescribeTargetHealthResult',
);
return DescribeTargetHealthOutput.fromXml($result);
}