azure.mgmt.consumption.models module

class azure.mgmt.consumption.models.MeterDetails[source]

Bases: msrest.serialization.Model

The properties of the meter detail.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • meter_name (str) – The name of the meter, within the given meter category

  • meter_category (str) – The category of the meter, for example, ‘Cloud services’, ‘Networking’, etc..

  • meter_sub_category (str) – The subcategory of the meter, for example, ‘A6 Cloud services’, ‘ExpressRoute (IXP)’, etc..

  • unit (str) – The unit in which the meter consumption is charged, for example, ‘Hours’, ‘GB’, etc.

  • meter_location (str) – The location in which the Azure service is available.

  • total_included_quantity (decimal.Decimal) – The total included quantity associated with the offer.

  • pretax_standard_rate (decimal.Decimal) – The pretax listing price.

class azure.mgmt.consumption.models.UsageDetail[source]

Bases: azure.mgmt.consumption.models.resource.Resource

An usage detail resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • tags (dict[str, str]) – Resource tags.

  • billing_period_id (str) – The id of the billing period resource that the usage belongs to.

  • invoice_id (str) – The id of the invoice resource that the usage belongs to.

  • usage_start (datetime) – The start of the date time range covered by the usage detail.

  • usage_end (datetime) – The end of the date time range covered by the usage detail.

  • instance_name (str) – The name of the resource instance that the usage is about.

  • instance_id (str) – The uri of the resource instance that the usage is about.

  • instance_location (str) – The location of the resource instance that the usage is about.

  • currency (str) – The ISO currency in which the meter is charged, for example, USD.

  • usage_quantity (decimal.Decimal) – The quantity of usage.

  • billable_quantity (decimal.Decimal) – The billable usage quantity.

  • pretax_cost (decimal.Decimal) – The amount of cost before tax.

  • is_estimated (bool) – The estimated usage is subject to change.

  • meter_id (str) – The meter id.

  • meter_details (MeterDetails) – The details about the meter. By default this is not populated, unless it’s specified in $expand.

  • subscription_guid (str) – Subscription guid.

  • subscription_name (str) – Subscription name.

  • account_name (str) – Account name.

  • department_name (str) – Department name.

  • product (str) – Product name.

  • consumed_service (str) – Consumed service name.

  • cost_center (str) – The cost center of this department if it is a department and a costcenter exists

  • additional_properties (str) – Additional details of this usage item. By default this is not populated, unless it’s specified in $expand.

class azure.mgmt.consumption.models.Marketplace[source]

Bases: azure.mgmt.consumption.models.resource.Resource

An marketplace resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • tags (dict[str, str]) – Resource tags.

  • billing_period_id (str) – The id of the billing period resource that the usage belongs to.

  • usage_start (datetime) – The start of the date time range covered by the usage detail.

  • usage_end (datetime) – The end of the date time range covered by the usage detail.

  • resource_rate (decimal.Decimal) – The marketplace resource rate.

  • offer_name (str) – The type of offer.

  • resource_group (str) – The name of resource group.

  • order_number (str) – The order number.

  • instance_name (str) – The name of the resource instance that the usage is about.

  • instance_id (str) – The uri of the resource instance that the usage is about.

  • currency (str) – The ISO currency in which the meter is charged, for example, USD.

  • consumed_quantity (decimal.Decimal) – The quantity of usage.

  • unit_of_measure (str) – The unit of measure.

  • pretax_cost (decimal.Decimal) – The amount of cost before tax.

  • is_estimated (bool) – The estimated usage is subject to change.

  • meter_id (str) – The meter id.

  • subscription_guid (str) – Subscription guid.

  • subscription_name (str) – Subscription name.

  • account_name (str) – Account name.

  • department_name (str) – Department name.

  • consumed_service (str) – Consumed service name.

  • cost_center (str) – The cost center of this department if it is a department and a costcenter exists

  • additional_properties (str) – Additional details of this usage item. By default this is not populated, unless it’s specified in $expand.

  • publisher_name (str) – The name of publisher.

  • plan_name (str) – The name of plan.

class azure.mgmt.consumption.models.ReservationSummaries[source]

Bases: azure.mgmt.consumption.models.resource.Resource

