inferencegroup

package
v0.20250110.1074108 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MPL-2.0 Imports: 14 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/machinelearningservices/2024-10-01-preview/inferencegroup Documentation

The inferencegroup SDK allows for interaction with Azure Resource Manager machinelearningservices (API Version 2024-10-01-preview).

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-10-01-preview/inferencegroup"

Client Initialization

client := inferencegroup.NewInferenceGroupClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: InferenceGroupClient.CreateOrUpdate

ctx := context.TODO()
id := inferencegroup.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName", "groupName")

payload := inferencegroup.InferenceGroupTrackedResource{
	// ...
}


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

Example Usage: InferenceGroupClient.Delete

ctx := context.TODO()
id := inferencegroup.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName", "groupName")

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

Example Usage: InferenceGroupClient.Get

ctx := context.TODO()
id := inferencegroup.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName", "groupName")

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: InferenceGroupClient.GetStatus

ctx := context.TODO()
id := inferencegroup.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName", "groupName")

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

Example Usage: InferenceGroupClient.List

ctx := context.TODO()
id := inferencegroup.NewInferencePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName")

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

Example Usage: InferenceGroupClient.ListSkus

ctx := context.TODO()
id := inferencegroup.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName", "groupName")

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

Example Usage: InferenceGroupClient.Update

ctx := context.TODO()
id := inferencegroup.NewGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group", "workspaceName", "inferencePoolName", "groupName")

payload := inferencegroup.PartialMinimalTrackedResourceWithSku{
	// ...
}


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 PossibleValuesForOrderString

func PossibleValuesForOrderString() []string

func PossibleValuesForPoolProvisioningState

func PossibleValuesForPoolProvisioningState() []string

func PossibleValuesForSkuScaleType

func PossibleValuesForSkuScaleType() []string

func PossibleValuesForSkuTier

func PossibleValuesForSkuTier() []string

func ValidateGroupID

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

ValidateGroupID checks that 'input' can be parsed as a Group ID

func ValidateInferencePoolID

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

ValidateInferencePoolID checks that 'input' can be parsed as a Inference Pool ID

Types

type ActualCapacityInfo

type ActualCapacityInfo struct {
	Failed            *int64 `json:"failed,omitempty"`
	OutdatedFailed    *int64 `json:"outdatedFailed,omitempty"`
	OutdatedSucceeded *int64 `json:"outdatedSucceeded,omitempty"`
	Succeeded         *int64 `json:"succeeded,omitempty"`
	Total             *int64 `json:"total,omitempty"`
}

type CreateOrUpdateOperationResponse

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type GetStatusOperationResponse

type GetStatusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *GroupStatus
}

type GroupEnvironmentConfiguration

type GroupEnvironmentConfiguration struct {
	EnvironmentId        *string                     `json:"environmentId,omitempty"`
	EnvironmentVariables *[]StringStringKeyValuePair `json:"environmentVariables,omitempty"`
	LivenessProbe        *ProbeSettings              `json:"livenessProbe,omitempty"`
	ReadinessProbe       *ProbeSettings              `json:"readinessProbe,omitempty"`
	StartupProbe         *ProbeSettings              `json:"startupProbe,omitempty"`
}

type GroupId

type GroupId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	InferencePoolName string
	GroupName         string
}

GroupId is a struct representing the Resource ID for a Group

func NewGroupID

func NewGroupID(subscriptionId string, resourceGroupName string, workspaceName string, inferencePoolName string, groupName string) GroupId

NewGroupID returns a new GroupId struct

func ParseGroupID

func ParseGroupID(input string) (*GroupId, error)

ParseGroupID parses 'input' into a GroupId

func ParseGroupIDInsensitively

func ParseGroupIDInsensitively(input string) (*GroupId, error)

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

func (*GroupId) FromParseResult

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

func (GroupId) ID

func (id GroupId) ID() string

ID returns the formatted Group ID

func (GroupId) Segments

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

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

func (GroupId) String

func (id GroupId) String() string

String returns a human-readable description of this Group ID

