Jaa


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 Reservation which is in cancelled/expired state and move it to Archived state.

Extension Preview
az reservations reservation list

List Reservations within a single ReservationOrder.

Extension Preview
az reservations reservation list-available-scope

List Available Scopes for Reservation.

Extension Preview
az reservations reservation list-history

List of all the revisions for the Reservation.

Extension Preview
az reservations reservation merge

Merge the specified Reservations into a new Reservation. The two Reservations being merged must have same properties.

Extension Preview
az reservations reservation show

Get specific Reservation details.

Extension Preview
az reservations reservation split

Split a Reservation into two Reservations with specified quantity distribution.

Extension Preview
az reservations reservation unarchive

Unarchiving a Reservation moves it to the state it was before archiving.

Extension Preview
az reservations reservation update

Update the applied scopes, renewal, name, instance-flexibility of the Reservation.

Extension Preview
az reservations reservation wait

Place the CLI in a waiting state until a condition is met.

Extension Preview

az reservations reservation archive

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

Order Id of the reservation.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation list

Preview

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

--reservation-order-id

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.

--max-items

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
--next-token

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation list-available-scope

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--scopes

Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation list-history

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

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.

--max-items

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
--next-token

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
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation merge

Preview

Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Merge the specified Reservations into a new Reservation. The two Reservations 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

--reservation-order-id

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--sources

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.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation show

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

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.

--expand

Supported value of this query is renewProperties.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation split

Preview

Command group 'reservations' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Split a Reservation into two Reservations 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

--reservation-order-id

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.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--quantities

List of the quantities in the new reservations to create. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: Properties Arguments
--reservation-id

Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

Property Value
Parameter group: Properties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation unarchive

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

Order Id of the reservation.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation update

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

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.

--applied-scope-property

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
--applied-scope-type

Type of the Applied Scope.

Property Value
Parameter group: Properties Arguments
Accepted values: ManagementGroup, Shared, Single
--applied-scopes

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.

Property Value
Parameter group: Properties Arguments
--instance-flexibility

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: Properties Arguments
Accepted values: Off, On
--name

Name of the Reservation.

Property Value
Parameter group: Properties Arguments
--no-wait

Do not wait for the long-running operation to finish.

Property Value
Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--renew

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
--renewal-properties

Renewal purchase properties Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Property Value
Parameter group: RenewProperties Arguments
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az reservations reservation wait

Preview

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

--reservation-id

Id of the Reservation Item.

--reservation-order-id

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.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--expand

Supported value of this query is renewProperties.

--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False