reservation_orders
Creates, updates, deletes, gets or lists a reservation_orders resource.
Overview
| Name | reservation_orders |
| Type | Resource |
| Id | azure.reservations.reservation_orders |
Fields
The following fields are returned by SELECT queries:
- get
- list
Get the details of the ReservationOrder.
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of the reservation |
name | string | Name of the reservation |
etag | integer (int32) | |
properties | object | Properties of a reservation order. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | Type of resource. "Microsoft.Capacity/reservations" |
List of ReservationOrders
| Name | Datatype | Description |
|---|---|---|
id | string | Identifier of the reservation |
name | string | Name of the reservation |
etag | integer (int32) | |
properties | object | Properties of a reservation order. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | Type of resource. "Microsoft.Capacity/reservations" |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | reservationOrderId | $expand | Get the details of the ReservationOrder. |
list | select | List of all the ReservationOrders that the user has access to in the current tenant. | ||
calculate | exec | Calculate price for placing a ReservationOrder. | ||
purchase | exec | reservationOrderId | Purchase ReservationOrder and create resource under the specified URI. | |
change_directory | exec | reservationOrderId | Change directory (tenant) of ReservationOrder and all Reservation under it to specified tenant id |
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 |
|---|---|---|
reservationOrderId | string | Order Id of the reservation |
$expand | string | May be used to expand the planInformation. |
SELECT examples
- get
- list
Get the details of the ReservationOrder.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.reservations.reservation_orders
WHERE reservationOrderId = '{{ reservationOrderId }}' -- required
AND $expand = '{{ $expand }}'
;
List of all the ReservationOrders that the user has access to in the current tenant.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.reservations.reservation_orders
;
Lifecycle Methods
- calculate
- purchase
- change_directory
Calculate price for placing a ReservationOrder.
EXEC azure.reservations.reservation_orders.calculate
@@json=
'{
"sku": "{{ sku }}",
"location": "{{ location }}",
"properties": "{{ properties }}"
}'
;
Purchase ReservationOrder and create resource under the specified URI.
EXEC azure.reservations.reservation_orders.purchase
@reservationOrderId='{{ reservationOrderId }}' --required
@@json=
'{
"sku": "{{ sku }}",
"location": "{{ location }}",
"properties": "{{ properties }}"
}'
;
Change directory (tenant) of ReservationOrder and all Reservation under it to specified tenant id
EXEC azure.reservations.reservation_orders.change_directory
@reservationOrderId='{{ reservationOrderId }}' --required
@@json=
'{
"destinationTenantId": "{{ destinationTenantId }}"
}'
;