quotabycounterkeys

package
v0.20240212.1141705 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2022-08-01/quotabycounterkeys Documentation

The quotabycounterkeys SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2022-08-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/apimanagement/2022-08-01/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")

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

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 ListByServiceOperationResponse

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

type QuotaByCounterKeysClient

type QuotaByCounterKeysClient struct {
	Client *resourcemanager.Client
}

func NewQuotaByCounterKeysClientWithBaseURI

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

func (QuotaByCounterKeysClient) ListByService

ListByService ...

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