quotas

package
v0.20221129.1151133 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MPL-2.0 Imports: 9 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", "quotaBucketValue")

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", "quotaBucketValue")

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
	Model        *CheckQuotaAvailabilityResponse
}

type CheckQuotaAvailabilityResponse

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

type CheckQuotaAvailabilityResponseProperties

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

type GetOperationResponse

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

type ListCompleteResult

type ListCompleteResult struct {
	Items []QuotaResource
}

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]QuotaResource
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type LocationId

type LocationId struct {
	SubscriptionId string
	Location       string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, location 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) 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 {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *QuotaBucketRequestProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData        `json:"systemData,omitempty"`
	Type       *string                       `json:"type,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
	Location        string
	QuotaBucketName string
}

QuotaId is a struct representing the Resource ID for a Quota

func NewQuotaID

func NewQuotaID(subscriptionId string, location string, quotaBucketName 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) 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 autorest.Client
	// contains filtered or unexported fields
}

func NewQuotasClientWithBaseURI

func NewQuotasClientWithBaseURI(endpoint string) QuotasClient

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) (resp ListOperationResponse, err error)

List ...

func (QuotasClient) ListComplete

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

ListComplete retrieves all of the results into a single object

func (QuotasClient) ListCompleteMatchingPredicate

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

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type ResourceState

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

Jump to

Keyboard shortcuts

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