nvcf

package module
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 15 Imported by: 5

README

Nvcf Go API Library

Go Reference

The Nvcf Go library provides convenient access to the Nvcf 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/tmc/nvcf-go" // imported as nvcf
)

Or to pin the version:

go get -u 'github.com/tmc/nvcf-go@v0.1.0-alpha.2'

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/tmc/nvcf-go"
)

func main() {
	client := nvcf.NewClient()
	createFunctionResponse, err := client.Functions.New(context.TODO(), nvcf.FunctionNewParams{
		InferenceURL: nvcf.F("https://example.com"),
		Name:         nvcf.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: nvcf.F("hello"),

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

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

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: nvcf.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 := nvcf.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.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 *nvcf.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.Functions.New(context.TODO(), nvcf.FunctionNewParams{
	InferenceURL: nvcf.F("https://example.com"),
	Name:         nvcf.F("x"),
})
if err != nil {
	var apierr *nvcf.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.Functions.New(
	ctx,
	nvcf.FunctionNewParams{
		InferenceURL: nvcf.F("https://example.com"),
		Name:         nvcf.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 nvcf.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 := nvcf.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Functions.New(
	context.TODO(),
	nvcf.FunctionNewParams{
		InferenceURL: nvcf.F("https://example.com"),
		Name:         nvcf.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:   nvcf.F("id_xxxx"),
    Data: nvcf.F(FooNewParamsData{
        FirstName: nvcf.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 := nvcf.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.

Documentation

Index

Constants

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.

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 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 nvcf 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) Delete

func (r *AssetService) 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 (*AssetService) Get

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

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 nvcf 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 nvcf 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 nvcf 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 AuthorizedAccountFunctionAuthorizeParams

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

func (AuthorizedAccountFunctionAuthorizeParams) MarshalJSON

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

type AuthorizedAccountFunctionAuthorizeParamsAuthorizedParty

type AuthorizedAccountFunctionAuthorizeParamsAuthorizedParty 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 (AuthorizedAccountFunctionAuthorizeParamsAuthorizedParty) MarshalJSON

type AuthorizedAccountFunctionService

type AuthorizedAccountFunctionService struct {
	Options  []option.RequestOption
	Versions *AuthorizedAccountFunctionVersionService
}

AuthorizedAccountFunctionService contains methods and other services that help with interacting with the nvcf 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 NewAuthorizedAccountFunctionService method instead.

func NewAuthorizedAccountFunctionService

func NewAuthorizedAccountFunctionService(opts ...option.RequestOption) (r *AuthorizedAccountFunctionService)

NewAuthorizedAccountFunctionService 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 (*AuthorizedAccountFunctionService) 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 (*AuthorizedAccountFunctionService) 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 (*AuthorizedAccountFunctionService) Get

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 AuthorizedAccountFunctionVersionAuthorizeParams

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

func (AuthorizedAccountFunctionVersionAuthorizeParams) MarshalJSON

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

type AuthorizedAccountFunctionVersionAuthorizeParamsAuthorizedParty

type AuthorizedAccountFunctionVersionAuthorizeParamsAuthorizedParty 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 (AuthorizedAccountFunctionVersionAuthorizeParamsAuthorizedParty) MarshalJSON

type AuthorizedAccountFunctionVersionService

type AuthorizedAccountFunctionVersionService struct {
	Options []option.RequestOption
}

AuthorizedAccountFunctionVersionService contains methods and other services that help with interacting with the nvcf 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 NewAuthorizedAccountFunctionVersionService method instead.

func NewAuthorizedAccountFunctionVersionService

func NewAuthorizedAccountFunctionVersionService(opts ...option.RequestOption) (r *AuthorizedAccountFunctionVersionService)

NewAuthorizedAccountFunctionVersionService 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 (*AuthorizedAccountFunctionVersionService) 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 (*AuthorizedAccountFunctionVersionService) Delete

func (r *AuthorizedAccountFunctionVersionService) 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 (*AuthorizedAccountFunctionVersionService) Get

func (r *AuthorizedAccountFunctionVersionService) 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 AuthorizedAccountService

type AuthorizedAccountService struct {
	Options   []option.RequestOption
	Functions *AuthorizedAccountFunctionService
}

AuthorizedAccountService contains methods and other services that help with interacting with the nvcf 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 NewAuthorizedAccountService method instead.

func NewAuthorizedAccountService

func NewAuthorizedAccountService(opts ...option.RequestOption) (r *AuthorizedAccountService)

NewAuthorizedAccountService 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
	Functions                  *FunctionService
	AuthorizedAccounts         *AuthorizedAccountService
	Assets                     *AssetService
	Authorizations             *AuthorizationService
	Queues                     *QueueService
	Pexec                      *PexecService
	Exec                       *ExecService
	ClusterGroups              *ClusterGroupService
}

Client creates a struct with services and top level methods that help with interacting with the nvcf 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 (NGC_CLI_API_KEY). 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 ClusterGroupService

type ClusterGroupService struct {
	Options []option.RequestOption
}

ClusterGroupService contains methods and other services that help with interacting with the nvcf 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 NewClusterGroupService method instead.

func NewClusterGroupService

func NewClusterGroupService(opts ...option.RequestOption) (r *ClusterGroupService)

NewClusterGroupService 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 (*ClusterGroupService) 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 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 struct {
	// Data Transfer Object (DTO) representing a function
	Function CreateFunctionResponseFunction `json:"function,required"`
	JSON     createFunctionResponseJSON     `json:"-"`
}

Response body for create function request.

func (*CreateFunctionResponse) UnmarshalJSON

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

type CreateFunctionResponseFunction

type CreateFunctionResponseFunction struct {
	// Unique function id
	ID string `json:"id,required" format:"uuid"`
	// Function creation timestamp
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	// Used to indicate a STREAMING function. Defaults to DEFAULT.
	FunctionType CreateFunctionResponseFunctionFunctionType `json:"functionType,required"`
	// Health endpoint for the container or helmChart
	HealthUri string `json:"healthUri,required" format:"uri"`
	// Function name
	Name string `json:"name,required"`
	// NVIDIA Cloud Account Id
	NcaID string `json:"ncaId,required"`
	// Function status
	Status CreateFunctionResponseFunctionStatus `json:"status,required"`
	// Unique function version id
	VersionID string `json:"versionId,required" format:"uuid"`
	// List of active instances for this function.
	ActiveInstances []CreateFunctionResponseFunctionActiveInstance `json:"activeInstances"`
	// Invocation request body format
	APIBodyFormat CreateFunctionResponseFunctionAPIBodyFormat `json:"apiBodyFormat"`
	// Args used to launch the container
	ContainerArgs string `json:"containerArgs"`
	// Environment settings used to launch the container
	ContainerEnvironment []CreateFunctionResponseFunctionContainerEnvironment `json:"containerEnvironment"`
	// Optional custom container
	ContainerImage string `json:"containerImage" format:"uri"`
	// Function/version description
	Description string `json:"description"`
	// Data Transfer Object(DTO) representing a function ne
	Health CreateFunctionResponseFunctionHealth `json:"health"`
	// Optional Helm Chart
	HelmChart string `json:"helmChart" format:"uri"`
	// Helm Chart Service Name specified only when helmChart property is specified
	HelmChartServiceName string `json:"helmChartServiceName"`
	// Optional port number where the inference listener is running - defaults to 8000
	// for Triton
	InferencePort int64 `json:"inferencePort"`
	// Entrypoint for invoking the container to process requests
	InferenceURL string `json:"inferenceUrl" format:"uri"`
	// Optional set of models
	Models []CreateFunctionResponseFunctionModel `json:"models"`
	// Indicates whether the function is owned by another account. If the account that
	// is being used to lookup functions happens to be authorized to invoke/list this
	// function which is owned by a different account, then this field is set to true
	// and ncaId will contain the id of the account that owns the function. Otherwise,
	// this field is not set as it defaults to false.
	OwnedByDifferentAccount bool `json:"ownedByDifferentAccount"`
	// Optional set of resources.
	Resources []CreateFunctionResponseFunctionResource `json:"resources"`
	// Optional secret names
	Secrets []string `json:"secrets"`
	// Optional set of tags. Maximum allowed number of tags per function is 64. Maximum
	// length of each tag is 128 chars.
	Tags []string                           `json:"tags"`
	JSON createFunctionResponseFunctionJSON `json:"-"`
}

Data Transfer Object (DTO) representing a function

func (*CreateFunctionResponseFunction) UnmarshalJSON

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

type CreateFunctionResponseFunctionAPIBodyFormat

type CreateFunctionResponseFunctionAPIBodyFormat string

Invocation request body format

const (
	CreateFunctionResponseFunctionAPIBodyFormatPredictV2 CreateFunctionResponseFunctionAPIBodyFormat = "PREDICT_V2"
	CreateFunctionResponseFunctionAPIBodyFormatCustom    CreateFunctionResponseFunctionAPIBodyFormat = "CUSTOM"
)

func (CreateFunctionResponseFunctionAPIBodyFormat) IsKnown

type CreateFunctionResponseFunctionActiveInstance

type CreateFunctionResponseFunctionActiveInstance struct {
	// Backend where the instance is running
	Backend string `json:"backend"`
	// Function executing on the instance
	FunctionID string `json:"functionId" format:"uuid"`
	// Function version executing on the instance
	FunctionVersionID string `json:"functionVersionId" format:"uuid"`
	// GPU name powering the instance
	GPU string `json:"gpu"`
	// Instance creation timestamp
	InstanceCreatedAt time.Time `json:"instanceCreatedAt" format:"date-time"`
	// Unique id of the instance
	InstanceID string `json:"instanceId"`
	// Instance status
	InstanceStatus CreateFunctionResponseFunctionActiveInstancesInstanceStatus `json:"instanceStatus"`
	// GPU instance-type powering the instance
	InstanceType string `json:"instanceType"`
	// Instance's last updated timestamp
	InstanceUpdatedAt time.Time `json:"instanceUpdatedAt" format:"date-time"`
	// Location such as zone name or region where the instance is running
	Location string `json:"location"`
	// NVIDIA Cloud Account Id that owns the function running on the instance
	NcaID string `json:"ncaId"`
	// SIS request-id used to launch this instance
	SisRequestID string                                           `json:"sisRequestId" format:"uuid"`
	JSON         createFunctionResponseFunctionActiveInstanceJSON `json:"-"`
}

Data Transfer Object(DTO) representing a spot instance

func (*CreateFunctionResponseFunctionActiveInstance) UnmarshalJSON

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

type CreateFunctionResponseFunctionActiveInstancesInstanceStatus

type CreateFunctionResponseFunctionActiveInstancesInstanceStatus string

Instance status

const (
	CreateFunctionResponseFunctionActiveInstancesInstanceStatusActive    CreateFunctionResponseFunctionActiveInstancesInstanceStatus = "ACTIVE"
	CreateFunctionResponseFunctionActiveInstancesInstanceStatusErrored   CreateFunctionResponseFunctionActiveInstancesInstanceStatus = "ERRORED"
	CreateFunctionResponseFunctionActiveInstancesInstanceStatusPreempted CreateFunctionResponseFunctionActiveInstancesInstanceStatus = "PREEMPTED"
	CreateFunctionResponseFunctionActiveInstancesInstanceStatusDeleted   CreateFunctionResponseFunctionActiveInstancesInstanceStatus = "DELETED"
)

func (CreateFunctionResponseFunctionActiveInstancesInstanceStatus) IsKnown

type CreateFunctionResponseFunctionContainerEnvironment

type CreateFunctionResponseFunctionContainerEnvironment struct {
	// Container environment key
	Key string `json:"key,required"`
	// Container environment value
	Value string                                                 `json:"value,required"`
	JSON  createFunctionResponseFunctionContainerEnvironmentJSON `json:"-"`
}

Data Transfer Object(DTO) representing a container environment entry

func (*CreateFunctionResponseFunctionContainerEnvironment) UnmarshalJSON

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

type CreateFunctionResponseFunctionFunctionType

type CreateFunctionResponseFunctionFunctionType string

Used to indicate a STREAMING function. Defaults to DEFAULT.

const (
	CreateFunctionResponseFunctionFunctionTypeDefault   CreateFunctionResponseFunctionFunctionType = "DEFAULT"
	CreateFunctionResponseFunctionFunctionTypeStreaming CreateFunctionResponseFunctionFunctionType = "STREAMING"
)

func (CreateFunctionResponseFunctionFunctionType) IsKnown

type CreateFunctionResponseFunctionHealth

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

Data Transfer Object(DTO) representing a function ne

func (*CreateFunctionResponseFunctionHealth) UnmarshalJSON

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

type CreateFunctionResponseFunctionHealthProtocol

type CreateFunctionResponseFunctionHealthProtocol string

HTTP/gPRC protocol type for health endpoint

const (
	CreateFunctionResponseFunctionHealthProtocolHTTP CreateFunctionResponseFunctionHealthProtocol = "HTTP"
	CreateFunctionResponseFunctionHealthProtocolGRpc CreateFunctionResponseFunctionHealthProtocol = "gRPC"
)

func (CreateFunctionResponseFunctionHealthProtocol) IsKnown

type CreateFunctionResponseFunctionModel

type CreateFunctionResponseFunctionModel struct {
	// Artifact name
	Name string `json:"name,required"`
	// Artifact URI
	Uri string `json:"uri,required" format:"uri"`
	// Artifact version
	Version string                                  `json:"version,required"`
	JSON    createFunctionResponseFunctionModelJSON `json:"-"`
}

Data Transfer Object(DTO) representing an artifact

func (*CreateFunctionResponseFunctionModel) UnmarshalJSON

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

type CreateFunctionResponseFunctionResource

type CreateFunctionResponseFunctionResource struct {
	// Artifact name
	Name string `json:"name,required"`
	// Artifact URI
	Uri string `json:"uri,required" format:"uri"`
	// Artifact version
	Version string                                     `json:"version,required"`
	JSON    createFunctionResponseFunctionResourceJSON `json:"-"`
}

Data Transfer Object(DTO) representing an artifact

func (*CreateFunctionResponseFunctionResource) UnmarshalJSON

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

type CreateFunctionResponseFunctionStatus

type CreateFunctionResponseFunctionStatus string

Function status

const (
	CreateFunctionResponseFunctionStatusActive    CreateFunctionResponseFunctionStatus = "ACTIVE"
	CreateFunctionResponseFunctionStatusDeploying CreateFunctionResponseFunctionStatus = "DEPLOYING"
	CreateFunctionResponseFunctionStatusError     CreateFunctionResponseFunctionStatus = "ERROR"
	CreateFunctionResponseFunctionStatusInactive  CreateFunctionResponseFunctionStatus = "INACTIVE"
	CreateFunctionResponseFunctionStatusDeleted   CreateFunctionResponseFunctionStatus = "DELETED"
)

func (CreateFunctionResponseFunctionStatus) IsKnown

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 EnvelopeFunctionInvocationFunctionInvokeEnvelopeParams

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

func (EnvelopeFunctionInvocationFunctionInvokeEnvelopeParams) MarshalJSON

type EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeader

type EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeader 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[[]EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeaderMeteringData] `json:"meteringData"`
	// Polling timeout duration.
	PollDurationSeconds param.Field[int64] `json:"pollDurationSeconds"`
}

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

func (EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeader) MarshalJSON

type EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeaderMeteringData

type EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeaderMeteringData 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 (EnvelopeFunctionInvocationFunctionInvokeEnvelopeParamsRequestHeaderMeteringData) MarshalJSON

type EnvelopeFunctionInvocationFunctionService

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

EnvelopeFunctionInvocationFunctionService contains methods and other services that help with interacting with the nvcf 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) InvokeEnvelope

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 EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParams

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

func (EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParams) MarshalJSON

type EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeader

type EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeader 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[[]EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeaderMeteringData] `json:"meteringData"`
	// Polling timeout duration.
	PollDurationSeconds param.Field[int64] `json:"pollDurationSeconds"`
}

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

func (EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeader) MarshalJSON

type EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeaderMeteringData

type EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeaderMeteringData 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 (EnvelopeFunctionInvocationFunctionVersionInvokeEnvelopeParamsRequestHeaderMeteringData) MarshalJSON

type EnvelopeFunctionInvocationFunctionVersionService

type EnvelopeFunctionInvocationFunctionVersionService struct {
	Options []option.RequestOption
}

EnvelopeFunctionInvocationFunctionVersionService contains methods and other services that help with interacting with the nvcf 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) InvokeEnvelope

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
}

EnvelopeFunctionInvocationService contains methods and other services that help with interacting with the nvcf 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 ExecService

type ExecService struct {
	Options []option.RequestOption
	Status  *ExecStatusService
}

ExecService contains methods and other services that help with interacting with the nvcf 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 NewExecService method instead.

func NewExecService

func NewExecService(opts ...option.RequestOption) (r *ExecService)

NewExecService 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 ExecStatusService

type ExecStatusService struct {
	Options []option.RequestOption
}

ExecStatusService contains methods and other services that help with interacting with the nvcf 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 NewExecStatusService method instead.

func NewExecStatusService

func NewExecStatusService(opts ...option.RequestOption) (r *ExecStatusService)

NewExecStatusService 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 (*ExecStatusService) Get

func (r *ExecStatusService) Get(ctx context.Context, requestID string, opts ...option.RequestOption) (res *shared.InvokeFunctionResponse, err error)

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 FunctionDeploymentFunctionService

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

FunctionDeploymentFunctionService contains methods and other services that help with interacting with the nvcf 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 FunctionDeploymentFunctionVersionDeleteDeploymentParams

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

func (FunctionDeploymentFunctionVersionDeleteDeploymentParams) URLQuery

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

type FunctionDeploymentFunctionVersionInitiateDeploymentParams

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

func (FunctionDeploymentFunctionVersionInitiateDeploymentParams) MarshalJSON

type FunctionDeploymentFunctionVersionInitiateDeploymentParamsDeploymentSpecification

type FunctionDeploymentFunctionVersionInitiateDeploymentParamsDeploymentSpecification 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 (FunctionDeploymentFunctionVersionInitiateDeploymentParamsDeploymentSpecification) MarshalJSON

type FunctionDeploymentFunctionVersionService

type FunctionDeploymentFunctionVersionService struct {
	Options []option.RequestOption
}

FunctionDeploymentFunctionVersionService contains methods and other services that help with interacting with the nvcf 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) DeleteDeployment

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) GetDeployment

func (r *FunctionDeploymentFunctionVersionService) GetDeployment(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) InitiateDeployment

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) UpdateDeployment

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 FunctionDeploymentFunctionVersionUpdateDeploymentParams

