az reservations reservation
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 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.
Commands
Name | Description | Type | Status |
---|---|---|---|
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 reservation archive
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Archiving a Reservation
which is in cancelled/expired state and move it to Archived
state.
az reservations reservation archive --reservation-id
--reservation-order-id
Examples
Archiving a reservation
az reservations reservation archive --reservation-order-id 40000000-aaaa-bbbb-cccc-20000000000 --reservation-id 50000000-aaaa-bbbb-cccc-200000000000
Required Parameters
Id of the Reservation Item.
Order Id of the 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 list
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List Reservations within a single ReservationOrder
.
az reservations reservation list --reservation-order-id
[--max-items]
[--next-token]
Examples
List all reservations within a reservation order.
az reservations reservation list --reservation-order-id 50000000-aaaa-bbbb-cccc-100000000002
Required Parameters
Order Id of the reservation.
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 list-available-scope
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List Available Scopes for Reservation
.
az reservations reservation list-available-scope --reservation-id
--reservation-order-id
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--scopes]
Examples
List reservation available scopes
az reservations reservation list-available-scope --reservation-order-id 40000000-aaaa-bbbb-cccc-20000000000 --reservation-id 30000000-aaaa-bbbb-cccc-20000000000 --scopes ['/subscriptions/60000000-aaaa-bbbb-cccc-20000000000']
Required Parameters
Id of the Reservation Item.
Order Id of the reservation.
Optional Parameters
Do not wait for the long-running operation to finish.
Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 list-history
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List of all the revisions for the Reservation
.
az reservations reservation list-history --reservation-id
--reservation-order-id
[--max-items]
[--next-token]
Examples
Get history of a reservation.
az reservations reservation list-history --reservation-id 50000000-aaaa-bbbb-cccc-100000000002 --reservation-order-id 10000000-aaaa-bbbb-cccc-100000000005
Required Parameters
Id of the Reservation Item.
Order Id of the reservation.
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 merge
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Merge the specified Reservation
s into a new Reservation
. The two Reservation
s being merged must have same properties.
az reservations reservation merge --reservation-order-id
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--sources]
Examples
Merge reservations
az reservations reservation merge --reservation-order-id 10000000-aaaa-bbbb-cccc-100000000005 --sources "['/providers/Microsoft.Capacity/reservationOrders/10000000-aaaa-bbbb-cccc-100000000005/reservations/30000000-aaaa-bbbb-cccc-100000000002','/providers/Microsoft.Capacity/reservationOrders/10000000-aaaa-bbbb-cccc-100000000005/reservations/30000000-aaaa-bbbb-cccc-100000000004']"
Required Parameters
Order Id of the reservation.
Optional Parameters
Do not wait for the long-running operation to finish.
Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId} Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 show
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get specific Reservation
details.
az reservations reservation show --reservation-id
--reservation-order-id
[--expand]
Examples
Get a reservation detail
az reservations reservation show --reservation-id 40000000-aaaa-bbbb-cccc-100000000001 --reservation-order-id 10000000-aaaa-bbbb-cccc-200000000001
Required Parameters
Id of the Reservation Item.
Order Id of the reservation.
Optional Parameters
Supported value of this query is renewProperties.
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 split
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Split a Reservation
into two Reservation
s with specified quantity distribution.
az reservations reservation split --reservation-order-id
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--quantities]
[--reservation-id]
Examples
Split a reservation
az reservations reservation split --quantities "[2,8]" --reservation-id /providers/Microsoft.Capacity/reservationOrders/30000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000001 --reservation-order-id 30000000-aaaa-bbbb-cccc-100000000004
Required Parameters
Order Id of the reservation.
Optional Parameters
Do not wait for the long-running operation to finish.
List of the quantities in the new reservations to create. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.
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 unarchive
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Unarchiving a Reservation
moves it to the state it was before archiving.
az reservations reservation unarchive --reservation-id
--reservation-order-id
Examples
Unarchiving a reservation
az reservations reservation unarchive --reservation-order-id 40000000-aaaa-bbbb-cccc-20000000000 --reservation-id 50000000-aaaa-bbbb-cccc-200000000000
Required Parameters
Id of the Reservation Item.
Order Id of the 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 update
Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update the applied scopes, renewal, name, instance-flexibility of the Reservation
.
az reservations reservation update --reservation-id
--reservation-order-id
[--applied-scope-property]
[--applied-scope-type {ManagementGroup, Shared, Single}]
[--applied-scopes]
[--instance-flexibility {Off, On}]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--renew {0, 1, f, false, n, no, t, true, y, yes}]
[--renewal-properties]
Examples
Set reservation to Shared scope
az reservations reservation update --applied-scope-type Shared --reservation-id 10000000-aaaa-bbbb-cccc-200000000001 --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005
Set reservation renewal
az reservations reservation update --reservation-id 10000000-aaaa-bbbb-cccc-200000000001 --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005 --renew true
Set reservation to Single scope
az reservations reservation update --reservation-id 10000000-aaaa-bbbb-cccc-200000000001 --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type Single --applied-scopes ['/subscriptions/50000000-aaaa-bbbb-cccc-200000000009']
Set reservation to Single scope resource group
az reservations reservation update --reservation-id 10000000-aaaa-bbbb-cccc-200000000001 --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type Single --applied-scopes ['/subscriptions/50000000-aaaa-bbbb-cccc-200000000009/resourceGroups/mock_resource_group_name']
Set reservation to management group scope
az reservations reservation update --reservation-id 10000000-aaaa-bbbb-cccc-200000000001 --reservation-order-id 50000000-aaaa-bbbb-cccc-200000000005 --applied-scope-type ManagementGroup --applied-scope-property '{management-group-id:/providers/Microsoft.Management/managementGroups/mock_management_group_name,tenant-id:50000000-aaaa-bbbb-cccc-200000000008}'
Required Parameters
Id of the Reservation Item.
Order Id of the reservation.
Optional Parameters
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.
List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.
Name of the Reservation.
Do not wait for the long-running operation to finish.
Setting this to true will automatically purchase a new reservation on the expiration date time.
Renewal purchase properties Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
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 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 wait --reservation-id
--reservation-order-id
[--created]
[--custom]
[--deleted]
[--exists]
[--expand]
[--interval]
[--timeout]
[--updated]
Required Parameters
Id of the Reservation Item.
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.
Supported value of this query is renewProperties.
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.
Azure CLI