modifyLoadBalancerAttributes method

Future<ModifyLoadBalancerAttributesOutput> modifyLoadBalancerAttributes({
  1. required LoadBalancerAttributes loadBalancerAttributes,
  2. required String loadBalancerName,
})

Modifies the attributes of the specified load balancer.

You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, and CrossZoneLoadBalancing by either enabling or disabling them. Or, you can modify the load balancer attribute ConnectionSettings by specifying an idle connection timeout value for your load balancer.

For more information, see the following in the Classic Load Balancers Guide:

May throw AccessPointNotFoundException. May throw InvalidConfigurationRequestException. May throw LoadBalancerAttributeNotFoundException.

Parameter loadBalancerAttributes : The attributes for the load balancer.

Parameter loadBalancerName : The name of the load balancer.

Implementation

Future<ModifyLoadBalancerAttributesOutput> modifyLoadBalancerAttributes({
  required LoadBalancerAttributes loadBalancerAttributes,
  required String loadBalancerName,
}) async {
  final $request = <String, String>{
    for (var e1 in loadBalancerAttributes.toQueryMap().entries)
      'LoadBalancerAttributes.${e1.key}': e1.value,
    'LoadBalancerName': loadBalancerName,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ModifyLoadBalancerAttributes',
    version: '2012-06-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ModifyLoadBalancerAttributesResult',
  );
  return ModifyLoadBalancerAttributesOutput.fromXml($result);
}