reservationsummaries

package
v0.20221013.1075625 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/reservationsummaries Documentation

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

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 autorest.Client
	// contains filtered or unexported fields
}

func NewReservationSummariesClientWithBaseURI

func NewReservationSummariesClientWithBaseURI(endpoint string) ReservationSummariesClient

func (ReservationSummariesClient) ReservationsSummariesList

ReservationsSummariesList ...

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrder

ReservationsSummariesListByReservationOrder ...

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderAndReservation

ReservationsSummariesListByReservationOrderAndReservation ...

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderAndReservationComplete

ReservationsSummariesListByReservationOrderAndReservationComplete retrieves all of the results into a single object

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderAndReservationCompleteMatchingPredicate

ReservationsSummariesListByReservationOrderAndReservationCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderComplete

ReservationsSummariesListByReservationOrderComplete retrieves all of the results into a single object

func (ReservationSummariesClient) ReservationsSummariesListByReservationOrderCompleteMatchingPredicate

ReservationsSummariesListByReservationOrderCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ReservationSummariesClient) ReservationsSummariesListComplete

ReservationsSummariesListComplete retrieves all of the results into a single object

func (ReservationSummariesClient) ReservationsSummariesListCompleteMatchingPredicate

ReservationsSummariesListCompleteMatchingPredicate retrieves all of the results and then applied 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
}

type ReservationsSummariesListByReservationOrderAndReservationOperationResponse

type ReservationsSummariesListByReservationOrderAndReservationOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ReservationSummary
	// contains filtered or unexported fields
}

func (ReservationsSummariesListByReservationOrderAndReservationOperationResponse) HasMore

func (ReservationsSummariesListByReservationOrderAndReservationOperationResponse) LoadMore

type ReservationsSummariesListByReservationOrderCompleteResult

type ReservationsSummariesListByReservationOrderCompleteResult struct {
	Items []ReservationSummary
}

type ReservationsSummariesListByReservationOrderOperationOptions

type ReservationsSummariesListByReservationOrderOperationOptions struct {
	Filter *string
	Grain  *Datagrain
}

type ReservationsSummariesListByReservationOrderOperationResponse

type ReservationsSummariesListByReservationOrderOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ReservationSummary
	// contains filtered or unexported fields
}

func (ReservationsSummariesListByReservationOrderOperationResponse) HasMore

func (ReservationsSummariesListByReservationOrderOperationResponse) LoadMore

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

type ReservationsSummariesListOperationResponse

type ReservationsSummariesListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ReservationSummary
	// contains filtered or unexported fields
}

func (ReservationsSummariesListOperationResponse) HasMore

func (ReservationsSummariesListOperationResponse) LoadMore

Jump to

Keyboard shortcuts

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