type FunctionDeploymentFunctionVersionUpdateDeploymentParams struct {
	// Deployment specs with GPU, instance-type, etc. details for update request
	DeploymentSpecifications param.Field[[]FunctionDeploymentFunctionVersionUpdateDeploymentParamsDeploymentSpecification] `json:"deploymentSpecifications,required"`
}

func (FunctionDeploymentFunctionVersionUpdateDeploymentParams) MarshalJSON

type FunctionDeploymentFunctionVersionUpdateDeploymentParamsDeploymentSpecification

type FunctionDeploymentFunctionVersionUpdateDeploymentParamsDeploymentSpecification 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"`
	// Max request concurrency between 1 (default) and 1024.
	MaxRequestConcurrency param.Field[int64] `json:"maxRequestConcurrency"`
}

Data Transfer Object(DTO) representing GPU specification for Deployment Update case.

func (FunctionDeploymentFunctionVersionUpdateDeploymentParamsDeploymentSpecification) MarshalJSON

type FunctionDeploymentService

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

FunctionDeploymentService contains methods and other services that help with interacting with the nvcf 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 FunctionIDListParams

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

func (FunctionIDListParams) URLQuery

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

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

type FunctionIDListParamsVisibility

type FunctionIDListParamsVisibility string
const (
	FunctionIDListParamsVisibilityAuthorized FunctionIDListParamsVisibility = "authorized"
	FunctionIDListParamsVisibilityPrivate    FunctionIDListParamsVisibility = "private"
	FunctionIDListParamsVisibilityPublic     FunctionIDListParamsVisibility = "public"
)

