consumption

package
v64.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package consumption implements the Azure ARM Consumption service API version 2019-10-01.

Consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

Index

Constants

View Source
const (
	// DefaultBaseURI is the default URI used for the service Consumption
	DefaultBaseURI = "https://management.azure.com"
)

Variables

This section is empty.

Functions

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

Types

type AggregatedCostClient

type AggregatedCostClient struct {
	BaseClient
}

AggregatedCostClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewAggregatedCostClient

func NewAggregatedCostClient(subscriptionID string) AggregatedCostClient

NewAggregatedCostClient creates an instance of the AggregatedCostClient client.

func NewAggregatedCostClientWithBaseURI

func NewAggregatedCostClientWithBaseURI(baseURI string, subscriptionID string) AggregatedCostClient

NewAggregatedCostClientWithBaseURI creates an instance of the AggregatedCostClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (AggregatedCostClient) GetByManagementGroup

func (client AggregatedCostClient) GetByManagementGroup(ctx context.Context, managementGroupID string, filter string) (result ManagementGroupAggregatedCostResult, err error)

GetByManagementGroup provides the aggregate cost of a management group and all child management groups by current billing period. Parameters: managementGroupID - azure Management Group ID. filter - may be used to filter aggregated cost by properties/usageStart (Utc time), properties/usageEnd (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:).

func (AggregatedCostClient) GetByManagementGroupPreparer

func (client AggregatedCostClient) GetByManagementGroupPreparer(ctx context.Context, managementGroupID string, filter string) (*http.Request, error)

GetByManagementGroupPreparer prepares the GetByManagementGroup request.

func (AggregatedCostClient) GetByManagementGroupResponder

func (client AggregatedCostClient) GetByManagementGroupResponder(resp *http.Response) (result ManagementGroupAggregatedCostResult, err error)

GetByManagementGroupResponder handles the response to the GetByManagementGroup request. The method always closes the http.Response Body.

func (AggregatedCostClient) GetByManagementGroupSender

func (client AggregatedCostClient) GetByManagementGroupSender(req *http.Request) (*http.Response, error)

GetByManagementGroupSender sends the GetByManagementGroup request. The method will close the http.Response Body if it receives an error.

func (AggregatedCostClient) GetForBillingPeriodByManagementGroup

func (client AggregatedCostClient) GetForBillingPeriodByManagementGroup(ctx context.Context, managementGroupID string, billingPeriodName string) (result ManagementGroupAggregatedCostResult, err error)

GetForBillingPeriodByManagementGroup provides the aggregate cost of a management group and all child management groups by specified billing period Parameters: managementGroupID - azure Management Group ID. billingPeriodName - billing Period Name.

func (AggregatedCostClient) GetForBillingPeriodByManagementGroupPreparer

func (client AggregatedCostClient) GetForBillingPeriodByManagementGroupPreparer(ctx context.Context, managementGroupID string, billingPeriodName string) (*http.Request, error)

GetForBillingPeriodByManagementGroupPreparer prepares the GetForBillingPeriodByManagementGroup request.

func (AggregatedCostClient) GetForBillingPeriodByManagementGroupResponder

func (client AggregatedCostClient) GetForBillingPeriodByManagementGroupResponder(resp *http.Response) (result ManagementGroupAggregatedCostResult, err error)

GetForBillingPeriodByManagementGroupResponder handles the response to the GetForBillingPeriodByManagementGroup request. The method always closes the http.Response Body.

func (AggregatedCostClient) GetForBillingPeriodByManagementGroupSender

func (client AggregatedCostClient) GetForBillingPeriodByManagementGroupSender(req *http.Request) (*http.Response, error)

GetForBillingPeriodByManagementGroupSender sends the GetForBillingPeriodByManagementGroup request. The method will close the http.Response Body if it receives an error.

type Amount

type Amount struct {
	// Currency - READ-ONLY; Amount currency.
	Currency *string `json:"currency,omitempty"`
	// Value - READ-ONLY; Amount.
	Value *decimal.Decimal `json:"value,omitempty"`
}

Amount the amount plus currency .

func (Amount) MarshalJSON

func (a Amount) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Amount.

type AmountWithExchangeRate

type AmountWithExchangeRate struct {
	// ExchangeRate - READ-ONLY; Exchange Rate.
	ExchangeRate *decimal.Decimal `json:"exchangeRate,omitempty"`
	// ExchangeRateMonth - READ-ONLY; Exchange rate month.
	ExchangeRateMonth *float64 `json:"exchangeRateMonth,omitempty"`
	// Currency - READ-ONLY; Amount currency.
	Currency *string `json:"currency,omitempty"`
	// Value - READ-ONLY; Amount.
	Value *decimal.Decimal `json:"value,omitempty"`
}

AmountWithExchangeRate reseller details

func (AmountWithExchangeRate) MarshalJSON

func (awer AmountWithExchangeRate) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AmountWithExchangeRate.

type Balance

type Balance struct {
	autorest.Response  `json:"-"`
	*BalanceProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Balance a balance resource.

func (Balance) MarshalJSON

func (b Balance) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Balance.

func (*Balance) UnmarshalJSON

func (b *Balance) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Balance struct.

type BalanceProperties

type BalanceProperties struct {
	// Currency - READ-ONLY; The ISO currency in which the meter is charged, for example, USD.
	Currency *string `json:"currency,omitempty"`
	// BeginningBalance - READ-ONLY; The beginning balance for the billing period.
	BeginningBalance *decimal.Decimal `json:"beginningBalance,omitempty"`
	// EndingBalance - READ-ONLY; The ending balance for the billing period (for open periods this will be updated daily).
	EndingBalance *decimal.Decimal `json:"endingBalance,omitempty"`
	// NewPurchases - READ-ONLY; Total new purchase amount.
	NewPurchases *decimal.Decimal `json:"newPurchases,omitempty"`
	// Adjustments - READ-ONLY; Total adjustment amount.
	Adjustments *decimal.Decimal `json:"adjustments,omitempty"`
	// Utilized - READ-ONLY; Total Commitment usage.
	Utilized *decimal.Decimal `json:"utilized,omitempty"`
	// ServiceOverage - READ-ONLY; Overage for Azure services.
	ServiceOverage *decimal.Decimal `json:"serviceOverage,omitempty"`
	// ChargesBilledSeparately - READ-ONLY; Charges Billed separately.
	ChargesBilledSeparately *decimal.Decimal `json:"chargesBilledSeparately,omitempty"`
	// TotalOverage - READ-ONLY; serviceOverage + chargesBilledSeparately.
	TotalOverage *decimal.Decimal `json:"totalOverage,omitempty"`
	// TotalUsage - READ-ONLY; Azure service commitment + total Overage.
	TotalUsage *decimal.Decimal `json:"totalUsage,omitempty"`
	// AzureMarketplaceServiceCharges - READ-ONLY; Total charges for Azure Marketplace.
	AzureMarketplaceServiceCharges *decimal.Decimal `json:"azureMarketplaceServiceCharges,omitempty"`
	// BillingFrequency - The billing frequency. Possible values include: 'BillingFrequencyMonth', 'BillingFrequencyQuarter', 'BillingFrequencyYear'
	BillingFrequency BillingFrequency `json:"billingFrequency,omitempty"`
	// PriceHidden - READ-ONLY; Price is hidden or not.
	PriceHidden *bool `json:"priceHidden,omitempty"`
	// NewPurchasesDetails - READ-ONLY; List of new purchases.
	NewPurchasesDetails *[]BalancePropertiesNewPurchasesDetailsItem `json:"newPurchasesDetails,omitempty"`
	// AdjustmentDetails - READ-ONLY; List of Adjustments (Promo credit, SIE credit etc.).
	AdjustmentDetails *[]BalancePropertiesAdjustmentDetailsItem `json:"adjustmentDetails,omitempty"`
}

BalanceProperties the properties of the balance.

func (BalanceProperties) MarshalJSON

func (bp BalanceProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BalanceProperties.

type BalancePropertiesAdjustmentDetailsItem

type BalancePropertiesAdjustmentDetailsItem struct {
	// Name - READ-ONLY; the name of new adjustment.
	Name *string `json:"name,omitempty"`
	// Value - READ-ONLY; the value of new adjustment.
	Value *decimal.Decimal `json:"value,omitempty"`
}

BalancePropertiesAdjustmentDetailsItem ...

func (BalancePropertiesAdjustmentDetailsItem) MarshalJSON

func (bpDi BalancePropertiesAdjustmentDetailsItem) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BalancePropertiesAdjustmentDetailsItem.

type BalancePropertiesNewPurchasesDetailsItem

type BalancePropertiesNewPurchasesDetailsItem struct {
	// Name - READ-ONLY; the name of new purchase.
	Name *string `json:"name,omitempty"`
	// Value - READ-ONLY; the value of new purchase.
	Value *decimal.Decimal `json:"value,omitempty"`
}

BalancePropertiesNewPurchasesDetailsItem ...

func (BalancePropertiesNewPurchasesDetailsItem) MarshalJSON

func (bpPdi BalancePropertiesNewPurchasesDetailsItem) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BalancePropertiesNewPurchasesDetailsItem.

type BalancesClient

type BalancesClient struct {
	BaseClient
}

BalancesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewBalancesClient

func NewBalancesClient(subscriptionID string) BalancesClient

NewBalancesClient creates an instance of the BalancesClient client.

func NewBalancesClientWithBaseURI

func NewBalancesClientWithBaseURI(baseURI string, subscriptionID string) BalancesClient

NewBalancesClientWithBaseURI creates an instance of the BalancesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (BalancesClient) GetByBillingAccount

func (client BalancesClient) GetByBillingAccount(ctx context.Context, billingAccountID string) (result Balance, err error)

GetByBillingAccount gets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later. Parameters: billingAccountID - billingAccount ID

func (BalancesClient) GetByBillingAccountPreparer

func (client BalancesClient) GetByBillingAccountPreparer(ctx context.Context, billingAccountID string) (*http.Request, error)

GetByBillingAccountPreparer prepares the GetByBillingAccount request.

func (BalancesClient) GetByBillingAccountResponder

func (client BalancesClient) GetByBillingAccountResponder(resp *http.Response) (result Balance, err error)

GetByBillingAccountResponder handles the response to the GetByBillingAccount request. The method always closes the http.Response Body.

func (BalancesClient) GetByBillingAccountSender

func (client BalancesClient) GetByBillingAccountSender(req *http.Request) (*http.Response, error)

GetByBillingAccountSender sends the GetByBillingAccount request. The method will close the http.Response Body if it receives an error.

func (BalancesClient) GetForBillingPeriodByBillingAccount

func (client BalancesClient) GetForBillingPeriodByBillingAccount(ctx context.Context, billingAccountID string, billingPeriodName string) (result Balance, err error)

GetForBillingPeriodByBillingAccount gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later. Parameters: billingAccountID - billingAccount ID billingPeriodName - billing Period Name.

func (BalancesClient) GetForBillingPeriodByBillingAccountPreparer

func (client BalancesClient) GetForBillingPeriodByBillingAccountPreparer(ctx context.Context, billingAccountID string, billingPeriodName string) (*http.Request, error)

GetForBillingPeriodByBillingAccountPreparer prepares the GetForBillingPeriodByBillingAccount request.

func (BalancesClient) GetForBillingPeriodByBillingAccountResponder

func (client BalancesClient) GetForBillingPeriodByBillingAccountResponder(resp *http.Response) (result Balance, err error)

GetForBillingPeriodByBillingAccountResponder handles the response to the GetForBillingPeriodByBillingAccount request. The method always closes the http.Response Body.

func (BalancesClient) GetForBillingPeriodByBillingAccountSender

func (client BalancesClient) GetForBillingPeriodByBillingAccountSender(req *http.Request) (*http.Response, error)

GetForBillingPeriodByBillingAccountSender sends the GetForBillingPeriodByBillingAccount request. The method will close the http.Response Body if it receives an error.

type BaseClient

type BaseClient struct {
	autorest.Client
	BaseURI        string
	SubscriptionID string
}

BaseClient is the base client for Consumption.

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type BasicChargeSummary

type BasicChargeSummary interface {
	AsLegacyChargeSummary() (*LegacyChargeSummary, bool)
	AsModernChargeSummary() (*ModernChargeSummary, bool)
	AsChargeSummary() (*ChargeSummary, bool)
}

BasicChargeSummary a charge summary resource.

type BasicReservationRecommendation

type BasicReservationRecommendation interface {
	AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)
	AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)
	AsReservationRecommendation() (*ReservationRecommendation, bool)
}

BasicReservationRecommendation a reservation recommendation resource.

type BasicUsageDetail

type BasicUsageDetail interface {
	AsLegacyUsageDetail() (*LegacyUsageDetail, bool)
	AsModernUsageDetail() (*ModernUsageDetail, bool)
	AsUsageDetail() (*UsageDetail, bool)
}

BasicUsageDetail an usage detail resource.

type BillingFrequency

type BillingFrequency string

BillingFrequency enumerates the values for billing frequency.

const (
	// BillingFrequencyMonth ...
	BillingFrequencyMonth BillingFrequency = "Month"
	// BillingFrequencyQuarter ...
	BillingFrequencyQuarter BillingFrequency = "Quarter"
	// BillingFrequencyYear ...
	BillingFrequencyYear BillingFrequency = "Year"
)

func PossibleBillingFrequencyValues

func PossibleBillingFrequencyValues() []BillingFrequency

PossibleBillingFrequencyValues returns an array of possible values for the BillingFrequency const type.

type Bound

type Bound string

Bound enumerates the values for bound.

const (
	// BoundLower ...
	BoundLower Bound = "Lower"
	// BoundUpper ...
	BoundUpper Bound = "Upper"
)

func PossibleBoundValues

func PossibleBoundValues() []Bound

PossibleBoundValues returns an array of possible values for the Bound const type.

type Budget

