reservationrecommendations

package
v0.20221010.1142840 Latest Latest
Warning

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

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

README

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

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

Client Initialization

client := reservationrecommendations.NewReservationRecommendationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ReservationRecommendationsClient.List

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

// alternatively `client.List(ctx, id, reservationrecommendations.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, id, reservationrecommendations.DefaultListOperationOptions())
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 PossibleValuesForReservationRecommendationKind

func PossibleValuesForReservationRecommendationKind() []string

Types

type Amount

type Amount struct {
	Currency *string  `json:"currency,omitempty"`
	Value    *float64 `json:"value,omitempty"`
}

type LegacyReservationRecommendation

type LegacyReservationRecommendation struct {
	Properties LegacyReservationRecommendationProperties `json:"properties"`

	// Fields inherited from ReservationRecommendation
	ETag     *string            `json:"eTag,omitempty"`
	Id       *string            `json:"id,omitempty"`
	Location *string            `json:"location,omitempty"`
	Name     *string            `json:"name,omitempty"`
	Sku      *string            `json:"sku,omitempty"`
	Tags     *map[string]string `json:"tags,omitempty"`
	Type     *string            `json:"type,omitempty"`
}

func (LegacyReservationRecommendation) MarshalJSON

func (s LegacyReservationRecommendation) MarshalJSON() ([]byte, error)

type LegacyReservationRecommendationProperties

type LegacyReservationRecommendationProperties struct {
	CostWithNoReservedInstances    *float64       `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LookBackPeriod                 *string        `json:"lookBackPeriod,omitempty"`
	MeterId                        *string        `json:"meterId,omitempty"`
	NetSavings                     *float64       `json:"netSavings,omitempty"`
	NormalizedSize                 *string        `json:"normalizedSize,omitempty"`
	RecommendedQuantity            *float64       `json:"recommendedQuantity,omitempty"`
	RecommendedQuantityNormalized  *float64       `json:"recommendedQuantityNormalized,omitempty"`
	ResourceType                   *string        `json:"resourceType,omitempty"`
	Scope                          *string        `json:"scope,omitempty"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *float64       `json:"totalCostWithReservedInstances,omitempty"`
}

func (*LegacyReservationRecommendationProperties) GetFirstUsageDateAsTime

func (o *LegacyReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error)

func (*LegacyReservationRecommendationProperties) SetFirstUsageDateAsTime

func (o *LegacyReservationRecommendationProperties) SetFirstUsageDateAsTime(input time.Time)

type ListCompleteResult

type ListCompleteResult struct {
	Items []ReservationRecommendation
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

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

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type ModernReservationRecommendation

type ModernReservationRecommendation struct {
	Properties ModernReservationRecommendationProperties `json:"properties"`

	// Fields inherited from ReservationRecommendation
	ETag     *string            `json:"eTag,omitempty"`
	Id       *string            `json:"id,omitempty"`
	Location *string            `json:"location,omitempty"`
	Name     *string            `json:"name,omitempty"`
	Sku      *string            `json:"sku,omitempty"`
	Tags     *map[string]string `json:"tags,omitempty"`
	Type     *string            `json:"type,omitempty"`
}

func (ModernReservationRecommendation) MarshalJSON

func (s ModernReservationRecommendation) MarshalJSON() ([]byte, error)

type ModernReservationRecommendationProperties

type ModernReservationRecommendationProperties struct {
	CostWithNoReservedInstances    *Amount        `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	Location                       *string        `json:"location,omitempty"`
	LookBackPeriod                 *int64         `json:"lookBackPeriod,omitempty"`
	MeterId                        *string        `json:"meterId,omitempty"`
	NetSavings                     *Amount        `json:"netSavings,omitempty"`
	NormalizedSize                 *string        `json:"normalizedSize,omitempty"`
	RecommendedQuantity            *float64       `json:"recommendedQuantity,omitempty"`
	RecommendedQuantityNormalized  *float64       `json:"recommendedQuantityNormalized,omitempty"`
	ResourceType                   *string        `json:"resourceType,omitempty"`
	Scope                          *int64         `json:"scope,omitempty"`
	SkuName                        *string        `json:"skuName,omitempty"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	SubscriptionId                 *string        `json:"subscriptionId,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *Amount        `json:"totalCostWithReservedInstances,omitempty"`
}

func (*ModernReservationRecommendationProperties) GetFirstUsageDateAsTime

func (o *ModernReservationRecommendationProperties) GetFirstUsageDateAsTime() (*time.Time, error)

func (*ModernReservationRecommendationProperties) SetFirstUsageDateAsTime

func (o *ModernReservationRecommendationProperties) SetFirstUsageDateAsTime(input time.Time)

type ReservationRecommendation

type ReservationRecommendation interface {
}

type ReservationRecommendationKind

type ReservationRecommendationKind string
const (
	ReservationRecommendationKindLegacy ReservationRecommendationKind = "legacy"
	ReservationRecommendationKindModern ReservationRecommendationKind = "modern"
)

type ReservationRecommendationOperationPredicate

type ReservationRecommendationOperationPredicate struct {
}

func (ReservationRecommendationOperationPredicate) Matches

type ReservationRecommendationsClient

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

func NewReservationRecommendationsClientWithBaseURI

func NewReservationRecommendationsClientWithBaseURI(endpoint string) ReservationRecommendationsClient

func (ReservationRecommendationsClient) List

List ...

func (ReservationRecommendationsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (ReservationRecommendationsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type SkuProperty

type SkuProperty struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
}

Jump to

Keyboard shortcuts

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