reservationrecommendationdetails

package
v0.20221013.1040645 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: 7 Imported by: 1

README

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

The reservationrecommendationdetails 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/reservationrecommendationdetails"

Client Initialization

client := reservationrecommendationdetails.NewReservationRecommendationDetailsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservationRecommendationDetailsClient.Get

ctx := context.TODO()
id := reservationrecommendationdetails.NewBillingScopeID("billingScopeValue")

read, err := client.Get(ctx, id, reservationrecommendationdetails.DefaultGetOperationOptions())
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForLookBackPeriod

func PossibleValuesForLookBackPeriod() []string

func PossibleValuesForScope

func PossibleValuesForScope() []string

func PossibleValuesForTerm

func PossibleValuesForTerm() []string

func ValidateBillingScopeID

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

ValidateBillingScopeID checks that 'input' can be parsed as a Billing Scope ID

Types

type BillingScopeId

type BillingScopeId struct {
	BillingScope string
}

BillingScopeId is a struct representing the Resource ID for a Billing Scope

func NewBillingScopeID

func NewBillingScopeID(billingScope string) BillingScopeId

NewBillingScopeID returns a new BillingScopeId struct

func ParseBillingScopeID

func ParseBillingScopeID(input string) (*BillingScopeId, error)

ParseBillingScopeID parses 'input' into a BillingScopeId

func ParseBillingScopeIDInsensitively

func ParseBillingScopeIDInsensitively(input string) (*BillingScopeId, error)

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

func (BillingScopeId) ID

func (id BillingScopeId) ID() string

ID returns the formatted Billing Scope ID

func (BillingScopeId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Billing Scope ID

func (BillingScopeId) String

func (id BillingScopeId) String() string

String returns a human-readable description of this Billing Scope ID

type GetOperationOptions

type GetOperationOptions struct {
	LookBackPeriod *LookBackPeriod
	Product        *string
	Region         *string
	Scope          *Scope
	Term           *Term
}

func DefaultGetOperationOptions

func DefaultGetOperationOptions() GetOperationOptions

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ReservationRecommendationDetailsModel
}

type LookBackPeriod

type LookBackPeriod string
const (
	LookBackPeriodLastSevenDays     LookBackPeriod = "Last7Days"
	LookBackPeriodLastSixZeroDays   LookBackPeriod = "Last60Days"
	LookBackPeriodLastThreeZeroDays LookBackPeriod = "Last30Days"
)

type ReservationRecommendationDetailsCalculatedSavingsProperties

type ReservationRecommendationDetailsCalculatedSavingsProperties struct {
	OnDemandCost         *float64 `json:"onDemandCost,omitempty"`
	OverageCost          *float64 `json:"overageCost,omitempty"`
	Quantity             *float64 `json:"quantity,omitempty"`
	ReservationCost      *float64 `json:"reservationCost,omitempty"`
	ReservedUnitCount    *float64 `json:"reservedUnitCount,omitempty"`
	Savings              *float64 `json:"savings,omitempty"`
	TotalReservationCost *float64 `json:"totalReservationCost,omitempty"`
}

type ReservationRecommendationDetailsClient

type ReservationRecommendationDetailsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewReservationRecommendationDetailsClientWithBaseURI

func NewReservationRecommendationDetailsClientWithBaseURI(endpoint string) ReservationRecommendationDetailsClient

func (ReservationRecommendationDetailsClient) Get

Get ...

type ReservationRecommendationDetailsModel

type ReservationRecommendationDetailsModel struct {
	Etag       *string                                     `json:"etag,omitempty"`
	Id         *string                                     `json:"id,omitempty"`
	Location   *string                                     `json:"location,omitempty"`
	Name       *string                                     `json:"name,omitempty"`
	Properties *ReservationRecommendationDetailsProperties `json:"properties,omitempty"`
	Sku        *string                                     `json:"sku,omitempty"`
	Tags       *map[string]string                          `json:"tags,omitempty"`
	Type       *string                                     `json:"type,omitempty"`
}

type ReservationRecommendationDetailsProperties

type ReservationRecommendationDetailsProperties struct {
	Currency      *string                                             `json:"currency,omitempty"`
	Resource      *ReservationRecommendationDetailsResourceProperties `json:"resource,omitempty"`
	ResourceGroup *string                                             `json:"resourceGroup,omitempty"`
	Savings       *ReservationRecommendationDetailsSavingsProperties  `json:"savings,omitempty"`
	Scope         *string                                             `json:"scope,omitempty"`
	Usage         *ReservationRecommendationDetailsUsageProperties    `json:"usage,omitempty"`
}

type ReservationRecommendationDetailsResourceProperties

type ReservationRecommendationDetailsResourceProperties struct {
	AppliedScopes   *[]string `json:"appliedScopes,omitempty"`
	OnDemandRate    *float64  `json:"onDemandRate,omitempty"`
	Product         *string   `json:"product,omitempty"`
	Region          *string   `json:"region,omitempty"`
	ReservationRate *float64  `json:"reservationRate,omitempty"`
	ResourceType    *string   `json:"resourceType,omitempty"`
}

type ReservationRecommendationDetailsSavingsProperties

type ReservationRecommendationDetailsSavingsProperties struct {
	CalculatedSavings    *[]ReservationRecommendationDetailsCalculatedSavingsProperties `json:"calculatedSavings,omitempty"`
	LookBackPeriod       *int64                                                         `json:"lookBackPeriod,omitempty"`
	RecommendedQuantity  *float64                                                       `json:"recommendedQuantity,omitempty"`
	ReservationOrderTerm *string                                                        `json:"reservationOrderTerm,omitempty"`
	SavingsType          *string                                                        `json:"savingsType,omitempty"`
	UnitOfMeasure        *string                                                        `json:"unitOfMeasure,omitempty"`
}

type ReservationRecommendationDetailsUsageProperties

type ReservationRecommendationDetailsUsageProperties struct {
	FirstConsumptionDate *string    `json:"firstConsumptionDate,omitempty"`
	LastConsumptionDate  *string    `json:"lastConsumptionDate,omitempty"`
	LookBackUnitType     *string    `json:"lookBackUnitType,omitempty"`
	UsageData            *[]float64 `json:"usageData,omitempty"`
	UsageGrain           *string    `json:"usageGrain,omitempty"`
}

type Scope

type Scope string
const (
	ScopeShared Scope = "Shared"
	ScopeSingle Scope = "Single"
)

type Term

type Term string
const (
	TermPOneY   Term = "P1Y"
	TermPThreeY Term = "P3Y"
)

Jump to

Keyboard shortcuts

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