benefitutilizationsummaries

package
v0.20230802.1160114 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MPL-2.0 Imports: 12 Imported by: 1

README

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

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

Client Initialization

client := benefitutilizationsummaries.NewBenefitUtilizationSummariesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BenefitUtilizationSummariesClient.ListByBillingAccountId

ctx := context.TODO()
id := benefitutilizationsummaries.NewBillingAccountID("billingAccountIdValue")

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

Example Usage: BenefitUtilizationSummariesClient.ListByBillingProfileId

ctx := context.TODO()
id := benefitutilizationsummaries.NewBillingProfileID("billingAccountIdValue", "billingProfileIdValue")

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

Example Usage: BenefitUtilizationSummariesClient.ListBySavingsPlanId

ctx := context.TODO()
id := benefitutilizationsummaries.NewSavingsPlanID("savingsPlanOrderIdValue", "savingsPlanIdValue")

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

Example Usage: BenefitUtilizationSummariesClient.ListBySavingsPlanOrder

ctx := context.TODO()
id := benefitutilizationsummaries.NewSavingsPlanOrderID("savingsPlanOrderIdValue")

// alternatively `client.ListBySavingsPlanOrder(ctx, id, benefitutilizationsummaries.DefaultListBySavingsPlanOrderOperationOptions())` can be used to do batched pagination
items, err := client.ListBySavingsPlanOrderComplete(ctx, id, benefitutilizationsummaries.DefaultListBySavingsPlanOrderOperationOptions())
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 PossibleValuesForGrainParameter

func PossibleValuesForGrainParameter() []string

func ValidateBillingAccountID

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

ValidateBillingAccountID checks that 'input' can be parsed as a Billing Account ID

func ValidateBillingProfileID

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

ValidateBillingProfileID checks that 'input' can be parsed as a Billing Profile ID

func ValidateSavingsPlanID

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

ValidateSavingsPlanID checks that 'input' can be parsed as a Savings Plan ID

func ValidateSavingsPlanOrderID

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

ValidateSavingsPlanOrderID checks that 'input' can be parsed as a Savings Plan Order ID

Types

type BenefitKind

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

func (*BenefitKind) UnmarshalJSON added in v0.20230411.1183115

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

type BenefitUtilizationSummariesClient

type BenefitUtilizationSummariesClient struct {
	Client *resourcemanager.Client
}

func NewBenefitUtilizationSummariesClientWithBaseURI

func NewBenefitUtilizationSummariesClientWithBaseURI(sdkApi sdkEnv.Api) (*BenefitUtilizationSummariesClient, error)

func (BenefitUtilizationSummariesClient) ListByBillingAccountId

ListByBillingAccountId ...

func (BenefitUtilizationSummariesClient) ListByBillingAccountIdComplete

ListByBillingAccountIdComplete retrieves all the results into a single object

func (BenefitUtilizationSummariesClient) ListByBillingAccountIdCompleteMatchingPredicate

ListByBillingAccountIdCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BenefitUtilizationSummariesClient) ListByBillingProfileId

ListByBillingProfileId ...

func (BenefitUtilizationSummariesClient) ListByBillingProfileIdComplete

ListByBillingProfileIdComplete retrieves all the results into a single object

func (BenefitUtilizationSummariesClient) ListByBillingProfileIdCompleteMatchingPredicate

ListByBillingProfileIdCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BenefitUtilizationSummariesClient) ListBySavingsPlanId

ListBySavingsPlanId ...

func (BenefitUtilizationSummariesClient) ListBySavingsPlanIdComplete

ListBySavingsPlanIdComplete retrieves all the results into a single object

func (BenefitUtilizationSummariesClient) ListBySavingsPlanIdCompleteMatchingPredicate

ListBySavingsPlanIdCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (BenefitUtilizationSummariesClient) ListBySavingsPlanOrder

ListBySavingsPlanOrder ...

func (BenefitUtilizationSummariesClient) ListBySavingsPlanOrderComplete

ListBySavingsPlanOrderComplete retrieves all the results into a single object

func (BenefitUtilizationSummariesClient) ListBySavingsPlanOrderCompleteMatchingPredicate

ListBySavingsPlanOrderCompleteMatchingPredicate retrieves all the results and then applies the predicate

type BenefitUtilizationSummary

type BenefitUtilizationSummary interface {
}

type BenefitUtilizationSummaryOperationPredicate

type BenefitUtilizationSummaryOperationPredicate struct {
}

func (BenefitUtilizationSummaryOperationPredicate) Matches

type BillingAccountId

type BillingAccountId struct {
	BillingAccountId string
}

BillingAccountId is a struct representing the Resource ID for a Billing Account

func NewBillingAccountID

func NewBillingAccountID(billingAccountId string) BillingAccountId

NewBillingAccountID returns a new BillingAccountId struct

func ParseBillingAccountID

func ParseBillingAccountID(input string) (*BillingAccountId, error)