func (FunctionIDListParamsVisibility) IsKnown

type FunctionIDService

type FunctionIDService struct {
	Options []option.RequestOption
}

FunctionIDService contains methods and other services that help with interacting with the nvcf 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 NewFunctionIDService method instead.

func NewFunctionIDService

func NewFunctionIDService(opts ...option.RequestOption) (r *FunctionIDService)

NewFunctionIDService 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 (*FunctionIDService) 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 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 nvcf 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 nvcf 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 nvcf 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 FunctionListParams

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

func (FunctionListParams) URLQuery

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

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

type FunctionListParamsVisibility

type FunctionListParamsVisibility string
const (
	FunctionListParamsVisibilityAuthorized FunctionListParamsVisibility = "authorized"
	FunctionListParamsVisibilityPrivate    FunctionListParamsVisibility = "private"
	FunctionListParamsVisibilityPublic     FunctionListParamsVisibility = "public"
)

func (FunctionListParamsVisibility) IsKnown

func (r FunctionListParamsVisibility) IsKnown() bool

type FunctionManagementFunctionService

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

FunctionManagementFunctionService contains methods and other services that help with interacting with the nvcf 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 nvcf 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) UpdateMetadata

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 FunctionManagementFunctionVersionUpdateMetadataParams

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

func (FunctionManagementFunctionVersionUpdateMetadataParams) MarshalJSON

