Skip to main content

aggregated_cost

Creates, updates, deletes, gets or lists an aggregated_cost resource.

Overview

Nameaggregated_cost
TypeResource
Idazure.consumption.aggregated_cost

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.
azureChargesnumberAzure Charges.
billingPeriodIdstringThe id of the billing period resource that the aggregated cost belongs to.
chargesBilledSeparatelynumberCharges Billed Separately.
childrenarrayChildren of a management group.
currencystringThe ISO currency in which the meter is charged, for example, USD.
etagstringThe etag for the resource.
excludedSubscriptionsarrayList of subscription Guids excluded from the calculation of aggregated cost.
includedSubscriptionsarrayList of subscription Guids included in the calculation of aggregated cost.
marketplaceChargesnumberMarketplace Charges.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
usageEndstring (date-time)The end of the date time range covered by the aggregated cost.
usageStartstring (date-time)The start of the date time range covered by aggregated cost.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_for_billing_period_by_management_groupselectmanagement_group_id, billing_period_nameProvides the aggregate cost of a management group and all child management groups by specified billing period.
get_by_management_groupselectmanagement_group_id$filterProvides 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.

NameDatatypeDescription
billing_period_namestringBilling Period Name. Required.
management_group_idstringOrder Id of the reservation. Required.
$filterstringRequired 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

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
;