serverlessendpoint

package
v0.20240906.1232634 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint Documentation

The serverlessendpoint SDK allows for interaction with the Azure Resource Manager Service machinelearningservices (API Version 2024-04-01).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-04-01/serverlessendpoint"

Client Initialization

client := serverlessendpoint.NewServerlessEndpointClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ServerlessEndpointClient.CreateOrUpdate

ctx := context.TODO()
id := serverlessendpoint.NewServerlessEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "serverlessEndpointValue")

payload := serverlessendpoint.ServerlessEndpointTrackedResource{
	// ...
}


if err := client.CreateOrUpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ServerlessEndpointClient.Delete

ctx := context.TODO()
id := serverlessendpoint.NewServerlessEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "serverlessEndpointValue")

if err := client.DeleteThenPoll(ctx, id); err != nil {
	// handle the error
}

Example Usage: ServerlessEndpointClient.Get

ctx := context.TODO()
id := serverlessendpoint.NewServerlessEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "serverlessEndpointValue")

read, err := client.Get(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ServerlessEndpointClient.List

ctx := context.TODO()
id := serverlessendpoint.NewWorkspaceID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue")

// alternatively `client.List(ctx, id, serverlessendpoint.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, serverlessendpoint.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: ServerlessEndpointClient.ListKeys

ctx := context.TODO()
id := serverlessendpoint.NewServerlessEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "serverlessEndpointValue")

read, err := client.ListKeys(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: ServerlessEndpointClient.RegenerateKeys

ctx := context.TODO()
id := serverlessendpoint.NewServerlessEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "serverlessEndpointValue")

payload := serverlessendpoint.RegenerateEndpointKeysRequest{
	// ...
}


if err := client.RegenerateKeysThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Example Usage: ServerlessEndpointClient.Update

ctx := context.TODO()
id := serverlessendpoint.NewServerlessEndpointID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceValue", "serverlessEndpointValue")

payload := serverlessendpoint.PartialMinimalTrackedResourceWithSkuAndIdentity{
	// ...
}


if err := client.UpdateThenPoll(ctx, id, payload); err != nil {
	// handle the error
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForContentSafetyStatus

func PossibleValuesForContentSafetyStatus() []string

func PossibleValuesForEndpointProvisioningState

func PossibleValuesForEndpointProvisioningState() []string

func PossibleValuesForKeyType

func PossibleValuesForKeyType() []string

func PossibleValuesForManagedServiceIdentityType

func PossibleValuesForManagedServiceIdentityType() []string

func PossibleValuesForServerlessEndpointState

func PossibleValuesForServerlessEndpointState() []string

func PossibleValuesForServerlessInferenceEndpointAuthMode

func PossibleValuesForServerlessInferenceEndpointAuthMode() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateServerlessEndpointID

func ValidateServerlessEndpointID(input interface{}, key string) (warnings []string, errors []error)

ValidateServerlessEndpointID checks that 'input' can be parsed as a Serverless Endpoint ID

func ValidateWorkspaceID

func ValidateWorkspaceID(input interface{}, key string) (warnings []string, errors []error)

ValidateWorkspaceID checks that 'input' can be parsed as a Workspace ID

Types

type ContentSafety

type ContentSafety struct {
	ContentSafetyStatus ContentSafetyStatus `json:"contentSafetyStatus"`
}

type ContentSafetyStatus

type ContentSafetyStatus string
const (
	ContentSafetyStatusDisabled ContentSafetyStatus = "Disabled"
	ContentSafetyStatusEnabled  ContentSafetyStatus = "Enabled"
)

func (*ContentSafetyStatus) UnmarshalJSON

func (s *ContentSafetyStatus) UnmarshalJSON(bytes []byte) error

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerlessEndpointTrackedResource
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
}

type EndpointAuthKeys

type EndpointAuthKeys struct {
	PrimaryKey   *string `json:"primaryKey,omitempty"`
	SecondaryKey *string `json:"secondaryKey,omitempty"`
}