ParseBillingAccountID parses 'input' into a BillingAccountId

func ParseBillingAccountIDInsensitively

func ParseBillingAccountIDInsensitively(input string) (*BillingAccountId, error)

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

func (BillingAccountId) ID

func (id BillingAccountId) ID() string

ID returns the formatted Billing Account ID

func (BillingAccountId) Segments

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

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

func (BillingAccountId) String

func (id BillingAccountId) String() string

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

type BillingProfileId

type BillingProfileId struct {
	BillingAccountId string
	BillingProfileId string
}

BillingProfileId is a struct representing the Resource ID for a Billing Profile

func NewBillingProfileID

func NewBillingProfileID(billingAccountId string, billingProfileId string) BillingProfileId

NewBillingProfileID returns a new BillingProfileId struct

func ParseBillingProfileID

func ParseBillingProfileID(input string) (*BillingProfileId, error)

ParseBillingProfileID parses 'input' into a BillingProfileId

func ParseBillingProfileIDInsensitively

func ParseBillingProfileIDInsensitively(input string) (*BillingProfileId, error)

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

func (BillingProfileId) ID

func (id BillingProfileId) ID() string

ID returns the formatted Billing Profile ID

func (BillingProfileId) Segments

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

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

func (BillingProfileId) String

func (id BillingProfileId) String() string

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

type GrainParameter

type GrainParameter string
const (
	GrainParameterDaily   GrainParameter = "Daily"
	GrainParameterHourly  GrainParameter = "Hourly"
	GrainParameterMonthly GrainParameter = "Monthly"
)

func (*GrainParameter) UnmarshalJSON added in v0.20230411.1183115

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

type IncludedQuantityUtilizationSummary

type IncludedQuantityUtilizationSummary struct {
	Properties *IncludedQuantityUtilizationSummaryProperties `json:"properties,omitempty"`

	// Fields inherited from BenefitUtilizationSummary
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (IncludedQuantityUtilizationSummary) MarshalJSON

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

type IncludedQuantityUtilizationSummaryProperties

type IncludedQuantityUtilizationSummaryProperties struct {
	ArmSkuName            *string      `json:"armSkuName,omitempty"`
	BenefitId             *string      `json:"benefitId,omitempty"`
	BenefitOrderId        *string      `json:"benefitOrderId,omitempty"`
	BenefitType           *BenefitKind `json:"benefitType,omitempty"`
	UsageDate             *string      `json:"usageDate,omitempty"`
	UtilizationPercentage *float64     `json:"utilizationPercentage,omitempty"`
}

func (*IncludedQuantityUtilizationSummaryProperties) GetUsageDateAsTime

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

func (*IncludedQuantityUtilizationSummaryProperties) SetUsageDateAsTime

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

type ListByBillingAccountIdCompleteResult

type ListByBillingAccountIdCompleteResult struct {
	Items []BenefitUtilizationSummary
}

type ListByBillingAccountIdOperationOptions

type ListByBillingAccountIdOperationOptions struct {
	Filter         *string
	GrainParameter *GrainParameter
}

func DefaultListByBillingAccountIdOperationOptions

func DefaultListByBillingAccountIdOperationOptions() ListByBillingAccountIdOperationOptions

func (ListByBillingAccountIdOperationOptions) ToHeaders added in v0.20230411.1183115

func (ListByBillingAccountIdOperationOptions) ToOData added in v0.20230411.1183115

func (ListByBillingAccountIdOperationOptions) ToQuery added in v0.20230411.1183115

type ListByBillingAccountIdOperationResponse

type ListByBillingAccountIdOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BenefitUtilizationSummary
}

type ListByBillingProfileIdCompleteResult

type ListByBillingProfileIdCompleteResult struct {
	Items []BenefitUtilizationSummary
}

type ListByBillingProfileIdOperationOptions

type ListByBillingProfileIdOperationOptions struct {
	Filter         *string
	GrainParameter *GrainParameter
}

func DefaultListByBillingProfileIdOperationOptions

func DefaultListByBillingProfileIdOperationOptions() ListByBillingProfileIdOperationOptions

func (ListByBillingProfileIdOperationOptions) ToHeaders added in v0.20230411.1183115

func (ListByBillingProfileIdOperationOptions) ToOData added in v0.20230411.1183115

func (ListByBillingProfileIdOperationOptions) ToQuery added in v0.20230411.1183115

type ListByBillingProfileIdOperationResponse

type ListByBillingProfileIdOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BenefitUtilizationSummary
}

type ListBySavingsPlanIdCompleteResult

type ListBySavingsPlanIdCompleteResult struct {
	Items []BenefitUtilizationSummary
}

type ListBySavingsPlanIdOperationOptions

type ListBySavingsPlanIdOperationOptions struct {
	Filter         *string
	GrainParameter *GrainParameter
}

func DefaultListBySavingsPlanIdOperationOptions

