quotas

package
v0.20240826.1115152 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/loadtestservice/2022-12-01/quotas Documentation

The quotas SDK allows for interaction with the Azure Resource Manager Service loadtestservice (API Version 2022-12-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/loadtestservice/2022-12-01/quotas"

Client Initialization

client := quotas.NewQuotasClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QuotasClient.CheckAvailability

ctx := context.TODO()
id := quotas.NewQuotaID("12345678-1234-9876-4563-123456789012", "locationValue", "quotaValue")

payload := quotas.QuotaBucketRequest{
	// ...
}


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

Example Usage: QuotasClient.Get

ctx := context.TODO()
id := quotas.NewQuotaID("12345678-1234-9876-4563-123456789012", "locationValue", "quotaValue")

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: QuotasClient.List

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

// 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
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForResourceState

func PossibleValuesForResourceState() []string

func ValidateLocationID

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

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

func ValidateQuotaID

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

ValidateQuotaID checks that 'input' can be parsed as a Quota ID

Types

type CheckAvailabilityOperationResponse

type CheckAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CheckQuotaAvailabilityResponse
}

type CheckQuotaAvailabilityResponse

type CheckQuotaAvailabilityResponse struct {
	Id         string                                    `json:"id"`
	Name       *string                                   `json:"name,omitempty"`
	Properties *CheckQuotaAvailabilityResponseProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData                    `json:"systemData,omitempty"`
	Type       string                                    `json:"type"`
}

type CheckQuotaAvailabilityResponseProperties

type CheckQuotaAvailabilityResponseProperties struct {
	AvailabilityStatus *string `json:"availabilityStatus,omitempty"`
	IsAvailable        *bool   `json:"isAvailable,omitempty"`
}

type GetOperationResponse

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

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

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        *[]QuotaResource
}

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 QuotaBucketRequest

type QuotaBucketRequest struct {
	Properties *QuotaBucketRequestProperties `json:"properties,omitempty"`
}

type QuotaBucketRequestProperties

type QuotaBucketRequestProperties struct {
	CurrentQuota *int64                                  `json:"currentQuota,omitempty"`
	CurrentUsage *int64                                  `json:"currentUsage,omitempty"`
	Dimensions   *QuotaBucketRequestPropertiesDimensions `json:"dimensions,omitempty"`
	NewQuota     *int64                                  `json:"newQuota,omitempty"`
}

type QuotaBucketRequestPropertiesDimensions

type QuotaBucketRequestPropertiesDimensions struct {
	Location       *string `json:"location,omitempty"`
	SubscriptionId *string `json:"subscriptionId,omitempty"`
}

type QuotaId

type QuotaId struct {
	SubscriptionId string
	LocationName   string
	QuotaName      string
}

QuotaId is a struct representing the Resource ID for a Quota

func NewQuotaID

func NewQuotaID(subscriptionId string, locationName string, quotaName string) QuotaId

NewQuotaID returns a new QuotaId struct

func ParseQuotaID

func ParseQuotaID(input string) (*QuotaId, error)

ParseQuotaID parses 'input' into a QuotaId

func ParseQuotaIDInsensitively

func ParseQuotaIDInsensitively(input string) (*QuotaId, error)

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

func (*QuotaId) FromParseResult

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

func (QuotaId) ID

func (id QuotaId) ID() string

ID returns the formatted Quota ID

func (QuotaId) Segments

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

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

func (QuotaId) String

func (id QuotaId) String() string

String returns a human-readable description of this Quota ID

type QuotaResource

type QuotaResource struct {
	Id         *string                  `json:"id,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *QuotaResourceProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData   `json:"systemData,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type QuotaResourceOperationPredicate

type QuotaResourceOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (QuotaResourceOperationPredicate) Matches

type QuotaResourceProperties

type QuotaResourceProperties struct {
	Limit             *int64         `json:"limit,omitempty"`
	ProvisioningState *ResourceState `json:"provisioningState,omitempty"`
	Usage             *int64         `json:"usage,omitempty"`
}

type QuotasClient

type QuotasClient struct {
	Client *resourcemanager.Client
}

func NewQuotasClientWithBaseURI

func NewQuotasClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotasClient, error)

func (QuotasClient) CheckAvailability

func (c QuotasClient) CheckAvailability(ctx context.Context, id QuotaId, input QuotaBucketRequest) (result CheckAvailabilityOperationResponse, err error)

CheckAvailability ...

func (QuotasClient) Get

func (c QuotasClient) Get(ctx context.Context, id QuotaId) (result GetOperationResponse, err error)

Get ...

func (QuotasClient) List

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

List ...

func (QuotasClient) ListComplete

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

ListComplete retrieves all the results into a single object

func (QuotasClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ResourceState

type ResourceState string
const (
	ResourceStateCanceled  ResourceState = "Canceled"
	ResourceStateDeleted   ResourceState = "Deleted"
	ResourceStateFailed    ResourceState = "Failed"
	ResourceStateSucceeded ResourceState = "Succeeded"
)

func (*ResourceState) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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