usage_aggregates
Creates, updates, deletes, gets or lists a usage_aggregates
resource.
Overview
Name | usage_aggregates |
Type | Resource |
Id | azure_extras.commerce.usage_aggregates |
Fields
The following fields are returned by SELECT
queries:
- list
Normal response for a successful query. The response body will contain the data that matches the filters specified in the query parameters.
Name | Datatype | Description |
---|---|---|
id | string | Unique Id for the usage aggregate. |
name | string | Name of the usage aggregate. |
properties | object | Usage data. |
type | string | Type of the resource being returned. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | reportedStartTime , reportedEndTime , subscriptionId | showDetails , aggregationGranularity , continuationToken | Query aggregated Azure subscription consumption data for a date range. |
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 |
---|---|---|
reportedEndTime | string (date-time) | The end of the time range to retrieve data for. |
reportedStartTime | string (date-time) | The start of the time range to retrieve data for. |
subscriptionId | string | It uniquely identifies Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
aggregationGranularity | string | Daily (default) returns the data in daily granularity, Hourly returns the data in hourly granularity. |
continuationToken | string | Used when a continuation token string is provided in the response body of the previous call, enabling paging through a large result set. If not present, the data is retrieved from the beginning of the day/hour (based on the granularity) passed in. |
showDetails | boolean | True returns usage data in instance-level detail, false causes server-side aggregation with fewer details. For example, if you have 3 website instances, by default you will get 3 line items for website consumption. If you specify showDetails = false, the data will be aggregated as a single line item for website consumption within the time period (for the given subscriptionId, meterId, usageStartTime and usageEndTime). |
SELECT
examples
- list
Query aggregated Azure subscription consumption data for a date range.
SELECT
id,
name,
properties,
type
FROM azure_extras.commerce.usage_aggregates
WHERE reportedStartTime = '{{ reportedStartTime }}' -- required
AND reportedEndTime = '{{ reportedEndTime }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND showDetails = '{{ showDetails }}'
AND aggregationGranularity = '{{ aggregationGranularity }}'
AND continuationToken = '{{ continuationToken }}'
;