nvidiacloudfunctions

package module
v0.0.0-...-c1759d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

README

Nvidia Cloud Functions Go API Library

Go Reference

The Nvidia Cloud Functions Go library provides convenient access to the Nvidia Cloud Functions REST API from applications written in Go. The full API of this library can be found in api.md.

It is generated with Stainless.

Installation

import (
	"github.com/brevdev/nvcf-go" // imported as nvidiacloudfunctions
)

Or to pin the version:

go get -u 'github.com/brevdev/nvcf-go@v0.0.1-alpha.0'

Requirements

This library requires Go 1.18+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/brevdev/nvcf-go"
)

func main() {
	client := nvidiacloudfunctions.NewClient()
	createFunctionResponse, err := client.Nvcf.Functions.New(context.TODO(), nvidiacloudfunctions.NvcfFunctionNewParams{
		InferenceURL: nvidiacloudfunctions.F("https://example.com"),
		Name:         nvidiacloudfunctions.F("x"),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", createFunctionResponse.Function)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: nvidiacloudfunctions.F("hello"),

	// Explicitly send `"description": null`
	Description: nvidiacloudfunctions.Null[string](),

	Point: nvidiacloudfunctions.F(nvidiacloudfunctions.Point{
		X: nvidiacloudfunctions.Int(0),
		Y: nvidiacloudfunctions.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: nvidiacloudfunctions.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the repsonse JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := nvidiacloudfunctions.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Nvcf.Functions.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *nvidiacloudfunctions.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Nvcf.Functions.New(context.TODO(), nvidiacloudfunctions.NvcfFunctionNewParams{
	InferenceURL: nvidiacloudfunctions.F("https://example.com"),
	Name:         nvidiacloudfunctions.F("x"),
})
if err != nil {
	var apierr *nvidiacloudfunctions.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/v2/nvcf/functions": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Nvcf.Functions.New(
	ctx,
	nvidiacloudfunctions.NvcfFunctionNewParams{
		InferenceURL: nvidiacloudfunctions.F("https://example.com"),
		Name:         nvidiacloudfunctions.F("x"),
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as param.Field[io.Reader]. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper nvidiacloudfunctions.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := nvidiacloudfunctions.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Nvcf.Functions.New(
	context.TODO(),
	nvidiacloudfunctions.NvcfFunctionNewParams{
		InferenceURL: nvidiacloudfunctions.F("https://example.com"),
		Name:         nvidiacloudfunctions.F("x"),
	},
	option.WithMaxRetries(5),
)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]interface{}

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   nvidiacloudfunctions.F("id_xxxx"),
    Data: nvidiacloudfunctions.F(FooNewParamsData{
        FirstName: nvidiacloudfunctions.F("John"),
    }),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := nvidiacloudfunctions.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals).
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const CreateFunctionResponseFunctionAPIBodyFormatCustom = shared.CreateFunctionResponseFunctionAPIBodyFormatCustom

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionAPIBodyFormatPredictV2 = shared.CreateFunctionResponseFunctionAPIBodyFormatPredictV2

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionActiveInstancesInstanceStatusActive = shared.CreateFunctionResponseFunctionActiveInstancesInstanceStatusActive

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionActiveInstancesInstanceStatusDeleted = shared.CreateFunctionResponseFunctionActiveInstancesInstanceStatusDeleted

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionActiveInstancesInstanceStatusErrored = shared.CreateFunctionResponseFunctionActiveInstancesInstanceStatusErrored

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionActiveInstancesInstanceStatusPreempted = shared.CreateFunctionResponseFunctionActiveInstancesInstanceStatusPreempted

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionFunctionTypeDefault = shared.CreateFunctionResponseFunctionFunctionTypeDefault

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionFunctionTypeStreaming = shared.CreateFunctionResponseFunctionFunctionTypeStreaming

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionHealthProtocolGRpc = shared.CreateFunctionResponseFunctionHealthProtocolGRpc

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionHealthProtocolHTTP = shared.CreateFunctionResponseFunctionHealthProtocolHTTP

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionStatusActive = shared.CreateFunctionResponseFunctionStatusActive

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionStatusDeleted = shared.CreateFunctionResponseFunctionStatusDeleted

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionStatusDeploying = shared.CreateFunctionResponseFunctionStatusDeploying

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionStatusError = shared.CreateFunctionResponseFunctionStatusError

This is an alias to an internal value.

View Source
const CreateFunctionResponseFunctionStatusInactive = shared.CreateFunctionResponseFunctionStatusInactive

This is an alias to an internal value.

View Source
const FunctionResponseFunctionAPIBodyFormatCustom = shared.FunctionResponseFunctionAPIBodyFormatCustom

This is an alias to an internal value.

View Source
const FunctionResponseFunctionAPIBodyFormatPredictV2 = shared.FunctionResponseFunctionAPIBodyFormatPredictV2

This is an alias to an internal value.

View Source
const FunctionResponseFunctionActiveInstancesInstanceStatusActive = shared.FunctionResponseFunctionActiveInstancesInstanceStatusActive

This is an alias to an internal value.

View Source
const FunctionResponseFunctionActiveInstancesInstanceStatusDeleted = shared.FunctionResponseFunctionActiveInstancesInstanceStatusDeleted

This is an alias to an internal value.

View Source
const FunctionResponseFunctionActiveInstancesInstanceStatusErrored = shared.FunctionResponseFunctionActiveInstancesInstanceStatusErrored

This is an alias to an internal value.

View Source
const FunctionResponseFunctionActiveInstancesInstanceStatusPreempted = shared.FunctionResponseFunctionActiveInstancesInstanceStatusPreempted

This is an alias to an internal value.

View Source
const FunctionResponseFunctionFunctionTypeDefault = shared.FunctionResponseFunctionFunctionTypeDefault

This is an alias to an internal value.

View Source
const FunctionResponseFunctionFunctionTypeStreaming = shared.FunctionResponseFunctionFunctionTypeStreaming

This is an alias to an internal value.

View Source
const FunctionResponseFunctionHealthProtocolGRpc = shared.FunctionResponseFunctionHealthProtocolGRpc

This is an alias to an internal value.

View Source
const FunctionResponseFunctionHealthProtocolHTTP = shared.FunctionResponseFunctionHealthProtocolHTTP

This is an alias to an internal value.

View Source
const FunctionResponseFunctionStatusActive = shared.FunctionResponseFunctionStatusActive

This is an alias to an internal value.

View Source
const FunctionResponseFunctionStatusDeleted = shared.FunctionResponseFunctionStatusDeleted

This is an alias to an internal value.

View Source
const FunctionResponseFunctionStatusDeploying = shared.FunctionResponseFunctionStatusDeploying

This is an alias to an internal value.

View Source
const FunctionResponseFunctionStatusError = shared.FunctionResponseFunctionStatusError

This is an alias to an internal value.

View Source
const FunctionResponseFunctionStatusInactive = shared.FunctionResponseFunctionStatusInactive

This is an alias to an internal value.

View Source
const GetQueuesResponseQueuesFunctionStatusActive = shared.GetQueuesResponseQueuesFunctionStatusActive

This is an alias to an internal value.

View Source
const GetQueuesResponseQueuesFunctionStatusDeleted = shared.GetQueuesResponseQueuesFunctionStatusDeleted

This is an alias to an internal value.

View Source
const GetQueuesResponseQueuesFunctionStatusDeploying = shared.GetQueuesResponseQueuesFunctionStatusDeploying

This is an alias to an internal value.

View Source
const GetQueuesResponseQueuesFunctionStatusError = shared.GetQueuesResponseQueuesFunctionStatusError

This is an alias to an internal value.

View Source
const GetQueuesResponseQueuesFunctionStatusInactive = shared.GetQueuesResponseQueuesFunctionStatusInactive

This is an alias to an internal value.

View Source
const InvokeFunctionResponseStatusErrored = shared.InvokeFunctionResponseStatusErrored

This is an alias to an internal value.

View Source
const InvokeFunctionResponseStatusFulfilled = shared.InvokeFunctionResponseStatusFulfilled

This is an alias to an internal value.

View Source
const InvokeFunctionResponseStatusInProgress = shared.InvokeFunctionResponseStatusInProgress

This is an alias to an internal value.

View Source
const InvokeFunctionResponseStatusPendingEvaluation = shared.InvokeFunctionResponseStatusPendingEvaluation

This is an alias to an internal value.

View Source
const InvokeFunctionResponseStatusRejected = shared.InvokeFunctionResponseStatusRejected

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsAPIBodyFormatCustom = shared.ListFunctionsResponseFunctionsAPIBodyFormatCustom

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsAPIBodyFormatPredictV2 = shared.ListFunctionsResponseFunctionsAPIBodyFormatPredictV2

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsActiveInstancesInstanceStatusActive = shared.ListFunctionsResponseFunctionsActiveInstancesInstanceStatusActive

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsActiveInstancesInstanceStatusDeleted = shared.ListFunctionsResponseFunctionsActiveInstancesInstanceStatusDeleted

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsActiveInstancesInstanceStatusErrored = shared.ListFunctionsResponseFunctionsActiveInstancesInstanceStatusErrored

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsActiveInstancesInstanceStatusPreempted = shared.ListFunctionsResponseFunctionsActiveInstancesInstanceStatusPreempted

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsFunctionTypeDefault = shared.ListFunctionsResponseFunctionsFunctionTypeDefault

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsFunctionTypeStreaming = shared.ListFunctionsResponseFunctionsFunctionTypeStreaming

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsHealthProtocolGRpc = shared.ListFunctionsResponseFunctionsHealthProtocolGRpc

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsHealthProtocolHTTP = shared.ListFunctionsResponseFunctionsHealthProtocolHTTP

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsStatusActive = shared.ListFunctionsResponseFunctionsStatusActive

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsStatusDeleted = shared.ListFunctionsResponseFunctionsStatusDeleted

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsStatusDeploying = shared.ListFunctionsResponseFunctionsStatusDeploying

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsStatusError = shared.ListFunctionsResponseFunctionsStatusError

This is an alias to an internal value.

View Source
const ListFunctionsResponseFunctionsStatusInactive = shared.ListFunctionsResponseFunctionsStatusInactive

This is an alias to an internal value.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

func F

func F[T any](value T) param.Field[T]

F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.

func FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type AssetManagementAssetService

type AssetManagementAssetService struct {
	Options []option.RequestOption
}

AssetManagementAssetService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetManagementAssetService method instead.

func NewAssetManagementAssetService

func NewAssetManagementAssetService(opts ...option.RequestOption) (r *AssetManagementAssetService)

NewAssetManagementAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AssetManagementAssetService) Delete

func (r *AssetManagementAssetService) Delete(ctx context.Context, assetID string, opts ...option.RequestOption) (err error)

Deletes asset belonging to the current NVIDIA Cloud Account. Requires either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header.

func (*AssetManagementAssetService) Get

func (r *AssetManagementAssetService) Get(ctx context.Context, assetID string, opts ...option.RequestOption) (res *AssetResponse, err error)

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

type AssetManagementService

type AssetManagementService struct {
	Options []option.RequestOption
	Assets  *AssetManagementAssetService
}

AssetManagementService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetManagementService method instead.

func NewAssetManagementService

func NewAssetManagementService(opts ...option.RequestOption) (r *AssetManagementService)

NewAssetManagementService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type AssetNewParams

type AssetNewParams struct {
	// Content type of the asset such image/png, image/jpeg, etc.
	ContentType param.Field[string] `json:"contentType,required"`
	// Asset description
	Description param.Field[string] `json:"description,required"`
}

func (AssetNewParams) MarshalJSON

func (r AssetNewParams) MarshalJSON() (data []byte, err error)

type AssetResponse

type AssetResponse struct {
	// Data Transfer Object(DTO) representing an asset
	Asset AssetResponseAsset `json:"asset"`
	JSON  assetResponseJSON  `json:"-"`
}

func (*AssetResponse) UnmarshalJSON

func (r *AssetResponse) UnmarshalJSON(data []byte) (err error)

type AssetResponseAsset

type AssetResponseAsset struct {
	// Asset id
	AssetID string `json:"assetId" format:"uuid"`
	// Content-type specified when creating the asset
	ContentType string `json:"contentType"`
	// Description specified when creating the asset
	Description string                 `json:"description"`
	JSON        assetResponseAssetJSON `json:"-"`
}

Data Transfer Object(DTO) representing an asset

func (*AssetResponseAsset) UnmarshalJSON

func (r *AssetResponseAsset) UnmarshalJSON(data []byte) (err error)

type AssetService

type AssetService struct {
	Options []option.RequestOption
}

AssetService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAssetService method instead.

func NewAssetService

func NewAssetService(opts ...option.RequestOption) (r *AssetService)

NewAssetService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AssetService) List

func (r *AssetService) List(ctx context.Context, opts ...option.RequestOption) (res *ListAssetsResponse, err error)

List assets owned by the current NVIDIA Cloud Account. Requires either a bearer token or an api-key with invoke_function scope in the HTTP Authorization header.

func (*AssetService) New

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 either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header.

type AuthorizationFunctionAddParams

type AuthorizationFunctionAddParams struct {
	// Data Transfer Object(DTO) representing an authorized party.
	AuthorizedParty param.Field[AuthorizationFunctionAddParamsAuthorizedParty] `json:"authorizedParty,required"`
}

func (AuthorizationFunctionAddParams) MarshalJSON

func (r AuthorizationFunctionAddParams) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionAddParamsAuthorizedParty

type AuthorizationFunctionAddParamsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID param.Field[string] `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID param.Field[string] `json:"clientId"`
}

Data Transfer Object(DTO) representing an authorized party.

func (AuthorizationFunctionAddParamsAuthorizedParty) MarshalJSON

func (r AuthorizationFunctionAddParamsAuthorizedParty) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionRemoveParams

type AuthorizationFunctionRemoveParams struct {
	// Data Transfer Object(DTO) representing an authorized party.
	AuthorizedParty param.Field[AuthorizationFunctionRemoveParamsAuthorizedParty] `json:"authorizedParty,required"`
}

func (AuthorizationFunctionRemoveParams) MarshalJSON

func (r AuthorizationFunctionRemoveParams) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionRemoveParamsAuthorizedParty

type AuthorizationFunctionRemoveParamsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID param.Field[string] `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID param.Field[string] `json:"clientId"`
}

Data Transfer Object(DTO) representing an authorized party.

func (AuthorizationFunctionRemoveParamsAuthorizedParty) MarshalJSON

func (r AuthorizationFunctionRemoveParamsAuthorizedParty) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionService

type AuthorizationFunctionService struct {
	Options  []option.RequestOption
	Versions *AuthorizationFunctionVersionService
}

AuthorizationFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthorizationFunctionService method instead.

func NewAuthorizationFunctionService

func NewAuthorizationFunctionService(opts ...option.RequestOption) (r *AuthorizationFunctionService)

NewAuthorizationFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AuthorizationFunctionService) Add

Adds the specified NVIDIA Cloud Account to the set of authorized accounts that are can invoke all the versions of the specified function. If the specified function does not have any existing inheritable authorized accounts, it results in a response with status 404. If the specified account is already in the set of existing inheritable authorized accounts, it results in a response with status code 409. If a function is public, then Account Admin cannot perform this operation. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

func (*AuthorizationFunctionService) Remove

Removes the specified NVIDIA Cloud Account from the set of authorized accounts that can invoke all the versions of the specified function. If the specified function does not have any existing inheritable authorized parties, it results in a response with status 404. Also, if the specified account is not in the existing set of inheritable authorized accounts, it results in a response with status 400. If the specified function is public, then Account Admin cannot perform this operation. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

type AuthorizationFunctionVersionAddParams

type AuthorizationFunctionVersionAddParams struct {
	// Data Transfer Object(DTO) representing an authorized party.
	AuthorizedParty param.Field[AuthorizationFunctionVersionAddParamsAuthorizedParty] `json:"authorizedParty,required"`
}

func (AuthorizationFunctionVersionAddParams) MarshalJSON

func (r AuthorizationFunctionVersionAddParams) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionVersionAddParamsAuthorizedParty

type AuthorizationFunctionVersionAddParamsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID param.Field[string] `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID param.Field[string] `json:"clientId"`
}

Data Transfer Object(DTO) representing an authorized party.

func (AuthorizationFunctionVersionAddParamsAuthorizedParty) MarshalJSON

func (r AuthorizationFunctionVersionAddParamsAuthorizedParty) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionVersionRemoveParams

type AuthorizationFunctionVersionRemoveParams struct {
	// Data Transfer Object(DTO) representing an authorized party.
	AuthorizedParty param.Field[AuthorizationFunctionVersionRemoveParamsAuthorizedParty] `json:"authorizedParty,required"`
}

func (AuthorizationFunctionVersionRemoveParams) MarshalJSON

func (r AuthorizationFunctionVersionRemoveParams) MarshalJSON() (data []byte, err error)

type AuthorizationFunctionVersionRemoveParamsAuthorizedParty

type AuthorizationFunctionVersionRemoveParamsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID param.Field[string] `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID param.Field[string] `json:"clientId"`
}

