Skip to main content

balances

Creates, updates, deletes, gets or lists a balances resource.

Overview

Namebalances
TypeResource
Idazure.consumption.balances

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
adjustmentDetailsarrayList of Adjustments (Promo credit, SIE credit etc.).
adjustmentsnumberTotal adjustment amount.
azureMarketplaceServiceChargesnumberTotal charges for Azure Marketplace.
beginningBalancenumberThe beginning balance for the billing period.
billingFrequencystringThe billing frequency. Known values are: "Month", "Quarter", and "Year". (Month, Quarter, Year)
chargesBilledSeparatelynumberCharges Billed separately.
currencystringThe ISO currency in which the meter is charged, for example, USD.
endingBalancenumberThe ending balance for the billing period (for open periods this will be updated daily).
etagstringThe etag for the resource.
newPurchasesnumberTotal new purchase amount.
newPurchasesDetailsarrayList of new purchases.
overageRefundnumberOverage Refunds.
priceHiddenbooleanPrice is hidden or not.
serviceOveragenumberOverage for Azure services.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
totalOveragenumberserviceOverage + chargesBilledSeparately.
totalUsagenumberAzure service commitment + total Overage.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
utilizednumberTotal Commitment usage.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_for_billing_period_by_billing_accountselectbilling_account_id, billing_period_nameGets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later.
get_by_billing_accountselectbilling_account_idGets the balances for a scope by billingAccountId. Balances are available via this API only for May 1, 2014 or later.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
billing_account_idstringBillingAccount ID. Required.
billing_period_namestringBilling Period Name. Required.

SELECT examples

Gets the balances for a scope by billing period and billingAccountId. Balances are available via this API only for May 1, 2014 or later.

SELECT
id,
name,
adjustmentDetails,
adjustments,
azureMarketplaceServiceCharges,
beginningBalance,
billingFrequency,
chargesBilledSeparately,
currency,
endingBalance,
etag,
newPurchases,
newPurchasesDetails,
overageRefund,
priceHidden,
serviceOverage,
systemData,
tags,
totalOverage,
totalUsage,
type,
utilized
FROM azure.consumption.balances
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND billing_period_name = '{{ billing_period_name }}' -- required
;