usages

package
v0.20240701.1094750 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/containerapps/2024-03-01/usages Documentation

The usages SDK allows for interaction with the Azure Resource Manager Service containerapps (API Version 2024-03-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/containerapps/2024-03-01/usages"

Client Initialization

client := usages.NewUsagesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: UsagesClient.List

ctx := context.TODO()
id := usages.NewLocationID("12345678-1234-9876-4563-123456789012", "locationValue")

// alternatively `client.List(ctx, id)` can be used to do batched pagination
items, err := client.ListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: UsagesClient.ManagedEnvironmentUsagesList

ctx := context.TODO()
id := usages.NewManagedEnvironmentID("12345678-1234-9876-4563-123456789012", "example-resource-group", "managedEnvironmentValue")

// alternatively `client.ManagedEnvironmentUsagesList(ctx, id)` can be used to do batched pagination
items, err := client.ManagedEnvironmentUsagesListComplete(ctx, id)
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 PossibleValuesForUsageUnit

func PossibleValuesForUsageUnit() []string

func ValidateLocationID

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

ValidateLocationID checks that 'input' can be parsed as a Location ID

func ValidateManagedEnvironmentID

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

ValidateManagedEnvironmentID checks that 'input' can be parsed as a Managed Environment ID

Types

type ListCompleteResult

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

type ListCustomPager added in v0.20240628.1153531

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationResponse

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

type LocationId

type LocationId struct {
	SubscriptionId string
	LocationName   string
}

LocationId is a struct representing the Resource ID for a Location

func NewLocationID

func NewLocationID(subscriptionId string, locationName string) LocationId

NewLocationID returns a new LocationId struct

func ParseLocationID

func ParseLocationID(input string) (*LocationId, error)

ParseLocationID parses 'input' into a LocationId

func ParseLocationIDInsensitively

func ParseLocationIDInsensitively(input string) (*LocationId, error)

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

func (*LocationId) FromParseResult

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

func (LocationId) ID

func (id LocationId) ID() string

ID returns the formatted Location ID

func (LocationId) Segments

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

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

func (LocationId) String

func (id LocationId) String() string

String returns a human-readable description of this Location ID

type ManagedEnvironmentId

type ManagedEnvironmentId struct {
	SubscriptionId         string
	ResourceGroupName      string
	ManagedEnvironmentName string
}

ManagedEnvironmentId is a struct representing the Resource ID for a Managed Environment

func NewManagedEnvironmentID

func NewManagedEnvironmentID(subscriptionId string, resourceGroupName string, managedEnvironmentName string) ManagedEnvironmentId

NewManagedEnvironmentID returns a new ManagedEnvironmentId struct

func ParseManagedEnvironmentID

func ParseManagedEnvironmentID(input string) (*ManagedEnvironmentId, error)

ParseManagedEnvironmentID parses 'input' into a ManagedEnvironmentId

func ParseManagedEnvironmentIDInsensitively

func ParseManagedEnvironmentIDInsensitively(input string) (*ManagedEnvironmentId, error)

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

func (*ManagedEnvironmentId) FromParseResult

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

func (ManagedEnvironmentId) ID

func (id ManagedEnvironmentId) ID() string

ID returns the formatted Managed Environment ID

func (ManagedEnvironmentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Managed Environment ID

func (ManagedEnvironmentId) String

func (id ManagedEnvironmentId) String() string

String returns a human-readable description of this Managed Environment ID

type ManagedEnvironmentUsagesListCompleteResult

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

type ManagedEnvironmentUsagesListCustomPager added in v0.20240628.1153531

type ManagedEnvironmentUsagesListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}

type ManagedEnvironmentUsagesListOperationResponse

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

type Usage

type Usage struct {
	CurrentValue float64   `json:"currentValue"`
	Limit        float64   `json:"limit"`
	Name         UsageName `json:"name"`
	Unit         UsageUnit `json:"unit"`
}

type UsageName

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

type UsageOperationPredicate

type UsageOperationPredicate struct {
	CurrentValue *float64
	Limit        *float64
}

func (UsageOperationPredicate) Matches

func (p UsageOperationPredicate) Matches(input Usage) bool

type UsageUnit

type UsageUnit string
const (
	UsageUnitCount UsageUnit = "Count"
)

func (*UsageUnit) UnmarshalJSON

func (s *UsageUnit) UnmarshalJSON(bytes []byte) error

type UsagesClient

type UsagesClient struct {
	Client *resourcemanager.Client
}

func NewUsagesClientWithBaseURI

func NewUsagesClientWithBaseURI(sdkApi sdkEnv.Api) (*UsagesClient, error)

func (UsagesClient) List

func (c UsagesClient) List(ctx context.Context, id LocationId) (result ListOperationResponse, err error)

List ...

func (UsagesClient) ListComplete

func (c UsagesClient) ListComplete(ctx context.Context, id LocationId) (ListCompleteResult, error)

ListComplete retrieves all the results into a single object

func (UsagesClient) ListCompleteMatchingPredicate

func (c UsagesClient) ListCompleteMatchingPredicate(ctx context.Context, id LocationId, predicate UsageOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (UsagesClient) ManagedEnvironmentUsagesList

func (c UsagesClient) ManagedEnvironmentUsagesList(ctx context.Context, id ManagedEnvironmentId) (result ManagedEnvironmentUsagesListOperationResponse, err error)

ManagedEnvironmentUsagesList ...

func (UsagesClient) ManagedEnvironmentUsagesListComplete

func (c UsagesClient) ManagedEnvironmentUsagesListComplete(ctx context.Context, id ManagedEnvironmentId) (ManagedEnvironmentUsagesListCompleteResult, error)

ManagedEnvironmentUsagesListComplete retrieves all the results into a single object

func (UsagesClient) ManagedEnvironmentUsagesListCompleteMatchingPredicate

func (c UsagesClient) ManagedEnvironmentUsagesListCompleteMatchingPredicate(ctx context.Context, id ManagedEnvironmentId, predicate UsageOperationPredicate) (result ManagedEnvironmentUsagesListCompleteResult, err error)

ManagedEnvironmentUsagesListCompleteMatchingPredicate 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