reservation summaries resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • tags (dict[str, str]) – Resource tags.

  • reservation_order_id (str) – The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.

  • reservation_id (str) – The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.

  • sku_name (str) – This is the ARM Sku name. It can be used to join with the servicetype field in additoinalinfo in usage records.

  • reserved_hours (decimal.Decimal) – This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days

  • usage_date (datetime) – Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.

  • used_hours (decimal.Decimal) – Total used hours by the reservation

  • min_utilization_percentage (decimal.Decimal) – This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day

  • avg_utilization_percentage (decimal.Decimal) – This is average utilization for the entire time range. (day or month depending on the grain)

  • max_utilization_percentage (decimal.Decimal) – This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.

class azure.mgmt.consumption.models.ReservationDetails[source]

Bases: azure.mgmt.consumption.models.resource.Resource

reservation details resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • tags (dict[str, str]) – Resource tags.

  • reservation_order_id (str) – The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.

  • reservation_id (str) – The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.

  • sku_name (str) – This is the ARM Sku name. It can be used to join with the servicetype field in additoinalinfo in usage records.

  • reserved_hours (decimal.Decimal) – This is the total hours reserved for the day. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days.

  • usage_date (datetime) – The date on which consumption occurred.

  • used_hours (decimal.Decimal) – This is the total hours used by the instance.

  • instance_id (str) – This identifier is the name of the resource or the fully qualified Resource ID.

  • total_reserved_quantity (decimal.Decimal) – This is the total count of instances that are reserved for the reservationid.

class azure.mgmt.consumption.models.BudgetTimePeriod(start_date, end_date=None)[source]

Bases: msrest.serialization.Model

The start and end date for a budget.

Parameters
  • start_date (datetime) – The start date for the budget.

  • end_date (datetime) – The end date for the budget. If not provided, we default this to 10 years from the start date.

class azure.mgmt.consumption.models.Filters(resource_groups=None, resources=None, meters=None)[source]

Bases: msrest.serialization.Model

May be used to filter budgets by resource group, resource, or meter.

Parameters
  • resource_groups (list[str]) – The list of filters on resource groups, allowed at subscription level only.

  • resources (list[str]) – The list of filters on resources.

  • meters (list[str]) – The list of filters on meters, mandatory for budgets of usage category.

class azure.mgmt.consumption.models.CurrentSpend[source]

Bases: msrest.serialization.Model

The current amount of cost which is being tracked for a budget.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • amount (decimal.Decimal) – The total amount of cost which is being tracked by the budget.

  • unit (str) – The unit of measure for the budget amount.

class azure.mgmt.consumption.models.Notification(enabled, operator, threshold, contact_emails, contact_roles=None, contact_groups=None)[source]

Bases: msrest.serialization.Model

The notification associated with a budget.

Parameters
  • enabled (bool) – The notification is enabled or not.

  • operator (str or OperatorType) – The comparison operator. Possible values include: ‘EqualTo’, ‘GreaterThan’, ‘GreaterThanOrEqualTo’

  • threshold (decimal.Decimal) – Threshold value associated with a notification. Notification is sent when the cost exceeded the threshold. It is always percent and has to be between 0 and 1000.

  • contact_emails (list[str]) – Email addresses to send the budget notification to when the threshold is exceeded.

  • contact_roles (list[str]) – Contact roles to send the budget notification to when the threshold is exceeded.

  • contact_groups (list[str]) – Action groups to send the budget notification to when the threshold is exceeded.

class azure.mgmt.consumption.models.Budget(category, amount, time_grain, time_period, e_tag=None, filters=None, notifications=None)[source]

Bases: azure.mgmt.consumption.models.proxy_resource.ProxyResource

A budget resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • current_spend (CurrentSpend) – The current amount of cost which is being tracked for a budget.

Parameters
  • e_tag (str) – eTag of the resource. To handle concurrent update scenarion, this field will be used to determine whether the user is updating the latest version or not.

  • category (str or CategoryType) – The category of the budget, whether the budget tracks cost or usage. Possible values include: ‘Cost’, ‘Usage’

  • amount (decimal.Decimal) – The total amount of cost to track with the budget

  • time_grain (str or TimeGrainType) – The time covered by a budget. Tracking of the amount will be reset based on the time grain. Possible values include: ‘Monthly’, ‘Quarterly’, ‘Annually’

  • time_period (BudgetTimePeriod) – Has start and end date of the budget. The start date must be first of the month and should be less than the end date. Budget start date must be on or after June 1, 2017. Future start date should not be more than three months. Past start date should be selected within the timegrain preiod. There are no restrictions on the end date.

  • filters (Filters) – May be used to filter budgets by resource group, resource, or meter.

  • notifications (dict[str, Notification]) – Dictionary of notifications associated with the budget. Budget can have up to five notifications.

