usagesinformation

package
v0.20240611.1112045 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

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

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

Client Initialization

client := usagesinformation.NewUsagesInformationClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UsagesInformationClient.UsagesGet

ctx := context.TODO()
id := usagesinformation.NewScopedUsageID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "usageValue")

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

Example Usage: UsagesInformationClient.UsagesList

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

// alternatively `client.UsagesList(ctx, id)` can be used to do batched pagination
items, err := client.UsagesListComplete(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 PossibleValuesForUsagesTypes

func PossibleValuesForUsagesTypes() []string

func ValidateScopedUsageID

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

ValidateScopedUsageID checks that 'input' can be parsed as a Scoped Usage ID

Types

type CurrentUsagesBase

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

type CurrentUsagesBaseOperationPredicate

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

func (CurrentUsagesBaseOperationPredicate) Matches

type ResourceName

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

type ScopedUsageId

type ScopedUsageId struct {
	Scope     string
	UsageName string
}

ScopedUsageId is a struct representing the Resource ID for a Scoped Usage

func NewScopedUsageID

func NewScopedUsageID(scope string, usageName string) ScopedUsageId

NewScopedUsageID returns a new ScopedUsageId struct

func ParseScopedUsageID

func ParseScopedUsageID(input string) (*ScopedUsageId, error)

ParseScopedUsageID parses 'input' into a ScopedUsageId

func ParseScopedUsageIDInsensitively

func ParseScopedUsageIDInsensitively(input string) (*ScopedUsageId, error)

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

func (*ScopedUsageId) FromParseResult

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

func (ScopedUsageId) ID

func (id ScopedUsageId) ID() string

ID returns the formatted Scoped Usage ID

func (ScopedUsageId) Segments

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

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

func (ScopedUsageId) String

func (id ScopedUsageId) String() string

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

type UsagesGetOperationResponse

type UsagesGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CurrentUsagesBase
}

type UsagesInformationClient

type UsagesInformationClient struct {
	Client *resourcemanager.Client
}

func NewUsagesInformationClientWithBaseURI

func NewUsagesInformationClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesInformationClient, error)

func (UsagesInformationClient) UsagesGet

UsagesGet ...

func (UsagesInformationClient) UsagesList

UsagesList ...

func (UsagesInformationClient) UsagesListComplete

UsagesListComplete retrieves all the results into a single object

func (UsagesInformationClient) UsagesListCompleteMatchingPredicate

func (c UsagesInformationClient) UsagesListCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, predicate CurrentUsagesBaseOperationPredicate) (result UsagesListCompleteResult, err error)

UsagesListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type UsagesListCompleteResult

type UsagesListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []CurrentUsagesBase
}

type UsagesListOperationResponse

type UsagesListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]CurrentUsagesBase
}

type UsagesObject

type UsagesObject struct {
	UsagesType *UsagesTypes `json:"usagesType,omitempty"`
	Value      int64        `json:"value"`
}

type UsagesProperties

type UsagesProperties struct {
	IsQuotaApplicable *bool         `json:"isQuotaApplicable,omitempty"`
	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"`
	Usages            *UsagesObject `json:"usages,omitempty"`
}

type UsagesTypes

type UsagesTypes string
const (
	UsagesTypesCombined   UsagesTypes = "Combined"
	UsagesTypesIndividual UsagesTypes = "Individual"
)

func (*UsagesTypes) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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