detachLoadBalancerFromSubnets method
Removes the specified subnets from the set of configured subnets for the load balancer.
After a subnet is removed, all EC2 instances registered with the load
balancer in the removed subnet go into the OutOfService
state. Then, the load balancer balances the traffic among the remaining
routable subnets.
May throw AccessPointNotFoundException. May throw InvalidConfigurationRequestException.
Parameter loadBalancerName
:
The name of the load balancer.
Parameter subnets
:
The IDs of the subnets.
Implementation
Future<DetachLoadBalancerFromSubnetsOutput> detachLoadBalancerFromSubnets({
required String loadBalancerName,
required List<String> subnets,
}) async {
ArgumentError.checkNotNull(loadBalancerName, 'loadBalancerName');
ArgumentError.checkNotNull(subnets, 'subnets');
final $request = <String, dynamic>{};
$request['LoadBalancerName'] = loadBalancerName;
$request['Subnets'] = subnets;
final $result = await _protocol.send(
$request,
action: 'DetachLoadBalancerFromSubnets',
version: '2012-06-01',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['DetachLoadBalancerFromSubnetsInput'],
shapes: shapes,
resultWrapper: 'DetachLoadBalancerFromSubnetsResult',
);
return DetachLoadBalancerFromSubnetsOutput.fromXml($result);
}