class azure.mgmt.consumption.models.ErrorDetails[source]

Bases: msrest.serialization.Model

The details of the error.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • code (str) – Error code.

  • message (str) – Error message indicating why the operation failed.

class azure.mgmt.consumption.models.ErrorResponse(error=None)[source]

Bases: msrest.serialization.Model

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Parameters

error (ErrorDetails) – The details of the error.

exception azure.mgmt.consumption.models.ErrorResponseException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘ErrorResponse’.

Parameters
  • deserialize – A deserializer

  • response – Server response to be deserialized.

class azure.mgmt.consumption.models.OperationDisplay[source]

Bases: msrest.serialization.Model

The object that represents the operation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • provider (str) – Service provider: Microsoft.Consumption.

  • resource (str) – Resource on which the operation is performed: UsageDetail, etc.

  • operation (str) – Operation type: Read, write, delete, etc.

class azure.mgmt.consumption.models.Operation(display=None)[source]

Bases: msrest.serialization.Model

A Consumption REST API operation.

Variables are only populated by the server, and will be ignored when sending a request.

Variables

name (str) – Operation name: {provider}/{resource}/{operation}.

Parameters

display (OperationDisplay) – The object that represents the operation.

class azure.mgmt.consumption.models.Resource[source]

Bases: msrest.serialization.Model

The Resource model definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • tags (dict[str, str]) – Resource tags.

class azure.mgmt.consumption.models.ProxyResource(e_tag=None)[source]

Bases: msrest.serialization.Model

The Resource model definition.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

Parameters

e_tag (str) – eTag of the resource. To handle concurrent update scenarion, this field will be used to determine whether the user is updating the latest version or not.

class azure.mgmt.consumption.models.PriceSheetProperties[source]

Bases: msrest.serialization.Model

The properties of the price sheet.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • billing_period_id (str) – The id of the billing period resource that the usage belongs to.

  • meter_id (str) – The meter id

  • meter_details (MeterDetails) – The details about the meter. By default this is not populated, unless it’s specified in $expand.

  • unit_of_measure (str) – Unit of measure

  • included_quantity (decimal.Decimal) – Included quality for an offer

  • part_number (str) – Part Number

  • unit_price (decimal.Decimal) – Unit Price

  • currency_code (str) – Currency Code

class azure.mgmt.consumption.models.PriceSheetResult[source]

Bases: azure.mgmt.consumption.models.resource.Resource

An pricesheet resource.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Resource Id.

  • name (str) – Resource name.

  • type (str) – Resource type.

  • tags (dict[str, str]) – Resource tags.

  • pricesheets (list[PriceSheetProperties]) – Price sheet

  • next_link (str) – The link (url) to the next page of results.

class azure.mgmt.consumption.models.UsageDetailPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of UsageDetail object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.consumption.models.MarketplacePaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Marketplace object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.consumption.models.ReservationSummariesPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ReservationSummaries object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.consumption.models.ReservationDetailsPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of ReservationDetails object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.consumption.models.BudgetPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Budget object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.consumption.models.OperationPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of Operation object

Bring async to Paging.

“async_command” is mandatory keyword argument for this mixin to work.

class azure.mgmt.consumption.models.CategoryType[source]

Bases: enum.Enum

An enumeration.

cost = 'Cost'
usage = 'Usage'
class azure.mgmt.consumption.models.TimeGrainType[source]

Bases: enum.Enum

An enumeration.

annually = 'Annually'
monthly = 'Monthly'
quarterly = 'Quarterly'
class azure.mgmt.consumption.models.OperatorType[source]

Bases: enum.Enum

An enumeration.

equal_to = 'EqualTo'
greater_than = 'GreaterThan'
greater_than_or_equal_to = 'GreaterThanOrEqualTo'
class azure.mgmt.consumption.models.Datagrain[source]

Bases: enum.Enum

An enumeration.

daily_grain = 'daily'
monthly_grain = 'monthly'