describeListeners method

Future<DescribeListenersOutput> describeListeners({
  1. List<String>? listenerArns,
  2. String? loadBalancerArn,
  3. String? marker,
  4. int? pageSize,
})

Describes the specified listeners or the listeners for the specified Application Load Balancer, Network Load Balancer, or Gateway Load Balancer. You must specify either a load balancer or one or more listeners.

May throw ListenerNotFoundException. May throw LoadBalancerNotFoundException. May throw UnsupportedProtocolException.

Parameter listenerArns : The Amazon Resource Names (ARN) of the listeners.

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

Parameter marker : The marker for the next set of results. (You received this marker from a previous call.)

Parameter pageSize : The maximum number of results to return with this call.

Implementation

Future<DescribeListenersOutput> describeListeners({
  List<String>? listenerArns,
  String? loadBalancerArn,
  String? marker,
  int? pageSize,
}) async {
  _s.validateNumRange(
    'pageSize',
    pageSize,
    1,
    400,
  );
  final $request = <String, dynamic>{};
  listenerArns?.also((arg) => $request['ListenerArns'] = arg);
  loadBalancerArn?.also((arg) => $request['LoadBalancerArn'] = arg);
  marker?.also((arg) => $request['Marker'] = arg);
  pageSize?.also((arg) => $request['PageSize'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeListeners',
    version: '2015-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeListenersInput'],
    shapes: shapes,
    resultWrapper: 'DescribeListenersResult',
  );
  return DescribeListenersOutput.fromXml($result);
}