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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
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.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Type of the Applied Scope.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | ManagementGroup, Shared, Single |
Represent the billing plans.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | Monthly, Upfront |
Subscription that will be charged for purchasing Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Friendly name of the Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
Property | Value |
---|---|
Parameter group: | ReservedResourceProperties Arguments |
Accepted values: | Off, On |
The Azure Region where the reserved resource lives.
Property | Value |
---|---|
Parameter group: | Body Arguments |
Quantity of the SKUs that are part of the Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Setting this to true will automatically purchase a new reservation on the expiration date time.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Default value: | False |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The type of the resource that is being reserved.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | 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 |
This is the date-time when the Azure hybrid benefit needs to be reviewed.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Sku name for purchasing.
Property | Value |
---|---|
Parameter group: | Sku Arguments |
Represent the term of Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | P1Y, P3Y, P5Y |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Fully qualified identifier of the reservation order being returned.
Property | Value |
---|---|
Parameter group: | Body Arguments |
Quantity to be returned. Must be greater than zero.
Property | Value |
---|---|
Parameter group: | ReservationToReturn Arguments |
Fully qualified identifier of the Reservation being returned.
Property | Value |
---|---|
Parameter group: | ReservationToReturn Arguments |
The scope of the refund, e.g. Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Tenant id GUID that reservation order is to be transferred to.
Property | Value |
---|---|
Parameter group: | Body Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
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.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Type of the Applied Scope.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | ManagementGroup, Shared, Single |
Represent the billing plans.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | Monthly, Upfront |
Subscription that will be charged for purchasing Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Friendly name of the Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
Property | Value |
---|---|
Parameter group: | ReservedResourceProperties Arguments |
Accepted values: | Off, On |
The Azure Region where the reserved resource lives.
Property | Value |
---|---|
Parameter group: | Body Arguments |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Quantity of the SKUs that are part of the Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Setting this to true will automatically purchase a new reservation on the expiration date time.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Default value: | False |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The type of the resource that is being reserved.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | 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 |
This is the date-time when the Azure hybrid benefit needs to be reviewed.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Sku name for purchasing.
Property | Value |
---|---|
Parameter group: | Sku Arguments |
Represent the term of Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Accepted values: | P1Y, P3Y, P5Y |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Quantity to be returned. Must be greater than zero.
Property | Value |
---|---|
Parameter group: | ReservationToReturn Arguments |
Fully qualified identifier of the Reservation being returned.
Property | Value |
---|---|
Parameter group: | ReservationToReturn Arguments |
The reason of returning the reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
The scope of the refund, e.g. Reservation.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
SessionId that was returned by CalculateRefund API.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
May be used to expand the planInformation.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
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
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Wait until deleted.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the resource exists.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
May be used to expand the planInformation.
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
Maximum wait in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |