balances

package
v0.20241212.1154051 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MPL-2.0 Imports: 11 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-11-01/balances Documentation

The balances SDK allows for interaction with Azure Resource Manager consumption (API Version 2023-11-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/2023-11-01/balances"

Client Initialization

client := balances.NewBalancesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: BalancesClient.GetByBillingAccount

ctx := context.TODO()
id := balances.NewBillingAccountID("billingAccountId")

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

Example Usage: BalancesClient.GetForBillingPeriodByBillingAccount

ctx := context.TODO()
id := balances.NewBillingAccountBillingPeriodID("billingAccountId", "billingPeriodName")

read, err := client.GetForBillingPeriodByBillingAccount(ctx, id)
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 PossibleValuesForBillingFrequency

func PossibleValuesForBillingFrequency() []string

func ValidateBillingAccountBillingPeriodID

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

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

func ValidateBillingAccountID

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

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

Types

type Balance

type Balance struct {
	Etag       *string            `json:"etag,omitempty"`
	Id         *string            `json:"id,omitempty"`
	Name       *string            `json:"name,omitempty"`
	Properties *BalanceProperties `json:"properties,omitempty"`
	Tags       *map[string]string `json:"tags,omitempty"`
	Type       *string            `json:"type,omitempty"`
}

type BalanceProperties

type BalanceProperties struct {
	AdjustmentDetails              *[]BalancePropertiesAdjustmentDetailsInlined   `json:"adjustmentDetails,omitempty"`
	Adjustments                    *float64                                       `json:"adjustments,omitempty"`
	AzureMarketplaceServiceCharges *float64                                       `json:"azureMarketplaceServiceCharges,omitempty"`
	BeginningBalance               *float64                                       `json:"beginningBalance,omitempty"`
	BillingFrequency               *BillingFrequency                              `json:"billingFrequency,omitempty"`
	ChargesBilledSeparately        *float64                                       `json:"chargesBilledSeparately,omitempty"`
	Currency                       *string                                        `json:"currency,omitempty"`
	EndingBalance                  *float64                                       `json:"endingBalance,omitempty"`
	NewPurchases                   *float64                                       `json:"newPurchases,omitempty"`
	NewPurchasesDetails            *[]BalancePropertiesNewPurchasesDetailsInlined `json:"newPurchasesDetails,omitempty"`
	OverageRefund                  *float64                                       `json:"overageRefund,omitempty"`
	PriceHidden                    *bool                                          `json:"priceHidden,omitempty"`
	ServiceOverage                 *float64                                       `json:"serviceOverage,omitempty"`
	TotalOverage                   *float64                                       `json:"totalOverage,omitempty"`
	TotalUsage                     *float64                                       `json:"totalUsage,omitempty"`
	Utilized                       *float64                                       `json:"utilized,omitempty"`
}

type BalancePropertiesAdjustmentDetailsInlined

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

type BalancePropertiesNewPurchasesDetailsInlined

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

type BalancesClient

type BalancesClient struct {
	Client *resourcemanager.Client
}

func NewBalancesClientWithBaseURI

func NewBalancesClientWithBaseURI(sdkApi sdkEnv.Api) (*BalancesClient, error)

func (BalancesClient) GetByBillingAccount

func (c BalancesClient) GetByBillingAccount(ctx context.Context, id BillingAccountId) (result GetByBillingAccountOperationResponse, err error)

GetByBillingAccount ...

func (BalancesClient) GetForBillingPeriodByBillingAccount

GetForBillingPeriodByBillingAccount ...

type BillingAccountBillingPeriodId

type BillingAccountBillingPeriodId struct {
	BillingAccountId  string
	BillingPeriodName string
}

BillingAccountBillingPeriodId is a struct representing the Resource ID for a Billing Account Billing Period

func NewBillingAccountBillingPeriodID

func NewBillingAccountBillingPeriodID(billingAccountId string, billingPeriodName string) BillingAccountBillingPeriodId

NewBillingAccountBillingPeriodID returns a new BillingAccountBillingPeriodId struct

func ParseBillingAccountBillingPeriodID

func ParseBillingAccountBillingPeriodID(input string) (*BillingAccountBillingPeriodId, error)

ParseBillingAccountBillingPeriodID parses 'input' into a BillingAccountBillingPeriodId

func ParseBillingAccountBillingPeriodIDInsensitively

func ParseBillingAccountBillingPeriodIDInsensitively(input string) (*BillingAccountBillingPeriodId, error)

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

func (*BillingAccountBillingPeriodId) FromParseResult

func (id *BillingAccountBillingPeriodId) FromParseResult(input resourceids.ParseResult) error

func (BillingAccountBillingPeriodId) ID

ID returns the formatted Billing Account Billing Period ID

func (BillingAccountBillingPeriodId) Segments

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

func (BillingAccountBillingPeriodId) String

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

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) FromParseResult

func (id *BillingAccountId) FromParseResult(input resourceids.ParseResult) error

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 BillingFrequency

type BillingFrequency string
const (
	BillingFrequencyMonth   BillingFrequency = "Month"
	BillingFrequencyQuarter BillingFrequency = "Quarter"
	BillingFrequencyYear    BillingFrequency = "Year"
)

func (*BillingFrequency) UnmarshalJSON

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

type GetByBillingAccountOperationResponse

type GetByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Balance
}

type GetForBillingPeriodByBillingAccountOperationResponse

type GetForBillingPeriodByBillingAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *Balance
}

Jump to

Keyboard shortcuts

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