const ( // DefaultBaseURI is the default URI used for the service Consumption DefaultBaseURI = "https://management.azure.com" )
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
AggregatedCostClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type AggregatedCostClient struct { BaseClient }
func NewAggregatedCostClient(subscriptionID string) AggregatedCostClient
NewAggregatedCostClient creates an instance of the AggregatedCostClient client.
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 (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 (client AggregatedCostClient) GetByManagementGroupPreparer(ctx context.Context, managementGroupID string, filter string) (*http.Request, error)
GetByManagementGroupPreparer prepares the GetByManagementGroup request.
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 (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 (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 (client AggregatedCostClient) GetForBillingPeriodByManagementGroupPreparer(ctx context.Context, managementGroupID string, billingPeriodName string) (*http.Request, error)
GetForBillingPeriodByManagementGroupPreparer prepares the GetForBillingPeriodByManagementGroup request.
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 (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.
Amount the amount plus currency .
type Amount struct { // Currency - READ-ONLY; Amount currency. Currency *string `json:"currency,omitempty"` // Value - READ-ONLY; Amount. Value *decimal.Decimal `json:"value,omitempty"` }
func (a Amount) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Amount.
AmountWithExchangeRate reseller details
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"` }
func (awer AmountWithExchangeRate) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for AmountWithExchangeRate.
Balance a balance resource.
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"` }
func (b Balance) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Balance.
func (b *Balance) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Balance struct.
BalanceProperties the properties of the balance.
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"` }
func (bp BalanceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for BalanceProperties.
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"` }
func (bpDi BalancePropertiesAdjustmentDetailsItem) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for BalancePropertiesAdjustmentDetailsItem.
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"` }
func (bpPdi BalancePropertiesNewPurchasesDetailsItem) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for BalancePropertiesNewPurchasesDetailsItem.
BalancesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type BalancesClient struct { BaseClient }
func NewBalancesClient(subscriptionID string) BalancesClient
NewBalancesClient creates an instance of the BalancesClient client.
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 (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 (client BalancesClient) GetByBillingAccountPreparer(ctx context.Context, billingAccountID string) (*http.Request, error)
GetByBillingAccountPreparer prepares the GetByBillingAccount request.
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 (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 (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 (client BalancesClient) GetForBillingPeriodByBillingAccountPreparer(ctx context.Context, billingAccountID string, billingPeriodName string) (*http.Request, error)
GetForBillingPeriodByBillingAccountPreparer prepares the GetForBillingPeriodByBillingAccount request.
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 (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.
BaseClient is the base client for Consumption.
type BaseClient struct { autorest.Client BaseURI string SubscriptionID string }
func New(subscriptionID string) BaseClient
New creates an instance of the BaseClient client.
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).
BasicChargeSummary a charge summary resource.
type BasicChargeSummary interface { AsLegacyChargeSummary() (*LegacyChargeSummary, bool) AsModernChargeSummary() (*ModernChargeSummary, bool) AsChargeSummary() (*ChargeSummary, bool) }
BasicReservationRecommendation a reservation recommendation resource.
type BasicReservationRecommendation interface { AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool) AsReservationRecommendation() (*ReservationRecommendation, bool) }
BasicUsageDetail an usage detail resource.
type BasicUsageDetail interface { AsLegacyUsageDetail() (*LegacyUsageDetail, bool) AsModernUsageDetail() (*ModernUsageDetail, bool) AsUsageDetail() (*UsageDetail, bool) }
BillingFrequency enumerates the values for billing frequency.
type BillingFrequency string
const ( // BillingFrequencyMonth ... BillingFrequencyMonth BillingFrequency = "Month" // BillingFrequencyQuarter ... BillingFrequencyQuarter BillingFrequency = "Quarter" // BillingFrequencyYear ... BillingFrequencyYear BillingFrequency = "Year" )
func PossibleBillingFrequencyValues() []BillingFrequency
PossibleBillingFrequencyValues returns an array of possible values for the BillingFrequency const type.
Bound enumerates the values for bound.
type Bound string
const ( // BoundLower ... BoundLower Bound = "Lower" // BoundUpper ... BoundUpper Bound = "Upper" )
func PossibleBoundValues() []Bound
PossibleBoundValues returns an array of possible values for the Bound const type.
Budget a budget resource.
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"` }
func (b Budget) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Budget.
func (b *Budget) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Budget struct.
BudgetComparisonExpression the comparison expression to be used in the budgets.
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"` }
BudgetFilter may be used to filter budgets by resource group, resource, or meter.
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"` }
BudgetFilterProperties the Dimensions or Tags to filter a budget by.
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"` }
BudgetProperties the properties of the budget.
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"` }
func (bp BudgetProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for BudgetProperties.
BudgetTimePeriod the start and end date for a budget.
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"` }
BudgetsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type BudgetsClient struct { BaseClient }
func NewBudgetsClient(subscriptionID string) BudgetsClient
NewBudgetsClient creates an instance of the BudgetsClient client.
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 (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 (client BudgetsClient) CreateOrUpdatePreparer(ctx context.Context, scope string, budgetName string, parameters Budget) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
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 (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 (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 (client BudgetsClient) DeletePreparer(ctx context.Context, scope string, budgetName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
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 (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 (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 (client BudgetsClient) GetPreparer(ctx context.Context, scope string, budgetName string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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 (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 (client BudgetsClient) ListComplete(ctx context.Context, scope string) (result BudgetsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client BudgetsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
BudgetsListResult result of listing budgets. It contains a list of available budgets in the scope provided.
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"` }
func (blr BudgetsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (blr BudgetsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for BudgetsListResult.
BudgetsListResultIterator provides access to a complete listing of Budget values.
type BudgetsListResultIterator struct {
// contains filtered or unexported fields
}
func NewBudgetsListResultIterator(page BudgetsListResultPage) BudgetsListResultIterator
Creates a new instance of the BudgetsListResultIterator type.
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 (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 (iter BudgetsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter BudgetsListResultIterator) Response() BudgetsListResult
Response returns the raw server response from the last page request.
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.
BudgetsListResultPage contains a page of Budget values.
type BudgetsListResultPage struct {
// contains filtered or unexported fields
}
func NewBudgetsListResultPage(cur BudgetsListResult, getNextPage func(context.Context, BudgetsListResult) (BudgetsListResult, error)) BudgetsListResultPage
Creates a new instance of the BudgetsListResultPage type.
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 (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 (page BudgetsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page BudgetsListResultPage) Response() BudgetsListResult
Response returns the raw server response from the last page request.
func (page BudgetsListResultPage) Values() []Budget
Values returns the slice of values for the current page or nil if there are no values.
ChargeSummary a charge summary resource.
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"` }
func (cs ChargeSummary) AsBasicChargeSummary() (BasicChargeSummary, bool)
AsBasicChargeSummary is the BasicChargeSummary implementation for ChargeSummary.
func (cs ChargeSummary) AsChargeSummary() (*ChargeSummary, bool)
AsChargeSummary is the BasicChargeSummary implementation for ChargeSummary.
func (cs ChargeSummary) AsLegacyChargeSummary() (*LegacyChargeSummary, bool)
AsLegacyChargeSummary is the BasicChargeSummary implementation for ChargeSummary.
func (cs ChargeSummary) AsModernChargeSummary() (*ModernChargeSummary, bool)
AsModernChargeSummary is the BasicChargeSummary implementation for ChargeSummary.
func (cs ChargeSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ChargeSummary.
ChargeType enumerates the values for charge type.
type ChargeType string
const ( // ChargeTypeActual ... ChargeTypeActual ChargeType = "Actual" // ChargeTypeForecast ... ChargeTypeForecast ChargeType = "Forecast" )
func PossibleChargeTypeValues() []ChargeType
PossibleChargeTypeValues returns an array of possible values for the ChargeType const type.
ChargesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ChargesClient struct { BaseClient }
func NewChargesClient(subscriptionID string) ChargesClient
NewChargesClient creates an instance of the ChargesClient client.
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 (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 (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 (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 (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.
ChargesListResult result of listing charge summary.
type ChargesListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of charge summary Value *[]BasicChargeSummary `json:"value,omitempty"` }
func (clr ChargesListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ChargesListResult.
func (clr *ChargesListResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ChargesListResult struct.
CreditBalanceSummary summary of credit balances.
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"` }
func (cbs CreditBalanceSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CreditBalanceSummary.
CreditSummary a credit summary resource.
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"` }
func (cs CreditSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CreditSummary.
func (cs *CreditSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for CreditSummary struct.
CreditSummaryProperties the properties of the credit summary.
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"` }
func (csp CreditSummaryProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CreditSummaryProperties.
CreditsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type CreditsClient struct { BaseClient }
func NewCreditsClient(subscriptionID string) CreditsClient
NewCreditsClient creates an instance of the CreditsClient client.
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 (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 (client CreditsClient) GetPreparer(ctx context.Context, scope string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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.
CultureCode enumerates the values for culture code.
type CultureCode string
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() []CultureCode
PossibleCultureCodeValues returns an array of possible values for the CultureCode const type.
CurrentSpend the current amount of cost which is being tracked for a budget.
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"` }
func (cs CurrentSpend) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CurrentSpend.
Datagrain enumerates the values for datagrain.
type Datagrain string
const ( // DatagrainDailyGrain Daily grain of data DatagrainDailyGrain Datagrain = "daily" // DatagrainMonthlyGrain Monthly grain of data DatagrainMonthlyGrain Datagrain = "monthly" )
func PossibleDatagrainValues() []Datagrain
PossibleDatagrainValues returns an array of possible values for the Datagrain const type.
DownloadProperties the properties of the price sheet download.
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"` }
func (dp DownloadProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for DownloadProperties.
ErrorDetails the details of the error.
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"` }
func (ed ErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ErrorDetails.
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 ErrorResponse struct { // Error - The details of the error. Error *ErrorDetails `json:"error,omitempty"` }
EventProperties the event properties.
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"` }
func (ep EventProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EventProperties.
EventSummary an event summary resource.
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"` }
func (es EventSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for EventSummary.
func (es *EventSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for EventSummary struct.
EventType enumerates the values for event type.
type EventType string
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() []EventType
PossibleEventTypeValues returns an array of possible values for the EventType const type.
Events result of listing event summary.
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"` }
func (e Events) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (e Events) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Events.
EventsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type EventsClient struct { BaseClient }
func NewEventsClient(subscriptionID string) EventsClient
NewEventsClient creates an instance of the EventsClient client.
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 (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 (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 (client EventsClient) ListPreparer(ctx context.Context, startDate string, endDate string, scope string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
EventsIterator provides access to a complete listing of EventSummary values.
type EventsIterator struct {
// contains filtered or unexported fields
}
func NewEventsIterator(page EventsPage) EventsIterator
Creates a new instance of the EventsIterator type.
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 (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 (iter EventsIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EventsIterator) Response() Events
Response returns the raw server response from the last page request.
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.
EventsPage contains a page of EventSummary values.
type EventsPage struct {
// contains filtered or unexported fields
}
func NewEventsPage(cur Events, getNextPage func(context.Context, Events) (Events, error)) EventsPage
Creates a new instance of the EventsPage type.
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 (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 (page EventsPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EventsPage) Response() Events
Response returns the raw server response from the last page request.
func (page EventsPage) Values() []EventSummary
Values returns the slice of values for the current page or nil if there are no values.
Forecast a forecast resource.
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"` }
func (f Forecast) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Forecast.
func (f *Forecast) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Forecast struct.
ForecastProperties the properties of the forecast charge.
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"` }
func (fp ForecastProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ForecastProperties.
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"` }
func (fpLi ForecastPropertiesConfidenceLevelsItem) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ForecastPropertiesConfidenceLevelsItem.
ForecastSpend the forecasted cost which is being tracked for a budget.
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"` }
func (fs ForecastSpend) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ForecastSpend.
ForecastsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ForecastsClient struct { BaseClient }
func NewForecastsClient(subscriptionID string) ForecastsClient
NewForecastsClient creates an instance of the ForecastsClient client.
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 (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 (client ForecastsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
ForecastsListResult result of listing forecasts. It contains a list of available forecasts.
type ForecastsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of forecasts. Value *[]Forecast `json:"value,omitempty"` }
func (flr ForecastsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ForecastsListResult.
Grain enumerates the values for grain.
type Grain string
const ( // GrainDaily ... GrainDaily Grain = "Daily" // GrainMonthly ... GrainMonthly Grain = "Monthly" // GrainYearly ... GrainYearly Grain = "Yearly" )
func PossibleGrainValues() []Grain
PossibleGrainValues returns an array of possible values for the Grain const type.
HighCasedErrorDetails the details of the error.
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"` }
func (hced HighCasedErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for HighCasedErrorDetails.
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 HighCasedErrorResponse struct { // Error - The details of the error. Error *HighCasedErrorDetails `json:"error,omitempty"` }
Kind enumerates the values for kind.
type Kind string
const ( // KindLegacy ... KindLegacy Kind = "legacy" // KindModern ... KindModern Kind = "modern" // KindUsageDetail ... KindUsageDetail Kind = "UsageDetail" )
func PossibleKindValues() []Kind
PossibleKindValues returns an array of possible values for the Kind const type.
KindBasicChargeSummary enumerates the values for kind basic charge summary.
type KindBasicChargeSummary string
const ( // KindBasicChargeSummaryKindChargeSummary ... KindBasicChargeSummaryKindChargeSummary KindBasicChargeSummary = "ChargeSummary" // KindBasicChargeSummaryKindLegacy ... KindBasicChargeSummaryKindLegacy KindBasicChargeSummary = "legacy" // KindBasicChargeSummaryKindModern ... KindBasicChargeSummaryKindModern KindBasicChargeSummary = "modern" )
func PossibleKindBasicChargeSummaryValues() []KindBasicChargeSummary
PossibleKindBasicChargeSummaryValues returns an array of possible values for the KindBasicChargeSummary const type.
KindBasicReservationRecommendation enumerates the values for kind basic reservation recommendation.
type KindBasicReservationRecommendation string
const ( // KindBasicReservationRecommendationKindLegacy ... KindBasicReservationRecommendationKindLegacy KindBasicReservationRecommendation = "legacy" // KindBasicReservationRecommendationKindModern ... KindBasicReservationRecommendationKindModern KindBasicReservationRecommendation = "modern" // KindBasicReservationRecommendationKindReservationRecommendation ... KindBasicReservationRecommendationKindReservationRecommendation KindBasicReservationRecommendation = "ReservationRecommendation" )
func PossibleKindBasicReservationRecommendationValues() []KindBasicReservationRecommendation
PossibleKindBasicReservationRecommendationValues returns an array of possible values for the KindBasicReservationRecommendation const type.
LegacyChargeSummary legacy charge summary.
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"` }
func (lcs LegacyChargeSummary) AsBasicChargeSummary() (BasicChargeSummary, bool)
AsBasicChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.
func (lcs LegacyChargeSummary) AsChargeSummary() (*ChargeSummary, bool)
AsChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.
func (lcs LegacyChargeSummary) AsLegacyChargeSummary() (*LegacyChargeSummary, bool)
AsLegacyChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.
func (lcs LegacyChargeSummary) AsModernChargeSummary() (*ModernChargeSummary, bool)
AsModernChargeSummary is the BasicChargeSummary implementation for LegacyChargeSummary.
func (lcs LegacyChargeSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyChargeSummary.
func (lcs *LegacyChargeSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for LegacyChargeSummary struct.
LegacyChargeSummaryProperties the properties of legacy charge summary.
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"` }
func (lcsp LegacyChargeSummaryProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyChargeSummaryProperties.
LegacyReservationRecommendation legacy reservation recommendation.
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"` }
func (lrr LegacyReservationRecommendation) AsBasicReservationRecommendation() (BasicReservationRecommendation, bool)
AsBasicReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.
func (lrr LegacyReservationRecommendation) AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)
AsLegacyReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.
func (lrr LegacyReservationRecommendation) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)
AsModernReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.
func (lrr LegacyReservationRecommendation) AsReservationRecommendation() (*ReservationRecommendation, bool)
AsReservationRecommendation is the BasicReservationRecommendation implementation for LegacyReservationRecommendation.
func (lrr LegacyReservationRecommendation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyReservationRecommendation.
func (lrr *LegacyReservationRecommendation) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for LegacyReservationRecommendation struct.
LegacyReservationRecommendationProperties the properties of the reservation recommendation.
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"` }
func (lrrp LegacyReservationRecommendationProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyReservationRecommendationProperties.
LegacyReservationTransaction legacy Reservation transaction resource.
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"` }
func (lrt LegacyReservationTransaction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyReservationTransaction.
func (lrt *LegacyReservationTransaction) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for LegacyReservationTransaction struct.
LegacyReservationTransactionProperties the properties of a legacy reservation transaction.
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"` }
func (lrtp LegacyReservationTransactionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyReservationTransactionProperties.
LegacyUsageDetail legacy usage detail.
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"` }
func (lud LegacyUsageDetail) AsBasicUsageDetail() (BasicUsageDetail, bool)
AsBasicUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.
func (lud LegacyUsageDetail) AsLegacyUsageDetail() (*LegacyUsageDetail, bool)
AsLegacyUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.
func (lud LegacyUsageDetail) AsModernUsageDetail() (*ModernUsageDetail, bool)
AsModernUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.
func (lud LegacyUsageDetail) AsUsageDetail() (*UsageDetail, bool)
AsUsageDetail is the BasicUsageDetail implementation for LegacyUsageDetail.
func (lud LegacyUsageDetail) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyUsageDetail.
func (lud *LegacyUsageDetail) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for LegacyUsageDetail struct.
LegacyUsageDetailProperties the properties of the legacy usage detail.
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"` }
func (ludp LegacyUsageDetailProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LegacyUsageDetailProperties.
LookBackPeriod enumerates the values for look back period.
type LookBackPeriod string
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() []LookBackPeriod
PossibleLookBackPeriodValues returns an array of possible values for the LookBackPeriod const type.
LotProperties the lot properties.
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"` }
func (lp LotProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LotProperties.
LotSource enumerates the values for lot source.
type LotSource string
const ( // LotSourcePromotionalCredit ... LotSourcePromotionalCredit LotSource = "PromotionalCredit" // LotSourcePurchasedCredit ... LotSourcePurchasedCredit LotSource = "PurchasedCredit" )
func PossibleLotSourceValues() []LotSource
PossibleLotSourceValues returns an array of possible values for the LotSource const type.
LotSummary a lot summary resource.
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"` }
func (ls LotSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for LotSummary.
func (ls *LotSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for LotSummary struct.
Lots result of listing lot summary.
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"` }
func (l Lots) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (l Lots) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Lots.
LotsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type LotsClient struct { BaseClient }
func NewLotsClient(subscriptionID string) LotsClient
NewLotsClient creates an instance of the LotsClient client.
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 (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 (client LotsClient) ListComplete(ctx context.Context, scope string) (result LotsIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LotsClient) ListPreparer(ctx context.Context, scope string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
LotsIterator provides access to a complete listing of LotSummary values.
type LotsIterator struct {
// contains filtered or unexported fields
}
func NewLotsIterator(page LotsPage) LotsIterator
Creates a new instance of the LotsIterator type.
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 (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 (iter LotsIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LotsIterator) Response() Lots
Response returns the raw server response from the last page request.
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.
LotsPage contains a page of LotSummary values.
type LotsPage struct {
// contains filtered or unexported fields
}
func NewLotsPage(cur Lots, getNextPage func(context.Context, Lots) (Lots, error)) LotsPage
Creates a new instance of the LotsPage type.
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 (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 (page LotsPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LotsPage) Response() Lots
Response returns the raw server response from the last page request.
func (page LotsPage) Values() []LotSummary
Values returns the slice of values for the current page or nil if there are no values.
ManagementGroupAggregatedCostProperties the properties of the Management Group Aggregated Cost.
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"` }
func (mgacp ManagementGroupAggregatedCostProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ManagementGroupAggregatedCostProperties.
ManagementGroupAggregatedCostResult a management group aggregated cost resource.
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"` }
func (mgacr ManagementGroupAggregatedCostResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ManagementGroupAggregatedCostResult.
func (mgacr *ManagementGroupAggregatedCostResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ManagementGroupAggregatedCostResult struct.
Marketplace an marketplace resource.
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"` }
func (mVar Marketplace) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Marketplace.
func (mVar *Marketplace) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Marketplace struct.
MarketplaceProperties the properties of the marketplace usage detail.
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"` }
func (mp MarketplaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MarketplaceProperties.
MarketplacesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type MarketplacesClient struct { BaseClient }
func NewMarketplacesClient(subscriptionID string) MarketplacesClient
NewMarketplacesClient creates an instance of the MarketplacesClient client.
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 (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 (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 (client MarketplacesClient) ListPreparer(ctx context.Context, scope string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
MarketplacesListResult result of listing marketplaces. It contains a list of available marketplaces in reverse chronological order by billing period.
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"` }
func (mlr MarketplacesListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (mlr MarketplacesListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MarketplacesListResult.
MarketplacesListResultIterator provides access to a complete listing of Marketplace values.
type MarketplacesListResultIterator struct {
// contains filtered or unexported fields
}
func NewMarketplacesListResultIterator(page MarketplacesListResultPage) MarketplacesListResultIterator
Creates a new instance of the MarketplacesListResultIterator type.
func (iter *MarketplacesListResultIterator) 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 (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 (iter MarketplacesListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter MarketplacesListResultIterator) Response() MarketplacesListResult
Response returns the raw server response from the last page request.
func (iter MarketplacesListResultIterator) Value() Marketplace
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
MarketplacesListResultPage contains a page of Marketplace values.
type MarketplacesListResultPage struct {
// contains filtered or unexported fields
}
func NewMarketplacesListResultPage(cur MarketplacesListResult, getNextPage func(context.Context, MarketplacesListResult) (MarketplacesListResult, error)) MarketplacesListResultPage
Creates a new instance of the MarketplacesListResultPage type.
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 (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 (page MarketplacesListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page MarketplacesListResultPage) Response() MarketplacesListResult
Response returns the raw server response from the last page request.
func (page MarketplacesListResultPage) Values() []Marketplace
Values returns the slice of values for the current page or nil if there are no values.
MeterDetails the properties of the meter detail.
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"` }
func (md MeterDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MeterDetails.
MeterDetailsResponse the properties of the meter detail.
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"` }
func (mdr MeterDetailsResponse) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MeterDetailsResponse.
Metrictype enumerates the values for metrictype.
type Metrictype string
const ( // MetrictypeActualCostMetricType Actual cost data. MetrictypeActualCostMetricType Metrictype = "actualcost" // MetrictypeAmortizedCostMetricType Amortized cost data. MetrictypeAmortizedCostMetricType Metrictype = "amortizedcost" // MetrictypeUsageMetricType Usage data. MetrictypeUsageMetricType Metrictype = "usage" )
func PossibleMetrictypeValues() []Metrictype
PossibleMetrictypeValues returns an array of possible values for the Metrictype const type.
ModernChargeSummary modern charge summary.
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"` }
func (mcs ModernChargeSummary) AsBasicChargeSummary() (BasicChargeSummary, bool)
AsBasicChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.
func (mcs ModernChargeSummary) AsChargeSummary() (*ChargeSummary, bool)
AsChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.
func (mcs ModernChargeSummary) AsLegacyChargeSummary() (*LegacyChargeSummary, bool)
AsLegacyChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.
func (mcs ModernChargeSummary) AsModernChargeSummary() (*ModernChargeSummary, bool)
AsModernChargeSummary is the BasicChargeSummary implementation for ModernChargeSummary.
func (mcs ModernChargeSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernChargeSummary.
func (mcs *ModernChargeSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ModernChargeSummary struct.
ModernChargeSummaryProperties the properties of modern charge summary.
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"` }
func (mcsp ModernChargeSummaryProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernChargeSummaryProperties.
ModernReservationRecommendation modern reservation recommendation.
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"` }
func (mrr ModernReservationRecommendation) AsBasicReservationRecommendation() (BasicReservationRecommendation, bool)
AsBasicReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.
func (mrr ModernReservationRecommendation) AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)
AsLegacyReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.
func (mrr ModernReservationRecommendation) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)
AsModernReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.
func (mrr ModernReservationRecommendation) AsReservationRecommendation() (*ReservationRecommendation, bool)
AsReservationRecommendation is the BasicReservationRecommendation implementation for ModernReservationRecommendation.
func (mrr ModernReservationRecommendation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernReservationRecommendation.
func (mrr *ModernReservationRecommendation) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ModernReservationRecommendation struct.
ModernReservationRecommendationProperties the properties of the reservation recommendation.
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"` }
func (mrrp ModernReservationRecommendationProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernReservationRecommendationProperties.
ModernReservationTransaction modern Reservation transaction resource.
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"` }
func (mrt ModernReservationTransaction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernReservationTransaction.
func (mrt *ModernReservationTransaction) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ModernReservationTransaction struct.
ModernReservationTransactionProperties the properties of a modern reservation transaction.
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"` }
func (mrtp ModernReservationTransactionProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernReservationTransactionProperties.
ModernReservationTransactionsListResult result of listing reservation recommendations.
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"` }
func (mrtlr ModernReservationTransactionsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (mrtlr ModernReservationTransactionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernReservationTransactionsListResult.
ModernReservationTransactionsListResultIterator provides access to a complete listing of ModernReservationTransaction values.
type ModernReservationTransactionsListResultIterator struct {
// contains filtered or unexported fields
}
func NewModernReservationTransactionsListResultIterator(page ModernReservationTransactionsListResultPage) ModernReservationTransactionsListResultIterator
Creates a new instance of the ModernReservationTransactionsListResultIterator type.
func (iter *ModernReservationTransactionsListResultIterator) 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 (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 (iter ModernReservationTransactionsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ModernReservationTransactionsListResultIterator) Response() ModernReservationTransactionsListResult
Response returns the raw server response from the last page request.
func (iter ModernReservationTransactionsListResultIterator) Value() ModernReservationTransaction
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ModernReservationTransactionsListResultPage contains a page of ModernReservationTransaction values.
type ModernReservationTransactionsListResultPage struct {
// contains filtered or unexported fields
}
func NewModernReservationTransactionsListResultPage(cur ModernReservationTransactionsListResult, getNextPage func(context.Context, ModernReservationTransactionsListResult) (ModernReservationTransactionsListResult, error)) ModernReservationTransactionsListResultPage
Creates a new instance of the ModernReservationTransactionsListResultPage type.
func (page *ModernReservationTransactionsListResultPage) 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 (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 (page ModernReservationTransactionsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ModernReservationTransactionsListResultPage) Response() ModernReservationTransactionsListResult
Response returns the raw server response from the last page request.
func (page ModernReservationTransactionsListResultPage) Values() []ModernReservationTransaction
Values returns the slice of values for the current page or nil if there are no values.
ModernUsageDetail modern usage detail.
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"` }
func (mud ModernUsageDetail) AsBasicUsageDetail() (BasicUsageDetail, bool)
AsBasicUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.
func (mud ModernUsageDetail) AsLegacyUsageDetail() (*LegacyUsageDetail, bool)
AsLegacyUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.
func (mud ModernUsageDetail) AsModernUsageDetail() (*ModernUsageDetail, bool)
AsModernUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.
func (mud ModernUsageDetail) AsUsageDetail() (*UsageDetail, bool)
AsUsageDetail is the BasicUsageDetail implementation for ModernUsageDetail.
func (mud ModernUsageDetail) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernUsageDetail.
func (mud *ModernUsageDetail) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ModernUsageDetail struct.
ModernUsageDetailProperties the properties of the usage detail.
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"` }
func (mudp ModernUsageDetailProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ModernUsageDetailProperties.
Notification the notification associated with a budget.
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"` }
Operation a Consumption REST API 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"` }
func (o Operation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Operation.
OperationDisplay the object that represents the operation.
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"` }
func (o OperationDisplay) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OperationDisplay.
OperationListResult result of listing consumption operations. It contains a list of operations and a URL link to get the next set of results.
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"` }
func (olr OperationListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for OperationListResult.
OperationListResultIterator provides access to a complete listing of Operation values.
type OperationListResultIterator struct {
// contains filtered or unexported fields
}
func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator
Creates a new instance of the OperationListResultIterator type.
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 (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 (iter OperationListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) Response() OperationListResult
Response returns the raw server response from the last page request.
func (iter OperationListResultIterator) Value() Operation
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
// contains filtered or unexported fields
}
func NewOperationListResultPage(cur OperationListResult, getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage
Creates a new instance of the OperationListResultPage type.
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 (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 (page OperationListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) Response() OperationListResult
Response returns the raw server response from the last page request.
func (page OperationListResultPage) Values() []Operation
Values returns the slice of values for the current page or nil if there are no values.
OperationsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type OperationsClient struct { BaseClient }
func NewOperationsClient(subscriptionID string) OperationsClient
NewOperationsClient creates an instance of the OperationsClient client.
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 (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error)
List lists all of the available consumption REST API operations.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListPreparer(ctx context.Context) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
OperatorType enumerates the values for operator type.
type OperatorType string
const ( // OperatorTypeEqualTo ... OperatorTypeEqualTo OperatorType = "EqualTo" // OperatorTypeGreaterThan ... OperatorTypeGreaterThan OperatorType = "GreaterThan" // OperatorTypeGreaterThanOrEqualTo ... OperatorTypeGreaterThanOrEqualTo OperatorType = "GreaterThanOrEqualTo" )
func PossibleOperatorTypeValues() []OperatorType
PossibleOperatorTypeValues returns an array of possible values for the OperatorType const type.
PriceSheetClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type PriceSheetClient struct { BaseClient }
func NewPriceSheetClient(subscriptionID string) PriceSheetClient
NewPriceSheetClient creates an instance of the PriceSheetClient client.
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 (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 (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 (client PriceSheetClient) GetByBillingPeriodPreparer(ctx context.Context, billingPeriodName string, expand string, skiptoken string, top *int32) (*http.Request, error)
GetByBillingPeriodPreparer prepares the GetByBillingPeriod request.
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 (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 (client PriceSheetClient) GetPreparer(ctx context.Context, expand string, skiptoken string, top *int32) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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.
PriceSheetModel price sheet result. It contains the pricesheet associated with billing period
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"` }
func (psm PriceSheetModel) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PriceSheetModel.
PriceSheetProperties the properties of the price sheet.
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"` }
func (psp PriceSheetProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PriceSheetProperties.
PriceSheetResult an pricesheet resource.
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"` }
func (psr PriceSheetResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for PriceSheetResult.
func (psr *PriceSheetResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for PriceSheetResult struct.
ProxyResource the Resource model definition.
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"` }
func (pr ProxyResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ProxyResource.
Reseller reseller details
type Reseller struct { // ResellerID - READ-ONLY; Reseller id. ResellerID *string `json:"resellerId,omitempty"` // ResellerDescription - READ-ONLY; Reseller Description. ResellerDescription *string `json:"resellerDescription,omitempty"` }
func (r Reseller) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Reseller.
ReservationDetail reservation detail resource.
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"` }
func (rd ReservationDetail) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationDetail.
func (rd *ReservationDetail) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationDetail struct.
ReservationDetailProperties the properties of the reservation detail.
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"` }
func (rdp ReservationDetailProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationDetailProperties.
ReservationDetailsListResult result of listing reservation details.
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"` }
func (rdlr ReservationDetailsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (rdlr ReservationDetailsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationDetailsListResult.
ReservationDetailsListResultIterator provides access to a complete listing of ReservationDetail values.
type ReservationDetailsListResultIterator struct {
// contains filtered or unexported fields
}
func NewReservationDetailsListResultIterator(page ReservationDetailsListResultPage) ReservationDetailsListResultIterator
Creates a new instance of the ReservationDetailsListResultIterator type.
func (iter *ReservationDetailsListResultIterator) 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 (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 (iter ReservationDetailsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ReservationDetailsListResultIterator) Response() ReservationDetailsListResult
Response returns the raw server response from the last page request.
func (iter ReservationDetailsListResultIterator) Value() ReservationDetail
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ReservationDetailsListResultPage contains a page of ReservationDetail values.
type ReservationDetailsListResultPage struct {
// contains filtered or unexported fields
}
func NewReservationDetailsListResultPage(cur ReservationDetailsListResult, getNextPage func(context.Context, ReservationDetailsListResult) (ReservationDetailsListResult, error)) ReservationDetailsListResultPage
Creates a new instance of the ReservationDetailsListResultPage type.
func (page *ReservationDetailsListResultPage) 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 (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 (page ReservationDetailsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ReservationDetailsListResultPage) Response() ReservationDetailsListResult
Response returns the raw server response from the last page request.
func (page ReservationDetailsListResultPage) Values() []ReservationDetail
Values returns the slice of values for the current page or nil if there are no values.
ReservationRecommendation a reservation recommendation resource.
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"` }
func (rr ReservationRecommendation) AsBasicReservationRecommendation() (BasicReservationRecommendation, bool)
AsBasicReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.
func (rr ReservationRecommendation) AsLegacyReservationRecommendation() (*LegacyReservationRecommendation, bool)
AsLegacyReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.
func (rr ReservationRecommendation) AsModernReservationRecommendation() (*ModernReservationRecommendation, bool)
AsModernReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.
func (rr ReservationRecommendation) AsReservationRecommendation() (*ReservationRecommendation, bool)
AsReservationRecommendation is the BasicReservationRecommendation implementation for ReservationRecommendation.
func (rr ReservationRecommendation) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendation.
ReservationRecommendationDetailsCalculatedSavingsProperties details of estimated savings.
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"` }
func (rrdcsp ReservationRecommendationDetailsCalculatedSavingsProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationDetailsCalculatedSavingsProperties.
ReservationRecommendationDetailsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ReservationRecommendationDetailsClient struct { BaseClient }
func NewReservationRecommendationDetailsClient(subscriptionID string) ReservationRecommendationDetailsClient
NewReservationRecommendationDetailsClient creates an instance of the ReservationRecommendationDetailsClient client.
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 (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 (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 (client ReservationRecommendationDetailsClient) GetResponder(resp *http.Response) (result ReservationRecommendationDetailsModel, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client ReservationRecommendationDetailsClient) 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.
ReservationRecommendationDetailsModel reservation recommendation details.
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"` }
func (rrdm ReservationRecommendationDetailsModel) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationDetailsModel.
func (rrdm *ReservationRecommendationDetailsModel) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationRecommendationDetailsModel struct.
ReservationRecommendationDetailsProperties the properties of the reservation recommendation.
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"` }
func (rrdp ReservationRecommendationDetailsProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationDetailsProperties.
ReservationRecommendationDetailsResourceProperties details of the resource.
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"` }
func (rrdrp ReservationRecommendationDetailsResourceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationDetailsResourceProperties.
ReservationRecommendationDetailsSavingsProperties details of the estimated savings.
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"` }
func (rrdsp ReservationRecommendationDetailsSavingsProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationDetailsSavingsProperties.
ReservationRecommendationDetailsUsageProperties details about historical usage data that has been used for computing the recommendation.
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"` }
func (rrdup ReservationRecommendationDetailsUsageProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationDetailsUsageProperties.
ReservationRecommendationsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ReservationRecommendationsClient struct { BaseClient }
func NewReservationRecommendationsClient(subscriptionID string) ReservationRecommendationsClient
NewReservationRecommendationsClient creates an instance of the ReservationRecommendationsClient client.
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 (client ReservationRecommendationsClient) List(ctx context.Context, scope string, filter string) (result ReservationRecommendationsListResultPage, err error)
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 (client ReservationRecommendationsClient) ListComplete(ctx context.Context, scope string, filter string) (result ReservationRecommendationsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReservationRecommendationsClient) ListPreparer(ctx context.Context, scope string, filter string) (*http.Request, error)
ListPreparer prepares the List request.
func (client ReservationRecommendationsClient) ListResponder(resp *http.Response) (result ReservationRecommendationsListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
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.
ReservationRecommendationsListResult result of listing reservation recommendations.
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"` }
func (rrlr ReservationRecommendationsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (rrlr ReservationRecommendationsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationsListResult.
func (rrlr *ReservationRecommendationsListResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationRecommendationsListResult struct.
ReservationRecommendationsListResultIterator provides access to a complete listing of ReservationRecommendation values.
type ReservationRecommendationsListResultIterator struct {
// contains filtered or unexported fields
}
func NewReservationRecommendationsListResultIterator(page ReservationRecommendationsListResultPage) ReservationRecommendationsListResultIterator
Creates a new instance of the ReservationRecommendationsListResultIterator type.
func (iter *ReservationRecommendationsListResultIterator) 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 (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 (iter ReservationRecommendationsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ReservationRecommendationsListResultIterator) Response() ReservationRecommendationsListResult
Response returns the raw server response from the last page request.
func (iter ReservationRecommendationsListResultIterator) Value() BasicReservationRecommendation
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ReservationRecommendationsListResultPage contains a page of BasicReservationRecommendation values.
type ReservationRecommendationsListResultPage struct {
// contains filtered or unexported fields
}
func NewReservationRecommendationsListResultPage(cur ReservationRecommendationsListResult, getNextPage func(context.Context, ReservationRecommendationsListResult) (ReservationRecommendationsListResult, error)) ReservationRecommendationsListResultPage
Creates a new instance of the ReservationRecommendationsListResultPage type.
func (page *ReservationRecommendationsListResultPage) 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 (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 (page ReservationRecommendationsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ReservationRecommendationsListResultPage) Response() ReservationRecommendationsListResult
Response returns the raw server response from the last page request.
func (page ReservationRecommendationsListResultPage) Values() []BasicReservationRecommendation
Values returns the slice of values for the current page or nil if there are no values.
ReservationSummariesListResult result of listing reservation summaries.
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"` }
func (rslr ReservationSummariesListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (rslr ReservationSummariesListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationSummariesListResult.
ReservationSummariesListResultIterator provides access to a complete listing of ReservationSummary values.
type ReservationSummariesListResultIterator struct {
// contains filtered or unexported fields
}
func NewReservationSummariesListResultIterator(page ReservationSummariesListResultPage) ReservationSummariesListResultIterator
Creates a new instance of the ReservationSummariesListResultIterator type.
func (iter *ReservationSummariesListResultIterator) 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 (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 (iter ReservationSummariesListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ReservationSummariesListResultIterator) Response() ReservationSummariesListResult
Response returns the raw server response from the last page request.
func (iter ReservationSummariesListResultIterator) Value() ReservationSummary
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ReservationSummariesListResultPage contains a page of ReservationSummary values.
type ReservationSummariesListResultPage struct {
// contains filtered or unexported fields
}
func NewReservationSummariesListResultPage(cur ReservationSummariesListResult, getNextPage func(context.Context, ReservationSummariesListResult) (ReservationSummariesListResult, error)) ReservationSummariesListResultPage
Creates a new instance of the ReservationSummariesListResultPage type.
func (page *ReservationSummariesListResultPage) 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 (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 (page ReservationSummariesListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ReservationSummariesListResultPage) Response() ReservationSummariesListResult
Response returns the raw server response from the last page request.
func (page ReservationSummariesListResultPage) Values() []ReservationSummary
Values returns the slice of values for the current page or nil if there are no values.
ReservationSummary reservation summary resource.
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"` }
func (rs ReservationSummary) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationSummary.
func (rs *ReservationSummary) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationSummary struct.
ReservationSummaryProperties the properties of the reservation summary.
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"` }
func (rsp ReservationSummaryProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationSummaryProperties.
ReservationTransaction reservation transaction resource.
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"` }
func (rt ReservationTransaction) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationTransaction.
func (rt *ReservationTransaction) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationTransaction struct.
ReservationTransactionResource the Resource model definition.
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"` }
func (rtr ReservationTransactionResource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationTransactionResource.
ReservationTransactionsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ReservationTransactionsClient struct { BaseClient }
func NewReservationTransactionsClient(subscriptionID string) ReservationTransactionsClient
NewReservationTransactionsClient creates an instance of the ReservationTransactionsClient client.
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 (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 (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 (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 (client ReservationTransactionsClient) ListByBillingProfilePreparer(ctx context.Context, billingAccountID string, billingProfileID string, filter string) (*http.Request, error)
ListByBillingProfilePreparer prepares the ListByBillingProfile request.
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 (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 (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 (client ReservationTransactionsClient) ListPreparer(ctx context.Context, billingAccountID string, filter string) (*http.Request, error)
ListPreparer prepares the List request.
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 (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.
ReservationTransactionsListResult result of listing reservation recommendations.
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"` }
func (rtlr ReservationTransactionsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (rtlr ReservationTransactionsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationTransactionsListResult.
ReservationTransactionsListResultIterator provides access to a complete listing of ReservationTransaction values.
type ReservationTransactionsListResultIterator struct {
// contains filtered or unexported fields
}
func NewReservationTransactionsListResultIterator(page ReservationTransactionsListResultPage) ReservationTransactionsListResultIterator
Creates a new instance of the ReservationTransactionsListResultIterator type.
func (iter *ReservationTransactionsListResultIterator) 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 (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 (iter ReservationTransactionsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ReservationTransactionsListResultIterator) Response() ReservationTransactionsListResult
Response returns the raw server response from the last page request.
func (iter ReservationTransactionsListResultIterator) Value() ReservationTransaction
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
ReservationTransactionsListResultPage contains a page of ReservationTransaction values.
type ReservationTransactionsListResultPage struct {
// contains filtered or unexported fields
}
func NewReservationTransactionsListResultPage(cur ReservationTransactionsListResult, getNextPage func(context.Context, ReservationTransactionsListResult) (ReservationTransactionsListResult, error)) ReservationTransactionsListResultPage
Creates a new instance of the ReservationTransactionsListResultPage type.
func (page *ReservationTransactionsListResultPage) 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 (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 (page ReservationTransactionsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ReservationTransactionsListResultPage) Response() ReservationTransactionsListResult
Response returns the raw server response from the last page request.
func (page ReservationTransactionsListResultPage) Values() []ReservationTransaction
Values returns the slice of values for the current page or nil if there are no values.
ReservationsDetailsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ReservationsDetailsClient struct { BaseClient }
func NewReservationsDetailsClient(subscriptionID string) ReservationsDetailsClient
NewReservationsDetailsClient creates an instance of the ReservationsDetailsClient client.
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 (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 (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 (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 (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 (client ReservationsDetailsClient) ListByReservationOrderAndReservationPreparer(ctx context.Context, reservationOrderID string, reservationID string, filter string) (*http.Request, error)
ListByReservationOrderAndReservationPreparer prepares the ListByReservationOrderAndReservation request.
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 (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 (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 (client ReservationsDetailsClient) ListByReservationOrderPreparer(ctx context.Context, reservationOrderID string, filter string) (*http.Request, error)
ListByReservationOrderPreparer prepares the ListByReservationOrder request.
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 (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 (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 (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 (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 (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.
ReservationsSummariesClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type ReservationsSummariesClient struct { BaseClient }
func NewReservationsSummariesClient(subscriptionID string) ReservationsSummariesClient
NewReservationsSummariesClient creates an instance of the ReservationsSummariesClient client.
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 (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 (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 (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 (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 (client ReservationsSummariesClient) ListByReservationOrderAndReservationPreparer(ctx context.Context, reservationOrderID string, reservationID string, grain Datagrain, filter string) (*http.Request, error)
ListByReservationOrderAndReservationPreparer prepares the ListByReservationOrderAndReservation request.
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 (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 (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 (client ReservationsSummariesClient) ListByReservationOrderPreparer(ctx context.Context, reservationOrderID string, grain Datagrain, filter string) (*http.Request, error)
ListByReservationOrderPreparer prepares the ListByReservationOrder request.
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 (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 (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 (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 (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 (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.
Resource the Resource model definition.
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"` }
func (r Resource) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Resource.
ResourceAttributes the Resource model definition.
type ResourceAttributes struct { // Location - READ-ONLY; Resource location Location *string `json:"location,omitempty"` // Sku - READ-ONLY; Resource sku Sku *string `json:"sku,omitempty"` }
func (ra ResourceAttributes) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ResourceAttributes.
Scope12 enumerates the values for scope 12.
type Scope12 string
const ( // Scope12Shared ... Scope12 = "Shared" // Scope12Single ... Scope12Single Scope12 = "Single" )
func PossibleScope12Values() []Scope12
PossibleScope12Values returns an array of possible values for the Scope12 const type.
Scope14 enumerates the values for scope 14.
type Scope14 string
const ( // Scope14Shared ... Scope14 = "Shared" // Scope14Single ... Scope14Single Scope14 = "Single" )
func PossibleScope14Values() []Scope14
PossibleScope14Values returns an array of possible values for the Scope14 const type.
SkuProperty the Sku property
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"` }
func (sp SkuProperty) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for SkuProperty.
Tag the tag resource.
type Tag struct { // Key - Tag key. Key *string `json:"key,omitempty"` // Value - Tag values. Value *[]string `json:"value,omitempty"` }
TagProperties the properties of the tag.
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"` }
func (tp TagProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for TagProperties.
TagsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type TagsClient struct { BaseClient }
func NewTagsClient(subscriptionID string) TagsClient
NewTagsClient creates an instance of the TagsClient client.
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 (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 (client TagsClient) GetPreparer(ctx context.Context, scope string) (*http.Request, error)
GetPreparer prepares the Get request.
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 (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.
TagsResult a resource listing all tags.
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"` }
func (tr TagsResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for TagsResult.
func (tr *TagsResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for TagsResult struct.
Term enumerates the values for term.
type Term string
const ( // TermP1Y 1 year reservation term TermP1Y Term = "P1Y" // TermP3Y 3 year reservation term TermP3Y Term = "P3Y" )
func PossibleTermValues() []Term
PossibleTermValues returns an array of possible values for the Term const type.
ThresholdType enumerates the values for threshold type.
type ThresholdType string
const ( // ThresholdTypeActual ... ThresholdTypeActual ThresholdType = "Actual" )
func PossibleThresholdTypeValues() []ThresholdType
PossibleThresholdTypeValues returns an array of possible values for the ThresholdType const type.
TimeGrainType enumerates the values for time grain type.
type TimeGrainType string
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() []TimeGrainType
PossibleTimeGrainTypeValues returns an array of possible values for the TimeGrainType const type.
UsageDetail an usage detail resource.
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"` }
func (ud UsageDetail) AsBasicUsageDetail() (BasicUsageDetail, bool)
AsBasicUsageDetail is the BasicUsageDetail implementation for UsageDetail.
func (ud UsageDetail) AsLegacyUsageDetail() (*LegacyUsageDetail, bool)
AsLegacyUsageDetail is the BasicUsageDetail implementation for UsageDetail.
func (ud UsageDetail) AsModernUsageDetail() (*ModernUsageDetail, bool)
AsModernUsageDetail is the BasicUsageDetail implementation for UsageDetail.
func (ud UsageDetail) AsUsageDetail() (*UsageDetail, bool)
AsUsageDetail is the BasicUsageDetail implementation for UsageDetail.
func (ud UsageDetail) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for UsageDetail.
UsageDetailsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type UsageDetailsClient struct { BaseClient }
func NewUsageDetailsClient(subscriptionID string) UsageDetailsClient
NewUsageDetailsClient creates an instance of the UsageDetailsClient client.
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 (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 (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 (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 (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 (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.
UsageDetailsListResult result of listing usage details. It contains a list of available usage details in reverse chronological order by billing period.
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"` }
func (udlr UsageDetailsListResult) IsEmpty() bool
IsEmpty returns true if the ListResult contains no values.
func (udlr UsageDetailsListResult) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for UsageDetailsListResult.
func (udlr *UsageDetailsListResult) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for UsageDetailsListResult struct.
UsageDetailsListResultIterator provides access to a complete listing of UsageDetail values.
type UsageDetailsListResultIterator struct {
// contains filtered or unexported fields
}
func NewUsageDetailsListResultIterator(page UsageDetailsListResultPage) UsageDetailsListResultIterator
Creates a new instance of the UsageDetailsListResultIterator type.
func (iter *UsageDetailsListResultIterator) 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 (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 (iter UsageDetailsListResultIterator) NotDone() bool
NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UsageDetailsListResultIterator) Response() UsageDetailsListResult
Response returns the raw server response from the last page request.
func (iter UsageDetailsListResultIterator) Value() BasicUsageDetail
Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.
UsageDetailsListResultPage contains a page of BasicUsageDetail values.
type UsageDetailsListResultPage struct {
// contains filtered or unexported fields
}
func NewUsageDetailsListResultPage(cur UsageDetailsListResult, getNextPage func(context.Context, UsageDetailsListResult) (UsageDetailsListResult, error)) UsageDetailsListResultPage
Creates a new instance of the UsageDetailsListResultPage type.
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 (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 (page UsageDetailsListResultPage) NotDone() bool
NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UsageDetailsListResultPage) Response() UsageDetailsListResult
Response returns the raw server response from the last page request.
func (page UsageDetailsListResultPage) Values() []BasicUsageDetail
Values returns the slice of values for the current page or nil if there are no values.
Name | Synopsis |
---|---|
.. | |
consumptionapi | Deprecated: Please note, this package has been deprecated. |