modifyIpPools method

Future<ModifyIpPoolsOutput> modifyIpPools({
  1. required String loadBalancerArn,
  2. IpamPools? ipamPools,
  3. List<RemoveIpamPoolEnum>? removeIpamPools,
})

[Application Load Balancers] Modify the IP pool associated to a load balancer.

May throw LoadBalancerNotFoundException.

Parameter loadBalancerArn : The Amazon Resource Name (ARN) of the load balancer.

Parameter ipamPools : The IPAM pools to be modified.

Parameter removeIpamPools : Remove the IP pools in use by the load balancer.

Implementation

Future<ModifyIpPoolsOutput> modifyIpPools({
  required String loadBalancerArn,
  IpamPools? ipamPools,
  List<RemoveIpamPoolEnum>? removeIpamPools,
}) async {
  final $request = <String, String>{
    'LoadBalancerArn': loadBalancerArn,
    if (ipamPools != null)
      for (var e1 in ipamPools.toQueryMap().entries)
        'IpamPools.${e1.key}': e1.value,
    if (removeIpamPools != null)
      if (removeIpamPools.isEmpty)
        'RemoveIpamPools': ''
      else
        for (var i1 = 0; i1 < removeIpamPools.length; i1++)
          'RemoveIpamPools.member.${i1 + 1}': removeIpamPools[i1].value,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ModifyIpPools',
    version: '2015-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ModifyIpPoolsResult',
  );
  return ModifyIpPoolsOutput.fromXml($result);
}