azure.mgmt.commerce.models module¶
-
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.
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 (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.
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.
OfferTermInfo
(effective_date=None)[source]¶ Bases:
msrest.serialization.Model
Describes the offer term.
You probably want to use the sub-classes and not this class directly. Known sub-classes are: MonetaryCredit, MonetaryCommitment, RecurringCharge
- Parameters
effective_date (datetime) – Indicates the date from which the offer term is effective.
name (str) – Constant filled by server.
-
class
azure.mgmt.commerce.models.
MeterInfo
(meter_id=None, meter_name=None, meter_category=None, meter_sub_category=None, unit=None, meter_tags=None, meter_region=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_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.
ResourceRateCardInfo
(currency=None, locale=None, is_tax_included=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’.
offer_terms (list[OfferTermInfo]) – A list of offer terms.
-
class
azure.mgmt.commerce.models.
MonetaryCredit
(effective_date=None, credit=None, excluded_meter_ids=None)[source]¶ Bases:
azure.mgmt.commerce.models.offer_term_info.OfferTermInfo
Indicates that this is a monetary credit offer.
- Parameters
effective_date (datetime) – Indicates the date from which the offer term is effective.
name (str) – Constant filled by server.
credit (decimal.Decimal) – 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.
MonetaryCommitment
(effective_date=None, tiered_discount=None, excluded_meter_ids=None)[source]¶ Bases:
azure.mgmt.commerce.models.offer_term_info.OfferTermInfo
Indicates that a monetary commitment is required for this offer.
- Parameters
effective_date (datetime) – Indicates the date from which the offer term is effective.
name (str) – Constant filled by server.
tiered_discount (dict[str, decimal.Decimal]) – 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.
RecurringCharge
(effective_date=None, recurring_charge=None)[source]¶ Bases:
azure.mgmt.commerce.models.offer_term_info.OfferTermInfo
Indicates a recurring charge is present for this offer.
-
class
azure.mgmt.commerce.models.
ErrorResponse
(code=None, message=None)[source]¶ Bases:
msrest.serialization.Model
Describes the format of Error response.
-
class
azure.mgmt.commerce.models.
UsageAggregationPaged
(*args, **kwargs)[source]¶ Bases:
msrest.paging.Paged
A paging container for iterating over a list of
UsageAggregation
objectBring async to Paging.
“async_command” is mandatory keyword argument for this mixin to work.