type FunctionManagementIDService

type FunctionManagementIDService struct {
	Options []option.RequestOption
}

FunctionManagementIDService contains methods and other services that help with interacting with the nvcf 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 NewFunctionManagementIDService method instead.

func NewFunctionManagementIDService

func NewFunctionManagementIDService(opts ...option.RequestOption) (r *FunctionManagementIDService)

NewFunctionManagementIDService 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 FunctionManagementService

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

FunctionManagementService contains methods and other services that help with interacting with the nvcf 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 FunctionNewParams

type FunctionNewParams 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[FunctionNewParamsAPIBodyFormat] `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[[]FunctionNewParamsContainerEnvironment] `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[FunctionNewParamsFunctionType] `json:"functionType"`
	// Data Transfer Object(DTO) representing a function ne
	Health param.Field[FunctionNewParamsHealth] `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[[]FunctionNewParamsModel] `json:"models"`
	// Optional set of resources
	Resources param.Field[[]FunctionNewParamsResource] `json:"resources"`
	// Optional secrets
	Secrets param.Field[[]FunctionNewParamsSecret] `json:"secrets"`
	// Optional set of tags - could be empty. Provided by user
	Tags param.Field[[]string] `json:"tags"`
}

func (FunctionNewParams) MarshalJSON

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

type FunctionNewParamsAPIBodyFormat

type FunctionNewParamsAPIBodyFormat string

Invocation request body format

const (
	FunctionNewParamsAPIBodyFormatPredictV2 FunctionNewParamsAPIBodyFormat = "PREDICT_V2"
	FunctionNewParamsAPIBodyFormatCustom    FunctionNewParamsAPIBodyFormat = "CUSTOM"
)

func (FunctionNewParamsAPIBodyFormat) IsKnown

type FunctionNewParamsContainerEnvironment

type FunctionNewParamsContainerEnvironment 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 (FunctionNewParamsContainerEnvironment) MarshalJSON

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

type FunctionNewParamsFunctionType

type FunctionNewParamsFunctionType string

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

const (
	FunctionNewParamsFunctionTypeDefault   FunctionNewParamsFunctionType = "DEFAULT"
	FunctionNewParamsFunctionTypeStreaming FunctionNewParamsFunctionType = "STREAMING"
)

func (FunctionNewParamsFunctionType) IsKnown

func (r FunctionNewParamsFunctionType) IsKnown() bool

type FunctionNewParamsHealth

type FunctionNewParamsHealth 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[FunctionNewParamsHealthProtocol] `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 (FunctionNewParamsHealth) MarshalJSON

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

