Skip to main content

reservation_order

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

Overview

Namereservation_order
TypeResource
Idazure.reservations.reservation_order

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.
benefitStartTimestring (date-time)This is the DateTime when the reservation benefit started.
billingPlanstringRepresent the billing plans. Known values are: "Upfront" and "Monthly". (Upfront, Monthly)
createdDateTimestring (date-time)This is the DateTime when the reservation was created.
displayNamestringFriendly name for user to easily identified the reservation.
etaginteger:vartype etag: int
expiryDatestring (date)This is the date when the reservation will expire.
expiryDateTimestring (date-time)This is the date-time when the reservation will expire.
originalQuantityintegerTotal Quantity of the skus purchased in the reservation.
planInformationobjectInformation describing the type of billing plan for this reservation.
provisioningStatestringCurrent state of the reservation. Known values are: "Creating", "PendingResourceHold", "ConfirmedResourceHold", "PendingBilling", "ConfirmedBilling", "Created", "Succeeded", "Cancelled", "Expired", "BillingFailed", "Failed", "Split", and "Merged". (Creating, PendingResourceHold, ConfirmedResourceHold, PendingBilling, ConfirmedBilling, Created, Succeeded, Cancelled, Expired, BillingFailed, Failed, Split, Merged)
requestDateTimestring (date-time)This is the DateTime when the reservation was initially requested for purchase.
reservationsarray:vartype reservations: list[~azure.mgmt.reservations.models.ReservationResponse]
reviewDateTimestring (date-time)This is the date-time when the Azure Hybrid Benefit needs to be reviewed.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
termstringRepresent the term of reservation. Known values are: "P1Y", "P3Y", and "P5Y". (P1Y, P3Y, P5Y)
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectreservation_order_id$expandGet a specific ReservationOrder. Get the details of the ReservationOrder.
listselectGet all ReservationOrders. List of all the ReservationOrders that the user has access to in the current tenant.
purchaseexecreservation_order_idPurchase ReservationOrder. Purchase ReservationOrder and create resource under the specified URI.
change_directoryexecreservation_order_idChange directory of ReservationOrder. Change directory (tenant) of ReservationOrder and all Reservation under it to specified tenant id.
calculateexecCalculate price for a ReservationOrder. Calculate price for placing a ReservationOrder.

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
reservation_order_idstringOrder Id of the reservation. Required.
$expandstringMay be used to expand the planInformation. Default value is None.

SELECT examples

Get a specific ReservationOrder. Get the details of the ReservationOrder.

SELECT
id,
name,
benefitStartTime,
billingPlan,
createdDateTime,
displayName,
etag,
expiryDate,
expiryDateTime,
originalQuantity,
planInformation,
provisioningState,
requestDateTime,
reservations,
reviewDateTime,
systemData,
term,
type
FROM azure.reservations.reservation_order
WHERE reservation_order_id = '{{ reservation_order_id }}' -- required
AND $expand = '{{ $expand }}'
;

Lifecycle Methods

Purchase ReservationOrder. Purchase ReservationOrder and create resource under the specified URI.

EXEC azure.reservations.reservation_order.purchase 
@reservation_order_id='{{ reservation_order_id }}' --required
@@json=
'{
"sku": "{{ sku }}",
"location": "{{ location }}",
"properties": "{{ properties }}"
}'
;