Data Transfer Object(DTO) representing an authorized party.

func (AuthorizationFunctionVersionRemoveParamsAuthorizedParty) MarshalJSON

type AuthorizationFunctionVersionService

type AuthorizationFunctionVersionService struct {
	Options []option.RequestOption
}

AuthorizationFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthorizationFunctionVersionService method instead.

func NewAuthorizationFunctionVersionService

func NewAuthorizationFunctionVersionService(opts ...option.RequestOption) (r *AuthorizationFunctionVersionService)

NewAuthorizationFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AuthorizationFunctionVersionService) Add

Adds the specified NVIDIA Cloud Account to the set of authorized accounts that can invoke the specified function version. If the specified function version does not have any existing inheritable authorized accounts, it results in a response with status 404. If the specified account is already in the set of existing authorized accounts that are directly associated with the function version, it results in a response wit status code 409. If a function is public, then Account Admin cannot perform this operation. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

func (*AuthorizationFunctionVersionService) Remove

Removes the specified NVIDIA Cloud Account from the set of authorized accounts that are directly associated with specified function version. If the specified function version does not have any of its own(not inherited) authorized accounts, it results in a response with status 404. Also, if the specified authorized account is not in the set of existing authorized parties that are directly associated with the specified function version, it results in a response with status code 400. If the specified function version is public, then Account Admin cannot perform this operation. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

type AuthorizationService

type AuthorizationService struct {
	Options   []option.RequestOption
	Functions *AuthorizationFunctionService
}

AuthorizationService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAuthorizationService method instead.

func NewAuthorizationService

func NewAuthorizationService(opts ...option.RequestOption) (r *AuthorizationService)

NewAuthorizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type AuthorizedPartiesResponse

type AuthorizedPartiesResponse = shared.AuthorizedPartiesResponse

Parties authorized to invoke function

This is an alias to an internal type.

type AuthorizedPartiesResponseFunction

type AuthorizedPartiesResponseFunction = shared.AuthorizedPartiesResponseFunction

Data Transfer Object(DTO) representing a function with authorized accounts

This is an alias to an internal type.

type AuthorizedPartiesResponseFunctionAuthorizedParty

type AuthorizedPartiesResponseFunctionAuthorizedParty = shared.AuthorizedPartiesResponseFunctionAuthorizedParty

Data Transfer Object(DTO) representing an authorized party.

This is an alias to an internal type.

type Client

type Client struct {
	Options                              []option.RequestOption
	UserSecretManagement                 *UserSecretManagementService
	FunctionManagement                   *FunctionManagementService
	FunctionDeployment                   *FunctionDeploymentService
	FunctionInvocation                   *FunctionInvocationService
	EnvelopeFunctionInvocation           *EnvelopeFunctionInvocationService
	Nvcf                                 *NvcfService
	Assets                               *AssetService
	Authorizations                       *AuthorizationService
	Queues                               *QueueService
	Pexec                                *PexecService
	ClusterGroupsAndGPUs                 *ClusterGroupsAndGPUService
	ClientManagementForNvidiaSuperAdmins *ClientManagementForNvidiaSuperAdminService
	AssetManagement                      *AssetManagementService
}

Client creates a struct with services and top level methods that help with interacting with the nvidia-cloud-functions API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r *Client)

NewClient generates a new client with the default option read from the environment (). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type ClientManagementForNvidiaSuperAdminClientGetResponse

type ClientManagementForNvidiaSuperAdminClientGetResponse struct {
	// Data Transfer Object(DTO) representing a client
	Client ClientManagementForNvidiaSuperAdminClientGetResponseClient `json:"client,required"`
	JSON   clientManagementForNvidiaSuperAdminClientGetResponseJSON   `json:"-"`
}

Response body for client.

func (*ClientManagementForNvidiaSuperAdminClientGetResponse) UnmarshalJSON

func (r *ClientManagementForNvidiaSuperAdminClientGetResponse) UnmarshalJSON(data []byte) (err error)

type ClientManagementForNvidiaSuperAdminClientGetResponseClient

type ClientManagementForNvidiaSuperAdminClientGetResponseClient struct {
	// Name of the associated NVIDIA Cloud Account
	Name string `json:"name,required"`
	// Associated NVIDIA Cloud Account id
	NcaID string `json:"ncaId,required"`
	// Client Id
	ClientID string                                                         `json:"clientId"`
	JSON     clientManagementForNvidiaSuperAdminClientGetResponseClientJSON `json:"-"`
}

Data Transfer Object(DTO) representing a client

func (*ClientManagementForNvidiaSuperAdminClientGetResponseClient) UnmarshalJSON

type ClientManagementForNvidiaSuperAdminClientService

type ClientManagementForNvidiaSuperAdminClientService struct {
	Options []option.RequestOption
}

ClientManagementForNvidiaSuperAdminClientService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClientManagementForNvidiaSuperAdminClientService method instead.

func NewClientManagementForNvidiaSuperAdminClientService

func NewClientManagementForNvidiaSuperAdminClientService(opts ...option.RequestOption) (r *ClientManagementForNvidiaSuperAdminClientService)

NewClientManagementForNvidiaSuperAdminClientService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ClientManagementForNvidiaSuperAdminClientService) Get

Gets details of the specified client.Requires a bearer token in the HTTP Authorization header with 'account_setup' scope. These endpoints are invoked by NVIDIA Super Admins working across accounts.

type ClientManagementForNvidiaSuperAdminService

type ClientManagementForNvidiaSuperAdminService struct {
	Options []option.RequestOption
	Clients *ClientManagementForNvidiaSuperAdminClientService
}

ClientManagementForNvidiaSuperAdminService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClientManagementForNvidiaSuperAdminService method instead.

func NewClientManagementForNvidiaSuperAdminService

func NewClientManagementForNvidiaSuperAdminService(opts ...option.RequestOption) (r *ClientManagementForNvidiaSuperAdminService)

NewClientManagementForNvidiaSuperAdminService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type ClusterGroupsAndGPUClusterGroupService

type ClusterGroupsAndGPUClusterGroupService struct {
	Options []option.RequestOption
}

ClusterGroupsAndGPUClusterGroupService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterGroupsAndGPUClusterGroupService method instead.

func NewClusterGroupsAndGPUClusterGroupService

func NewClusterGroupsAndGPUClusterGroupService(opts ...option.RequestOption) (r *ClusterGroupsAndGPUClusterGroupService)

NewClusterGroupsAndGPUClusterGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ClusterGroupsAndGPUClusterGroupService) List

Lists Cluster Groups for the current account. The response includes cluster groups defined specifically in the current account and publicly available cluster groups such as GFN, OCI, etc. Requires a bearer token with 'list_cluster_groups' scope in HTTP Authorization header.

type ClusterGroupsAndGPUService

type ClusterGroupsAndGPUService struct {
	Options       []option.RequestOption
	ClusterGroups *ClusterGroupsAndGPUClusterGroupService
}

ClusterGroupsAndGPUService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewClusterGroupsAndGPUService method instead.

func NewClusterGroupsAndGPUService

func NewClusterGroupsAndGPUService(opts ...option.RequestOption) (r *ClusterGroupsAndGPUService)

NewClusterGroupsAndGPUService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type ClusterGroupsResponse