type FunctionNewParamsHealthProtocol

type FunctionNewParamsHealthProtocol string

HTTP/gPRC protocol type for health endpoint

const (
	FunctionNewParamsHealthProtocolHTTP FunctionNewParamsHealthProtocol = "HTTP"
	FunctionNewParamsHealthProtocolGRpc FunctionNewParamsHealthProtocol = "gRPC"
)

func (FunctionNewParamsHealthProtocol) IsKnown

type FunctionNewParamsModel

type FunctionNewParamsModel 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 (FunctionNewParamsModel) MarshalJSON

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

type FunctionNewParamsResource

type FunctionNewParamsResource 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 (FunctionNewParamsResource) MarshalJSON

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

type FunctionNewParamsSecret

type FunctionNewParamsSecret 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 (FunctionNewParamsSecret) MarshalJSON

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

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 FunctionService

type FunctionService struct {
	Options  []option.RequestOption
	Versions *FunctionVersionService
	IDs      *FunctionIDService
}

FunctionService contains methods and other services that help with interacting with the nvcf 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 NewFunctionService method instead.

func NewFunctionService

func NewFunctionService(opts ...option.RequestOption) (r *FunctionService)

NewFunctionService 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 (*FunctionService) 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 (*FunctionService) 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 FunctionVersionGetParams

