describeLoadBalancers method

Future<DescribeLoadBalancersOutput> describeLoadBalancers({
  1. List<String>? loadBalancerArns,
  2. String? marker,
  3. List<String>? names,
  4. int? pageSize,
})

Describes the specified load balancers or all of your load balancers.

May throw LoadBalancerNotFoundException.

Parameter loadBalancerArns : The Amazon Resource Names (ARN) of the load balancers. You can specify up to 20 load balancers in a single call.

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

Parameter names : The names of the load balancers.

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

Implementation

Future<DescribeLoadBalancersOutput> describeLoadBalancers({
  List<String>? loadBalancerArns,
  String? marker,
  List<String>? names,
  int? pageSize,
}) async {
  _s.validateNumRange(
    'pageSize',
    pageSize,
    1,
    400,
  );
  final $request = <String, dynamic>{};
  loadBalancerArns?.also((arg) => $request['LoadBalancerArns'] = arg);
  marker?.also((arg) => $request['Marker'] = arg);
  names?.also((arg) => $request['Names'] = arg);
  pageSize?.also((arg) => $request['PageSize'] = arg);
  final $result = await _protocol.send(
    $request,
    action: 'DescribeLoadBalancers',
    version: '2015-12-01',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['DescribeLoadBalancersInput'],
    shapes: shapes,
    resultWrapper: 'DescribeLoadBalancersResult',
  );
  return DescribeLoadBalancersOutput.fromXml($result);
}