type ClusterGroupsResponse struct {
	ClusterGroups []ClusterGroupsResponseClusterGroup `json:"clusterGroups"`
	JSON          clusterGroupsResponseJSON           `json:"-"`
}

func (*ClusterGroupsResponse) UnmarshalJSON

func (r *ClusterGroupsResponse) UnmarshalJSON(data []byte) (err error)

type ClusterGroupsResponseClusterGroup

type ClusterGroupsResponseClusterGroup struct {
	ID               string                                      `json:"id" format:"uuid"`
	AuthorizedNcaIDs []string                                    `json:"authorizedNcaIds"`
	Clusters         []ClusterGroupsResponseClusterGroupsCluster `json:"clusters"`
	GPUs             []ClusterGroupsResponseClusterGroupsGPU     `json:"gpus"`
	Name             string                                      `json:"name"`
	NcaID            string                                      `json:"ncaId"`
	JSON             clusterGroupsResponseClusterGroupJSON       `json:"-"`
}

func (*ClusterGroupsResponseClusterGroup) UnmarshalJSON

func (r *ClusterGroupsResponseClusterGroup) UnmarshalJSON(data []byte) (err error)

type ClusterGroupsResponseClusterGroupsCluster

type ClusterGroupsResponseClusterGroupsCluster struct {
	ID         string                                        `json:"id"`
	K8sVersion string                                        `json:"k8sVersion"`
	Name       string                                        `json:"name"`
	JSON       clusterGroupsResponseClusterGroupsClusterJSON `json:"-"`
}

func (*ClusterGroupsResponseClusterGroupsCluster) UnmarshalJSON

func (r *ClusterGroupsResponseClusterGroupsCluster) UnmarshalJSON(data []byte) (err error)

type ClusterGroupsResponseClusterGroupsGPU

type ClusterGroupsResponseClusterGroupsGPU struct {
	InstanceTypes []ClusterGroupsResponseClusterGroupsGPUsInstanceType `json:"instanceTypes"`
	Name          string                                               `json:"name"`
	JSON          clusterGroupsResponseClusterGroupsGPUJSON            `json:"-"`
}

func (*ClusterGroupsResponseClusterGroupsGPU) UnmarshalJSON

func (r *ClusterGroupsResponseClusterGroupsGPU) UnmarshalJSON(data []byte) (err error)

type ClusterGroupsResponseClusterGroupsGPUsInstanceType

type ClusterGroupsResponseClusterGroupsGPUsInstanceType struct {
	Default     bool                                                   `json:"default"`
	Description string                                                 `json:"description"`
	Name        string                                                 `json:"name"`
	JSON        clusterGroupsResponseClusterGroupsGPUsInstanceTypeJSON `json:"-"`
}

func (*ClusterGroupsResponseClusterGroupsGPUsInstanceType) UnmarshalJSON

func (r *ClusterGroupsResponseClusterGroupsGPUsInstanceType) UnmarshalJSON(data []byte) (err error)

type CreateAssetResponse

type CreateAssetResponse struct {
	// Unique id of the asset to be uploaded to AWS S3 bucket
	AssetID string `json:"assetId" format:"uuid"`
	// Content type of the asset such image/png, image/jpeg, etc.
	ContentType string `json:"contentType"`
	// Asset description to be used when uploading the asset
	Description string `json:"description"`
	// Pre-signed upload URL to upload asset
	UploadURL string                  `json:"uploadUrl" format:"url"`
	JSON      createAssetResponseJSON `json:"-"`
}

Response body containing asset-id and the corresponding pre-signed URL to upload an asset of specified content-type to AWS S3 bucket.

func (*CreateAssetResponse) UnmarshalJSON

func (r *CreateAssetResponse) UnmarshalJSON(data []byte) (err error)

type CreateFunctionResponse

type CreateFunctionResponse = shared.CreateFunctionResponse

Response body for create function request.

This is an alias to an internal type.

type CreateFunctionResponseFunction

type CreateFunctionResponseFunction = shared.CreateFunctionResponseFunction

Data Transfer Object (DTO) representing a function

This is an alias to an internal type.

type CreateFunctionResponseFunctionAPIBodyFormat

type CreateFunctionResponseFunctionAPIBodyFormat = shared.CreateFunctionResponseFunctionAPIBodyFormat

Invocation request body format

This is an alias to an internal type.

type CreateFunctionResponseFunctionActiveInstance

type CreateFunctionResponseFunctionActiveInstance = shared.CreateFunctionResponseFunctionActiveInstance

Data Transfer Object(DTO) representing a spot instance

This is an alias to an internal type.

type CreateFunctionResponseFunctionActiveInstancesInstanceStatus

type CreateFunctionResponseFunctionActiveInstancesInstanceStatus = shared.CreateFunctionResponseFunctionActiveInstancesInstanceStatus

Instance status

This is an alias to an internal type.

type CreateFunctionResponseFunctionContainerEnvironment

type CreateFunctionResponseFunctionContainerEnvironment = shared.CreateFunctionResponseFunctionContainerEnvironment

Data Transfer Object(DTO) representing a container environment entry

This is an alias to an internal type.

type CreateFunctionResponseFunctionFunctionType

type CreateFunctionResponseFunctionFunctionType = shared.CreateFunctionResponseFunctionFunctionType

Used to indicate a STREAMING function. Defaults to DEFAULT.

This is an alias to an internal type.

type CreateFunctionResponseFunctionHealth

type CreateFunctionResponseFunctionHealth = shared.CreateFunctionResponseFunctionHealth

Data Transfer Object(DTO) representing a function ne

This is an alias to an internal type.

type CreateFunctionResponseFunctionHealthProtocol

type CreateFunctionResponseFunctionHealthProtocol = shared.CreateFunctionResponseFunctionHealthProtocol

HTTP/gPRC protocol type for health endpoint

This is an alias to an internal type.

type CreateFunctionResponseFunctionModel

type CreateFunctionResponseFunctionModel = shared.CreateFunctionResponseFunctionModel

Data Transfer Object(DTO) representing an artifact

This is an alias to an internal type.

type CreateFunctionResponseFunctionResource

type CreateFunctionResponseFunctionResource = shared.CreateFunctionResponseFunctionResource

Data Transfer Object(DTO) representing an artifact

This is an alias to an internal type.

type CreateFunctionResponseFunctionStatus

type CreateFunctionResponseFunctionStatus = shared.CreateFunctionResponseFunctionStatus

Function status

This is an alias to an internal type.

type DeploymentResponse

type DeploymentResponse struct {
	// Function deployment response
	Deployment DeploymentResponseDeployment `json:"deployment,required"`
	JSON       deploymentResponseJSON       `json:"-"`
}

Function Deployment Response

func (*DeploymentResponse) UnmarshalJSON

func (r *DeploymentResponse) UnmarshalJSON(data []byte) (err error)

type DeploymentResponseDeployment

type DeploymentResponseDeployment struct {
	// Function deployment creation timestamp
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	// Function deployment details
	DeploymentSpecifications []DeploymentResponseDeploymentDeploymentSpecification `json:"deploymentSpecifications,required"`
	// Function id
	FunctionID string `json:"functionId,required" format:"uuid"`
	// Function name
	FunctionName string `json:"functionName,required"`
	// Function status
	FunctionStatus DeploymentResponseDeploymentFunctionStatus `json:"functionStatus,required"`
	// Function version id
	FunctionVersionID string `json:"functionVersionId,required" format:"uuid"`
	// NVIDIA Cloud Account Id
	NcaID string `json:"ncaId,required"`
	// Health info for a deployment specification is included only if there are any
	// issues/errors.
	HealthInfo []DeploymentResponseDeploymentHealthInfo `json:"healthInfo"`
	// Deprecated Request Queue URL
	RequestQueueURL string                           `json:"requestQueueUrl"`
	JSON            deploymentResponseDeploymentJSON `json:"-"`
}

Function deployment response

func (*DeploymentResponseDeployment) UnmarshalJSON

func (r *DeploymentResponseDeployment) UnmarshalJSON(data []byte) (err error)

type DeploymentResponseDeploymentDeploymentSpecification

type DeploymentResponseDeploymentDeploymentSpecification struct {
	// GPU name from the cluster
	GPU string `json:"gpu,required"`
	// Instance type, based on GPU, assigned to a Worker
	InstanceType string `json:"instanceType,required"`
	// Maximum number of spot instances for the deployment
	MaxInstances int64 `json:"maxInstances,required"`
	// Minimum number of spot instances for the deployment
	MinInstances int64 `json:"minInstances,required"`
	// Specific attributes capabilities to deploy functions.
	Attributes []string `json:"attributes"`
	// List of availability-zones(or clusters) in the cluster group
	AvailabilityZones []string `json:"availabilityZones"`
	// Backend/CSP where the GPU powered instance will be launched
	Backend string `json:"backend"`
	// Specific clusters within spot instance or worker node powered by the selected
	// instance-type to deploy function.
	Clusters      []string    `json:"clusters"`
	Configuration interface{} `json:"configuration"`
	// Max request concurrency between 1 (default) and 1024.
	MaxRequestConcurrency int64 `json:"maxRequestConcurrency"`
	// Preferred order of deployment if there are several gpu specs.
	PreferredOrder int64 `json:"preferredOrder"`
	// List of regions allowed to deploy. The instance or worker node will be in one of
	// the specified geographical regions.
	Regions []string                                                `json:"regions"`
	JSON    deploymentResponseDeploymentDeploymentSpecificationJSON `json:"-"`
}

Data Transfer Object(DTO) representing GPU specification.

func (*DeploymentResponseDeploymentDeploymentSpecification) UnmarshalJSON

func (r *DeploymentResponseDeploymentDeploymentSpecification) UnmarshalJSON(data []byte) (err error)

type DeploymentResponseDeploymentFunctionStatus

type DeploymentResponseDeploymentFunctionStatus string

Function status

const (
	DeploymentResponseDeploymentFunctionStatusActive    DeploymentResponseDeploymentFunctionStatus = "ACTIVE"
	DeploymentResponseDeploymentFunctionStatusDeploying DeploymentResponseDeploymentFunctionStatus = "DEPLOYING"
	DeploymentResponseDeploymentFunctionStatusError     DeploymentResponseDeploymentFunctionStatus = "ERROR"
	DeploymentResponseDeploymentFunctionStatusInactive  DeploymentResponseDeploymentFunctionStatus = "INACTIVE"
	DeploymentResponseDeploymentFunctionStatusDeleted   DeploymentResponseDeploymentFunctionStatus = "DELETED"
)

func (DeploymentResponseDeploymentFunctionStatus) IsKnown

type DeploymentResponseDeploymentHealthInfo

type DeploymentResponseDeploymentHealthInfo struct {
	// Backend/CSP where the GPU powered instance will be launched
	Backend string `json:"backend,required"`
	// Deployment error
	Error string `json:"error,required"`
	// GPU Type as per SDD
	GPU string `json:"gpu,required"`
	// Instance type
	InstanceType string `json:"instanceType"`
	// SIS Request ID
	SisRequestID string                                     `json:"sisRequestId" format:"uuid"`
	JSON         deploymentResponseDeploymentHealthInfoJSON `json:"-"`
}

Data Transfer Object(DTO) representing deployment error

func (*DeploymentResponseDeploymentHealthInfo) UnmarshalJSON

func (r *DeploymentResponseDeploymentHealthInfo) UnmarshalJSON(data []byte) (err error)

type EnvelopeFunctionInvocationExecService

type EnvelopeFunctionInvocationExecService struct {
	Options []option.RequestOption
	Status  *EnvelopeFunctionInvocationExecStatusService
}

EnvelopeFunctionInvocationExecService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvelopeFunctionInvocationExecService method instead.

func NewEnvelopeFunctionInvocationExecService

func NewEnvelopeFunctionInvocationExecService(opts ...option.RequestOption) (r *EnvelopeFunctionInvocationExecService)

NewEnvelopeFunctionInvocationExecService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type EnvelopeFunctionInvocationExecStatusService

type EnvelopeFunctionInvocationExecStatusService struct {
	Options []option.RequestOption
}

EnvelopeFunctionInvocationExecStatusService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvelopeFunctionInvocationExecStatusService method instead.

