README ¶
github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/aggregatedcost
Documentation
The aggregatedcost
SDK allows for interaction with the Azure Resource Manager Service consumption
(API Version 2022-09-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/consumption/2022-09-01/aggregatedcost"
Client Initialization
client := aggregatedcost.NewAggregatedCostClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: AggregatedCostClient.GetByManagementGroup
ctx := context.TODO()
id := commonids.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 ¶
- func ValidateProviders2BillingPeriodID(input interface{}, key string) (warnings []string, errors []error)
- type AggregatedCostClient
- func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commonids.ManagementGroupId, ...) (result GetByManagementGroupOperationResponse, err error)
- func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.Context, id Providers2BillingPeriodId) (result GetForBillingPeriodByManagementGroupOperationResponse, err error)
- type GetByManagementGroupOperationOptions
- type GetByManagementGroupOperationResponse
- type GetForBillingPeriodByManagementGroupOperationResponse
- type ManagementGroupAggregatedCostProperties
- func (o *ManagementGroupAggregatedCostProperties) GetUsageEndAsTime() (*time.Time, error)
- func (o *ManagementGroupAggregatedCostProperties) GetUsageStartAsTime() (*time.Time, error)
- func (o *ManagementGroupAggregatedCostProperties) SetUsageEndAsTime(input time.Time)
- func (o *ManagementGroupAggregatedCostProperties) SetUsageStartAsTime(input time.Time)
- type ManagementGroupAggregatedCostResult
- type Providers2BillingPeriodId
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 ¶
func (c AggregatedCostClient) GetByManagementGroup(ctx context.Context, id commonids.ManagementGroupId, options GetByManagementGroupOperationOptions) (result GetByManagementGroupOperationResponse, err error)
GetByManagementGroup ...
func (AggregatedCostClient) GetForBillingPeriodByManagementGroup ¶
func (c AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.Context, id Providers2BillingPeriodId) (result GetForBillingPeriodByManagementGroupOperationResponse, err error)
GetForBillingPeriodByManagementGroup ...
type GetByManagementGroupOperationOptions ¶
type GetByManagementGroupOperationOptions struct {
Filter *string
}
func DefaultGetByManagementGroupOperationOptions ¶
func DefaultGetByManagementGroupOperationOptions() GetByManagementGroupOperationOptions
func (GetByManagementGroupOperationOptions) ToHeaders ¶
func (o GetByManagementGroupOperationOptions) ToHeaders() *client.Headers
func (GetByManagementGroupOperationOptions) ToOData ¶
func (o GetByManagementGroupOperationOptions) ToOData() *odata.Query
func (GetByManagementGroupOperationOptions) ToQuery ¶
func (o GetByManagementGroupOperationOptions) ToQuery() *client.QueryParams
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 ¶
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) FromParseResult ¶
func (id *Providers2BillingPeriodId) FromParseResult(input resourceids.ParseResult) error
func (Providers2BillingPeriodId) ID ¶
func (id Providers2BillingPeriodId) ID() string
ID returns the formatted Providers 2 Billing Period ID
func (Providers2BillingPeriodId) Segments ¶
func (id Providers2BillingPeriodId) Segments() []resourceids.Segment
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