aggregatedcost

package
v0.20231002.1065327 Latest Latest
Warning

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

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

README

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

The aggregatedcost SDK allows for interaction with the Azure Resource Manager Service 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/aggregatedcost"

Client Initialization

client := aggregatedcost.NewAggregatedCostClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AggregatedCostClient.GetByManagementGroup

ctx := context.TODO()
id := aggregatedcost.NewManagementGroupID("groupIdValue")

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

Example Usage: AggregatedCostClient.GetForBillingPeriodByManagementGroup

ctx := context.TODO()
id := aggregatedcost.NewProviders2BillingPeriodID("managementGroupIdValue", "billingPeriodValue")

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

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

ValidateProviders2BillingPeriodID checks that 'input' can be parsed as a Providers 2 Billing Period ID

Types

type AggregatedCostClient

type AggregatedCostClient struct {
	Client *resourcemanager.Client
}

func NewAggregatedCostClientWithBaseURI

func NewAggregatedCostClientWithBaseURI(sdkApi sdkEnv.Api) (*AggregatedCostClient, error)

func (AggregatedCostClient) GetByManagementGroup

GetByManagementGroup ...

func (AggregatedCostClient) GetForBillingPeriodByManagementGroup

GetForBillingPeriodByManagementGroup ...

type GetByManagementGroupOperationOptions

type GetByManagementGroupOperationOptions struct {
	Filter *string
}

func DefaultGetByManagementGroupOperationOptions

func DefaultGetByManagementGroupOperationOptions() GetByManagementGroupOperationOptions

func (GetByManagementGroupOperationOptions) ToHeaders

func (GetByManagementGroupOperationOptions) ToOData

func (GetByManagementGroupOperationOptions) ToQuery

type GetByManagementGroupOperationResponse

type GetByManagementGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementGroupAggregatedCostResult
}

type GetForBillingPeriodByManagementGroupOperationResponse

type GetForBillingPeriodByManagementGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ManagementGroupAggregatedCostResult
}

type ManagementGroupAggregatedCostProperties

type ManagementGroupAggregatedCostProperties struct {
	AzureCharges            *float64                               `json:"azureCharges,omitempty"`
	BillingPeriodId         *string                                `json:"billingPeriodId,omitempty"`
	ChargesBilledSeparately *float64                               `json:"chargesBilledSeparately,omitempty"`
	Children                *[]ManagementGroupAggregatedCostResult `json:"children,omitempty"`
	Currency                *string                                `json:"currency,omitempty"`
	ExcludedSubscriptions   *[]string                              `json:"excludedSubscriptions,omitempty"`
	IncludedSubscriptions   *[]string                              `json:"includedSubscriptions,omitempty"`
	MarketplaceCharges      *float64                               `json:"marketplaceCharges,omitempty"`
	UsageEnd                *string                                `json:"usageEnd,omitempty"`
	UsageStart              *string                                `json:"usageStart,omitempty"`
}

func (*ManagementGroupAggregatedCostProperties) GetUsageEndAsTime

func (o *ManagementGroupAggregatedCostProperties) GetUsageEndAsTime() (*time.Time, error)

func (*ManagementGroupAggregatedCostProperties) GetUsageStartAsTime

func (o *ManagementGroupAggregatedCostProperties) GetUsageStartAsTime() (*time.Time, error)

func (*ManagementGroupAggregatedCostProperties) SetUsageEndAsTime

func (o *ManagementGroupAggregatedCostProperties) SetUsageEndAsTime(input time.Time)

func (*ManagementGroupAggregatedCostProperties) SetUsageStartAsTime

func (o *ManagementGroupAggregatedCostProperties) SetUsageStartAsTime(input time.Time)

type ManagementGroupAggregatedCostResult

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

type Providers2BillingPeriodId

type Providers2BillingPeriodId struct {
	ManagementGroupId string
	BillingPeriodName string
}

Providers2BillingPeriodId is a struct representing the Resource ID for a Providers 2 Billing Period

func NewProviders2BillingPeriodID

func NewProviders2BillingPeriodID(managementGroupId string, billingPeriodName string) Providers2BillingPeriodId

NewProviders2BillingPeriodID returns a new Providers2BillingPeriodId struct

func ParseProviders2BillingPeriodID

func ParseProviders2BillingPeriodID(input string) (*Providers2BillingPeriodId, error)

ParseProviders2BillingPeriodID parses 'input' into a Providers2BillingPeriodId

func ParseProviders2BillingPeriodIDInsensitively

func ParseProviders2BillingPeriodIDInsensitively(input string) (*Providers2BillingPeriodId, error)

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

func (Providers2BillingPeriodId) ID

ID returns the formatted Providers 2 Billing Period ID

func (Providers2BillingPeriodId) Segments

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

func (Providers2BillingPeriodId) String

func (id Providers2BillingPeriodId) String() string

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

Jump to

Keyboard shortcuts

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