getFunctionsByName method

Future<FunctionDetail?> getFunctionsByName(
  1. String name
)

Is one function with everything a detail page needs in one round-trip: its definition, its 7-day rollup, its trigger, its twenty most recent invocations and the NAMES of the secrets it mounts.

Is one function with everything a detail page needs in one round-trip: its definition, its 7-day rollup, its trigger, its twenty most recent invocations and the NAMES of the secrets it mounts. Secret values are never read or returned. A name the caller's org does not hold is 404, which is also what another tenant's function looks like from here.

Parameters:

  • String name (required): Name is the function the URL names.

Implementation

Future<FunctionDetail?> getFunctionsByName(String name,) async {
  final response = await getFunctionsByNameWithHttpInfo(name,);
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FunctionDetail',) as FunctionDetail;

  }
  return null;
}