usages

package
v0.20240110.1151535 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/search/2023-11-01/usages Documentation

The usages SDK allows for interaction with the Azure Resource Manager Service search (API Version 2023-11-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/search/2023-11-01/usages"

Client Initialization

client := usages.NewUsagesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UsagesClient.ListBySubscription

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

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

Example Usage: UsagesClient.UsageBySubscriptionSku

ctx := context.TODO()
id := usages.NewUsageID("12345678-1234-9876-4563-123456789012", "locationValue", "usageValue")

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateLocationID

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

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

func ValidateUsageID

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

ValidateUsageID checks that 'input' can be parsed as a Usage ID

Types

type ListBySubscriptionCompleteResult

type ListBySubscriptionCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []QuotaUsageResult
}

type ListBySubscriptionOperationOptions

type ListBySubscriptionOperationOptions struct {
	XMsClientRequestId *string
}

func DefaultListBySubscriptionOperationOptions

func DefaultListBySubscriptionOperationOptions() ListBySubscriptionOperationOptions

func (ListBySubscriptionOperationOptions) ToHeaders

func (ListBySubscriptionOperationOptions) ToOData

func (ListBySubscriptionOperationOptions) ToQuery

type ListBySubscriptionOperationResponse

type ListBySubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]QuotaUsageResult
}

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

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 QuotaUsageResult

type QuotaUsageResult struct {
	CurrentValue *int64                `json:"currentValue,omitempty"`
	Id           *string               `json:"id,omitempty"`
	Limit        *int64                `json:"limit,omitempty"`
	Name         *QuotaUsageResultName `json:"name,omitempty"`
	Unit         *string               `json:"unit,omitempty"`
}

type QuotaUsageResultName

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

type QuotaUsageResultOperationPredicate

type QuotaUsageResultOperationPredicate struct {
	CurrentValue *int64
	Id           *string
	Limit        *int64
	Unit         *string
}

func (QuotaUsageResultOperationPredicate) Matches

type UsageBySubscriptionSkuOperationOptions

type UsageBySubscriptionSkuOperationOptions struct {
	XMsClientRequestId *string
}

func DefaultUsageBySubscriptionSkuOperationOptions

func DefaultUsageBySubscriptionSkuOperationOptions() UsageBySubscriptionSkuOperationOptions

func (UsageBySubscriptionSkuOperationOptions) ToHeaders

func (UsageBySubscriptionSkuOperationOptions) ToOData

func (UsageBySubscriptionSkuOperationOptions) ToQuery

type UsageBySubscriptionSkuOperationResponse

type UsageBySubscriptionSkuOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *QuotaUsageResult
}

type UsageId

type UsageId struct {
	SubscriptionId string
	LocationName   string
	UsageName      string
}

UsageId is a struct representing the Resource ID for a Usage

func NewUsageID

func NewUsageID(subscriptionId string, locationName string, usageName string) UsageId

NewUsageID returns a new UsageId struct

func ParseUsageID

func ParseUsageID(input string) (*UsageId, error)

ParseUsageID parses 'input' into a UsageId

func ParseUsageIDInsensitively

func ParseUsageIDInsensitively(input string) (*UsageId, error)

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

func (*UsageId) FromParseResult added in v0.20231127.1171502

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

func (UsageId) ID

func (id UsageId) ID() string

ID returns the formatted Usage ID

func (UsageId) Segments

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

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

func (UsageId) String

func (id UsageId) String() string

String returns a human-readable description of this Usage ID

type UsagesClient

type UsagesClient struct {
	Client *resourcemanager.Client
}

func NewUsagesClientWithBaseURI

func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error)

func (UsagesClient) ListBySubscription

ListBySubscription ...

func (UsagesClient) ListBySubscriptionComplete

ListBySubscriptionComplete retrieves all the results into a single object

func (UsagesClient) ListBySubscriptionCompleteMatchingPredicate

func (c UsagesClient) ListBySubscriptionCompleteMatchingPredicate(ctx context.Context, id LocationId, options ListBySubscriptionOperationOptions, predicate QuotaUsageResultOperationPredicate) (result ListBySubscriptionCompleteResult, err error)

ListBySubscriptionCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UsagesClient) UsageBySubscriptionSku

UsageBySubscriptionSku ...

Jump to

Keyboard shortcuts

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