func NewEnvelopeFunctionInvocationExecStatusService

func NewEnvelopeFunctionInvocationExecStatusService(opts ...option.RequestOption) (r *EnvelopeFunctionInvocationExecStatusService)

NewEnvelopeFunctionInvocationExecStatusService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvelopeFunctionInvocationExecStatusService) Get

Retrieves the status of an in-progress or pending request using its unique invocation request ID. If the result is available, it will be included in the response, marking the request as fulfilled. Conversely, if the result is not yet available, the request is deemed pending. Access to this endpoint mandates inclusion of either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header. In-progress responses are returned in order. If no in-progress response is received during polling you will receive the most recent in-progress response. Only the first 256 unread in-progress messages are kept.

type EnvelopeFunctionInvocationFunctionInvokeParams

type EnvelopeFunctionInvocationFunctionInvokeParams struct {
	RequestBody param.Field[interface{}] `json:"requestBody,required"`
	// Data Transfer Object(DTO) representing header/address for Cloud Functions
	// processing.
	RequestHeader param.Field[EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeader] `json:"requestHeader"`
}

func (EnvelopeFunctionInvocationFunctionInvokeParams) MarshalJSON

func (r EnvelopeFunctionInvocationFunctionInvokeParams) MarshalJSON() (data []byte, err error)

type EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeader

type EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeader struct {
	// List of UUIDs corresponding to the uploaded assets to be used as input for
	// executing the task.
	InputAssetReferences param.Field[[]string] `json:"inputAssetReferences" format:"uuid"`
	// Metadata used for billing/metering purposes.
	MeteringData param.Field[[]EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeaderMeteringData] `json:"meteringData"`
	// Polling timeout duration.
	PollDurationSeconds param.Field[int64] `json:"pollDurationSeconds"`
}

Data Transfer Object(DTO) representing header/address for Cloud Functions processing.

func (EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeader) MarshalJSON

type EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeaderMeteringData

type EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeaderMeteringData struct {
	// Metering/Billing key
	Key param.Field[string] `json:"key,required"`
	// Metering/Billing value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing a billing/metering data entry

func (EnvelopeFunctionInvocationFunctionInvokeParamsRequestHeaderMeteringData) MarshalJSON

type EnvelopeFunctionInvocationFunctionService

type EnvelopeFunctionInvocationFunctionService struct {
	Options  []option.RequestOption
	Versions *EnvelopeFunctionInvocationFunctionVersionService
}

EnvelopeFunctionInvocationFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvelopeFunctionInvocationFunctionService method instead.

func NewEnvelopeFunctionInvocationFunctionService

func NewEnvelopeFunctionInvocationFunctionService(opts ...option.RequestOption) (r *EnvelopeFunctionInvocationFunctionService)

NewEnvelopeFunctionInvocationFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvelopeFunctionInvocationFunctionService) Invoke

Invokes the specified function that was successfully deployed. If the version is not specified, any active function versions will handle the request. If the version is specified in the URI, then the request is exclusively processed by the designated version of the function. By default, this endpoint will block for 5 seconds. If the request is not fulfilled before the timeout, it's status is considered in-progress or pending and the response includes HTTP status code 202 with an invocation request ID, indicating that the client should commence polling for the result using the invocation request ID. Access to this endpoint mandates inclusion of either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header. Additionally, this endpoint has the capability to provide updates on the progress of the request, contingent upon the workload's provision of such information. In-progress responses are returned in order. If no in-progress response is received during polling you will receive the most recent in-progress response. Only the first 256 unread in-progress messages are kept.

type EnvelopeFunctionInvocationFunctionVersionInvokeParams

type EnvelopeFunctionInvocationFunctionVersionInvokeParams struct {
	RequestBody param.Field[interface{}] `json:"requestBody,required"`
	// Data Transfer Object(DTO) representing header/address for Cloud Functions
	// processing.
	RequestHeader param.Field[EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeader] `json:"requestHeader"`
}

func (EnvelopeFunctionInvocationFunctionVersionInvokeParams) MarshalJSON

type EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeader

type EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeader struct {
	// List of UUIDs corresponding to the uploaded assets to be used as input for
	// executing the task.
	InputAssetReferences param.Field[[]string] `json:"inputAssetReferences" format:"uuid"`
	// Metadata used for billing/metering purposes.
	MeteringData param.Field[[]EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeaderMeteringData] `json:"meteringData"`
	// Polling timeout duration.
	PollDurationSeconds param.Field[int64] `json:"pollDurationSeconds"`
}

Data Transfer Object(DTO) representing header/address for Cloud Functions processing.

func (EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeader) MarshalJSON

type EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeaderMeteringData

type EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeaderMeteringData struct {
	// Metering/Billing key
	Key param.Field[string] `json:"key,required"`
	// Metering/Billing value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing a billing/metering data entry

func (EnvelopeFunctionInvocationFunctionVersionInvokeParamsRequestHeaderMeteringData) MarshalJSON

type EnvelopeFunctionInvocationFunctionVersionService

type EnvelopeFunctionInvocationFunctionVersionService struct {
	Options []option.RequestOption
}

EnvelopeFunctionInvocationFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvelopeFunctionInvocationFunctionVersionService method instead.

func NewEnvelopeFunctionInvocationFunctionVersionService

func NewEnvelopeFunctionInvocationFunctionVersionService(opts ...option.RequestOption) (r *EnvelopeFunctionInvocationFunctionVersionService)

NewEnvelopeFunctionInvocationFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EnvelopeFunctionInvocationFunctionVersionService) Invoke

Invokes the specified function that was successfully deployed. If the version is not specified, any active function versions will handle the request. If the version is specified in the URI, then the request is exclusively processed by the designated version of the function. By default, this endpoint will block for 5 seconds. If the request is not fulfilled before the timeout, it's status is considered in-progress or pending and the response includes HTTP status code 202 with an invocation request ID, indicating that the client should commence polling for the result using the invocation request ID. Access to this endpoint mandates inclusion of either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header. Additionally, this endpoint has the capability to provide updates on the progress of the request, contingent upon the workload's provision of such information. In-progress responses are returned in order. If no in-progress response is received during polling you will receive the most recent in-progress response. Only the first 256 unread in-progress messages are kept.

type EnvelopeFunctionInvocationService

type EnvelopeFunctionInvocationService struct {
	Options   []option.RequestOption
	Functions *EnvelopeFunctionInvocationFunctionService
	Exec      *EnvelopeFunctionInvocationExecService
}

EnvelopeFunctionInvocationService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEnvelopeFunctionInvocationService method instead.

func NewEnvelopeFunctionInvocationService

func NewEnvelopeFunctionInvocationService(opts ...option.RequestOption) (r *EnvelopeFunctionInvocationService)

NewEnvelopeFunctionInvocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Error

type Error = apierror.Error

type FunctionDeploymentFunctionService

type FunctionDeploymentFunctionService struct {
	Options  []option.RequestOption
	Versions *FunctionDeploymentFunctionVersionService
}

FunctionDeploymentFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionDeploymentFunctionService method instead.

func NewFunctionDeploymentFunctionService

func NewFunctionDeploymentFunctionService(opts ...option.RequestOption) (r *FunctionDeploymentFunctionService)

NewFunctionDeploymentFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type FunctionDeploymentFunctionVersionDeleteParams

type FunctionDeploymentFunctionVersionDeleteParams struct {
	// Query param to deactivate function for graceful shutdown
	Graceful param.Field[bool] `query:"graceful"`
}

func (FunctionDeploymentFunctionVersionDeleteParams) URLQuery

URLQuery serializes FunctionDeploymentFunctionVersionDeleteParams's query parameters as `url.Values`.

type FunctionDeploymentFunctionVersionNewParams

type FunctionDeploymentFunctionVersionNewParams struct {
	// Deployment specs with Backend, GPU, instance-type, etc. details
	DeploymentSpecifications param.Field[[]FunctionDeploymentFunctionVersionNewParamsDeploymentSpecification] `json:"deploymentSpecifications,required"`
}

func (FunctionDeploymentFunctionVersionNewParams) MarshalJSON

func (r FunctionDeploymentFunctionVersionNewParams) MarshalJSON() (data []byte, err error)

type FunctionDeploymentFunctionVersionNewParamsDeploymentSpecification

type FunctionDeploymentFunctionVersionNewParamsDeploymentSpecification struct {
	// GPU name from the cluster
	GPU param.Field[string] `json:"gpu,required"`
	// Instance type, based on GPU, assigned to a Worker
	InstanceType param.Field[string] `json:"instanceType,required"`
	// Maximum number of spot instances for the deployment
	MaxInstances param.Field[int64] `json:"maxInstances,required"`
	// Minimum number of spot instances for the deployment
	MinInstances param.Field[int64] `json:"minInstances,required"`
	// Specific attributes capabilities to deploy functions.
	Attributes param.Field[[]string] `json:"attributes"`
	// List of availability-zones(or clusters) in the cluster group
	AvailabilityZones param.Field[[]string] `json:"availabilityZones"`
	// Backend/CSP where the GPU powered instance will be launched
	Backend param.Field[string] `json:"backend"`
	// Specific clusters within spot instance or worker node powered by the selected
	// instance-type to deploy function.
	Clusters      param.Field[[]string]    `json:"clusters"`
	Configuration param.Field[interface{}] `json:"configuration"`
	// Max request concurrency between 1 (default) and 1024.
	MaxRequestConcurrency param.Field[int64] `json:"maxRequestConcurrency"`
	// Preferred order of deployment if there are several gpu specs.
	PreferredOrder param.Field[int64] `json:"preferredOrder"`
	// List of regions allowed to deploy. The instance or worker node will be in one of
	// the specified geographical regions.
	Regions param.Field[[]string] `json:"regions"`
}

Data Transfer Object(DTO) representing GPU specification.

func (FunctionDeploymentFunctionVersionNewParamsDeploymentSpecification) MarshalJSON

type FunctionDeploymentFunctionVersionService

type FunctionDeploymentFunctionVersionService struct {
	Options []option.RequestOption
}

FunctionDeploymentFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionDeploymentFunctionVersionService method instead.

func NewFunctionDeploymentFunctionVersionService

func NewFunctionDeploymentFunctionVersionService(opts ...option.RequestOption) (r *FunctionDeploymentFunctionVersionService)

NewFunctionDeploymentFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FunctionDeploymentFunctionVersionService) 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.

func (*FunctionDeploymentFunctionVersionService) Get

func (r *FunctionDeploymentFunctionVersionService) Get(ctx context.Context, functionID string, functionVersionID string, opts ...option.RequestOption) (res *DeploymentResponse, err error)

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.

func (*FunctionDeploymentFunctionVersionService) New

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.

func (*FunctionDeploymentFunctionVersionService) Update

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.

type FunctionDeploymentFunctionVersionUpdateParams

type FunctionDeploymentFunctionVersionUpdateParams struct {
	// Deployment specs with Backend, GPU, instance-type, etc. details
	DeploymentSpecifications param.Field[[]FunctionDeploymentFunctionVersionUpdateParamsDeploymentSpecification] `json:"deploymentSpecifications,required"`
}

func (FunctionDeploymentFunctionVersionUpdateParams) MarshalJSON

func (r FunctionDeploymentFunctionVersionUpdateParams) MarshalJSON() (data []byte, err error)

type FunctionDeploymentFunctionVersionUpdateParamsDeploymentSpecification

type FunctionDeploymentFunctionVersionUpdateParamsDeploymentSpecification struct {
	// GPU name from the cluster
	GPU param.Field[string] `json:"gpu,required"`
	// Instance type, based on GPU, assigned to a Worker
	InstanceType param.Field[string] `json:"instanceType,required"`
	// Maximum number of spot instances for the deployment
	MaxInstances param.Field[int64] `json:"maxInstances,required"`
	// Minimum number of spot instances for the deployment
	MinInstances param.Field[int64] `json:"minInstances,required"`
	// Specific attributes capabilities to deploy functions.
	Attributes param.Field[[]string] `json:"attributes"`
	// List of availability-zones(or clusters) in the cluster group
	AvailabilityZones param.Field[[]string] `json:"availabilityZones"`
	// Backend/CSP where the GPU powered instance will be launched
	Backend param.Field[string] `json:"backend"`
	// Specific clusters within spot instance or worker node powered by the selected
	// instance-type to deploy function.
	Clusters      param.Field[[]string]    `json:"clusters"`
	Configuration param.Field[interface{}] `json:"configuration"`
	// Max request concurrency between 1 (default) and 1024.
	MaxRequestConcurrency param.Field[int64] `json:"maxRequestConcurrency"`
	// Preferred order of deployment if there are several gpu specs.
	PreferredOrder param.Field[int64] `json:"preferredOrder"`
	// List of regions allowed to deploy. The instance or worker node will be in one of
	// the specified geographical regions.
	Regions param.Field[[]string] `json:"regions"`
}

