Skip to main content

assets

Creates, updates, deletes, gets or lists an assets resource.

Overview​

Nameassets
TypeResource
Idnvidia.nvcf_invocation.assets

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
asset_idstring (uuid)Asset id (wire: assetId)
content_typestring (UTF-8)Content-type specified when creating the asset (wire: contentType)
created_atstring (date_time)Timestamp specified when creating the asset (wire: createdAt)
descriptionstring (UTF-8)Description specified when creating the asset

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectasset_idReturns details for the specified asset-id belonging to the current NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header.
listselectList assets owned by the current NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header.
createinsertcontent_type, descriptionCreates a unique id representing an asset and a pre-signed URL to upload the asset artifact to AWS S3 bucket for the NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header.
deletedeleteasset_idDeletes asset belonging to the current NVIDIA Cloud Account. Requires a bearer token with 'invoke_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
asset_idstring (uuid)Id of the asset to be deleted

SELECT examples​

Returns details for the specified asset-id belonging to the current NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header.

SELECT
asset_id,
content_type,
created_at,
description
FROM nvidia.nvcf_invocation.assets
WHERE asset_id = '{{ asset_id }}' -- required
;

INSERT examples​

Creates a unique id representing an asset and a pre-signed URL to upload the asset artifact to AWS S3 bucket for the NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header.

INSERT INTO nvidia.nvcf_invocation.assets (
content_type,
description
)
SELECT
'{{ content_type }}' /* required */,
'{{ description }}' /* required */
RETURNING
asset_id,
content_type,
description,
upload_url
;

DELETE examples​

Deletes asset belonging to the current NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header.

DELETE FROM nvidia.nvcf_invocation.assets
WHERE asset_id = '{{ asset_id }}' --required
;