reservationsummaries

package
v0.0.0-...-a81a29a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/reservationsummaries Documentation

The reservationsummaries SDK allows for interaction with the Azure Resource Manager Service consumption (API Version 2022-09-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/consumption/2022-09-01/reservationsummaries"

Client Initialization

client := reservationsummaries.NewReservationSummariesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservationSummariesClient.ReservationsSummariesList

ctx := context.TODO()
id := reservationsummaries.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: ReservationSummariesClient.ReservationsSummariesListByReservationOrder

ctx := context.TODO()
id := reservationsummaries.NewReservationOrderID("reservationOrderIdValue")

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

Example Usage: ReservationSummariesClient.ReservationsSummariesListByReservationOrderAndReservation

ctx := context.TODO()
id := reservationsummaries.NewReservationID("reservationOrderIdValue", "reservationIdValue")

// alternatively `client.ReservationsSummariesListByReservationOrderAndReservation(ctx, id, reservationsummaries.DefaultReservationsSummariesListByReservationOrderAndReservationOperationOptions())` can be used to do batched pagination
items, err := client.ReservationsSummariesListByReservationOrderAndReservationComplete(ctx, id, reservationsummaries.DefaultReservationsSummariesListByReservationOrderAndReservationOperationOptions())
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 PossibleValuesForDatagrain

func PossibleValuesForDatagrain() []string

func ValidateReservationID

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

ValidateReservationID checks that 'input' can be parsed as a Reservation ID

func ValidateReservationOrderID

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

ValidateReservationOrderID checks that 'input' can be parsed as a Reservation Order ID

Types

type Datagrain

type Datagrain string
const (
	DatagrainDaily   Datagrain = "daily"
	DatagrainMonthly Datagrain = "monthly"
)

func (*Datagrain) UnmarshalJSON

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

type ReservationId

type ReservationId struct {
	ReservationOrderId string
	ReservationId      string
}

ReservationId is a struct representing the Resource ID for a Reservation

func NewReservationID

func NewReservationID(reservationOrderId string, reservationId string) ReservationId

NewReservationID returns a new ReservationId struct

func ParseReservationID

func ParseReservationID(input string) (*ReservationId, error)

ParseReservationID parses 'input' into a ReservationId

func ParseReservationIDInsensitively

func ParseReservationIDInsensitively(input string) (*ReservationId, error)

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

func (ReservationId) ID

func (id ReservationId) ID() string

ID returns the formatted Reservation ID

func (ReservationId) Segments

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

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

func (ReservationId) String

func (id ReservationId) String() string

String returns a human-readable description of this Reservation ID

type ReservationOrderId

type ReservationOrderId struct {
	ReservationOrderId string
}

ReservationOrderId is a struct representing the Resource ID for a Reservation Order

func NewReservationOrderID

func NewReservationOrderID(reservationOrderId string) ReservationOrderId

NewReservationOrderID returns a new ReservationOrderId struct

func ParseReservationOrderID

func ParseReservationOrderID(input string) (*ReservationOrderId, error)

ParseReservationOrderID parses 'input' into a ReservationOrderId

func ParseReservationOrderIDInsensitively

func ParseReservationOrderIDInsensitively(input string) (*ReservationOrderId, error)

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

func (ReservationOrderId) ID

func (id ReservationOrderId) ID() string

ID returns the formatted Reservation Order ID

func (ReservationOrderId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Reservation Order ID

func (ReservationOrderId) String

func (id ReservationOrderId) String() string

String returns a human-readable description of this Reservation Order ID

type ReservationSummariesClient

type ReservationSummariesClient struct {
	Client *resourcemanager.Client
}

func NewReservationSummariesClientWithBaseURI

func NewReservationSummariesClientWithBaseURI(api environments.Api) (*ReservationSummariesClient, error)

func (ReservationSummariesClient) ReservationsSummariesList

ReservationsSummariesList ...

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrder

ReservationsSummariesListByReservationOrder ...

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderAndReservation

ReservationsSummariesListByReservationOrderAndReservation ...

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderAndReservationComplete

ReservationsSummariesListByReservationOrderAndReservationComplete retrieves all the results into a single object

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderAndReservationCompleteMatchingPredicate

ReservationsSummariesListByReservationOrderAndReservationCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderComplete

ReservationsSummariesListByReservationOrderComplete retrieves all the results into a single object

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderCompleteMatchingPredicate

ReservationsSummariesListByReservationOrderCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReservationSummariesClient) ReservationsSummariesListComplete

ReservationsSummariesListComplete retrieves all the results into a single object

func (ReservationSummariesClient) ReservationsSummariesListCompleteMatchingPredicate

ReservationsSummariesListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type ReservationSummary

type ReservationSummary struct {
	Etag       *string                       `json:"etag,omitempty"`
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *ReservationSummaryProperties `json:"properties,omitempty"`
	Tags       *map[string]string            `json:"tags,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type ReservationSummaryOperationPredicate

type ReservationSummaryOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (ReservationSummaryOperationPredicate) Matches

type ReservationSummaryProperties

type ReservationSummaryProperties struct {
	AvgUtilizationPercentage *float64 `json:"avgUtilizationPercentage,omitempty"`
	Kind                     *string  `json:"kind,omitempty"`
	MaxUtilizationPercentage *float64 `json:"maxUtilizationPercentage,omitempty"`
	MinUtilizationPercentage *float64 `json:"minUtilizationPercentage,omitempty"`
	PurchasedQuantity        *float64 `json:"purchasedQuantity,omitempty"`
	RemainingQuantity        *float64 `json:"remainingQuantity,omitempty"`
	ReservationId            *string  `json:"reservationId,omitempty"`
	ReservationOrderId       *string  `json:"reservationOrderId,omitempty"`
	ReservedHours            *float64 `json:"reservedHours,omitempty"`
	SkuName                  *string  `json:"skuName,omitempty"`
	TotalReservedQuantity    *float64 `json:"totalReservedQuantity,omitempty"`
	UsageDate                *string  `json:"usageDate,omitempty"`
	UsedHours                *float64 `json:"usedHours,omitempty"`
	UsedQuantity             *float64 `json:"usedQuantity,omitempty"`
	UtilizedPercentage       *float64 `json:"utilizedPercentage,omitempty"`
}

func (*ReservationSummaryProperties) GetUsageDateAsTime

func (o *ReservationSummaryProperties) GetUsageDateAsTime() (*time.Time, error)

func (*ReservationSummaryProperties) SetUsageDateAsTime

func (o *ReservationSummaryProperties) SetUsageDateAsTime(input time.Time)

type ReservationsSummariesListByReservationOrderAndReservationCompleteResult

type ReservationsSummariesListByReservationOrderAndReservationCompleteResult struct {
	Items []ReservationSummary
}

type ReservationsSummariesListByReservationOrderAndReservationOperationOptions

type ReservationsSummariesListByReservationOrderAndReservationOperationOptions struct {
	Filter *string
	Grain  *Datagrain
}

func (ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToHeaders

func (ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToOData

func (ReservationsSummariesListByReservationOrderAndReservationOperationOptions) ToQuery

type ReservationsSummariesListByReservationOrderAndReservationOperationResponse

type ReservationsSummariesListByReservationOrderAndReservationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationSummary
}

type ReservationsSummariesListByReservationOrderCompleteResult

type ReservationsSummariesListByReservationOrderCompleteResult struct {
	Items []ReservationSummary
}

type ReservationsSummariesListByReservationOrderOperationOptions

type ReservationsSummariesListByReservationOrderOperationOptions struct {
	Filter *string
	Grain  *Datagrain
}

func (ReservationsSummariesListByReservationOrderOperationOptions) ToHeaders

func (ReservationsSummariesListByReservationOrderOperationOptions) ToOData

func (ReservationsSummariesListByReservationOrderOperationOptions) ToQuery

type ReservationsSummariesListByReservationOrderOperationResponse

type ReservationsSummariesListByReservationOrderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationSummary
}

type ReservationsSummariesListCompleteResult

type ReservationsSummariesListCompleteResult struct {
	Items []ReservationSummary
}

type ReservationsSummariesListOperationOptions

type ReservationsSummariesListOperationOptions struct {
	EndDate            *string
	Filter             *string
	Grain              *Datagrain
	ReservationId      *string
	ReservationOrderId *string
	StartDate          *string
}

func DefaultReservationsSummariesListOperationOptions

func DefaultReservationsSummariesListOperationOptions() ReservationsSummariesListOperationOptions

func (ReservationsSummariesListOperationOptions) ToHeaders

func (ReservationsSummariesListOperationOptions) ToOData

func (ReservationsSummariesListOperationOptions) ToQuery

type ReservationsSummariesListOperationResponse

type ReservationsSummariesListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationSummary
}

Jump to

Keyboard shortcuts

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