UsageAggregatesOperations Class
UsageAggregatesOperations async operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectUsageAggregatesOperations
Constructor
UsageAggregatesOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
Methods
| list |
Query aggregated Azure subscription consumption data for a date range. |
list
Query aggregated Azure subscription consumption data for a date range.
list(reported_start_time: datetime.datetime, reported_end_time: datetime.datetime, show_details: Optional[bool] = None, aggregation_granularity: Optional[Union[str, azure.mgmt.commerce.models._usage_management_client_enums.AggregationGranularity]] = 'Daily', continuation_token_parameter: Optional[str] = None, **kwargs) -> AsyncIterable[azure.mgmt.commerce.models._models_py3.UsageAggregationListResult]
Parameters
- show_details
- bool
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).
- aggregation_granularity
- str or AggregationGranularity
Daily (default) returns the data in daily granularity,
Hourly returns the data in hourly granularity.
- continuation_token_parameter
- str
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.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either UsageAggregationListResult or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.commerce.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\commerce\\models\\__init__.py'>
Feedback
Submit and view feedback for