Interface UsageAggregatesClient
public interface UsageAggregatesClient
An instance of this class provides access to all the operations defined in UsageAggregatesClient.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.http.rest.PagedIterable<UsageAggregationInner>
list
(OffsetDateTime reportedStartTime, OffsetDateTime reportedEndTime) Query aggregated Azure subscription consumption data for a date range.com.azure.core.http.rest.PagedIterable<UsageAggregationInner>
list
(OffsetDateTime reportedStartTime, OffsetDateTime reportedEndTime, Boolean showDetails, AggregationGranularity aggregationGranularity, String continuationToken, com.azure.core.util.Context context) Query aggregated Azure subscription consumption data for a date range.
-
Method Details
-
list
com.azure.core.http.rest.PagedIterable<UsageAggregationInner> list(OffsetDateTime reportedStartTime, OffsetDateTime reportedEndTime) Query aggregated Azure subscription consumption data for a date range.- Parameters:
reportedStartTime
- The start of the time range to retrieve data for.reportedEndTime
- The end of the time range to retrieve data for.- Returns:
- the Get UsageAggregates operation response as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
list
com.azure.core.http.rest.PagedIterable<UsageAggregationInner> list(OffsetDateTime reportedStartTime, OffsetDateTime reportedEndTime, Boolean showDetails, AggregationGranularity aggregationGranularity, String continuationToken, com.azure.core.util.Context context) Query aggregated Azure subscription consumption data for a date range.- Parameters:
reportedStartTime
- The start of the time range to retrieve data for.reportedEndTime
- The end of the time range to retrieve data for.showDetails
- `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).aggregationGranularity
- `Daily` (default) returns the data in daily granularity, `Hourly` returns the data in hourly granularity.continuationToken
- 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.context
- The context to associate with this operation.- Returns:
- the Get UsageAggregates operation response as paginated response with
PagedIterable
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.management.exception.ManagementException
- thrown if the request is rejected by server.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-