func DefaultListBySavingsPlanIdOperationOptions() ListBySavingsPlanIdOperationOptions

func (ListBySavingsPlanIdOperationOptions) ToHeaders added in v0.20230411.1183115

func (ListBySavingsPlanIdOperationOptions) ToOData added in v0.20230411.1183115

func (ListBySavingsPlanIdOperationOptions) ToQuery added in v0.20230411.1183115

type ListBySavingsPlanIdOperationResponse

type ListBySavingsPlanIdOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BenefitUtilizationSummary
}

type ListBySavingsPlanOrderCompleteResult

type ListBySavingsPlanOrderCompleteResult struct {
	Items []BenefitUtilizationSummary
}

type ListBySavingsPlanOrderOperationOptions

type ListBySavingsPlanOrderOperationOptions struct {
	Filter         *string
	GrainParameter *GrainParameter
}

func DefaultListBySavingsPlanOrderOperationOptions

func DefaultListBySavingsPlanOrderOperationOptions() ListBySavingsPlanOrderOperationOptions

func (ListBySavingsPlanOrderOperationOptions) ToHeaders added in v0.20230411.1183115

func (ListBySavingsPlanOrderOperationOptions) ToOData added in v0.20230411.1183115

func (ListBySavingsPlanOrderOperationOptions) ToQuery added in v0.20230411.1183115

type ListBySavingsPlanOrderOperationResponse

type ListBySavingsPlanOrderOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]BenefitUtilizationSummary
}

type SavingsPlanId

type SavingsPlanId struct {
	SavingsPlanOrderId string
	SavingsPlanId      string
}

SavingsPlanId is a struct representing the Resource ID for a Savings Plan

func NewSavingsPlanID

func NewSavingsPlanID(savingsPlanOrderId string, savingsPlanId string) SavingsPlanId

NewSavingsPlanID returns a new SavingsPlanId struct

func ParseSavingsPlanID

func ParseSavingsPlanID(input string) (*SavingsPlanId, error)

ParseSavingsPlanID parses 'input' into a SavingsPlanId

func ParseSavingsPlanIDInsensitively

func ParseSavingsPlanIDInsensitively(input string) (*SavingsPlanId, error)

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

func (SavingsPlanId) ID

func (id SavingsPlanId) ID() string

ID returns the formatted Savings Plan ID

func (SavingsPlanId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Savings Plan ID

func (SavingsPlanId) String

func (id SavingsPlanId) String() string

String returns a human-readable description of this Savings Plan ID

type SavingsPlanOrderId

type SavingsPlanOrderId struct {
	SavingsPlanOrderId string
}

SavingsPlanOrderId is a struct representing the Resource ID for a Savings Plan Order

func NewSavingsPlanOrderID

func NewSavingsPlanOrderID(savingsPlanOrderId string) SavingsPlanOrderId

NewSavingsPlanOrderID returns a new SavingsPlanOrderId struct

func ParseSavingsPlanOrderID

func ParseSavingsPlanOrderID(input string) (*SavingsPlanOrderId, error)

ParseSavingsPlanOrderID parses 'input' into a SavingsPlanOrderId

func ParseSavingsPlanOrderIDInsensitively

func ParseSavingsPlanOrderIDInsensitively(input string) (*SavingsPlanOrderId, error)

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

func (SavingsPlanOrderId) ID

func (id SavingsPlanOrderId) ID() string

ID returns the formatted Savings Plan Order ID

func (SavingsPlanOrderId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Savings Plan Order ID

func (SavingsPlanOrderId) String

func (id SavingsPlanOrderId) String() string

String returns a human-readable description of this Savings Plan Order ID

type SavingsPlanUtilizationSummary

type SavingsPlanUtilizationSummary struct {
	Properties *SavingsPlanUtilizationSummaryProperties `json:"properties,omitempty"`

	// Fields inherited from BenefitUtilizationSummary
	Id   *string `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

func (SavingsPlanUtilizationSummary) MarshalJSON

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

type SavingsPlanUtilizationSummaryProperties

type SavingsPlanUtilizationSummaryProperties struct {
	ArmSkuName               *string      `json:"armSkuName,omitempty"`
	AvgUtilizationPercentage *float64     `json:"avgUtilizationPercentage,omitempty"`
	BenefitId                *string      `json:"benefitId,omitempty"`
	BenefitOrderId           *string      `json:"benefitOrderId,omitempty"`
	BenefitType              *BenefitKind `json:"benefitType,omitempty"`
	MaxUtilizationPercentage *float64     `json:"maxUtilizationPercentage,omitempty"`
	MinUtilizationPercentage *float64     `json:"minUtilizationPercentage,omitempty"`
	UsageDate                *string      `json:"usageDate,omitempty"`
}

func (*SavingsPlanUtilizationSummaryProperties) GetUsageDateAsTime

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

func (*SavingsPlanUtilizationSummaryProperties) SetUsageDateAsTime

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

Jump to

Keyboard shortcuts

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