Skip to main content

events

Creates, updates, deletes, gets or lists an events resource.

Overview

Nameevents
TypeResource
Idazure.consumption.events

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.
adjustmentsobjectThe amount of balance adjustment. The property is not available for ConsumptionCommitment lots.
adjustmentsInBillingCurrencyobjectThe amount of balance adjustment in billing currency.
billingAccountDisplayNamestringName of the billing account.
billingAccountIdstringIdentifier of the billing account.
billingCurrencystringThe billing currency of the event.
billingProfileDisplayNamestringThe display name of the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement.
billingProfileIdstringThe ID that uniquely identifies the billing profile for which the event happened. The property is only available for billing account of type MicrosoftCustomerAgreement.
canceledCreditobjectAmount of canceled credit.
chargesobjectThe amount of charges for events of type SettleCharges and PendingEligibleCharges.
chargesInBillingCurrencyobjectThe amount of charges for events of type SettleCharges and PendingEligibleCharges in billing currency.
closedBalanceobjectThe balance after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
closedBalanceInBillingCurrencyobjectThe balance in billing currency after the event, Note: This will not be returned for Contributor Organization Type in Multi-Entity consumption commitment.
creditCurrencystringThe credit currency of the event.
creditExpiredobjectThe amount of expired credit or commitment for NewCredit or SettleCharges event.
creditExpiredInBillingCurrencyobjectThe amount of expired credit or commitment for NewCredit or SettleCharges event in billing currency.
descriptionstringThe description of the event.
eTagstringThe eTag for the resource.
eventTypestringIdentifies 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)
invoiceNumberstringThe number which uniquely identifies the invoice on which the event was billed. This will be empty for unbilled events.
isEstimatedBalancebooleanIf true, the listed details are based on an estimation and it will be subjected to change.
lotIdstringThe ID that uniquely identifies the lot for which the event happened.
lotSourcestringIdentifies the source of the lot for which the event happened.
newCreditobjectThe amount of new credit or commitment for NewCredit or SettleCharges event.
newCreditInBillingCurrencyobjectThe amount of new credit or commitment for NewCredit or SettleCharges event in billing currency.
resellerobjectThe reseller of the event.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
transactionDatestring (date-time)The date of the event.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_billing_profileselectbilling_account_id, billing_profile_id, startDate, endDateLists 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_accountselectbilling_account_id$filterLists 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.

NameDatatypeDescription
billing_account_idstringBillingAccount ID. Required.
billing_profile_idstringAzure Billing Profile ID. Required.
endDatestringEnd date. Required.
startDatestringStart date. Required.
$filterstringMay 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

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
;