type Budget struct {
	autorest.Response `json:"-"`
	*BudgetProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

Budget a budget resource.

func (Budget) MarshalJSON

func (b Budget) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Budget.

func (*Budget) UnmarshalJSON

func (b *Budget) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Budget struct.

type BudgetComparisonExpression

type BudgetComparisonExpression struct {
	// Name - The name of the column to use in comparison.
	Name *string `json:"name,omitempty"`
	// Operator - The operator to use for comparison.
	Operator *string `json:"operator,omitempty"`
	// Values - Array of values to use for comparison
	Values *[]string `json:"values,omitempty"`
}

BudgetComparisonExpression the comparison expression to be used in the budgets.

type BudgetFilter

type BudgetFilter struct {
	// And - The logical "AND" expression. Must have at least 2 items.
	And *[]BudgetFilterProperties `json:"and,omitempty"`
	// Not - The logical "NOT" expression.
	Not *BudgetFilterProperties `json:"not,omitempty"`
	// Dimensions - Has comparison expression for a dimension
	Dimensions *BudgetComparisonExpression `json:"dimensions,omitempty"`
	// Tags - Has comparison expression for a tag
	Tags *BudgetComparisonExpression `json:"tags,omitempty"`
}

BudgetFilter may be used to filter budgets by resource group, resource, or meter.

type BudgetFilterProperties

type BudgetFilterProperties struct {
	// Dimensions - Has comparison expression for a dimension
	Dimensions *BudgetComparisonExpression `json:"dimensions,omitempty"`
	// Tags - Has comparison expression for a tag
	Tags *BudgetComparisonExpression `json:"tags,omitempty"`
}

BudgetFilterProperties the Dimensions or Tags to filter a budget by.

type BudgetProperties

type BudgetProperties struct {
	// Category - The category of the budget, whether the budget tracks cost or usage.
	Category *string `json:"category,omitempty"`
	// Amount - The total amount of cost to track with the budget
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// TimeGrain - The time covered by a budget. Tracking of the amount will be reset based on the time grain. BillingMonth, BillingQuarter, and BillingAnnual are only supported by WD customers. Possible values include: 'TimeGrainTypeMonthly', 'TimeGrainTypeQuarterly', 'TimeGrainTypeAnnually', 'TimeGrainTypeBillingMonth', 'TimeGrainTypeBillingQuarter', 'TimeGrainTypeBillingAnnual'
	TimeGrain TimeGrainType `json:"timeGrain,omitempty"`
	// TimePeriod - Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than twelve months. Past start date should  be selected within the timegrain period. There are no restrictions on the end date.
	TimePeriod *BudgetTimePeriod `json:"timePeriod,omitempty"`
	// Filter - May be used to filter budgets by user-specified dimensions and/or tags.
	Filter *BudgetFilter `json:"filter,omitempty"`
	// CurrentSpend - READ-ONLY; The current amount of cost which is being tracked for a budget.
	CurrentSpend *CurrentSpend `json:"currentSpend,omitempty"`
	// Notifications - Dictionary of notifications associated with the budget. Budget can have up to five notifications.
	Notifications map[string]*Notification `json:"notifications"`
	// ForecastSpend - READ-ONLY; The forecasted cost which is being tracked for a budget.
	ForecastSpend *ForecastSpend `json:"forecastSpend,omitempty"`
}

BudgetProperties the properties of the budget.

func (BudgetProperties) MarshalJSON

func (bp BudgetProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BudgetProperties.

type BudgetTimePeriod

type BudgetTimePeriod struct {
	// StartDate - The start date for the budget.
	StartDate *date.Time `json:"startDate,omitempty"`
	// EndDate - The end date for the budget. If not provided, we default this to 10 years from the start date.
	EndDate *date.Time `json:"endDate,omitempty"`
}

BudgetTimePeriod the start and end date for a budget.

type BudgetsClient

type BudgetsClient struct {
	BaseClient
}

BudgetsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewBudgetsClient

func NewBudgetsClient(subscriptionID string) BudgetsClient

NewBudgetsClient creates an instance of the BudgetsClient client.

func NewBudgetsClientWithBaseURI

func NewBudgetsClientWithBaseURI(baseURI string, subscriptionID string) BudgetsClient

NewBudgetsClientWithBaseURI creates an instance of the BudgetsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (BudgetsClient) CreateOrUpdate

func (client BudgetsClient) CreateOrUpdate(ctx context.Context, scope string, budgetName string, parameters Budget) (result Budget, err error)

CreateOrUpdate the operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation. Parameters: scope - the scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. budgetName - budget Name. parameters - parameters supplied to the Create Budget operation.

func (BudgetsClient) CreateOrUpdatePreparer

func (client BudgetsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, budgetName string, parameters Budget) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (BudgetsClient) CreateOrUpdateResponder

func (client BudgetsClient) CreateOrUpdateResponder(resp *http.Response) (result Budget, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (BudgetsClient) CreateOrUpdateSender

func (client BudgetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (BudgetsClient) Delete

func (client BudgetsClient) Delete(ctx context.Context, scope string, budgetName string) (result autorest.Response, err error)

Delete the operation to delete a budget. Parameters: scope - the scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. budgetName - budget Name.

func (BudgetsClient) DeletePreparer

func (client BudgetsClient) DeletePreparer(ctx context.Context, scope string, budgetName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (BudgetsClient) DeleteResponder

func (client BudgetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (BudgetsClient) DeleteSender

func (client BudgetsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (BudgetsClient) Get

func (client BudgetsClient) Get(ctx context.Context, scope string, budgetName string) (result Budget, err error)

Get gets the budget for the scope by budget name. Parameters: scope - the scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope. budgetName - budget Name.

func (BudgetsClient) GetPreparer

func (client BudgetsClient) GetPreparer(ctx context.Context, scope string, budgetName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (BudgetsClient) GetResponder

func (client BudgetsClient) GetResponder(resp *http.Response) (result Budget, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (BudgetsClient) GetSender

func (client BudgetsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (BudgetsClient) List

func (client BudgetsClient) List(ctx context.Context, scope string) (result BudgetsListResultPage, err error)

List lists all budgets for the defined scope. Parameters: scope - the scope associated with budget operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope, '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope.

func (BudgetsClient) ListComplete

func (client BudgetsClient) ListComplete(ctx context.Context, scope string) (result BudgetsListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (BudgetsClient) ListPreparer

func (client BudgetsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error)

ListPreparer prepares the List request.

func (BudgetsClient) ListResponder

func (client BudgetsClient) ListResponder(resp *http.Response) (result BudgetsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (BudgetsClient) ListSender

func (client BudgetsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type BudgetsListResult

type BudgetsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of budgets.
	Value *[]Budget `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

BudgetsListResult result of listing budgets. It contains a list of available budgets in the scope provided.

func (BudgetsListResult) IsEmpty

func (blr BudgetsListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (BudgetsListResult) MarshalJSON

func (blr BudgetsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for BudgetsListResult.

type BudgetsListResultIterator

type BudgetsListResultIterator struct {
	// contains filtered or unexported fields
}

BudgetsListResultIterator provides access to a complete listing of Budget values.

func NewBudgetsListResultIterator

func NewBudgetsListResultIterator(page BudgetsListResultPage) BudgetsListResultIterator

Creates a new instance of the BudgetsListResultIterator type.

func (*BudgetsListResultIterator) Next

func (iter *BudgetsListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*BudgetsListResultIterator) NextWithContext

func (iter *BudgetsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (BudgetsListResultIterator) NotDone

func (iter BudgetsListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (BudgetsListResultIterator) Response

Response returns the raw server response from the last page request.

func (BudgetsListResultIterator) Value

func (iter BudgetsListResultIterator) Value() Budget

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type BudgetsListResultPage

type BudgetsListResultPage struct {
	// contains filtered or unexported fields
}

BudgetsListResultPage contains a page of Budget values.

func NewBudgetsListResultPage

func NewBudgetsListResultPage(cur BudgetsListResult, getNextPage func(context.Context, BudgetsListResult) (BudgetsListResult, error)) BudgetsListResultPage

Creates a new instance of the BudgetsListResultPage type.

func (*BudgetsListResultPage) Next

func (page *BudgetsListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*BudgetsListResultPage) NextWithContext

func (page *BudgetsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (BudgetsListResultPage) NotDone

func (page BudgetsListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (BudgetsListResultPage) Response

func (page BudgetsListResultPage) Response() BudgetsListResult

Response returns the raw server response from the last page request.

func (BudgetsListResultPage) Values

func (page BudgetsListResultPage) Values() []Budget

Values returns the slice of values for the current page or nil if there are no values.

type ChargeSummary

type ChargeSummary struct {
	// Kind - Possible values include: 'KindBasicChargeSummaryKindChargeSummary', 'KindBasicChargeSummaryKindLegacy', 'KindBasicChargeSummaryKindModern'
	Kind KindBasicChargeSummary `json:"kind,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ChargeSummary a charge summary resource.

func (ChargeSummary) AsBasicChargeSummary

func (cs ChargeSummary) AsBasicChargeSummary() (BasicChargeSummary, bool)

AsBasicChargeSummary is the BasicChargeSummary implementation for ChargeSummary.

func (ChargeSummary) AsChargeSummary

func (cs ChargeSummary) AsChargeSummary() (*ChargeSummary, bool)

AsChargeSummary is the BasicChargeSummary implementation for ChargeSummary.

func (ChargeSummary) AsLegacyChargeSummary

func (cs ChargeSummary) AsLegacyChargeSummary() (*LegacyChargeSummary, bool)

AsLegacyChargeSummary is the BasicChargeSummary implementation for ChargeSummary.

func (ChargeSummary) AsModernChargeSummary

func (cs ChargeSummary) AsModernChargeSummary() (*ModernChargeSummary, bool)

AsModernChargeSummary is the BasicChargeSummary implementation for ChargeSummary.

func (ChargeSummary) MarshalJSON

func (cs ChargeSummary) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ChargeSummary.

type ChargeType

type ChargeType string

ChargeType enumerates the values for charge type.

const (
	// ChargeTypeActual ...
	ChargeTypeActual ChargeType = "Actual"
	// ChargeTypeForecast ...
	ChargeTypeForecast ChargeType = "Forecast"
)

func PossibleChargeTypeValues

func PossibleChargeTypeValues() []ChargeType

PossibleChargeTypeValues returns an array of possible values for the ChargeType const type.

type ChargesClient

type ChargesClient struct {
	BaseClient
}

ChargesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewChargesClient

func NewChargesClient(subscriptionID string) ChargesClient

NewChargesClient creates an instance of the ChargesClient client.

func NewChargesClientWithBaseURI

func NewChargesClientWithBaseURI(baseURI string, subscriptionID string) ChargesClient

NewChargesClientWithBaseURI creates an instance of the ChargesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ChargesClient) List

func (client ChargesClient) List(ctx context.Context, scope string, startDate string, endDate string, filter string, apply string) (result ChargesListResult, err error)

List lists the charges based for the defined scope. Parameters: scope - the scope associated with charges operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope. For department and enrollment accounts, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. startDate - start date endDate - end date filter - may be used to filter charges by properties/usageEnd (Utc time), properties/usageStart (Utc time). The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). apply - may be used to group charges for billingAccount scope by properties/billingProfileId, properties/invoiceSectionId, properties/customerId (specific for Partner Led), or for billingProfile scope by properties/invoiceSectionId.

func (ChargesClient) ListPreparer

func (client ChargesClient) ListPreparer(ctx context.Context, scope string, startDate string, endDate string, filter string, apply string) (*http.Request, error)

ListPreparer prepares the List request.

func (ChargesClient) ListResponder

func (client ChargesClient) ListResponder(resp *http.Response) (result ChargesListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ChargesClient) ListSender

func (client ChargesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ChargesListResult

type ChargesListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of charge summary
	Value *[]BasicChargeSummary `json:"value,omitempty"`
}

ChargesListResult result of listing charge summary.

func (ChargesListResult) MarshalJSON

func (clr ChargesListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ChargesListResult.

func (*ChargesListResult) UnmarshalJSON

func (clr *ChargesListResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ChargesListResult struct.

type CreditBalanceSummary

type CreditBalanceSummary struct {
	// EstimatedBalance - READ-ONLY; Estimated balance.
	EstimatedBalance *Amount `json:"estimatedBalance,omitempty"`
	// CurrentBalance - READ-ONLY; Current balance.
	CurrentBalance *Amount `json:"currentBalance,omitempty"`
	// EstimatedBalanceInBillingCurrency - READ-ONLY; Current balance.
	EstimatedBalanceInBillingCurrency *AmountWithExchangeRate `json:"estimatedBalanceInBillingCurrency,omitempty"`
	// CurrentBalanceInBillingCurrency - READ-ONLY; Current balance.
	CurrentBalanceInBillingCurrency *AmountWithExchangeRate `json:"currentBalanceInBillingCurrency,omitempty"`
}

CreditBalanceSummary summary of credit balances.

func (CreditBalanceSummary) MarshalJSON

func (cbs CreditBalanceSummary) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CreditBalanceSummary.

type CreditSummary

type CreditSummary struct {
	autorest.Response        `json:"-"`
	*CreditSummaryProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

CreditSummary a credit summary resource.

func (CreditSummary) MarshalJSON

func (cs CreditSummary) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CreditSummary.

func (*CreditSummary) UnmarshalJSON

func (cs *CreditSummary) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for CreditSummary struct.

type CreditSummaryProperties

type CreditSummaryProperties struct {
	// CreditCurrency - READ-ONLY; Credit Currency
	CreditCurrency *string `json:"creditCurrency,omitempty"`
	// BillingCurrency - READ-ONLY; Billing Currency.
	BillingCurrency *string `json:"billingCurrency,omitempty"`
	// BalanceSummary - READ-ONLY; Summary of balances associated with this credit summary.
	BalanceSummary *CreditBalanceSummary `json:"balanceSummary,omitempty"`
	// PendingCreditAdjustments - READ-ONLY; Pending credit adjustments.
	PendingCreditAdjustments *Amount `json:"pendingCreditAdjustments,omitempty"`
	// ExpiredCredit - READ-ONLY; Expired credit.
	ExpiredCredit *Amount `json:"expiredCredit,omitempty"`
	// PendingEligibleCharges - READ-ONLY; Pending eligible charges.
	PendingEligibleCharges *Amount `json:"pendingEligibleCharges,omitempty"`
	// Reseller - READ-ONLY; Reseller details.
	Reseller *Reseller `json:"reseller,omitempty"`
}

CreditSummaryProperties the properties of the credit summary.

func (CreditSummaryProperties) MarshalJSON

func (csp CreditSummaryProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CreditSummaryProperties.

type CreditsClient

type CreditsClient struct {
	BaseClient
}

CreditsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewCreditsClient

func NewCreditsClient(subscriptionID string) CreditsClient

NewCreditsClient creates an instance of the CreditsClient client.

func NewCreditsClientWithBaseURI

func NewCreditsClientWithBaseURI(baseURI string, subscriptionID string) CreditsClient

NewCreditsClientWithBaseURI creates an instance of the CreditsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (CreditsClient) Get

func (client CreditsClient) Get(ctx context.Context, scope string) (result CreditSummary, err error)

Get the credit summary by billingAccountId and billingProfileId. Parameters: scope - the scope associated with credits operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for Billing Profile scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

func (CreditsClient) GetPreparer

func (client CreditsClient) GetPreparer(ctx context.Context, scope string) (*http.Request, error)

GetPreparer prepares the Get request.

func (CreditsClient) GetResponder

func (client CreditsClient) GetResponder(resp *http.Response) (result CreditSummary, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (CreditsClient) GetSender

func (client CreditsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

type CultureCode

type CultureCode string

CultureCode enumerates the values for culture code.

const (
	// CultureCodeCsCz ...
	CultureCodeCsCz CultureCode = "cs-cz"
	// CultureCodeDaDk ...
	CultureCodeDaDk CultureCode = "da-dk"
	// CultureCodeDeDe ...
	CultureCodeDeDe CultureCode = "de-de"
	// CultureCodeEnGb ...
	CultureCodeEnGb CultureCode = "en-gb"
	// CultureCodeEnUs ...
	CultureCodeEnUs CultureCode = "en-us"
	// CultureCodeEsEs ...
	CultureCodeEsEs CultureCode = "es-es"
	// CultureCodeFrFr ...
	CultureCodeFrFr CultureCode = "fr-fr"
	// CultureCodeHuHu ...
	CultureCodeHuHu CultureCode = "hu-hu"
	// CultureCodeItIt ...
	CultureCodeItIt CultureCode = "it-it"
	// CultureCodeJaJp ...
	CultureCodeJaJp CultureCode = "ja-jp"
	// CultureCodeKoKr ...
	CultureCodeKoKr CultureCode = "ko-kr"
	// CultureCodeNbNo ...
	CultureCodeNbNo CultureCode = "nb-no"
	// CultureCodeNlNl ...
	CultureCodeNlNl CultureCode = "nl-nl"
	// CultureCodePlPl ...
	CultureCodePlPl CultureCode = "pl-pl"
	// CultureCodePtBr ...
	CultureCodePtBr CultureCode = "pt-br"
	// CultureCodePtPt ...
	CultureCodePtPt CultureCode = "pt-pt"
	// CultureCodeRuRu ...
	CultureCodeRuRu CultureCode = "ru-ru"
	// CultureCodeSvSe ...
	CultureCodeSvSe CultureCode = "sv-se"
	// CultureCodeTrTr ...
	CultureCodeTrTr CultureCode = "tr-tr"
	// CultureCodeZhCn ...
	CultureCodeZhCn CultureCode = "zh-cn"
	// CultureCodeZhTw ...
	CultureCodeZhTw CultureCode = "zh-tw"
)

func PossibleCultureCodeValues

func PossibleCultureCodeValues() []CultureCode

PossibleCultureCodeValues returns an array of possible values for the CultureCode const type.

type CurrentSpend

type CurrentSpend struct {
	// Amount - READ-ONLY; The total amount of cost which is being tracked by the budget.
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// Unit - READ-ONLY; The unit of measure for the budget amount.
	Unit *string `json:"unit,omitempty"`
}

CurrentSpend the current amount of cost which is being tracked for a budget.

func (CurrentSpend) MarshalJSON

func (cs CurrentSpend) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for CurrentSpend.

type Datagrain

type Datagrain string

Datagrain enumerates the values for datagrain.

const (
	// DatagrainDailyGrain Daily grain of data
	DatagrainDailyGrain Datagrain = "daily"
	// DatagrainMonthlyGrain Monthly grain of data
	DatagrainMonthlyGrain Datagrain = "monthly"
)

func PossibleDatagrainValues

func PossibleDatagrainValues() []Datagrain

PossibleDatagrainValues returns an array of possible values for the Datagrain const type.

type DownloadProperties

type DownloadProperties struct {
	// DownloadURL - READ-ONLY; The link (url) to download the pricesheet.
	DownloadURL *string `json:"downloadUrl,omitempty"`
	// ValidTill - READ-ONLY; Download link validity.
	ValidTill *string `json:"validTill,omitempty"`
}

DownloadProperties the properties of the price sheet download.

func (DownloadProperties) MarshalJSON

func (dp DownloadProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DownloadProperties.

type ErrorDetails

type ErrorDetails struct {
	// Code - READ-ONLY; Error code.
	Code *string `json:"code,omitempty"`
	// Message - READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

ErrorDetails the details of the error.

func (ErrorDetails) MarshalJSON

func (ed ErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ErrorDetails.

type ErrorResponse

type ErrorResponse struct {
	// Error - The details of the error.
	Error *ErrorDetails `json:"error,omitempty"`
}

ErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

* 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

* 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

type EventProperties

type EventProperties struct {
	// CreditCurrency - READ-ONLY; Credit Currency
	CreditCurrency *string `json:"creditCurrency,omitempty"`
	// BillingCurrency - READ-ONLY; Billing Currency.
	BillingCurrency *string `json:"billingCurrency,omitempty"`
	// TransactionDate - READ-ONLY; Transaction date.
	TransactionDate *date.Time `json:"transactionDate,omitempty"`
	// Description - READ-ONLY; Transaction description.
	Description *string `json:"description,omitempty"`
	// NewCredit - READ-ONLY; New Credit.
	NewCredit *Amount `json:"newCredit,omitempty"`
	// NewCreditInBillingCurrency - READ-ONLY; Current balance.
	NewCreditInBillingCurrency *AmountWithExchangeRate `json:"newCreditInBillingCurrency,omitempty"`
	// Adjustments - READ-ONLY; Adjustments amount.
	Adjustments *Amount `json:"adjustments,omitempty"`
	// AdjustmentsInBillingCurrency - READ-ONLY; Current balance.
	AdjustmentsInBillingCurrency *AmountWithExchangeRate `json:"adjustmentsInBillingCurrency,omitempty"`
	// CreditExpired - READ-ONLY; Credit expired.
	CreditExpired *Amount `json:"creditExpired,omitempty"`
	// CreditExpiredInBillingCurrency - READ-ONLY; Current balance.
	CreditExpiredInBillingCurrency *AmountWithExchangeRate `json:"creditExpiredInBillingCurrency,omitempty"`
	// Charges - READ-ONLY; Charges amount.
	Charges *Amount `json:"charges,omitempty"`
	// ChargesInBillingCurrency - READ-ONLY; Current balance.
	ChargesInBillingCurrency *AmountWithExchangeRate `json:"chargesInBillingCurrency,omitempty"`
	// ClosedBalance - READ-ONLY; Closed balance.
	ClosedBalance *Amount `json:"closedBalance,omitempty"`
	// ClosedBalanceInBillingCurrency - READ-ONLY; Current balance.
	ClosedBalanceInBillingCurrency *AmountWithExchangeRate `json:"closedBalanceInBillingCurrency,omitempty"`
	// EventType - The type of event. Possible values include: 'EventTypeSettledCharges', 'EventTypePendingCharges', 'EventTypePendingAdjustments', 'EventTypePendingNewCredit', 'EventTypePendingExpiredCredit', 'EventTypeUnKnown', 'EventTypeNewCredit'
	EventType EventType `json:"eventType,omitempty"`
	// InvoiceNumber - READ-ONLY; Invoice number.
	InvoiceNumber *string `json:"invoiceNumber,omitempty"`
	// Reseller - READ-ONLY; Reseller details.
	Reseller *Reseller `json:"reseller,omitempty"`
}

EventProperties the event properties.

func (EventProperties) MarshalJSON

func (ep EventProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EventProperties.

type EventSummary

type EventSummary struct {
	*EventProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

EventSummary an event summary resource.

func (EventSummary) MarshalJSON

func (es EventSummary) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for EventSummary.

func (*EventSummary) UnmarshalJSON

func (es *EventSummary) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for EventSummary struct.

type EventType

type EventType string

EventType enumerates the values for event type.

const (
	// EventTypeNewCredit ...
	EventTypeNewCredit EventType = "NewCredit"
	// EventTypePendingAdjustments ...
	EventTypePendingAdjustments EventType = "PendingAdjustments"
	// EventTypePendingCharges ...
	EventTypePendingCharges EventType = "PendingCharges"
	// EventTypePendingExpiredCredit ...
	EventTypePendingExpiredCredit EventType = "PendingExpiredCredit"
	// EventTypePendingNewCredit ...
	EventTypePendingNewCredit EventType = "PendingNewCredit"
	// EventTypeSettledCharges ...
	EventTypeSettledCharges EventType = "SettledCharges"
	// EventTypeUnKnown ...
	EventTypeUnKnown EventType = "UnKnown"
)

func PossibleEventTypeValues

func PossibleEventTypeValues() []EventType

PossibleEventTypeValues returns an array of possible values for the EventType const type.

type Events

type Events struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of event summary.
	Value *[]EventSummary `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

Events result of listing event summary.

func (Events) IsEmpty

func (e Events) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (Events) MarshalJSON

func (e Events) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Events.

type EventsClient

type EventsClient struct {
	BaseClient
}

EventsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewEventsClient

func NewEventsClient(subscriptionID string) EventsClient

NewEventsClient creates an instance of the EventsClient client.

func NewEventsClientWithBaseURI

func NewEventsClientWithBaseURI(baseURI string, subscriptionID string) EventsClient

NewEventsClientWithBaseURI creates an instance of the EventsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (EventsClient) List

func (client EventsClient) List(ctx context.Context, startDate string, endDate string, scope string) (result EventsPage, err error)

List lists the events by billingAccountId and billingProfileId for given start and end date. Parameters: startDate - start date endDate - end date scope - the scope associated with events operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for Billing Profile scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

func (EventsClient) ListComplete

func (client EventsClient) ListComplete(ctx context.Context, startDate string, endDate string, scope string) (result EventsIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (EventsClient) ListPreparer

func (client EventsClient) ListPreparer(ctx context.Context, startDate string, endDate string, scope string) (*http.Request, error)

ListPreparer prepares the List request.

func (EventsClient) ListResponder

func (client EventsClient) ListResponder(resp *http.Response) (result Events, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (EventsClient) ListSender

func (client EventsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type EventsIterator

type EventsIterator struct {
	// contains filtered or unexported fields
}

EventsIterator provides access to a complete listing of EventSummary values.

func NewEventsIterator

func NewEventsIterator(page EventsPage) EventsIterator

Creates a new instance of the EventsIterator type.

func (*EventsIterator) Next

func (iter *EventsIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*EventsIterator) NextWithContext

func (iter *EventsIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (EventsIterator) NotDone

func (iter EventsIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (EventsIterator) Response

func (iter EventsIterator) Response() Events

Response returns the raw server response from the last page request.

func (EventsIterator) Value

func (iter EventsIterator) Value() EventSummary

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type EventsPage

type EventsPage struct {
	// contains filtered or unexported fields
}

EventsPage contains a page of EventSummary values.

func NewEventsPage

func NewEventsPage(cur Events, getNextPage func(context.Context, Events) (Events, error)) EventsPage

Creates a new instance of the EventsPage type.

func (*EventsPage) Next

func (page *EventsPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*EventsPage) NextWithContext

func (page *EventsPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (EventsPage) NotDone

func (page EventsPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (EventsPage) Response

func (page EventsPage) Response() Events

Response returns the raw server response from the last page request.

func (EventsPage) Values

func (page EventsPage) Values() []EventSummary

Values returns the slice of values for the current page or nil if there are no values.

type Forecast

type Forecast struct {
	*ForecastProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Forecast a forecast resource.

func (Forecast) MarshalJSON

func (f Forecast) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Forecast.

func (*Forecast) UnmarshalJSON

func (f *Forecast) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Forecast struct.

type ForecastProperties

type ForecastProperties struct {
	// UsageDate - READ-ONLY; The usage date of the forecast.
	UsageDate *string `json:"usageDate,omitempty"`
	// Grain - The granularity of forecast. Please note that Yearly is not currently supported in this API. The API will provide responses in the Monthly grain if Yearly is selected. To get yearly grain data, please use our newer Forecast API. Possible values include: 'GrainDaily', 'GrainMonthly', 'GrainYearly'
	Grain Grain `json:"grain,omitempty"`
	// Charge - READ-ONLY; The amount of charge
	Charge *decimal.Decimal `json:"charge,omitempty"`
	// Currency - READ-ONLY; The ISO currency in which the meter is charged, for example, USD.
	Currency *string `json:"currency,omitempty"`
	// ChargeType - The type of the charge. Could be actual or forecast. Possible values include: 'ChargeTypeActual', 'ChargeTypeForecast'
	ChargeType ChargeType `json:"chargeType,omitempty"`
	// ConfidenceLevels - READ-ONLY; The details about the forecast confidence levels. This is populated only when chargeType is Forecast.
	ConfidenceLevels *[]ForecastPropertiesConfidenceLevelsItem `json:"confidenceLevels,omitempty"`
}

ForecastProperties the properties of the forecast charge.

func (ForecastProperties) MarshalJSON

func (fp ForecastProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ForecastProperties.

type ForecastPropertiesConfidenceLevelsItem

type ForecastPropertiesConfidenceLevelsItem struct {
	// Percentage - READ-ONLY; The percentage level of the confidence
	Percentage *decimal.Decimal `json:"percentage,omitempty"`
	// Bound - The boundary of the percentage, values could be 'Upper' or 'Lower'. Possible values include: 'BoundUpper', 'BoundLower'
	Bound Bound `json:"bound,omitempty"`
	// Value - READ-ONLY; The amount of forecast within the percentage level
	Value *decimal.Decimal `json:"value,omitempty"`
}

ForecastPropertiesConfidenceLevelsItem ...

func (ForecastPropertiesConfidenceLevelsItem) MarshalJSON

func (fpLi ForecastPropertiesConfidenceLevelsItem) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ForecastPropertiesConfidenceLevelsItem.

type ForecastSpend

type ForecastSpend struct {
	// Amount - READ-ONLY; The forecasted cost for the total time period which is being tracked by the budget. This value is only provided if the budget contains a forecast alert type.
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// Unit - READ-ONLY; The unit of measure for the budget amount.
	Unit *string `json:"unit,omitempty"`
}

ForecastSpend the forecasted cost which is being tracked for a budget.

func (ForecastSpend) MarshalJSON

func (fs ForecastSpend) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ForecastSpend.

type ForecastsClient

type ForecastsClient struct {
	BaseClient
}

ForecastsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewForecastsClient

func NewForecastsClient(subscriptionID string) ForecastsClient

NewForecastsClient creates an instance of the ForecastsClient client.

func NewForecastsClientWithBaseURI

func NewForecastsClientWithBaseURI(baseURI string, subscriptionID string) ForecastsClient

NewForecastsClientWithBaseURI creates an instance of the ForecastsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ForecastsClient) List

func (client ForecastsClient) List(ctx context.Context, filter string) (result ForecastsListResult, err error)

List lists the forecast charges for scope defined. Please note that this API is no longer actively under development. We recommend using our new Forecast API moving forward: https://docs.microsoft.com/en-us/rest/api/cost-management/forecast/usage. Parameters: filter - may be used to filter forecasts by properties/usageDate (Utc time), properties/chargeType or properties/grain. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'.

func (ForecastsClient) ListPreparer

func (client ForecastsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error)

ListPreparer prepares the List request.

func (ForecastsClient) ListResponder

func (client ForecastsClient) ListResponder(resp *http.Response) (result ForecastsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ForecastsClient) ListSender

func (client ForecastsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ForecastsListResult

type ForecastsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of forecasts.
	Value *[]Forecast `json:"value,omitempty"`
}

ForecastsListResult result of listing forecasts. It contains a list of available forecasts.

func (ForecastsListResult) MarshalJSON

func (flr ForecastsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ForecastsListResult.

type Grain

type Grain string

Grain enumerates the values for grain.

const (
	// GrainDaily ...
	GrainDaily Grain = "Daily"
	// GrainMonthly ...
	GrainMonthly Grain = "Monthly"
	// GrainYearly ...
	GrainYearly Grain = "Yearly"
)

func PossibleGrainValues

func PossibleGrainValues() []Grain

PossibleGrainValues returns an array of possible values for the Grain const type.

type HighCasedErrorDetails

type HighCasedErrorDetails struct {
	// Code - READ-ONLY; Error code.
	Code *string `json:"code,omitempty"`
	// Message - READ-ONLY; Error message indicating why the operation failed.
	Message *string `json:"message,omitempty"`
}

HighCasedErrorDetails the details of the error.

func (HighCasedErrorDetails) MarshalJSON

func (hced HighCasedErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for HighCasedErrorDetails.

type HighCasedErrorResponse

type HighCasedErrorResponse struct {
	// Error - The details of the error.
	Error *HighCasedErrorDetails `json:"error,omitempty"`
}

HighCasedErrorResponse error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Some Error responses:

* 429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.

* 503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.

type Kind

type Kind string

Kind enumerates the values for kind.

const (
	// KindLegacy ...
	KindLegacy Kind = "legacy"
	// KindModern ...
	KindModern Kind = "modern"
	// KindUsageDetail ...
	KindUsageDetail Kind = "UsageDetail"
)

func PossibleKindValues

func PossibleKindValues() []Kind

PossibleKindValues returns an array of possible values for the Kind const type.

type KindBasicChargeSummary

type KindBasicChargeSummary string

KindBasicChargeSummary enumerates the values for kind basic charge summary.

const (
	// KindBasicChargeSummaryKindChargeSummary ...
	KindBasicChargeSummaryKindChargeSummary KindBasicChargeSummary = "ChargeSummary"
	// KindBasicChargeSummaryKindLegacy ...
	KindBasicChargeSummaryKindLegacy KindBasicChargeSummary = "legacy"
	// KindBasicChargeSummaryKindModern ...
	KindBasicChargeSummaryKindModern KindBasicChargeSummary = "modern"
)

func PossibleKindBasicChargeSummaryValues

func PossibleKindBasicChargeSummaryValues() []KindBasicChargeSummary

PossibleKindBasicChargeSummaryValues returns an array of possible values for the KindBasicChargeSummary const type.

type KindBasicReservationRecommendation

type KindBasicReservationRecommendation string

KindBasicReservationRecommendation enumerates the values for kind basic reservation recommendation.

const (
	// KindBasicReservationRecommendationKindLegacy ...
	KindBasicReservationRecommendationKindLegacy KindBasicReservationRecommendation = "legacy"
	// KindBasicReservationRecommendationKindModern ...
	KindBasicReservationRecommendationKindModern KindBasicReservationRecommendation = "modern"
	// KindBasicReservationRecommendationKindReservationRecommendation ...
	KindBasicReservationRecommendationKindReservationRecommendation KindBasicReservationRecommendation = "ReservationRecommendation"
)

func PossibleKindBasicReservationRecommendationValues

func PossibleKindBasicReservationRecommendationValues() []KindBasicReservationRecommendation

PossibleKindBasicReservationRecommendationValues returns an array of possible values for the KindBasicReservationRecommendation const type.

type LegacyChargeSummary

type LegacyChargeSummary struct {
	// LegacyChargeSummaryProperties - Properties for legacy charge summary
	*LegacyChargeSummaryProperties `json:"properties,omitempty"`
	// Kind - Possible values include: 'KindBasicChargeSummaryKindChargeSummary', 'KindBasicChargeSummaryKindLegacy', 'KindBasicChargeSummaryKindModern'
	Kind KindBasicChargeSummary `json:"kind,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

LegacyChargeSummary legacy charge summary.

func (LegacyChargeSummary) AsBasicChargeSummary

func (lcs LegacyChargeSummary) AsBasicChargeSummary() (BasicChargeSummary, bool)

AsBasicChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.

func (LegacyChargeSummary) AsChargeSummary

func (lcs LegacyChargeSummary) AsChargeSummary() (*ChargeSummary, bool)

AsChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.

func (LegacyChargeSummary) AsLegacyChargeSummary

func (lcs LegacyChargeSummary) AsLegacyChargeSummary() (*LegacyChargeSummary, bool)

AsLegacyChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.

func (LegacyChargeSummary) AsModernChargeSummary

func (lcs LegacyChargeSummary) AsModernChargeSummary() (*ModernChargeSummary, bool)

AsModernChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.

func (LegacyChargeSummary) MarshalJSON

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

MarshalJSON is the custom marshaler for LegacyChargeSummary.

func (*LegacyChargeSummary) UnmarshalJSON

func (lcs *LegacyChargeSummary) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LegacyChargeSummary struct.

type LegacyChargeSummaryProperties

type LegacyChargeSummaryProperties struct {
	// BillingPeriodID - READ-ONLY; The id of the billing period resource that the charge belongs to.
	BillingPeriodID *string `json:"billingPeriodId,omitempty"`
	// UsageStart - READ-ONLY; Usage start date.
	UsageStart *string `json:"usageStart,omitempty"`
	// UsageEnd - READ-ONLY; Usage end date.
	UsageEnd *string `json:"usageEnd,omitempty"`
	// AzureCharges - READ-ONLY; Azure Charges.
	AzureCharges *decimal.Decimal `json:"azureCharges,omitempty"`
	// ChargesBilledSeparately - READ-ONLY; Charges Billed separately.
	ChargesBilledSeparately *decimal.Decimal `json:"chargesBilledSeparately,omitempty"`
	// MarketplaceCharges - READ-ONLY; Marketplace Charges.
	MarketplaceCharges *decimal.Decimal `json:"marketplaceCharges,omitempty"`
	// Currency - READ-ONLY; Currency Code
	Currency *string `json:"currency,omitempty"`
}

LegacyChargeSummaryProperties the properties of legacy charge summary.

func (LegacyChargeSummaryProperties) MarshalJSON

func (lcsp LegacyChargeSummaryProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyChargeSummaryProperties.

type LegacyReservationRecommendation

type LegacyReservationRecommendation struct {
	// LegacyReservationRecommendationProperties - Properties for legacy reservation recommendation
	*LegacyReservationRecommendationProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
	// Location - READ-ONLY; Resource location
	Location *string `json:"location,omitempty"`
	// Sku - READ-ONLY; Resource sku
	Sku *string `json:"sku,omitempty"`
	// Kind - Possible values include: 'KindBasicReservationRecommendationKindReservationRecommendation', 'KindBasicReservationRecommendationKindLegacy', 'KindBasicReservationRecommendationKindModern'
	Kind KindBasicReservationRecommendation `json:"kind,omitempty"`
}

LegacyReservationRecommendation legacy reservation recommendation.

func (LegacyReservationRecommendation) AsBasicReservationRecommendation

func (lrr LegacyReservationRecommendation) AsBasicReservationRecommendation() (BasicReservationRecommendation, bool)

AsBasicReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.

func (LegacyReservationRecommendation) AsLegacyReservationRecommendation

func (lrr LegacyReservationRecommendation) AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)

AsLegacyReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.

func (LegacyReservationRecommendation) AsModernReservationRecommendation

func (lrr LegacyReservationRecommendation) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)

AsModernReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.

func (LegacyReservationRecommendation) AsReservationRecommendation

func (lrr LegacyReservationRecommendation) AsReservationRecommendation() (*ReservationRecommendation, bool)

AsReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.

func (LegacyReservationRecommendation) MarshalJSON

func (lrr LegacyReservationRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyReservationRecommendation.

func (*LegacyReservationRecommendation) UnmarshalJSON

func (lrr *LegacyReservationRecommendation) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LegacyReservationRecommendation struct.

type LegacyReservationRecommendationProperties

type LegacyReservationRecommendationProperties struct {
	// LookBackPeriod - READ-ONLY; The number of days of usage to look back for recommendation.
	LookBackPeriod *string `json:"lookBackPeriod,omitempty"`
	// InstanceFlexibilityRatio - READ-ONLY; The instance Flexibility Ratio.
	InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"`
	// InstanceFlexibilityGroup - READ-ONLY; The instance Flexibility Group.
	InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"`
	// NormalizedSize - READ-ONLY; The normalized Size.
	NormalizedSize *string `json:"normalizedSize,omitempty"`
	// RecommendedQuantityNormalized - READ-ONLY; The recommended Quantity Normalized.
	RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"`
	// MeterID - READ-ONLY; The meter id (GUID)
	MeterID *uuid.UUID `json:"meterId,omitempty"`
	// ResourceType - READ-ONLY; The azure resource type.
	ResourceType *string `json:"resourceType,omitempty"`
	// Term - READ-ONLY; RI recommendations in one or three year terms.
	Term *string `json:"term,omitempty"`
	// CostWithNoReservedInstances - READ-ONLY; The total amount of cost without reserved instances.
	CostWithNoReservedInstances *decimal.Decimal `json:"costWithNoReservedInstances,omitempty"`
	// RecommendedQuantity - READ-ONLY; Recommended quality for reserved instances.
	RecommendedQuantity *decimal.Decimal `json:"recommendedQuantity,omitempty"`
	// TotalCostWithReservedInstances - READ-ONLY; The total amount of cost with reserved instances.
	TotalCostWithReservedInstances *decimal.Decimal `json:"totalCostWithReservedInstances,omitempty"`
	// NetSavings - READ-ONLY; Total estimated savings with reserved instances.
	NetSavings *decimal.Decimal `json:"netSavings,omitempty"`
	// FirstUsageDate - READ-ONLY; The usage date for looking back.
	FirstUsageDate *date.Time `json:"firstUsageDate,omitempty"`
	// Scope - READ-ONLY; Shared or single recommendation.
	Scope *string `json:"scope,omitempty"`
	// SkuProperties - READ-ONLY; List of sku properties
	SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"`
}

LegacyReservationRecommendationProperties the properties of the reservation recommendation.

func (LegacyReservationRecommendationProperties) MarshalJSON

func (lrrp LegacyReservationRecommendationProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyReservationRecommendationProperties.

type LegacyReservationTransaction

type LegacyReservationTransaction struct {
	*LegacyReservationTransactionProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags *[]string `json:"tags,omitempty"`
}

LegacyReservationTransaction legacy Reservation transaction resource.

func (LegacyReservationTransaction) MarshalJSON

func (lrt LegacyReservationTransaction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyReservationTransaction.

func (*LegacyReservationTransaction) UnmarshalJSON

func (lrt *LegacyReservationTransaction) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LegacyReservationTransaction struct.

type LegacyReservationTransactionProperties

type LegacyReservationTransactionProperties struct {
	// EventDate - READ-ONLY; The date of the transaction
	EventDate *date.Time `json:"eventDate,omitempty"`
	// ReservationOrderID - READ-ONLY; The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
	ReservationOrderID *string `json:"reservationOrderId,omitempty"`
	// Description - READ-ONLY; The description of the transaction.
	Description *string `json:"description,omitempty"`
	// EventType - READ-ONLY; The type of the transaction (Purchase, Cancel, etc.)
	EventType *string `json:"eventType,omitempty"`
	// Quantity - READ-ONLY; The quantity of the transaction.
	Quantity *decimal.Decimal `json:"quantity,omitempty"`
	// Amount - READ-ONLY; The charge of the transaction.
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// Currency - READ-ONLY; The ISO currency in which the transaction is charged, for example, USD.
	Currency *string `json:"currency,omitempty"`
	// ReservationOrderName - READ-ONLY; The name of the reservation order.
	ReservationOrderName *string `json:"reservationOrderName,omitempty"`
	// PurchasingEnrollment - READ-ONLY; The purchasing enrollment.
	PurchasingEnrollment *string `json:"purchasingEnrollment,omitempty"`
	// PurchasingSubscriptionGUID - READ-ONLY; The subscription guid that makes the transaction.
	PurchasingSubscriptionGUID *uuid.UUID `json:"purchasingSubscriptionGuid,omitempty"`
	// PurchasingSubscriptionName - READ-ONLY; The subscription name that makes the transaction.
	PurchasingSubscriptionName *string `json:"purchasingSubscriptionName,omitempty"`
	// ArmSkuName - READ-ONLY; This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
	ArmSkuName *string `json:"armSkuName,omitempty"`
	// Term - READ-ONLY; This is the term of the transaction.
	Term *string `json:"term,omitempty"`
	// Region - READ-ONLY; The region of the transaction.
	Region *string `json:"region,omitempty"`
	// AccountName - READ-ONLY; The name of the account that makes the transaction.
	AccountName *string `json:"accountName,omitempty"`
	// AccountOwnerEmail - READ-ONLY; The email of the account owner that makes the transaction.
	AccountOwnerEmail *string `json:"accountOwnerEmail,omitempty"`
	// DepartmentName - READ-ONLY; The department name.
	DepartmentName *string `json:"departmentName,omitempty"`
	// CostCenter - READ-ONLY; The cost center of this department if it is a department and a cost center is provided.
	CostCenter *string `json:"costCenter,omitempty"`
	// CurrentEnrollment - READ-ONLY; The current enrollment.
	CurrentEnrollment *string `json:"currentEnrollment,omitempty"`
	// BillingFrequency - READ-ONLY; The billing frequency, which can be either one-time or recurring.
	BillingFrequency *string `json:"billingFrequency,omitempty"`
}

LegacyReservationTransactionProperties the properties of a legacy reservation transaction.

func (LegacyReservationTransactionProperties) MarshalJSON

func (lrtp LegacyReservationTransactionProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyReservationTransactionProperties.

type LegacyUsageDetail

type LegacyUsageDetail struct {
	// LegacyUsageDetailProperties - Properties for legacy usage details
	*LegacyUsageDetailProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
	// Kind - Possible values include: 'KindUsageDetail', 'KindLegacy', 'KindModern'
	Kind Kind `json:"kind,omitempty"`
}

LegacyUsageDetail legacy usage detail.

func (LegacyUsageDetail) AsBasicUsageDetail

func (lud LegacyUsageDetail) AsBasicUsageDetail() (BasicUsageDetail, bool)

AsBasicUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.

func (LegacyUsageDetail) AsLegacyUsageDetail

func (lud LegacyUsageDetail) AsLegacyUsageDetail() (*LegacyUsageDetail, bool)

AsLegacyUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.

func (LegacyUsageDetail) AsModernUsageDetail

func (lud LegacyUsageDetail) AsModernUsageDetail() (*ModernUsageDetail, bool)

AsModernUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.

func (LegacyUsageDetail) AsUsageDetail

func (lud LegacyUsageDetail) AsUsageDetail() (*UsageDetail, bool)

AsUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.

func (LegacyUsageDetail) MarshalJSON

func (lud LegacyUsageDetail) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyUsageDetail.

func (*LegacyUsageDetail) UnmarshalJSON

func (lud *LegacyUsageDetail) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LegacyUsageDetail struct.

type LegacyUsageDetailProperties

type LegacyUsageDetailProperties struct {
	// BillingAccountID - READ-ONLY; Billing Account identifier.
	BillingAccountID *string `json:"billingAccountId,omitempty"`
	// BillingAccountName - READ-ONLY; Billing Account Name.
	BillingAccountName *string `json:"billingAccountName,omitempty"`
	// BillingPeriodStartDate - READ-ONLY; The billing period start date.
	BillingPeriodStartDate *date.Time `json:"billingPeriodStartDate,omitempty"`
	// BillingPeriodEndDate - READ-ONLY; The billing period end date.
	BillingPeriodEndDate *date.Time `json:"billingPeriodEndDate,omitempty"`
	// BillingProfileID - READ-ONLY; Billing Profile identifier.
	BillingProfileID *string `json:"billingProfileId,omitempty"`
	// BillingProfileName - READ-ONLY; Billing Profile Name.
	BillingProfileName *string `json:"billingProfileName,omitempty"`
	// AccountOwnerID - READ-ONLY; Account Owner Id.
	AccountOwnerID *string `json:"accountOwnerId,omitempty"`
	// AccountName - READ-ONLY; Account Name.
	AccountName *string `json:"accountName,omitempty"`
	// SubscriptionID - READ-ONLY; Subscription guid.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
	// SubscriptionName - READ-ONLY; Subscription name.
	SubscriptionName *string `json:"subscriptionName,omitempty"`
	// Date - READ-ONLY; Date for the usage record.
	Date *date.Time `json:"date,omitempty"`
	// Product - READ-ONLY; Product name for the consumed service or purchase. Not available for Marketplace.
	Product *string `json:"product,omitempty"`
	// PartNumber - READ-ONLY; Part Number of the service used. Can be used to join with the price sheet. Not available for marketplace.
	PartNumber *string `json:"partNumber,omitempty"`
	// MeterID - READ-ONLY; The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName.
	MeterID *uuid.UUID `json:"meterId,omitempty"`
	// MeterDetails - READ-ONLY; The details about the meter. By default this is not populated, unless it's specified in $expand.
	MeterDetails *MeterDetailsResponse `json:"meterDetails,omitempty"`
	// Quantity - READ-ONLY; The usage quantity.
	Quantity *decimal.Decimal `json:"quantity,omitempty"`
	// EffectivePrice - READ-ONLY; Effective Price that's charged for the usage.
	EffectivePrice *decimal.Decimal `json:"effectivePrice,omitempty"`
	// Cost - READ-ONLY; The amount of cost before tax.
	Cost *decimal.Decimal `json:"cost,omitempty"`
	// UnitPrice - READ-ONLY; Unit Price is the price applicable to you. (your EA or other contract price).
	UnitPrice *decimal.Decimal `json:"unitPrice,omitempty"`
	// BillingCurrency - READ-ONLY; Billing Currency.
	BillingCurrency *string `json:"billingCurrency,omitempty"`
	// ResourceLocation - READ-ONLY; Resource Location.
	ResourceLocation *string `json:"resourceLocation,omitempty"`
	// ConsumedService - READ-ONLY; Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage.
	ConsumedService *string `json:"consumedService,omitempty"`
	// ResourceID - READ-ONLY; Azure resource manager resource identifier.
	ResourceID *string `json:"resourceId,omitempty"`
	// ResourceName - READ-ONLY; Resource Name.
	ResourceName *string `json:"resourceName,omitempty"`
	// ServiceInfo1 - READ-ONLY; Service Info 1.
	ServiceInfo1 *string `json:"serviceInfo1,omitempty"`
	// ServiceInfo2 - READ-ONLY; Service Info 2.
	ServiceInfo2 *string `json:"serviceInfo2,omitempty"`
	// AdditionalInfo - READ-ONLY; Additional details of this usage item. By default this is not populated, unless it's specified in $expand. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied.
	AdditionalInfo *string `json:"additionalInfo,omitempty"`
	// InvoiceSection - READ-ONLY; Invoice Section Name.
	InvoiceSection *string `json:"invoiceSection,omitempty"`
	// CostCenter - READ-ONLY; The cost center of this department if it is a department and a cost center is provided.
	CostCenter *string `json:"costCenter,omitempty"`
	// ResourceGroup - READ-ONLY; Resource Group Name.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ReservationID - READ-ONLY; ARM resource id of the reservation. Only applies to records relevant to reservations.
	ReservationID *string `json:"reservationId,omitempty"`
	// ReservationName - READ-ONLY; User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations.
	ReservationName *string `json:"reservationName,omitempty"`
	// ProductOrderID - READ-ONLY; Product Order Id. For reservations this is the Reservation Order ID.
	ProductOrderID *string `json:"productOrderId,omitempty"`
	// ProductOrderName - READ-ONLY; Product Order Name. For reservations this is the SKU that was purchased.
	ProductOrderName *string `json:"productOrderName,omitempty"`
	// OfferID - READ-ONLY; Offer Id. Ex: MS-AZR-0017P, MS-AZR-0148P.
	OfferID *string `json:"offerId,omitempty"`
	// IsAzureCreditEligible - READ-ONLY; Is Azure Credit Eligible.
	IsAzureCreditEligible *bool `json:"isAzureCreditEligible,omitempty"`
	// Term - READ-ONLY; Term (in months). 1 month for monthly recurring purchase. 12 months for a 1 year reservation. 36 months for a 3 year reservation.
	Term *string `json:"term,omitempty"`
	// PublisherName - READ-ONLY; Publisher Name.
	PublisherName *string `json:"publisherName,omitempty"`
	// PublisherType - READ-ONLY; Publisher Type.
	PublisherType *string `json:"publisherType,omitempty"`
	// PlanName - READ-ONLY; Plan Name.
	PlanName *string `json:"planName,omitempty"`
	// ChargeType - READ-ONLY; Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
	ChargeType *string `json:"chargeType,omitempty"`
	// Frequency - READ-ONLY; Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used.
	Frequency *string `json:"frequency,omitempty"`
}

LegacyUsageDetailProperties the properties of the legacy usage detail.

func (LegacyUsageDetailProperties) MarshalJSON

func (ludp LegacyUsageDetailProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LegacyUsageDetailProperties.

type LookBackPeriod

type LookBackPeriod string

LookBackPeriod enumerates the values for look back period.

const (
	// LookBackPeriodLast07Days Use 7 days of data for recommendations
	LookBackPeriodLast07Days LookBackPeriod = "Last7Days"
	// LookBackPeriodLast30Days Use 30 days of data for recommendations
	LookBackPeriodLast30Days LookBackPeriod = "Last30Days"
	// LookBackPeriodLast60Days Use 60 days of data for recommendations
	LookBackPeriodLast60Days LookBackPeriod = "Last60Days"
)

func PossibleLookBackPeriodValues

func PossibleLookBackPeriodValues() []LookBackPeriod

PossibleLookBackPeriodValues returns an array of possible values for the LookBackPeriod const type.

type LotProperties

type LotProperties struct {
	// CreditCurrency - READ-ONLY; Credit Currency
	CreditCurrency *string `json:"creditCurrency,omitempty"`
	// BillingCurrency - READ-ONLY; Billing Currency.
	BillingCurrency *string `json:"billingCurrency,omitempty"`
	// OriginalAmount - READ-ONLY; Original amount.
	OriginalAmount *Amount `json:"originalAmount,omitempty"`
	// OriginalAmountInBillingCurrency - READ-ONLY; Current balance.
	OriginalAmountInBillingCurrency *AmountWithExchangeRate `json:"originalAmountInBillingCurrency,omitempty"`
	// ClosedBalance - READ-ONLY; Closed balance.
	ClosedBalance *Amount `json:"closedBalance,omitempty"`
	// ClosedBalanceInBillingCurrency - READ-ONLY; Current balance.
	ClosedBalanceInBillingCurrency *AmountWithExchangeRate `json:"closedBalanceInBillingCurrency,omitempty"`
	// Source - READ-ONLY; Lot source. Possible values include: 'LotSourcePurchasedCredit', 'LotSourcePromotionalCredit'
	Source LotSource `json:"source,omitempty"`
	// StartDate - READ-ONLY; Start date.
	StartDate *date.Time `json:"startDate,omitempty"`
	// ExpirationDate - READ-ONLY; Expiration date.
	ExpirationDate *date.Time `json:"expirationDate,omitempty"`
	// PoNumber - READ-ONLY; PO number.
	PoNumber *string `json:"poNumber,omitempty"`
	// Reseller - READ-ONLY; Reseller details.
	Reseller *Reseller `json:"reseller,omitempty"`
}

LotProperties the lot properties.

func (LotProperties) MarshalJSON

func (lp LotProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LotProperties.

type LotSource

type LotSource string

LotSource enumerates the values for lot source.

const (
	// LotSourcePromotionalCredit ...
	LotSourcePromotionalCredit LotSource = "PromotionalCredit"
	// LotSourcePurchasedCredit ...
	LotSourcePurchasedCredit LotSource = "PurchasedCredit"
)

func PossibleLotSourceValues

func PossibleLotSourceValues() []LotSource

PossibleLotSourceValues returns an array of possible values for the LotSource const type.

type LotSummary

type LotSummary struct {
	*LotProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

LotSummary a lot summary resource.

func (LotSummary) MarshalJSON

func (ls LotSummary) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for LotSummary.

func (*LotSummary) UnmarshalJSON

func (ls *LotSummary) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for LotSummary struct.

type Lots

type Lots struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of lot summary.
	Value *[]LotSummary `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

Lots result of listing lot summary.

func (Lots) IsEmpty

func (l Lots) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (Lots) MarshalJSON

func (l Lots) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Lots.

type LotsClient

type LotsClient struct {
	BaseClient
}

LotsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewLotsClient

func NewLotsClient(subscriptionID string) LotsClient

NewLotsClient creates an instance of the LotsClient client.

func NewLotsClientWithBaseURI

func NewLotsClientWithBaseURI(baseURI string, subscriptionID string) LotsClient

NewLotsClientWithBaseURI creates an instance of the LotsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (LotsClient) List

func (client LotsClient) List(ctx context.Context, scope string) (result LotsPage, err error)

List lists the lots by billingAccountId and billingProfileId. Parameters: scope - the scope associated with Lots operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfile/{billingProfileId}' for Billing Profile scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners.

func (LotsClient) ListComplete

func (client LotsClient) ListComplete(ctx context.Context, scope string) (result LotsIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (LotsClient) ListPreparer

func (client LotsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error)

ListPreparer prepares the List request.

func (LotsClient) ListResponder

func (client LotsClient) ListResponder(resp *http.Response) (result Lots, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (LotsClient) ListSender

func (client LotsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type LotsIterator

type LotsIterator struct {
	// contains filtered or unexported fields
}

LotsIterator provides access to a complete listing of LotSummary values.

func NewLotsIterator

func NewLotsIterator(page LotsPage) LotsIterator

Creates a new instance of the LotsIterator type.

func (*LotsIterator) Next

func (iter *LotsIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*LotsIterator) NextWithContext

func (iter *LotsIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (LotsIterator) NotDone

func (iter LotsIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (LotsIterator) Response

func (iter LotsIterator) Response() Lots

Response returns the raw server response from the last page request.

func (LotsIterator) Value

func (iter LotsIterator) Value() LotSummary

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type LotsPage

type LotsPage struct {
	// contains filtered or unexported fields
}

LotsPage contains a page of LotSummary values.

func NewLotsPage

func NewLotsPage(cur Lots, getNextPage func(context.Context, Lots) (Lots, error)) LotsPage

Creates a new instance of the LotsPage type.

func (*LotsPage) Next

func (page *LotsPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*LotsPage) NextWithContext

func (page *LotsPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (LotsPage) NotDone

func (page LotsPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (LotsPage) Response

func (page LotsPage) Response() Lots

Response returns the raw server response from the last page request.

func (LotsPage) Values

func (page LotsPage) Values() []LotSummary

Values returns the slice of values for the current page or nil if there are no values.

type ManagementGroupAggregatedCostProperties

type ManagementGroupAggregatedCostProperties struct {
	// BillingPeriodID - READ-ONLY; The id of the billing period resource that the aggregated cost belongs to.
	BillingPeriodID *string `json:"billingPeriodId,omitempty"`
	// UsageStart - READ-ONLY; The start of the date time range covered by aggregated cost.
	UsageStart *date.Time `json:"usageStart,omitempty"`
	// UsageEnd - READ-ONLY; The end of the date time range covered by the aggregated cost.
	UsageEnd *date.Time `json:"usageEnd,omitempty"`
	// AzureCharges - READ-ONLY; Azure Charges.
	AzureCharges *decimal.Decimal `json:"azureCharges,omitempty"`
	// MarketplaceCharges - READ-ONLY; Marketplace Charges.
	MarketplaceCharges *decimal.Decimal `json:"marketplaceCharges,omitempty"`
	// ChargesBilledSeparately - READ-ONLY; Charges Billed Separately.
	ChargesBilledSeparately *decimal.Decimal `json:"chargesBilledSeparately,omitempty"`
	// Currency - READ-ONLY; The ISO currency in which the meter is charged, for example, USD.
	Currency *string `json:"currency,omitempty"`
	// Children - Children of a management group
	Children *[]ManagementGroupAggregatedCostResult `json:"children,omitempty"`
	// IncludedSubscriptions - List of subscription Guids included in the calculation of aggregated cost
	IncludedSubscriptions *[]string `json:"includedSubscriptions,omitempty"`
	// ExcludedSubscriptions - List of subscription Guids excluded from the calculation of aggregated cost
	ExcludedSubscriptions *[]string `json:"excludedSubscriptions,omitempty"`
}

ManagementGroupAggregatedCostProperties the properties of the Management Group Aggregated Cost.

func (ManagementGroupAggregatedCostProperties) MarshalJSON

func (mgacp ManagementGroupAggregatedCostProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ManagementGroupAggregatedCostProperties.

type ManagementGroupAggregatedCostResult

type ManagementGroupAggregatedCostResult struct {
	autorest.Response                        `json:"-"`
	*ManagementGroupAggregatedCostProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ManagementGroupAggregatedCostResult a management group aggregated cost resource.

func (ManagementGroupAggregatedCostResult) MarshalJSON

func (mgacr ManagementGroupAggregatedCostResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ManagementGroupAggregatedCostResult.

func (*ManagementGroupAggregatedCostResult) UnmarshalJSON

func (mgacr *ManagementGroupAggregatedCostResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ManagementGroupAggregatedCostResult struct.

type Marketplace

type Marketplace struct {
	*MarketplaceProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Marketplace an marketplace resource.

func (Marketplace) MarshalJSON

func (mVar Marketplace) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Marketplace.

func (*Marketplace) UnmarshalJSON

func (mVar *Marketplace) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Marketplace struct.

type MarketplaceProperties

type MarketplaceProperties struct {
	// BillingPeriodID - READ-ONLY; The id of the billing period resource that the usage belongs to.
	BillingPeriodID *string `json:"billingPeriodId,omitempty"`
	// UsageStart - READ-ONLY; The start of the date time range covered by the usage detail.
	UsageStart *date.Time `json:"usageStart,omitempty"`
	// UsageEnd - READ-ONLY; The end of the date time range covered by the usage detail.
	UsageEnd *date.Time `json:"usageEnd,omitempty"`
	// ResourceRate - READ-ONLY; The marketplace resource rate.
	ResourceRate *decimal.Decimal `json:"resourceRate,omitempty"`
	// OfferName - READ-ONLY; The type of offer.
	OfferName *string `json:"offerName,omitempty"`
	// ResourceGroup - READ-ONLY; The name of resource group.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// AdditionalInfo - READ-ONLY; Additional information.
	AdditionalInfo *string `json:"additionalInfo,omitempty"`
	// OrderNumber - READ-ONLY; The order number.
	OrderNumber *string `json:"orderNumber,omitempty"`
	// InstanceName - READ-ONLY; The name of the resource instance that the usage is about.
	InstanceName *string `json:"instanceName,omitempty"`
	// InstanceID - READ-ONLY; The uri of the resource instance that the usage is about.
	InstanceID *string `json:"instanceId,omitempty"`
	// Currency - READ-ONLY; The ISO currency in which the meter is charged, for example, USD.
	Currency *string `json:"currency,omitempty"`
	// ConsumedQuantity - READ-ONLY; The quantity of usage.
	ConsumedQuantity *decimal.Decimal `json:"consumedQuantity,omitempty"`
	// UnitOfMeasure - READ-ONLY; The unit of measure.
	UnitOfMeasure *string `json:"unitOfMeasure,omitempty"`
	// PretaxCost - READ-ONLY; The amount of cost before tax.
	PretaxCost *decimal.Decimal `json:"pretaxCost,omitempty"`
	// IsEstimated - READ-ONLY; The estimated usage is subject to change.
	IsEstimated *bool `json:"isEstimated,omitempty"`
	// MeterID - READ-ONLY; The meter id (GUID).
	MeterID *uuid.UUID `json:"meterId,omitempty"`
	// SubscriptionGUID - READ-ONLY; Subscription guid.
	SubscriptionGUID *uuid.UUID `json:"subscriptionGuid,omitempty"`
	// SubscriptionName - READ-ONLY; Subscription name.
	SubscriptionName *string `json:"subscriptionName,omitempty"`
	// AccountName - READ-ONLY; Account name.
	AccountName *string `json:"accountName,omitempty"`
	// DepartmentName - READ-ONLY; Department name.
	DepartmentName *string `json:"departmentName,omitempty"`
	// ConsumedService - READ-ONLY; Consumed service name.
	ConsumedService *string `json:"consumedService,omitempty"`
	// CostCenter - READ-ONLY; The cost center of this department if it is a department and a costcenter exists
	CostCenter *string `json:"costCenter,omitempty"`
	// AdditionalProperties - READ-ONLY; Additional details of this usage item. By default this is not populated, unless it's specified in $expand.
	AdditionalProperties *string `json:"additionalProperties,omitempty"`
	// PublisherName - READ-ONLY; The name of publisher.
	PublisherName *string `json:"publisherName,omitempty"`
	// PlanName - READ-ONLY; The name of plan.
	PlanName *string `json:"planName,omitempty"`
	// IsRecurringCharge - READ-ONLY; Flag indicating whether this is a recurring charge or not.
	IsRecurringCharge *bool `json:"isRecurringCharge,omitempty"`
}

MarketplaceProperties the properties of the marketplace usage detail.

func (MarketplaceProperties) MarshalJSON

func (mp MarketplaceProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for MarketplaceProperties.

type MarketplacesClient

type MarketplacesClient struct {
	BaseClient
}

MarketplacesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewMarketplacesClient

func NewMarketplacesClient(subscriptionID string) MarketplacesClient

NewMarketplacesClient creates an instance of the MarketplacesClient client.

func NewMarketplacesClientWithBaseURI

func NewMarketplacesClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesClient

NewMarketplacesClientWithBaseURI creates an instance of the MarketplacesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (MarketplacesClient) List

func (client MarketplacesClient) List(ctx context.Context, scope string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)

List lists the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: scope - the scope associated with marketplace operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and ManagementGroup, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' filter - may be used to filter marketplaces by properties/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName or properties/instanceId. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. top - may be used to limit the number of results to the most recent N marketplaces. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.

func (MarketplacesClient) ListComplete

func (client MarketplacesClient) ListComplete(ctx context.Context, scope string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (MarketplacesClient) ListPreparer

func (client MarketplacesClient) ListPreparer(ctx context.Context, scope string, filter string, top *int32, skiptoken string) (*http.Request, error)

ListPreparer prepares the List request.

func (MarketplacesClient) ListResponder

func (client MarketplacesClient) ListResponder(resp *http.Response) (result MarketplacesListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (MarketplacesClient) ListSender

func (client MarketplacesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type MarketplacesListResult

type MarketplacesListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of marketplaces.
	Value *[]Marketplace `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

MarketplacesListResult result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period.

func (MarketplacesListResult) IsEmpty

func (mlr MarketplacesListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (MarketplacesListResult) MarshalJSON

func (mlr MarketplacesListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for MarketplacesListResult.

type MarketplacesListResultIterator

type MarketplacesListResultIterator struct {
	// contains filtered or unexported fields
}

MarketplacesListResultIterator provides access to a complete listing of Marketplace values.

func NewMarketplacesListResultIterator

func NewMarketplacesListResultIterator(page MarketplacesListResultPage) MarketplacesListResultIterator

Creates a new instance of the MarketplacesListResultIterator type.

func (*MarketplacesListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*MarketplacesListResultIterator) NextWithContext

func (iter *MarketplacesListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (MarketplacesListResultIterator) NotDone

func (iter MarketplacesListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (MarketplacesListResultIterator) Response

Response returns the raw server response from the last page request.

func (MarketplacesListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type MarketplacesListResultPage

type MarketplacesListResultPage struct {
	// contains filtered or unexported fields
}

MarketplacesListResultPage contains a page of Marketplace values.

func NewMarketplacesListResultPage

Creates a new instance of the MarketplacesListResultPage type.

func (*MarketplacesListResultPage) Next

func (page *MarketplacesListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*MarketplacesListResultPage) NextWithContext

func (page *MarketplacesListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (MarketplacesListResultPage) NotDone

func (page MarketplacesListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (MarketplacesListResultPage) Response

Response returns the raw server response from the last page request.

func (MarketplacesListResultPage) Values

func (page MarketplacesListResultPage) Values() []Marketplace

Values returns the slice of values for the current page or nil if there are no values.

type MeterDetails

type MeterDetails struct {
	// MeterName - READ-ONLY; The name of the meter, within the given meter category
	MeterName *string `json:"meterName,omitempty"`
	// MeterCategory - READ-ONLY; The category of the meter, for example, 'Cloud services', 'Networking', etc..
	MeterCategory *string `json:"meterCategory,omitempty"`
	// MeterSubCategory - READ-ONLY; The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..
	MeterSubCategory *string `json:"meterSubCategory,omitempty"`
	// Unit - READ-ONLY; The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.
	Unit *string `json:"unit,omitempty"`
	// MeterLocation - READ-ONLY; The location in which the Azure service is available.
	MeterLocation *string `json:"meterLocation,omitempty"`
	// TotalIncludedQuantity - READ-ONLY; The total included quantity associated with the offer.
	TotalIncludedQuantity *decimal.Decimal `json:"totalIncludedQuantity,omitempty"`
	// PretaxStandardRate - READ-ONLY; The pretax listing price.
	PretaxStandardRate *decimal.Decimal `json:"pretaxStandardRate,omitempty"`
	// ServiceName - READ-ONLY; The name of the service.
	ServiceName *string `json:"serviceName,omitempty"`
	// ServiceTier - READ-ONLY; The service tier.
	ServiceTier *string `json:"serviceTier,omitempty"`
}

MeterDetails the properties of the meter detail.

func (MeterDetails) MarshalJSON

func (md MeterDetails) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for MeterDetails.

type MeterDetailsResponse

type MeterDetailsResponse struct {
	// MeterName - READ-ONLY; The name of the meter, within the given meter category
	MeterName *string `json:"meterName,omitempty"`
	// MeterCategory - READ-ONLY; The category of the meter, for example, 'Cloud services', 'Networking', etc..
	MeterCategory *string `json:"meterCategory,omitempty"`
	// MeterSubCategory - READ-ONLY; The subcategory of the meter, for example, 'A6 Cloud services', 'ExpressRoute (IXP)', etc..
	MeterSubCategory *string `json:"meterSubCategory,omitempty"`
	// UnitOfMeasure - READ-ONLY; The unit in which the meter consumption is charged, for example, 'Hours', 'GB', etc.
	UnitOfMeasure *string `json:"unitOfMeasure,omitempty"`
	// ServiceFamily - READ-ONLY; The service family.
	ServiceFamily *string `json:"serviceFamily,omitempty"`
}

MeterDetailsResponse the properties of the meter detail.

func (MeterDetailsResponse) MarshalJSON

func (mdr MeterDetailsResponse) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for MeterDetailsResponse.

type Metrictype

type Metrictype string

Metrictype enumerates the values for metrictype.

const (
	// MetrictypeActualCostMetricType Actual cost data.
	MetrictypeActualCostMetricType Metrictype = "actualcost"
	// MetrictypeAmortizedCostMetricType Amortized cost data.
	MetrictypeAmortizedCostMetricType Metrictype = "amortizedcost"
	// MetrictypeUsageMetricType Usage data.
	MetrictypeUsageMetricType Metrictype = "usage"
)

func PossibleMetrictypeValues

func PossibleMetrictypeValues() []Metrictype

PossibleMetrictypeValues returns an array of possible values for the Metrictype const type.

type ModernChargeSummary

type ModernChargeSummary struct {
	// ModernChargeSummaryProperties - Properties for modern charge summary
	*ModernChargeSummaryProperties `json:"properties,omitempty"`
	// Kind - Possible values include: 'KindBasicChargeSummaryKindChargeSummary', 'KindBasicChargeSummaryKindLegacy', 'KindBasicChargeSummaryKindModern'
	Kind KindBasicChargeSummary `json:"kind,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ModernChargeSummary modern charge summary.

func (ModernChargeSummary) AsBasicChargeSummary

func (mcs ModernChargeSummary) AsBasicChargeSummary() (BasicChargeSummary, bool)

AsBasicChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.

func (ModernChargeSummary) AsChargeSummary

func (mcs ModernChargeSummary) AsChargeSummary() (*ChargeSummary, bool)

AsChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.

func (ModernChargeSummary) AsLegacyChargeSummary

func (mcs ModernChargeSummary) AsLegacyChargeSummary() (*LegacyChargeSummary, bool)

AsLegacyChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.

func (ModernChargeSummary) AsModernChargeSummary

func (mcs ModernChargeSummary) AsModernChargeSummary() (*ModernChargeSummary, bool)

AsModernChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.

func (ModernChargeSummary) MarshalJSON

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

MarshalJSON is the custom marshaler for ModernChargeSummary.

func (*ModernChargeSummary) UnmarshalJSON

func (mcs *ModernChargeSummary) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ModernChargeSummary struct.

type ModernChargeSummaryProperties

type ModernChargeSummaryProperties struct {
	// BillingPeriodID - READ-ONLY; The id of the billing period resource that the charge belongs to.
	BillingPeriodID *string `json:"billingPeriodId,omitempty"`
	// UsageStart - READ-ONLY; Usage start date.
	UsageStart *string `json:"usageStart,omitempty"`
	// UsageEnd - READ-ONLY; Usage end date.
	UsageEnd *string `json:"usageEnd,omitempty"`
	// AzureCharges - READ-ONLY; Azure Charges.
	AzureCharges *Amount `json:"azureCharges,omitempty"`
	// ChargesBilledSeparately - READ-ONLY; Charges Billed separately.
	ChargesBilledSeparately *Amount `json:"chargesBilledSeparately,omitempty"`
	// MarketplaceCharges - READ-ONLY; Marketplace Charges.
	MarketplaceCharges *Amount `json:"marketplaceCharges,omitempty"`
	// BillingAccountID - READ-ONLY; Billing Account Id
	BillingAccountID *string `json:"billingAccountId,omitempty"`
	// BillingProfileID - READ-ONLY; Billing Profile Id
	BillingProfileID *string `json:"billingProfileId,omitempty"`
	// InvoiceSectionID - READ-ONLY; Invoice Section Id
	InvoiceSectionID *string `json:"invoiceSectionId,omitempty"`
	// CustomerID - READ-ONLY; Customer Id
	CustomerID *string `json:"customerId,omitempty"`
	// IsInvoiced - READ-ONLY; Is charge Invoiced
	IsInvoiced *bool `json:"isInvoiced,omitempty"`
}

ModernChargeSummaryProperties the properties of modern charge summary.

func (ModernChargeSummaryProperties) MarshalJSON

func (mcsp ModernChargeSummaryProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernChargeSummaryProperties.

type ModernReservationRecommendation

type ModernReservationRecommendation struct {
	// ModernReservationRecommendationProperties - Properties for modern reservation recommendation
	*ModernReservationRecommendationProperties `json:"properties,omitempty"`
	// ETag - READ-ONLY; Resource eTag.
	ETag *string `json:"eTag,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
	// Location - READ-ONLY; Resource location
	Location *string `json:"location,omitempty"`
	// Sku - READ-ONLY; Resource sku
	Sku *string `json:"sku,omitempty"`
	// Kind - Possible values include: 'KindBasicReservationRecommendationKindReservationRecommendation', 'KindBasicReservationRecommendationKindLegacy', 'KindBasicReservationRecommendationKindModern'
	Kind KindBasicReservationRecommendation `json:"kind,omitempty"`
}

ModernReservationRecommendation modern reservation recommendation.

func (ModernReservationRecommendation) AsBasicReservationRecommendation

func (mrr ModernReservationRecommendation) AsBasicReservationRecommendation() (BasicReservationRecommendation, bool)

AsBasicReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.

func (ModernReservationRecommendation) AsLegacyReservationRecommendation

func (mrr ModernReservationRecommendation) AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)

AsLegacyReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.

func (ModernReservationRecommendation) AsModernReservationRecommendation

func (mrr ModernReservationRecommendation) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)

AsModernReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.

func (ModernReservationRecommendation) AsReservationRecommendation

func (mrr ModernReservationRecommendation) AsReservationRecommendation() (*ReservationRecommendation, bool)

AsReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.

func (ModernReservationRecommendation) MarshalJSON

func (mrr ModernReservationRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernReservationRecommendation.

func (*ModernReservationRecommendation) UnmarshalJSON

func (mrr *ModernReservationRecommendation) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ModernReservationRecommendation struct.

type ModernReservationRecommendationProperties

type ModernReservationRecommendationProperties struct {
	// Location - READ-ONLY; Resource Location.
	Location *string `json:"location,omitempty"`
	// LookBackPeriod - READ-ONLY; The number of days of usage to look back for recommendation.
	LookBackPeriod *int32 `json:"lookBackPeriod,omitempty"`
	// InstanceFlexibilityRatio - READ-ONLY; The instance Flexibility Ratio.
	InstanceFlexibilityRatio *float64 `json:"instanceFlexibilityRatio,omitempty"`
	// InstanceFlexibilityGroup - READ-ONLY; The instance Flexibility Group.
	InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"`
	// NormalizedSize - READ-ONLY; The normalized Size.
	NormalizedSize *string `json:"normalizedSize,omitempty"`
	// RecommendedQuantityNormalized - READ-ONLY; The recommended Quantity Normalized.
	RecommendedQuantityNormalized *float64 `json:"recommendedQuantityNormalized,omitempty"`
	// MeterID - READ-ONLY; The meter id (GUID)
	MeterID *uuid.UUID `json:"meterId,omitempty"`
	// Term - READ-ONLY; RI recommendations in one or three year terms.
	Term *string `json:"term,omitempty"`
	// CostWithNoReservedInstances - READ-ONLY; The total amount of cost without reserved instances.
	CostWithNoReservedInstances *Amount `json:"costWithNoReservedInstances,omitempty"`
	// RecommendedQuantity - READ-ONLY; Recommended quality for reserved instances.
	RecommendedQuantity *decimal.Decimal `json:"recommendedQuantity,omitempty"`
	// TotalCostWithReservedInstances - READ-ONLY; The total amount of cost with reserved instances.
	TotalCostWithReservedInstances *Amount `json:"totalCostWithReservedInstances,omitempty"`
	// NetSavings - READ-ONLY; Total estimated savings with reserved instances.
	NetSavings *Amount `json:"netSavings,omitempty"`
	// FirstUsageDate - READ-ONLY; The usage date for looking back.
	FirstUsageDate *date.Time `json:"firstUsageDate,omitempty"`
	// Scope - READ-ONLY; Shared or single recommendation.
	Scope *string `json:"scope,omitempty"`
	// SkuProperties - READ-ONLY; List of sku properties
	SkuProperties *[]SkuProperty `json:"skuProperties,omitempty"`
	// SkuName - READ-ONLY; This is the ARM Sku name.
	SkuName *string `json:"skuName,omitempty"`
	// ResourceType - READ-ONLY; The Azure resource type.
	ResourceType *string `json:"resourceType,omitempty"`
	// SubscriptionID - READ-ONLY; The Azure subscription ID.
	SubscriptionID *string `json:"subscriptionId,omitempty"`
}

ModernReservationRecommendationProperties the properties of the reservation recommendation.

func (ModernReservationRecommendationProperties) MarshalJSON

func (mrrp ModernReservationRecommendationProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernReservationRecommendationProperties.

type ModernReservationTransaction

type ModernReservationTransaction struct {
	*ModernReservationTransactionProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags *[]string `json:"tags,omitempty"`
}

ModernReservationTransaction modern Reservation transaction resource.

func (ModernReservationTransaction) MarshalJSON

func (mrt ModernReservationTransaction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernReservationTransaction.

func (*ModernReservationTransaction) UnmarshalJSON

func (mrt *ModernReservationTransaction) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ModernReservationTransaction struct.

type ModernReservationTransactionProperties

type ModernReservationTransactionProperties struct {
	// Amount - READ-ONLY; The charge of the transaction.
	Amount *decimal.Decimal `json:"amount,omitempty"`
	// ArmSkuName - READ-ONLY; This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
	ArmSkuName *string `json:"armSkuName,omitempty"`
	// BillingFrequency - READ-ONLY; The billing frequency, which can be either one-time or recurring.
	BillingFrequency *string `json:"billingFrequency,omitempty"`
	// BillingProfileID - READ-ONLY; Billing profile Id.
	BillingProfileID *string `json:"billingProfileId,omitempty"`
	// BillingProfileName - READ-ONLY; Billing profile name.
	BillingProfileName *string `json:"billingProfileName,omitempty"`
	// Currency - READ-ONLY; The ISO currency in which the transaction is charged, for example, USD.
	Currency *string `json:"currency,omitempty"`
	// Description - READ-ONLY; The description of the transaction.
	Description *string `json:"description,omitempty"`
	// EventDate - READ-ONLY; The date of the transaction
	EventDate *date.Time `json:"eventDate,omitempty"`
	// EventType - READ-ONLY; The type of the transaction (Purchase, Cancel, etc.)
	EventType *string `json:"eventType,omitempty"`
	// Invoice - READ-ONLY; Invoice Number
	Invoice *string `json:"invoice,omitempty"`
	// InvoiceID - READ-ONLY; Invoice Id as on the invoice where the specific transaction appears.
	InvoiceID *string `json:"invoiceId,omitempty"`
	// InvoiceSectionID - READ-ONLY; Invoice Section Id
	InvoiceSectionID *string `json:"invoiceSectionId,omitempty"`
	// InvoiceSectionName - READ-ONLY; Invoice Section Name.
	InvoiceSectionName *string `json:"invoiceSectionName,omitempty"`
	// PurchasingSubscriptionGUID - READ-ONLY; The subscription guid that makes the transaction.
	PurchasingSubscriptionGUID *uuid.UUID `json:"purchasingSubscriptionGuid,omitempty"`
	// PurchasingSubscriptionName - READ-ONLY; The subscription name that makes the transaction.
	PurchasingSubscriptionName *string `json:"purchasingSubscriptionName,omitempty"`
	// Quantity - READ-ONLY; The quantity of the transaction.
	Quantity *decimal.Decimal `json:"quantity,omitempty"`
	// Region - READ-ONLY; The region of the transaction.
	Region *string `json:"region,omitempty"`
	// ReservationOrderID - READ-ONLY; The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
	ReservationOrderID *string `json:"reservationOrderId,omitempty"`
	// ReservationOrderName - READ-ONLY; The name of the reservation order.
	ReservationOrderName *string `json:"reservationOrderName,omitempty"`
	// Term - READ-ONLY; This is the term of the transaction.
	Term *string `json:"term,omitempty"`
}

ModernReservationTransactionProperties the properties of a modern reservation transaction.

func (ModernReservationTransactionProperties) MarshalJSON

func (mrtp ModernReservationTransactionProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernReservationTransactionProperties.

type ModernReservationTransactionsListResult

type ModernReservationTransactionsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of reservation recommendations.
	Value *[]ModernReservationTransaction `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ModernReservationTransactionsListResult result of listing reservation recommendations.

func (ModernReservationTransactionsListResult) IsEmpty

IsEmpty returns true if the ListResult contains no values.

func (ModernReservationTransactionsListResult) MarshalJSON

func (mrtlr ModernReservationTransactionsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernReservationTransactionsListResult.

type ModernReservationTransactionsListResultIterator

type ModernReservationTransactionsListResultIterator struct {
	// contains filtered or unexported fields
}

ModernReservationTransactionsListResultIterator provides access to a complete listing of ModernReservationTransaction values.

func NewModernReservationTransactionsListResultIterator

func NewModernReservationTransactionsListResultIterator(page ModernReservationTransactionsListResultPage) ModernReservationTransactionsListResultIterator

Creates a new instance of the ModernReservationTransactionsListResultIterator type.

func (*ModernReservationTransactionsListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ModernReservationTransactionsListResultIterator) NextWithContext

func (iter *ModernReservationTransactionsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ModernReservationTransactionsListResultIterator) NotDone

NotDone returns true if the enumeration should be started or is not yet complete.

func (ModernReservationTransactionsListResultIterator) Response

Response returns the raw server response from the last page request.

func (ModernReservationTransactionsListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ModernReservationTransactionsListResultPage

type ModernReservationTransactionsListResultPage struct {
	// contains filtered or unexported fields
}

ModernReservationTransactionsListResultPage contains a page of ModernReservationTransaction values.

func NewModernReservationTransactionsListResultPage

Creates a new instance of the ModernReservationTransactionsListResultPage type.

func (*ModernReservationTransactionsListResultPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ModernReservationTransactionsListResultPage) NextWithContext

func (page *ModernReservationTransactionsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ModernReservationTransactionsListResultPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ModernReservationTransactionsListResultPage) Response

Response returns the raw server response from the last page request.

func (ModernReservationTransactionsListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type ModernUsageDetail

type ModernUsageDetail struct {
	// ModernUsageDetailProperties - Properties for modern usage details
	*ModernUsageDetailProperties `json:"properties,omitempty"`
	// Kind - Possible values include: 'KindUsageDetail', 'KindLegacy', 'KindModern'
	Kind Kind `json:"kind,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ModernUsageDetail modern usage detail.

func (ModernUsageDetail) AsBasicUsageDetail

func (mud ModernUsageDetail) AsBasicUsageDetail() (BasicUsageDetail, bool)

AsBasicUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.

func (ModernUsageDetail) AsLegacyUsageDetail

func (mud ModernUsageDetail) AsLegacyUsageDetail() (*LegacyUsageDetail, bool)

AsLegacyUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.

func (ModernUsageDetail) AsModernUsageDetail

func (mud ModernUsageDetail) AsModernUsageDetail() (*ModernUsageDetail, bool)

AsModernUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.

func (ModernUsageDetail) AsUsageDetail

func (mud ModernUsageDetail) AsUsageDetail() (*UsageDetail, bool)

AsUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.

func (ModernUsageDetail) MarshalJSON

func (mud ModernUsageDetail) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernUsageDetail.

func (*ModernUsageDetail) UnmarshalJSON

func (mud *ModernUsageDetail) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ModernUsageDetail struct.

type ModernUsageDetailProperties

type ModernUsageDetailProperties struct {
	// BillingAccountID - READ-ONLY; Billing Account identifier.
	BillingAccountID *string `json:"billingAccountId,omitempty"`
	// BillingAccountName - READ-ONLY; Name of the Billing Account.
	BillingAccountName *string `json:"billingAccountName,omitempty"`
	// BillingPeriodStartDate - READ-ONLY; Billing Period Start Date as in the invoice.
	BillingPeriodStartDate *date.Time `json:"billingPeriodStartDate,omitempty"`
	// BillingPeriodEndDate - READ-ONLY; Billing Period End Date as in the invoice.
	BillingPeriodEndDate *date.Time `json:"billingPeriodEndDate,omitempty"`
	// BillingProfileID - READ-ONLY; Identifier for the billing profile that groups costs across invoices in the a singular billing currency across across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc.
	BillingProfileID *string `json:"billingProfileId,omitempty"`
	// BillingProfileName - READ-ONLY; Name of the billing profile that groups costs across invoices in the a singular billing currency across across the customers who have onboarded the Microsoft customer agreement and the customers in CSP who have made entitlement purchases like SaaS, Marketplace, RI, etc.
	BillingProfileName *string `json:"billingProfileName,omitempty"`
	// SubscriptionGUID - READ-ONLY; Unique Microsoft generated identifier for the Azure Subscription.
	SubscriptionGUID *string `json:"subscriptionGuid,omitempty"`
	// SubscriptionName - READ-ONLY; Name of the Azure Subscription.
	SubscriptionName *string `json:"subscriptionName,omitempty"`
	// Date - READ-ONLY; Date for the usage record.
	Date *date.Time `json:"date,omitempty"`
	// Product - READ-ONLY; Name of the product that has accrued charges by consumption or purchase as listed in the invoice. Not available for Marketplace.
	Product *string `json:"product,omitempty"`
	// MeterID - READ-ONLY; The meter id (GUID). Not available for marketplace. For reserved instance this represents the primary meter for which the reservation was purchased. For the actual VM Size for which the reservation is purchased see productOrderName.
	MeterID *string `json:"meterId,omitempty"`
	// MeterName - READ-ONLY; Identifies the name of the meter against which consumption is measured.
	MeterName *string `json:"meterName,omitempty"`
	// MeterRegion - READ-ONLY; Identifies the location of the datacenter for certain services that are priced based on datacenter location.
	MeterRegion *string `json:"meterRegion,omitempty"`
	// MeterCategory - READ-ONLY; Identifies the top-level service for the usage.
	MeterCategory *string `json:"meterCategory,omitempty"`
	// MeterSubCategory - READ-ONLY; Defines the type or sub-category of Azure service that can affect the rate.
	MeterSubCategory *string `json:"meterSubCategory,omitempty"`
	// ServiceFamily - READ-ONLY; List the service family for the product purchased or charged (Example: Storage ; Compute).
	ServiceFamily *string `json:"serviceFamily,omitempty"`
	// Quantity - READ-ONLY; Measure the quantity purchased or consumed.The amount of the meter used during the billing period.
	Quantity *decimal.Decimal `json:"quantity,omitempty"`
	// UnitOfMeasure - READ-ONLY; Identifies the Unit that the service is charged in. For example, GB, hours, 10,000 s.
	UnitOfMeasure *string `json:"unitOfMeasure,omitempty"`
	// InstanceName - READ-ONLY; Instance Name.
	InstanceName *string `json:"instanceName,omitempty"`
	// CostInUSD - READ-ONLY; Estimated extendedCost or blended cost before tax in USD.
	CostInUSD *decimal.Decimal `json:"costInUSD,omitempty"`
	// UnitPrice - READ-ONLY; Unit Price is the price applicable to you. (your EA or other contract price).
	UnitPrice *decimal.Decimal `json:"unitPrice,omitempty"`
	// BillingCurrencyCode - READ-ONLY; The currency defining the billed cost.
	BillingCurrencyCode *string `json:"billingCurrencyCode,omitempty"`
	// ResourceLocation - READ-ONLY; Name of the resource location.
	ResourceLocation *string `json:"resourceLocation,omitempty"`
	// ConsumedService - READ-ONLY; Consumed service name. Name of the azure resource provider that emits the usage or was purchased. This value is not provided for marketplace usage.
	ConsumedService *string `json:"consumedService,omitempty"`
	// ServiceInfo1 - READ-ONLY; Service Info 1.
	ServiceInfo1 *string `json:"serviceInfo1,omitempty"`
	// ServiceInfo2 - READ-ONLY; Service Info 2.
	ServiceInfo2 *string `json:"serviceInfo2,omitempty"`
	// AdditionalInfo - READ-ONLY; Additional details of this usage item. Use this field to get usage line item specific details such as the actual VM Size (ServiceType) or the ratio in which the reservation discount is applied.
	AdditionalInfo *string `json:"additionalInfo,omitempty"`
	// InvoiceSectionID - READ-ONLY; Identifier of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements onboarded by partners.
	InvoiceSectionID *string `json:"invoiceSectionId,omitempty"`
	// InvoiceSectionName - READ-ONLY; Name of the project that is being charged in the invoice. Not applicable for Microsoft Customer Agreements onboarded by partners.
	InvoiceSectionName *string `json:"invoiceSectionName,omitempty"`
	// CostCenter - READ-ONLY; The cost center of this department if it is a department and a cost center is provided.
	CostCenter *string `json:"costCenter,omitempty"`
	// ResourceGroup - READ-ONLY; Name of the Azure resource group used for cohesive lifecycle management of resources.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// ReservationID - READ-ONLY; ARM resource id of the reservation. Only applies to records relevant to reservations.
	ReservationID *string `json:"reservationId,omitempty"`
	// ReservationName - READ-ONLY; User provided display name of the reservation. Last known name for a particular day is populated in the daily data. Only applies to records relevant to reservations.
	ReservationName *string `json:"reservationName,omitempty"`
	// ProductOrderID - READ-ONLY; The identifier for the asset or Azure plan name that the subscription belongs to. For example: Azure Plan. For reservations this is the Reservation Order ID.
	ProductOrderID *string `json:"productOrderId,omitempty"`
	// ProductOrderName - READ-ONLY; Product Order Name. For reservations this is the SKU that was purchased.
	ProductOrderName *string `json:"productOrderName,omitempty"`
	// IsAzureCreditEligible - READ-ONLY; Determines if the cost is eligible to be paid for using Azure credits.
	IsAzureCreditEligible *bool `json:"isAzureCreditEligible,omitempty"`
	// Term - READ-ONLY; Term (in months). Displays the term for the validity of the offer. For example. In case of reserved instances it displays 12 months for yearly term of reserved instance. For one time purchases or recurring purchases, the terms displays 1 month; This is not applicable for Azure consumption.
	Term *string `json:"term,omitempty"`
	// PublisherName - READ-ONLY; Name of the publisher of the service including Microsoft or Third Party publishers.
	PublisherName *string `json:"publisherName,omitempty"`
	// PublisherType - READ-ONLY; Type of publisher that identifies if the publisher is first party, third party reseller or third party agency.
	PublisherType *string `json:"publisherType,omitempty"`
	// ChargeType - READ-ONLY; Indicates a charge represents credits, usage, a Marketplace purchase, a reservation fee, or a refund.
	ChargeType *string `json:"chargeType,omitempty"`
	// Frequency - READ-ONLY; Indicates how frequently this charge will occur. OneTime for purchases which only happen once, Monthly for fees which recur every month, and UsageBased for charges based on how much a service is used.
	Frequency *string `json:"frequency,omitempty"`
	// CostInBillingCurrency - READ-ONLY; ExtendedCost or blended cost before tax in billed currency.
	CostInBillingCurrency *decimal.Decimal `json:"costInBillingCurrency,omitempty"`
	// CostInPricingCurrency - READ-ONLY; ExtendedCost or blended cost before tax in pricing currency to correlate with prices.
	CostInPricingCurrency *decimal.Decimal `json:"costInPricingCurrency,omitempty"`
	// ExchangeRate - READ-ONLY; Exchange rate used in conversion from pricing currency to billing currency.
	ExchangeRate *string `json:"exchangeRate,omitempty"`
	// ExchangeRateDate - READ-ONLY; Date on which exchange rate used in conversion from pricing currency to billing currency.
	ExchangeRateDate *date.Time `json:"exchangeRateDate,omitempty"`
	// InvoiceID - READ-ONLY; Invoice ID as on the invoice where the specific transaction appears.
	InvoiceID *string `json:"invoiceId,omitempty"`
	// PreviousInvoiceID - READ-ONLY; Reference to an original invoice there is a refund (negative cost). This is populated only when there is a refund.
	PreviousInvoiceID *string `json:"previousInvoiceId,omitempty"`
	// PricingCurrencyCode - READ-ONLY; Pricing Billing Currency.
	PricingCurrencyCode *string `json:"pricingCurrencyCode,omitempty"`
	// ProductIdentifier - READ-ONLY; Identifier for the product that has accrued charges by consumption or purchase . This is the concatenated key of productId and SkuId in partner center.
	ProductIdentifier *string `json:"productIdentifier,omitempty"`
	// ResourceLocationNormalized - READ-ONLY; Resource Location Normalized.
	ResourceLocationNormalized *string `json:"resourceLocationNormalized,omitempty"`
	// ServicePeriodStartDate - READ-ONLY; Start date for the rating period when the service usage was rated for charges. The prices for Azure services are determined for the rating period.
	ServicePeriodStartDate *date.Time `json:"servicePeriodStartDate,omitempty"`
	// ServicePeriodEndDate - READ-ONLY; End date for the period when the service usage was rated for charges. The prices for Azure services are determined based on the rating period.
	ServicePeriodEndDate *date.Time `json:"servicePeriodEndDate,omitempty"`
	// CustomerTenantID - READ-ONLY; Identifier of the customer's AAD tenant.
	CustomerTenantID *string `json:"customerTenantId,omitempty"`
	// CustomerName - READ-ONLY; Name of the customer's AAD tenant.
	CustomerName *string `json:"customerName,omitempty"`
	// PartnerTenantID - READ-ONLY; Identifier for the partner's AAD tenant.
	PartnerTenantID *string `json:"partnerTenantId,omitempty"`
	// PartnerName - READ-ONLY; Name of the partner' AAD tenant.
	PartnerName *string `json:"partnerName,omitempty"`
	// ResellerMpnID - READ-ONLY; MPNId for the reseller associated with the subscription.
	ResellerMpnID *string `json:"resellerMpnId,omitempty"`
	// ResellerName - READ-ONLY; Reseller Name.
	ResellerName *string `json:"resellerName,omitempty"`
	// PublisherID - READ-ONLY; Publisher Id.
	PublisherID *string `json:"publisherId,omitempty"`
	// MarketPrice - READ-ONLY; Market Price that's charged for the usage.
	MarketPrice *decimal.Decimal `json:"marketPrice,omitempty"`
	// ExchangeRatePricingToBilling - READ-ONLY; Exchange Rate from pricing currency to billing currency.
	ExchangeRatePricingToBilling *decimal.Decimal `json:"exchangeRatePricingToBilling,omitempty"`
	// PaygCostInBillingCurrency - READ-ONLY; The amount of PayG cost before tax in billing currency.
	PaygCostInBillingCurrency *decimal.Decimal `json:"paygCostInBillingCurrency,omitempty"`
	// PaygCostInUSD - READ-ONLY; The amount of PayG cost before tax in US Dollar currency.
	PaygCostInUSD *decimal.Decimal `json:"paygCostInUSD,omitempty"`
	// PartnerEarnedCreditRate - READ-ONLY; Rate of discount applied if there is a partner earned credit (PEC) based on partner admin link access.
	PartnerEarnedCreditRate *decimal.Decimal `json:"partnerEarnedCreditRate,omitempty"`
	// PartnerEarnedCreditApplied - READ-ONLY; Flag to indicate if partner earned credit has been applied or not.
	PartnerEarnedCreditApplied *string `json:"partnerEarnedCreditApplied,omitempty"`
	// PayGPrice - READ-ONLY; Retail price for the resource.
	PayGPrice *decimal.Decimal `json:"payGPrice,omitempty"`
}

ModernUsageDetailProperties the properties of the usage detail.

func (ModernUsageDetailProperties) MarshalJSON

func (mudp ModernUsageDetailProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ModernUsageDetailProperties.

type Notification

type Notification struct {
	// Enabled - The notification is enabled or not.
	Enabled *bool `json:"enabled,omitempty"`
	// Operator - The comparison operator. Possible values include: 'OperatorTypeEqualTo', 'OperatorTypeGreaterThan', 'OperatorTypeGreaterThanOrEqualTo'
	Operator OperatorType `json:"operator,omitempty"`
	// Threshold - Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.
	Threshold *decimal.Decimal `json:"threshold,omitempty"`
	// ContactEmails - Email addresses to send the budget notification to when the threshold is exceeded. Must have at least one contact email or contact group specified at the Subscription or Resource Group scopes. All other scopes must have at least one contact email specified.
	ContactEmails *[]string `json:"contactEmails,omitempty"`
	// ContactRoles - Contact roles to send the budget notification to when the threshold is exceeded.
	ContactRoles *[]string `json:"contactRoles,omitempty"`
	// ContactGroups - Action groups to send the budget notification to when the threshold is exceeded. Must be provided as a fully qualified Azure resource id. Only supported at Subscription or Resource Group scopes.
	ContactGroups *[]string `json:"contactGroups,omitempty"`
	// ThresholdType - The type of threshold. Possible values include: 'ThresholdTypeActual'
	ThresholdType ThresholdType `json:"thresholdType,omitempty"`
	// Locale - Language in which the recipient will receive the notification. Possible values include: 'CultureCodeEnUs', 'CultureCodeJaJp', 'CultureCodeZhCn', 'CultureCodeDeDe', 'CultureCodeEsEs', 'CultureCodeFrFr', 'CultureCodeItIt', 'CultureCodeKoKr', 'CultureCodePtBr', 'CultureCodeRuRu', 'CultureCodeZhTw', 'CultureCodeCsCz', 'CultureCodePlPl', 'CultureCodeTrTr', 'CultureCodeDaDk', 'CultureCodeEnGb', 'CultureCodeHuHu', 'CultureCodeNbNo', 'CultureCodeNlNl', 'CultureCodePtPt', 'CultureCodeSvSe'
	Locale CultureCode `json:"locale,omitempty"`
}

Notification the notification associated with a budget.

type Operation

type Operation struct {
	// ID - READ-ONLY; Operation Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Operation name: {provider}/{resource}/{operation}.
	Name *string `json:"name,omitempty"`
	// Display - The object that represents the operation.
	Display *OperationDisplay `json:"display,omitempty"`
}

Operation a Consumption REST API operation.

func (Operation) MarshalJSON

func (o Operation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Operation.

type OperationDisplay

type OperationDisplay struct {
	// Provider - READ-ONLY; Service provider: Microsoft.Consumption.
	Provider *string `json:"provider,omitempty"`
	// Resource - READ-ONLY; Resource on which the operation is performed: UsageDetail, etc.
	Resource *string `json:"resource,omitempty"`
	// Operation - READ-ONLY; Operation type: Read, write, delete, etc.
	Operation *string `json:"operation,omitempty"`
	// Description - READ-ONLY; Description of the operation.
	Description *string `json:"description,omitempty"`
}

OperationDisplay the object that represents the operation.

func (OperationDisplay) MarshalJSON

func (o OperationDisplay) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for OperationDisplay.

type OperationListResult

type OperationListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; List of consumption operations supported by the Microsoft.Consumption resource provider.
	Value *[]Operation `json:"value,omitempty"`
	// NextLink - READ-ONLY; URL to get the next set of operation list results if there are any.
	NextLink *string `json:"nextLink,omitempty"`
}

OperationListResult result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.

func (OperationListResult) IsEmpty

func (olr OperationListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (OperationListResult) MarshalJSON

func (olr OperationListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for OperationListResult.

type OperationListResultIterator

type OperationListResultIterator struct {
	// contains filtered or unexported fields
}

OperationListResultIterator provides access to a complete listing of Operation values.

func NewOperationListResultIterator

func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator

Creates a new instance of the OperationListResultIterator type.

func (*OperationListResultIterator) Next

func (iter *OperationListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultIterator) NextWithContext

func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (OperationListResultIterator) NotDone

func (iter OperationListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (OperationListResultIterator) Response

Response returns the raw server response from the last page request.

func (OperationListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type OperationListResultPage

type OperationListResultPage struct {
	// contains filtered or unexported fields
}

OperationListResultPage contains a page of Operation values.

func NewOperationListResultPage

func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage

Creates a new instance of the OperationListResultPage type.

func (*OperationListResultPage) Next

func (page *OperationListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*OperationListResultPage) NextWithContext

func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (OperationListResultPage) NotDone

func (page OperationListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (OperationListResultPage) Response

Response returns the raw server response from the last page request.

func (OperationListResultPage) Values

func (page OperationListResultPage) Values() []Operation

Values returns the slice of values for the current page or nil if there are no values.

type OperationsClient

type OperationsClient struct {
	BaseClient
}

OperationsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewOperationsClient

func NewOperationsClient(subscriptionID string) OperationsClient

NewOperationsClient creates an instance of the OperationsClient client.

func NewOperationsClientWithBaseURI

func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient

NewOperationsClientWithBaseURI creates an instance of the OperationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (OperationsClient) List

func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)

List lists all of the available consumption REST API operations.

func (OperationsClient) ListComplete

func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (OperationsClient) ListPreparer

func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (OperationsClient) ListResponder

func (client OperationsClient) ListResponder(resp *http.Response) (result OperationListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (OperationsClient) ListSender

func (client OperationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type OperatorType

type OperatorType string

OperatorType enumerates the values for operator type.

const (
	// OperatorTypeEqualTo ...
	OperatorTypeEqualTo OperatorType = "EqualTo"
	// OperatorTypeGreaterThan ...
	OperatorTypeGreaterThan OperatorType = "GreaterThan"
	// OperatorTypeGreaterThanOrEqualTo ...
	OperatorTypeGreaterThanOrEqualTo OperatorType = "GreaterThanOrEqualTo"
)

func PossibleOperatorTypeValues

func PossibleOperatorTypeValues() []OperatorType

PossibleOperatorTypeValues returns an array of possible values for the OperatorType const type.

type PriceSheetClient

type PriceSheetClient struct {
	BaseClient
}

PriceSheetClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewPriceSheetClient

func NewPriceSheetClient(subscriptionID string) PriceSheetClient

NewPriceSheetClient creates an instance of the PriceSheetClient client.

func NewPriceSheetClientWithBaseURI

func NewPriceSheetClientWithBaseURI(baseURI string, subscriptionID string) PriceSheetClient

NewPriceSheetClientWithBaseURI creates an instance of the PriceSheetClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (PriceSheetClient) Get

func (client PriceSheetClient) Get(ctx context.Context, expand string, skiptoken string, top *int32) (result PriceSheetResult, err error)

Get gets the price sheet for a scope by subscriptionId. Price sheet is available via this API only for May 1, 2014 or later. Parameters: expand - may be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the top N results.

func (PriceSheetClient) GetByBillingPeriod

func (client PriceSheetClient) GetByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, skiptoken string, top *int32) (result PriceSheetResult, err error)

GetByBillingPeriod get the price sheet for a scope by subscriptionId and billing period. Price sheet is available via this API only for May 1, 2014 or later. Parameters: billingPeriodName - billing Period Name. expand - may be used to expand the properties/meterDetails within a price sheet. By default, these fields are not included when returning price sheet. skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the top N results.

func (PriceSheetClient) GetByBillingPeriodPreparer

func (client PriceSheetClient) GetByBillingPeriodPreparer(ctx context.Context, billingPeriodName string, expand string, skiptoken string, top *int32) (*http.Request, error)

GetByBillingPeriodPreparer prepares the GetByBillingPeriod request.

func (PriceSheetClient) GetByBillingPeriodResponder

func (client PriceSheetClient) GetByBillingPeriodResponder(resp *http.Response) (result PriceSheetResult, err error)

GetByBillingPeriodResponder handles the response to the GetByBillingPeriod request. The method always closes the http.Response Body.

func (PriceSheetClient) GetByBillingPeriodSender

func (client PriceSheetClient) GetByBillingPeriodSender(req *http.Request) (*http.Response, error)

GetByBillingPeriodSender sends the GetByBillingPeriod request. The method will close the http.Response Body if it receives an error.

func (PriceSheetClient) GetPreparer

func (client PriceSheetClient) GetPreparer(ctx context.Context, expand string, skiptoken string, top *int32) (*http.Request, error)

GetPreparer prepares the Get request.

func (PriceSheetClient) GetResponder

func (client PriceSheetClient) GetResponder(resp *http.Response) (result PriceSheetResult, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (PriceSheetClient) GetSender

func (client PriceSheetClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

type PriceSheetModel

type PriceSheetModel struct {
	// Pricesheets - READ-ONLY; Price sheet
	Pricesheets *[]PriceSheetProperties `json:"pricesheets,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
	// Download - READ-ONLY; Pricesheet download details.
	Download *MeterDetails `json:"download,omitempty"`
}

PriceSheetModel price sheet result. It contains the pricesheet associated with billing period

func (PriceSheetModel) MarshalJSON

func (psm PriceSheetModel) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for PriceSheetModel.

type PriceSheetProperties

type PriceSheetProperties struct {
	// BillingPeriodID - READ-ONLY; The id of the billing period resource that the usage belongs to.
	BillingPeriodID *string `json:"billingPeriodId,omitempty"`
	// MeterID - READ-ONLY; The meter id (GUID)
	MeterID *uuid.UUID `json:"meterId,omitempty"`
	// MeterDetails - READ-ONLY; The details about the meter. By default this is not populated, unless it's specified in $expand.
	MeterDetails *MeterDetails `json:"meterDetails,omitempty"`
	// UnitOfMeasure - READ-ONLY; Unit of measure
	UnitOfMeasure *string `json:"unitOfMeasure,omitempty"`
	// IncludedQuantity - READ-ONLY; Included quality for an offer
	IncludedQuantity *decimal.Decimal `json:"includedQuantity,omitempty"`
	// PartNumber - READ-ONLY; Part Number
	PartNumber *string `json:"partNumber,omitempty"`
	// UnitPrice - READ-ONLY; Unit Price
	UnitPrice *decimal.Decimal `json:"unitPrice,omitempty"`
	// CurrencyCode - READ-ONLY; Currency Code
	CurrencyCode *string `json:"currencyCode,omitempty"`
	// OfferID - READ-ONLY; Offer Id
	OfferID *string `json:"offerId,omitempty"`
}

PriceSheetProperties the properties of the price sheet.

func (PriceSheetProperties) MarshalJSON

func (psp PriceSheetProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for PriceSheetProperties.

type PriceSheetResult

type PriceSheetResult struct {
	autorest.Response `json:"-"`
	*PriceSheetModel  `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

PriceSheetResult an pricesheet resource.

func (PriceSheetResult) MarshalJSON

func (psr PriceSheetResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for PriceSheetResult.

func (*PriceSheetResult) UnmarshalJSON

func (psr *PriceSheetResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for PriceSheetResult struct.

type ProxyResource

type ProxyResource struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

ProxyResource the Resource model definition.

func (ProxyResource) MarshalJSON

func (pr ProxyResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ProxyResource.

type Reseller

type Reseller struct {
	// ResellerID - READ-ONLY; Reseller id.
	ResellerID *string `json:"resellerId,omitempty"`
	// ResellerDescription - READ-ONLY; Reseller Description.
	ResellerDescription *string `json:"resellerDescription,omitempty"`
}

Reseller reseller details

func (Reseller) MarshalJSON

func (r Reseller) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Reseller.

type ReservationDetail

type ReservationDetail struct {
	*ReservationDetailProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ReservationDetail reservation detail resource.

func (ReservationDetail) MarshalJSON

func (rd ReservationDetail) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationDetail.

func (*ReservationDetail) UnmarshalJSON

func (rd *ReservationDetail) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ReservationDetail struct.

type ReservationDetailProperties

type ReservationDetailProperties struct {
	// ReservationOrderID - READ-ONLY; The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
	ReservationOrderID *string `json:"reservationOrderId,omitempty"`
	// InstanceFlexibilityRatio - READ-ONLY; The instance Flexibility Ratio.
	InstanceFlexibilityRatio *string `json:"instanceFlexibilityRatio,omitempty"`
	// InstanceFlexibilityGroup - READ-ONLY; The instance Flexibility Group.
	InstanceFlexibilityGroup *string `json:"instanceFlexibilityGroup,omitempty"`
	// ReservationID - READ-ONLY; The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.
	ReservationID *string `json:"reservationId,omitempty"`
	// SkuName - READ-ONLY; This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
	SkuName *string `json:"skuName,omitempty"`
	// ReservedHours - READ-ONLY; This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days.
	ReservedHours *decimal.Decimal `json:"reservedHours,omitempty"`
	// UsageDate - READ-ONLY; The date on which consumption occurred.
	UsageDate *date.Time `json:"usageDate,omitempty"`
	// UsedHours - READ-ONLY; This is the total hours used by the instance.
	UsedHours *decimal.Decimal `json:"usedHours,omitempty"`
	// InstanceID - READ-ONLY; This identifier is the name of the resource or the fully qualified Resource ID.
	InstanceID *string `json:"instanceId,omitempty"`
	// TotalReservedQuantity - READ-ONLY; This is the total count of instances that are reserved for the reservationId.
	TotalReservedQuantity *decimal.Decimal `json:"totalReservedQuantity,omitempty"`
	// Kind - READ-ONLY; The reservation kind.
	Kind *string `json:"kind,omitempty"`
}

ReservationDetailProperties the properties of the reservation detail.

func (ReservationDetailProperties) MarshalJSON

func (rdp ReservationDetailProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationDetailProperties.

type ReservationDetailsListResult

type ReservationDetailsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of reservation details.
	Value *[]ReservationDetail `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ReservationDetailsListResult result of listing reservation details.

func (ReservationDetailsListResult) IsEmpty

func (rdlr ReservationDetailsListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (ReservationDetailsListResult) MarshalJSON

func (rdlr ReservationDetailsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationDetailsListResult.

type ReservationDetailsListResultIterator

type ReservationDetailsListResultIterator struct {
	// contains filtered or unexported fields
}

ReservationDetailsListResultIterator provides access to a complete listing of ReservationDetail values.

func NewReservationDetailsListResultIterator

func NewReservationDetailsListResultIterator(page ReservationDetailsListResultPage) ReservationDetailsListResultIterator

Creates a new instance of the ReservationDetailsListResultIterator type.

func (*ReservationDetailsListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationDetailsListResultIterator) NextWithContext

func (iter *ReservationDetailsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ReservationDetailsListResultIterator) NotDone

NotDone returns true if the enumeration should be started or is not yet complete.

func (ReservationDetailsListResultIterator) Response

Response returns the raw server response from the last page request.

func (ReservationDetailsListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ReservationDetailsListResultPage

type ReservationDetailsListResultPage struct {
	// contains filtered or unexported fields
}

ReservationDetailsListResultPage contains a page of ReservationDetail values.

func NewReservationDetailsListResultPage

Creates a new instance of the ReservationDetailsListResultPage type.

func (*ReservationDetailsListResultPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationDetailsListResultPage) NextWithContext

func (page *ReservationDetailsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ReservationDetailsListResultPage) NotDone

func (page ReservationDetailsListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ReservationDetailsListResultPage) Response

Response returns the raw server response from the last page request.

func (ReservationDetailsListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type ReservationRecommendation

type ReservationRecommendation struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
	// Location - READ-ONLY; Resource location
	Location *string `json:"location,omitempty"`
	// Sku - READ-ONLY; Resource sku
	Sku *string `json:"sku,omitempty"`
	// Kind - Possible values include: 'KindBasicReservationRecommendationKindReservationRecommendation', 'KindBasicReservationRecommendationKindLegacy', 'KindBasicReservationRecommendationKindModern'
	Kind KindBasicReservationRecommendation `json:"kind,omitempty"`
}

ReservationRecommendation a reservation recommendation resource.

func (ReservationRecommendation) AsBasicReservationRecommendation

func (rr ReservationRecommendation) AsBasicReservationRecommendation() (BasicReservationRecommendation, bool)

AsBasicReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.

func (ReservationRecommendation) AsLegacyReservationRecommendation

func (rr ReservationRecommendation) AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)

AsLegacyReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.

func (ReservationRecommendation) AsModernReservationRecommendation

func (rr ReservationRecommendation) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)

AsModernReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.

func (ReservationRecommendation) AsReservationRecommendation

func (rr ReservationRecommendation) AsReservationRecommendation() (*ReservationRecommendation, bool)

AsReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.

func (ReservationRecommendation) MarshalJSON

func (rr ReservationRecommendation) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationRecommendation.

type ReservationRecommendationDetailsCalculatedSavingsProperties

type ReservationRecommendationDetailsCalculatedSavingsProperties struct {
	// OnDemandCost - READ-ONLY; The cost without reservation.
	OnDemandCost *float64 `json:"onDemandCost,omitempty"`
	// OverageCost - READ-ONLY; The difference between total reservation cost and reservation cost.
	OverageCost *float64 `json:"overageCost,omitempty"`
	// Quantity - READ-ONLY; The quantity for calculated savings.
	Quantity *float64 `json:"quantity,omitempty"`
	// ReservationCost - READ-ONLY; The exact cost of the estimated usage using reservation.
	ReservationCost *float64 `json:"reservationCost,omitempty"`
	// TotalReservationCost - READ-ONLY; The cost of the suggested quantity.
	TotalReservationCost *float64 `json:"totalReservationCost,omitempty"`
	// ReservedUnitCount - The number of reserved units used to calculate savings. Always 1 for virtual machines.
	ReservedUnitCount *float64 `json:"reservedUnitCount,omitempty"`
	// Savings - READ-ONLY; The amount saved by purchasing the recommended quantity of reservation.
	Savings *float64 `json:"savings,omitempty"`
}

ReservationRecommendationDetailsCalculatedSavingsProperties details of estimated savings.

func (ReservationRecommendationDetailsCalculatedSavingsProperties) MarshalJSON

MarshalJSON is the custom marshaler for ReservationRecommendationDetailsCalculatedSavingsProperties.

type ReservationRecommendationDetailsClient

type ReservationRecommendationDetailsClient struct {
	BaseClient
}

ReservationRecommendationDetailsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewReservationRecommendationDetailsClient

func NewReservationRecommendationDetailsClient(subscriptionID string) ReservationRecommendationDetailsClient

NewReservationRecommendationDetailsClient creates an instance of the ReservationRecommendationDetailsClient client.

func NewReservationRecommendationDetailsClientWithBaseURI

func NewReservationRecommendationDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationDetailsClient

NewReservationRecommendationDetailsClientWithBaseURI creates an instance of the ReservationRecommendationDetailsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ReservationRecommendationDetailsClient) Get

func (client ReservationRecommendationDetailsClient) Get(ctx context.Context, billingScope string, scope Scope14, region string, term Term, lookBackPeriod LookBackPeriod, product string) (result ReservationRecommendationDetailsModel, err error)

Get details of a reservation recommendation for what-if analysis of reserved instances. Parameters: billingScope - the scope associated with reservation recommendation details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, /providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope scope - scope of the reservation. region - used to select the region the recommendation should be generated for. term - specify length of reservation recommendation term. lookBackPeriod - filter the time period on which reservation recommendation results are based. product - filter the products for which reservation recommendation results are generated. Examples: Standard_DS1_v2 (for VM), Premium_SSD_Managed_Disks_P30 (for Managed Disks)

func (ReservationRecommendationDetailsClient) GetPreparer

func (client ReservationRecommendationDetailsClient) GetPreparer(ctx context.Context, billingScope string, scope Scope14, region string, term Term, lookBackPeriod LookBackPeriod, product string) (*http.Request, error)

GetPreparer prepares the Get request.

func (ReservationRecommendationDetailsClient) GetResponder

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (ReservationRecommendationDetailsClient) GetSender

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

type ReservationRecommendationDetailsModel

type ReservationRecommendationDetailsModel struct {
	autorest.Response `json:"-"`
	// Location - Resource Location.
	Location *string `json:"location,omitempty"`
	// Sku - Resource sku
	Sku *string `json:"sku,omitempty"`
	// ETag - Resource eTag.
	ETag                                        *string `json:"eTag,omitempty"`
	*ReservationRecommendationDetailsProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ReservationRecommendationDetailsModel reservation recommendation details.

func (ReservationRecommendationDetailsModel) MarshalJSON

func (rrdm ReservationRecommendationDetailsModel) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationRecommendationDetailsModel.

func (*ReservationRecommendationDetailsModel) UnmarshalJSON

func (rrdm *ReservationRecommendationDetailsModel) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ReservationRecommendationDetailsModel struct.

type ReservationRecommendationDetailsProperties

type ReservationRecommendationDetailsProperties struct {
	// Currency - READ-ONLY; An ISO 4217 currency code identifier for the costs and savings
	Currency *string `json:"currency,omitempty"`
	// Resource - READ-ONLY; Resource specific properties.
	Resource *ReservationRecommendationDetailsResourceProperties `json:"resource,omitempty"`
	// ResourceGroup - READ-ONLY; Resource Group.
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// Savings - READ-ONLY; Savings information for the recommendation.
	Savings *ReservationRecommendationDetailsSavingsProperties `json:"savings,omitempty"`
	// Scope - READ-ONLY; Scope of the reservation, ex: Single or Shared.
	Scope *string `json:"scope,omitempty"`
	// Usage - READ-ONLY; Historical usage details used to calculate the estimated savings.
	Usage *ReservationRecommendationDetailsUsageProperties `json:"usage,omitempty"`
}

ReservationRecommendationDetailsProperties the properties of the reservation recommendation.

func (ReservationRecommendationDetailsProperties) MarshalJSON

func (rrdp ReservationRecommendationDetailsProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationRecommendationDetailsProperties.

type ReservationRecommendationDetailsResourceProperties

type ReservationRecommendationDetailsResourceProperties struct {
	// AppliedScopes - READ-ONLY; List of subscriptions for which the reservation is applied.
	AppliedScopes *[]string `json:"appliedScopes,omitempty"`
	// OnDemandRate - READ-ONLY; On demand rate of the resource.
	OnDemandRate *float64 `json:"onDemandRate,omitempty"`
	// Product - READ-ONLY; Azure product ex: Standard_E8s_v3 etc.
	Product *string `json:"product,omitempty"`
	// Region - READ-ONLY; Azure resource region ex:EastUS, WestUS etc.
	Region *string `json:"region,omitempty"`
	// ReservationRate - READ-ONLY; Reservation rate of the resource.
	ReservationRate *float64 `json:"reservationRate,omitempty"`
	// ResourceType - READ-ONLY; The azure resource type.
	ResourceType *string `json:"resourceType,omitempty"`
}

ReservationRecommendationDetailsResourceProperties details of the resource.

func (ReservationRecommendationDetailsResourceProperties) MarshalJSON

MarshalJSON is the custom marshaler for ReservationRecommendationDetailsResourceProperties.

type ReservationRecommendationDetailsSavingsProperties

type ReservationRecommendationDetailsSavingsProperties struct {
	// CalculatedSavings - List of calculated savings.
	CalculatedSavings *[]ReservationRecommendationDetailsCalculatedSavingsProperties `json:"calculatedSavings,omitempty"`
	// LookBackPeriod - READ-ONLY; Number of days of usage to look back used for computing the recommendation.
	LookBackPeriod *int32 `json:"lookBackPeriod,omitempty"`
	// RecommendedQuantity - READ-ONLY; Number of recommended units of the resource.
	RecommendedQuantity *float64 `json:"recommendedQuantity,omitempty"`
	// ReservationOrderTerm - READ-ONLY; Term period of the reservation, ex: P1Y or P3Y.
	ReservationOrderTerm *string `json:"reservationOrderTerm,omitempty"`
	// SavingsType - READ-ONLY; Type of savings, ex: instance.
	SavingsType *string `json:"savingsType,omitempty"`
	// UnitOfMeasure - READ-ONLY; Measurement unit ex: hour etc.
	UnitOfMeasure *string `json:"unitOfMeasure,omitempty"`
}

ReservationRecommendationDetailsSavingsProperties details of the estimated savings.

func (ReservationRecommendationDetailsSavingsProperties) MarshalJSON

MarshalJSON is the custom marshaler for ReservationRecommendationDetailsSavingsProperties.

type ReservationRecommendationDetailsUsageProperties

type ReservationRecommendationDetailsUsageProperties struct {
	// FirstConsumptionDate - READ-ONLY; The first usage date used for looking back for computing the recommendation.
	FirstConsumptionDate *string `json:"firstConsumptionDate,omitempty"`
	// LastConsumptionDate - READ-ONLY; The last usage date used for looking back for computing the recommendation.
	LastConsumptionDate *string `json:"lastConsumptionDate,omitempty"`
	// LookBackUnitType - READ-ONLY; What the usage data values represent ex: virtual machine instance.
	LookBackUnitType *string `json:"lookBackUnitType,omitempty"`
	// UsageData - READ-ONLY; The breakdown of historical resource usage.  The values are in the order of usage between the firstConsumptionDate and the lastConsumptionDate.
	UsageData *[]float64 `json:"usageData,omitempty"`
	// UsageGrain - READ-ONLY; The grain of the values represented in the usage data ex: hourly.
	UsageGrain *string `json:"usageGrain,omitempty"`
}

ReservationRecommendationDetailsUsageProperties details about historical usage data that has been used for computing the recommendation.

func (ReservationRecommendationDetailsUsageProperties) MarshalJSON

MarshalJSON is the custom marshaler for ReservationRecommendationDetailsUsageProperties.

type ReservationRecommendationsClient

type ReservationRecommendationsClient struct {
	BaseClient
}

ReservationRecommendationsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewReservationRecommendationsClient

func NewReservationRecommendationsClient(subscriptionID string) ReservationRecommendationsClient

NewReservationRecommendationsClient creates an instance of the ReservationRecommendationsClient client.

func NewReservationRecommendationsClientWithBaseURI

func NewReservationRecommendationsClientWithBaseURI(baseURI string, subscriptionID string) ReservationRecommendationsClient

NewReservationRecommendationsClientWithBaseURI creates an instance of the ReservationRecommendationsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ReservationRecommendationsClient) List

List list of recommendations for purchasing reserved instances. Parameters: scope - the scope associated with reservation recommendations operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resource group scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope filter - may be used to filter reservationRecommendations by: properties/scope with allowed values ['Single', 'Shared'] and default value 'Single'; properties/resourceType with allowed values ['VirtualMachines', 'SQLDatabases', 'PostgreSQL', 'ManagedDisk', 'MySQL', 'RedHat', 'MariaDB', 'RedisCache', 'CosmosDB', 'SqlDataWarehouse', 'SUSELinux', 'AppService', 'BlockBlob', 'AzureDataExplorer', 'VMwareCloudSimple'] and default value 'VirtualMachines'; and properties/lookBackPeriod with allowed values ['Last7Days', 'Last30Days', 'Last60Days'] and default value 'Last7Days'.

func (ReservationRecommendationsClient) ListComplete

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationRecommendationsClient) ListPreparer

func (client ReservationRecommendationsClient) ListPreparer(ctx context.Context, scope string, filter string) (*http.Request, error)

ListPreparer prepares the List request.

func (ReservationRecommendationsClient) ListResponder

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ReservationRecommendationsClient) ListSender

func (client ReservationRecommendationsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ReservationRecommendationsListResult

type ReservationRecommendationsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of reservation recommendations.
	Value *[]BasicReservationRecommendation `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
	// PreviousLink - READ-ONLY; The link (url) to the previous page of results.
	PreviousLink *string `json:"previousLink,omitempty"`
	// TotalCost - READ-ONLY; The total amount of cost.
	TotalCost *string `json:"totalCost,omitempty"`
}

ReservationRecommendationsListResult result of listing reservation recommendations.

func (ReservationRecommendationsListResult) IsEmpty

IsEmpty returns true if the ListResult contains no values.

func (ReservationRecommendationsListResult) MarshalJSON

func (rrlr ReservationRecommendationsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationRecommendationsListResult.

func (*ReservationRecommendationsListResult) UnmarshalJSON

func (rrlr *ReservationRecommendationsListResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ReservationRecommendationsListResult struct.

type ReservationRecommendationsListResultIterator

type ReservationRecommendationsListResultIterator struct {
	// contains filtered or unexported fields
}

ReservationRecommendationsListResultIterator provides access to a complete listing of ReservationRecommendation values.

func NewReservationRecommendationsListResultIterator

func NewReservationRecommendationsListResultIterator(page ReservationRecommendationsListResultPage) ReservationRecommendationsListResultIterator

Creates a new instance of the ReservationRecommendationsListResultIterator type.

func (*ReservationRecommendationsListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationRecommendationsListResultIterator) NextWithContext

func (iter *ReservationRecommendationsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ReservationRecommendationsListResultIterator) NotDone

NotDone returns true if the enumeration should be started or is not yet complete.

func (ReservationRecommendationsListResultIterator) Response

Response returns the raw server response from the last page request.

func (ReservationRecommendationsListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ReservationRecommendationsListResultPage

type ReservationRecommendationsListResultPage struct {
	// contains filtered or unexported fields
}

ReservationRecommendationsListResultPage contains a page of BasicReservationRecommendation values.

func NewReservationRecommendationsListResultPage

Creates a new instance of the ReservationRecommendationsListResultPage type.

func (*ReservationRecommendationsListResultPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationRecommendationsListResultPage) NextWithContext

func (page *ReservationRecommendationsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ReservationRecommendationsListResultPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ReservationRecommendationsListResultPage) Response

Response returns the raw server response from the last page request.

func (ReservationRecommendationsListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type ReservationSummariesListResult

type ReservationSummariesListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of reservation summaries.
	Value *[]ReservationSummary `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ReservationSummariesListResult result of listing reservation summaries.

func (ReservationSummariesListResult) IsEmpty

func (rslr ReservationSummariesListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (ReservationSummariesListResult) MarshalJSON

func (rslr ReservationSummariesListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationSummariesListResult.

type ReservationSummariesListResultIterator

type ReservationSummariesListResultIterator struct {
	// contains filtered or unexported fields
}

ReservationSummariesListResultIterator provides access to a complete listing of ReservationSummary values.

func NewReservationSummariesListResultIterator

func NewReservationSummariesListResultIterator(page ReservationSummariesListResultPage) ReservationSummariesListResultIterator

Creates a new instance of the ReservationSummariesListResultIterator type.

func (*ReservationSummariesListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationSummariesListResultIterator) NextWithContext

func (iter *ReservationSummariesListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ReservationSummariesListResultIterator) NotDone

NotDone returns true if the enumeration should be started or is not yet complete.

func (ReservationSummariesListResultIterator) Response

Response returns the raw server response from the last page request.

func (ReservationSummariesListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ReservationSummariesListResultPage

type ReservationSummariesListResultPage struct {
	// contains filtered or unexported fields
}

ReservationSummariesListResultPage contains a page of ReservationSummary values.

func NewReservationSummariesListResultPage

Creates a new instance of the ReservationSummariesListResultPage type.

func (*ReservationSummariesListResultPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationSummariesListResultPage) NextWithContext

func (page *ReservationSummariesListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ReservationSummariesListResultPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ReservationSummariesListResultPage) Response

Response returns the raw server response from the last page request.

func (ReservationSummariesListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type ReservationSummary

type ReservationSummary struct {
	*ReservationSummaryProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

ReservationSummary reservation summary resource.

func (ReservationSummary) MarshalJSON

func (rs ReservationSummary) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationSummary.

func (*ReservationSummary) UnmarshalJSON

func (rs *ReservationSummary) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ReservationSummary struct.

type ReservationSummaryProperties

type ReservationSummaryProperties struct {
	// ReservationOrderID - READ-ONLY; The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
	ReservationOrderID *string `json:"reservationOrderId,omitempty"`
	// ReservationID - READ-ONLY; The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.
	ReservationID *string `json:"reservationId,omitempty"`
	// SkuName - READ-ONLY; This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
	SkuName *string `json:"skuName,omitempty"`
	// ReservedHours - READ-ONLY; This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days
	ReservedHours *decimal.Decimal `json:"reservedHours,omitempty"`
	// UsageDate - READ-ONLY; Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.
	UsageDate *date.Time `json:"usageDate,omitempty"`
	// UsedHours - READ-ONLY; Total used hours by the reservation
	UsedHours *decimal.Decimal `json:"usedHours,omitempty"`
	// MinUtilizationPercentage - READ-ONLY; This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day
	MinUtilizationPercentage *decimal.Decimal `json:"minUtilizationPercentage,omitempty"`
	// AvgUtilizationPercentage - READ-ONLY; This is average utilization for the entire time range. (day or month depending on the grain)
	AvgUtilizationPercentage *decimal.Decimal `json:"avgUtilizationPercentage,omitempty"`
	// MaxUtilizationPercentage - READ-ONLY; This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.
	MaxUtilizationPercentage *decimal.Decimal `json:"maxUtilizationPercentage,omitempty"`
	// Kind - READ-ONLY; The reservation kind.
	Kind *string `json:"kind,omitempty"`
	// PurchasedQuantity - READ-ONLY; This is the purchased quantity for the reservationId.
	PurchasedQuantity *decimal.Decimal `json:"purchasedQuantity,omitempty"`
	// RemainingQuantity - READ-ONLY; This is the remaining quantity for the reservationId.
	RemainingQuantity *decimal.Decimal `json:"remainingQuantity,omitempty"`
	// TotalReservedQuantity - READ-ONLY; This is the total count of instances that are reserved for the reservationId.
	TotalReservedQuantity *decimal.Decimal `json:"totalReservedQuantity,omitempty"`
	// UsedQuantity - READ-ONLY; This is the used quantity for the reservationId.
	UsedQuantity *decimal.Decimal `json:"usedQuantity,omitempty"`
	// UtilizedPercentage - READ-ONLY; This is the utilized percentage for the reservation Id.
	UtilizedPercentage *decimal.Decimal `json:"utilizedPercentage,omitempty"`
}

ReservationSummaryProperties the properties of the reservation summary.

func (ReservationSummaryProperties) MarshalJSON

func (rsp ReservationSummaryProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationSummaryProperties.

type ReservationTransaction

type ReservationTransaction struct {
	*LegacyReservationTransactionProperties `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags *[]string `json:"tags,omitempty"`
}

ReservationTransaction reservation transaction resource.

func (ReservationTransaction) MarshalJSON

func (rt ReservationTransaction) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationTransaction.

func (*ReservationTransaction) UnmarshalJSON

func (rt *ReservationTransaction) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ReservationTransaction struct.

type ReservationTransactionResource

type ReservationTransactionResource struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags *[]string `json:"tags,omitempty"`
}

ReservationTransactionResource the Resource model definition.

func (ReservationTransactionResource) MarshalJSON

func (rtr ReservationTransactionResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationTransactionResource.

type ReservationTransactionsClient

type ReservationTransactionsClient struct {
	BaseClient
}

ReservationTransactionsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewReservationTransactionsClient

func NewReservationTransactionsClient(subscriptionID string) ReservationTransactionsClient

NewReservationTransactionsClient creates an instance of the ReservationTransactionsClient client.

func NewReservationTransactionsClientWithBaseURI

func NewReservationTransactionsClientWithBaseURI(baseURI string, subscriptionID string) ReservationTransactionsClient

NewReservationTransactionsClientWithBaseURI creates an instance of the ReservationTransactionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ReservationTransactionsClient) List

func (client ReservationTransactionsClient) List(ctx context.Context, billingAccountID string, filter string) (result ReservationTransactionsListResultPage, err error)

List list of transactions for reserved instances on billing account scope Parameters: billingAccountID - billingAccount ID filter - filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge'

func (ReservationTransactionsClient) ListByBillingProfile

func (client ReservationTransactionsClient) ListByBillingProfile(ctx context.Context, billingAccountID string, billingProfileID string, filter string) (result ModernReservationTransactionsListResultPage, err error)

ListByBillingProfile list of transactions for reserved instances on billing account scope Parameters: billingAccountID - billingAccount ID billingProfileID - azure Billing Profile ID. filter - filter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge'

func (ReservationTransactionsClient) ListByBillingProfileComplete

func (client ReservationTransactionsClient) ListByBillingProfileComplete(ctx context.Context, billingAccountID string, billingProfileID string, filter string) (result ModernReservationTransactionsListResultIterator, err error)

ListByBillingProfileComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationTransactionsClient) ListByBillingProfilePreparer

func (client ReservationTransactionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountID string, billingProfileID string, filter string) (*http.Request, error)

ListByBillingProfilePreparer prepares the ListByBillingProfile request.

func (ReservationTransactionsClient) ListByBillingProfileResponder

func (client ReservationTransactionsClient) ListByBillingProfileResponder(resp *http.Response) (result ModernReservationTransactionsListResult, err error)

ListByBillingProfileResponder handles the response to the ListByBillingProfile request. The method always closes the http.Response Body.

func (ReservationTransactionsClient) ListByBillingProfileSender

func (client ReservationTransactionsClient) ListByBillingProfileSender(req *http.Request) (*http.Response, error)

ListByBillingProfileSender sends the ListByBillingProfile request. The method will close the http.Response Body if it receives an error.

func (ReservationTransactionsClient) ListComplete

func (client ReservationTransactionsClient) ListComplete(ctx context.Context, billingAccountID string, filter string) (result ReservationTransactionsListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationTransactionsClient) ListPreparer

func (client ReservationTransactionsClient) ListPreparer(ctx context.Context, billingAccountID string, filter string) (*http.Request, error)

ListPreparer prepares the List request.

func (ReservationTransactionsClient) ListResponder

func (client ReservationTransactionsClient) ListResponder(resp *http.Response) (result ReservationTransactionsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ReservationTransactionsClient) ListSender

func (client ReservationTransactionsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ReservationTransactionsListResult

type ReservationTransactionsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of reservation recommendations.
	Value *[]ReservationTransaction `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

ReservationTransactionsListResult result of listing reservation recommendations.

func (ReservationTransactionsListResult) IsEmpty

func (rtlr ReservationTransactionsListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (ReservationTransactionsListResult) MarshalJSON

func (rtlr ReservationTransactionsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ReservationTransactionsListResult.

type ReservationTransactionsListResultIterator

type ReservationTransactionsListResultIterator struct {
	// contains filtered or unexported fields
}

ReservationTransactionsListResultIterator provides access to a complete listing of ReservationTransaction values.

func NewReservationTransactionsListResultIterator

func NewReservationTransactionsListResultIterator(page ReservationTransactionsListResultPage) ReservationTransactionsListResultIterator

Creates a new instance of the ReservationTransactionsListResultIterator type.

func (*ReservationTransactionsListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationTransactionsListResultIterator) NextWithContext

func (iter *ReservationTransactionsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (ReservationTransactionsListResultIterator) NotDone

NotDone returns true if the enumeration should be started or is not yet complete.

func (ReservationTransactionsListResultIterator) Response

Response returns the raw server response from the last page request.

func (ReservationTransactionsListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type ReservationTransactionsListResultPage

type ReservationTransactionsListResultPage struct {
	// contains filtered or unexported fields
}

ReservationTransactionsListResultPage contains a page of ReservationTransaction values.

func NewReservationTransactionsListResultPage

Creates a new instance of the ReservationTransactionsListResultPage type.

func (*ReservationTransactionsListResultPage) Next

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*ReservationTransactionsListResultPage) NextWithContext

func (page *ReservationTransactionsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (ReservationTransactionsListResultPage) NotDone

NotDone returns true if the page enumeration should be started or is not yet complete.

func (ReservationTransactionsListResultPage) Response

Response returns the raw server response from the last page request.

func (ReservationTransactionsListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

type ReservationsDetailsClient

type ReservationsDetailsClient struct {
	BaseClient
}

ReservationsDetailsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewReservationsDetailsClient

func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClient

NewReservationsDetailsClient creates an instance of the ReservationsDetailsClient client.

func NewReservationsDetailsClientWithBaseURI

func NewReservationsDetailsClientWithBaseURI(baseURI string, subscriptionID string) ReservationsDetailsClient

NewReservationsDetailsClientWithBaseURI creates an instance of the ReservationsDetailsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ReservationsDetailsClient) List

func (client ReservationsDetailsClient) List(ctx context.Context, scope string, startDate string, endDate string, filter string, reservationID string, reservationOrderID string) (result ReservationDetailsListResultPage, err error)

List lists the reservations details for the defined scope and provided date range. Parameters: scope - the scope associated with reservations details operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope (modern). startDate - start date. Only applicable when querying with billing profile endDate - end date. Only applicable when querying with billing profile filter - filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile reservationID - reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation reservationOrderID - reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order

func (ReservationsDetailsClient) ListByReservationOrder

func (client ReservationsDetailsClient) ListByReservationOrder(ctx context.Context, reservationOrderID string, filter string) (result ReservationDetailsListResultPage, err error)

ListByReservationOrder lists the reservations details for provided date range. Parameters: reservationOrderID - order Id of the reservation filter - filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'

func (ReservationsDetailsClient) ListByReservationOrderAndReservation

func (client ReservationsDetailsClient) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result ReservationDetailsListResultPage, err error)

ListByReservationOrderAndReservation lists the reservations details for provided date range. Parameters: reservationOrderID - order Id of the reservation reservationID - id of the reservation filter - filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'

func (ReservationsDetailsClient) ListByReservationOrderAndReservationComplete

func (client ReservationsDetailsClient) ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, filter string) (result ReservationDetailsListResultIterator, err error)

ListByReservationOrderAndReservationComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationsDetailsClient) ListByReservationOrderAndReservationPreparer

func (client ReservationsDetailsClient) ListByReservationOrderAndReservationPreparer(ctx context.Context, reservationOrderID string, reservationID string, filter string) (*http.Request, error)

ListByReservationOrderAndReservationPreparer prepares the ListByReservationOrderAndReservation request.

func (ReservationsDetailsClient) ListByReservationOrderAndReservationResponder

func (client ReservationsDetailsClient) ListByReservationOrderAndReservationResponder(resp *http.Response) (result ReservationDetailsListResult, err error)

ListByReservationOrderAndReservationResponder handles the response to the ListByReservationOrderAndReservation request. The method always closes the http.Response Body.

func (ReservationsDetailsClient) ListByReservationOrderAndReservationSender

func (client ReservationsDetailsClient) ListByReservationOrderAndReservationSender(req *http.Request) (*http.Response, error)

ListByReservationOrderAndReservationSender sends the ListByReservationOrderAndReservation request. The method will close the http.Response Body if it receives an error.

func (ReservationsDetailsClient) ListByReservationOrderComplete

func (client ReservationsDetailsClient) ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, filter string) (result ReservationDetailsListResultIterator, err error)

ListByReservationOrderComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationsDetailsClient) ListByReservationOrderPreparer

func (client ReservationsDetailsClient) ListByReservationOrderPreparer(ctx context.Context, reservationOrderID string, filter string) (*http.Request, error)

ListByReservationOrderPreparer prepares the ListByReservationOrder request.

func (ReservationsDetailsClient) ListByReservationOrderResponder

func (client ReservationsDetailsClient) ListByReservationOrderResponder(resp *http.Response) (result ReservationDetailsListResult, err error)

ListByReservationOrderResponder handles the response to the ListByReservationOrder request. The method always closes the http.Response Body.

func (ReservationsDetailsClient) ListByReservationOrderSender

func (client ReservationsDetailsClient) ListByReservationOrderSender(req *http.Request) (*http.Response, error)

ListByReservationOrderSender sends the ListByReservationOrder request. The method will close the http.Response Body if it receives an error.

func (ReservationsDetailsClient) ListComplete

func (client ReservationsDetailsClient) ListComplete(ctx context.Context, scope string, startDate string, endDate string, filter string, reservationID string, reservationOrderID string) (result ReservationDetailsListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationsDetailsClient) ListPreparer

func (client ReservationsDetailsClient) ListPreparer(ctx context.Context, scope string, startDate string, endDate string, filter string, reservationID string, reservationOrderID string) (*http.Request, error)

ListPreparer prepares the List request.

func (ReservationsDetailsClient) ListResponder

func (client ReservationsDetailsClient) ListResponder(resp *http.Response) (result ReservationDetailsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ReservationsDetailsClient) ListSender

func (client ReservationsDetailsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ReservationsSummariesClient

type ReservationsSummariesClient struct {
	BaseClient
}

ReservationsSummariesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewReservationsSummariesClient

func NewReservationsSummariesClient(subscriptionID string) ReservationsSummariesClient

NewReservationsSummariesClient creates an instance of the ReservationsSummariesClient client.

func NewReservationsSummariesClientWithBaseURI

func NewReservationsSummariesClientWithBaseURI(baseURI string, subscriptionID string) ReservationsSummariesClient

NewReservationsSummariesClientWithBaseURI creates an instance of the ReservationsSummariesClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (ReservationsSummariesClient) List

func (client ReservationsSummariesClient) List(ctx context.Context, scope string, grain Datagrain, startDate string, endDate string, filter string, reservationID string, reservationOrderID string) (result ReservationSummariesListResultPage, err error)

List lists the reservations summaries for the defined scope daily or monthly grain. Parameters: scope - the scope associated with reservations summaries operations. This includes '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for BillingProfile scope (modern). grain - can be daily or monthly startDate - start date. Required only when querying with billing profile endDate - end date. Required only when querying with billing profile filter - the properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not required when querying with billing profile reservationID - reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation reservationOrderID - reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order

func (ReservationsSummariesClient) ListByReservationOrder

func (client ReservationsSummariesClient) ListByReservationOrder(ctx context.Context, reservationOrderID string, grain Datagrain, filter string) (result ReservationSummariesListResultPage, err error)

ListByReservationOrder lists the reservations summaries for daily or monthly grain. Parameters: reservationOrderID - order Id of the reservation grain - can be daily or monthly filter - required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'

func (ReservationsSummariesClient) ListByReservationOrderAndReservation

func (client ReservationsSummariesClient) ListByReservationOrderAndReservation(ctx context.Context, reservationOrderID string, reservationID string, grain Datagrain, filter string) (result ReservationSummariesListResultPage, err error)

ListByReservationOrderAndReservation lists the reservations summaries for daily or monthly grain. Parameters: reservationOrderID - order Id of the reservation reservationID - id of the reservation grain - can be daily or monthly filter - required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'

func (ReservationsSummariesClient) ListByReservationOrderAndReservationComplete

func (client ReservationsSummariesClient) ListByReservationOrderAndReservationComplete(ctx context.Context, reservationOrderID string, reservationID string, grain Datagrain, filter string) (result ReservationSummariesListResultIterator, err error)

ListByReservationOrderAndReservationComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationsSummariesClient) ListByReservationOrderAndReservationPreparer

func (client ReservationsSummariesClient) ListByReservationOrderAndReservationPreparer(ctx context.Context, reservationOrderID string, reservationID string, grain Datagrain, filter string) (*http.Request, error)

ListByReservationOrderAndReservationPreparer prepares the ListByReservationOrderAndReservation request.

func (ReservationsSummariesClient) ListByReservationOrderAndReservationResponder

func (client ReservationsSummariesClient) ListByReservationOrderAndReservationResponder(resp *http.Response) (result ReservationSummariesListResult, err error)

ListByReservationOrderAndReservationResponder handles the response to the ListByReservationOrderAndReservation request. The method always closes the http.Response Body.

func (ReservationsSummariesClient) ListByReservationOrderAndReservationSender

func (client ReservationsSummariesClient) ListByReservationOrderAndReservationSender(req *http.Request) (*http.Response, error)

ListByReservationOrderAndReservationSender sends the ListByReservationOrderAndReservation request. The method will close the http.Response Body if it receives an error.

func (ReservationsSummariesClient) ListByReservationOrderComplete

func (client ReservationsSummariesClient) ListByReservationOrderComplete(ctx context.Context, reservationOrderID string, grain Datagrain, filter string) (result ReservationSummariesListResultIterator, err error)

ListByReservationOrderComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationsSummariesClient) ListByReservationOrderPreparer

func (client ReservationsSummariesClient) ListByReservationOrderPreparer(ctx context.Context, reservationOrderID string, grain Datagrain, filter string) (*http.Request, error)

ListByReservationOrderPreparer prepares the ListByReservationOrder request.

func (ReservationsSummariesClient) ListByReservationOrderResponder

func (client ReservationsSummariesClient) ListByReservationOrderResponder(resp *http.Response) (result ReservationSummariesListResult, err error)

ListByReservationOrderResponder handles the response to the ListByReservationOrder request. The method always closes the http.Response Body.

func (ReservationsSummariesClient) ListByReservationOrderSender

func (client ReservationsSummariesClient) ListByReservationOrderSender(req *http.Request) (*http.Response, error)

ListByReservationOrderSender sends the ListByReservationOrder request. The method will close the http.Response Body if it receives an error.

func (ReservationsSummariesClient) ListComplete

func (client ReservationsSummariesClient) ListComplete(ctx context.Context, scope string, grain Datagrain, startDate string, endDate string, filter string, reservationID string, reservationOrderID string) (result ReservationSummariesListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (ReservationsSummariesClient) ListPreparer

func (client ReservationsSummariesClient) ListPreparer(ctx context.Context, scope string, grain Datagrain, startDate string, endDate string, filter string, reservationID string, reservationOrderID string) (*http.Request, error)

ListPreparer prepares the List request.

func (ReservationsSummariesClient) ListResponder

func (client ReservationsSummariesClient) ListResponder(resp *http.Response) (result ReservationSummariesListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (ReservationsSummariesClient) ListSender

func (client ReservationsSummariesClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Resource

type Resource struct {
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

Resource the Resource model definition.

func (Resource) MarshalJSON

func (r Resource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Resource.

type ResourceAttributes

type ResourceAttributes struct {
	// Location - READ-ONLY; Resource location
	Location *string `json:"location,omitempty"`
	// Sku - READ-ONLY; Resource sku
	Sku *string `json:"sku,omitempty"`
}

ResourceAttributes the Resource model definition.

func (ResourceAttributes) MarshalJSON

func (ra ResourceAttributes) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ResourceAttributes.

type Scope12

type Scope12 string

Scope12 enumerates the values for scope 12.

const (
	// Scope12Shared ...
	Scope12Shared Scope12 = "Shared"
	// Scope12Single ...
	Scope12Single Scope12 = "Single"
)

func PossibleScope12Values

func PossibleScope12Values() []Scope12

PossibleScope12Values returns an array of possible values for the Scope12 const type.

type Scope14

type Scope14 string

Scope14 enumerates the values for scope 14.

const (
	// Scope14Shared ...
	Scope14Shared Scope14 = "Shared"
	// Scope14Single ...
	Scope14Single Scope14 = "Single"
)

func PossibleScope14Values

func PossibleScope14Values() []Scope14

PossibleScope14Values returns an array of possible values for the Scope14 const type.

type SkuProperty

type SkuProperty struct {
	// Name - READ-ONLY; The name of sku property.
	Name *string `json:"name,omitempty"`
	// Value - READ-ONLY; The value of sku property.
	Value *string `json:"value,omitempty"`
}

SkuProperty the Sku property

func (SkuProperty) MarshalJSON

func (sp SkuProperty) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SkuProperty.

type Tag

type Tag struct {
	// Key - Tag key.
	Key *string `json:"key,omitempty"`
	// Value - Tag values.
	Value *[]string `json:"value,omitempty"`
}

Tag the tag resource.

type TagProperties

type TagProperties struct {
	// Tags - A list of Tag.
	Tags *[]Tag `json:"tags,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
	// PreviousLink - READ-ONLY; The link (url) to the previous page of results.
	PreviousLink *string `json:"previousLink,omitempty"`
}

TagProperties the properties of the tag.

func (TagProperties) MarshalJSON

func (tp TagProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for TagProperties.

type TagsClient

type TagsClient struct {
	BaseClient
}

TagsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewTagsClient

func NewTagsClient(subscriptionID string) TagsClient

NewTagsClient creates an instance of the TagsClient client.

func NewTagsClientWithBaseURI

func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient

NewTagsClientWithBaseURI creates an instance of the TagsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (TagsClient) Get

func (client TagsClient) Get(ctx context.Context, scope string) (result TagsResult, err error)

Get get all available tag keys for the defined scope Parameters: scope - the scope associated with tags operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' for resourceGroup scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope..

func (TagsClient) GetPreparer

func (client TagsClient) GetPreparer(ctx context.Context, scope string) (*http.Request, error)

GetPreparer prepares the Get request.

func (TagsClient) GetResponder

func (client TagsClient) GetResponder(resp *http.Response) (result TagsResult, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (TagsClient) GetSender

func (client TagsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

type TagsResult

type TagsResult struct {
	autorest.Response `json:"-"`
	*TagProperties    `json:"properties,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// ETag - eTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
	ETag *string `json:"eTag,omitempty"`
}

TagsResult a resource listing all tags.

func (TagsResult) MarshalJSON

func (tr TagsResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for TagsResult.

func (*TagsResult) UnmarshalJSON

func (tr *TagsResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for TagsResult struct.

type Term

type Term string

Term enumerates the values for term.

const (
	// TermP1Y 1 year reservation term
	TermP1Y Term = "P1Y"
	// TermP3Y 3 year reservation term
	TermP3Y Term = "P3Y"
)

func PossibleTermValues

func PossibleTermValues() []Term

PossibleTermValues returns an array of possible values for the Term const type.

type ThresholdType

type ThresholdType string

ThresholdType enumerates the values for threshold type.

const (
	// ThresholdTypeActual ...
	ThresholdTypeActual ThresholdType = "Actual"
)

func PossibleThresholdTypeValues

func PossibleThresholdTypeValues() []ThresholdType

PossibleThresholdTypeValues returns an array of possible values for the ThresholdType const type.

type TimeGrainType

type TimeGrainType string

TimeGrainType enumerates the values for time grain type.

const (
	// TimeGrainTypeAnnually ...
	TimeGrainTypeAnnually TimeGrainType = "Annually"
	// TimeGrainTypeBillingAnnual ...
	TimeGrainTypeBillingAnnual TimeGrainType = "BillingAnnual"
	// TimeGrainTypeBillingMonth ...
	TimeGrainTypeBillingMonth TimeGrainType = "BillingMonth"
	// TimeGrainTypeBillingQuarter ...
	TimeGrainTypeBillingQuarter TimeGrainType = "BillingQuarter"
	// TimeGrainTypeMonthly ...
	TimeGrainTypeMonthly TimeGrainType = "Monthly"
	// TimeGrainTypeQuarterly ...
	TimeGrainTypeQuarterly TimeGrainType = "Quarterly"
)

func PossibleTimeGrainTypeValues

func PossibleTimeGrainTypeValues() []TimeGrainType

PossibleTimeGrainTypeValues returns an array of possible values for the TimeGrainType const type.

type UsageDetail

type UsageDetail struct {
	// Kind - Possible values include: 'KindUsageDetail', 'KindLegacy', 'KindModern'
	Kind Kind `json:"kind,omitempty"`
	// ID - READ-ONLY; Resource Id.
	ID *string `json:"id,omitempty"`
	// Name - READ-ONLY; Resource name.
	Name *string `json:"name,omitempty"`
	// Type - READ-ONLY; Resource type.
	Type *string `json:"type,omitempty"`
	// Etag - READ-ONLY; Resource etag.
	Etag *string `json:"etag,omitempty"`
	// Tags - READ-ONLY; Resource tags.
	Tags map[string]*string `json:"tags"`
}

UsageDetail an usage detail resource.

func (UsageDetail) AsBasicUsageDetail

func (ud UsageDetail) AsBasicUsageDetail() (BasicUsageDetail, bool)

AsBasicUsageDetail is the BasicUsageDetail implementation for UsageDetail.

func (UsageDetail) AsLegacyUsageDetail

func (ud UsageDetail) AsLegacyUsageDetail() (*LegacyUsageDetail, bool)

AsLegacyUsageDetail is the BasicUsageDetail implementation for UsageDetail.

func (UsageDetail) AsModernUsageDetail

func (ud UsageDetail) AsModernUsageDetail() (*ModernUsageDetail, bool)

AsModernUsageDetail is the BasicUsageDetail implementation for UsageDetail.

func (UsageDetail) AsUsageDetail

func (ud UsageDetail) AsUsageDetail() (*UsageDetail, bool)

AsUsageDetail is the BasicUsageDetail implementation for UsageDetail.

func (UsageDetail) MarshalJSON

func (ud UsageDetail) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for UsageDetail.

type UsageDetailsClient

type UsageDetailsClient struct {
	BaseClient
}

UsageDetailsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.

func NewUsageDetailsClient

func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient

NewUsageDetailsClient creates an instance of the UsageDetailsClient client.

func NewUsageDetailsClientWithBaseURI

func NewUsageDetailsClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsClient

NewUsageDetailsClientWithBaseURI creates an instance of the UsageDetailsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (UsageDetailsClient) List

func (client UsageDetailsClient) List(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32, metric Metrictype) (result UsageDetailsListResultPage, err error)

List lists the usage details for the defined scope. Usage details are available via this API only for May 1, 2014 or later. For more information on using this API, including how to specify a date range, please see: https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/manage-automation Parameters: scope - the scope associated with usage details operations. This includes '/subscriptions/{subscriptionId}/' for subscription scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope and '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. For subscription, billing account, department, enrollment account and management group, you can also add billing period to the scope using '/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. For e.g. to specify billing period at department scope use '/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}'. Also, Modern Commerce Account scopes are '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for billingAccount scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and 'providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. expand - may be used to expand the properties/additionalInfo or properties/meterDetails within a list of usage details. By default, these fields are not included when listing usage details. filter - may be used to filter usageDetails by properties/resourceGroup, properties/instanceName, properties/resourceId, properties/chargeType, properties/reservationId, properties/publisherType or tags. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). PublisherType Filter accepts two values azure and marketplace and it is currently supported for Web Direct Offer Type skiptoken - skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls. top - may be used to limit the number of results to the most recent N usageDetails. metric - allows to select different type of cost/usage records.

func (UsageDetailsClient) ListComplete

func (client UsageDetailsClient) ListComplete(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32, metric Metrictype) (result UsageDetailsListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (UsageDetailsClient) ListPreparer

func (client UsageDetailsClient) ListPreparer(ctx context.Context, scope string, expand string, filter string, skiptoken string, top *int32, metric Metrictype) (*http.Request, error)

ListPreparer prepares the List request.

func (UsageDetailsClient) ListResponder

func (client UsageDetailsClient) ListResponder(resp *http.Response) (result UsageDetailsListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (UsageDetailsClient) ListSender

func (client UsageDetailsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type UsageDetailsListResult

type UsageDetailsListResult struct {
	autorest.Response `json:"-"`
	// Value - READ-ONLY; The list of usage details.
	Value *[]BasicUsageDetail `json:"value,omitempty"`
	// NextLink - READ-ONLY; The link (url) to the next page of results.
	NextLink *string `json:"nextLink,omitempty"`
}

UsageDetailsListResult result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.

func (UsageDetailsListResult) IsEmpty

func (udlr UsageDetailsListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (UsageDetailsListResult) MarshalJSON

func (udlr UsageDetailsListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for UsageDetailsListResult.

func (*UsageDetailsListResult) UnmarshalJSON

func (udlr *UsageDetailsListResult) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for UsageDetailsListResult struct.

type UsageDetailsListResultIterator

type UsageDetailsListResultIterator struct {
	// contains filtered or unexported fields
}

UsageDetailsListResultIterator provides access to a complete listing of UsageDetail values.

func NewUsageDetailsListResultIterator

func NewUsageDetailsListResultIterator(page UsageDetailsListResultPage) UsageDetailsListResultIterator

Creates a new instance of the UsageDetailsListResultIterator type.

func (*UsageDetailsListResultIterator) Next

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*UsageDetailsListResultIterator) NextWithContext

func (iter *UsageDetailsListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (UsageDetailsListResultIterator) NotDone

func (iter UsageDetailsListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (UsageDetailsListResultIterator) Response

Response returns the raw server response from the last page request.

func (UsageDetailsListResultIterator) Value

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type UsageDetailsListResultPage

type UsageDetailsListResultPage struct {
	// contains filtered or unexported fields
}

UsageDetailsListResultPage contains a page of BasicUsageDetail values.

func NewUsageDetailsListResultPage

Creates a new instance of the UsageDetailsListResultPage type.

func (*UsageDetailsListResultPage) Next

func (page *UsageDetailsListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*UsageDetailsListResultPage) NextWithContext

func (page *UsageDetailsListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (UsageDetailsListResultPage) NotDone

func (page UsageDetailsListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (UsageDetailsListResultPage) Response

Response returns the raw server response from the last page request.

func (UsageDetailsListResultPage) Values

Values returns the slice of values for the current page or nil if there are no values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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