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.
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"` // 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: 'Month', 'Quarter', 'Year' 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.
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).
func (client BaseClient) GetBalancesByBillingAccount(ctx context.Context, billingAccountID string) (result Balance, err error)
GetBalancesByBillingAccount 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 BaseClient) GetBalancesByBillingAccountPreparer(ctx context.Context, billingAccountID string) (*http.Request, error)
GetBalancesByBillingAccountPreparer prepares the GetBalancesByBillingAccount request.
func (client BaseClient) GetBalancesByBillingAccountResponder(resp *http.Response) (result Balance, err error)
GetBalancesByBillingAccountResponder handles the response to the GetBalancesByBillingAccount request. The method always closes the http.Response Body.
func (client BaseClient) GetBalancesByBillingAccountSender(req *http.Request) (*http.Response, error)
GetBalancesByBillingAccountSender sends the GetBalancesByBillingAccount request. The method will close the http.Response Body if it receives an error.
BillingFrequency enumerates the values for billing frequency.
type BillingFrequency string
const ( // Month ... Month BillingFrequency = "Month" // Quarter ... Quarter BillingFrequency = "Quarter" // Year ... Year BillingFrequency = "Year" )
func PossibleBillingFrequencyValues() []BillingFrequency
PossibleBillingFrequencyValues returns an array of possible values for the BillingFrequency 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.
BudgetProperties the properties of the budget.
type BudgetProperties struct { // Category - The category of the budget, whether the budget tracks cost or usage. Possible values include: 'Cost', 'Usage' Category CategoryType `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. Possible values include: 'Monthly', 'Quarterly', 'Annually' 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 three months. Past start date should be selected within the timegrain period. There are no restrictions on the end date. TimePeriod *BudgetTimePeriod `json:"timePeriod,omitempty"` // Filters - May be used to filter budgets by resource group, resource, or meter. Filters *Filters `json:"filters,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"` }
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, budgetName string, parameters Budget) (result Budget, err error)
CreateOrUpdate the operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. Parameters: budgetName - budget Name. parameters - parameters supplied to the Create Budget operation.
func (client BudgetsClient) CreateOrUpdateByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string, parameters Budget) (result Budget, err error)
CreateOrUpdateByResourceGroupName the operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. Parameters: resourceGroupName - azure Resource Group Name. budgetName - budget Name. parameters - parameters supplied to the Create Budget operation.
func (client BudgetsClient) CreateOrUpdateByResourceGroupNamePreparer(ctx context.Context, resourceGroupName string, budgetName string, parameters Budget) (*http.Request, error)
CreateOrUpdateByResourceGroupNamePreparer prepares the CreateOrUpdateByResourceGroupName request.
func (client BudgetsClient) CreateOrUpdateByResourceGroupNameResponder(resp *http.Response) (result Budget, err error)
CreateOrUpdateByResourceGroupNameResponder handles the response to the CreateOrUpdateByResourceGroupName request. The method always closes the http.Response Body.
func (client BudgetsClient) CreateOrUpdateByResourceGroupNameSender(req *http.Request) (*http.Response, error)
CreateOrUpdateByResourceGroupNameSender sends the CreateOrUpdateByResourceGroupName request. The method will close the http.Response Body if it receives an error.
func (client BudgetsClient) CreateOrUpdatePreparer(ctx context.Context, 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, budgetName string) (result autorest.Response, err error)
Delete the operation to delete a budget. Parameters: budgetName - budget Name.
func (client BudgetsClient) DeleteByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result autorest.Response, err error)
DeleteByResourceGroupName the operation to delete a budget. Parameters: resourceGroupName - azure Resource Group Name. budgetName - budget Name.
func (client BudgetsClient) DeleteByResourceGroupNamePreparer(ctx context.Context, resourceGroupName string, budgetName string) (*http.Request, error)
DeleteByResourceGroupNamePreparer prepares the DeleteByResourceGroupName request.
func (client BudgetsClient) DeleteByResourceGroupNameResponder(resp *http.Response) (result autorest.Response, err error)
DeleteByResourceGroupNameResponder handles the response to the DeleteByResourceGroupName request. The method always closes the http.Response Body.
func (client BudgetsClient) DeleteByResourceGroupNameSender(req *http.Request) (*http.Response, error)
DeleteByResourceGroupNameSender sends the DeleteByResourceGroupName request. The method will close the http.Response Body if it receives an error.
func (client BudgetsClient) DeletePreparer(ctx context.Context, 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, budgetName string) (result Budget, err error)
Get gets the budget for a subscription by budget name. Parameters: budgetName - budget Name.
func (client BudgetsClient) GetByResourceGroupName(ctx context.Context, resourceGroupName string, budgetName string) (result Budget, err error)
GetByResourceGroupName gets the budget for a resource group under a subscription by budget name. Parameters: resourceGroupName - azure Resource Group Name. budgetName - budget Name.
func (client BudgetsClient) GetByResourceGroupNamePreparer(ctx context.Context, resourceGroupName string, budgetName string) (*http.Request, error)
GetByResourceGroupNamePreparer prepares the GetByResourceGroupName request.
func (client BudgetsClient) GetByResourceGroupNameResponder(resp *http.Response) (result Budget, err error)
GetByResourceGroupNameResponder handles the response to the GetByResourceGroupName request. The method always closes the http.Response Body.
func (client BudgetsClient) GetByResourceGroupNameSender(req *http.Request) (*http.Response, error)
GetByResourceGroupNameSender sends the GetByResourceGroupName request. The method will close the http.Response Body if it receives an error.
func (client BudgetsClient) GetPreparer(ctx context.Context, 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) (result BudgetsListResultPage, err error)
List lists all budgets for a subscription.
func (client BudgetsClient) ListByResourceGroupName(ctx context.Context, resourceGroupName string) (result BudgetsListResultPage, err error)
ListByResourceGroupName lists all budgets for a resource group under a subscription. Parameters: resourceGroupName - azure Resource Group Name.
func (client BudgetsClient) ListByResourceGroupNameComplete(ctx context.Context, resourceGroupName string) (result BudgetsListResultIterator, err error)
ListByResourceGroupNameComplete enumerates all values, automatically crossing page boundaries as required.
func (client BudgetsClient) ListByResourceGroupNamePreparer(ctx context.Context, resourceGroupName string) (*http.Request, error)
ListByResourceGroupNamePreparer prepares the ListByResourceGroupName request.
func (client BudgetsClient) ListByResourceGroupNameResponder(resp *http.Response) (result BudgetsListResult, err error)
ListByResourceGroupNameResponder handles the response to the ListByResourceGroupName request. The method always closes the http.Response Body.
func (client BudgetsClient) ListByResourceGroupNameSender(req *http.Request) (*http.Response, error)
ListByResourceGroupNameSender sends the ListByResourceGroupName request. The method will close the http.Response Body if it receives an error.
func (client BudgetsClient) ListComplete(ctx context.Context) (result BudgetsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client BudgetsClient) ListPreparer(ctx context.Context) (*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.
CategoryType enumerates the values for category type.
type CategoryType string
const ( // Cost ... Cost CategoryType = "Cost" // Usage ... Usage CategoryType = "Usage" )
func PossibleCategoryTypeValues() []CategoryType
PossibleCategoryTypeValues returns an array of possible values for the CategoryType const type.
CostTag the cost tag.
type CostTag struct { // Key - Cost tag key. Key *string `json:"key,omitempty"` }
CostTagProperties the properties of the cost tag.
type CostTagProperties struct { // CostTags - Cost tags. CostTags *[]CostTag `json:"costTags,omitempty"` }
CostTags a cost tag resource.
type CostTags struct { autorest.Response `json:"-"` *CostTagProperties `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 (ct CostTags) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for CostTags.
func (ct *CostTags) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for CostTags struct.
CostTagsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type CostTagsClient struct { BaseClient }
func NewCostTagsClient(subscriptionID string) CostTagsClient
NewCostTagsClient creates an instance of the CostTagsClient client.
func NewCostTagsClientWithBaseURI(baseURI string, subscriptionID string) CostTagsClient
NewCostTagsClientWithBaseURI creates an instance of the CostTagsClient 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 CostTagsClient) CreateOrUpdate(ctx context.Context, billingAccountID string, parameters CostTags) (result CostTags, err error)
CreateOrUpdate the operation to create or update cost tags associated with a billing account. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag. Parameters: billingAccountID - billingAccount ID parameters - parameters supplied to the Create cost tags operation.
func (client CostTagsClient) CreateOrUpdatePreparer(ctx context.Context, billingAccountID string, parameters CostTags) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (client CostTagsClient) CreateOrUpdateResponder(resp *http.Response) (result CostTags, err error)
CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.
func (client CostTagsClient) 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 CostTagsClient) Get(ctx context.Context, billingAccountID string) (result CostTags, err error)
Get get cost tags for a billing account. Parameters: billingAccountID - billingAccount ID
func (client CostTagsClient) GetPreparer(ctx context.Context, billingAccountID string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client CostTagsClient) GetResponder(resp *http.Response) (result CostTags, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (client CostTagsClient) 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.
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 ( // DailyGrain Daily grain of data DailyGrain Datagrain = "daily" // MonthlyGrain Monthly grain of data MonthlyGrain Datagrain = "monthly" )
func PossibleDatagrainValues() []Datagrain
PossibleDatagrainValues returns an array of possible values for the Datagrain const type.
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.
type ErrorResponse struct { // Error - The details of the error. Error *ErrorDetails `json:"error,omitempty"` }
Filters may be used to filter budgets by resource group, resource, or meter.
type Filters struct { // ResourceGroups - The list of filters on resource groups, allowed at subscription level only. ResourceGroups *[]string `json:"resourceGroups,omitempty"` // Resources - The list of filters on resources. Resources *[]string `json:"resources,omitempty"` // Meters - The list of filters on meters (GUID), mandatory for budgets of usage category. Meters *[]uuid.UUID `json:"meters,omitempty"` // Tags - The dictionary of filters on tags. Tags map[string][]string `json:"tags"` }
func (f Filters) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Filters.
GetBalancesByBillingAccountClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type GetBalancesByBillingAccountClient struct { BaseClient }
func NewGetBalancesByBillingAccountClient(subscriptionID string) GetBalancesByBillingAccountClient
NewGetBalancesByBillingAccountClient creates an instance of the GetBalancesByBillingAccountClient client.
func NewGetBalancesByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) GetBalancesByBillingAccountClient
NewGetBalancesByBillingAccountClientWithBaseURI creates an instance of the GetBalancesByBillingAccountClient 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 GetBalancesByBillingAccountClient) ByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string) (result Balance, err error)
ByBillingPeriod 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 GetBalancesByBillingAccountClient) ByBillingPeriodPreparer(ctx context.Context, billingAccountID string, billingPeriodName string) (*http.Request, error)
ByBillingPeriodPreparer prepares the ByBillingPeriod request.
func (client GetBalancesByBillingAccountClient) ByBillingPeriodResponder(resp *http.Response) (result Balance, err error)
ByBillingPeriodResponder handles the response to the ByBillingPeriod request. The method always closes the http.Response Body.
func (client GetBalancesByBillingAccountClient) ByBillingPeriodSender(req *http.Request) (*http.Response, error)
ByBillingPeriodSender sends the ByBillingPeriod request. The method will close the http.Response Body if it receives an error.
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"` // 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"` // 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"` }
func (mp MarketplaceProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MarketplaceProperties.
MarketplacesByBillingAccountClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type MarketplacesByBillingAccountClient struct { BaseClient }
func NewMarketplacesByBillingAccountClient(subscriptionID string) MarketplacesByBillingAccountClient
NewMarketplacesByBillingAccountClient creates an instance of the MarketplacesByBillingAccountClient client.
func NewMarketplacesByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByBillingAccountClient
NewMarketplacesByBillingAccountClientWithBaseURI creates an instance of the MarketplacesByBillingAccountClient 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 MarketplacesByBillingAccountClient) List(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
List lists the marketplaces for a scope by billingAccountId and current billing period. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: billingAccountID - billingAccount ID 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 MarketplacesByBillingAccountClient) ListByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
ListByBillingPeriod lists the marketplaces for a scope by billing period and billingAccountId. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: billingAccountID - billingAccount ID billingPeriodName - billing Period Name. 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 MarketplacesByBillingAccountClient) ListByBillingPeriodComplete(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesByBillingAccountClient) ListByBillingPeriodPreparer(ctx context.Context, billingAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client MarketplacesByBillingAccountClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client MarketplacesByBillingAccountClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client MarketplacesByBillingAccountClient) ListComplete(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesByBillingAccountClient) ListPreparer(ctx context.Context, billingAccountID string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListPreparer prepares the List request.
func (client MarketplacesByBillingAccountClient) 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 MarketplacesByBillingAccountClient) 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.
MarketplacesByDepartmentClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type MarketplacesByDepartmentClient struct { BaseClient }
func NewMarketplacesByDepartmentClient(subscriptionID string) MarketplacesByDepartmentClient
NewMarketplacesByDepartmentClient creates an instance of the MarketplacesByDepartmentClient client.
func NewMarketplacesByDepartmentClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByDepartmentClient
NewMarketplacesByDepartmentClientWithBaseURI creates an instance of the MarketplacesByDepartmentClient 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 MarketplacesByDepartmentClient) List(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
List lists the marketplaces for a scope by departmentId and current billing period. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: departmentID - department ID 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 MarketplacesByDepartmentClient) ListByBillingPeriod(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
ListByBillingPeriod lists the marketplaces for a scope by billing period and departmentId. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: departmentID - department ID billingPeriodName - billing Period Name. 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 MarketplacesByDepartmentClient) ListByBillingPeriodComplete(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesByDepartmentClient) ListByBillingPeriodPreparer(ctx context.Context, departmentID string, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client MarketplacesByDepartmentClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client MarketplacesByDepartmentClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client MarketplacesByDepartmentClient) ListComplete(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesByDepartmentClient) ListPreparer(ctx context.Context, departmentID string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListPreparer prepares the List request.
func (client MarketplacesByDepartmentClient) 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 MarketplacesByDepartmentClient) 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.
MarketplacesByEnrollmentAccountsClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type MarketplacesByEnrollmentAccountsClient struct { BaseClient }
func NewMarketplacesByEnrollmentAccountsClient(subscriptionID string) MarketplacesByEnrollmentAccountsClient
NewMarketplacesByEnrollmentAccountsClient creates an instance of the MarketplacesByEnrollmentAccountsClient client.
func NewMarketplacesByEnrollmentAccountsClientWithBaseURI(baseURI string, subscriptionID string) MarketplacesByEnrollmentAccountsClient
NewMarketplacesByEnrollmentAccountsClientWithBaseURI creates an instance of the MarketplacesByEnrollmentAccountsClient 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 MarketplacesByEnrollmentAccountsClient) List(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
List lists the marketplaces for a scope by enrollmentAccountId and current billing period. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: enrollmentAccountID - enrollmentAccount ID 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 MarketplacesByEnrollmentAccountsClient) ListByBillingPeriod(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
ListByBillingPeriod lists the marketplaces for a scope by billing period and enrollmentAccountId. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: enrollmentAccountID - enrollmentAccount ID billingPeriodName - billing Period Name. 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 MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodPreparer(ctx context.Context, enrollmentAccountID string, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client MarketplacesByEnrollmentAccountsClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client MarketplacesByEnrollmentAccountsClient) ListComplete(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesByEnrollmentAccountsClient) ListPreparer(ctx context.Context, enrollmentAccountID string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListPreparer prepares the List request.
func (client MarketplacesByEnrollmentAccountsClient) 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 MarketplacesByEnrollmentAccountsClient) 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.
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, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
List lists the marketplaces for a scope by subscriptionId and current billing period. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: 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) ListByBillingPeriod(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultPage, err error)
ListByBillingPeriod lists the marketplaces for a scope by billing period and subscriptionId. Marketplaces are available via this API only for May 1, 2014 or later. Parameters: billingPeriodName - billing Period Name. 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) ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (result MarketplacesListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client MarketplacesClient) ListByBillingPeriodPreparer(ctx context.Context, billingPeriodName string, filter string, top *int32, skiptoken string) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client MarketplacesClient) ListByBillingPeriodResponder(resp *http.Response) (result MarketplacesListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client MarketplacesClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client MarketplacesClient) ListComplete(ctx context.Context, 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, 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"` }
func (md MeterDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for MeterDetails.
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: 'EqualTo', 'GreaterThan', 'GreaterThanOrEqualTo' 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. 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. ContactGroups *[]string `json:"contactGroups,omitempty"` }
Operation a Consumption REST API operation.
type Operation struct { // 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"` }
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 ( // EqualTo ... EqualTo OperatorType = "EqualTo" // GreaterThan ... GreaterThan OperatorType = "GreaterThan" // GreaterThanOrEqualTo ... GreaterThanOrEqualTo 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"` }
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"` }
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"` // 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.
ReservationDetails reservation details resource.
type ReservationDetails struct { *ReservationDetailsProperties `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 map[string]*string `json:"tags"` }
func (rd ReservationDetails) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationDetails.
func (rd *ReservationDetails) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationDetails struct.
ReservationDetailsListResult result of listing reservation details.
type ReservationDetailsListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of reservation details. Value *[]ReservationDetails `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 ReservationDetails 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() ReservationDetails
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 ReservationDetails 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() []ReservationDetails
Values returns the slice of values for the current page or nil if there are no values.
ReservationDetailsProperties the properties of the reservation details.
type ReservationDetailsProperties 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 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"` }
func (rdp ReservationDetailsProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationDetailsProperties.
ReservationRecommendations reservation recommendations resource.
type ReservationRecommendations 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 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"` *ReservationRecommendationsProperties `json:"properties,omitempty"` }
func (rr ReservationRecommendations) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendations.
func (rr *ReservationRecommendations) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationRecommendations struct.
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, filter string) (result ReservationRecommendationsListResultPage, err error)
List list of recommendations for purchasing reserved instances. Parameters: filter - may be used to filter reservationRecommendations by properties/scope and properties/lookBackPeriod.
func (client ReservationRecommendationsClient) ListComplete(ctx context.Context, filter string) (result ReservationRecommendationsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReservationRecommendationsClient) ListPreparer(ctx context.Context, 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 *[]ReservationRecommendations `json:"value,omitempty"` // NextLink - READ-ONLY; The link (url) to the next page of results. NextLink *string `json:"nextLink,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.
ReservationRecommendationsListResultIterator provides access to a complete listing of ReservationRecommendations 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() ReservationRecommendations
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 ReservationRecommendations 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() []ReservationRecommendations
Values returns the slice of values for the current page or nil if there are no values.
ReservationRecommendationsProperties the properties of the reservation recommendations.
type ReservationRecommendationsProperties struct { // LookBackPeriod - READ-ONLY; The number of days of usage to look back for recommendations. LookBackPeriod *string `json:"lookBackPeriod,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 *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"` }
func (rrp ReservationRecommendationsProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationRecommendationsProperties.
ReservationSummaries reservation summaries resource.
type ReservationSummaries struct { *ReservationSummariesProperties `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 map[string]*string `json:"tags"` }
func (rs ReservationSummaries) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationSummaries.
func (rs *ReservationSummaries) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for ReservationSummaries struct.
ReservationSummariesListResult result of listing reservation summaries.
type ReservationSummariesListResult struct { autorest.Response `json:"-"` // Value - READ-ONLY; The list of reservation summaries. Value *[]ReservationSummaries `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 ReservationSummaries 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() ReservationSummaries
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 ReservationSummaries 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() []ReservationSummaries
Values returns the slice of values for the current page or nil if there are no values.
ReservationSummariesProperties the properties of the reservation summaries.
type ReservationSummariesProperties 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"` }
func (rsp ReservationSummariesProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for ReservationSummariesProperties.
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) 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.
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) 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.
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"` // 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.
Tag the tag resource.
type Tag struct { // Key - Tag key. Key *string `json:"key,omitempty"` }
TagProperties the properties of the tag.
type TagProperties struct { // Tags - A list of Tag. Tags *[]Tag `json:"tags,omitempty"` }
Tags a resource listing all tags.
type Tags 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 (t Tags) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for Tags.
func (t *Tags) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for Tags struct.
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, billingAccountID string) (result Tags, err error)
Get get all available tag keys for a billing account. Parameters: billingAccountID - billingAccount ID
func (client TagsClient) GetPreparer(ctx context.Context, billingAccountID string) (*http.Request, error)
GetPreparer prepares the Get request.
func (client TagsClient) GetResponder(resp *http.Response) (result Tags, 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.
TimeGrainType enumerates the values for time grain type.
type TimeGrainType string
const ( // Annually ... Annually TimeGrainType = "Annually" // Monthly ... Monthly TimeGrainType = "Monthly" // Quarterly ... Quarterly 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 { *UsageDetailProperties `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 map[string]*string `json:"tags"` }
func (ud UsageDetail) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for UsageDetail.
func (ud *UsageDetail) UnmarshalJSON(body []byte) error
UnmarshalJSON is the custom unmarshaler for UsageDetail struct.
UsageDetailProperties the properties of the usage detail.
type UsageDetailProperties struct { // BillingPeriodID - READ-ONLY; The id of the billing period resource that the usage belongs to. BillingPeriodID *string `json:"billingPeriodId,omitempty"` // InvoiceID - READ-ONLY; The id of the invoice resource that the usage belongs to. InvoiceID *string `json:"invoiceId,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"` // 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"` // InstanceLocation - READ-ONLY; The location of the resource instance that the usage is about. InstanceLocation *string `json:"instanceLocation,omitempty"` // Currency - READ-ONLY; The ISO currency in which the meter is charged, for example, USD. Currency *string `json:"currency,omitempty"` // UsageQuantity - READ-ONLY; The quantity of usage. UsageQuantity *decimal.Decimal `json:"usageQuantity,omitempty"` // BillableQuantity - READ-ONLY; The billable usage quantity. BillableQuantity *decimal.Decimal `json:"billableQuantity,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"` // 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"` // 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"` // Product - READ-ONLY; Product name. Product *string `json:"product,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"` }
func (UDP UsageDetailProperties) MarshalJSON() ([]byte, error)
MarshalJSON is the custom marshaler for UsageDetailProperties.
UsageDetailsByBillingAccountClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type UsageDetailsByBillingAccountClient struct { BaseClient }
func NewUsageDetailsByBillingAccountClient(subscriptionID string) UsageDetailsByBillingAccountClient
NewUsageDetailsByBillingAccountClient creates an instance of the UsageDetailsByBillingAccountClient client.
func NewUsageDetailsByBillingAccountClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByBillingAccountClient
NewUsageDetailsByBillingAccountClientWithBaseURI creates an instance of the UsageDetailsByBillingAccountClient 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 UsageDetailsByBillingAccountClient) List(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error)
List lists the usage details by billingAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: billingAccountID - billingAccount ID expand - may be used to expand the properties/additionalProperties 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/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId 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 (:). 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. apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
func (client UsageDetailsByBillingAccountClient) ListByBillingPeriod(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error)
ListByBillingPeriod lists the usage details based on billingAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: billingAccountID - billingAccount ID billingPeriodName - billing Period Name. expand - may be used to expand the properties/additionalProperties 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/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'. Tag filter is a key value pair string where key and value is separated by a colon (:). apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period 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.
func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodComplete(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodPreparer(ctx context.Context, billingAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client UsageDetailsByBillingAccountClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client UsageDetailsByBillingAccountClient) ListComplete(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsByBillingAccountClient) ListPreparer(ctx context.Context, billingAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (*http.Request, error)
ListPreparer prepares the List request.
func (client UsageDetailsByBillingAccountClient) 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 UsageDetailsByBillingAccountClient) 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.
UsageDetailsByDepartmentClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type UsageDetailsByDepartmentClient struct { BaseClient }
func NewUsageDetailsByDepartmentClient(subscriptionID string) UsageDetailsByDepartmentClient
NewUsageDetailsByDepartmentClient creates an instance of the UsageDetailsByDepartmentClient client.
func NewUsageDetailsByDepartmentClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByDepartmentClient
NewUsageDetailsByDepartmentClientWithBaseURI creates an instance of the UsageDetailsByDepartmentClient 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 UsageDetailsByDepartmentClient) List(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error)
List lists the usage details by departmentId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: departmentID - department ID expand - may be used to expand the properties/additionalProperties 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/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId 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 (:). 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. apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
func (client UsageDetailsByDepartmentClient) ListByBillingPeriod(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error)
ListByBillingPeriod lists the usage details based on departmentId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: departmentID - department ID billingPeriodName - billing Period Name. expand - may be used to expand the properties/additionalProperties 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/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'. Tag filter is a key value pair string where key and value is separated by a colon (:). apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period 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.
func (client UsageDetailsByDepartmentClient) ListByBillingPeriodComplete(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsByDepartmentClient) ListByBillingPeriodPreparer(ctx context.Context, departmentID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client UsageDetailsByDepartmentClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client UsageDetailsByDepartmentClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client UsageDetailsByDepartmentClient) ListComplete(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsByDepartmentClient) ListPreparer(ctx context.Context, departmentID string, expand string, filter string, skiptoken string, top *int32, apply string) (*http.Request, error)
ListPreparer prepares the List request.
func (client UsageDetailsByDepartmentClient) 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 UsageDetailsByDepartmentClient) 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.
UsageDetailsByEnrollmentAccountClient is the consumption management client provides access to consumption resources for Azure Enterprise Subscriptions.
type UsageDetailsByEnrollmentAccountClient struct { BaseClient }
func NewUsageDetailsByEnrollmentAccountClient(subscriptionID string) UsageDetailsByEnrollmentAccountClient
NewUsageDetailsByEnrollmentAccountClient creates an instance of the UsageDetailsByEnrollmentAccountClient client.
func NewUsageDetailsByEnrollmentAccountClientWithBaseURI(baseURI string, subscriptionID string) UsageDetailsByEnrollmentAccountClient
NewUsageDetailsByEnrollmentAccountClientWithBaseURI creates an instance of the UsageDetailsByEnrollmentAccountClient 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 UsageDetailsByEnrollmentAccountClient) List(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error)
List lists the usage details by enrollmentAccountId for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: enrollmentAccountID - enrollmentAccount ID expand - may be used to expand the properties/additionalProperties 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/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId 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 (:). 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. apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriod(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error)
ListByBillingPeriod lists the usage details based on enrollmentAccountId for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: enrollmentAccountID - enrollmentAccount ID billingPeriodName - billing Period Name. expand - may be used to expand the properties/additionalProperties 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/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'. Tag filter is a key value pair string where key and value is separated by a colon (:). apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period 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.
func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodComplete(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodPreparer(ctx context.Context, enrollmentAccountID string, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client UsageDetailsByEnrollmentAccountClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client UsageDetailsByEnrollmentAccountClient) ListComplete(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsByEnrollmentAccountClient) ListPreparer(ctx context.Context, enrollmentAccountID string, expand string, filter string, skiptoken string, top *int32, apply string) (*http.Request, error)
ListPreparer prepares the List request.
func (client UsageDetailsByEnrollmentAccountClient) 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 UsageDetailsByEnrollmentAccountClient) 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.
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, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultPage, err error)
List lists the usage details for a scope by current billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: expand - may be used to expand the properties/additionalProperties 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/usageEnd (Utc time), properties/usageStart (Utc time), properties/resourceGroup, properties/instanceName, properties/instanceId 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 (:). 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. apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart)
func (client UsageDetailsClient) ListByBillingPeriod(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultPage, err error)
ListByBillingPeriod lists the usage details for a scope by billing period. Usage details are available via this API only for May 1, 2014 or later. Parameters: billingPeriodName - billing Period Name. expand - may be used to expand the properties/additionalProperties 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/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'. Tag filter is a key value pair string where key and value is separated by a colon (:). apply - oData apply expression to aggregate usageDetails by tags or (tags and properties/usageStart) for specified billing period 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.
func (client UsageDetailsClient) ListByBillingPeriodComplete(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (result UsageDetailsListResultIterator, err error)
ListByBillingPeriodComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsClient) ListByBillingPeriodPreparer(ctx context.Context, billingPeriodName string, expand string, filter string, apply string, skiptoken string, top *int32) (*http.Request, error)
ListByBillingPeriodPreparer prepares the ListByBillingPeriod request.
func (client UsageDetailsClient) ListByBillingPeriodResponder(resp *http.Response) (result UsageDetailsListResult, err error)
ListByBillingPeriodResponder handles the response to the ListByBillingPeriod request. The method always closes the http.Response Body.
func (client UsageDetailsClient) ListByBillingPeriodSender(req *http.Request) (*http.Response, error)
ListByBillingPeriodSender sends the ListByBillingPeriod request. The method will close the http.Response Body if it receives an error.
func (client UsageDetailsClient) ListComplete(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (result UsageDetailsListResultIterator, err error)
ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageDetailsClient) ListPreparer(ctx context.Context, expand string, filter string, skiptoken string, top *int32, apply string) (*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 *[]UsageDetail `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.
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() UsageDetail
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 UsageDetail 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() []UsageDetail
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. |