Data Transfer Object(DTO) representing GPU specification.

func (FunctionDeploymentFunctionVersionUpdateParamsDeploymentSpecification) MarshalJSON

type FunctionDeploymentService

type FunctionDeploymentService struct {
	Options   []option.RequestOption
	Functions *FunctionDeploymentFunctionService
}

FunctionDeploymentService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionDeploymentService method instead.

func NewFunctionDeploymentService

func NewFunctionDeploymentService(opts ...option.RequestOption) (r *FunctionDeploymentService)

NewFunctionDeploymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type FunctionInvocationFunctionInvokeParams

type FunctionInvocationFunctionInvokeParams struct {
	Body                     interface{}           `json:"body,required"`
	NvcfInputAssetReferences param.Field[[]string] `header:"NVCF-INPUT-ASSET-REFERENCES"`
	NvcfPollSeconds          param.Field[int64]    `header:"NVCF-POLL-SECONDS"`
}

func (FunctionInvocationFunctionInvokeParams) MarshalJSON

func (r FunctionInvocationFunctionInvokeParams) MarshalJSON() (data []byte, err error)

type FunctionInvocationFunctionInvokeResponse

type FunctionInvocationFunctionInvokeResponse struct {
	Char     string                                       `json:"char"`
	Direct   bool                                         `json:"direct"`
	Double   float64                                      `json:"double"`
	Float    float64                                      `json:"float"`
	Int      int64                                        `json:"int"`
	Long     int64                                        `json:"long"`
	ReadOnly bool                                         `json:"readOnly"`
	Short    int64                                        `json:"short"`
	JSON     functionInvocationFunctionInvokeResponseJSON `json:"-"`
}

func (*FunctionInvocationFunctionInvokeResponse) UnmarshalJSON

func (r *FunctionInvocationFunctionInvokeResponse) UnmarshalJSON(data []byte) (err error)

type FunctionInvocationFunctionService

type FunctionInvocationFunctionService struct {
	Options  []option.RequestOption
	Versions *FunctionInvocationFunctionVersionService
}

FunctionInvocationFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionInvocationFunctionService method instead.

func NewFunctionInvocationFunctionService

func NewFunctionInvocationFunctionService(opts ...option.RequestOption) (r *FunctionInvocationFunctionService)

NewFunctionInvocationFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FunctionInvocationFunctionService) Invoke

Invokes the specified function that was successfully deployed. If the version is not specified, any active function versions will handle the request. If the version is specified in the URI, then the request is exclusively processed by the designated version of the function. By default, this endpoint will block for 5 seconds. If the request is not fulfilled before the timeout, it's status is considered in-progress or pending and the response includes HTTP status code 202 with an invocation request ID, indicating that the client should commence polling for the result using the invocation request ID. Access to this endpoint mandates inclusion of either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header. Additionally, this endpoint has the capability to provide updates on the progress of the request, contingent upon the workload's provision of such information. In-progress responses are returned in order. If no in-progress response is received during polling you will receive the most recent in-progress response. Only the first 256 unread in-progress messages are kept.

type FunctionInvocationFunctionVersionInvokeParams

type FunctionInvocationFunctionVersionInvokeParams struct {
	Body                     interface{}           `json:"body,required"`
	NvcfInputAssetReferences param.Field[[]string] `header:"NVCF-INPUT-ASSET-REFERENCES"`
	NvcfPollSeconds          param.Field[int64]    `header:"NVCF-POLL-SECONDS"`
}

func (FunctionInvocationFunctionVersionInvokeParams) MarshalJSON

func (r FunctionInvocationFunctionVersionInvokeParams) MarshalJSON() (data []byte, err error)

type FunctionInvocationFunctionVersionInvokeResponse

type FunctionInvocationFunctionVersionInvokeResponse struct {
	Char     string                                              `json:"char"`
	Direct   bool                                                `json:"direct"`
	Double   float64                                             `json:"double"`
	Float    float64                                             `json:"float"`
	Int      int64                                               `json:"int"`
	Long     int64                                               `json:"long"`
	ReadOnly bool                                                `json:"readOnly"`
	Short    int64                                               `json:"short"`
	JSON     functionInvocationFunctionVersionInvokeResponseJSON `json:"-"`
}

func (*FunctionInvocationFunctionVersionInvokeResponse) UnmarshalJSON

func (r *FunctionInvocationFunctionVersionInvokeResponse) UnmarshalJSON(data []byte) (err error)

type FunctionInvocationFunctionVersionService

type FunctionInvocationFunctionVersionService struct {
	Options []option.RequestOption
}

FunctionInvocationFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionInvocationFunctionVersionService method instead.

func NewFunctionInvocationFunctionVersionService

func NewFunctionInvocationFunctionVersionService(opts ...option.RequestOption) (r *FunctionInvocationFunctionVersionService)

NewFunctionInvocationFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FunctionInvocationFunctionVersionService) Invoke

Invokes the specified function that was successfully deployed. If the version is not specified, any active function versions will handle the request. If the version is specified in the URI, then the request is exclusively processed by the designated version of the function. By default, this endpoint will block for 5 seconds. If the request is not fulfilled before the timeout, it's status is considered in-progress or pending and the response includes HTTP status code 202 with an invocation request ID, indicating that the client should commence polling for the result using the invocation request ID. Access to this endpoint mandates inclusion of either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header. Additionally, this endpoint has the capability to provide updates on the progress of the request, contingent upon the workload's provision of such information. In-progress responses are returned in order. If no in-progress response is received during polling you will receive the most recent in-progress response. Only the first 256 unread in-progress messages are kept.

type FunctionInvocationService

type FunctionInvocationService struct {
	Options   []option.RequestOption
	Functions *FunctionInvocationFunctionService
}

FunctionInvocationService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionInvocationService method instead.

func NewFunctionInvocationService

func NewFunctionInvocationService(opts ...option.RequestOption) (r *FunctionInvocationService)

NewFunctionInvocationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type FunctionManagementFunctionIDListParams

type FunctionManagementFunctionIDListParams struct {
	// Query param 'visibility' indicates the kind of functions to be included in the
	// response.
	Visibility param.Field[[]FunctionManagementFunctionIDListParamsVisibility] `query:"visibility"`
}

func (FunctionManagementFunctionIDListParams) URLQuery

URLQuery serializes FunctionManagementFunctionIDListParams's query parameters as `url.Values`.

type FunctionManagementFunctionIDListParamsVisibility

type FunctionManagementFunctionIDListParamsVisibility string
const (
	FunctionManagementFunctionIDListParamsVisibilityAuthorized FunctionManagementFunctionIDListParamsVisibility = "authorized"
	FunctionManagementFunctionIDListParamsVisibilityPrivate    FunctionManagementFunctionIDListParamsVisibility = "private"
	FunctionManagementFunctionIDListParamsVisibilityPublic     FunctionManagementFunctionIDListParamsVisibility = "public"
)

func (FunctionManagementFunctionIDListParamsVisibility) IsKnown

type FunctionManagementFunctionIDService

type FunctionManagementFunctionIDService struct {
	Options []option.RequestOption
}

FunctionManagementFunctionIDService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionManagementFunctionIDService method instead.

func NewFunctionManagementFunctionIDService

func NewFunctionManagementFunctionIDService(opts ...option.RequestOption) (r *FunctionManagementFunctionIDService)

NewFunctionManagementFunctionIDService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FunctionManagementFunctionIDService) List

Lists ids of all the functions 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.

type FunctionManagementFunctionService

type FunctionManagementFunctionService struct {
	Options  []option.RequestOption
	Versions *FunctionManagementFunctionVersionService
	IDs      *FunctionManagementFunctionIDService
}

FunctionManagementFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionManagementFunctionService method instead.

func NewFunctionManagementFunctionService

func NewFunctionManagementFunctionService(opts ...option.RequestOption) (r *FunctionManagementFunctionService)

NewFunctionManagementFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type FunctionManagementFunctionVersionService

type FunctionManagementFunctionVersionService struct {
	Options []option.RequestOption
}

FunctionManagementFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionManagementFunctionVersionService method instead.

func NewFunctionManagementFunctionVersionService

func NewFunctionManagementFunctionVersionService(opts ...option.RequestOption) (r *FunctionManagementFunctionVersionService)

NewFunctionManagementFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*FunctionManagementFunctionVersionService) Delete

func (r *FunctionManagementFunctionVersionService) Delete(ctx context.Context, functionID string, functionVersionID string, opts ...option.RequestOption) (err error)

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.

func (*FunctionManagementFunctionVersionService) Get

func (r *FunctionManagementFunctionVersionService) Get(ctx context.Context, functionID string, functionVersionID string, opts ...option.RequestOption) (res *shared.FunctionResponse, err error)

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.

func (*FunctionManagementFunctionVersionService) Update

Updates metadata, such as tags, of the specified function version within the authenticated NVIDIA Cloud Account. Values specified in the payload completely override the existing values. Requires a bearer token with 'update_function' scope in the HTTP Authorization header.

type FunctionManagementFunctionVersionUpdateParams

type FunctionManagementFunctionVersionUpdateParams struct {
	// Set of tags provided by user
	Tags param.Field[[]string] `json:"tags"`
}

func (FunctionManagementFunctionVersionUpdateParams) MarshalJSON

func (r FunctionManagementFunctionVersionUpdateParams) MarshalJSON() (data []byte, err error)

type FunctionManagementService

type FunctionManagementService struct {
	Options   []option.RequestOption
	Functions *FunctionManagementFunctionService
}

FunctionManagementService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFunctionManagementService method instead.

func NewFunctionManagementService

func NewFunctionManagementService(opts ...option.RequestOption) (r *FunctionManagementService)

NewFunctionManagementService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type FunctionResponse

type FunctionResponse = shared.FunctionResponse

Response body with function details

This is an alias to an internal type.

type FunctionResponseFunction

type FunctionResponseFunction = shared.FunctionResponseFunction

Data Transfer Object (DTO) representing a function

This is an alias to an internal type.

type FunctionResponseFunctionAPIBodyFormat

type FunctionResponseFunctionAPIBodyFormat = shared.FunctionResponseFunctionAPIBodyFormat

Invocation request body format

This is an alias to an internal type.

type FunctionResponseFunctionActiveInstance

type FunctionResponseFunctionActiveInstance = shared.FunctionResponseFunctionActiveInstance

Data Transfer Object(DTO) representing a spot instance

This is an alias to an internal type.

type FunctionResponseFunctionActiveInstancesInstanceStatus

type FunctionResponseFunctionActiveInstancesInstanceStatus = shared.FunctionResponseFunctionActiveInstancesInstanceStatus

Instance status

This is an alias to an internal type.

type FunctionResponseFunctionContainerEnvironment

type FunctionResponseFunctionContainerEnvironment = shared.FunctionResponseFunctionContainerEnvironment

Data Transfer Object(DTO) representing a container environment entry

This is an alias to an internal type.

type FunctionResponseFunctionFunctionType

type FunctionResponseFunctionFunctionType = shared.FunctionResponseFunctionFunctionType

Used to indicate a STREAMING function. Defaults to DEFAULT.

This is an alias to an internal type.

type FunctionResponseFunctionHealth

type FunctionResponseFunctionHealth = shared.FunctionResponseFunctionHealth

Data Transfer Object(DTO) representing a function ne

This is an alias to an internal type.

type FunctionResponseFunctionHealthProtocol

type FunctionResponseFunctionHealthProtocol = shared.FunctionResponseFunctionHealthProtocol

HTTP/gPRC protocol type for health endpoint

