deployments
Creates, updates, deletes, gets or lists a deployments resource.
Overview​
| Name | deployments |
| Type | Resource |
| Id | nvidia.nvcf_deployments.deployments |
Fields​
The following fields are returned by SELECT queries:
- get
- get_by_id
| Name | Datatype | Description |
|---|---|---|
deployment_id | string (uuid) | Last deployment id (wire: deploymentId) |
function_id | string (uuid) | Function id (wire: functionId) |
function_version_id | string (uuid) | Function version id (wire: functionVersionId) |
nca_id | string (UTF-8) | NVIDIA Cloud Account Id (wire: ncaId) |
function_name | string (UTF-8) | Function name (wire: functionName) |
created_at | string (date_time) | Function deployment creation timestamp (wire: createdAt) |
deployment_specifications | array | Function deployment details (wire: deploymentSpecifications) |
function_status | string (UTF-8) | Function status (ACTIVE, DEPLOYING, ERROR, INACTIVE, DELETED, DEGRADED, DEGRADING) (wire: functionStatus) |
health_info | array | Health info for a deployment specification is included only if there are any issues/errors. (wire: healthInfo) |
last_updated_at | string (date_time) | Function deployment modification timestamp (wire: lastUpdatedAt) |
| Name | Datatype | Description |
|---|---|---|
deployment_id | string (uuid) | Last deployment id (wire: deploymentId) |
function_id | string (uuid) | Function id (wire: functionId) |
function_version_id | string (uuid) | Function version id (wire: functionVersionId) |
nca_id | string (UTF-8) | NVIDIA Cloud Account Id (wire: ncaId) |
function_name | string (UTF-8) | Function name (wire: functionName) |
created_at | string (date_time) | Function deployment creation timestamp (wire: createdAt) |
deployment_specifications | array | Function deployment details (wire: deploymentSpecifications) |
function_status | string (UTF-8) | Function status (ACTIVE, DEPLOYING, ERROR, INACTIVE, DELETED, DEGRADED, DEGRADING) (wire: functionStatus) |
health_info | array | Health info for a deployment specification is included only if there are any issues/errors. (wire: healthInfo) |
last_updated_at | string (date_time) | Function deployment modification timestamp (wire: lastUpdatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | function_id, function_version_id | Allows Account Admins to retrieve the deployment details of the specified function version. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header. | |
get_by_id | select | deployment_id | Allows Account Admins to retrieve the deployment details of the specified deployment id. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header. | |
create | insert | function_id, function_version_id, deployment_specifications | Initiates deployment for the specified function version. Upon invocation of this endpoint, the function's status transitions to 'DEPLOYING'. If the specified function version is public, then Account Admin cannot perform this operation. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header. | |
update | update | function_id, function_version_id, deployment_specifications | Deprecated and will be removed soon. Use a single GPU specification update method instead. Updates the deployment specs of the specified function version. It's important to note that GPU type and backend configurations cannot be modified through this endpoint. If the specified function is public, then Account Admin cannot perform this operation. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header. | |
delete | delete | function_id, function_version_id | graceful | Deletes the deployment associated with the specified function. Upon deletion, any active instances will be terminated, and the function's status will transition to 'INACTIVE'. To undeploy a function version gracefully, specify 'graceful=true' query parameter, allowing current tasks to complete before terminating the instances. If the specified function version is public, then Account Admin cannot perform this operation. Access to this endpoint mandates a bearer token with 'deploy_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 |
|---|---|---|
deployment_id | string (uuid) | Deployment id |
function_id | string (uuid) | Function id |
function_version_id | string (uuid) | Function version id |
graceful | boolean | Query param to deactivate function for graceful shutdown |
SELECT examples​
- get
- get_by_id
Allows Account Admins to retrieve the deployment details of the specified function version. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header.
SELECT
deployment_id,
function_id,
function_version_id,
nca_id,
function_name,
created_at,
deployment_specifications,
function_status,
health_info,
last_updated_at
FROM nvidia.nvcf_deployments.deployments
WHERE function_id = '{{ function_id }}' -- required
AND function_version_id = '{{ function_version_id }}' -- required
;
Allows Account Admins to retrieve the deployment details of the specified deployment id. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header.
SELECT
deployment_id,
function_id,
function_version_id,
nca_id,
function_name,
created_at,
deployment_specifications,
function_status,
health_info,
last_updated_at
FROM nvidia.nvcf_deployments.deployments
WHERE deployment_id = '{{ deployment_id }}' -- required
;
INSERT examples​
- create
- Manifest
Initiates deployment for the specified function version. Upon invocation of this endpoint, the function's status transitions to 'DEPLOYING'. If the specified function version is public, then Account Admin cannot perform this operation. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header.
INSERT INTO nvidia.nvcf_deployments.deployments (
deployment_specifications,
function_id,
function_version_id
)
SELECT
'{{ deployment_specifications }}' /* required */,
'{{ function_id }}',
'{{ function_version_id }}'
RETURNING
deployment
;
# Description fields are for documentation purposes
- name: deployments
props:
- name: function_id
value: "{{ function_id }}"
description: Required parameter for the deployments resource.
- name: function_version_id
value: "{{ function_version_id }}"
description: Required parameter for the deployments resource.
- name: deployment_specifications
description: |
GPU specs with GPU, instance_type, clusters etc. details
value:
- attributes: "{{ attributes }}"
autoscalingConfiguration:
scaleDownDetails:
factor: {{ factor }}
metric: "{{ metric }}"
stickiness:
size: "{{ size }}"
threshold: "{{ threshold }}"
threshold: {{ threshold }}
scaleUpDetails:
factor: {{ factor }}
metric: "{{ metric }}"
stickiness:
size: "{{ size }}"
threshold: "{{ threshold }}"
threshold: {{ threshold }}
availabilityZones: "{{ availabilityZones }}"
backend: "{{ backend }}"
clusters: "{{ clusters }}"
configuration: "{{ configuration }}"
cpuArch: "{{ cpuArch }}"
driverVersion: "{{ driverVersion }}"
gpu: "{{ gpu }}"
gpuMemory: "{{ gpuMemory }}"
gpuSpecificationId: "{{ gpuSpecificationId }}"
helmValidationPolicy:
extraKubernetesTypes:
- group: "{{ group }}"
kind: "{{ kind }}"
version: "{{ version }}"
name: "{{ name }}"
instanceType: "{{ instanceType }}"
maxInstances: {{ maxInstances }}
maxRequestConcurrency: {{ maxRequestConcurrency }}
minInstances: {{ minInstances }}
os: "{{ os }}"
regions: "{{ regions }}"
storage: "{{ storage }}"
systemMemory: "{{ systemMemory }}"
UPDATE examples​
- update
Deprecated and will be removed soon. Use a single GPU specification update method instead. Updates the deployment specs of the specified function version. It's important to note that GPU type and backend configurations cannot be modified through this endpoint. If the specified function is public, then Account Admin cannot perform this operation. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header.
UPDATE nvidia.nvcf_deployments.deployments
SET
deployment_specifications = '{{ deployment_specifications }}'
WHERE
function_id = '{{ function_id }}' --required
AND function_version_id = '{{ function_version_id }}' --required
AND deployment_specifications = '{{ deployment_specifications }}' --required
RETURNING
deployment;
DELETE examples​
- delete
Deletes the deployment associated with the specified function. Upon deletion, any active instances will be terminated, and the function's status will transition to 'INACTIVE'. To undeploy a function version gracefully, specify 'graceful=true' query parameter, allowing current tasks to complete before terminating the instances. If the specified function version is public, then Account Admin cannot perform this operation. Access to this endpoint mandates a bearer token with 'deploy_function' scope in the HTTP Authorization header.
DELETE FROM nvidia.nvcf_deployments.deployments
WHERE function_id = '{{ function_id }}' --required
AND function_version_id = '{{ function_version_id }}' --required
AND graceful = '{{ graceful }}'
;