az reservations reservation-order
Note
This reference is part of the reservation extension for the Azure CLI (version 2.50.0 or higher). The extension will automatically install the first time you run an az reservations reservation-order command. Learn more about extensions.
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Reservations reservation-order.
Commands
Name | Description | Type | Status |
---|---|---|---|
az reservations reservation-order calculate |
Calculate price for placing a |
Extension | Preview |
az reservations reservation-order calculate-refund |
Calculate price for returning |
Extension | Preview |
az reservations reservation-order change-directory |
Change directory (tenant) of |
Extension | Preview |
az reservations reservation-order list |
List of all the |
Extension | Preview |
az reservations reservation-order purchase |
Create |
Extension | Preview |
az reservations reservation-order return |
Return a reservation. |
Extension | Preview |
az reservations reservation-order show |
Get the details of the |
Extension | Preview |
az reservations reservation-order wait |
Place the CLI in a waiting state until a condition is met. |
Extension | Preview |
az reservations reservation-order calculate
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Calculate price for placing a ReservationOrder
.
az reservations reservation-order calculate [--applied-scope]
[--applied-scope-property]
[--applied-scope-type {ManagementGroup, Shared, Single}]
[--billing-plan {Monthly, Upfront}]
[--billing-scope]
[--display-name]
[--instance-flexibility {Off, On}]
[--location]
[--quantity]
[--renew {0, 1, f, false, n, no, t, true, y, yes}]
[--reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines}]
[--review-date-time]
[--sku]
[--term {P1Y, P3Y, P5Y}]
Examples
Calculate price
az reservations reservation-order calculate --applied-scope-type Shared --billing-scope 50000000-aaaa-bbbb-cccc-100000000002 --display-name name1 --quantity 1 --reserved-resource-type VirtualMachines --sku Standard_B1s --term P1Y --billing-plan Monthly --location eastus
Optional Parameters
Subscription that the benefit will be applied. Required if --applied-scope-type is Single. Do not specify if --applied-scope-type is Shared. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Type of the Applied Scope.
Represent the billing plans.
Subscription that will be charged for purchasing Reservation.
Friendly name of the Reservation.
Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
The Azure Region where the reserved resource lives.
Quantity of the SKUs that are part of the Reservation.
Setting this to true will automatically purchase a new reservation on the expiration date time.
The type of the resource that is being reserved.
This is the date-time when the Azure hybrid benefit needs to be reviewed.
Sku name for purchasing.
Represent the term of Reservation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order calculate-refund
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Calculate price for returning Reservations
if there are no policy errors.
az reservations reservation-order calculate-refund --reservation-order-id
[--id]
[--quantity]
[--reservation-id]
[--scope]
Examples
Calculate refund
az reservations reservation-order calculate-refund --reservation-order-id 0000000-aaaa-bbbb-cccc-20000000001 --id /providers/microsoft.capacity/reservationOrders/0000000-aaaa-bbbb-cccc-20000000001 --scope Reservation --quantity 1 --reservation-id /providers/microsoft.capacity/reservationOrders/0000000-aaaa-bbbb-cccc-20000000001/reservations/50000000-aaaa-bbbb-cccc-200000000000
Required Parameters
Order Id of the reservation.
Optional Parameters
Fully qualified identifier of the reservation order being returned.
Quantity to be returned. Must be greater than zero.
Fully qualified identifier of the Reservation being returned.
The scope of the refund, e.g. Reservation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order change-directory
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Change directory (tenant) of ReservationOrder
and all Reservation
under it to specified tenant id.
az reservations reservation-order change-directory --reservation-order-id
[--destination-tenant-id]
Examples
Change a reservation order to another tenant
az reservations reservation-order change-directory --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000000 --destination-tenant-id 10000000-aaaa-bbbb-cccc-200000000011
Required Parameters
Order Id of the reservation.
Optional Parameters
Tenant id GUID that reservation order is to be transferred to.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order list
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List of all the ReservationOrder
s that the user has access to in the current tenant.
az reservations reservation-order list [--max-items]
[--next-token]
Examples
List of all the reservation orders that the user has access to in the current tenant.
az reservations reservation-order list
Optional Parameters
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Token to specify where to start paginating. This is the token value from a previously truncated response.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order purchase
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create ReservationOrder
and create resource under the specified URI.
az reservations reservation-order purchase --reservation-order-id
[--applied-scope]
[--applied-scope-property]
[--applied-scope-type {ManagementGroup, Shared, Single}]
[--billing-plan {Monthly, Upfront}]
[--billing-scope]
[--display-name]
[--instance-flexibility {Off, On}]
[--location]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--quantity]
[--renew {0, 1, f, false, n, no, t, true, y, yes}]
[--reserved-resource-type {AVS, AppService, AzureDataExplorer, AzureFiles, BlockBlob, CosmosDb, DataFactory, Databricks, DedicatedHost, ManagedDisk, MariaDb, MySql, NetAppStorage, PostgreSql, RedHat, RedHatOsa, RedisCache, SapHana, SqlAzureHybridBenefit, SqlDataWarehouse, SqlDatabases, SqlEdge, SuseLinux, VMwareCloudSimple, VirtualMachineSoftware, VirtualMachines}]
[--review-date-time]
[--sku]
[--term {P1Y, P3Y, P5Y}]
Examples
Purchase a single scope reservation
az reservations reservation-order purchase --reservation-order-id 40000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type Single --billing-scope 50000000-aaaa-bbbb-cccc-200000000005 --reserved-resource-type VirtualMachines --display-name name1 --quantity 1 --sku Standard_B1s --term P1Y --billing-plan Monthly --location eastus --applied-scope 50000000-aaaa-bbbb-cccc-200000000010
Purchase a Single scope with resource group reservation
az reservations reservation-order purchase --reservation-order-id 40000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type Single --billing-scope 50000000-aaaa-bbbb-cccc-200000000005 --reserved-resource-type VirtualMachines --display-name testername1 --quantity 1 --sku Standard_B1s --term P1Y --billing-plan Monthly --location eastus --applied-scope '/subscriptions/50000000-aaaa-bbbb-cccc-200000000005/resourceGroups/rg1' --instance-flexibility Off
Required Parameters
Order Id of the reservation.
Optional Parameters
Subscription that the benefit will be applied. Required if --applied-scope-type is Single. Do not specify if --applied-scope-type is Shared. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Type of the Applied Scope.
Represent the billing plans.
Subscription that will be charged for purchasing Reservation.
Friendly name of the Reservation.
Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
The Azure Region where the reserved resource lives.
Do not wait for the long-running operation to finish.
Quantity of the SKUs that are part of the Reservation.
Setting this to true will automatically purchase a new reservation on the expiration date time.
The type of the resource that is being reserved.
This is the date-time when the Azure hybrid benefit needs to be reviewed.
Sku name for purchasing.
Represent the term of Reservation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order return
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Return a reservation.
az reservations reservation-order return --reservation-order-id
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--quantity]
[--reservation-id]
[--return-reason]
[--scope]
[--session-id]
Examples
Return a reservation
az reservations reservation-order return --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000000 --return-reason mockReason --scope Reservation --quantity 1 --reservation-id /providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-200000000000/reservations/30000000-aaaa-bbbb-cccc-200000000011 --session-id 40000000-aaaa-bbbb-cccc-200000000020
Required Parameters
Order Id of the reservation.
Optional Parameters
Do not wait for the long-running operation to finish.
Quantity to be returned. Must be greater than zero.
Fully qualified identifier of the Reservation being returned.
The reason of returning the reservation.
The scope of the refund, e.g. Reservation.
SessionId that was returned by CalculateRefund API.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order show
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get the details of the ReservationOrder
.
az reservations reservation-order show --reservation-order-id
[--expand]
Examples
Get the details of a reservation order
az reservations reservation-order show --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005
Required Parameters
Order Id of the reservation.
Optional Parameters
May be used to expand the planInformation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az reservations reservation-order wait
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Place the CLI in a waiting state until a condition is met.
az reservations reservation-order wait --reservation-order-id
[--created]
[--custom]
[--deleted]
[--exists]
[--expand]
[--interval]
[--timeout]
[--updated]
Required Parameters
Order Id of the reservation.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
May be used to expand the planInformation.
Polling interval in seconds.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.