az reservations
Note
This reference is part of the reservation extension for the Azure CLI (version 2.45.0 or higher). The extension will automatically install the first time you run an az reservations command. Learn more about extensions.
Azure Reservations.
Commands
az reservations calculate-exchange |
Calculates price for exchanging |
az reservations catalog |
Reservations catalog. |
az reservations catalog show |
Get catalog of available reservation. |
az reservations exchange |
Returns one or more |
az reservations list |
List the reservations that the user has access to in the current tenant. |
az reservations reservation |
Reservations reservation. |
az reservations reservation archive |
Archiving a |
az reservations reservation list |
List Reservations within a single |
az reservations reservation list-available-scope |
List Available Scopes for |
az reservations reservation list-history |
List of all the revisions for the |
az reservations reservation merge |
Merge the specified |
az reservations reservation show |
Get specific |
az reservations reservation split |
Split a |
az reservations reservation unarchive |
Unarchiving a |
az reservations reservation update |
Update the applied scopes, renewal, name, instance-flexibility of the |
az reservations reservation wait |
Place the CLI in a waiting state until a condition is met. |
az reservations reservation-order |
Reservations reservation-order. |
az reservations reservation-order calculate |
Calculate price for placing a |
az reservations reservation-order calculate-refund |
Calculate price for returning |
az reservations reservation-order change-directory |
Change directory (tenant) of |
az reservations reservation-order list |
List of all the |
az reservations reservation-order purchase |
Create |
az reservations reservation-order return |
Return a reservation. |
az reservations reservation-order show |
Get the details of the |
az reservations reservation-order wait |
Place the CLI in a waiting state until a condition is met. |
az reservations reservation-order-id |
Reservations reservation-order-id. |
az reservations reservation-order-id list |
List applicable |
az reservations calculate-exchange
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
Do not wait for the long-running operation to finish.
List of reservations that are being returned in this exchange. Support shorthand-syntax, json-file and yaml-file. Try ??
to show more.
List of reservations that are being purchased in this exchange. Support shorthand-syntax, json-file and yaml-file. Try ??
to show more.
List of savings plans that are being purchased in this exchange. Support shorthand-syntax, json-file and yaml-file. Try ??
to show more.
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 exchange
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
Do not wait for the long-running operation to finish.
SessionId that was returned by CalculateExchange API.
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 list
List the reservations that the user has access to in the current tenant.
az reservations list [--filter]
[--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
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}.
May be used to sort order by reservation properties.
The selected provisioning state.
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.
Feedback
Submit and view feedback for