type FunctionVersionGetParams struct {
	// Query param 'includeSecrets' indicates whether to include secret names for the
	// function in the response.
	IncludeSecrets param.Field[bool] `query:"includeSecrets"`
}

func (FunctionVersionGetParams) URLQuery

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

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

type FunctionVersionNewParams

type FunctionVersionNewParams 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[FunctionVersionNewParamsAPIBodyFormat] `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[[]FunctionVersionNewParamsContainerEnvironment] `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[FunctionVersionNewParamsFunctionType] `json:"functionType"`
	// Data Transfer Object(DTO) representing a function ne
	Health param.Field[FunctionVersionNewParamsHealth] `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[[]FunctionVersionNewParamsModel] `json:"models"`
	// Optional set of resources
	Resources param.Field[[]FunctionVersionNewParamsResource] `json:"resources"`
	// Optional secrets
	Secrets param.Field[[]FunctionVersionNewParamsSecret] `json:"secrets"`
	// Optional set of tags - could be empty. Provided by user
	Tags param.Field[[]string] `json:"tags"`
}

func (FunctionVersionNewParams) MarshalJSON

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

type FunctionVersionNewParamsAPIBodyFormat

type FunctionVersionNewParamsAPIBodyFormat string

Invocation request body format

const (
	FunctionVersionNewParamsAPIBodyFormatPredictV2 FunctionVersionNewParamsAPIBodyFormat = "PREDICT_V2"
	FunctionVersionNewParamsAPIBodyFormatCustom    FunctionVersionNewParamsAPIBodyFormat = "CUSTOM"
)

func (FunctionVersionNewParamsAPIBodyFormat) IsKnown

type FunctionVersionNewParamsContainerEnvironment

type FunctionVersionNewParamsContainerEnvironment 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 (FunctionVersionNewParamsContainerEnvironment) MarshalJSON

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

type FunctionVersionNewParamsFunctionType

type FunctionVersionNewParamsFunctionType string

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

const (
	FunctionVersionNewParamsFunctionTypeDefault   FunctionVersionNewParamsFunctionType = "DEFAULT"
	FunctionVersionNewParamsFunctionTypeStreaming FunctionVersionNewParamsFunctionType = "STREAMING"
)

func (FunctionVersionNewParamsFunctionType) IsKnown

type FunctionVersionNewParamsHealth

type FunctionVersionNewParamsHealth 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[FunctionVersionNewParamsHealthProtocol] `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 (FunctionVersionNewParamsHealth) MarshalJSON

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

type FunctionVersionNewParamsHealthProtocol

type FunctionVersionNewParamsHealthProtocol string

HTTP/gPRC protocol type for health endpoint

const (
	FunctionVersionNewParamsHealthProtocolHTTP FunctionVersionNewParamsHealthProtocol = "HTTP"
	FunctionVersionNewParamsHealthProtocolGRpc FunctionVersionNewParamsHealthProtocol = "gRPC"
)

func (FunctionVersionNewParamsHealthProtocol) IsKnown

type FunctionVersionNewParamsModel

type FunctionVersionNewParamsModel 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 (FunctionVersionNewParamsModel) MarshalJSON

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

type FunctionVersionNewParamsResource

type FunctionVersionNewParamsResource 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 (FunctionVersionNewParamsResource) MarshalJSON

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

type FunctionVersionNewParamsSecret

type FunctionVersionNewParamsSecret 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 (FunctionVersionNewParamsSecret) MarshalJSON

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

type FunctionVersionService

type FunctionVersionService struct {
	Options []option.RequestOption
}

FunctionVersionService contains methods and other services that help with interacting with the nvcf 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 NewFunctionVersionService method instead.

func NewFunctionVersionService

func NewFunctionVersionService(opts ...option.RequestOption) (r *FunctionVersionService)

NewFunctionVersionService 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 (*FunctionVersionService) Delete

func (r *FunctionVersionService) 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 (*FunctionVersionService) Get

