Skip to content

Latest commit

 

History

History
122 lines (86 loc) · 3.4 KB

File metadata and controls

122 lines (86 loc) · 3.4 KB

delete

Delete Function

Deletes the specified function version in the authenticated NVIDIA Cloud Account. Requires a bearer token with 'delete_function' scope in the HTTP Authorization header. If the function version is public, then Account Admin cannot delete the function.

API Endpoint: DELETE /v2/nvcf/functions/{functionId}/versions/{functionVersionId}

Synchronous Client

from nvidia_cloud_functions import Client

client = Client()
res = client.functions.versions.delete(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
    function_version_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
)

Asynchronous Client

from nvidia_cloud_functions import AsyncClient

client = AsyncClient()
res = await client.functions.versions.delete(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
    function_version_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
)

list

List Function Versions

Lists details of all the versions of the specified function in the authenticated NVIDIA Cloud Account. Requires either a bearer token or an api-key with 'list_functions' or 'list_functions_details' scopes in the HTTP Authorization header.

API Endpoint: GET /v2/nvcf/functions/{functionId}/versions

Synchronous Client

from nvidia_cloud_functions import Client

client = Client()
res = client.functions.versions.list(function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a")

Asynchronous Client

from nvidia_cloud_functions import AsyncClient

client = AsyncClient()
res = await client.functions.versions.list(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a"
)

get

Get Function Version Details

Retrieves detailed information of the specified function version in the authenticated NVIDIA Cloud Account. Requires either a bearer token or an api-key with 'list_functions' or 'list_functions_details' scopes in the HTTP Authorization header.

API Endpoint: GET /v2/nvcf/functions/{functionId}/versions/{functionVersionId}

Synchronous Client

from nvidia_cloud_functions import Client

client = Client()
res = client.functions.versions.get(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
    function_version_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
)

Asynchronous Client

from nvidia_cloud_functions import AsyncClient

client = AsyncClient()
res = await client.functions.versions.get(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
    function_version_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
)

create

Create Function Version

Creates a version of the specified function within the authenticated NVIDIA Cloud Account. Requires a bearer token with 'register_function' scope in the HTTP Authorization header.

API Endpoint: POST /v2/nvcf/functions/{functionId}/versions

Synchronous Client

from nvidia_cloud_functions import Client

client = Client()
res = client.functions.versions.create(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
    inference_url="http://www.example.com",
    name="string",
)

Asynchronous Client

from nvidia_cloud_functions import AsyncClient

client = AsyncClient()
res = await client.functions.versions.create(
    function_id="3e4666bf-d5e5-4aa7-b8ce-cefe41c7568a",
    inference_url="http://www.example.com",
    name="string",
)