This is an alias to an internal type.

type FunctionResponseFunctionModel

type FunctionResponseFunctionModel = shared.FunctionResponseFunctionModel

Data Transfer Object(DTO) representing an artifact

This is an alias to an internal type.

type FunctionResponseFunctionResource

type FunctionResponseFunctionResource = shared.FunctionResponseFunctionResource

Data Transfer Object(DTO) representing an artifact

This is an alias to an internal type.

type FunctionResponseFunctionStatus

type FunctionResponseFunctionStatus = shared.FunctionResponseFunctionStatus

Function status

This is an alias to an internal type.

type GetPositionInQueueResponse

type GetPositionInQueueResponse struct {
	// Function id
	FunctionID string `json:"functionId,required" format:"uuid"`
	// Function version id
	FunctionVersionID string `json:"functionVersionId,required" format:"uuid"`
	// Position of request in queue
	PositionInQueue int64                          `json:"positionInQueue"`
	JSON            getPositionInQueueResponseJSON `json:"-"`
}

Request position in queue for invocation request

func (*GetPositionInQueueResponse) UnmarshalJSON

func (r *GetPositionInQueueResponse) UnmarshalJSON(data []byte) (err error)

type GetQueuesResponse

type GetQueuesResponse = shared.GetQueuesResponse

Request queue details of all the functions with same id in an account

This is an alias to an internal type.

type GetQueuesResponseQueue

type GetQueuesResponseQueue = shared.GetQueuesResponseQueue

Data Transfer Object(DTO) representing a request queue for function version

This is an alias to an internal type.

type GetQueuesResponseQueuesFunctionStatus

type GetQueuesResponseQueuesFunctionStatus = shared.GetQueuesResponseQueuesFunctionStatus

Function status

This is an alias to an internal type.

type InvokeFunctionResponse

type InvokeFunctionResponse = shared.InvokeFunctionResponse

Response body with result from a request for executing a job/task as a cloud function using a GPU powered spot/on-demand instance.

This is an alias to an internal type.

type InvokeFunctionResponseStatus

type InvokeFunctionResponseStatus = shared.InvokeFunctionResponseStatus

Status of the task/job executing cloud function.

This is an alias to an internal type.

type ListAssetsResponse

type ListAssetsResponse struct {
	// List of assets uploaded for the nca id
	Assets []ListAssetsResponseAsset `json:"assets"`
	JSON   listAssetsResponseJSON    `json:"-"`
}

Response body containing list of assets of the current nca id

func (*ListAssetsResponse) UnmarshalJSON

func (r *ListAssetsResponse) UnmarshalJSON(data []byte) (err error)

type ListAssetsResponseAsset

type ListAssetsResponseAsset struct {
	// Asset id
	AssetID string `json:"assetId" format:"uuid"`
	// Content-type specified when creating the asset
	ContentType string `json:"contentType"`
	// Description specified when creating the asset
	Description string                      `json:"description"`
	JSON        listAssetsResponseAssetJSON `json:"-"`
}

Data Transfer Object(DTO) representing an asset

func (*ListAssetsResponseAsset) UnmarshalJSON

func (r *ListAssetsResponseAsset) UnmarshalJSON(data []byte) (err error)

type ListAuthorizedPartiesResponse

type ListAuthorizedPartiesResponse struct {
	// Functions with authorized parties and other details
	Functions []ListAuthorizedPartiesResponseFunction `json:"functions,required"`
	JSON      listAuthorizedPartiesResponseJSON       `json:"-"`
}

Parties authorized to invoke function

func (*ListAuthorizedPartiesResponse) UnmarshalJSON

func (r *ListAuthorizedPartiesResponse) UnmarshalJSON(data []byte) (err error)

type ListAuthorizedPartiesResponseFunction

type ListAuthorizedPartiesResponseFunction struct {
	// Function id
	ID string `json:"id,required" format:"uuid"`
	// NVIDIA Cloud Account Id
	NcaID string `json:"ncaId,required"`
	// Authorized parties allowed to invoke the function
	AuthorizedParties []ListAuthorizedPartiesResponseFunctionsAuthorizedParty `json:"authorizedParties"`
	// Function version id
	VersionID string                                    `json:"versionId" format:"uuid"`
	JSON      listAuthorizedPartiesResponseFunctionJSON `json:"-"`
}

Data Transfer Object(DTO) representing a function with authorized accounts

func (*ListAuthorizedPartiesResponseFunction) UnmarshalJSON

func (r *ListAuthorizedPartiesResponseFunction) UnmarshalJSON(data []byte) (err error)

type ListAuthorizedPartiesResponseFunctionsAuthorizedParty

type ListAuthorizedPartiesResponseFunctionsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID string `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID string                                                    `json:"clientId"`
	JSON     listAuthorizedPartiesResponseFunctionsAuthorizedPartyJSON `json:"-"`
}

Data Transfer Object(DTO) representing an authorized party.

func (*ListAuthorizedPartiesResponseFunctionsAuthorizedParty) UnmarshalJSON

func (r *ListAuthorizedPartiesResponseFunctionsAuthorizedParty) UnmarshalJSON(data []byte) (err error)

type ListFunctionIDsResponse

type ListFunctionIDsResponse struct {
	// List of function ids
	FunctionIDs []string                    `json:"functionIds,required" format:"uuid"`
	JSON        listFunctionIDsResponseJSON `json:"-"`
}

Response body containing list of function ids in an account

func (*ListFunctionIDsResponse) UnmarshalJSON

func (r *ListFunctionIDsResponse) UnmarshalJSON(data []byte) (err error)

type ListFunctionsResponse

type ListFunctionsResponse = shared.ListFunctionsResponse

Response body containing list of functions

This is an alias to an internal type.

type ListFunctionsResponseFunction

type ListFunctionsResponseFunction = shared.ListFunctionsResponseFunction

Data Transfer Object (DTO) representing a function

This is an alias to an internal type.

type ListFunctionsResponseFunctionsAPIBodyFormat

type ListFunctionsResponseFunctionsAPIBodyFormat = shared.ListFunctionsResponseFunctionsAPIBodyFormat

Invocation request body format

This is an alias to an internal type.

type ListFunctionsResponseFunctionsActiveInstance

type ListFunctionsResponseFunctionsActiveInstance = shared.ListFunctionsResponseFunctionsActiveInstance

Data Transfer Object(DTO) representing a spot instance

This is an alias to an internal type.

type ListFunctionsResponseFunctionsActiveInstancesInstanceStatus

type ListFunctionsResponseFunctionsActiveInstancesInstanceStatus = shared.ListFunctionsResponseFunctionsActiveInstancesInstanceStatus

Instance status

This is an alias to an internal type.

type ListFunctionsResponseFunctionsContainerEnvironment

type ListFunctionsResponseFunctionsContainerEnvironment = shared.ListFunctionsResponseFunctionsContainerEnvironment

Data Transfer Object(DTO) representing a container environment entry

This is an alias to an internal type.

type ListFunctionsResponseFunctionsFunctionType

type ListFunctionsResponseFunctionsFunctionType = shared.ListFunctionsResponseFunctionsFunctionType

Used to indicate a STREAMING function. Defaults to DEFAULT.

This is an alias to an internal type.

type ListFunctionsResponseFunctionsHealth

type ListFunctionsResponseFunctionsHealth = shared.ListFunctionsResponseFunctionsHealth

Data Transfer Object(DTO) representing a function ne

This is an alias to an internal type.

type ListFunctionsResponseFunctionsHealthProtocol

type ListFunctionsResponseFunctionsHealthProtocol = shared.ListFunctionsResponseFunctionsHealthProtocol

HTTP/gPRC protocol type for health endpoint

This is an alias to an internal type.

type ListFunctionsResponseFunctionsModel

type ListFunctionsResponseFunctionsModel = shared.ListFunctionsResponseFunctionsModel

Data Transfer Object(DTO) representing an artifact

This is an alias to an internal type.

type ListFunctionsResponseFunctionsResource

type ListFunctionsResponseFunctionsResource = shared.ListFunctionsResponseFunctionsResource

Data Transfer Object(DTO) representing an artifact

This is an alias to an internal type.

type ListFunctionsResponseFunctionsStatus

type ListFunctionsResponseFunctionsStatus = shared.ListFunctionsResponseFunctionsStatus

Function status

This is an alias to an internal type.

type NvcfAuthorizationFunctionAuthorizeParams

type NvcfAuthorizationFunctionAuthorizeParams struct {
	// Parties authorized to invoke function
	AuthorizedParties param.Field[[]NvcfAuthorizationFunctionAuthorizeParamsAuthorizedParty] `json:"authorizedParties,required"`
}

func (NvcfAuthorizationFunctionAuthorizeParams) MarshalJSON

func (r NvcfAuthorizationFunctionAuthorizeParams) MarshalJSON() (data []byte, err error)

type NvcfAuthorizationFunctionAuthorizeParamsAuthorizedParty

type NvcfAuthorizationFunctionAuthorizeParamsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID param.Field[string] `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID param.Field[string] `json:"clientId"`
}

Data Transfer Object(DTO) representing an authorized party.

func (NvcfAuthorizationFunctionAuthorizeParamsAuthorizedParty) MarshalJSON

type NvcfAuthorizationFunctionService

type NvcfAuthorizationFunctionService struct {
	Options  []option.RequestOption
	Versions *NvcfAuthorizationFunctionVersionService
}

NvcfAuthorizationFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNvcfAuthorizationFunctionService method instead.

func NewNvcfAuthorizationFunctionService

func NewNvcfAuthorizationFunctionService(opts ...option.RequestOption) (r *NvcfAuthorizationFunctionService)

NewNvcfAuthorizationFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NvcfAuthorizationFunctionService) Authorize

Authorizes additional NVIDIA Cloud Accounts to invoke any version of the specified function. By default, a function belongs to the NVIDIA Cloud Account that created it, and the credentials used for function invocation must reference the same NVIDIA Cloud Account. Upon invocation of this endpoint, any existing authorized accounts will be overwritten by the newly specified authorized accounts. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

func (*NvcfAuthorizationFunctionService) Delete

Deletes all the extra NVIDIA Cloud Accounts that were authorized to invoke the function and all its versions. If a function version has its own set of authorized accounts, those are not deleted. If the specified function is public, then Account Admin cannot perform this operation. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

func (*NvcfAuthorizationFunctionService) List

Lists NVIDIA Cloud Account IDs that are authorized to invoke any version of the specified function. The response includes an array showing authorized accounts for each version. Individual versions of a function can have their own authorized accounts. So, each object in the array can have different authorized accounts listed. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

type NvcfAuthorizationFunctionVersionAuthorizeParams

type NvcfAuthorizationFunctionVersionAuthorizeParams struct {
	// Parties authorized to invoke function
	AuthorizedParties param.Field[[]NvcfAuthorizationFunctionVersionAuthorizeParamsAuthorizedParty] `json:"authorizedParties,required"`
}

func (NvcfAuthorizationFunctionVersionAuthorizeParams) MarshalJSON

func (r NvcfAuthorizationFunctionVersionAuthorizeParams) MarshalJSON() (data []byte, err error)

type NvcfAuthorizationFunctionVersionAuthorizeParamsAuthorizedParty

type NvcfAuthorizationFunctionVersionAuthorizeParamsAuthorizedParty struct {
	// NVIDIA Cloud Account authorized to invoke the function
	NcaID param.Field[string] `json:"ncaId,required"`
	// Client Id -- 'sub' claim in the JWT. This field should not be specified anymore.
	ClientID param.Field[string] `json:"clientId"`
}

Data Transfer Object(DTO) representing an authorized party.

func (NvcfAuthorizationFunctionVersionAuthorizeParamsAuthorizedParty) MarshalJSON

type NvcfAuthorizationFunctionVersionService

type NvcfAuthorizationFunctionVersionService struct {
	Options []option.RequestOption
}

NvcfAuthorizationFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNvcfAuthorizationFunctionVersionService method instead.

func NewNvcfAuthorizationFunctionVersionService

func NewNvcfAuthorizationFunctionVersionService(opts ...option.RequestOption) (r *NvcfAuthorizationFunctionVersionService)

NewNvcfAuthorizationFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NvcfAuthorizationFunctionVersionService) Authorize

