setIpAddressType method

Future<SetIpAddressTypeOutput> setIpAddressType({
  1. required IpAddressType ipAddressType,
  2. required String loadBalancerArn,
})

Sets the type of IP addresses used by the subnets of the specified Application Load Balancer or Network Load Balancer.

May throw LoadBalancerNotFoundException. May throw InvalidConfigurationRequestException. May throw InvalidSubnetException.

Parameter ipAddressType : The IP address type. The possible values are ipv4 (for IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). Internal load balancers must use ipv4. You can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener.

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

Implementation

Future<SetIpAddressTypeOutput> setIpAddressType({
  required IpAddressType ipAddressType,
  required String loadBalancerArn,
}) async {
  ArgumentError.checkNotNull(ipAddressType, 'ipAddressType');
  ArgumentError.checkNotNull(loadBalancerArn, 'loadBalancerArn');
  final $request = <String, dynamic>{};
  $request['IpAddressType'] = ipAddressType.toValue();
  $request['LoadBalancerArn'] = loadBalancerArn;
  final $result = await _protocol.send(
    $request,
    action: 'SetIpAddressType',
    version: '2015-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['SetIpAddressTypeInput'],
    shapes: shapes,
    resultWrapper: 'SetIpAddressTypeResult',
  );
  return SetIpAddressTypeOutput.fromXml($result);
}