function_versions
Creates, updates, deletes, gets or lists a function_versions resource.
Overview​
| Name | function_versions |
| Type | Resource |
| Id | nvidia.nvcf_functions.function_versions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique function id |
name | string (UTF-8) | Function name |
nca_id | string (UTF-8) | NVIDIA Cloud Account Id (wire: ncaId) |
version_id | string (uuid) | Unique function version id (wire: versionId) |
helm_chart_service_name | string (UTF-8) | Helm Chart Service Name specified only when helmChart property is specified (wire: helmChartServiceName) |
active_instances | array | List of active instances for this function. (wire: activeInstances) |
api_body_format | string (UTF-8) | Invocation request body format (PREDICT_V2, CUSTOM) (wire: apiBodyFormat) |
container_args | string (UTF-8) | Args used to launch the container (wire: containerArgs) |
container_environment | array | Environment settings used to launch the container (wire: containerEnvironment) |
container_image | string (uri) | Optional custom container (wire: containerImage) |
created_at | string (date_time) | Function creation timestamp (wire: createdAt) |
description | string (UTF-8) | Function/version description |
function_type | string (UTF-8) | Used to indicate a STREAMING function. Defaults to DEFAULT. (DEFAULT, STREAMING, LLM) (wire: functionType) |
health | object | Function health configuration |
health_uri | string (uri) | Health endpoint for the container or helmChart. Deprecated, use health.uri instead. (wire: healthUri) |
helm_chart | string (uri) | Optional Helm Chart (wire: helmChart) |
inference_port | integer (int32) | Optional port number where the inference listener is running - defaults to 8000 for Triton (wire: inferencePort) |
inference_url | string (uri) | Entrypoint for invoking the container to process requests (wire: inferenceUrl) |
llm_invocation_config | object | Optional function-level LLM invocation configuration. (wire: llmInvocationConfig) |
models | array | Optional list of models |
owned_by_different_account | boolean | Indicates 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_limit | object | Optional rate limit policy (wire: rateLimit) |
resources | array | Optional set of resources. |
secrets | array | Optional secret names |
status | string (UTF-8) | Function status (ACTIVE, DEPLOYING, ERROR, INACTIVE, DELETED, DEGRADED, DEGRADING) |
tags | array | Optional set of tags. Maximum allowed number of tags per function is 64. Maximum length of each tag is 128 chars. |
telemetries | object | Optional telemetry configuration for the function |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Unique function id |
name | string (UTF-8) | Function name |
nca_id | string (UTF-8) | NVIDIA Cloud Account Id (wire: ncaId) |
version_id | string (uuid) | Unique function version id (wire: versionId) |
helm_chart_service_name | string (UTF-8) | Helm Chart Service Name specified only when helmChart property is specified (wire: helmChartServiceName) |
active_instances | array | List of active instances for this function. (wire: activeInstances) |
api_body_format | string (UTF-8) | Invocation request body format (PREDICT_V2, CUSTOM) (wire: apiBodyFormat) |
container_args | string (UTF-8) | Args used to launch the container (wire: containerArgs) |
container_environment | array | Environment settings used to launch the container (wire: containerEnvironment) |
container_image | string (uri) | Optional custom container (wire: containerImage) |
created_at | string (date_time) | Function creation timestamp (wire: createdAt) |
description | string (UTF-8) | Function/version description |
function_type | string (UTF-8) | Used to indicate a STREAMING function. Defaults to DEFAULT. (DEFAULT, STREAMING, LLM) (wire: functionType) |
health | object | Function health configuration |
health_uri | string (uri) | Health endpoint for the container or helmChart. Deprecated, use health.uri instead. (wire: healthUri) |
helm_chart | string (uri) | Optional Helm Chart (wire: helmChart) |
inference_port | integer (int32) | Optional port number where the inference listener is running - defaults to 8000 for Triton (wire: inferencePort) |
inference_url | string (uri) | Entrypoint for invoking the container to process requests (wire: inferenceUrl) |
llm_invocation_config | object | Optional function-level LLM invocation configuration. (wire: llmInvocationConfig) |
models | array | Optional list of models |
owned_by_different_account | boolean | Indicates 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_limit | object | Optional rate limit policy (wire: rateLimit) |
resources | array | Optional set of resources. |
secrets | array | Optional secret names |
status | string (UTF-8) | Function status (ACTIVE, DEPLOYING, ERROR, INACTIVE, DELETED, DEGRADED, DEGRADING) |
tags | array | Optional set of tags. Maximum allowed number of tags per function is 64. Maximum length of each tag is 128 chars. |
telemetries | object | Optional telemetry configuration for the function |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | function_id, function_version_id | include_secrets | 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. |
list | select | function_id | Lists 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. | |
create | insert | function_id, inference_url, name | 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. | |
update | update | function_id, function_version_id | 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. | |
delete | delete | function_id, function_version_id | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
function_id | string (uuid) | Function id |
function_version_id | string (uuid) | Version id |
include_secrets | boolean | Query param 'includeSecrets' indicates whether to include secret names for the function in the response. (wire: includeSecrets) |
SELECT examples​
- get
- list
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 }}'
;
Lists 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.
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
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: function_versions
props:
- name: function_id
value: "{{ function_id }}"
description: Required parameter for the function_versions resource.
- name: api_body_format
value: "{{ api_body_format }}"
description: |
Invocation request body format
valid_values: ['PREDICT_V2', 'CUSTOM']
- name: container_args
value: "{{ container_args }}"
description: |
Args to be passed when launching the container
- name: container_environment
description: |
Environment settings for launching the container
value:
- key: "{{ key }}"
value: "{{ value }}"
- name: container_image
value: "{{ container_image }}"
description: |
Optional custom container image
- name: description
value: "{{ description }}"
description: |
Optional function/version description
- name: function_type
value: "{{ function_type }}"
description: |
Optional function type, used to indicate a STREAMING function. Defaults to DEFAULT.
valid_values: ['DEFAULT', 'STREAMING', 'LLM']
- name: health
description: |
Function health
value:
expectedStatusCode: {{ expectedStatusCode }}
port: {{ port }}
protocol: "{{ protocol }}"
timeout: "{{ timeout }}"
uri: "{{ uri }}"
- name: health_uri
value: "{{ health_uri }}"
description: |
Health endpoint for the container or the helmChart
- name: helm_chart
value: "{{ helm_chart }}"
description: |
Optional Helm Chart
- name: helm_chart_service_name
value: "{{ helm_chart_service_name }}"
description: |
Helm Chart Service Name is required when helmChart property is specified
- name: inference_port
value: {{ inference_port }}
description: |
Optional port number where the inference listener is running. Defaults to 8000
for Triton.
- name: inference_url
value: "{{ inference_url }}"
description: |
Entrypoint for invoking the container to process a request
- name: llm_invocation_config
description: |
Optional function-level LLM invocation configuration. Only valid for LLM-type functions.
value:
priority:
defaultPriority: {{ defaultPriority }}
perAccountPriority: "{{ perAccountPriority }}"
- name: models
description: |
Optional list of models
value:
- llmConfig:
routingMethod: "{{ routingMethod }}"
tokenRateLimit: "{{ tokenRateLimit }}"
tokenizer: "{{ tokenizer }}"
uris:
- "{{ uris }}"
name: "{{ name }}"
uri: "{{ uri }}"
version: "{{ version }}"
- name: name
value: "{{ name }}"
description: |
Function name must start with lowercase/uppercase/digit and can only contain lowercase, uppercase, digit, hyphen, and underscore characters
- name: rate_limit
description: |
Optional rate limit config
value:
exemptedNcaIds:
- "{{ exemptedNcaIds }}"
perNcaIdRate: "{{ perNcaIdRate }}"
perUserRate: "{{ perUserRate }}"
rateLimit: "{{ rateLimit }}"
syncCheck: {{ syncCheck }}
- name: resources
description: |
Optional set of resources
value:
- name: "{{ name }}"
uri: "{{ uri }}"
version: "{{ version }}"
- name: secrets
description: |
Optional secrets
value:
- name: "{{ name }}"
value: "{{ value }}"
- name: tags
value:
- "{{ tags }}"
description: |
Optional set of tags - could be empty. Provided by user
- name: telemetries
description: |
Optional telemetry configuration for logs, metrics, and traces.
value:
logsTelemetryId: "{{ logsTelemetryId }}"
metricsTelemetryId: "{{ metricsTelemetryId }}"
tracesTelemetryId: "{{ tracesTelemetryId }}"
UPDATE examples​
- update
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​
- delete
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
;