functions
Creates, updates, deletes, gets or lists a functions resource.
Overview​
| Name | functions |
| Type | Resource |
| Id | nvidia.nvcf_functions.functions |
Fields​
The following fields are returned by SELECT queries:
- 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 |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | visibility | 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. | |
create | insert | inference_url, name | Creates 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.
| Name | Datatype | Description |
|---|---|---|
visibility | array | Query param 'visibility' indicates the kind of functions to be included in the response. |
SELECT examples​
- list
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​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: functions
props:
- 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 }}"