azure.mgmt.commerce.operations module

class azure.mgmt.commerce.operations.UsageAggregatesOperations(client, config, serializer, deserializer)[source]

Bases: object

UsageAggregatesOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client Api Version. Constant value: “2015-06-01-preview”.

list(reported_start_time, reported_end_time, show_details=None, aggregation_granularity='Daily', continuation_token=None, custom_headers=None, raw=False, **operation_config)[source]

Query aggregated Azure subscription consumption data for a date range.

Parameters
  • reported_start_time (datetime) – The start of the time range to retrieve data for.

  • reported_end_time (datetime) – The end of the time range to retrieve data for.

  • 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. Possible values include: ‘Daily’, ‘Hourly’

  • continuation_token (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.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

An iterator like instance of UsageAggregation

Return type

UsageAggregationPaged[UsageAggregation]

Raises

ErrorResponseException

models = <module 'azure.mgmt.commerce.models' from '/home/vsts/work/1/s/sdk/commerce/azure-mgmt-commerce/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/commerce/models/__init__.py'>
class azure.mgmt.commerce.operations.RateCardOperations(client, config, serializer, deserializer)[source]

Bases: object

RateCardOperations operations.

Parameters
  • client – Client for service requests.

  • config – Configuration of service client.

  • serializer – An object model serializer.

  • deserializer – An object model deserializer.

Variables

api_version – Client Api Version. Constant value: “2015-06-01-preview”.

get(filter, custom_headers=None, raw=False, **operation_config)[source]

Enables you to query for the resource/meter metadata and related prices used in a given subscription by Offer ID, Currency, Locale and Region. The metadata associated with the billing meters, including but not limited to service names, types, resources, units of measure, and regions, is subject to change at any time and without notice. If you intend to use this billing data in an automated fashion, please use the billing meter GUID to uniquely identify each billable item. If the billing meter GUID is scheduled to change due to a new billing model, you will be notified in advance of the change. .

Parameters
  • filter (str) – The filter to apply on the operation. It ONLY supports the ‘eq’ and ‘and’ logical operators at this time. All the 4 query parameters ‘OfferDurableId’, ‘Currency’, ‘Locale’, ‘Region’ are required to be a part of the $filter.

  • custom_headers (dict) – headers that will be added to the request

  • raw (bool) – returns the direct response alongside the deserialized response

  • operation_configOperation configuration overrides.

Returns

ResourceRateCardInfo or ClientRawResponse if raw=true

Return type

ResourceRateCardInfo or ClientRawResponse

Raises

ErrorResponseException

models = <module 'azure.mgmt.commerce.models' from '/home/vsts/work/1/s/sdk/commerce/azure-mgmt-commerce/.tox/sphinx/lib/python3.6/site-packages/azure/mgmt/commerce/models/__init__.py'>