reservation_transactions
Creates, updates, deletes, gets or lists a reservation_transactions resource.
Overview
| Name | reservation_transactions |
| Type | Resource |
| Id | azure.consumption.reservation_transactions |
Fields
The following fields are returned by SELECT queries:
- list_by_billing_profile
- list
| 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. |
amount | number | The charge of the transaction. |
armSkuName | string | This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. |
billingFrequency | string | The billing frequency, which can be either one-time or recurring. |
billingProfileId | string | Billing profile Id. |
billingProfileName | string | Billing profile name. |
currency | string | The ISO currency in which the transaction is charged, for example, USD. |
description | string | The description of the transaction. |
eventDate | string (date-time) | The date of the transaction. |
eventType | string | The type of the transaction (Purchase, Cancel or Refund). |
invoice | string | Invoice Number. |
invoiceId | string | Invoice Id as on the invoice where the specific transaction appears. |
invoiceSectionId | string | Invoice Section Id. |
invoiceSectionName | string | Invoice Section Name. |
purchasingSubscriptionGuid | string | The subscription guid that makes the transaction. |
purchasingSubscriptionName | string | The subscription name that makes the transaction. |
quantity | number | The quantity of the transaction. |
region | string | The region of the transaction. |
reservationOrderId | string | The 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. |
reservationOrderName | string | The name of the reservation order. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | array | Resource tags. |
term | string | This is the term of the transaction. |
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. |
accountName | string | The name of the account that makes the transaction. |
accountOwnerEmail | string | The email of the account owner that makes the transaction. |
amount | number | The charge of the transaction. |
armSkuName | string | This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. |
billingFrequency | string | The billing frequency, which can be either one-time or recurring. |
billingMonth | integer | The billing month(yyyyMMdd), on which the event initiated. |
costCenter | string | The cost center of this department if it is a department and a cost center is provided. |
currency | string | The ISO currency in which the transaction is charged, for example, USD. |
currentEnrollment | string | The current enrollment. |
departmentName | string | The department name. |
description | string | The description of the transaction. |
eventDate | string (date-time) | The date of the transaction. |
eventType | string | The type of the transaction (Purchase, Cancel or Refund). |
monetaryCommitment | number | The monetary commitment amount at the enrollment scope. |
overage | number | The overage amount at the enrollment scope. |
purchasingEnrollment | string | The purchasing enrollment. |
purchasingSubscriptionGuid | string | The subscription guid that makes the transaction. |
purchasingSubscriptionName | string | The subscription name that makes the transaction. |
quantity | number | The quantity of the transaction. |
region | string | The region of the transaction. |
reservationOrderId | string | The 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. |
reservationOrderName | string | The name of the reservation order. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | array | Resource tags. |
term | string | This is the term of the transaction. |
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 | $filter | 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. |
list | select | billing_account_id | $filter, useMarkupIfPartner, previewMarkupPercentage | List 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.
| Name | Datatype | Description |
|---|---|---|
billing_account_id | string | BillingAccount ID. Required. |
billing_profile_id | string | Azure Billing Profile ID. Required. |
$filter | string | Filter 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. |
previewMarkupPercentage | number | Preview markup percentage to be applied. Default value is None. |
useMarkupIfPartner | boolean | Applies mark up to the transactions if the caller is a partner. Default value is None. |
SELECT examples
- list_by_billing_profile
- list
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 }}'
;
List 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.
SELECT
id,
name,
accountName,
accountOwnerEmail,
amount,
armSkuName,
billingFrequency,
billingMonth,
costCenter,
currency,
currentEnrollment,
departmentName,
description,
eventDate,
eventType,
monetaryCommitment,
overage,
purchasingEnrollment,
purchasingSubscriptionGuid,
purchasingSubscriptionName,
quantity,
region,
reservationOrderId,
reservationOrderName,
systemData,
tags,
term,
type
FROM azure.consumption.reservation_transactions
WHERE billing_account_id = '{{ billing_account_id }}' -- required
AND $filter = '{{ $filter }}'
AND useMarkupIfPartner = '{{ useMarkupIfPartner }}'
AND previewMarkupPercentage = '{{ previewMarkupPercentage }}'
;