Skip to main content

lots

Creates, updates, deletes, gets or lists a lots resource.

Overview

Namelots
TypeResource
Idazure.consumption.lots

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
OrganizationTypestringThe organization type of the lot. Known values are: "Primary" and "Contributor". (Primary, Contributor)
billingCurrencystringThe billing currency of the lot.
closedBalanceobjectThe balance as of the last invoice.
closedBalanceInBillingCurrencyobjectThe balance as of the last invoice in billing currency.
creditCurrencystringThe currency of the lot.
eTagstringeTag of the resource. To handle concurrent update scenario, this field will be used to determine whether the user is updating the latest version or not.
expirationDatestring (date-time)The expiration date of a lot.
isEstimatedBalancebooleanIf true, the listed details are based on an estimation and it will be subjected to change.
originalAmountobjectThe original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
originalAmountInBillingCurrencyobjectThe original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
poNumberstringThe po number of the invoice on which the lot was added. This property is not available for ConsumptionCommitment lots.
purchasedDatestring (date-time)The date when the lot was added.
resellerobjectThe reseller of the lot.
sourcestringThe source of the lot. Known values are: "PurchasedCredit", "PromotionalCredit", and "ConsumptionCommitment". (PurchasedCredit, PromotionalCredit, ConsumptionCommitment)
startDatestring (date-time)The date when the lot became effective.
statusstringThe status of the lot. Known values are: "None", "Active", "Inactive", "Expired", "Complete", and "Canceled". (None, Active, Inactive, Expired, Complete, Canceled)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
usedAmountobjectAmount consumed from the commitment.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_billing_profileselectbilling_account_id, billing_profile_idLists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft Customer Agreements (MCA) billing accounts.
list_by_customerselectbilling_account_id, customer_id$filterLists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing accounts.
list_by_billing_accountselectbilling_account_id$filterLists all Microsoft Azure consumption commitments for a billing account. The API is only supported for Microsoft Customer Agreements (MCA) and Direct Enterprise Agreement (EA) billing accounts.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
billing_account_idstringBillingAccount ID. Required.
billing_profile_idstringAzure Billing Profile ID. Required.
customer_idstringCustomer ID. Required.
$filterstringMay be used to filter the lots by Status, Source etc. The filter supports 'eq', 'lt', 'gt', 'le', 'ge', and 'and'. It does not currently support 'ne', 'or', or 'not'. Tag filter is a key value pair string where key and value is separated by a colon (:). Default value is None.

SELECT examples

Lists all Azure credits for a billing account or a billing profile. The API is only supported for Microsoft Customer Agreements (MCA) billing accounts.

SELECT
id,
name,
OrganizationType,
billingCurrency,
closedBalance,
closedBalanceInBillingCurrency,
creditCurrency,
eTag,
expirationDate,
isEstimatedBalance,
originalAmount,
originalAmountInBillingCurrency,
poNumber,
purchasedDate,
reseller,
source,
startDate,
status,
systemData,
type,
usedAmount
FROM azure.consumption.lots
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND billing_profile_id = '{{ billing_profile_id }}' -- required
;