balances
Creates, updates, deletes, gets or lists a balances resource.
Overview
| Name | balances |
| Type | Resource |
| Id | azure.consumption.balances |
Fields
The following fields are returned by SELECT queries:
- get_for_billing_period_by_billing_account
- get_by_billing_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
adjustmentDetails | array | List of Adjustments (Promo credit, SIE credit etc.). |
adjustments | number | Total adjustment amount. |
azureMarketplaceServiceCharges | number | Total charges for Azure Marketplace. |
beginningBalance | number | The beginning balance for the billing period. |
billingFrequency | string | The billing frequency. Known values are: "Month", "Quarter", and "Year". (Month, Quarter, Year) |
chargesBilledSeparately | number | Charges Billed separately. |
currency | string | The ISO currency in which the meter is charged, for example, USD. |
endingBalance | number | The ending balance for the billing period (for open periods this will be updated daily). |
etag | string | The etag for the resource. |
newPurchases | number | Total new purchase amount. |
newPurchasesDetails | array | List of new purchases. |
overageRefund | number | Overage Refunds. |
priceHidden | boolean | Price is hidden or not. |
serviceOverage | number | Overage for Azure services. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
totalOverage | number | serviceOverage + chargesBilledSeparately. |
totalUsage | number | Azure service commitment + total Overage. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
utilized | number | Total Commitment usage. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
adjustmentDetails | array | List of Adjustments (Promo credit, SIE credit etc.). |
adjustments | number | Total adjustment amount. |
azureMarketplaceServiceCharges | number | Total charges for Azure Marketplace. |
beginningBalance | number | The beginning balance for the billing period. |
billingFrequency | string | The billing frequency. Known values are: "Month", "Quarter", and "Year". (Month, Quarter, Year) |
chargesBilledSeparately | number | Charges Billed separately. |
currency | string | The ISO currency in which the meter is charged, for example, USD. |
endingBalance | number | The ending balance for the billing period (for open periods this will be updated daily). |
etag | string | The etag for the resource. |
newPurchases | number | Total new purchase amount. |
newPurchasesDetails | array | List of new purchases. |
overageRefund | number | Overage Refunds. |
priceHidden | boolean | Price is hidden or not. |
serviceOverage | number | Overage for Azure services. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
totalOverage | number | serviceOverage + chargesBilledSeparately. |
totalUsage | number | Azure service commitment + total Overage. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
utilized | number | Total Commitment usage. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_for_billing_period_by_billing_account | select | billing_account_id, billing_period_name | Gets 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_account | select | billing_account_id | Gets 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.
| Name | Datatype | Description |
|---|---|---|
billing_account_id | string | BillingAccount ID. Required. |
billing_period_name | string | Billing Period Name. Required. |
SELECT examples
- get_for_billing_period_by_billing_account
- get_by_billing_account
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
;
Gets the balances for a scope by 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
;