quotabycounterkeys

package
v0.20240710.1100952 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/quotabycounterkeys Documentation

The quotabycounterkeys SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-05-01-preview).

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/apimanagement/2023-05-01-preview/quotabycounterkeys"

Client Initialization

client := quotabycounterkeys.NewQuotaByCounterKeysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QuotaByCounterKeysClient.ListByService

ctx := context.TODO()
id := quotabycounterkeys.NewQuotaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "quotaCounterKeyValue")

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

Example Usage: QuotaByCounterKeysClient.Update

ctx := context.TODO()
id := quotabycounterkeys.NewQuotaID("12345678-1234-9876-4563-123456789012", "example-resource-group", "serviceValue", "quotaCounterKeyValue")

payload := quotabycounterkeys.QuotaCounterValueUpdateContract{
	// ...
}


read, err := client.Update(ctx, id, payload)
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 ValidateQuotaID

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

ValidateQuotaID checks that 'input' can be parsed as a Quota ID

Types

type ListByServiceCompleteResult added in v0.20240226.1173038

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []QuotaCounterContract
}

type ListByServiceCustomPager added in v0.20240628.1153531

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

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]QuotaCounterContract
}

type QuotaByCounterKeysClient

type QuotaByCounterKeysClient struct {
	Client *resourcemanager.Client
}

func NewQuotaByCounterKeysClientWithBaseURI

func NewQuotaByCounterKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByCounterKeysClient, error)

func (QuotaByCounterKeysClient) ListByService

ListByService ...

func (QuotaByCounterKeysClient) ListByServiceComplete added in v0.20240226.1173038

ListByServiceComplete retrieves all the results into a single object

func (QuotaByCounterKeysClient) ListByServiceCompleteMatchingPredicate added in v0.20240226.1173038

func (c QuotaByCounterKeysClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id QuotaId, predicate QuotaCounterContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (QuotaByCounterKeysClient) Update

Update ...

type QuotaCounterCollection

type QuotaCounterCollection struct {
	Count    *int64                  `json:"count,omitempty"`
	NextLink *string                 `json:"nextLink,omitempty"`
	Value    *[]QuotaCounterContract `json:"value,omitempty"`
}

type QuotaCounterContract

type QuotaCounterContract struct {
	CounterKey      string                               `json:"counterKey"`
	PeriodEndTime   string                               `json:"periodEndTime"`
	PeriodKey       string                               `json:"periodKey"`
	PeriodStartTime string                               `json:"periodStartTime"`
	Value           *QuotaCounterValueContractProperties `json:"value,omitempty"`
}

func (*QuotaCounterContract) GetPeriodEndTimeAsTime

func (o *QuotaCounterContract) GetPeriodEndTimeAsTime() (*time.Time, error)

func (*QuotaCounterContract) GetPeriodStartTimeAsTime

func (o *QuotaCounterContract) GetPeriodStartTimeAsTime() (*time.Time, error)

func (*QuotaCounterContract) SetPeriodEndTimeAsTime

func (o *QuotaCounterContract) SetPeriodEndTimeAsTime(input time.Time)

func (*QuotaCounterContract) SetPeriodStartTimeAsTime

func (o *QuotaCounterContract) SetPeriodStartTimeAsTime(input time.Time)

type QuotaCounterContractOperationPredicate added in v0.20240226.1173038

type QuotaCounterContractOperationPredicate struct {
	CounterKey      *string
	PeriodEndTime   *string
	PeriodKey       *string
	PeriodStartTime *string
}

func (QuotaCounterContractOperationPredicate) Matches added in v0.20240226.1173038

type QuotaCounterValueContractProperties

type QuotaCounterValueContractProperties struct {
	CallsCount    *int64   `json:"callsCount,omitempty"`
	KbTransferred *float64 `json:"kbTransferred,omitempty"`
}

type QuotaCounterValueUpdateContract

type QuotaCounterValueUpdateContract struct {
	Properties *QuotaCounterValueContractProperties `json:"properties,omitempty"`
}

type QuotaId

type QuotaId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	QuotaCounterKey   string
}

QuotaId is a struct representing the Resource ID for a Quota

func NewQuotaID

func NewQuotaID(subscriptionId string, resourceGroupName string, serviceName string, quotaCounterKey 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) FromParseResult

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

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 UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *QuotaCounterCollection
}

Jump to

Keyboard shortcuts

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