Skip to main content

functions

Creates, updates, deletes, gets or lists a functions resource.

Overview​

Namefunctions
TypeResource
Idnvidia.nvcf_functions.functions

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring (uuid)Unique function id
namestring (UTF-8)Function name
nca_idstring (UTF-8)NVIDIA Cloud Account Id (wire: ncaId)
version_idstring (uuid)Unique function version id (wire: versionId)
helm_chart_service_namestring (UTF-8)Helm Chart Service Name specified only when helmChart property is specified (wire: helmChartServiceName)
active_instancesarrayList of active instances for this function. (wire: activeInstances)
api_body_formatstring (UTF-8)Invocation request body format (PREDICT_V2, CUSTOM) (wire: apiBodyFormat)
container_argsstring (UTF-8)Args used to launch the container (wire: containerArgs)
container_environmentarrayEnvironment settings used to launch the container (wire: containerEnvironment)
container_imagestring (uri)Optional custom container (wire: containerImage)
created_atstring (date_time)Function creation timestamp (wire: createdAt)
descriptionstring (UTF-8)Function/version description
function_typestring (UTF-8)Used to indicate a STREAMING function. Defaults to DEFAULT. (DEFAULT, STREAMING, LLM) (wire: functionType)
healthobjectFunction health configuration
health_uristring (uri)Health endpoint for the container or helmChart. Deprecated, use health.uri instead. (wire: healthUri)
helm_chartstring (uri)Optional Helm Chart (wire: helmChart)
inference_portinteger (int32)Optional port number where the inference listener is running - defaults to 8000 for Triton (wire: inferencePort)
inference_urlstring (uri)Entrypoint for invoking the container to process requests (wire: inferenceUrl)
llm_invocation_configobjectOptional function-level LLM invocation configuration. (wire: llmInvocationConfig)
modelsarrayOptional list of models
owned_by_different_accountbooleanIndicates whether the function is owned by another account. If the account that is being used to lookup functions happens to be authorized to invoke/list this function which is owned by a different account, then this field is set to true and ncaId will contain the id of the account that owns the function. Otherwise, this field is not set as it defaults to false. (wire: ownedByDifferentAccount)
rate_limitobjectOptional rate limit policy (wire: rateLimit)
resourcesarrayOptional set of resources.
secretsarrayOptional secret names
statusstring (UTF-8)Function status (ACTIVE, DEPLOYING, ERROR, INACTIVE, DELETED, DEGRADED, DEGRADING)
tagsarrayOptional set of tags. Maximum allowed number of tags per function is 64. Maximum length of each tag is 128 chars.
telemetriesobjectOptional telemetry configuration for the function

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectvisibilityLists all the functions associated with the authenticated NVIDIA Cloud Account. Requires a bearer token with 'list_functions' or 'list_functions_details' scope in the HTTP Authorization header.
createinsertinference_url, nameCreates a new function within the authenticated NVIDIA Cloud Account. Requires a bearer token with 'register_function' scope in the HTTP Authorization header.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
visibilityarrayQuery param 'visibility' indicates the kind of functions to be included in the response.

SELECT examples​

Lists all the functions associated with the authenticated NVIDIA Cloud Account. Requires a bearer token with 'list_functions' or 'list_functions_details' scope in the HTTP Authorization header.

SELECT
id,
name,
nca_id,
version_id,
helm_chart_service_name,
active_instances,
api_body_format,
container_args,
container_environment,
container_image,
created_at,
description,
function_type,
health,
health_uri,
helm_chart,
inference_port,
inference_url,
llm_invocation_config,
models,
owned_by_different_account,
rate_limit,
resources,
secrets,
status,
tags,
telemetries
FROM nvidia.nvcf_functions.functions
WHERE visibility = '{{ visibility }}'
;

INSERT examples​

Creates a new function within the authenticated NVIDIA Cloud Account. Requires a bearer token with 'register_function' scope in the HTTP Authorization header.

INSERT INTO nvidia.nvcf_functions.functions (
api_body_format,
container_args,
container_environment,
container_image,
description,
function_type,
health,
health_uri,
helm_chart,
helm_chart_service_name,
inference_port,
inference_url,
llm_invocation_config,
models,
name,
rate_limit,
resources,
secrets,
tags,
telemetries
)
SELECT
'{{ api_body_format }}',
'{{ container_args }}',
'{{ container_environment }}',
'{{ container_image }}',
'{{ description }}',
'{{ function_type }}',
'{{ health }}',
'{{ health_uri }}',
'{{ helm_chart }}',
'{{ helm_chart_service_name }}',
{{ inference_port }},
'{{ inference_url }}' /* required */,
'{{ llm_invocation_config }}',
'{{ models }}',
'{{ name }}' /* required */,
'{{ rate_limit }}',
'{{ resources }}',
'{{ secrets }}',
'{{ tags }}',
'{{ telemetries }}'
RETURNING
function
;