usages

package
v0.20240209.1164150 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateInstancePoolID

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

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 ListByInstancePoolCompleteResult

type ListByInstancePoolCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []Usage
}

type ListByInstancePoolOperationOptions

type ListByInstancePoolOperationOptions struct {
	ExpandChildren *bool
}

func DefaultListByInstancePoolOperationOptions

func DefaultListByInstancePoolOperationOptions() ListByInstancePoolOperationOptions

func (ListByInstancePoolOperationOptions) ToHeaders

func (ListByInstancePoolOperationOptions) ToOData

func (ListByInstancePoolOperationOptions) ToQuery

type ListByInstancePoolOperationResponse

type ListByInstancePoolOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]Usage
}

type Name

type Name struct {
	LocalizedValue *string `json:"localizedValue,omitempty"`
	Value          *string `json:"value,omitempty"`
}

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

ListByInstancePool ...

func (UsagesClient) ListByInstancePoolComplete

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

Jump to

Keyboard shortcuts

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