detachLoadBalancerTargetGroups method

Future<void> detachLoadBalancerTargetGroups({
  1. required String autoScalingGroupName,
  2. required List<String> targetGroupARNs,
})

Detaches one or more target groups from the specified Auto Scaling group.

May throw ResourceContentionFault.

Parameter autoScalingGroupName : The name of the Auto Scaling group.

Parameter targetGroupARNs : The Amazon Resource Names (ARN) of the target groups. You can specify up to 10 target groups.

Implementation

Future<void> detachLoadBalancerTargetGroups({
  required String autoScalingGroupName,
  required List<String> targetGroupARNs,
}) async {
  ArgumentError.checkNotNull(autoScalingGroupName, 'autoScalingGroupName');
  _s.validateStringLength(
    'autoScalingGroupName',
    autoScalingGroupName,
    1,
    255,
    isRequired: true,
  );
  ArgumentError.checkNotNull(targetGroupARNs, 'targetGroupARNs');
  final $request = <String, dynamic>{};
  $request['AutoScalingGroupName'] = autoScalingGroupName;
  $request['TargetGroupARNs'] = targetGroupARNs;
  await _protocol.send(
    $request,
    action: 'DetachLoadBalancerTargetGroups',
    version: '2011-01-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DetachLoadBalancerTargetGroupsType'],
    shapes: shapes,
    resultWrapper: 'DetachLoadBalancerTargetGroupsResult',
  );
}