azure.mgmt.commerce.models module

class azure.mgmt.commerce.models.InfoField(project=None)[source]

Bases: msrest.serialization.Model

Key-value pairs of instance details in the legacy format.

Parameters:project (str) – Identifies the name of the instance provisioned by the user.
class azure.mgmt.commerce.models.UsageAggregation(id=None, name=None, type=None, subscription_id=None, meter_id=None, usage_start_time=None, usage_end_time=None, quantity=None, unit=None, meter_name=None, meter_category=None, meter_sub_category=None, meter_region=None, info_fields=None, instance_data=None)[source]

Bases: msrest.serialization.Model

Describes the usageAggregation.

Parameters:
  • id (str) – Unique Id for the usage aggregate.
  • name (str) – Name of the usage aggregate.
  • type (str) – Type of the resource being returned.
  • subscription_id (str) – The subscription identifier for the Azure user.
  • meter_id (str) – Unique ID for the resource that was consumed (aka ResourceID).
  • usage_start_time (datetime) – UTC start time for the usage bucket to which this usage aggregate belongs.
  • usage_end_time (datetime) – UTC end time for the usage bucket to which this usage aggregate belongs.
  • quantity (object) – The amount of the resource consumption that occurred in this time frame.
  • unit (str) – The unit in which the usage for this resource is being counted, e.g. Hours, GB.
  • meter_name (str) – Friendly name of the resource being consumed.
  • meter_category (str) – Category of the consumed resource.
  • meter_sub_category (str) – Sub-category of the consumed resource.
  • meter_region (str) – Region of the meterId used for billing purposes
  • info_fields (InfoField) – Key-value pairs of instance details (legacy format).
  • instance_data (str) – Key-value pairs of instance details represented as a string.
class azure.mgmt.commerce.models.RateCardQueryParameters(offer_durable_id, currency, locale, region_info)[source]

Bases: msrest.serialization.Model

Parameters that are used in the odata $filter query parameter for providing RateCard information.

Parameters:
  • offer_durable_id (str) – The Offer ID parameter consists of the ‘MS-AZR-‘ prefix, plus the Offer ID number (e.g., MS-AZR-0026P). See https://azure.microsoft.com/en-us/support/legal/offer-details/ for more information on the list of available Offer IDs, country/region availability, and billing currency.
  • currency (str) – The currency in which the rates need to be provided.
  • locale (str) – The culture in which the resource metadata needs to be localized.
  • region_info (str) – 2 letter ISO code where the offer was purchased.
class azure.mgmt.commerce.models.ResourceRateCardInfo(currency=None, locale=None, is_tax_included=None, meter_region=None, tags=None, offer_terms=None, meters=None)[source]

Bases: msrest.serialization.Model

Price and Metadata information for resources.

Parameters:
  • currency (str) – The currency in which the rates are provided.
  • locale (str) – The culture in which the resource information is localized.
  • is_tax_included (bool) – All rates are pretax, so this will always be returned as ‘false’.
  • meter_region (str) – The region in which the Azure service is available.
  • tags (list of str) – Provides additional meter data. ‘Third Party’ indicates a meter with no discount. Blanks indicate First Party.
  • offer_terms (list of OfferTermInfo) – A list of offer terms.
  • meters (list of MeterInfo) – A list of meters.
class azure.mgmt.commerce.models.OfferTermInfo(effective_date=None, excluded_meter_ids=None)[source]

Bases: msrest.serialization.Model

Describes the offer term.

Parameters:
  • effective_date (datetime) – Indicates the date from which the meter rate or offer term is effective.
  • excluded_meter_ids (list of str) – An array of meter ids that are excluded from the given offer terms.
  • Name (str) – Polymorphic Discriminator
class azure.mgmt.commerce.models.MeterInfo(meter_id=None, meter_name=None, meter_category=None, meter_sub_category=None, unit=None, meter_rates=None, effective_date=None, included_quantity=None)[source]

Bases: msrest.serialization.Model

Detailed information about the meter.

Parameters:
  • meter_id (str) – The unique identifier of the resource.
  • meter_name (str) – The name of the meter, within the given meter category
  • meter_category (str) – The category of the meter, e.g., ‘Cloud services’, ‘Networking’, etc..
  • meter_sub_category (str) – The subcategory of the meter, e.g., ‘A6 Cloud services’, ‘ExpressRoute (IXP)’, etc..
  • unit (str) – The unit in which the meter consumption is charged, e.g., ‘Hours’, ‘GB’, etc.
  • meter_rates (dict) – The list of key/value pairs for the meter rates, in the format ‘key’:’value’ where key = the meter quantity, and value = the corresponding price
  • effective_date (datetime) – Indicates the date from which the meter rate or offer term is effective.
  • included_quantity (float) – The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be charged.
class azure.mgmt.commerce.models.MonetaryCredit(effective_date=None, excluded_meter_ids=None, credit=None)[source]

Bases: azure.mgmt.commerce.models.offer_term_info.OfferTermInfo

MonetaryCredit.

Parameters:
  • effective_date (datetime) – Indicates the date from which the meter rate or offer term is effective.
  • excluded_meter_ids (list of str) – An array of meter ids that are excluded from the given offer terms.
  • Name (str) – Polymorphic Discriminator
  • credit (Decimal) – The amount of credit provided under the terms of the given offer level. This field is used only by offer terms of type ‘MonetaryCredit’.
class azure.mgmt.commerce.models.MonetaryCommitment(effective_date=None, excluded_meter_ids=None, tiered_discount=None)[source]

Bases: azure.mgmt.commerce.models.offer_term_info.OfferTermInfo

MonetaryCommitment.

Parameters:
  • effective_date (datetime) – Indicates the date from which the meter rate or offer term is effective.
  • excluded_meter_ids (list of str) – An array of meter ids that are excluded from the given offer terms.
  • Name (str) – Polymorphic Discriminator
  • tiered_discount (dict) – The list of key/value pairs for the tiered meter rates, in the format ‘key’:’value’ where key = price, and value = the corresponding discount percentage. This field is used only by offer terms of type ‘Monetary Commitment’.
class azure.mgmt.commerce.models.RecurringCharge(effective_date=None, excluded_meter_ids=None, recurring_charge=None)[source]

Bases: azure.mgmt.commerce.models.offer_term_info.OfferTermInfo

RecurringCharge.

Parameters:
  • effective_date (datetime) – Indicates the date from which the meter rate or offer term is effective.
  • excluded_meter_ids (list of str) – An array of meter ids that are excluded from the given offer terms.
  • Name (str) – Polymorphic Discriminator
  • recurring_charge (int) – The amount of recurring charge as per the offer term.
class azure.mgmt.commerce.models.ErrorResponse(code=None, message=None)[source]

Bases: msrest.serialization.Model

Describes ehe format of Error response.

Parameters:
  • code (str) – Error code
  • message (str) – Error message indicating why the operation failed.
exception azure.mgmt.commerce.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.commerce.models.UsageAggregationPaged(*args, **kwargs)[source]

Bases: msrest.paging.Paged

A paging container for iterating over a list of UsageAggregation object

class azure.mgmt.commerce.models.AggregationGranularity[source]

Bases: enum.Enum

daily = 'Daily'
hourly = 'Hourly'