benefitrecommendations

package
v0.20230323.1151043 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/benefitrecommendations Documentation

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

Client Initialization

client := benefitrecommendations.NewBenefitRecommendationsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BenefitRecommendationsClient.List

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

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

func PossibleValuesForBenefitKind() []string

func PossibleValuesForGrain

func PossibleValuesForGrain() []string

func PossibleValuesForLookBackPeriod

func PossibleValuesForLookBackPeriod() []string

func PossibleValuesForScope

func PossibleValuesForScope() []string

func PossibleValuesForTerm

func PossibleValuesForTerm() []string

Types

type AllSavingsBenefitDetails

type AllSavingsBenefitDetails struct {
	AverageUtilizationPercentage *float64 `json:"averageUtilizationPercentage,omitempty"`
	BenefitCost                  *float64 `json:"benefitCost,omitempty"`
	CommitmentAmount             *float64 `json:"commitmentAmount,omitempty"`
	CoveragePercentage           *float64 `json:"coveragePercentage,omitempty"`
	OverageCost                  *float64 `json:"overageCost,omitempty"`
	SavingsAmount                *float64 `json:"savingsAmount,omitempty"`
	SavingsPercentage            *float64 `json:"savingsPercentage,omitempty"`
	TotalCost                    *float64 `json:"totalCost,omitempty"`
	WastageCost                  *float64 `json:"wastageCost,omitempty"`
}

type AllSavingsList

type AllSavingsList struct {
	NextLink *string                     `json:"nextLink,omitempty"`
	Value    *[]AllSavingsBenefitDetails `json:"value,omitempty"`
}

type BenefitKind

type BenefitKind string
const (
	BenefitKindIncludedQuantity BenefitKind = "IncludedQuantity"
	BenefitKindReservation      BenefitKind = "Reservation"
	BenefitKindSavingsPlan      BenefitKind = "SavingsPlan"
)

type BenefitRecommendationModel

type BenefitRecommendationModel struct {
	Id         *string                         `json:"id,omitempty"`
	Kind       *BenefitKind                    `json:"kind,omitempty"`
	Name       *string                         `json:"name,omitempty"`
	Properties BenefitRecommendationProperties `json:"properties"`
	Type       *string                         `json:"type,omitempty"`
}

func (*BenefitRecommendationModel) UnmarshalJSON

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

type BenefitRecommendationModelOperationPredicate

type BenefitRecommendationModelOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (BenefitRecommendationModelOperationPredicate) Matches

type BenefitRecommendationProperties

type BenefitRecommendationProperties interface {
}

type BenefitRecommendationsClient

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

func NewBenefitRecommendationsClientWithBaseURI

func NewBenefitRecommendationsClientWithBaseURI(endpoint string) BenefitRecommendationsClient

func (BenefitRecommendationsClient) List

List ...

