credits

package
v0.20230918.1115907 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MPL-2.0 Imports: 9 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2023-05-01/credits Documentation

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

Client Initialization

client := credits.NewCreditsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CreditsClient.Get

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

read, err := client.Get(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 ValidateBillingProfileID

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

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

Types

type Amount

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

type AmountWithExchangeRate

type AmountWithExchangeRate struct {
	Currency          *string  `json:"currency,omitempty"`
	ExchangeRate      *float64 `json:"exchangeRate,omitempty"`
	ExchangeRateMonth *int64   `json:"exchangeRateMonth,omitempty"`
	Value             *float64 `json:"value,omitempty"`
}

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 CreditBalanceSummary

type CreditBalanceSummary struct {
	CurrentBalance                    *Amount                 `json:"currentBalance,omitempty"`
	EstimatedBalance                  *Amount                 `json:"estimatedBalance,omitempty"`
	EstimatedBalanceInBillingCurrency *AmountWithExchangeRate `json:"estimatedBalanceInBillingCurrency,omitempty"`
}

type CreditSummary

type CreditSummary struct {
	ETag       *string                  `json:"eTag,omitempty"`
	Id         *string                  `json:"id,omitempty"`
	Name       *string                  `json:"name,omitempty"`
	Properties *CreditSummaryProperties `json:"properties,omitempty"`
	Type       *string                  `json:"type,omitempty"`
}

type CreditSummaryProperties

type CreditSummaryProperties struct {
	BalanceSummary           *CreditBalanceSummary `json:"balanceSummary,omitempty"`
	BillingCurrency          *string               `json:"billingCurrency,omitempty"`
	CreditCurrency           *string               `json:"creditCurrency,omitempty"`
	ETag                     *string               `json:"eTag,omitempty"`
	ExpiredCredit            *Amount               `json:"expiredCredit,omitempty"`
	IsEstimatedBalance       *bool                 `json:"isEstimatedBalance,omitempty"`
	PendingCreditAdjustments *Amount               `json:"pendingCreditAdjustments,omitempty"`
	PendingEligibleCharges   *Amount               `json:"pendingEligibleCharges,omitempty"`
	Reseller                 *Reseller             `json:"reseller,omitempty"`
}

type CreditsClient

type CreditsClient struct {
	Client *resourcemanager.Client
}

func NewCreditsClientWithBaseURI

func NewCreditsClientWithBaseURI(sdkApi sdkEnv.Api) (*CreditsClient, error)

func (CreditsClient) Get

Get ...

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *CreditSummary
}

type Reseller

type Reseller struct {
	ResellerDescription *string `json:"resellerDescription,omitempty"`
	ResellerId          *string `json:"resellerId,omitempty"`
}

Jump to

Keyboard shortcuts

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