Skip to main content

deployments

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

Overview​

Namedeployments
TypeResource
Idnvidia.nvcf_deployments.deployments

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
deployment_idstring (uuid)Last deployment id (wire: deploymentId)
function_idstring (uuid)Function id (wire: functionId)
function_version_idstring (uuid)Function version id (wire: functionVersionId)
nca_idstring (UTF-8)NVIDIA Cloud Account Id (wire: ncaId)
function_namestring (UTF-8)Function name (wire: functionName)
created_atstring (date_time)Function deployment creation timestamp (wire: createdAt)
deployment_specificationsarrayFunction deployment details (wire: deploymentSpecifications)
function_statusstring (UTF-8)Function status (ACTIVE, DEPLOYING, ERROR, INACTIVE, DELETED, DEGRADED, DEGRADING) (wire: functionStatus)
health_infoarrayHealth info for a deployment specification is included only if there are any issues/errors. (wire: healthInfo)
last_updated_atstring (date_time)Function deployment modification timestamp (wire: lastUpdatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectfunction_id, function_version_idAllows 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_idselectdeployment_idAllows 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.
createinsertfunction_id, function_version_id, deployment_specificationsInitiates 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.
updateupdatefunction_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.
deletedeletefunction_id, function_version_idgracefulDeletes 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.

NameDatatypeDescription
deployment_idstring (uuid)Deployment id
function_idstring (uuid)Function id
function_version_idstring (uuid)Function version id
gracefulbooleanQuery param to deactivate function for graceful shutdown

SELECT examples​

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
;

INSERT examples​

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
;

UPDATE examples​

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​

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 }}'
;