deleteTargetGroup method
Deletes the specified target group.
You can delete a target group if it is not referenced by any actions. Deleting a target group also deletes any associated health checks. Deleting a target group does not affect its registered targets. For example, any EC2 instances continue to run until you stop or terminate them.
May throw ResourceInUseException.
Parameter targetGroupArn
:
The Amazon Resource Name (ARN) of the target group.
Implementation
Future<void> deleteTargetGroup({
required String targetGroupArn,
}) async {
ArgumentError.checkNotNull(targetGroupArn, 'targetGroupArn');
final $request = <String, dynamic>{};
$request['TargetGroupArn'] = targetGroupArn;
await _protocol.send(
$request,
action: 'DeleteTargetGroup',
version: '2015-12-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DeleteTargetGroupInput'],
shapes: shapes,
resultWrapper: 'DeleteTargetGroupResult',
);
}