quota

package
v0.20250115.1141151 Latest Latest
Warning

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

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

README

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

The quota 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/quota"

Client Initialization

client := quota.NewQuotaClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QuotaClient.List

ctx := context.TODO()
id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName")

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

Example Usage: QuotaClient.PTUQuotaGetAvailable

ctx := context.TODO()
id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName")

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

Example Usage: QuotaClient.PTUQuotaList

ctx := context.TODO()
id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName")

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

Example Usage: QuotaClient.PTUQuotaListAvailable

ctx := context.TODO()
id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName")

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

Example Usage: QuotaClient.Update

ctx := context.TODO()
id := quota.NewLocationID("12345678-1234-9876-4563-123456789012", "locationName")

payload := quota.QuotaUpdateParameters{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForQuotaUnit

func PossibleValuesForQuotaUnit() []string

func PossibleValuesForStatus

func PossibleValuesForStatus() []string

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

Types

type AvailableQuota added in v0.20250114.1063937

type AvailableQuota struct {
	Properties *AvailableQuotaProperties `json:"properties,omitempty"`
}

type AvailableQuotaOperationPredicate added in v0.20250114.1063937

type AvailableQuotaOperationPredicate struct {
}

func (AvailableQuotaOperationPredicate) Matches added in v0.20250114.1063937

type AvailableQuotaProperties added in v0.20250114.1063937

type AvailableQuotaProperties struct {
	Total *int64 `json:"total,omitempty"`
}

type ListCompleteResult

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

type ListCustomPager

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

type ListOperationResponse

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

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (*LocationId) FromParseResult

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type PTUDeploymentUsage added in v0.20250114.1063937

type PTUDeploymentUsage struct {
	CollectionQuotaUsage *int64  `json:"collectionQuotaUsage,omitempty"`
	DeploymentName       *string `json:"deploymentName,omitempty"`
	ResourceGroup        *string `json:"resourceGroup,omitempty"`
	Usage                *int64  `json:"usage,omitempty"`
	WorkspaceName        *string `json:"workspaceName,omitempty"`
}

type PTUQuotaGetAvailableOperationResponse added in v0.20250114.1063937

type PTUQuotaGetAvailableOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *AvailableQuota
}

type PTUQuotaListAvailableCompleteResult added in v0.20250114.1063937

type PTUQuotaListAvailableCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AvailableQuota
}

type PTUQuotaListAvailableCustomPager added in v0.20250114.1063937

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

type PTUQuotaListAvailableOperationOptions added in v0.20250114.1063937

type PTUQuotaListAvailableOperationOptions struct {
	Skip *string
}

func DefaultPTUQuotaListAvailableOperationOptions added in v0.20250114.1063937

func DefaultPTUQuotaListAvailableOperationOptions() PTUQuotaListAvailableOperationOptions

func (PTUQuotaListAvailableOperationOptions) ToHeaders added in v0.20250114.1063937

func (PTUQuotaListAvailableOperationOptions) ToOData added in v0.20250114.1063937

func (PTUQuotaListAvailableOperationOptions) ToQuery added in v0.20250114.1063937

type PTUQuotaListAvailableOperationResponse added in v0.20250114.1063937

type PTUQuotaListAvailableOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AvailableQuota
}

type PTUQuotaListCompleteResult added in v0.20250114.1063937

type PTUQuotaListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []UsageAndQuotaDetails
}

type PTUQuotaListCustomPager added in v0.20250114.1063937

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

type PTUQuotaListOperationOptions added in v0.20250114.1063937

type PTUQuotaListOperationOptions struct {
	Skip *string
}

func DefaultPTUQuotaListOperationOptions added in v0.20250114.1063937

func DefaultPTUQuotaListOperationOptions() PTUQuotaListOperationOptions

func (PTUQuotaListOperationOptions) ToHeaders added in v0.20250114.1063937

func (PTUQuotaListOperationOptions) ToOData added in v0.20250114.1063937

func (PTUQuotaListOperationOptions) ToQuery added in v0.20250114.1063937

type PTUQuotaListOperationResponse added in v0.20250114.1063937

type PTUQuotaListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]UsageAndQuotaDetails
}

type QuotaBaseProperties

type QuotaBaseProperties struct {
	Id    *string    `json:"id,omitempty"`
	Limit *int64     `json:"limit,omitempty"`
	Type  *string    `json:"type,omitempty"`
	Unit  *QuotaUnit `json:"unit,omitempty"`
}

type QuotaClient

type QuotaClient struct {
	Client *resourcemanager.Client
}

func NewQuotaClientWithBaseURI

func NewQuotaClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaClient, error)

func (QuotaClient) List

func (c QuotaClient) List(ctx context.Context, id LocationId) (result ListOperationResponse, err error)

List ...

func (QuotaClient) ListComplete