type EndpointProvisioningState

type EndpointProvisioningState string
const (
	EndpointProvisioningStateCanceled  EndpointProvisioningState = "Canceled"
	EndpointProvisioningStateCreating  EndpointProvisioningState = "Creating"
	EndpointProvisioningStateDeleting  EndpointProvisioningState = "Deleting"
	EndpointProvisioningStateFailed    EndpointProvisioningState = "Failed"
	EndpointProvisioningStateSucceeded EndpointProvisioningState = "Succeeded"
	EndpointProvisioningStateUpdating  EndpointProvisioningState = "Updating"
)

func (*EndpointProvisioningState) UnmarshalJSON

func (s *EndpointProvisioningState) UnmarshalJSON(bytes []byte) error

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerlessEndpointTrackedResource
}

type KeyType

type KeyType string
const (
	KeyTypePrimary   KeyType = "Primary"
	KeyTypeSecondary KeyType = "Secondary"
)

func (*KeyType) UnmarshalJSON

func (s *KeyType) UnmarshalJSON(bytes []byte) error

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ServerlessEndpointTrackedResource
}

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListKeysOperationResponse

type ListKeysOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *EndpointAuthKeys
}

type ListOperationOptions

type ListOperationOptions struct {
	Skip *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ServerlessEndpointTrackedResource
}

type ManagedServiceIdentityType

type ManagedServiceIdentityType string
const (
	ManagedServiceIdentityTypeNone                       ManagedServiceIdentityType = "None"
	ManagedServiceIdentityTypeSystemAssigned             ManagedServiceIdentityType = "SystemAssigned"
	ManagedServiceIdentityTypeSystemAssignedUserAssigned ManagedServiceIdentityType = "SystemAssigned,UserAssigned"
	ManagedServiceIdentityTypeUserAssigned               ManagedServiceIdentityType = "UserAssigned"
)

func (*ManagedServiceIdentityType) UnmarshalJSON

func (s *ManagedServiceIdentityType) UnmarshalJSON(bytes []byte) error

type ModelSettings

type ModelSettings struct {
	ModelId *string `json:"modelId,omitempty"`
}

type PartialManagedServiceIdentity

type PartialManagedServiceIdentity struct {
	Type                   *ManagedServiceIdentityType `json:"type,omitempty"`
	UserAssignedIdentities *map[string]interface{}     `json:"userAssignedIdentities,omitempty"`
}

type PartialMinimalTrackedResourceWithSkuAndIdentity

type PartialMinimalTrackedResourceWithSkuAndIdentity struct {
	Identity *PartialManagedServiceIdentity `json:"identity,omitempty"`
	Sku      *PartialSku                    `json:"sku,omitempty"`
	Tags     *map[string]string             `json:"tags,omitempty"`
}

type PartialSku

type PartialSku struct {
	Capacity *int64   `json:"capacity,omitempty"`
	Family   *string  `json:"family,omitempty"`
	Name     *string  `json:"name,omitempty"`
	Size     *string  `json:"size,omitempty"`
	Tier     *SkuTier `json:"tier,omitempty"`
}

type RegenerateEndpointKeysRequest

type RegenerateEndpointKeysRequest struct {
	KeyType  KeyType `json:"keyType"`
	KeyValue *string `json:"keyValue,omitempty"`
}

type RegenerateKeysOperationResponse

type RegenerateKeysOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *EndpointAuthKeys
}

type ServerlessEndpoint

type ServerlessEndpoint struct {
	AuthMode                  ServerlessInferenceEndpointAuthMode `json:"authMode"`
	ContentSafety             *ContentSafety                      `json:"contentSafety,omitempty"`
	EndpointState             *ServerlessEndpointState            `json:"endpointState,omitempty"`
	InferenceEndpoint         *ServerlessInferenceEndpoint        `json:"inferenceEndpoint,omitempty"`
	MarketplaceSubscriptionId *string                             `json:"marketplaceSubscriptionId,omitempty"`
	ModelSettings             *ModelSettings                      `json:"modelSettings,omitempty"`
	ProvisioningState         *EndpointProvisioningState          `json:"provisioningState,omitempty"`
}

