listFunctions method

Future<ListFunctionsResponse> listFunctions({
  1. FunctionVersion? functionVersion,
  2. String? marker,
  3. String? masterRegion,
  4. int? maxItems,
})

Returns a list of Lambda functions, with the version-specific configuration of each. Lambda returns up to 50 functions per call.

Set FunctionVersion to ALL to include all published versions of each function in addition to the unpublished version.

May throw InvalidParameterValueException. May throw ServiceException. May throw TooManyRequestsException.

Parameter functionVersion : Set to ALL to include entries for all published versions of each function.

Parameter marker : Specify the pagination token that's returned by a previous request to retrieve the next page of results.

Parameter masterRegion : For Lambda@Edge functions, the Amazon Web Services Region of the master function. For example, us-east-1 filters the list of functions to include only Lambda@Edge functions replicated from a master function in US East (N. Virginia). If specified, you must set FunctionVersion to ALL.

Parameter maxItems : The maximum number of functions to return in the response. Note that ListFunctions returns a maximum of 50 items in each response, even if you set the number higher.

Implementation

Future<ListFunctionsResponse> listFunctions({
  FunctionVersion? functionVersion,
  String? marker,
  String? masterRegion,
  int? maxItems,
}) async {
  _s.validateNumRange(
    'maxItems',
    maxItems,
    1,
    10000,
  );
  final $query = <String, List<String>>{
    if (functionVersion != null) 'FunctionVersion': [functionVersion.value],
    if (marker != null) 'Marker': [marker],
    if (masterRegion != null) 'MasterRegion': [masterRegion],
    if (maxItems != null) 'MaxItems': [maxItems.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/2015-03-31/functions',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListFunctionsResponse.fromJson(response);
}