reservations
Creates, updates, deletes, gets or lists a reservations resource.
Overview
| Name | reservations |
| Type | Resource |
| Id | azure.billing.reservations |
Fields
The following fields are returned by SELECT queries:
- get_by_reservation_order
- list_by_reservation_order
- list_by_billing_profile
- list_by_billing_account
| 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. |
appliedScopeProperties | object | Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup. |
appliedScopeType | string | The applied scope type of the reservation. |
appliedScopes | array | The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope. |
archived | boolean | Indicates if the reservation is archived. |
benefitStartTime | string (date-time) | This is the DateTime when the reservation benefit started. |
billingPlan | string | The billing plan options available for this sku. Known values are: "Upfront" and "Monthly". (Upfront, Monthly) |
billingScopeId | string | Subscription that will be charged for purchasing reservation or savings plan. |
capabilities | string | Capabilities of the reservation. |
displayName | string | The display name of the reservation. |
displayProvisioningState | string | The provisioning state of the reservation for display, e.g. Succeeded. |
effectiveDateTime | string (date-time) | The effective date time of the reservation. |
etag | integer | :vartype etag: int |
expiryDate | string | The expiry date of the reservation. |
expiryDateTime | string (date-time) | This is the date-time when the reservation will expire. |
extendedStatusInfo | object | The message giving detailed information about the status code. |
instanceFlexibility | string | Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility. Known values are: "On" and "Off". (On, Off) |
lastUpdatedDateTime | string (date-time) | DateTime of the last time the reservation was updated. |
location | string | The location of the reservation. |
mergeProperties | object | Properties of reservation merge. |
productCode | string | Represents UPN. |
provisioningState | string | The provisioning state of the reservation, e.g. Succeeded. |
provisioningSubState | string | The provisioning state of the reservation, e.g. Succeeded. |
purchaseDate | string (date) | This is the date when the reservation was purchased. |
purchaseDateTime | string (date-time) | This is the date-time when the reservation was purchased. |
quantity | number | The number of the reservation. |
renew | boolean | The renew state of the reservation. |
renewDestination | string | Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. |
renewProperties | object | The renew properties for a reservation. |
renewSource | string | The renew source of the reservation. |
reservedResourceType | string | The reserved source type of the reservation, e.g. virtual machine. |
reviewDateTime | string (date-time) | This is the date-time when the Azure Hybrid Benefit needs to be reviewed. |
sku | object | The sku information associated to this reservation. |
skuDescription | string | The sku description of the reservation. |
splitProperties | object | Properties of reservation split. |
swapProperties | object | Properties of reservation swap. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Tags for this reservation. |
term | string | The term of the reservation, e.g. P1Y. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userFriendlyAppliedScopeType | string | The applied scope type of the reservation for display, e.g. Shared. |
userFriendlyRenewState | string | The renew state of the reservation for display, e.g. On. |
utilization | object | Reservation utilization. |
| 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. |
appliedScopeProperties | object | Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup. |
appliedScopeType | string | The applied scope type of the reservation. |
appliedScopes | array | The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope. |
archived | boolean | Indicates if the reservation is archived. |
benefitStartTime | string (date-time) | This is the DateTime when the reservation benefit started. |
billingPlan | string | The billing plan options available for this sku. Known values are: "Upfront" and "Monthly". (Upfront, Monthly) |
billingScopeId | string | Subscription that will be charged for purchasing reservation or savings plan. |
capabilities | string | Capabilities of the reservation. |
displayName | string | The display name of the reservation. |
displayProvisioningState | string | The provisioning state of the reservation for display, e.g. Succeeded. |
effectiveDateTime | string (date-time) | The effective date time of the reservation. |
etag | integer | :vartype etag: int |
expiryDate | string | The expiry date of the reservation. |
expiryDateTime | string (date-time) | This is the date-time when the reservation will expire. |
extendedStatusInfo | object | The message giving detailed information about the status code. |
instanceFlexibility | string | Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility. Known values are: "On" and "Off". (On, Off) |
lastUpdatedDateTime | string (date-time) | DateTime of the last time the reservation was updated. |
location | string | The location of the reservation. |
mergeProperties | object | Properties of reservation merge. |
productCode | string | Represents UPN. |
provisioningState | string | The provisioning state of the reservation, e.g. Succeeded. |
provisioningSubState | string | The provisioning state of the reservation, e.g. Succeeded. |
purchaseDate | string (date) | This is the date when the reservation was purchased. |
purchaseDateTime | string (date-time) | This is the date-time when the reservation was purchased. |
quantity | number | The number of the reservation. |
renew | boolean | The renew state of the reservation. |
renewDestination | string | Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. |
renewProperties | object | The renew properties for a reservation. |
renewSource | string | The renew source of the reservation. |
reservedResourceType | string | The reserved source type of the reservation, e.g. virtual machine. |
reviewDateTime | string (date-time) | This is the date-time when the Azure Hybrid Benefit needs to be reviewed. |
sku | object | The sku information associated to this reservation. |
skuDescription | string | The sku description of the reservation. |
splitProperties | object | Properties of reservation split. |
swapProperties | object | Properties of reservation swap. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Tags for this reservation. |
term | string | The term of the reservation, e.g. P1Y. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userFriendlyAppliedScopeType | string | The applied scope type of the reservation for display, e.g. Shared. |
userFriendlyRenewState | string | The renew state of the reservation for display, e.g. On. |
utilization | object | Reservation utilization. |
| 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. |
appliedScopeProperties | object | Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup. |
appliedScopeType | string | The applied scope type of the reservation. |
appliedScopes | array | The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope. |
archived | boolean | Indicates if the reservation is archived. |
benefitStartTime | string (date-time) | This is the DateTime when the reservation benefit started. |
billingPlan | string | The billing plan options available for this sku. Known values are: "Upfront" and "Monthly". (Upfront, Monthly) |
billingScopeId | string | Subscription that will be charged for purchasing reservation or savings plan. |
capabilities | string | Capabilities of the reservation. |
displayName | string | The display name of the reservation. |
displayProvisioningState | string | The provisioning state of the reservation for display, e.g. Succeeded. |
effectiveDateTime | string (date-time) | The effective date time of the reservation. |
etag | integer | :vartype etag: int |
expiryDate | string | The expiry date of the reservation. |
expiryDateTime | string (date-time) | This is the date-time when the reservation will expire. |
extendedStatusInfo | object | The message giving detailed information about the status code. |
instanceFlexibility | string | Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility. Known values are: "On" and "Off". (On, Off) |
lastUpdatedDateTime | string (date-time) | DateTime of the last time the reservation was updated. |
location | string | The location of the reservation. |
mergeProperties | object | Properties of reservation merge. |
productCode | string | Represents UPN. |
provisioningState | string | The provisioning state of the reservation, e.g. Succeeded. |
provisioningSubState | string | The provisioning state of the reservation, e.g. Succeeded. |
purchaseDate | string (date) | This is the date when the reservation was purchased. |
purchaseDateTime | string (date-time) | This is the date-time when the reservation was purchased. |
quantity | number | The number of the reservation. |
renew | boolean | The renew state of the reservation. |
renewDestination | string | Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. |
renewProperties | object | The renew properties for a reservation. |
renewSource | string | The renew source of the reservation. |
reservedResourceType | string | The reserved source type of the reservation, e.g. virtual machine. |
reviewDateTime | string (date-time) | This is the date-time when the Azure Hybrid Benefit needs to be reviewed. |
sku | object | The sku information associated to this reservation. |
skuDescription | string | The sku description of the reservation. |
splitProperties | object | Properties of reservation split. |
swapProperties | object | Properties of reservation swap. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Tags for this reservation. |
term | string | The term of the reservation, e.g. P1Y. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userFriendlyAppliedScopeType | string | The applied scope type of the reservation for display, e.g. Shared. |
userFriendlyRenewState | string | The renew state of the reservation for display, e.g. On. |
utilization | object | Reservation utilization. |
| 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. |
appliedScopeProperties | object | Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup. |
appliedScopeType | string | The applied scope type of the reservation. |
appliedScopes | array | The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope. |
archived | boolean | Indicates if the reservation is archived. |
benefitStartTime | string (date-time) | This is the DateTime when the reservation benefit started. |
billingPlan | string | The billing plan options available for this sku. Known values are: "Upfront" and "Monthly". (Upfront, Monthly) |
billingScopeId | string | Subscription that will be charged for purchasing reservation or savings plan. |
capabilities | string | Capabilities of the reservation. |
displayName | string | The display name of the reservation. |
displayProvisioningState | string | The provisioning state of the reservation for display, e.g. Succeeded. |
effectiveDateTime | string (date-time) | The effective date time of the reservation. |
etag | integer | :vartype etag: int |
expiryDate | string | The expiry date of the reservation. |
expiryDateTime | string (date-time) | This is the date-time when the reservation will expire. |
extendedStatusInfo | object | The message giving detailed information about the status code. |
instanceFlexibility | string | Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility. Known values are: "On" and "Off". (On, Off) |
lastUpdatedDateTime | string (date-time) | DateTime of the last time the reservation was updated. |
location | string | The location of the reservation. |
mergeProperties | object | Properties of reservation merge. |
productCode | string | Represents UPN. |
provisioningState | string | The provisioning state of the reservation, e.g. Succeeded. |
provisioningSubState | string | The provisioning state of the reservation, e.g. Succeeded. |
purchaseDate | string (date) | This is the date when the reservation was purchased. |
purchaseDateTime | string (date-time) | This is the date-time when the reservation was purchased. |
quantity | number | The number of the reservation. |
renew | boolean | The renew state of the reservation. |
renewDestination | string | Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}. |
renewProperties | object | The renew properties for a reservation. |
renewSource | string | The renew source of the reservation. |
reservedResourceType | string | The reserved source type of the reservation, e.g. virtual machine. |
reviewDateTime | string (date-time) | This is the date-time when the Azure Hybrid Benefit needs to be reviewed. |
sku | object | The sku information associated to this reservation. |
skuDescription | string | The sku description of the reservation. |
splitProperties | object | Properties of reservation split. |
swapProperties | object | Properties of reservation swap. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Tags for this reservation. |
term | string | The term of the reservation, e.g. P1Y. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
userFriendlyAppliedScopeType | string | The applied scope type of the reservation for display, e.g. Shared. |
userFriendlyRenewState | string | The renew state of the reservation for display, e.g. On. |
utilization | object | Reservation utilization. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_reservation_order | select | billing_account_name, reservation_order_id, reservation_id | expand | Get Reservation details in the billing account. Get specific Reservation details in the billing account. |
list_by_reservation_order | select | billing_account_name, reservation_order_id | Get Reservations in a given reservation Order in the billing account. List Reservations within a single ReservationOrder in the billing account. | |
list_by_billing_profile | select | billing_account_name, billing_profile_name | filter, orderBy, skiptoken, refreshSummary, selectedState, take | Lists the reservations for a billing profile and the roll up counts of reservations group by provisioning state. |
list_by_billing_account | select | billing_account_name | filter, orderBy, skiptoken, refreshSummary, selectedState, take | Lists the reservations in the billing account and the roll up counts of reservations group by provisioning states. |
update_by_billing_account | update | billing_account_name, reservation_order_id, reservation_id | Update reservation by billing account. |
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 |
|---|---|---|
billing_account_name | string | The ID that uniquely identifies a billing account. Required. |
billing_profile_name | string | The ID that uniquely identifies a billing profile. Required. |
reservation_id | string | Id of the reservation item. Required. |
reservation_order_id | string | Order Id of the reservation. Required. |
expand | string | May be used to expand the detail information of some properties. Default value is None. |
filter | string | The filter query option allows clients to filter a collection of resources that are addressed by a request URL. Default value is None. |
orderBy | string | The orderby query option allows clients to request resources in a particular order. Default value is None. |
refreshSummary | string | To indicate whether to refresh the roll up counts of the reservations group by provisioning states. Default value is None. |
selectedState | string | The selected provisioning state. Default value is None. |
skiptoken | number | The number of reservations to skip from the list before returning results. Default value is None. |
take | number | The number of reservations to return in API response. Default value is None. |
SELECT examples
- get_by_reservation_order
- list_by_reservation_order
- list_by_billing_profile
- list_by_billing_account
Get Reservation details in the billing account. Get specific Reservation details in the billing account.
SELECT
id,
name,
appliedScopeProperties,
appliedScopeType,
appliedScopes,
archived,
benefitStartTime,
billingPlan,
billingScopeId,
capabilities,
displayName,
displayProvisioningState,
effectiveDateTime,
etag,
expiryDate,
expiryDateTime,
extendedStatusInfo,
instanceFlexibility,
lastUpdatedDateTime,
location,
mergeProperties,
productCode,
provisioningState,
provisioningSubState,
purchaseDate,
purchaseDateTime,
quantity,
renew,
renewDestination,
renewProperties,
renewSource,
reservedResourceType,
reviewDateTime,
sku,
skuDescription,
splitProperties,
swapProperties,
systemData,
tags,
term,
type,
userFriendlyAppliedScopeType,
userFriendlyRenewState,
utilization
FROM azure.billing.reservations
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND reservation_order_id = '{{ reservation_order_id }}' -- required
AND reservation_id = '{{ reservation_id }}' -- required
AND expand = '{{ expand }}'
;
Get Reservations in a given reservation Order in the billing account. List Reservations within a single ReservationOrder in the billing account.
SELECT
id,
name,
appliedScopeProperties,
appliedScopeType,
appliedScopes,
archived,
benefitStartTime,
billingPlan,
billingScopeId,
capabilities,
displayName,
displayProvisioningState,
effectiveDateTime,
etag,
expiryDate,
expiryDateTime,
extendedStatusInfo,
instanceFlexibility,
lastUpdatedDateTime,
location,
mergeProperties,
productCode,
provisioningState,
provisioningSubState,
purchaseDate,
purchaseDateTime,
quantity,
renew,
renewDestination,
renewProperties,
renewSource,
reservedResourceType,
reviewDateTime,
sku,
skuDescription,
splitProperties,
swapProperties,
systemData,
tags,
term,
type,
userFriendlyAppliedScopeType,
userFriendlyRenewState,
utilization
FROM azure.billing.reservations
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND reservation_order_id = '{{ reservation_order_id }}' -- required
;
Lists the reservations for a billing profile and the roll up counts of reservations group by provisioning state.
SELECT
id,
name,
appliedScopeProperties,
appliedScopeType,
appliedScopes,
archived,
benefitStartTime,
billingPlan,
billingScopeId,
capabilities,
displayName,
displayProvisioningState,
effectiveDateTime,
etag,
expiryDate,
expiryDateTime,
extendedStatusInfo,
instanceFlexibility,
lastUpdatedDateTime,
location,
mergeProperties,
productCode,
provisioningState,
provisioningSubState,
purchaseDate,
purchaseDateTime,
quantity,
renew,
renewDestination,
renewProperties,
renewSource,
reservedResourceType,
reviewDateTime,
sku,
skuDescription,
splitProperties,
swapProperties,
systemData,
tags,
term,
type,
userFriendlyAppliedScopeType,
userFriendlyRenewState,
utilization
FROM azure.billing.reservations
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND skiptoken = '{{ skiptoken }}'
AND refreshSummary = '{{ refreshSummary }}'
AND selectedState = '{{ selectedState }}'
AND take = '{{ take }}'
;
Lists the reservations in the billing account and the roll up counts of reservations group by provisioning states.
SELECT
id,
name,
appliedScopeProperties,
appliedScopeType,
appliedScopes,
archived,
benefitStartTime,
billingPlan,
billingScopeId,
capabilities,
displayName,
displayProvisioningState,
effectiveDateTime,
etag,
expiryDate,
expiryDateTime,
extendedStatusInfo,
instanceFlexibility,
lastUpdatedDateTime,
location,
mergeProperties,
productCode,
provisioningState,
provisioningSubState,
purchaseDate,
purchaseDateTime,
quantity,
renew,
renewDestination,
renewProperties,
renewSource,
reservedResourceType,
reviewDateTime,
sku,
skuDescription,
splitProperties,
swapProperties,
systemData,
tags,
term,
type,
userFriendlyAppliedScopeType,
userFriendlyRenewState,
utilization
FROM azure.billing.reservations
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND filter = '{{ filter }}'
AND orderBy = '{{ orderBy }}'
AND skiptoken = '{{ skiptoken }}'
AND refreshSummary = '{{ refreshSummary }}'
AND selectedState = '{{ selectedState }}'
AND take = '{{ take }}'
;
UPDATE examples
- update_by_billing_account
Update reservation by billing account.
UPDATE azure.billing.reservations
SET
properties = '{{ properties }}',
sku = '{{ sku }}',
tags = '{{ tags }}'
WHERE
billing_account_name = '{{ billing_account_name }}' --required
AND reservation_order_id = '{{ reservation_order_id }}' --required
AND reservation_id = '{{ reservation_id }}' --required
RETURNING
id,
name,
etag,
location,
properties,
sku,
systemData,
tags,
type;