assets
Creates, updates, deletes, gets or lists an assets resource.
Overview​
| Name | assets |
| Type | Resource |
| Id | nvidia.nvcf_invocation.assets |
Fields​
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
asset_id | string (uuid) | Asset id (wire: assetId) |
content_type | string (UTF-8) | Content-type specified when creating the asset (wire: contentType) |
created_at | string (date_time) | Timestamp specified when creating the asset (wire: createdAt) |
description | string (UTF-8) | Description specified when creating the asset |
| Name | Datatype | Description |
|---|---|---|
asset_id | string (uuid) | Asset id (wire: assetId) |
content_type | string (UTF-8) | Content-type specified when creating the asset (wire: contentType) |
created_at | string (date_time) | Timestamp specified when creating the asset (wire: createdAt) |
description | string (UTF-8) | Description specified when creating the asset |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | asset_id | 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. | |
list | select | List assets owned by the current NVIDIA Cloud Account. Requires a bearer token with 'invoke_function' scope in the HTTP Authorization header. | ||
create | insert | content_type, description | 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. | |
delete | delete | asset_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
asset_id | string (uuid) | Id of the asset to be deleted |
SELECT examples​
- get
- list
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
;
List assets owned by 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
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: assets
props:
- name: content_type
value: "{{ content_type }}"
description: |
Content type of the asset such image/png, image/jpeg, etc.
- name: description
value: "{{ description }}"
description: |
Asset description
DELETE examples​
- delete
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
;