events
Creates, updates, deletes, gets or lists an events resource.
Overview
| Name | events |
| Type | Resource |
| Id | azure.consumption.events |
Fields
The following fields are returned by SELECT queries:
- list_by_billing_profile
- 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. |
adjustments | object | The amount of balance adjustment. The property is not available for ConsumptionCommitment lots. |
adjustmentsInBillingCurrency | object | The amount of balance adjustment in billing currency. |
billingAccountDisplayName | string | Name of the billing account. |
billingAccountId | string | Identifier of the billing account. |
billingCurrency | string | The billing currency of the event. |
billingProfileDisplayName | string | The display name of the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement. |
billingProfileId | string | The ID that uniquely identifies the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement. |
canceledCredit | object | Amount of canceled credit. |
charges | object | The amount of charges for events of type SettleCharges and PendingEligibleCharges. |
chargesInBillingCurrency | object | The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency. |
closedBalance | object | The balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
closedBalanceInBillingCurrency | object | The balance in billing currency after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
creditCurrency | string | The credit currency of the event. |
creditExpired | object | The amount of expired credit or commitment for NewCredit or SettleCharges event. |
creditExpiredInBillingCurrency | object | The amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency. |
description | string | The description of the event. |
eTag | string | The eTag for the resource. |
eventType | string | Identifies the type of the event. Known values are: "SettledCharges", "PendingCharges", "PendingAdjustments", "PendingNewCredit", "PendingExpiredCredit", "UnKnown", "NewCredit", and "CreditExpired". (SettledCharges, PendingCharges, PendingAdjustments, PendingNewCredit, PendingExpiredCredit, UnKnown, NewCredit, CreditExpired) |
invoiceNumber | string | The number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled events. |
isEstimatedBalance | boolean | If true, the listed details are based on an estimation and it will be subjected to change. |
lotId | string | The ID that uniquely identifies the lot for which the event happened. |
lotSource | string | Identifies the source of the lot for which the event happened. |
newCredit | object | The amount of new credit or commitment for NewCredit or SettleCharges event. |
newCreditInBillingCurrency | object | The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency. |
reseller | object | The reseller of the event. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
transactionDate | string (date-time) | The date of the event. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| 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. |
adjustments | object | The amount of balance adjustment. The property is not available for ConsumptionCommitment lots. |
adjustmentsInBillingCurrency | object | The amount of balance adjustment in billing currency. |
billingAccountDisplayName | string | Name of the billing account. |
billingAccountId | string | Identifier of the billing account. |
billingCurrency | string | The billing currency of the event. |
billingProfileDisplayName | string | The display name of the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement. |
billingProfileId | string | The ID that uniquely identifies the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement. |
canceledCredit | object | Amount of canceled credit. |
charges | object | The amount of charges for events of type SettleCharges and PendingEligibleCharges. |
chargesInBillingCurrency | object | The amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency. |
closedBalance | object | The balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
closedBalanceInBillingCurrency | object | The balance in billing currency after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment. |
creditCurrency | string | The credit currency of the event. |
creditExpired | object | The amount of expired credit or commitment for NewCredit or SettleCharges event. |
creditExpiredInBillingCurrency | object | The amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency. |
description | string | The description of the event. |
eTag | string | The eTag for the resource. |
eventType | string | Identifies the type of the event. Known values are: "SettledCharges", "PendingCharges", "PendingAdjustments", "PendingNewCredit", "PendingExpiredCredit", "UnKnown", "NewCredit", and "CreditExpired". (SettledCharges, PendingCharges, PendingAdjustments, PendingNewCredit, PendingExpiredCredit, UnKnown, NewCredit, CreditExpired) |
invoiceNumber | string | The number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled events. |
isEstimatedBalance | boolean | If true, the listed details are based on an estimation and it will be subjected to change. |
lotId | string | The ID that uniquely identifies the lot for which the event happened. |
lotSource | string | Identifies the source of the lot for which the event happened. |
newCredit | object | The amount of new credit or commitment for NewCredit or SettleCharges event. |
newCreditInBillingCurrency | object | The amount of new credit or commitment for NewCredit or SettleCharges event in billing currency. |
reseller | object | The reseller of the event. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
transactionDate | string (date-time) | The date of the event. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
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, startDate, endDate | Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date. | |
list_by_billing_account | select | billing_account_id | $filter | Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date. |
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. |
endDate | string | End date. Required. |
startDate | string | Start date. Required. |
$filter | string | May be used to filter the events by lotId, lotSource 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_billing_account
Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date.
SELECT
id,
name,
adjustments,
adjustmentsInBillingCurrency,
billingAccountDisplayName,
billingAccountId,
billingCurrency,
billingProfileDisplayName,
billingProfileId,
canceledCredit,
charges,
chargesInBillingCurrency,
closedBalance,
closedBalanceInBillingCurrency,
creditCurrency,
creditExpired,
creditExpiredInBillingCurrency,
description,
eTag,
eventType,
invoiceNumber,
isEstimatedBalance,
lotId,
lotSource,
newCredit,
newCreditInBillingCurrency,
reseller,
systemData,
transactionDate,
type
FROM azure.consumption.events
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND billing_profile_id = '{{ billing_profile_id }}' -- required
AND startDate = '{{ startDate }}' -- required
AND endDate = '{{ endDate }}' -- required
;
Lists the events that decrements Azure credits or Microsoft Azure consumption commitment for a billing account or a billing profile for a given start and end date.
SELECT
id,
name,
adjustments,
adjustmentsInBillingCurrency,
billingAccountDisplayName,
billingAccountId,
billingCurrency,
billingProfileDisplayName,
billingProfileId,
canceledCredit,
charges,
chargesInBillingCurrency,
closedBalance,
closedBalanceInBillingCurrency,
creditCurrency,
creditExpired,
creditExpiredInBillingCurrency,
description,
eTag,
eventType,
invoiceNumber,
isEstimatedBalance,
lotId,
lotSource,
newCredit,
newCreditInBillingCurrency,
reseller,
systemData,
transactionDate,
type
FROM azure.consumption.events
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND $filter = '{{ $filter }}'
;