Skip to main content

function_versions

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

Overview​

Namefunction_versions
TypeResource
Idnvidia.nvcf_functions.function_versions

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
getselectfunction_id, function_version_idinclude_secretsRetrieves detailed information of the specified function version in the authenticated NVIDIA Cloud Account. Requires a bearer token with 'list_functions' or 'list_functions_details' scopes in the HTTP Authorization header.
listselectfunction_idLists details of all the versions of the specified function in the authenticated NVIDIA Cloud Account. Requires a bearer token with 'list_functions' or 'list_functions_details' scopes in the HTTP Authorization header.
createinsertfunction_id, inference_url, nameCreates a version of the specified function within the authenticated NVIDIA Cloud Account. If the function is public, then Account Admin cannot create a version. Requires a bearer token with 'register_function' scope in the HTTP Authorization header.
updateupdatefunction_id, function_version_idUpdates mutable fields of the specified function version within the authenticated NVIDIA Cloud Account. The current request payload supports tags updates, rate limit updates, and model-specific LLM config updates. Requires a bearer token with 'update_function' scope in the HTTP Authorization header.
deletedeletefunction_id, function_version_idDeletes the specified function version in the authenticated NVIDIA Cloud Account. Requires a bearer token with 'delete_function' scope in the HTTP Authorization header. If the function version is public, then Account Admin cannot delete the function.

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
function_idstring (uuid)Function id
function_version_idstring (uuid)Version id
include_secretsbooleanQuery param 'includeSecrets' indicates whether to include secret names for the function in the response. (wire: includeSecrets)

SELECT examples​

Retrieves detailed information of the specified function version in the authenticated NVIDIA Cloud Account. Requires a bearer token with 'list_functions' or 'list_functions_details' scopes 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.function_versions
WHERE function_id = '{{ function_id }}' -- required
AND function_version_id = '{{ function_version_id }}' -- required
AND include_secrets = '{{ include_secrets }}'
;

INSERT examples​

Creates a version of the specified function within the authenticated NVIDIA Cloud Account. If the function is public, then Account Admin cannot create a version. Requires a bearer token with 'register_function' scope in the HTTP Authorization header.

INSERT INTO nvidia.nvcf_functions.function_versions (
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,
function_id
)
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 }}',
'{{ function_id }}'
RETURNING
function
;

UPDATE examples​

Updates mutable fields of the specified function version within the authenticated NVIDIA Cloud Account. The current request payload supports tags updates, rate limit updates, and model-specific LLM config updates. Requires a bearer token with 'update_function' scope in the HTTP Authorization header.

UPDATE nvidia.nvcf_functions.function_versions
SET
llm_invocation_config = '{{ llm_invocation_config }}',
model_updates = '{{ model_updates }}',
rate_limit = '{{ rate_limit }}',
tags = '{{ tags }}'
WHERE
function_id = '{{ function_id }}' --required
AND function_version_id = '{{ function_version_id }}' --required
RETURNING
function;

DELETE examples​

Deletes the specified function version in the authenticated NVIDIA Cloud Account. Requires a bearer token with 'delete_function' scope in the HTTP Authorization header. If the function version is public, then Account Admin cannot delete the function.

DELETE FROM nvidia.nvcf_functions.function_versions
WHERE function_id = '{{ function_id }}' --required
AND function_version_id = '{{ function_version_id }}' --required
;