func (c QuotaClient) ListComplete(ctx context.Context, id LocationId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (QuotaClient) ListCompleteMatchingPredicate

func (c QuotaClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate ResourceQuotaOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QuotaClient) PTUQuotaGetAvailable added in v0.20250114.1063937

func (c QuotaClient) PTUQuotaGetAvailable(ctx context.Context, id LocationId) (result PTUQuotaGetAvailableOperationResponse, err error)

PTUQuotaGetAvailable ...

func (QuotaClient) PTUQuotaList added in v0.20250114.1063937

PTUQuotaList ...

func (QuotaClient) PTUQuotaListAvailable added in v0.20250114.1063937

PTUQuotaListAvailable ...

func (QuotaClient) PTUQuotaListAvailableComplete added in v0.20250114.1063937

PTUQuotaListAvailableComplete retrieves all the results into a single object

func (QuotaClient) PTUQuotaListAvailableCompleteMatchingPredicate added in v0.20250114.1063937

func (c QuotaClient) PTUQuotaListAvailableCompleteMatchingPredicate(ctx context.Context, id LocationId, options PTUQuotaListAvailableOperationOptions, predicate AvailableQuotaOperationPredicate) (result PTUQuotaListAvailableCompleteResult, err error)

PTUQuotaListAvailableCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QuotaClient) PTUQuotaListComplete added in v0.20250114.1063937

PTUQuotaListComplete retrieves all the results into a single object

func (QuotaClient) PTUQuotaListCompleteMatchingPredicate added in v0.20250114.1063937

func (c QuotaClient) PTUQuotaListCompleteMatchingPredicate(ctx context.Context, id LocationId, options PTUQuotaListOperationOptions, predicate UsageAndQuotaDetailsOperationPredicate) (result PTUQuotaListCompleteResult, err error)

PTUQuotaListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QuotaClient) Update

Update ...

func (QuotaClient) UpdateComplete

UpdateComplete retrieves all the results into a single object

func (QuotaClient) UpdateCompleteMatchingPredicate

func (c QuotaClient) UpdateCompleteMatchingPredicate(ctx context.Context, id LocationId, input QuotaUpdateParameters, predicate UpdateWorkspaceQuotasOperationPredicate) (result UpdateCompleteResult, err error)

UpdateCompleteMatchingPredicate retrieves all the results and then applies the predicate

type QuotaUnit

type QuotaUnit string
const (
	QuotaUnitCount QuotaUnit = "Count"
)

func (*QuotaUnit) UnmarshalJSON

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

type QuotaUpdateParameters

type QuotaUpdateParameters struct {
	Location *string                `json:"location,omitempty"`
	Value    *[]QuotaBaseProperties `json:"value,omitempty"`
}

type ResourceName

type ResourceName struct {
	LocalizedValue *string `json:"localizedValue,omitempty"`
	Value          *string `json:"value,omitempty"`
}

type ResourceQuota

type ResourceQuota struct {
	AmlWorkspaceLocation *string       `json:"amlWorkspaceLocation,omitempty"`
	Id                   *string       `json:"id,omitempty"`
	Limit                *int64        `json:"limit,omitempty"`
	Name                 *ResourceName `json:"name,omitempty"`
	Type                 *string       `json:"type,omitempty"`
	Unit                 *QuotaUnit    `json:"unit,omitempty"`
}

type ResourceQuotaOperationPredicate

type ResourceQuotaOperationPredicate struct {
	AmlWorkspaceLocation *string
	Id                   *string
	Limit                *int64
	Type                 *string
}

func (ResourceQuotaOperationPredicate) Matches

type Status

type Status string
const (
	StatusFailure                              Status = "Failure"
	StatusInvalidQuotaBelowClusterMinimum      Status = "InvalidQuotaBelowClusterMinimum"
	StatusInvalidQuotaExceedsSubscriptionLimit Status = "InvalidQuotaExceedsSubscriptionLimit"
	StatusInvalidVMFamilyName                  Status = "InvalidVMFamilyName"
	StatusOperationNotEnabledForRegion         Status = "OperationNotEnabledForRegion"
	StatusOperationNotSupportedForSku          Status = "OperationNotSupportedForSku"
	StatusSuccess                              Status = "Success"
	StatusUndefined                            Status = "Undefined"
)

func (*Status) UnmarshalJSON

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

type UpdateCompleteResult

type UpdateCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []UpdateWorkspaceQuotas
}

type UpdateCustomPager

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

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]UpdateWorkspaceQuotas
}

type UpdateWorkspaceQuotas

type UpdateWorkspaceQuotas struct {
	Id     *string    `json:"id,omitempty"`
	Limit  *int64     `json:"limit,omitempty"`
	Status *Status    `json:"status,omitempty"`
	Type   *string    `json:"type,omitempty"`
	Unit   *QuotaUnit `json:"unit,omitempty"`
}

type UpdateWorkspaceQuotasOperationPredicate

type UpdateWorkspaceQuotasOperationPredicate struct {
	Id    *string
	Limit *int64
	Type  *string
}

func (UpdateWorkspaceQuotasOperationPredicate) Matches

type UsageAndQuotaDetails added in v0.20250114.1063937

type UsageAndQuotaDetails struct {
	ModelCollection *string               `json:"modelCollection,omitempty"`
	Quota           *int64                `json:"quota,omitempty"`
	UsageDetails    *[]PTUDeploymentUsage `json:"usageDetails,omitempty"`
}

type UsageAndQuotaDetailsOperationPredicate added in v0.20250114.1063937

type UsageAndQuotaDetailsOperationPredicate struct {
	ModelCollection *string
	Quota           *int64
}

func (UsageAndQuotaDetailsOperationPredicate) Matches added in v0.20250114.1063937

Jump to

Keyboard shortcuts

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