charges

package
v0.20230901.1170029 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2019-10-01/charges Documentation

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

Client Initialization

client := charges.NewChargesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ChargesClient.List

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

read, err := client.List(ctx, id, charges.DefaultListOperationOptions())
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 PossibleValuesForChargeSummaryKind

func PossibleValuesForChargeSummaryKind() []string

Types

type Amount

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

type ChargeSummary

type ChargeSummary interface {
}

type ChargeSummaryKind

type ChargeSummaryKind string
const (
	ChargeSummaryKindLegacy ChargeSummaryKind = "legacy"
	ChargeSummaryKindModern ChargeSummaryKind = "modern"
)

func (*ChargeSummaryKind) UnmarshalJSON added in v0.20230411.1183115

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

type ChargesClient

type ChargesClient struct {
	Client *resourcemanager.Client
}

func NewChargesClientWithBaseURI

func NewChargesClientWithBaseURI(sdkApi sdkEnv.Api) (*ChargesClient, error)

func (ChargesClient) List

List ...

type ChargesListResult

type ChargesListResult struct {
	Value *[]ChargeSummary `json:"value,omitempty"`
}

func (*ChargesListResult) UnmarshalJSON

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

type LegacyChargeSummary

type LegacyChargeSummary struct {
	Properties LegacyChargeSummaryProperties `json:"properties"`

	// Fields inherited from ChargeSummary
	ETag *string            `json:"eTag,omitempty"`
	Id   *string            `json:"id,omitempty"`
	Name *string            `json:"name,omitempty"`
	Tags *map[string]string `json:"tags,omitempty"`
	Type *string            `json:"type,omitempty"`
}

func (LegacyChargeSummary) MarshalJSON

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

type LegacyChargeSummaryProperties

type LegacyChargeSummaryProperties struct {
	AzureCharges            *float64 `json:"azureCharges,omitempty"`
	AzureMarketplaceCharges *float64 `json:"azureMarketplaceCharges,omitempty"`
	BillingPeriodId         *string  `json:"billingPeriodId,omitempty"`
	ChargesBilledSeparately *float64 `json:"chargesBilledSeparately,omitempty"`
	Currency                *string  `json:"currency,omitempty"`
	UsageEnd                *string  `json:"usageEnd,omitempty"`
	UsageStart              *string  `json:"usageStart,omitempty"`
}

type ListOperationOptions

type ListOperationOptions struct {
	Apply     *string
	EndDate   *string
	Filter    *string
	StartDate *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders added in v0.20230411.1183115

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

func (ListOperationOptions) ToOData added in v0.20230411.1183115

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

func (ListOperationOptions) ToQuery added in v0.20230411.1183115

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ChargesListResult
}

type ModernChargeSummary

type ModernChargeSummary struct {
	Properties ModernChargeSummaryProperties `json:"properties"`

	// Fields inherited from ChargeSummary
	ETag *string            `json:"eTag,omitempty"`
	Id   *string            `json:"id,omitempty"`
	Name *string            `json:"name,omitempty"`
	Tags *map[string]string `json:"tags,omitempty"`
	Type *string            `json:"type,omitempty"`
}

func (ModernChargeSummary) MarshalJSON

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

type ModernChargeSummaryProperties

type ModernChargeSummaryProperties struct {
	AzureCharges            *Amount `json:"azureCharges,omitempty"`
	BillingAccountId        *string `json:"billingAccountId,omitempty"`
	BillingPeriodId         *string `json:"billingPeriodId,omitempty"`
	BillingProfileId        *string `json:"billingProfileId,omitempty"`
	ChargesBilledSeparately *Amount `json:"chargesBilledSeparately,omitempty"`
	CustomerId              *string `json:"customerId,omitempty"`
	InvoiceSectionId        *string `json:"invoiceSectionId,omitempty"`
	IsInvoiced              *bool   `json:"isInvoiced,omitempty"`
	MarketplaceCharges      *Amount `json:"marketplaceCharges,omitempty"`
	SubscriptionId          *string `json:"subscriptionId,omitempty"`
	UsageEnd                *string `json:"usageEnd,omitempty"`
	UsageStart              *string `json:"usageStart,omitempty"`
}

type RawChargeSummaryImpl added in v0.20230807.1063129

type RawChargeSummaryImpl struct {
	Type   string
	Values map[string]interface{}
}

RawModeOfTransitImpl 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).

Jump to

Keyboard shortcuts

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