Authorizes additional NVIDIA Cloud Accounts to invoke a specific function version. By default, a function belongs to the NVIDIA Cloud Account that created it, and the credentials used for function invocation must reference the same NVIDIA Cloud Account. Upon invocation of this endpoint, any existing authorized accounts will be overwritten by the newly specified authorized accounts. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

func (*NvcfAuthorizationFunctionVersionService) Delete

func (r *NvcfAuthorizationFunctionVersionService) Delete(ctx context.Context, functionID string, functionVersionID string, opts ...option.RequestOption) (res *shared.AuthorizedPartiesResponse, err error)

Deletes all the authorized accounts that are directly associated with the specified function version. Authorized parties that are inherited by the function version are not deleted. If the specified function version is public, then Account Admin cannot perform this operation. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

func (*NvcfAuthorizationFunctionVersionService) Get

func (r *NvcfAuthorizationFunctionVersionService) Get(ctx context.Context, functionID string, functionVersionID string, opts ...option.RequestOption) (res *shared.AuthorizedPartiesResponse, err error)

Gets NVIDIA Cloud Account IDs that are authorized to invoke specified function version. Response includes authorized accounts that were added specifically to the function version and the inherited authorized accounts that were added at the function level. Access to this functionality mandates the inclusion of a bearer token with the 'authorize_clients' scope in the HTTP Authorization header

type NvcfAuthorizationService

type NvcfAuthorizationService struct {
	Options   []option.RequestOption
	Functions *NvcfAuthorizationFunctionService
}

NvcfAuthorizationService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNvcfAuthorizationService method instead.

func NewNvcfAuthorizationService

func NewNvcfAuthorizationService(opts ...option.RequestOption) (r *NvcfAuthorizationService)

NewNvcfAuthorizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type NvcfFunctionListParams

type NvcfFunctionListParams struct {
	// Query param 'visibility' indicates the kind of functions to be included in the
	// response.
	Visibility param.Field[[]NvcfFunctionListParamsVisibility] `query:"visibility"`
}

func (NvcfFunctionListParams) URLQuery

func (r NvcfFunctionListParams) URLQuery() (v url.Values)

URLQuery serializes NvcfFunctionListParams's query parameters as `url.Values`.

type NvcfFunctionListParamsVisibility

type NvcfFunctionListParamsVisibility string
const (
	NvcfFunctionListParamsVisibilityAuthorized NvcfFunctionListParamsVisibility = "authorized"
	NvcfFunctionListParamsVisibilityPrivate    NvcfFunctionListParamsVisibility = "private"
	NvcfFunctionListParamsVisibilityPublic     NvcfFunctionListParamsVisibility = "public"
)

func (NvcfFunctionListParamsVisibility) IsKnown

type NvcfFunctionNewParams

type NvcfFunctionNewParams struct {
	// Entrypoint for invoking the container to process a request
	InferenceURL param.Field[string] `json:"inferenceUrl,required" format:"uri"`
	// Function name must start with lowercase/uppercase/digit and can only contain
	// lowercase, uppercase, digit, hyphen, and underscore characters
	Name param.Field[string] `json:"name,required"`
	// Invocation request body format
	APIBodyFormat param.Field[NvcfFunctionNewParamsAPIBodyFormat] `json:"apiBodyFormat"`
	// Args to be passed when launching the container
	ContainerArgs param.Field[string] `json:"containerArgs"`
	// Environment settings for launching the container
	ContainerEnvironment param.Field[[]NvcfFunctionNewParamsContainerEnvironment] `json:"containerEnvironment"`
	// Optional custom container image
	ContainerImage param.Field[string] `json:"containerImage" format:"uri"`
	// Optional function/version description
	Description param.Field[string] `json:"description"`
	// Optional function type, used to indicate a STREAMING function. Defaults to
	// DEFAULT.
	FunctionType param.Field[NvcfFunctionNewParamsFunctionType] `json:"functionType"`
	// Data Transfer Object(DTO) representing a function ne
	Health param.Field[NvcfFunctionNewParamsHealth] `json:"health"`
	// Health endpoint for the container or the helmChart
	HealthUri param.Field[string] `json:"healthUri" format:"uri"`
	// Optional Helm Chart
	HelmChart param.Field[string] `json:"helmChart" format:"uri"`
	// Helm Chart Service Name is required when helmChart property is specified
	HelmChartServiceName param.Field[string] `json:"helmChartServiceName"`
	// Optional port number where the inference listener is running. Defaults to 8000
	// for Triton.
	InferencePort param.Field[int64] `json:"inferencePort"`
	// Optional set of models
	Models param.Field[[]NvcfFunctionNewParamsModel] `json:"models"`
	// Optional set of resources
	Resources param.Field[[]NvcfFunctionNewParamsResource] `json:"resources"`
	// Optional secrets
	Secrets param.Field[[]NvcfFunctionNewParamsSecret] `json:"secrets"`
	// Optional set of tags - could be empty. Provided by user
	Tags param.Field[[]string] `json:"tags"`
}

func (NvcfFunctionNewParams) MarshalJSON

func (r NvcfFunctionNewParams) MarshalJSON() (data []byte, err error)

type NvcfFunctionNewParamsAPIBodyFormat

type NvcfFunctionNewParamsAPIBodyFormat string

Invocation request body format

const (
	NvcfFunctionNewParamsAPIBodyFormatPredictV2 NvcfFunctionNewParamsAPIBodyFormat = "PREDICT_V2"
	NvcfFunctionNewParamsAPIBodyFormatCustom    NvcfFunctionNewParamsAPIBodyFormat = "CUSTOM"
)

func (NvcfFunctionNewParamsAPIBodyFormat) IsKnown

type NvcfFunctionNewParamsContainerEnvironment

