quotabyperiodkeys

package
v0.20240819.1075239 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := quotabyperiodkeys.NewQuotaByPeriodKeysClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: QuotaByPeriodKeysClient.Get

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

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

Example Usage: QuotaByPeriodKeysClient.Update

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

payload := quotabyperiodkeys.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 ValidatePeriodID

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

ValidatePeriodID checks that 'input' can be parsed as a Period ID

Types

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *QuotaCounterContract
}

type PeriodId

type PeriodId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	QuotaCounterKey   string
	QuotaPeriodKey    string
}

PeriodId is a struct representing the Resource ID for a Period

func NewPeriodID

func NewPeriodID(subscriptionId string, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string) PeriodId

NewPeriodID returns a new PeriodId struct

func ParsePeriodID

func ParsePeriodID(input string) (*PeriodId, error)

ParsePeriodID parses 'input' into a PeriodId

func ParsePeriodIDInsensitively

func ParsePeriodIDInsensitively(input string) (*PeriodId, error)

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

func (*PeriodId) FromParseResult

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

func (PeriodId) ID

func (id PeriodId) ID() string

ID returns the formatted Period ID

func (PeriodId) Segments

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

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

func (PeriodId) String

func (id PeriodId) String() string

String returns a human-readable description of this Period ID

type QuotaByPeriodKeysClient

type QuotaByPeriodKeysClient struct {
	Client *resourcemanager.Client
}

func NewQuotaByPeriodKeysClientWithBaseURI

func NewQuotaByPeriodKeysClientWithBaseURI(sdkApi sdkEnv.Api) (*QuotaByPeriodKeysClient, error)

func (QuotaByPeriodKeysClient) Get

Get ...

func (QuotaByPeriodKeysClient) Update

Update ...

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 UpdateOperationResponse

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

Jump to

Keyboard shortcuts

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