reservations_details
Creates, updates, deletes, gets or lists a reservations_details resource.
Overview
| Name | reservations_details |
| Type | Resource |
| Id | azure.consumption.reservations_details |
Fields
The following fields are returned by SELECT queries:
- list_by_reservation_order_and_reservation
- list_by_reservation_order
- 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. |
etag | string | The etag for the resource. |
instanceFlexibilityGroup | string | The instance Flexibility Group. |
instanceFlexibilityRatio | string | The instance Flexibility Ratio. |
instanceId | string | This identifier is the name of the resource or the fully qualified Resource ID. |
kind | string | The reservation kind. |
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 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. |
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) | The date on which consumption occurred. |
usedHours | number | This is the total hours used by the instance. |
| 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. |
etag | string | The etag for the resource. |
instanceFlexibilityGroup | string | The instance Flexibility Group. |
instanceFlexibilityRatio | string | The instance Flexibility Ratio. |
instanceId | string | This identifier is the name of the resource or the fully qualified Resource ID. |
kind | string | The reservation kind. |
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 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. |
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) | The date on which consumption occurred. |
usedHours | number | This is the total hours used by the instance. |
| 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. |
etag | string | The etag for the resource. |
instanceFlexibilityGroup | string | The instance Flexibility Group. |
instanceFlexibilityRatio | string | The instance Flexibility Ratio. |
instanceId | string | This identifier is the name of the resource or the fully qualified Resource ID. |
kind | string | The reservation kind. |
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 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. |
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) | The date on which consumption occurred. |
usedHours | number | This is the total hours used by the instance. |
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, $filter | 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. | |
list_by_reservation_order | select | reservation_order_id, $filter | 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. | |
list | select | resource_scope | startDate, endDate, $filter, reservationId, reservationOrderId | 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. |
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 |
|---|---|---|
$filter | string | Filter reservation details by date range. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. 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 | Filter 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. |
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_by_reservation_order
- list
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
;
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 $filter = '{{ $filter }}' -- required
;
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 resource_scope = '{{ resource_scope }}' -- required
AND startDate = '{{ startDate }}'
AND endDate = '{{ endDate }}'
AND $filter = '{{ $filter }}'
AND reservationId = '{{ reservationId }}'
AND reservationOrderId = '{{ reservationOrderId }}'
;