README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2021-08-01/quotabyperiodkeys
Documentation
The quotabyperiodkeys
SDK allows for interaction with the Azure Resource Manager Service apimanagement
(API Version 2021-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/2021-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 ¶
ValidatePeriodID checks that 'input' can be parsed as a Period ID
Types ¶
type GetOperationResponse ¶
type GetOperationResponse struct { HttpResponse *http.Response 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 ¶
ParsePeriodID parses 'input' into a PeriodId
func ParsePeriodIDInsensitively ¶
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) Segments ¶
func (id PeriodId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Period ID
type QuotaByPeriodKeysClient ¶
type QuotaByPeriodKeysClient struct { Client autorest.Client // contains filtered or unexported fields }
func NewQuotaByPeriodKeysClientWithBaseURI ¶
func NewQuotaByPeriodKeysClientWithBaseURI(endpoint string) QuotaByPeriodKeysClient
func (QuotaByPeriodKeysClient) Get ¶
func (c QuotaByPeriodKeysClient) Get(ctx context.Context, id PeriodId) (result GetOperationResponse, err error)
Get ...
func (QuotaByPeriodKeysClient) Update ¶
func (c QuotaByPeriodKeysClient) Update(ctx context.Context, id PeriodId, input QuotaCounterValueUpdateContract) (result UpdateOperationResponse, err error)
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 QuotaCounterValueUpdateContract ¶
type QuotaCounterValueUpdateContract struct {
Properties *QuotaCounterValueContractProperties `json:"properties,omitempty"`
}
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { HttpResponse *http.Response Model *QuotaCounterContract }