quotainformation

package
v0.20241209.1115630 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 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 Azure Resource Manager 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", "quotaName")

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

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

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 BaseLimitJsonObjectImpl added in v0.20240920.1135249

type BaseLimitJsonObjectImpl struct {
	LimitObjectType LimitType `json:"limitObjectType"`
}

func (BaseLimitJsonObjectImpl) LimitJsonObject added in v0.20240920.1135249

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 {
	LimitJsonObject() BaseLimitJsonObjectImpl
}

func UnmarshalLimitJsonObjectImplementation added in v0.20240920.1135249

func UnmarshalLimitJsonObjectImplementation(input []byte) (LimitJsonObject, error)

type LimitObject

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

	LimitObjectType LimitType `json:"limitObjectType"`
}

func (LimitObject) LimitJsonObject added in v0.20240920.1135249

func (s LimitObject) LimitJsonObject() BaseLimitJsonObjectImpl

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 QuotaListCustomPager added in v0.20240628.1153531

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

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{}
	// contains filtered or unexported fields
}

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).

func (RawLimitJsonObjectImpl) LimitJsonObject added in v0.20240920.1135249

func (s RawLimitJsonObjectImpl) LimitJsonObject() BaseLimitJsonObjectImpl

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