func (r *FunctionVersionService) Get(ctx context.Context, functionID string, functionVersionID string, query FunctionVersionGetParams, 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 (*FunctionVersionService) List

func (r *FunctionVersionService) List(ctx context.Context, functionID string, opts ...option.RequestOption) (res *ListFunctionsResponse, err error)

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 (*FunctionVersionService) 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 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 struct {
	// List of functions
	Functions []ListFunctionsResponseFunction `json:"functions,required"`
	JSON      listFunctionsResponseJSON       `json:"-"`
}

Response body containing list of functions

func (*ListFunctionsResponse) UnmarshalJSON

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

type ListFunctionsResponseFunction

type ListFunctionsResponseFunction struct {
	// Unique function id
	ID string `json:"id,required" format:"uuid"`
	// Function creation timestamp
	CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
	// Used to indicate a STREAMING function. Defaults to DEFAULT.
	FunctionType ListFunctionsResponseFunctionsFunctionType `json:"functionType,required"`
	// Health endpoint for the container or helmChart
	HealthUri string `json:"healthUri,required" format:"uri"`
	// Function name
	Name string `json:"name,required"`
	// NVIDIA Cloud Account Id
	NcaID string `json:"ncaId,required"`
	// Function status
	Status ListFunctionsResponseFunctionsStatus `json:"status,required"`
	// Unique function version id
	VersionID string `json:"versionId,required" format:"uuid"`
	// List of active instances for this function.
	ActiveInstances []ListFunctionsResponseFunctionsActiveInstance `json:"activeInstances"`
	// Invocation request body format
	APIBodyFormat ListFunctionsResponseFunctionsAPIBodyFormat `json:"apiBodyFormat"`
	// Args used to launch the container
	ContainerArgs string `json:"containerArgs"`
	// Environment settings used to launch the container
	ContainerEnvironment []ListFunctionsResponseFunctionsContainerEnvironment `json:"containerEnvironment"`
	// Optional custom container
	ContainerImage string `json:"containerImage" format:"uri"`
	// Function/version description
	Description string `json:"description"`
	// Data Transfer Object(DTO) representing a function ne
	Health ListFunctionsResponseFunctionsHealth `json:"health"`
	// Optional Helm Chart
	HelmChart string `json:"helmChart" format:"uri"`
	// Helm Chart Service Name specified only when helmChart property is specified
	HelmChartServiceName string `json:"helmChartServiceName"`
	// Optional port number where the inference listener is running - defaults to 8000
	// for Triton
	InferencePort int64 `json:"inferencePort"`
	// Entrypoint for invoking the container to process requests
	InferenceURL string `json:"inferenceUrl" format:"uri"`
	// Optional set of models
	Models []ListFunctionsResponseFunctionsModel `json:"models"`
	// Indicates whether the function is owned by another account. If the account that
	// is being used to lookup functions happens to be authorized to invoke/list this
	// function which is owned by a different account, then this field is set to true
	// and ncaId will contain the id of the account that owns the function. Otherwise,
	// this field is not set as it defaults to false.
	OwnedByDifferentAccount bool `json:"ownedByDifferentAccount"`
	// Optional set of resources.
	Resources []ListFunctionsResponseFunctionsResource `json:"resources"`
	// Optional secret names
	Secrets []string `json:"secrets"`
	// Optional set of tags. Maximum allowed number of tags per function is 64. Maximum
	// length of each tag is 128 chars.
	Tags []string                          `json:"tags"`
	JSON listFunctionsResponseFunctionJSON `json:"-"`
}

Data Transfer Object (DTO) representing a function

func (*ListFunctionsResponseFunction) UnmarshalJSON

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

type ListFunctionsResponseFunctionsAPIBodyFormat

type ListFunctionsResponseFunctionsAPIBodyFormat string

Invocation request body format

const (
	ListFunctionsResponseFunctionsAPIBodyFormatPredictV2 ListFunctionsResponseFunctionsAPIBodyFormat = "PREDICT_V2"
	ListFunctionsResponseFunctionsAPIBodyFormatCustom    ListFunctionsResponseFunctionsAPIBodyFormat = "CUSTOM"
)

func (ListFunctionsResponseFunctionsAPIBodyFormat) IsKnown

type ListFunctionsResponseFunctionsActiveInstance

type ListFunctionsResponseFunctionsActiveInstance struct {
	// Backend where the instance is running
	Backend string `json:"backend"`
	// Function executing on the instance
	FunctionID string `json:"functionId" format:"uuid"`
	// Function version executing on the instance
	FunctionVersionID string `json:"functionVersionId" format:"uuid"`
	// GPU name powering the instance
	GPU string `json:"gpu"`
	// Instance creation timestamp
	InstanceCreatedAt time.Time `json:"instanceCreatedAt" format:"date-time"`
	// Unique id of the instance
	InstanceID string `json:"instanceId"`
	// Instance status
	InstanceStatus ListFunctionsResponseFunctionsActiveInstancesInstanceStatus `json:"instanceStatus"`
	// GPU instance-type powering the instance
	InstanceType string `json:"instanceType"`
	// Instance's last updated timestamp
	InstanceUpdatedAt time.Time `json:"instanceUpdatedAt" format:"date-time"`
	// Location such as zone name or region where the instance is running
	Location string `json:"location"`
	// NVIDIA Cloud Account Id that owns the function running on the instance
	NcaID string `json:"ncaId"`
	// SIS request-id used to launch this instance
	SisRequestID string                                           `json:"sisRequestId" format:"uuid"`
	JSON         listFunctionsResponseFunctionsActiveInstanceJSON `json:"-"`
}

Data Transfer Object(DTO) representing a spot instance

func (*ListFunctionsResponseFunctionsActiveInstance) UnmarshalJSON

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

type ListFunctionsResponseFunctionsActiveInstancesInstanceStatus

type ListFunctionsResponseFunctionsActiveInstancesInstanceStatus string

Instance status

const (
	ListFunctionsResponseFunctionsActiveInstancesInstanceStatusActive    ListFunctionsResponseFunctionsActiveInstancesInstanceStatus = "ACTIVE"
	ListFunctionsResponseFunctionsActiveInstancesInstanceStatusErrored   ListFunctionsResponseFunctionsActiveInstancesInstanceStatus = "ERRORED"
	ListFunctionsResponseFunctionsActiveInstancesInstanceStatusPreempted ListFunctionsResponseFunctionsActiveInstancesInstanceStatus = "PREEMPTED"
	ListFunctionsResponseFunctionsActiveInstancesInstanceStatusDeleted   ListFunctionsResponseFunctionsActiveInstancesInstanceStatus = "DELETED"
)

func (ListFunctionsResponseFunctionsActiveInstancesInstanceStatus) IsKnown

type ListFunctionsResponseFunctionsContainerEnvironment

type ListFunctionsResponseFunctionsContainerEnvironment struct {
	// Container environment key
	Key string `json:"key,required"`
	// Container environment value
	Value string                                                 `json:"value,required"`
	JSON  listFunctionsResponseFunctionsContainerEnvironmentJSON `json:"-"`
}

Data Transfer Object(DTO) representing a container environment entry

func (*ListFunctionsResponseFunctionsContainerEnvironment) UnmarshalJSON

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

type ListFunctionsResponseFunctionsFunctionType

type ListFunctionsResponseFunctionsFunctionType string

Used to indicate a STREAMING function. Defaults to DEFAULT.

const (
	ListFunctionsResponseFunctionsFunctionTypeDefault   ListFunctionsResponseFunctionsFunctionType = "DEFAULT"
	ListFunctionsResponseFunctionsFunctionTypeStreaming ListFunctionsResponseFunctionsFunctionType = "STREAMING"
)

func (ListFunctionsResponseFunctionsFunctionType) IsKnown

type ListFunctionsResponseFunctionsHealth

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

Data Transfer Object(DTO) representing a function ne

func (*ListFunctionsResponseFunctionsHealth) UnmarshalJSON

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

type ListFunctionsResponseFunctionsHealthProtocol

type ListFunctionsResponseFunctionsHealthProtocol string

HTTP/gPRC protocol type for health endpoint

const (
	ListFunctionsResponseFunctionsHealthProtocolHTTP ListFunctionsResponseFunctionsHealthProtocol = "HTTP"
	ListFunctionsResponseFunctionsHealthProtocolGRpc ListFunctionsResponseFunctionsHealthProtocol = "gRPC"
)

func (ListFunctionsResponseFunctionsHealthProtocol) IsKnown

type ListFunctionsResponseFunctionsModel

type ListFunctionsResponseFunctionsModel struct {
	// Artifact name
	Name string `json:"name,required"`
	// Artifact URI
	Uri string `json:"uri,required" format:"uri"`
	// Artifact version
	Version string                                  `json:"version,required"`
	JSON    listFunctionsResponseFunctionsModelJSON `json:"-"`
}

Data Transfer Object(DTO) representing an artifact

func (*ListFunctionsResponseFunctionsModel) UnmarshalJSON

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

type ListFunctionsResponseFunctionsResource

type ListFunctionsResponseFunctionsResource struct {
	// Artifact name
	Name string `json:"name,required"`
	// Artifact URI
	Uri string `json:"uri,required" format:"uri"`
	// Artifact version
	Version string                                     `json:"version,required"`
	JSON    listFunctionsResponseFunctionsResourceJSON `json:"-"`
}

Data Transfer Object(DTO) representing an artifact

func (*ListFunctionsResponseFunctionsResource) UnmarshalJSON

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

type ListFunctionsResponseFunctionsStatus

type ListFunctionsResponseFunctionsStatus string

Function status

const (
	ListFunctionsResponseFunctionsStatusActive    ListFunctionsResponseFunctionsStatus = "ACTIVE"
	ListFunctionsResponseFunctionsStatusDeploying ListFunctionsResponseFunctionsStatus = "DEPLOYING"
	ListFunctionsResponseFunctionsStatusError     ListFunctionsResponseFunctionsStatus = "ERROR"
	ListFunctionsResponseFunctionsStatusInactive  ListFunctionsResponseFunctionsStatus = "INACTIVE"
	ListFunctionsResponseFunctionsStatusDeleted   ListFunctionsResponseFunctionsStatus = "DELETED"
)

func (ListFunctionsResponseFunctionsStatus) IsKnown

type PexecService

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

PexecService contains methods and other services that help with interacting with the nvcf 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 nvcf 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 nvcf 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 nvcf 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 nvcf 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 nvcf 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 nvcf 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 nvcf 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) UpdateSecrets

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 UserSecretManagementFunctionVersionUpdateSecretsParams

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

func (UserSecretManagementFunctionVersionUpdateSecretsParams) MarshalJSON

type UserSecretManagementFunctionVersionUpdateSecretsParamsSecret

type UserSecretManagementFunctionVersionUpdateSecretsParamsSecret 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 (UserSecretManagementFunctionVersionUpdateSecretsParamsSecret) MarshalJSON

type UserSecretManagementService

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

UserSecretManagementService contains methods and other services that help with interacting with the nvcf 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