type ServerlessEndpointClient

type ServerlessEndpointClient struct {
	Client *resourcemanager.Client
}

func NewServerlessEndpointClientWithBaseURI

func NewServerlessEndpointClientWithBaseURI(sdkApi sdkEnv.Api) (*ServerlessEndpointClient, error)

func (ServerlessEndpointClient) CreateOrUpdate

CreateOrUpdate ...

func (ServerlessEndpointClient) CreateOrUpdateThenPoll

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (ServerlessEndpointClient) Delete

Delete ...

func (ServerlessEndpointClient) DeleteThenPoll

DeleteThenPoll performs Delete then polls until it's completed

func (ServerlessEndpointClient) Get

Get ...

func (ServerlessEndpointClient) List

List ...

func (ServerlessEndpointClient) ListComplete

ListComplete retrieves all the results into a single object

func (ServerlessEndpointClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ServerlessEndpointClient) ListKeys

ListKeys ...

func (ServerlessEndpointClient) RegenerateKeys

RegenerateKeys ...

func (ServerlessEndpointClient) RegenerateKeysThenPoll

RegenerateKeysThenPoll performs RegenerateKeys then polls until it's completed

func (ServerlessEndpointClient) Update

Update ...

func (ServerlessEndpointClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type ServerlessEndpointId

type ServerlessEndpointId struct {
	SubscriptionId         string
	ResourceGroupName      string
	WorkspaceName          string
	ServerlessEndpointName string
}

ServerlessEndpointId is a struct representing the Resource ID for a Serverless Endpoint

func NewServerlessEndpointID

func NewServerlessEndpointID(subscriptionId string, resourceGroupName string, workspaceName string, serverlessEndpointName string) ServerlessEndpointId

NewServerlessEndpointID returns a new ServerlessEndpointId struct

func ParseServerlessEndpointID

func ParseServerlessEndpointID(input string) (*ServerlessEndpointId, error)

ParseServerlessEndpointID parses 'input' into a ServerlessEndpointId

func ParseServerlessEndpointIDInsensitively

func ParseServerlessEndpointIDInsensitively(input string) (*ServerlessEndpointId, error)

ParseServerlessEndpointIDInsensitively parses 'input' case-insensitively into a ServerlessEndpointId note: this method should only be used for API response data and not user input

func (*ServerlessEndpointId) FromParseResult

func (id *ServerlessEndpointId) FromParseResult(input resourceids.ParseResult) error

func (ServerlessEndpointId) ID

func (id ServerlessEndpointId) ID() string

ID returns the formatted Serverless Endpoint ID

func (ServerlessEndpointId) Segments

func (id ServerlessEndpointId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Serverless Endpoint ID

func (ServerlessEndpointId) String

func (id ServerlessEndpointId) String() string

String returns a human-readable description of this Serverless Endpoint ID

type ServerlessEndpointState

type ServerlessEndpointState string
const (
	ServerlessEndpointStateCreating       ServerlessEndpointState = "Creating"
	ServerlessEndpointStateCreationFailed ServerlessEndpointState = "CreationFailed"
	ServerlessEndpointStateDeleting       ServerlessEndpointState = "Deleting"
	ServerlessEndpointStateDeletionFailed ServerlessEndpointState = "DeletionFailed"
	ServerlessEndpointStateOnline         ServerlessEndpointState = "Online"
	ServerlessEndpointStateReinstating    ServerlessEndpointState = "Reinstating"
	ServerlessEndpointStateSuspended      ServerlessEndpointState = "Suspended"
	ServerlessEndpointStateSuspending     ServerlessEndpointState = "Suspending"
	ServerlessEndpointStateUnknown        ServerlessEndpointState = "Unknown"
)

func (*ServerlessEndpointState) UnmarshalJSON

func (s *ServerlessEndpointState) UnmarshalJSON(bytes []byte) error

type ServerlessEndpointTrackedResource

type ServerlessEndpointTrackedResource struct {
	Id         *string                                  `json:"id,omitempty"`
	Identity   *identity.LegacySystemAndUserAssignedMap `json:"identity,omitempty"`
	Kind       *string                                  `json:"kind,omitempty"`
	Location   string                                   `json:"location"`
	Name       *string                                  `json:"name,omitempty"`
	Properties ServerlessEndpoint                       `json:"properties"`
	Sku        *Sku                                     `json:"sku,omitempty"`
	SystemData *systemdata.SystemData                   `json:"systemData,omitempty"`
	Tags       *map[string]string                       `json:"tags,omitempty"`
	Type       *string                                  `json:"type,omitempty"`
}

type ServerlessEndpointTrackedResourceOperationPredicate

type ServerlessEndpointTrackedResourceOperationPredicate struct {
	Id       *string
	Kind     *string
	Location *string
	Name     *string
	Type     *string
}

func (ServerlessEndpointTrackedResourceOperationPredicate) Matches

type ServerlessInferenceEndpoint

type ServerlessInferenceEndpoint struct {
	Headers *map[string]string `json:"headers,omitempty"`
	Uri     string             `json:"uri"`
}

type ServerlessInferenceEndpointAuthMode

type ServerlessInferenceEndpointAuthMode string
const (
	ServerlessInferenceEndpointAuthModeKey ServerlessInferenceEndpointAuthMode = "Key"
)

func (*ServerlessInferenceEndpointAuthMode) UnmarshalJSON

func (s *ServerlessInferenceEndpointAuthMode) UnmarshalJSON(bytes []byte) error

type Sku

type Sku struct {
	Capacity *int64   `json:"capacity,omitempty"`
	Family   *string  `json:"family,omitempty"`
	Name     string   `json:"name"`
	Size     *string  `json:"size,omitempty"`
	Tier     *SkuTier `json:"tier,omitempty"`
}

type SkuTier

type SkuTier string
const (
	SkuTierBasic    SkuTier = "Basic"
	SkuTierFree     SkuTier = "Free"
	SkuTierPremium  SkuTier = "Premium"
	SkuTierStandard SkuTier = "Standard"
)

func (*SkuTier) UnmarshalJSON

func (s *SkuTier) UnmarshalJSON(bytes []byte) error

type UpdateOperationResponse

type UpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ServerlessEndpointTrackedResource
}

type WorkspaceId

type WorkspaceId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
}

WorkspaceId is a struct representing the Resource ID for a Workspace

func NewWorkspaceID

func NewWorkspaceID(subscriptionId string, resourceGroupName string, workspaceName string) WorkspaceId

NewWorkspaceID returns a new WorkspaceId struct

func ParseWorkspaceID

func ParseWorkspaceID(input string) (*WorkspaceId, error)

ParseWorkspaceID parses 'input' into a WorkspaceId

func ParseWorkspaceIDInsensitively

func ParseWorkspaceIDInsensitively(input string) (*WorkspaceId, error)

ParseWorkspaceIDInsensitively parses 'input' case-insensitively into a WorkspaceId note: this method should only be used for API response data and not user input

func (*WorkspaceId) FromParseResult

func (id *WorkspaceId) FromParseResult(input resourceids.ParseResult) error

func (WorkspaceId) ID

func (id WorkspaceId) ID() string

ID returns the formatted Workspace ID

func (WorkspaceId) Segments

func (id WorkspaceId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Workspace ID

func (WorkspaceId) String

func (id WorkspaceId) String() string

String returns a human-readable description of this Workspace ID

Jump to

Keyboard shortcuts

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