listLayers method

Future<ListLayersResponse> listLayers({
  1. Runtime? compatibleRuntime,
  2. String? marker,
  3. int? maxItems,
})

Lists AWS Lambda layers and shows information about the latest version of each. Specify a runtime identifier to list only layers that indicate that they're compatible with that runtime.

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

Parameter compatibleRuntime : A runtime identifier. For example, go1.x.

Parameter marker : A pagination token returned by a previous call.

Parameter maxItems : The maximum number of layers to return.

Implementation

Future<ListLayersResponse> listLayers({
  Runtime? compatibleRuntime,
  String? marker,
  int? maxItems,
}) async {
  _s.validateNumRange(
    'maxItems',
    maxItems,
    1,
    50,
  );
  final $query = <String, List<String>>{
    if (compatibleRuntime != null)
      'CompatibleRuntime': [compatibleRuntime.toValue()],
    if (marker != null) 'Marker': [marker],
    if (maxItems != null) 'MaxItems': [maxItems.toString()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/2018-10-31/layers',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListLayersResponse.fromJson(response);
}