az reservations
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 command. Learn more about extensions.
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Azure Reservations.
Commands
Name | Description | Type | Status |
---|---|---|---|
az reservations calculate-exchange |
Calculates price for exchanging |
Extension | Preview |
az reservations catalog |
Reservations catalog. |
Extension | Preview |
az reservations catalog show |
Get catalog of available reservation. |
Extension | Preview |
az reservations exchange |
Returns one or more |
Extension | Preview |
az reservations list |
List the reservations that the user has access to in the current tenant. |
Extension | Preview |
az reservations reservation |
Reservations reservation. |
Extension | Preview |
az reservations reservation-order |
Reservations reservation-order. |
Extension | Preview |
az reservations reservation-order-id |
Reservations reservation-order-id. |
Extension | Preview |
az reservations reservation-order-id list |
List applicable |
Extension | Preview |
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 archive |
Archiving a |
Extension | Preview |
az reservations reservation list |
List Reservations within a single |
Extension | Preview |
az reservations reservation list-available-scope |
List Available Scopes for |
Extension | Preview |
az reservations reservation list-history |
List of all the revisions for the |
Extension | Preview |
az reservations reservation merge |
Merge the specified |
Extension | Preview |
az reservations reservation show |
Get specific |
Extension | Preview |
az reservations reservation split |
Split a |
Extension | Preview |
az reservations reservation unarchive |
Unarchiving a |
Extension | Preview |
az reservations reservation update |
Update the applied scopes, renewal, name, instance-flexibility of the |
Extension | Preview |
az reservations reservation wait |
Place the CLI in a waiting state until a condition is met. |
Extension | Preview |
az reservations calculate-exchange
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Calculates price for exchanging Reservations
if there are no policy errors.
az reservations calculate-exchange [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--ris-to-exchange]
[--ris-to-purchase]
[--sp-to-purchase]
Examples
Calculate exchange
az reservations calculate-exchange --ris-to-exchange "[{reservation-id:/providers/microsoft.capacity/reservationOrders/40000000-aaaa-bbbb-cccc-200000000012/reservations/51000000-aaaa-bbbb-cccc-200000000012,quantity:1},{reservation-id:/providers/microsoft.capacity/reservationOrders/90000000-aaaa-bbbb-cccc-200000000012/reservations/36000000-aaaa-bbbb-cccc-200000000012,quantity:1}]" --ris-to-purchase "[{reserved-resource-type:VirtualMachines,applied-scope-type:Shared,billing-scope:12350000-aaaa-bbbb-cccc-200000000012,display-name:exchangeTest1,quantity:1,sku:Standard_B1s,term:P1Y,billing-plan:Monthly,location:eastus},{reserved-resource-type:VirtualMachines,applied-scope-type:Shared,billing-scope:12350000-aaaa-bbbb-cccc-200000000012,display-name:exchangeTest2,quantity:1,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.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
List of reservations that are being returned in this exchange. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
List of reservations that are being purchased in this exchange. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Property | Value |
---|---|
Parameter group: | Properties Arguments |
List of savings plans that are being purchased in this exchange. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 exchange
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Returns one or more Reservations
in exchange for one or more Reservation
purchases.
az reservations exchange [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--session-id]
Examples
Exchange reservations
az reservations exchange --session-id 40000000-aaaa-bbbb-cccc-200000000012
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 |
SessionId that was returned by CalculateExchange 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 list
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List the reservations that the user has access to in the current tenant.
az reservations list [--filter]
[--max-items]
[--next-token]
[--orderby]
[--selected-state]
Examples
List reservations under the current tenant
az reservations list
List reservation which has "Failed" state under the current tenant
az reservations list --selected-state "Failed"
List all "VirtualMachines" reservations under the current tenant
az az reservations list --filter "properties/reservedResourceType eq 'VirtualMachines'"
List reservation and order the result by quantity in descending order
az reservations list --orderby 'properties/quantity desc'
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 filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}.
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 |
May be used to sort order by reservation properties.
The selected provisioning state.
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 |