aggregated_cost
Creates, updates, deletes, gets or lists an aggregated_cost resource.
Overview
| Name | aggregated_cost |
| Type | Resource |
| Id | azure.consumption.aggregated_cost |
Fields
The following fields are returned by SELECT queries:
- get_for_billing_period_by_management_group
- get_by_management_group
| 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. |
azureCharges | number | Azure Charges. |
billingPeriodId | string | The id of the billing period resource that the aggregated cost belongs to. |
chargesBilledSeparately | number | Charges Billed Separately. |
children | array | Children of a management group. |
currency | string | The ISO currency in which the meter is charged, for example, USD. |
etag | string | The etag for the resource. |
excludedSubscriptions | array | List of subscription Guids excluded from the calculation of aggregated cost. |
includedSubscriptions | array | List of subscription Guids included in the calculation of aggregated cost. |
marketplaceCharges | number | Marketplace Charges. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usageEnd | string (date-time) | The end of the date time range covered by the aggregated cost. |
usageStart | string (date-time) | The start of the date time range covered by aggregated cost. |
| 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. |
azureCharges | number | Azure Charges. |
billingPeriodId | string | The id of the billing period resource that the aggregated cost belongs to. |
chargesBilledSeparately | number | Charges Billed Separately. |
children | array | Children of a management group. |
currency | string | The ISO currency in which the meter is charged, for example, USD. |
etag | string | The etag for the resource. |
excludedSubscriptions | array | List of subscription Guids excluded from the calculation of aggregated cost. |
includedSubscriptions | array | List of subscription Guids included in the calculation of aggregated cost. |
marketplaceCharges | number | Marketplace Charges. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usageEnd | string (date-time) | The end of the date time range covered by the aggregated cost. |
usageStart | string (date-time) | The start of the date time range covered by aggregated cost. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_for_billing_period_by_management_group | select | management_group_id, billing_period_name | Provides the aggregate cost of a management group and all child management groups by specified billing period. | |
get_by_management_group | select | management_group_id | $filter | Provides the aggregate cost of a management group and all child management groups by current billing period. |
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_period_name | string | Billing Period Name. Required. |
management_group_id | string | Order Id of the reservation. Required. |
$filter | string | Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Default value is None. |
SELECT examples
- get_for_billing_period_by_management_group
- get_by_management_group
Provides the aggregate cost of a management group and all child management groups by specified billing period.
SELECT
id,
name,
azureCharges,
billingPeriodId,
chargesBilledSeparately,
children,
currency,
etag,
excludedSubscriptions,
includedSubscriptions,
marketplaceCharges,
systemData,
tags,
type,
usageEnd,
usageStart
FROM azure.consumption.aggregated_cost
WHERE management_group_id = '{{ management_group_id }}' -- required
AND billing_period_name = '{{ billing_period_name }}' -- required
;
Provides the aggregate cost of a management group and all child management groups by current billing period.
SELECT
id,
name,
azureCharges,
billingPeriodId,
chargesBilledSeparately,
children,
currency,
etag,
excludedSubscriptions,
includedSubscriptions,
marketplaceCharges,
systemData,
tags,
type,
usageEnd,
usageStart
FROM azure.consumption.aggregated_cost
WHERE management_group_id = '{{ management_group_id }}' -- required
AND $filter = '{{ $filter }}'
;