type GroupModelConfiguration

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

type GroupStatus

type GroupStatus struct {
	ActualCapacityInfo *ActualCapacityInfo `json:"actualCapacityInfo,omitempty"`
	EndpointCount      *int64              `json:"endpointCount,omitempty"`
	RequestedCapacity  *int64              `json:"requestedCapacity,omitempty"`
}

type InferenceGroup

type InferenceGroup struct {
	Description              *string                        `json:"description,omitempty"`
	EnvironmentConfiguration *GroupEnvironmentConfiguration `json:"environmentConfiguration,omitempty"`
	ModelConfiguration       *GroupModelConfiguration       `json:"modelConfiguration,omitempty"`
	NodeSkuType              *string                        `json:"nodeSkuType,omitempty"`
	Properties               *[]StringStringKeyValuePair    `json:"properties,omitempty"`
	ProvisioningState        *PoolProvisioningState         `json:"provisioningState,omitempty"`
	ScaleUnitSize            *int64                         `json:"scaleUnitSize,omitempty"`
}

type InferenceGroupClient

type InferenceGroupClient struct {
	Client *resourcemanager.Client
}

func NewInferenceGroupClientWithBaseURI

func NewInferenceGroupClientWithBaseURI(sdkApi sdkEnv.Api) (*InferenceGroupClient, error)

func (InferenceGroupClient) CreateOrUpdate

CreateOrUpdate ...

func (InferenceGroupClient) CreateOrUpdateThenPoll

func (c InferenceGroupClient) CreateOrUpdateThenPoll(ctx context.Context, id GroupId, input InferenceGroupTrackedResource) error

CreateOrUpdateThenPoll performs CreateOrUpdate then polls until it's completed

func (InferenceGroupClient) Delete

func (c InferenceGroupClient) Delete(ctx context.Context, id GroupId) (result DeleteOperationResponse, err error)

Delete ...

func (InferenceGroupClient) DeleteThenPoll

func (c InferenceGroupClient) DeleteThenPoll(ctx context.Context, id GroupId) error

DeleteThenPoll performs Delete then polls until it's completed

func (InferenceGroupClient) Get

Get ...

func (InferenceGroupClient) GetStatus

func (c InferenceGroupClient) GetStatus(ctx context.Context, id GroupId) (result GetStatusOperationResponse, err error)

GetStatus ...

func (InferenceGroupClient) List

List ...

func (InferenceGroupClient) ListComplete

ListComplete retrieves all the results into a single object

