reservationrecommendations

package
v0.20241126.2320 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationrecommendations Documentation

The reservationrecommendations SDK allows for interaction with Azure Resource Manager consumption (API Version 2024-08-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2024-08-01/reservationrecommendations"

Client Initialization

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

Example Usage: ReservationRecommendationsClient.List

ctx := context.TODO()
id := commonids.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 BaseLegacyReservationRecommendationPropertiesImpl

type BaseLegacyReservationRecommendationPropertiesImpl struct {
	CostWithNoReservedInstances    *float64       `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LastUsageDate                  *string        `json:"lastUsageDate,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"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *float64       `json:"totalCostWithReservedInstances,omitempty"`
	TotalHours                     *int64         `json:"totalHours,omitempty"`
}

func (BaseLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties

type BaseModernReservationRecommendationPropertiesImpl

type BaseModernReservationRecommendationPropertiesImpl struct {
	CostWithNoReservedInstances    *Amount        `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LastUsageDate                  *string        `json:"lastUsageDate,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                          string         `json:"scope"`
	SkuName                        *string        `json:"skuName,omitempty"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *Amount        `json:"totalCostWithReservedInstances,omitempty"`
	TotalHours                     *int64         `json:"totalHours,omitempty"`
}

func (BaseModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties

type BaseReservationRecommendationImpl

type BaseReservationRecommendationImpl struct {
	Etag     *string                       `json:"etag,omitempty"`
	Id       *string                       `json:"id,omitempty"`
	Kind     ReservationRecommendationKind `json:"kind"`
	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 (BaseReservationRecommendationImpl) ReservationRecommendation

type LegacyReservationRecommendation

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

	Etag     *string                       `json:"etag,omitempty"`
	Id       *string                       `json:"id,omitempty"`
	Kind     ReservationRecommendationKind `json:"kind"`
	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)

func (LegacyReservationRecommendation) ReservationRecommendation

func (*LegacyReservationRecommendation) UnmarshalJSON

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

type LegacyReservationRecommendationProperties

type LegacyReservationRecommendationProperties interface {
	LegacyReservationRecommendationProperties() BaseLegacyReservationRecommendationPropertiesImpl
}

func UnmarshalLegacyReservationRecommendationPropertiesImplementation

func UnmarshalLegacyReservationRecommendationPropertiesImplementation(input []byte) (LegacyReservationRecommendationProperties, error)

type LegacySharedScopeReservationRecommendationProperties

type LegacySharedScopeReservationRecommendationProperties struct {
	CostWithNoReservedInstances    *float64       `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LastUsageDate                  *string        `json:"lastUsageDate,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"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *float64       `json:"totalCostWithReservedInstances,omitempty"`
	TotalHours                     *int64         `json:"totalHours,omitempty"`
}

func (*LegacySharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime

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

func (*LegacySharedScopeReservationRecommendationProperties) GetLastUsageDateAsTime

func (o *LegacySharedScopeReservationRecommendationProperties) GetLastUsageDateAsTime() (*time.Time, error)

func (LegacySharedScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties

func (LegacySharedScopeReservationRecommendationProperties) MarshalJSON

func (*LegacySharedScopeReservationRecommendationProperties) SetFirstUsageDateAsTime

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

func (*LegacySharedScopeReservationRecommendationProperties) SetLastUsageDateAsTime

func (o *LegacySharedScopeReservationRecommendationProperties) SetLastUsageDateAsTime(input time.Time)

type LegacySingleScopeReservationRecommendationProperties

type LegacySingleScopeReservationRecommendationProperties struct {
	SubscriptionId *string `json:"subscriptionId,omitempty"`

	CostWithNoReservedInstances    *float64       `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LastUsageDate                  *string        `json:"lastUsageDate,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"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *float64       `json:"totalCostWithReservedInstances,omitempty"`
	TotalHours                     *int64         `json:"totalHours,omitempty"`
}

func (*LegacySingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime

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

func (*LegacySingleScopeReservationRecommendationProperties) GetLastUsageDateAsTime

func (o *LegacySingleScopeReservationRecommendationProperties) GetLastUsageDateAsTime() (*time.Time, error)

func (LegacySingleScopeReservationRecommendationProperties) LegacyReservationRecommendationProperties

func (LegacySingleScopeReservationRecommendationProperties) MarshalJSON

func (*LegacySingleScopeReservationRecommendationProperties) SetFirstUsageDateAsTime

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

func (*LegacySingleScopeReservationRecommendationProperties) SetLastUsageDateAsTime

func (o *LegacySingleScopeReservationRecommendationProperties) SetLastUsageDateAsTime(input time.Time)

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ReservationRecommendation
}

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ReservationRecommendation
}

type ModernReservationRecommendation

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

	Etag     *string                       `json:"etag,omitempty"`
	Id       *string                       `json:"id,omitempty"`
	Kind     ReservationRecommendationKind `json:"kind"`
	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)

func (ModernReservationRecommendation) ReservationRecommendation

func (*ModernReservationRecommendation) UnmarshalJSON

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

type ModernReservationRecommendationProperties

type ModernReservationRecommendationProperties interface {
	ModernReservationRecommendationProperties() BaseModernReservationRecommendationPropertiesImpl
}

func UnmarshalModernReservationRecommendationPropertiesImplementation

func UnmarshalModernReservationRecommendationPropertiesImplementation(input []byte) (ModernReservationRecommendationProperties, error)

type ModernSharedScopeReservationRecommendationProperties

type ModernSharedScopeReservationRecommendationProperties struct {
	CostWithNoReservedInstances    *Amount        `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LastUsageDate                  *string        `json:"lastUsageDate,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                          string         `json:"scope"`
	SkuName                        *string        `json:"skuName,omitempty"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *Amount        `json:"totalCostWithReservedInstances,omitempty"`
	TotalHours                     *int64         `json:"totalHours,omitempty"`
}

func (*ModernSharedScopeReservationRecommendationProperties) GetFirstUsageDateAsTime

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

func (*ModernSharedScopeReservationRecommendationProperties) GetLastUsageDateAsTime

func (o *ModernSharedScopeReservationRecommendationProperties) GetLastUsageDateAsTime() (*time.Time, error)

func (ModernSharedScopeReservationRecommendationProperties) MarshalJSON

func (ModernSharedScopeReservationRecommendationProperties) ModernReservationRecommendationProperties

func (*ModernSharedScopeReservationRecommendationProperties) SetFirstUsageDateAsTime

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

func (*ModernSharedScopeReservationRecommendationProperties) SetLastUsageDateAsTime

func (o *ModernSharedScopeReservationRecommendationProperties) SetLastUsageDateAsTime(input time.Time)

type ModernSingleScopeReservationRecommendationProperties

type ModernSingleScopeReservationRecommendationProperties struct {
	SubscriptionId *string `json:"subscriptionId,omitempty"`

	CostWithNoReservedInstances    *Amount        `json:"costWithNoReservedInstances,omitempty"`
	FirstUsageDate                 *string        `json:"firstUsageDate,omitempty"`
	InstanceFlexibilityGroup       *string        `json:"instanceFlexibilityGroup,omitempty"`
	InstanceFlexibilityRatio       *float64       `json:"instanceFlexibilityRatio,omitempty"`
	LastUsageDate                  *string        `json:"lastUsageDate,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                          string         `json:"scope"`
	SkuName                        *string        `json:"skuName,omitempty"`
	SkuProperties                  *[]SkuProperty `json:"skuProperties,omitempty"`
	Term                           *string        `json:"term,omitempty"`
	TotalCostWithReservedInstances *Amount        `json:"totalCostWithReservedInstances,omitempty"`
	TotalHours                     *int64         `json:"totalHours,omitempty"`
}

func (*ModernSingleScopeReservationRecommendationProperties) GetFirstUsageDateAsTime

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

func (*ModernSingleScopeReservationRecommendationProperties) GetLastUsageDateAsTime

func (o *ModernSingleScopeReservationRecommendationProperties) GetLastUsageDateAsTime() (*time.Time, error)

func (ModernSingleScopeReservationRecommendationProperties) MarshalJSON

func (ModernSingleScopeReservationRecommendationProperties) ModernReservationRecommendationProperties

func (*ModernSingleScopeReservationRecommendationProperties) SetFirstUsageDateAsTime

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

func (*ModernSingleScopeReservationRecommendationProperties) SetLastUsageDateAsTime

func (o *ModernSingleScopeReservationRecommendationProperties) SetLastUsageDateAsTime(input time.Time)

type RawLegacyReservationRecommendationPropertiesImpl

type RawLegacyReservationRecommendationPropertiesImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawLegacyReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawLegacyReservationRecommendationPropertiesImpl) LegacyReservationRecommendationProperties

type RawModernReservationRecommendationPropertiesImpl

type RawModernReservationRecommendationPropertiesImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawModernReservationRecommendationPropertiesImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawModernReservationRecommendationPropertiesImpl) ModernReservationRecommendationProperties

type RawReservationRecommendationImpl

type RawReservationRecommendationImpl struct {
	Type   string
	Values map[string]interface{}
	// contains filtered or unexported fields
}

RawReservationRecommendationImpl is returned when the Discriminated Value doesn't match any of the defined types NOTE: this should only be used when a type isn't defined for this type of Object (as a workaround) and is used only for Deserialization (e.g. this cannot be used as a Request Payload).

func (RawReservationRecommendationImpl) ReservationRecommendation

type ReservationRecommendation

type ReservationRecommendation interface {
	ReservationRecommendation() BaseReservationRecommendationImpl
}

func UnmarshalReservationRecommendationImplementation

func UnmarshalReservationRecommendationImplementation(input []byte) (ReservationRecommendation, error)

type ReservationRecommendationKind

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

func (*ReservationRecommendationKind) UnmarshalJSON

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

type ReservationRecommendationOperationPredicate

type ReservationRecommendationOperationPredicate struct {
}

func (ReservationRecommendationOperationPredicate) Matches

type ReservationRecommendationsClient

type ReservationRecommendationsClient struct {
	Client *resourcemanager.Client
}

func NewReservationRecommendationsClientWithBaseURI

func NewReservationRecommendationsClientWithBaseURI(sdkApi sdkEnv.Api) (*ReservationRecommendationsClient, error)

func (ReservationRecommendationsClient) List

List ...

func (ReservationRecommendationsClient) ListComplete

ListComplete retrieves all the results into a single object

func (ReservationRecommendationsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all the results and then applies 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