README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-02-01-preview/usages
Documentation
The usages
SDK allows for interaction with the Azure Resource Manager Service sql
(API Version 2023-02-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/sql/2023-02-01-preview/usages"
Client Initialization
client := usages.NewUsagesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: UsagesClient.ListByInstancePool
ctx := context.TODO()
id := usages.NewInstancePoolID("12345678-1234-9876-4563-123456789012", "example-resource-group", "instancePoolValue")
// alternatively `client.ListByInstancePool(ctx, id, usages.DefaultListByInstancePoolOperationOptions())` can be used to do batched pagination
items, err := client.ListByInstancePoolComplete(ctx, id, usages.DefaultListByInstancePoolOperationOptions())
if err != nil {
// handle the error
}
for _, item := range items {
// do something
}
Documentation ¶
Index ¶
- func ValidateInstancePoolID(input interface{}, key string) (warnings []string, errors []error)
- type InstancePoolId
- type ListByInstancePoolCompleteResult
- type ListByInstancePoolCustomPager
- type ListByInstancePoolOperationOptions
- type ListByInstancePoolOperationResponse
- type Name
- type Usage
- type UsageOperationPredicate
- type UsagesClient
- func (c UsagesClient) ListByInstancePool(ctx context.Context, id InstancePoolId, ...) (result ListByInstancePoolOperationResponse, err error)
- func (c UsagesClient) ListByInstancePoolComplete(ctx context.Context, id InstancePoolId, ...) (ListByInstancePoolCompleteResult, error)
- func (c UsagesClient) ListByInstancePoolCompleteMatchingPredicate(ctx context.Context, id InstancePoolId, ...) (result ListByInstancePoolCompleteResult, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateInstancePoolID ¶
ValidateInstancePoolID checks that 'input' can be parsed as a Instance Pool ID
Types ¶
type InstancePoolId ¶
type InstancePoolId struct { SubscriptionId string ResourceGroupName string InstancePoolName string }
InstancePoolId is a struct representing the Resource ID for a Instance Pool
func NewInstancePoolID ¶
func NewInstancePoolID(subscriptionId string, resourceGroupName string, instancePoolName string) InstancePoolId
NewInstancePoolID returns a new InstancePoolId struct
func ParseInstancePoolID ¶
func ParseInstancePoolID(input string) (*InstancePoolId, error)
ParseInstancePoolID parses 'input' into a InstancePoolId
func ParseInstancePoolIDInsensitively ¶
func ParseInstancePoolIDInsensitively(input string) (*InstancePoolId, error)
ParseInstancePoolIDInsensitively parses 'input' case-insensitively into a InstancePoolId note: this method should only be used for API response data and not user input
func (*InstancePoolId) FromParseResult ¶
func (id *InstancePoolId) FromParseResult(input resourceids.ParseResult) error
func (InstancePoolId) ID ¶
func (id InstancePoolId) ID() string
ID returns the formatted Instance Pool ID
func (InstancePoolId) Segments ¶
func (id InstancePoolId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Instance Pool ID
func (InstancePoolId) String ¶
func (id InstancePoolId) String() string
String returns a human-readable description of this Instance Pool ID
type ListByInstancePoolCustomPager ¶ added in v0.20240628.1153531
func (*ListByInstancePoolCustomPager) NextPageLink ¶ added in v0.20240628.1153531
func (p *ListByInstancePoolCustomPager) NextPageLink() *odata.Link
type ListByInstancePoolOperationOptions ¶
type ListByInstancePoolOperationOptions struct {
ExpandChildren *bool
}
func DefaultListByInstancePoolOperationOptions ¶
func DefaultListByInstancePoolOperationOptions() ListByInstancePoolOperationOptions
func (ListByInstancePoolOperationOptions) ToHeaders ¶
func (o ListByInstancePoolOperationOptions) ToHeaders() *client.Headers
func (ListByInstancePoolOperationOptions) ToOData ¶
func (o ListByInstancePoolOperationOptions) ToOData() *odata.Query
func (ListByInstancePoolOperationOptions) ToQuery ¶
func (o ListByInstancePoolOperationOptions) ToQuery() *client.QueryParams
type Usage ¶
type Usage struct { CurrentValue *int64 `json:"currentValue,omitempty"` Id *string `json:"id,omitempty"` Limit *int64 `json:"limit,omitempty"` Name *Name `json:"name,omitempty"` RequestedLimit *int64 `json:"requestedLimit,omitempty"` Type *string `json:"type,omitempty"` Unit *string `json:"unit,omitempty"` }
type UsageOperationPredicate ¶
type UsageOperationPredicate struct { CurrentValue *int64 Id *string Limit *int64 RequestedLimit *int64 Type *string Unit *string }
func (UsageOperationPredicate) Matches ¶
func (p UsageOperationPredicate) Matches(input Usage) bool
type UsagesClient ¶
type UsagesClient struct {
Client *resourcemanager.Client
}
func NewUsagesClientWithBaseURI ¶
func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error)
func (UsagesClient) ListByInstancePool ¶
func (c UsagesClient) ListByInstancePool(ctx context.Context, id InstancePoolId, options ListByInstancePoolOperationOptions) (result ListByInstancePoolOperationResponse, err error)
ListByInstancePool ...
func (UsagesClient) ListByInstancePoolComplete ¶
func (c UsagesClient) ListByInstancePoolComplete(ctx context.Context, id InstancePoolId, options ListByInstancePoolOperationOptions) (ListByInstancePoolCompleteResult, error)
ListByInstancePoolComplete retrieves all the results into a single object
func (UsagesClient) ListByInstancePoolCompleteMatchingPredicate ¶
func (c UsagesClient) ListByInstancePoolCompleteMatchingPredicate(ctx context.Context, id InstancePoolId, options ListByInstancePoolOperationOptions, predicate UsageOperationPredicate) (result ListByInstancePoolCompleteResult, err error)
ListByInstancePoolCompleteMatchingPredicate retrieves all the results and then applies the predicate