type NvcfFunctionNewParamsContainerEnvironment struct {
	// Container environment key
	Key param.Field[string] `json:"key,required"`
	// Container environment value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing a container environment entry

func (NvcfFunctionNewParamsContainerEnvironment) MarshalJSON

func (r NvcfFunctionNewParamsContainerEnvironment) MarshalJSON() (data []byte, err error)

type NvcfFunctionNewParamsFunctionType

type NvcfFunctionNewParamsFunctionType string

Optional function type, used to indicate a STREAMING function. Defaults to DEFAULT.

const (
	NvcfFunctionNewParamsFunctionTypeDefault   NvcfFunctionNewParamsFunctionType = "DEFAULT"
	NvcfFunctionNewParamsFunctionTypeStreaming NvcfFunctionNewParamsFunctionType = "STREAMING"
)

func (NvcfFunctionNewParamsFunctionType) IsKnown

type NvcfFunctionNewParamsHealth

type NvcfFunctionNewParamsHealth struct {
	// Expected return status code considered as successful.
	ExpectedStatusCode param.Field[int64] `json:"expectedStatusCode,required"`
	// Port number where the health listener is running
	Port param.Field[int64] `json:"port,required"`
	// HTTP/gPRC protocol type for health endpoint
	Protocol param.Field[NvcfFunctionNewParamsHealthProtocol] `json:"protocol,required"`
	// ISO 8601 duration string in PnDTnHnMn.nS format
	Timeout param.Field[string] `json:"timeout,required" format:"PnDTnHnMn.nS"`
	// Health endpoint for the container or the helmChart
	Uri param.Field[string] `json:"uri,required" format:"uri"`
}

Data Transfer Object(DTO) representing a function ne

func (NvcfFunctionNewParamsHealth) MarshalJSON

func (r NvcfFunctionNewParamsHealth) MarshalJSON() (data []byte, err error)

type NvcfFunctionNewParamsHealthProtocol

type NvcfFunctionNewParamsHealthProtocol string

HTTP/gPRC protocol type for health endpoint

const (
	NvcfFunctionNewParamsHealthProtocolHTTP NvcfFunctionNewParamsHealthProtocol = "HTTP"
	NvcfFunctionNewParamsHealthProtocolGRpc NvcfFunctionNewParamsHealthProtocol = "gRPC"
)

func (NvcfFunctionNewParamsHealthProtocol) IsKnown

type NvcfFunctionNewParamsModel

type NvcfFunctionNewParamsModel struct {
	// Artifact name
	Name param.Field[string] `json:"name,required"`
	// Artifact URI
	Uri param.Field[string] `json:"uri,required" format:"uri"`
	// Artifact version
	Version param.Field[string] `json:"version,required"`
}

Data Transfer Object(DTO) representing an artifact

func (NvcfFunctionNewParamsModel) MarshalJSON

func (r NvcfFunctionNewParamsModel) MarshalJSON() (data []byte, err error)

type NvcfFunctionNewParamsResource

type NvcfFunctionNewParamsResource struct {
	// Artifact name
	Name param.Field[string] `json:"name,required"`
	// Artifact URI
	Uri param.Field[string] `json:"uri,required" format:"uri"`
	// Artifact version
	Version param.Field[string] `json:"version,required"`
}

Data Transfer Object(DTO) representing an artifact

func (NvcfFunctionNewParamsResource) MarshalJSON

func (r NvcfFunctionNewParamsResource) MarshalJSON() (data []byte, err error)

type NvcfFunctionNewParamsSecret

type NvcfFunctionNewParamsSecret struct {
	// Secret name
	Name param.Field[string] `json:"name,required"`
	// Secret value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing secret name/value pair

func (NvcfFunctionNewParamsSecret) MarshalJSON

func (r NvcfFunctionNewParamsSecret) MarshalJSON() (data []byte, err error)

type NvcfFunctionService

type NvcfFunctionService struct {
	Options  []option.RequestOption
	Versions *NvcfFunctionVersionService
}

NvcfFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNvcfFunctionService method instead.

func NewNvcfFunctionService

func NewNvcfFunctionService(opts ...option.RequestOption) (r *NvcfFunctionService)

NewNvcfFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NvcfFunctionService) List

Lists all the functions associated with 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.

func (*NvcfFunctionService) New

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

type NvcfFunctionVersionNewParams

type NvcfFunctionVersionNewParams struct {
	// Entrypoint for invoking the container to process a request
	InferenceURL param.Field[string] `json:"inferenceUrl,required" format:"uri"`
	// Function name must start with lowercase/uppercase/digit and can only contain
	// lowercase, uppercase, digit, hyphen, and underscore characters
	Name param.Field[string] `json:"name,required"`
	// Invocation request body format
	APIBodyFormat param.Field[NvcfFunctionVersionNewParamsAPIBodyFormat] `json:"apiBodyFormat"`
	// Args to be passed when launching the container
	ContainerArgs param.Field[string] `json:"containerArgs"`
	// Environment settings for launching the container
	ContainerEnvironment param.Field[[]NvcfFunctionVersionNewParamsContainerEnvironment] `json:"containerEnvironment"`
	// Optional custom container image
	ContainerImage param.Field[string] `json:"containerImage" format:"uri"`
	// Optional function/version description
	Description param.Field[string] `json:"description"`
	// Optional function type, used to indicate a STREAMING function. Defaults to
	// DEFAULT.
	FunctionType param.Field[NvcfFunctionVersionNewParamsFunctionType] `json:"functionType"`
	// Data Transfer Object(DTO) representing a function ne
	Health param.Field[NvcfFunctionVersionNewParamsHealth] `json:"health"`
	// Health endpoint for the container or the helmChart
	HealthUri param.Field[string] `json:"healthUri" format:"uri"`
	// Optional Helm Chart
	HelmChart param.Field[string] `json:"helmChart" format:"uri"`
	// Helm Chart Service Name is required when helmChart property is specified
	HelmChartServiceName param.Field[string] `json:"helmChartServiceName"`
	// Optional port number where the inference listener is running. Defaults to 8000
	// for Triton.
	InferencePort param.Field[int64] `json:"inferencePort"`
	// Optional set of models
	Models param.Field[[]NvcfFunctionVersionNewParamsModel] `json:"models"`
	// Optional set of resources
	Resources param.Field[[]NvcfFunctionVersionNewParamsResource] `json:"resources"`
	// Optional secrets
	Secrets param.Field[[]NvcfFunctionVersionNewParamsSecret] `json:"secrets"`
	// Optional set of tags - could be empty. Provided by user
	Tags param.Field[[]string] `json:"tags"`
}

func (NvcfFunctionVersionNewParams) MarshalJSON

func (r NvcfFunctionVersionNewParams) MarshalJSON() (data []byte, err error)

type NvcfFunctionVersionNewParamsAPIBodyFormat

type NvcfFunctionVersionNewParamsAPIBodyFormat string

Invocation request body format

const (
	NvcfFunctionVersionNewParamsAPIBodyFormatPredictV2 NvcfFunctionVersionNewParamsAPIBodyFormat = "PREDICT_V2"
	NvcfFunctionVersionNewParamsAPIBodyFormatCustom    NvcfFunctionVersionNewParamsAPIBodyFormat = "CUSTOM"
)

func (NvcfFunctionVersionNewParamsAPIBodyFormat) IsKnown

type NvcfFunctionVersionNewParamsContainerEnvironment

type NvcfFunctionVersionNewParamsContainerEnvironment struct {
	// Container environment key
	Key param.Field[string] `json:"key,required"`
	// Container environment value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing a container environment entry

func (NvcfFunctionVersionNewParamsContainerEnvironment) MarshalJSON

func (r NvcfFunctionVersionNewParamsContainerEnvironment) MarshalJSON() (data []byte, err error)

type NvcfFunctionVersionNewParamsFunctionType

type NvcfFunctionVersionNewParamsFunctionType string

Optional function type, used to indicate a STREAMING function. Defaults to DEFAULT.

const (
	NvcfFunctionVersionNewParamsFunctionTypeDefault   NvcfFunctionVersionNewParamsFunctionType = "DEFAULT"
	NvcfFunctionVersionNewParamsFunctionTypeStreaming NvcfFunctionVersionNewParamsFunctionType = "STREAMING"
)

func (NvcfFunctionVersionNewParamsFunctionType) IsKnown

type NvcfFunctionVersionNewParamsHealth

type NvcfFunctionVersionNewParamsHealth struct {
	// Expected return status code considered as successful.
	ExpectedStatusCode param.Field[int64] `json:"expectedStatusCode,required"`
	// Port number where the health listener is running
	Port param.Field[int64] `json:"port,required"`
	// HTTP/gPRC protocol type for health endpoint
	Protocol param.Field[NvcfFunctionVersionNewParamsHealthProtocol] `json:"protocol,required"`
	// ISO 8601 duration string in PnDTnHnMn.nS format
	Timeout param.Field[string] `json:"timeout,required" format:"PnDTnHnMn.nS"`
	// Health endpoint for the container or the helmChart
	Uri param.Field[string] `json:"uri,required" format:"uri"`
}

Data Transfer Object(DTO) representing a function ne

func (NvcfFunctionVersionNewParamsHealth) MarshalJSON

func (r NvcfFunctionVersionNewParamsHealth) MarshalJSON() (data []byte, err error)

type NvcfFunctionVersionNewParamsHealthProtocol

type NvcfFunctionVersionNewParamsHealthProtocol string

HTTP/gPRC protocol type for health endpoint

const (
	NvcfFunctionVersionNewParamsHealthProtocolHTTP NvcfFunctionVersionNewParamsHealthProtocol = "HTTP"
	NvcfFunctionVersionNewParamsHealthProtocolGRpc NvcfFunctionVersionNewParamsHealthProtocol = "gRPC"
)

func (NvcfFunctionVersionNewParamsHealthProtocol) IsKnown

type NvcfFunctionVersionNewParamsModel

type NvcfFunctionVersionNewParamsModel struct {
	// Artifact name
	Name param.Field[string] `json:"name,required"`
	// Artifact URI
	Uri param.Field[string] `json:"uri,required" format:"uri"`
	// Artifact version
	Version param.Field[string] `json:"version,required"`
}

Data Transfer Object(DTO) representing an artifact

func (NvcfFunctionVersionNewParamsModel) MarshalJSON

func (r NvcfFunctionVersionNewParamsModel) MarshalJSON() (data []byte, err error)

type NvcfFunctionVersionNewParamsResource

type NvcfFunctionVersionNewParamsResource struct {
	// Artifact name
	Name param.Field[string] `json:"name,required"`
	// Artifact URI
	Uri param.Field[string] `json:"uri,required" format:"uri"`
	// Artifact version
	Version param.Field[string] `json:"version,required"`
}

Data Transfer Object(DTO) representing an artifact

func (NvcfFunctionVersionNewParamsResource) MarshalJSON

func (r NvcfFunctionVersionNewParamsResource) MarshalJSON() (data []byte, err error)

type NvcfFunctionVersionNewParamsSecret

type NvcfFunctionVersionNewParamsSecret struct {
	// Secret name
	Name param.Field[string] `json:"name,required"`
	// Secret value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing secret name/value pair

func (NvcfFunctionVersionNewParamsSecret) MarshalJSON

func (r NvcfFunctionVersionNewParamsSecret) MarshalJSON() (data []byte, err error)

type NvcfFunctionVersionService

type NvcfFunctionVersionService struct {
	Options []option.RequestOption
}

NvcfFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNvcfFunctionVersionService method instead.

func NewNvcfFunctionVersionService

func NewNvcfFunctionVersionService(opts ...option.RequestOption) (r *NvcfFunctionVersionService)

NewNvcfFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*NvcfFunctionVersionService) List

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.

func (*NvcfFunctionVersionService) New

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.

type NvcfService

type NvcfService struct {
	Options        []option.RequestOption
	Functions      *NvcfFunctionService
	Authorizations *NvcfAuthorizationService
}

NvcfService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewNvcfService method instead.

func NewNvcfService

func NewNvcfService(opts ...option.RequestOption) (r *NvcfService)

NewNvcfService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type PexecService

type PexecService struct {
	Options []option.RequestOption
	Status  *PexecStatusService
}

PexecService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPexecService method instead.

func NewPexecService

func NewPexecService(opts ...option.RequestOption) (r *PexecService)

NewPexecService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type PexecStatusGetParams

type PexecStatusGetParams struct {
	NvcfPollSeconds param.Field[int64] `header:"NVCF-POLL-SECONDS"`
}

type PexecStatusGetResponse

type PexecStatusGetResponse struct {
	Char     string                     `json:"char"`
	Direct   bool                       `json:"direct"`
	Double   float64                    `json:"double"`
	Float    float64                    `json:"float"`
	Int      int64                      `json:"int"`
	Long     int64                      `json:"long"`
	ReadOnly bool                       `json:"readOnly"`
	Short    int64                      `json:"short"`
	JSON     pexecStatusGetResponseJSON `json:"-"`
}

func (*PexecStatusGetResponse) UnmarshalJSON

func (r *PexecStatusGetResponse) UnmarshalJSON(data []byte) (err error)

type PexecStatusService

type PexecStatusService struct {
	Options []option.RequestOption
}

PexecStatusService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPexecStatusService method instead.

func NewPexecStatusService

func NewPexecStatusService(opts ...option.RequestOption) (r *PexecStatusService)

NewPexecStatusService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PexecStatusService) Get

Retrieves the status of an in-progress or pending request using its unique invocation request ID. If the result is available, it will be included in the response, marking the request as fulfilled. Conversely, if the result is not yet available, the request is deemed pending. Access to this endpoint mandates inclusion of either a bearer token or an api-key with 'invoke_function' scope in the HTTP Authorization header. In-progress responses are returned in order. If no in-progress response is received during polling you will receive the most recent in-progress response. Only the first 256 unread in-progress messages are kept.

type QueueFunctionService

type QueueFunctionService struct {
	Options  []option.RequestOption
	Versions *QueueFunctionVersionService
}

QueueFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQueueFunctionService method instead.

func NewQueueFunctionService

func NewQueueFunctionService(opts ...option.RequestOption) (r *QueueFunctionService)

NewQueueFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*QueueFunctionService) List

func (r *QueueFunctionService) List(ctx context.Context, functionID string, opts ...option.RequestOption) (res *shared.GetQueuesResponse, err error)

Provides details of all the queues associated with the specified function. If a function has multiple versions and they are all deployed, then the response includes details of all the queues. If the specified function is public, then Account Admin cannot perform this operation. Requires a bearer token or an api-key with 'queue_details' scope in the HTTP Authorization header.

type QueueFunctionVersionService

type QueueFunctionVersionService struct {
	Options []option.RequestOption
}

QueueFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQueueFunctionVersionService method instead.

func NewQueueFunctionVersionService

func NewQueueFunctionVersionService(opts ...option.RequestOption) (r *QueueFunctionVersionService)

NewQueueFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*QueueFunctionVersionService) List

func (r *QueueFunctionVersionService) List(ctx context.Context, functionID string, versionID string, opts ...option.RequestOption) (res *shared.GetQueuesResponse, err error)

Provides details of all the queues associated with the specified function. If a function has multiple versions and they are all deployed, then the response includes details of all the queues. If the specified function is public, then Account Admin cannot perform this operation. Requires a bearer token or an api-key with 'queue_details' scope in the HTTP Authorization header.

type QueuePositionService

type QueuePositionService struct {
	Options []option.RequestOption
}

QueuePositionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQueuePositionService method instead.

func NewQueuePositionService

func NewQueuePositionService(opts ...option.RequestOption) (r *QueuePositionService)

NewQueuePositionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*QueuePositionService) Get

func (r *QueuePositionService) Get(ctx context.Context, requestID string, opts ...option.RequestOption) (res *GetPositionInQueueResponse, err error)

Using the specified function invocation request id, returns the estimated position of the corresponding message up to 1000 in the queue. Requires a bearer token or an api-key with 'queue_details' scope in the HTTP Authorization header.

type QueueService

type QueueService struct {
	Options   []option.RequestOption
	Functions *QueueFunctionService
	Position  *QueuePositionService
}

QueueService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewQueueService method instead.

func NewQueueService

func NewQueueService(opts ...option.RequestOption) (r *QueueService)

NewQueueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type UserSecretManagementFunctionService

type UserSecretManagementFunctionService struct {
	Options  []option.RequestOption
	Versions *UserSecretManagementFunctionVersionService
}

UserSecretManagementFunctionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserSecretManagementFunctionService method instead.

func NewUserSecretManagementFunctionService

func NewUserSecretManagementFunctionService(opts ...option.RequestOption) (r *UserSecretManagementFunctionService)

NewUserSecretManagementFunctionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type UserSecretManagementFunctionVersionService

type UserSecretManagementFunctionVersionService struct {
	Options []option.RequestOption
}

UserSecretManagementFunctionVersionService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserSecretManagementFunctionVersionService method instead.

func NewUserSecretManagementFunctionVersionService

func NewUserSecretManagementFunctionVersionService(opts ...option.RequestOption) (r *UserSecretManagementFunctionVersionService)

NewUserSecretManagementFunctionVersionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserSecretManagementFunctionVersionService) Update

Updates secrets for the specified function version. This endpoint requires either a bearer token or an api-key with 'update_secrets' scope in the HTTP Authorization header.

type UserSecretManagementFunctionVersionUpdateParams

type UserSecretManagementFunctionVersionUpdateParams struct {
	// Secrets
	Secrets param.Field[[]UserSecretManagementFunctionVersionUpdateParamsSecret] `json:"secrets,required"`
}

func (UserSecretManagementFunctionVersionUpdateParams) MarshalJSON

func (r UserSecretManagementFunctionVersionUpdateParams) MarshalJSON() (data []byte, err error)

type UserSecretManagementFunctionVersionUpdateParamsSecret

type UserSecretManagementFunctionVersionUpdateParamsSecret struct {
	// Secret name
	Name param.Field[string] `json:"name,required"`
	// Secret value
	Value param.Field[string] `json:"value,required"`
}

Data Transfer Object(DTO) representing secret name/value pair

func (UserSecretManagementFunctionVersionUpdateParamsSecret) MarshalJSON

type UserSecretManagementService

type UserSecretManagementService struct {
	Options   []option.RequestOption
	Functions *UserSecretManagementFunctionService
}

UserSecretManagementService contains methods and other services that help with interacting with the nvidia-cloud-functions API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserSecretManagementService method instead.

func NewUserSecretManagementService

func NewUserSecretManagementService(opts ...option.RequestOption) (r *UserSecretManagementService)

NewUserSecretManagementService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL