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")
// 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 ¶
- func ValidateQuotaID(input interface{}, key string) (warnings []string, errors []error)
- type ListByServiceCompleteResult
- type ListByServiceOperationResponse
- type QuotaByCounterKeysClient
- func (c QuotaByCounterKeysClient) ListByService(ctx context.Context, id QuotaId) (result ListByServiceOperationResponse, err error)
- func (c QuotaByCounterKeysClient) ListByServiceComplete(ctx context.Context, id QuotaId) (ListByServiceCompleteResult, error)
- func (c QuotaByCounterKeysClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id QuotaId, ...) (result ListByServiceCompleteResult, err error)
- func (c QuotaByCounterKeysClient) Update(ctx context.Context, id QuotaId, input QuotaCounterValueUpdateContract) (result UpdateOperationResponse, err error)
- type QuotaCounterCollection
- type QuotaCounterContract
- type QuotaCounterContractOperationPredicate
- type QuotaCounterValueContractProperties
- type QuotaCounterValueUpdateContract
- type QuotaId
- type UpdateOperationResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateQuotaID ¶
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 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 ¶
func (c QuotaByCounterKeysClient) ListByService(ctx context.Context, id QuotaId) (result ListByServiceOperationResponse, err error)
ListByService ...
func (QuotaByCounterKeysClient) ListByServiceComplete ¶ added in v0.20240226.1173038
func (c QuotaByCounterKeysClient) ListByServiceComplete(ctx context.Context, id QuotaId) (ListByServiceCompleteResult, error)
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 ¶
func (c QuotaByCounterKeysClient) Update(ctx context.Context, id QuotaId, input QuotaCounterValueUpdateContract) (result UpdateOperationResponse, err error)
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
func (p QuotaCounterContractOperationPredicate) Matches(input QuotaCounterContract) bool
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 ¶
ParseQuotaID parses 'input' into a QuotaId
func ParseQuotaIDInsensitively ¶
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) Segments ¶
func (id QuotaId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Quota ID
type UpdateOperationResponse ¶
type UpdateOperationResponse struct { HttpResponse *http.Response OData *odata.OData Model *QuotaCounterCollection }