az capacity reservation group

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

Manage capacity reservation group.

Commands

Name Description Type Status
az capacity reservation group create

Create capacity reservation group.

Core Preview
az capacity reservation group delete

Delete operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.

Core Preview
az capacity reservation group list

List the capacity reservation groups.

Core Preview
az capacity reservation group show

Show capacity reservation group.

Core Preview
az capacity reservation group update

Update capacity reservation group.

Core Preview

az capacity reservation group create

Preview

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

Create capacity reservation group.

az capacity reservation group create --capacity-reservation-group
                                     --resource-group
                                     [--location]
                                     [--sharing-profile]
                                     [--tags]
                                     [--zones]

Examples

Create a capacity reservation group.

az capacity reservation group create -n ReservationGroupName -g MyResourceGroup

Create a capacity reservation group with specific zones.

az capacity reservation group create -n ReservationGroupName -l centraluseuap \
    -g MyResourceGroup --tags key=val --zones 1 2

Required Parameters

--capacity-reservation-group -n

The name of the capacity reservation group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--sharing-profile

Space-separated subscription resource IDs or nothing. Specify the settings to enable sharing across subscriptions for the capacity reservation group resource. Specify it to nothing to unsharing.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--zones -z

Availability Zones to use for this capacity reservation group. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az capacity reservation group delete

Preview

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

Delete operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.

az capacity reservation group delete [--capacity-reservation-group]
                                     [--ids]
                                     [--resource-group]
                                     [--subscription]
                                     [--yes]

Examples

Delete a capacity reservation group.

az capacity reservation group delete -n ReservationGroupName -g MyResourceGroup --yes

Optional Parameters

--capacity-reservation-group --capacity-reservation-group-name -n

The name of the capacity reservation group.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription

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

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az capacity reservation group list

Preview

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

List the capacity reservation groups.

az capacity reservation group list [--max-items]
                                   [--next-token]
                                   [--resource-group]
                                   [--resource-ids-only {All, CreatedInSubscription, SharedWithSubscription}]
                                   [--vm-instance {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--vmss-instance {0, 1, f, false, n, no, t, true, y, yes}]

Examples

List capacity reservation groups

az capacity reservation group list -g rg

List the capacity reservation groups containing VM instances and VMSS instance which are associated to capacity reservation group

az capacity reservation group list -g rg --vm-instance --vmss-instance

Optional Parameters

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

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--resource-ids-only

The query option to fetch capacity reservation group resource Ids. 'CreatedInSubscription' enables fetching resource Ids for all capacity reservation group resources created in the subscription. 'SharedWithSubscription' enables fetching resource Ids for all capacity reservation group resources shared with the subscription. 'All' enables fetching resource Ids for all capacity reservation group resources shared with the subscription and created in the subscription.

accepted values: All, CreatedInSubscription, SharedWithSubscription
--vm-instance

Retrieve the Virtual Machine Instance which are associated to capacity reservation group in the response.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--vmss-instance

Retrieve the ScaleSet VM Instance which are associated to capacity reservation group in the response.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az capacity reservation group show

Preview

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

Show capacity reservation group.

az capacity reservation group show --capacity-reservation-group
                                   --resource-group
                                   [--instance-view]

Examples

Get a capacity reservation group.

az capacity reservation group show -n ReservationGroupName -g MyResourceGroup

Get a capacity reservation group containing the instance views of the capacity reservations under the capacity reservation group

az capacity reservation group show -n ReservationGroupName -g MyResourceGroup --instance-view

Required Parameters

--capacity-reservation-group -n

The name of the capacity reservation group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--instance-view -i

Retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.

az capacity reservation group update

Preview

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

Update capacity reservation group.

az capacity reservation group update --capacity-reservation-group
                                     --resource-group
                                     [--sharing-profile]
                                     [--tags]

Examples

Update a capacity reservation group.

az capacity reservation group update -n ReservationGroupName -g MyResourceGroup --tags key=val

Required Parameters

--capacity-reservation-group -n

The name of the capacity reservation group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--sharing-profile

Space-separated subscription resource IDs or nothing. Specify the settings to enable sharing across subscriptions for the capacity reservation group resource. Specify it to nothing to unsharing.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--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.