func (BenefitRecommendationsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (BenefitRecommendationsClient) ListCompleteMatchingPredicate

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

type Grain

type Grain string
const (
	GrainDaily   Grain = "Daily"
	GrainHourly  Grain = "Hourly"
	GrainMonthly Grain = "Monthly"
)

type ListCompleteResult

type ListCompleteResult struct {
	Items []BenefitRecommendationModel
}

type ListOperationOptions

type ListOperationOptions struct {
	Expand  *string
	Filter  *string
	Orderby *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]BenefitRecommendationModel
	// 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 LookBackPeriod

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

type RecommendationUsageDetails

type RecommendationUsageDetails struct {
	Charges    *[]float64 `json:"charges,omitempty"`
	UsageGrain *Grain     `json:"usageGrain,omitempty"`
}

type Scope

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

type SharedScopeBenefitRecommendationProperties

type SharedScopeBenefitRecommendationProperties struct {

	// Fields inherited from BenefitRecommendationProperties
	AllRecommendationDetails *AllSavingsList             `json:"allRecommendationDetails,omitempty"`
	ArmSkuName               *string                     `json:"armSkuName,omitempty"`
	CommitmentGranularity    *Grain                      `json:"commitmentGranularity,omitempty"`
	CostWithoutBenefit       *float64                    `json:"costWithoutBenefit,omitempty"`
	CurrencyCode             *string                     `json:"currencyCode,omitempty"`
	FirstConsumptionDate     *string                     `json:"firstConsumptionDate,omitempty"`
	LastConsumptionDate      *string                     `json:"lastConsumptionDate,omitempty"`
	LookBackPeriod           *LookBackPeriod             `json:"lookBackPeriod,omitempty"`
	RecommendationDetails    *AllSavingsBenefitDetails   `json:"recommendationDetails,omitempty"`
	Term                     *Term                       `json:"term,omitempty"`
	TotalHours               *int64                      `json:"totalHours,omitempty"`
	Usage                    *RecommendationUsageDetails `json:"usage,omitempty"`
}

func (*SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime

func (o *SharedScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error)

func (*SharedScopeBenefitRecommendationProperties) GetLastConsumptionDateAsTime

func (o *SharedScopeBenefitRecommendationProperties) GetLastConsumptionDateAsTime() (*time.Time, error)

func (SharedScopeBenefitRecommendationProperties) MarshalJSON

func (*SharedScopeBenefitRecommendationProperties) SetFirstConsumptionDateAsTime

func (o *SharedScopeBenefitRecommendationProperties) SetFirstConsumptionDateAsTime(input time.Time)

func (*SharedScopeBenefitRecommendationProperties) SetLastConsumptionDateAsTime

func (o *SharedScopeBenefitRecommendationProperties) SetLastConsumptionDateAsTime(input time.Time)

type SingleScopeBenefitRecommendationProperties

type SingleScopeBenefitRecommendationProperties struct {
	ResourceGroup  *string `json:"resourceGroup,omitempty"`
	SubscriptionId *string `json:"subscriptionId,omitempty"`

	// Fields inherited from BenefitRecommendationProperties
	AllRecommendationDetails *AllSavingsList             `json:"allRecommendationDetails,omitempty"`
	ArmSkuName               *string                     `json:"armSkuName,omitempty"`
	CommitmentGranularity    *Grain                      `json:"commitmentGranularity,omitempty"`
	CostWithoutBenefit       *float64                    `json:"costWithoutBenefit,omitempty"`
	CurrencyCode             *string                     `json:"currencyCode,omitempty"`
	FirstConsumptionDate     *string                     `json:"firstConsumptionDate,omitempty"`
	LastConsumptionDate      *string                     `json:"lastConsumptionDate,omitempty"`
	LookBackPeriod           *LookBackPeriod             `json:"lookBackPeriod,omitempty"`
	RecommendationDetails    *AllSavingsBenefitDetails   `json:"recommendationDetails,omitempty"`
	Term                     *Term                       `json:"term,omitempty"`
	TotalHours               *int64                      `json:"totalHours,omitempty"`
	Usage                    *RecommendationUsageDetails `json:"usage,omitempty"`
}

func (*SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime

func (o *SingleScopeBenefitRecommendationProperties) GetFirstConsumptionDateAsTime() (*time.Time, error)

func (*SingleScopeBenefitRecommendationProperties) GetLastConsumptionDateAsTime

func (o *SingleScopeBenefitRecommendationProperties) GetLastConsumptionDateAsTime() (*time.Time, error)

func (SingleScopeBenefitRecommendationProperties) MarshalJSON

func (*SingleScopeBenefitRecommendationProperties) SetFirstConsumptionDateAsTime

func (o *SingleScopeBenefitRecommendationProperties) SetFirstConsumptionDateAsTime(input time.Time)

func (*SingleScopeBenefitRecommendationProperties) SetLastConsumptionDateAsTime

func (o *SingleScopeBenefitRecommendationProperties) SetLastConsumptionDateAsTime(input time.Time)

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