getFunctionsMetricsWithHttpInfo method

Future<Response> getFunctionsMetricsWithHttpInfo({
  1. String? range,
})

Is the org's serverless dashboard over a window: a per-function invocation costLine and how those invocations ended.

Is the org's serverless dashboard over a window: a per-function invocation costLine and how those invocations ended. Every point is a REAL count of rows that fell in that bucket — nothing is interpolated or invented, so an empty window draws a flat line rather than a fabricated one. costCents is null and stays null: there is no per-invocation cost source to read, and reporting a number computed some other way would be a guess presented as a measurement. Requires a validated principal; the read is scoped to its org.

Note: This method returns the HTTP Response.

Parameters:

  • String range: Range is 1H, 6H, 24H (the default), 7D or 30D. Anything else falls back to 24H rather than failing.

Implementation

Future<Response> getFunctionsMetricsWithHttpInfo({ String? range, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/functions/metrics';

  // ignore: prefer_final_locals
  Object? postBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  if (range != null) {
    queryParams.addAll(_queryParams('', 'range', range));
  }

  const contentTypes = <String>[];


  return apiClient.invokeAPI(
    path,
    'GET',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}