azure.mgmt.consumption.operations module

class azure.mgmt.consumption.operations.UsageDetailsOperations(client, config, serializer, deserializer)[source]

Bases: object

UsageDetailsOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Version of the API to be used with the client request. The current version is 2017-02-27-preview. Constant value: “2017-04-24-preview”.

list(scope, expand=None, filter=None, skiptoken=None, top=None, custom_headers=None, raw=False, **operation_config)[source]

Lists the usage details for a scope in reverse chronological order by billing period. Usage details are available via this API only for January 1, 2017 or later.

Parameters:
  • scope (str) – The scope of the usage details. The scope can be ‘/subscriptions/{subscriptionId}’ for a subscription, or ‘/subscriptions/{subscriptionId}/providers/Microsoft.Billing/invoices/{invoiceName}’ for an invoice or ‘/subscriptions/{subscriptionId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}’ for a billing perdiod.
  • expand (str) – May be used to expand the additionalProperties or meterDetails property within a list of usage details. By default, these fields are not included when listing usage details.
  • filter (str) – May be used to filter usageDetails by usageEnd (Utc time). The filter supports ‘eq’, ‘lt’, ‘gt’, ‘le’, ‘ge’, and ‘and’. It does not currently support ‘ne’, ‘or’, or ‘not’.
  • skiptoken (str) – Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.
  • top (int) – May be used to limit the number of results to the most recent N usageDetails.
  • 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.
Return type:

UsageDetailPaged

Raises:

ErrorResponseException

class azure.mgmt.consumption.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Version of the API to be used with the client request. The current version is 2017-02-27-preview. Constant value: “2017-04-24-preview”.

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

Lists all of the available consumption REST API operations.

Parameters:
Return type:

OperationPaged

Raises:

ErrorResponseException