reservations_summaries
Creates, updates, deletes, gets or lists a reservations_summaries resource.
Overview
| Name | reservations_summaries |
| Type | Resource |
| Id | azure.consumption.reservations_summaries |
Fields
The following fields are returned by SELECT queries:
- list_by_reservation_order_and_reservation
- list
- list_by_reservation_order
| 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. |
avgUtilizationPercentage | number | This is average utilization for the entire time range. (day or month depending on the grain). |
etag | string | The etag for the resource. |
kind | string | The reservation kind. |
maxUtilizationPercentage | number | This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day. |
minUtilizationPercentage | number | This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day. |
purchasedQuantity | number | This is the purchased quantity for the reservationId. |
remainingQuantity | number | This is the remaining quantity for the reservationId. |
reservationId | string | The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to. |
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. |
reservedHours | number | This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days. |
skuName | string | This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
totalReservedQuantity | number | This is the total count of instances that are reserved for the reservationId. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usageDate | string (date-time) | Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month. |
usedHours | number | Total used hours by the reservation. |
usedQuantity | number | This is the used quantity for the reservationId. |
utilizedPercentage | number | This is the utilized percentage for the reservation Id. |
| 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. |
avgUtilizationPercentage | number | This is average utilization for the entire time range. (day or month depending on the grain). |
etag | string | The etag for the resource. |
kind | string | The reservation kind. |
maxUtilizationPercentage | number | This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day. |
minUtilizationPercentage | number | This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day. |
purchasedQuantity | number | This is the purchased quantity for the reservationId. |
remainingQuantity | number | This is the remaining quantity for the reservationId. |
reservationId | string | The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to. |
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. |
reservedHours | number | This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days. |
skuName | string | This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
totalReservedQuantity | number | This is the total count of instances that are reserved for the reservationId. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usageDate | string (date-time) | Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month. |
usedHours | number | Total used hours by the reservation. |
usedQuantity | number | This is the used quantity for the reservationId. |
utilizedPercentage | number | This is the utilized percentage for the reservation Id. |
| 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. |
avgUtilizationPercentage | number | This is average utilization for the entire time range. (day or month depending on the grain). |
etag | string | The etag for the resource. |
kind | string | The reservation kind. |
maxUtilizationPercentage | number | This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day. |
minUtilizationPercentage | number | This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day. |
purchasedQuantity | number | This is the purchased quantity for the reservationId. |
remainingQuantity | number | This is the remaining quantity for the reservationId. |
reservationId | string | The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to. |
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. |
reservedHours | number | This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days. |
skuName | string | This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
totalReservedQuantity | number | This is the total count of instances that are reserved for the reservationId. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
usageDate | string (date-time) | Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month. |
usedHours | number | Total used hours by the reservation. |
usedQuantity | number | This is the used quantity for the reservationId. |
utilizedPercentage | number | This is the utilized percentage for the reservation Id. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_reservation_order_and_reservation | select | reservation_order_id, reservation_id, grain | $filter | Lists the reservations summaries for daily or monthly grain. 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 | resource_scope, grain | startDate, endDate, $filter, reservationId, reservationOrderId | Lists the reservations summaries for the defined scope daily or monthly grain. 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_by_reservation_order | select | reservation_order_id, grain | $filter | Lists the reservations summaries for daily or monthly grain. 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 |
|---|---|---|
grain | string | Can be daily or monthly. Known values are: "daily" and "monthly". Required. |
reservation_id | string | Id of the reservation. Required. |
reservation_order_id | string | Order Id of the reservation. Required. |
resource_scope | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
$filter | string | Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Default value is None. |
endDate | string | End date. Only applicable when querying with billing profile. Default value is None. |
reservationId | string | Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation. Default value is None. |
reservationOrderId | string | Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order. Default value is None. |
startDate | string | Start date. Only applicable when querying with billing profile. Default value is None. |
SELECT examples
- list_by_reservation_order_and_reservation
- list
- list_by_reservation_order
Lists the reservations summaries for daily or monthly grain. 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,
avgUtilizationPercentage,
etag,
kind,
maxUtilizationPercentage,
minUtilizationPercentage,
purchasedQuantity,
remainingQuantity,
reservationId,
reservationOrderId,
reservedHours,
skuName,
systemData,
tags,
totalReservedQuantity,
type,
usageDate,
usedHours,
usedQuantity,
utilizedPercentage
FROM azure.consumption.reservations_summaries
WHERE reservation_order_id = '{{ reservation_order_id }}' -- required
AND reservation_id = '{{ reservation_id }}' -- required
AND grain = '{{ grain }}' -- required
AND $filter = '{{ $filter }}'
;
Lists the reservations summaries for the defined scope daily or monthly grain. 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,
avgUtilizationPercentage,
etag,
kind,
maxUtilizationPercentage,
minUtilizationPercentage,
purchasedQuantity,
remainingQuantity,
reservationId,
reservationOrderId,
reservedHours,
skuName,
systemData,
tags,
totalReservedQuantity,
type,
usageDate,
usedHours,
usedQuantity,
utilizedPercentage
FROM azure.consumption.reservations_summaries
WHERE resource_scope = '{{ resource_scope }}' -- required
AND grain = '{{ grain }}' -- required
AND startDate = '{{ startDate }}'
AND endDate = '{{ endDate }}'
AND $filter = '{{ $filter }}'
AND reservationId = '{{ reservationId }}'
AND reservationOrderId = '{{ reservationOrderId }}'
;
Lists the reservations summaries for daily or monthly grain. 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,
avgUtilizationPercentage,
etag,
kind,
maxUtilizationPercentage,
minUtilizationPercentage,
purchasedQuantity,
remainingQuantity,
reservationId,
reservationOrderId,
reservedHours,
skuName,
systemData,
tags,
totalReservedQuantity,
type,
usageDate,
usedHours,
usedQuantity,
utilizedPercentage
FROM azure.consumption.reservations_summaries
WHERE reservation_order_id = '{{ reservation_order_id }}' -- required
AND grain = '{{ grain }}' -- required
AND $filter = '{{ $filter }}'
;