lots
Creates, updates, deletes, gets or lists a lots resource.
Overview
| Name | lots |
| Type | Resource |
| Id | azure.consumption.lots |
Fields
The following fields are returned by SELECT queries:
- list_by_billing_profile
- list_by_customer
- list_by_billing_account
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
OrganizationType | string | The organization type of the lot. Known values are: "Primary" and "Contributor". (Primary, Contributor) |
billingCurrency | string | The billing currency of the lot. |
closedBalance | object | The balance as of the last invoice. |
closedBalanceInBillingCurrency | object | The balance as of the last invoice in billing currency. |
creditCurrency | string | The currency of the lot. |
eTag | string | eTag 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. |
expirationDate | string (date-time) | The expiration date of a lot. |
isEstimatedBalance | boolean | If true, the listed details are based on an estimation and it will be subjected to change. |
originalAmount | object | The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
originalAmountInBillingCurrency | object | The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
poNumber | string | The po number of the invoice on which the lot was added. This property is not available for ConsumptionCommitment lots. |
purchasedDate | string (date-time) | The date when the lot was added. |
reseller | object | The reseller of the lot. |
source | string | The source of the lot. Known values are: "PurchasedCredit", "PromotionalCredit", and "ConsumptionCommitment". (PurchasedCredit, PromotionalCredit, ConsumptionCommitment) |
startDate | string (date-time) | The date when the lot became effective. |
status | string | The status of the lot. Known values are: "None", "Active", "Inactive", "Expired", "Complete", and "Canceled". (None, Active, Inactive, Expired, Complete, Canceled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usedAmount | object | Amount consumed from the commitment. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
OrganizationType | string | The organization type of the lot. Known values are: "Primary" and "Contributor". (Primary, Contributor) |
billingCurrency | string | The billing currency of the lot. |
closedBalance | object | The balance as of the last invoice. |
closedBalanceInBillingCurrency | object | The balance as of the last invoice in billing currency. |
creditCurrency | string | The currency of the lot. |
eTag | string | eTag 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. |
expirationDate | string (date-time) | The expiration date of a lot. |
isEstimatedBalance | boolean | If true, the listed details are based on an estimation and it will be subjected to change. |
originalAmount | object | The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
originalAmountInBillingCurrency | object | The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
poNumber | string | The po number of the invoice on which the lot was added. This property is not available for ConsumptionCommitment lots. |
purchasedDate | string (date-time) | The date when the lot was added. |
reseller | object | The reseller of the lot. |
source | string | The source of the lot. Known values are: "PurchasedCredit", "PromotionalCredit", and "ConsumptionCommitment". (PurchasedCredit, PromotionalCredit, ConsumptionCommitment) |
startDate | string (date-time) | The date when the lot became effective. |
status | string | The status of the lot. Known values are: "None", "Active", "Inactive", "Expired", "Complete", and "Canceled". (None, Active, Inactive, Expired, Complete, Canceled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usedAmount | object | Amount consumed from the commitment. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
OrganizationType | string | The organization type of the lot. Known values are: "Primary" and "Contributor". (Primary, Contributor) |
billingCurrency | string | The billing currency of the lot. |
closedBalance | object | The balance as of the last invoice. |
closedBalanceInBillingCurrency | object | The balance as of the last invoice in billing currency. |
creditCurrency | string | The currency of the lot. |
eTag | string | eTag 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. |
expirationDate | string (date-time) | The expiration date of a lot. |
isEstimatedBalance | boolean | If true, the listed details are based on an estimation and it will be subjected to change. |
originalAmount | object | The original amount of a lot, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
originalAmountInBillingCurrency | object | The original amount of a lot in billing currency, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
poNumber | string | The po number of the invoice on which the lot was added. This property is not available for ConsumptionCommitment lots. |
purchasedDate | string (date-time) | The date when the lot was added. |
reseller | object | The reseller of the lot. |
source | string | The source of the lot. Known values are: "PurchasedCredit", "PromotionalCredit", and "ConsumptionCommitment". (PurchasedCredit, PromotionalCredit, ConsumptionCommitment) |
startDate | string (date-time) | The date when the lot became effective. |
status | string | The status of the lot. Known values are: "None", "Active", "Inactive", "Expired", "Complete", and "Canceled". (None, Active, Inactive, Expired, Complete, Canceled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usedAmount | object | Amount consumed from the commitment. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_billing_profile | select | billing_account_id, billing_profile_id | Lists 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_customer | select | billing_account_id, customer_id | $filter | Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) billing accounts. |
list_by_billing_account | select | billing_account_id | $filter | Lists 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.
| Name | Datatype | Description |
|---|---|---|
billing_account_id | string | BillingAccount ID. Required. |
billing_profile_id | string | Azure Billing Profile ID. Required. |
customer_id | string | Customer ID. Required. |
$filter | string | May 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
- list_by_billing_profile
- list_by_customer
- list_by_billing_account
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
;
Lists all Azure credits for a customer. The API is only supported for Microsoft Partner Agreements (MPA) 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 customer_id = '{{ customer_id }}' -- required
AND $filter = '{{ $filter }}'
;
Lists 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.
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 $filter = '{{ $filter }}'
;