Compartilhar via


UsageAggregatesOperations Class

UsageAggregatesOperations 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.object
UsageAggregatesOperations

Constructor

UsageAggregatesOperations(client, config, serializer, deserializer)

Parameters

Name Description
client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

Name Description
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: bool | None = None, aggregation_granularity: str | '_models.AggregationGranularity' | None = 'Daily', continuation_token_parameter: str | None = None, **kwargs: Any) -> Iterable['_models.UsageAggregationListResult']

Parameters

Name Description
reported_start_time
Required

The start of the time range to retrieve data for.

reported_end_time
Required

The end of the time range to retrieve data for.

show_details

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).

Default value: None
aggregation_granularity

Daily (default) returns the data in daily granularity, Hourly returns the data in hourly granularity.

Default value: Daily
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.

Default value: None

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

An iterator like instance of either UsageAggregationListResult or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.commerce.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\commerce\\models\\__init__.py'>