Skip to main content

reservation_transactions

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

Overview

Namereservation_transactions
TypeResource
Idazure.consumption.reservation_transactions

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.
amountnumberThe charge of the transaction.
armSkuNamestringThis is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
billingFrequencystringThe billing frequency, which can be either one-time or recurring.
billingProfileIdstringBilling profile Id.
billingProfileNamestringBilling profile name.
currencystringThe ISO currency in which the transaction is charged, for example, USD.
descriptionstringThe description of the transaction.
eventDatestring (date-time)The date of the transaction.
eventTypestringThe type of the transaction (Purchase, Cancel or Refund).
invoicestringInvoice Number.
invoiceIdstringInvoice Id as on the invoice where the specific transaction appears.
invoiceSectionIdstringInvoice Section Id.
invoiceSectionNamestringInvoice Section Name.
purchasingSubscriptionGuidstringThe subscription guid that makes the transaction.
purchasingSubscriptionNamestringThe subscription name that makes the transaction.
quantitynumberThe quantity of the transaction.
regionstringThe region of the transaction.
reservationOrderIdstringThe reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.
reservationOrderNamestringThe name of the reservation order.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsarrayResource tags.
termstringThis is the term of the transaction.
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$filterList of transactions for reserved instances on billing profile scope. The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.
listselectbilling_account_id$filter, useMarkupIfPartner, previewMarkupPercentageList of transactions for reserved instances on billing account scope. Note: The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.

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.
$filterstringFilter reservation transactions by date range. The properties/EventDate for start date and end date. The filter supports 'le' and 'ge'. Note: API returns data for the entire start date's and end date's billing month. For example, filter properties/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 will include data for the entire December 2020 month (i.e. will contain records for dates December 30 and 31). Default value is None.
previewMarkupPercentagenumberPreview markup percentage to be applied. Default value is None.
useMarkupIfPartnerbooleanApplies mark up to the transactions if the caller is a partner. Default value is None.

SELECT examples

List of transactions for reserved instances on billing profile scope. The refund transactions are posted along with its purchase transaction (i.e. in the purchase billing month). For example, The refund is requested in May 2021. This refund transaction will have event date as May 2021 but the billing month as April 2020 when the reservation purchase was made. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.

SELECT
id,
name,
amount,
armSkuName,
billingFrequency,
billingProfileId,
billingProfileName,
currency,
description,
eventDate,
eventType,
invoice,
invoiceId,
invoiceSectionId,
invoiceSectionName,
purchasingSubscriptionGuid,
purchasingSubscriptionName,
quantity,
region,
reservationOrderId,
reservationOrderName,
systemData,
tags,
term,
type
FROM azure.consumption.reservation_transactions
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND billing_profile_id = '{{ billing_profile_id }}' -- required
AND $filter = '{{ $filter }}'
;