in desktop/src/app/services/azure-cost-management/azure-cost-management.service.ts [185:226]
private _buildQuery(timeRange: TimeRange, resourceIds: string[] = []): AzureCostQuery {
return {
type: "Usage",
timeframe: "Custom",
timePeriod: {
from: timeRange.start.toISOString(),
to: timeRange.end.toISOString(),
},
dataSet: {
granularity: "Daily",
aggregation: {
totalCost: {
name: "PreTaxCost",
function: "Sum",
},
},
sorting: [
{
direction: "ascending",
name: "UsageDate",
},
],
grouping: [
{
type: "Dimension",
name: CostManagementDimensions.ResourceId,
},
],
filter: {
Dimensions: {
Name: "ResourceType",
Operator: "In",
Values: [
"Microsoft.Batch/batchaccounts",
"Microsoft.Batch/batchaccounts/batchpools",
"Microsoft.Batch/batchaccounts/pools",
],
},
},
},
};
}