Skip to main content

reservations_details

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

Overview

Namereservations_details
TypeResource
Idazure.consumption.reservations_details

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.
etagstringThe etag for the resource.
instanceFlexibilityGroupstringThe instance Flexibility Group.
instanceFlexibilityRatiostringThe instance Flexibility Ratio.
instanceIdstringThis identifier is the name of the resource or the fully qualified Resource ID.
kindstringThe reservation kind.
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 for the day. 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)The date on which consumption occurred.
usedHoursnumberThis is the total hours used by the instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_reservation_order_and_reservationselectreservation_order_id, reservation_id, $filterLists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into response size time outs.
list_by_reservation_orderselectreservation_order_id, $filterLists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into response size time outs.
listselectresource_scopestartDate, endDate, $filter, reservationId, reservationOrderIdLists the reservations details for provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into response size time outs.

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
$filterstringFilter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. 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.
$filterstringFilter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile. 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 details for provided date range. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. If the data size is too large, customers may also get 504 as the API timed out preparing the data. In such cases, API call should be made with smaller date ranges or a call to Generate Reservation Details Report API should be made as it is asynchronous and will not run into response size time outs.

SELECT
id,
name,
etag,
instanceFlexibilityGroup,
instanceFlexibilityRatio,
instanceId,
kind,
reservationId,
reservationOrderId,
reservedHours,
skuName,
systemData,
tags,
totalReservedQuantity,
type,
usageDate,
usedHours
FROM azure.consumption.reservations_details
WHERE reservation_order_id = '{{ reservation_order_id }}' -- required
AND reservation_id = '{{ reservation_id }}' -- required
AND $filter = '{{ $filter }}' -- required
;