createLoadBalancerListeners method

Future<void> createLoadBalancerListeners({
  1. required List<Listener> listeners,
  2. required String loadBalancerName,
})

Creates one or more listeners for the specified load balancer. If a listener with the specified port does not already exist, it is created; otherwise, the properties of the new listener must match the properties of the existing listener.

For more information, see Listeners for Your Classic Load Balancer in the Classic Load Balancers Guide.

May throw AccessPointNotFoundException. May throw DuplicateListenerException. May throw CertificateNotFoundException. May throw InvalidConfigurationRequestException. May throw UnsupportedProtocolException.

Parameter listeners : The listeners.

Parameter loadBalancerName : The name of the load balancer.

Implementation

Future<void> createLoadBalancerListeners({
  required List<Listener> listeners,
  required String loadBalancerName,
}) async {
  ArgumentError.checkNotNull(listeners, 'listeners');
  ArgumentError.checkNotNull(loadBalancerName, 'loadBalancerName');
  final $request = <String, dynamic>{};
  $request['Listeners'] = listeners;
  $request['LoadBalancerName'] = loadBalancerName;
  await _protocol.send(
    $request,
    action: 'CreateLoadBalancerListeners',
    version: '2012-06-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateLoadBalancerListenerInput'],
    shapes: shapes,
    resultWrapper: 'CreateLoadBalancerListenersResult',
  );
}