az group
Manage resource groups and template deployments.
Commands
Name | Description | Type | Status |
---|---|---|---|
az group create |
Create a new resource group. |
Core | GA |
az group delete |
Delete a resource group. |
Core | GA |
az group deployment |
Manage Azure Resource Manager deployments. |
Core | Deprecated |
az group deployment cancel |
Cancels a currently running template deployment. |
Core | Deprecated |
az group deployment create |
Start a deployment. |
Core | Deprecated |
az group deployment delete |
Deletes a deployment from the deployment history. |
Core | Deprecated |
az group deployment export |
Export the template used for a deployment. |
Core | Deprecated |
az group deployment list |
Get all the deployments for a resource group. |
Core | Deprecated |
az group deployment operation |
Manage deployment operations. |
Core | Deprecated |
az group deployment operation list |
Gets all deployments operations for a deployment. |
Core | Deprecated |
az group deployment operation show |
Get a deployment's operation. |
Core | Deprecated |
az group deployment show |
Gets a deployment. |
Core | Deprecated |
az group deployment validate |
Validate whether a template is syntactically correct. |
Core | Deprecated |
az group deployment wait |
Place the CLI in a waiting state until a deployment condition is met. |
Core | Deprecated |
az group exists |
Check if a resource group exists. |
Core | GA |
az group export |
Captures a resource group as a template. |
Core | GA |
az group list |
List resource groups. |
Core | GA |
az group lock |
Manage Azure resource group locks. |
Core | GA |
az group lock create |
Create a resource group lock. |
Core | GA |
az group lock delete |
Delete a resource group lock. |
Core | GA |
az group lock list |
List lock information in the resource-group. |
Core | GA |
az group lock show |
Show the details of a resource group lock. |
Core | GA |
az group lock update |
Update a resource group lock. |
Core | GA |
az group show |
Gets a resource group. |
Core | GA |
az group update |
Update a resource group. |
Core | GA |
az group wait |
Place the CLI in a waiting state until a condition of the resource group is met. |
Core | GA |
az group create
Create a new resource group.
az group create --location
--name
[--managed-by]
[--tags]
Examples
Create a new resource group in the West US region.
az group create -l westus -n MyResourceGroup
Required Parameters
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Name of the new resource group.
Optional Parameters
The ID of the resource that manages this resource group.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
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 group delete
Delete a resource group.
az group delete --name
[--force-deletion-types {Microsoft.Compute/virtualMachineScaleSets, Microsoft.Compute/virtualMachines, Microsoft.Databricks/workspaces}]
[--no-wait]
[--yes]
Examples
Delete a resource group.
az group delete -n MyResourceGroup
Force delete all the Virtual Machines in a resource group.
az group delete -n MyResourceGroup --force-deletion-types Microsoft.Compute/virtualMachines
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The resource types you want to force delete.
Do not wait for the long-running operation to finish.
Do not prompt for confirmation.
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 group exists
Check if a resource group exists.
az group exists --name
Examples
Check if 'MyResourceGroup' exists.
az group exists -n MyResourceGroup
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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 group export
Captures a resource group as a template.
az group export --name
[--include-comments]
[--include-parameter-default-value]
[--resource-ids]
[--skip-all-params]
[--skip-resource-name-params]
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Export template with comments.
Export template parameter with default value.
Space-separated resource ids to filter the export by. To export all resources, do not specify this argument or supply "*".
Export template parameter and skip all parameterization.
Export template and skip resource name parameterization.
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 group list
List resource groups.
az group list [--tag]
Examples
List all resource groups located in the West US region.
az group list --query "[?location=='westus']"
Optional Parameters
A single tag in 'key[=value]' format. Use "" to clear existing tags.
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 group show
Gets a resource group.
az group show --name
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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 group update
Update a resource group.
az group update --name
[--add]
[--force-string]
[--remove]
[--set]
[--tags]
Examples
Update a resource group. (autogenerated)
az group update --resource-group MyResourceGroup --set tags.CostCenter='{"Dept":"IT","Environment":"Test"}'
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Argument 'properties_to_add' has been deprecated and will be removed in a future release.
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Argument 'properties_to_remove' has been deprecated and will be removed in a future release.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
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 group wait
Place the CLI in a waiting state until a condition of the resource group is met.
az group wait --name
[--created]
[--custom]
[--deleted]
[--exists]
[--interval]
[--timeout]
[--updated]
Examples
Place the CLI in a waiting state until a condition of the resource group is met. (autogenerated)
az group wait --created --resource-group MyResourceGroup
Place the CLI in a waiting state until a condition of the resource group is met. (autogenerated)
az group wait --deleted --resource-group MyResourceGroup
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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.
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