quotainformation

package
v0.20240422.1112441 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/quota/2023-02-01/quotainformation Documentation

The quotainformation SDK allows for interaction with the Azure Resource Manager Service quota (API Version 2023-02-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/quota/2023-02-01/quotainformation"

Client Initialization

client := quotainformation.NewQuotaInformationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QuotaInformationClient.QuotaCreateOrUpdate

ctx := context.TODO()
id := quotainformation.NewScopedQuotaID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "quotaValue")

payload := quotainformation.CurrentQuotaLimitBase{
	// ...
}


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

Example Usage: QuotaInformationClient.QuotaGet

ctx := context.TODO()
id := quotainformation.NewScopedQuotaID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "quotaValue")

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

Example Usage: QuotaInformationClient.QuotaList

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: QuotaInformationClient.QuotaUpdate

ctx := context.TODO()
id := quotainformation.NewScopedQuotaID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "quotaValue")

payload := quotainformation.CurrentQuotaLimitBase{
	// ...
}


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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLimitType

func PossibleValuesForLimitType() []string

func PossibleValuesForQuotaLimitTypes

func PossibleValuesForQuotaLimitTypes() []string

func ValidateScopedQuotaID

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

ValidateScopedQuotaID checks that 'input' can be parsed as a Scoped Quota ID

Types

type CurrentQuotaLimitBase

type CurrentQuotaLimitBase struct {
	Id         *string          `json:"id,omitempty"`
	Name       *string          `json:"name,omitempty"`
	Properties *QuotaProperties `json:"properties,omitempty"`
	Type       *string          `json:"type,omitempty"`
}

type CurrentQuotaLimitBaseOperationPredicate

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

func (CurrentQuotaLimitBaseOperationPredicate) Matches

type LimitJsonObject

type LimitJsonObject interface {
}

type LimitObject

type LimitObject struct {
	LimitType *QuotaLimitTypes `json:"limitType,omitempty"`
	Value     int64            `json:"value"`
}

func (LimitObject) MarshalJSON

func (s LimitObject) MarshalJSON() ([]byte, error)

type LimitType

type LimitType string
const (
	LimitTypeLimitValue LimitType = "LimitValue"
)

func (*LimitType) UnmarshalJSON

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

type QuotaCreateOrUpdateOperationResponse

type QuotaCreateOrUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CurrentQuotaLimitBase
}

type QuotaGetOperationResponse

type QuotaGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CurrentQuotaLimitBase
}

type QuotaInformationClient

type QuotaInformationClient struct {
	Client *resourcemanager.Client
}

func NewQuotaInformationClientWithBaseURI

func NewQuotaInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaInformationClient, error)

func (QuotaInformationClient) QuotaCreateOrUpdate

QuotaCreateOrUpdate ...

func (QuotaInformationClient) QuotaCreateOrUpdateThenPoll

func (c QuotaInformationClient) QuotaCreateOrUpdateThenPoll(ctx context.Context, id ScopedQuotaId, input CurrentQuotaLimitBase) error

QuotaCreateOrUpdateThenPoll performs QuotaCreateOrUpdate then polls until it's completed

func (QuotaInformationClient) QuotaGet

QuotaGet ...

func (QuotaInformationClient) QuotaList

QuotaList ...

func (QuotaInformationClient) QuotaListComplete

QuotaListComplete retrieves all the results into a single object

func (QuotaInformationClient) QuotaListCompleteMatchingPredicate

func (c QuotaInformationClient) QuotaListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate CurrentQuotaLimitBaseOperationPredicate) (result QuotaListCompleteResult, err error)

QuotaListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QuotaInformationClient) QuotaUpdate

QuotaUpdate ...

func (QuotaInformationClient) QuotaUpdateThenPoll

func (c QuotaInformationClient) QuotaUpdateThenPoll(ctx context.Context, id ScopedQuotaId, input CurrentQuotaLimitBase) error

QuotaUpdateThenPoll performs QuotaUpdate then polls until it's completed

type QuotaLimitTypes

type QuotaLimitTypes string
const (
	QuotaLimitTypesIndependent QuotaLimitTypes = "Independent"
	QuotaLimitTypesShared      QuotaLimitTypes = "Shared"
)

func (*QuotaLimitTypes) UnmarshalJSON

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

type QuotaListCompleteResult

type QuotaListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CurrentQuotaLimitBase
}

type QuotaListOperationResponse

type QuotaListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CurrentQuotaLimitBase
}

type QuotaProperties

type QuotaProperties struct {
	IsQuotaApplicable *bool           `json:"isQuotaApplicable,omitempty"`
	Limit             LimitJsonObject `json:"limit"`
	Name              *ResourceName   `json:"name,omitempty"`
	Properties        *interface{}    `json:"properties,omitempty"`
	QuotaPeriod       *string         `json:"quotaPeriod,omitempty"`
	ResourceType      *string         `json:"resourceType,omitempty"`
	Unit              *string         `json:"unit,omitempty"`
}

func (*QuotaProperties) UnmarshalJSON

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

type QuotaUpdateOperationResponse

type QuotaUpdateOperationResponse struct {
	Poller       pollers.Poller
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CurrentQuotaLimitBase
}

type RawLimitJsonObjectImpl

type RawLimitJsonObjectImpl struct {
	Type   string
	Values map[string]interface{}
}

RawLimitJsonObjectImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

type ResourceName

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

type ScopedQuotaId

type ScopedQuotaId struct {
	Scope     string
	QuotaName string
}

ScopedQuotaId is a struct representing the Resource ID for a Scoped Quota

func NewScopedQuotaID

func NewScopedQuotaID(scope string, quotaName string) ScopedQuotaId

NewScopedQuotaID returns a new ScopedQuotaId struct

func ParseScopedQuotaID

func ParseScopedQuotaID(input string) (*ScopedQuotaId, error)

ParseScopedQuotaID parses 'input' into a ScopedQuotaId

func ParseScopedQuotaIDInsensitively

func ParseScopedQuotaIDInsensitively(input string) (*ScopedQuotaId, error)

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

func (*ScopedQuotaId) FromParseResult

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

func (ScopedQuotaId) ID

func (id ScopedQuotaId) ID() string

ID returns the formatted Scoped Quota ID

func (ScopedQuotaId) Segments

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

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

func (ScopedQuotaId) String

func (id ScopedQuotaId) String() string

String returns a human-readable description of this Scoped Quota ID

Jump to

Keyboard shortcuts

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