postFunctionsWithHttpInfo method

Future<Response> postFunctionsWithHttpInfo(
  1. Definition definition
)

Publishes a serverless function under the caller's org and answers 201 with it.

Publishes a serverless function under the caller's org and answers 201 with it. The name is the key and is claimed once; the names that would shadow a collection route are reserved. runtime and environment are the same field — either spelling is accepted — and default to node. Bounds are clamped rather than refused where a clamp is honest: a timeout above the 900-second ceiling becomes the ceiling instead of silently reverting to the 30-second default, and an omitted memory limit becomes 256Mi. target=fleet runs on the org's own GPU fleet and supports runtime=python only. Requires a validated principal; the function is owned by that principal's org.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> postFunctionsWithHttpInfo(Definition definition,) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/functions';

  // ignore: prefer_final_locals
  Object? postBody = definition;

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

  const contentTypes = <String>['application/json'];


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