func (InferenceGroupClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (InferenceGroupClient) ListSkus

ListSkus ...

func (InferenceGroupClient) ListSkusComplete

ListSkusComplete retrieves all the results into a single object

func (InferenceGroupClient) ListSkusCompleteMatchingPredicate

func (c InferenceGroupClient) ListSkusCompleteMatchingPredicate(ctx context.Context, id GroupId, options ListSkusOperationOptions, predicate SkuResourceOperationPredicate) (result ListSkusCompleteResult, err error)

ListSkusCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (InferenceGroupClient) Update

Update ...

func (InferenceGroupClient) UpdateThenPoll

UpdateThenPoll performs Update then polls until it's completed

type InferenceGroupTrackedResource

type InferenceGroupTrackedResource 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 InferenceGroup                           `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 InferenceGroupTrackedResourceOperationPredicate

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

func (InferenceGroupTrackedResourceOperationPredicate) Matches

type InferencePoolId

type InferencePoolId struct {
	SubscriptionId    string
	ResourceGroupName string
	WorkspaceName     string
	InferencePoolName string
}

InferencePoolId is a struct representing the Resource ID for a Inference Pool

func NewInferencePoolID

func NewInferencePoolID(subscriptionId string, resourceGroupName string, workspaceName string, inferencePoolName string) InferencePoolId

NewInferencePoolID returns a new InferencePoolId struct

func ParseInferencePoolID

func ParseInferencePoolID(input string) (*InferencePoolId, error)

ParseInferencePoolID parses 'input' into a InferencePoolId

func ParseInferencePoolIDInsensitively

func ParseInferencePoolIDInsensitively(input string) (*InferencePoolId, error)

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

func (*InferencePoolId) FromParseResult

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

func (InferencePoolId) ID

func (id InferencePoolId) ID() string

ID returns the formatted Inference Pool ID

func (InferencePoolId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Inference Pool ID

func (InferencePoolId) String

func (id InferencePoolId) String() string

String returns a human-readable description of this Inference Pool ID

type ListCompleteResult

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

type ListCustomPager

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

type ListOperationOptions

type ListOperationOptions struct {
	Count      *int64
	OrderBy    *OrderString
	Properties *string
	Skip       *string
	Tags       *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        *[]InferenceGroupTrackedResource
}

type ListSkusCompleteResult

type ListSkusCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SkuResource
}

type ListSkusCustomPager

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

type ListSkusOperationOptions

type ListSkusOperationOptions struct {
	Count *int64
	Skip  *string
}

func DefaultListSkusOperationOptions

func DefaultListSkusOperationOptions() ListSkusOperationOptions

func (ListSkusOperationOptions) ToHeaders

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

func (ListSkusOperationOptions) ToOData

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

func (ListSkusOperationOptions) ToQuery

type ListSkusOperationResponse

type ListSkusOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SkuResource
}

type OrderString

type OrderString string
const (
	OrderStringCreatedAtAsc  OrderString = "CreatedAtAsc"
	OrderStringCreatedAtDesc OrderString = "CreatedAtDesc"
	OrderStringUpdatedAtAsc  OrderString = "UpdatedAtAsc"
	OrderStringUpdatedAtDesc OrderString = "UpdatedAtDesc"
)

func (*OrderString) UnmarshalJSON

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

type PartialMinimalTrackedResourceWithSku

type PartialMinimalTrackedResourceWithSku struct {
	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 PoolProvisioningState

type PoolProvisioningState string
const (
	PoolProvisioningStateCanceled  PoolProvisioningState = "Canceled"
	PoolProvisioningStateCreating  PoolProvisioningState = "Creating"
	PoolProvisioningStateDeleting  PoolProvisioningState = "Deleting"
	PoolProvisioningStateFailed    PoolProvisioningState = "Failed"
	PoolProvisioningStateSucceeded PoolProvisioningState = "Succeeded"
	PoolProvisioningStateUpdating  PoolProvisioningState = "Updating"
)

func (*PoolProvisioningState) UnmarshalJSON

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

type ProbeSettings

type ProbeSettings struct {
	FailureThreshold *int64  `json:"failureThreshold,omitempty"`
	InitialDelay     *string `json:"initialDelay,omitempty"`
	Period           *string `json:"period,omitempty"`
	SuccessThreshold *int64  `json:"successThreshold,omitempty"`
	Timeout          *string `json:"timeout,omitempty"`
}

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 SkuCapacity

type SkuCapacity struct {
	Default   *int64        `json:"default,omitempty"`
	Maximum   *int64        `json:"maximum,omitempty"`
	Minimum   *int64        `json:"minimum,omitempty"`
	ScaleType *SkuScaleType `json:"scaleType,omitempty"`
}

type SkuResource

type SkuResource struct {
	Capacity     *SkuCapacity `json:"capacity,omitempty"`
	ResourceType *string      `json:"resourceType,omitempty"`
	Sku          *SkuSetting  `json:"sku,omitempty"`
}

type SkuResourceOperationPredicate

type SkuResourceOperationPredicate struct {
	ResourceType *string
}

func (SkuResourceOperationPredicate) Matches

type SkuScaleType

type SkuScaleType string
const (
	SkuScaleTypeAutomatic SkuScaleType = "Automatic"
	SkuScaleTypeManual    SkuScaleType = "Manual"
	SkuScaleTypeNone      SkuScaleType = "None"
)

func (*SkuScaleType) UnmarshalJSON

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

type SkuSetting

type SkuSetting struct {
	Name string   `json:"name"`
	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 StringStringKeyValuePair

type StringStringKeyValuePair struct {
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
}

type UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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