azure.mgmt.commerce.models module

class azure.mgmt.commerce.models.AggregationGranularity(value)[source]

Bases: str, enum.Enum

AggregationGranularity.

DAILY = 'Daily'
HOURLY = 'Hourly'
class azure.mgmt.commerce.models.ErrorResponse(*, code: Optional[str] = None, message: Optional[str] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

Describes the format of Error response.

Variables
  • code (str) – Error code.

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

Keyword Arguments
  • code (str) – Error code.

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

class azure.mgmt.commerce.models.InfoField(*, project: Optional[str] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

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

Variables

project (str) – Identifies the name of the instance provisioned by the user.

Keyword Arguments

project (str) – Identifies the name of the instance provisioned by the user.

class azure.mgmt.commerce.models.MeterInfo(*, meter_id: Optional[str] = None, meter_name: Optional[str] = None, meter_category: Optional[str] = None, meter_sub_category: Optional[str] = None, unit: Optional[str] = None, meter_tags: Optional[List[str]] = None, meter_region: Optional[str] = None, meter_rates: Optional[Dict[str, float]] = None, effective_date: Optional[datetime.datetime] = None, included_quantity: Optional[float] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

Detailed information about the meter.

Variables
  • 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_tags (list[str]) – Provides additional meter data. ‘Third Party’ indicates a meter with no discount. Blanks indicate First Party.

  • meter_region (str) – The region in which the Azure service is available.

  • meter_rates (dict[str, float]) – 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 is effective.

  • included_quantity (float) – The resource quantity that is included in the offer at no cost. Consumption beyond this quantity will be charged.

Keyword Arguments
  • 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_tags (list[str]) – Provides additional meter data. ‘Third Party’ indicates a meter with no discount. Blanks indicate First Party.

  • meter_region (str) – The region in which the Azure service is available.

  • meter_rates (dict[str, float]) – 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 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.MonetaryCommitment(*, effective_date: Optional[datetime.datetime] = None, tiered_discount: Optional[Dict[str, float]] = None, excluded_meter_ids: Optional[List[str]] = None, **kwargs: Any)[source]

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

Indicates that a monetary commitment is required for this offer.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str or OfferTermInfoEnum) – Name of the offer term. Required. Known values are: “Recurring Charge”, “Monetary Commitment”, and “Monetary Credit”.

  • effective_date (datetime) – Indicates the date from which the offer term is effective.

  • tiered_discount (dict[str, float]) – 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’.

  • excluded_meter_ids (list[str]) – An array of meter ids that are excluded from the given offer terms.

Keyword Arguments
  • effective_date (datetime) – Indicates the date from which the offer term is effective.

  • tiered_discount (dict[str, float]) – 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’.

  • excluded_meter_ids (list[str]) – An array of meter ids that are excluded from the given offer terms.

class azure.mgmt.commerce.models.MonetaryCredit(*, effective_date: Optional[datetime.datetime] = None, credit: Optional[float] = None, excluded_meter_ids: Optional[List[str]] = None, **kwargs: Any)[source]

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

Indicates that this is a monetary credit offer.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str or OfferTermInfoEnum) – Name of the offer term. Required. Known values are: “Recurring Charge”, “Monetary Commitment”, and “Monetary Credit”.

  • effective_date (datetime) – Indicates the date from which the offer term is effective.

  • credit (float) – The amount of credit provided under the terms of the given offer level.

  • excluded_meter_ids (list[str]) – An array of meter ids that are excluded from the given offer terms.

Keyword Arguments
  • effective_date (datetime) – Indicates the date from which the offer term is effective.

  • credit (float) – The amount of credit provided under the terms of the given offer level.

  • excluded_meter_ids (list[str]) – An array of meter ids that are excluded from the given offer terms.

class azure.mgmt.commerce.models.OfferTermInfo(*, effective_date: Optional[datetime.datetime] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

Describes the offer term.

You probably want to use the sub-classes and not this class directly. Known sub-classes are: MonetaryCommitment, MonetaryCredit, RecurringCharge

All required parameters must be populated in order to send to Azure.

Variables
  • name (str or OfferTermInfoEnum) – Name of the offer term. Required. Known values are: “Recurring Charge”, “Monetary Commitment”, and “Monetary Credit”.

  • effective_date (datetime) – Indicates the date from which the offer term is effective.

Keyword Arguments

effective_date (datetime) – Indicates the date from which the offer term is effective.

class azure.mgmt.commerce.models.OfferTermInfoEnum(value)[source]

Bases: str, enum.Enum

Name of the offer term.

MONETARY_COMMITMENT = 'Monetary Commitment'
MONETARY_CREDIT = 'Monetary Credit'
RECURRING_CHARGE = 'Recurring Charge'
class azure.mgmt.commerce.models.RateCardQueryParameters(*, offer_durable_id: str, currency: str, locale: str, region_info: str, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

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

All required parameters must be populated in order to send to Azure.

Variables
  • 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. Required.

  • currency (str) – The currency in which the rates need to be provided. Required.

  • locale (str) – The culture in which the resource metadata needs to be localized. Required.

  • region_info (str) – 2 letter ISO code where the offer was purchased. Required.

Keyword Arguments
  • 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. Required.

  • currency (str) – The currency in which the rates need to be provided. Required.

  • locale (str) – The culture in which the resource metadata needs to be localized. Required.

  • region_info (str) – 2 letter ISO code where the offer was purchased. Required.

class azure.mgmt.commerce.models.RecurringCharge(*, effective_date: Optional[datetime.datetime] = None, recurring_charge: Optional[int] = None, **kwargs: Any)[source]

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

Indicates a recurring charge is present for this offer.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str or OfferTermInfoEnum) – Name of the offer term. Required. Known values are: “Recurring Charge”, “Monetary Commitment”, and “Monetary Credit”.

  • effective_date (datetime) – Indicates the date from which the offer term is effective.

  • recurring_charge (int) – The amount of recurring charge as per the offer term.

Keyword Arguments
  • effective_date (datetime) – Indicates the date from which the offer term is effective.

  • recurring_charge (int) – The amount of recurring charge as per the offer term.

class azure.mgmt.commerce.models.ResourceRateCardInfo(*, currency: Optional[str] = None, locale: Optional[str] = None, is_tax_included: Optional[bool] = None, offer_terms: Optional[List[_models.OfferTermInfo]] = None, meters: Optional[List[_models.MeterInfo]] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

Price and Metadata information for resources.

Variables
  • 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’.

  • offer_terms (list[OfferTermInfo]) – A list of offer terms.

  • meters (list[MeterInfo]) – A list of meters.

Keyword Arguments
  • 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’.

  • offer_terms (list[OfferTermInfo]) – A list of offer terms.

  • meters (list[MeterInfo]) – A list of meters.

class azure.mgmt.commerce.models.UsageAggregation(*, id: Optional[str] = None, name: Optional[str] = None, type: Optional[str] = None, subscription_id: Optional[str] = None, meter_id: Optional[str] = None, usage_start_time: Optional[datetime.datetime] = None, usage_end_time: Optional[datetime.datetime] = None, quantity: Optional[float] = None, unit: Optional[str] = None, meter_name: Optional[str] = None, meter_category: Optional[str] = None, meter_sub_category: Optional[str] = None, meter_region: Optional[str] = None, info_fields: Optional[_models.InfoField] = None, instance_data: Optional[str] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

Describes the usageAggregation.

Variables
  • 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 (float) – 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.

Keyword Arguments
  • 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 (float) – 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.UsageAggregationListResult(*, value: Optional[List[_models.UsageAggregation]] = None, next_link: Optional[str] = None, **kwargs: Any)[source]

Bases: azure.mgmt.commerce._serialization.Model

The Get UsageAggregates operation response.

Variables
  • value (list[UsageAggregation]) – Gets or sets details for the requested aggregation.

  • next_link (str) – Gets or sets the link to the next set of results.

Keyword Arguments
  • value (list[UsageAggregation]) – Gets or sets details for the requested aggregation.

  • next_link (str) – Gets or sets the link to the next set of results.