Skip to main content

reservations_summaries

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

Overview

Namereservations_summaries
TypeResource
Idazure.consumption.reservations_summaries

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.
avgUtilizationPercentagenumberThis is average utilization for the entire time range. (day or month depending on the grain).
etagstringThe etag for the resource.
kindstringThe reservation kind.
maxUtilizationPercentagenumberThis 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.
minUtilizationPercentagenumberThis 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.
purchasedQuantitynumberThis is the purchased quantity for the reservationId.
remainingQuantitynumberThis is the remaining quantity for the reservationId.
reservationIdstringThe 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.
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.
reservedHoursnumberThis 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.
skuNamestringThis is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
totalReservedQuantitynumberThis is the total count of instances that are reserved for the reservationId.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
usageDatestring (date-time)Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.
usedHoursnumberTotal used hours by the reservation.
usedQuantitynumberThis is the used quantity for the reservationId.
utilizedPercentagenumberThis is the utilized percentage for the reservation Id.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_reservation_order_and_reservationselectreservation_order_id, reservation_id, grain$filterLists 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.
listselectresource_scope, grainstartDate, endDate, $filter, reservationId, reservationOrderIdLists 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_orderselectreservation_order_id, grain$filterLists 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.

NameDatatypeDescription
grainstringCan be daily or monthly. Known values are: "daily" and "monthly". Required.
reservation_idstringId of the reservation. Required.
reservation_order_idstringOrder Id of the reservation. Required.
resource_scopestringThe fully qualified Azure Resource manager identifier of the resource. Required.
$filterstringRequired only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Default value is None.
endDatestringEnd date. Only applicable when querying with billing profile. Default value is None.
reservationIdstringReservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation. Default value is None.
reservationOrderIdstringReservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order. Default value is None.
startDatestringStart date. Only applicable when querying with billing profile. Default value is None.

SELECT examples

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 }}'
;