Edit query body to aggregate by month

This commit is contained in:
graham-dds 2020-02-05 11:06:50 -05:00
parent ec9da2d1c1
commit 5716e20b9e
2 changed files with 2 additions and 2 deletions

View File

@ -1060,7 +1060,7 @@ class AzureCloudProvider(CloudProviderInterface):
"timeframe": "Custom", "timeframe": "Custom",
"timePeriod": {"from": payload.from_date, "to": payload.to_date,}, "timePeriod": {"from": payload.from_date, "to": payload.to_date,},
"dataset": { "dataset": {
"granularity": "Daily", "granularity": "Monthly",
"aggregation": {"totalCost": {"name": "PreTaxCost", "function": "Sum"}}, "aggregation": {"totalCost": {"name": "PreTaxCost", "function": "Sum"}},
"grouping": [{"type": "Dimension", "name": "InvoiceId"}], "grouping": [{"type": "Dimension", "name": "InvoiceId"}],
}, },

View File

@ -463,7 +463,7 @@ class MockCloudProvider(CloudProviderInterface):
**dict( **dict(
columns=[ columns=[
{"name": "PreTaxCost", "type": "Number"}, {"name": "PreTaxCost", "type": "Number"},
{"name": "UsageDate", "type": "Number"}, {"name": "BillingMonth", "type": "Datetime"},
{"name": "InvoiceId", "type": "String"}, {"name": "InvoiceId", "type": "String"},
{"name": "Currency", "type": "String"}, {"name": "Currency", "type": "String"},
], ],