reservationdetails

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: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2021-10-01/reservationdetails Documentation

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

Client Initialization

client := reservationdetails.NewReservationDetailsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservationDetailsClient.ReservationsDetailsList

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

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

Example Usage: ReservationDetailsClient.ReservationsDetailsListByReservationOrder

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

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

Example Usage: ReservationDetailsClient.ReservationsDetailsListByReservationOrderAndReservation

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

// alternatively `client.ReservationsDetailsListByReservationOrderAndReservation(ctx, id, reservationdetails.DefaultReservationsDetailsListByReservationOrderAndReservationOperationOptions())` can be used to do batched pagination
items, err := client.ReservationsDetailsListByReservationOrderAndReservationComplete(ctx, id, reservationdetails.DefaultReservationsDetailsListByReservationOrderAndReservationOperationOptions())
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 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 ReservationDetail

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

type ReservationDetailOperationPredicate

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

func (ReservationDetailOperationPredicate) Matches

type ReservationDetailProperties

type ReservationDetailProperties struct {
	InstanceFlexibilityGroup *string  `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio *string  `json:"instanceFlexibilityRatio,omitempty"`
	InstanceId               *string  `json:"instanceId,omitempty"`
	Kind                     *string  `json:"kind,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"`
}

func (*ReservationDetailProperties) GetUsageDateAsTime

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

func (*ReservationDetailProperties) SetUsageDateAsTime

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

type ReservationDetailsClient

type ReservationDetailsClient struct {
	Client *resourcemanager.Client
}

func NewReservationDetailsClientWithBaseURI

func NewReservationDetailsClientWithBaseURI(api environments.Api) (*ReservationDetailsClient, error)

func (ReservationDetailsClient) ReservationsDetailsList

ReservationsDetailsList ...

func (ReservationDetailsClient) ReservationsDetailsListByReservationOrder

ReservationsDetailsListByReservationOrder ...

func (ReservationDetailsClient) ReservationsDetailsListByReservationOrderAndReservation

ReservationsDetailsListByReservationOrderAndReservation ...

func (ReservationDetailsClient) ReservationsDetailsListByReservationOrderAndReservationComplete

ReservationsDetailsListByReservationOrderAndReservationComplete retrieves all the results into a single object

func (ReservationDetailsClient) ReservationsDetailsListByReservationOrderAndReservationCompleteMatchingPredicate

ReservationsDetailsListByReservationOrderAndReservationCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReservationDetailsClient) ReservationsDetailsListByReservationOrderComplete

ReservationsDetailsListByReservationOrderComplete retrieves all the results into a single object

func (ReservationDetailsClient) ReservationsDetailsListByReservationOrderCompleteMatchingPredicate

ReservationsDetailsListByReservationOrderCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ReservationDetailsClient) ReservationsDetailsListComplete

ReservationsDetailsListComplete retrieves all the results into a single object

func (ReservationDetailsClient) ReservationsDetailsListCompleteMatchingPredicate

ReservationsDetailsListCompleteMatchingPredicate retrieves all the results and then applies the predicate

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 ReservationsDetailsListByReservationOrderAndReservationCompleteResult

type ReservationsDetailsListByReservationOrderAndReservationCompleteResult struct {
	Items []ReservationDetail
}

type ReservationsDetailsListByReservationOrderAndReservationOperationOptions

type ReservationsDetailsListByReservationOrderAndReservationOperationOptions struct {
	Filter *string
}

func (ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToHeaders

func (ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToOData

func (ReservationsDetailsListByReservationOrderAndReservationOperationOptions) ToQuery

type ReservationsDetailsListByReservationOrderAndReservationOperationResponse

type ReservationsDetailsListByReservationOrderAndReservationOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationDetail
}

type ReservationsDetailsListByReservationOrderCompleteResult

type ReservationsDetailsListByReservationOrderCompleteResult struct {
	Items []ReservationDetail
}

type ReservationsDetailsListByReservationOrderOperationOptions

type ReservationsDetailsListByReservationOrderOperationOptions struct {
	Filter *string
}

func (ReservationsDetailsListByReservationOrderOperationOptions) ToHeaders

func (ReservationsDetailsListByReservationOrderOperationOptions) ToOData

func (ReservationsDetailsListByReservationOrderOperationOptions) ToQuery

type ReservationsDetailsListByReservationOrderOperationResponse

type ReservationsDetailsListByReservationOrderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationDetail
}

type ReservationsDetailsListCompleteResult

type ReservationsDetailsListCompleteResult struct {
	Items []ReservationDetail
}

type ReservationsDetailsListOperationOptions

type ReservationsDetailsListOperationOptions struct {
	EndDate            *string
	Filter             *string
	ReservationId      *string
	ReservationOrderId *string
	StartDate          *string
}

func DefaultReservationsDetailsListOperationOptions

func DefaultReservationsDetailsListOperationOptions() ReservationsDetailsListOperationOptions

func (ReservationsDetailsListOperationOptions) ToHeaders

func (ReservationsDetailsListOperationOptions) ToOData

func (ReservationsDetailsListOperationOptions) ToQuery

type ReservationsDetailsListOperationResponse

type ReservationsDetailsListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationDetail
}

Jump to

Keyboard shortcuts

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