az group
Manage resource groups and template deployments.
Commands
az group create | Create a new resource group. |
az group delete | Delete a resource group. |
az group deployment | Manage Azure Resource Manager deployments. |
az group deployment create | Start a deployment. |
az group deployment delete | Deletes a deployment from the deployment history. |
az group deployment export | Export the template used for a deployment. |
az group deployment list | Get all the deployments for a resource group. |
az group deployment operation | Manage deployment operations. |
az group deployment operation list | Gets all deployments operations for a deployment. |
az group deployment operation show | Get a deployment's operation. |
az group deployment show | Gets a deployment. |
az group deployment validate | Validate whether a template is syntactically correct. |
az group deployment wait | Place the CLI in a waiting state until a deployment condition is met. |
az group exists | Check if a resource group exists. |
az group export | Captures a resource group as a template. |
az group list | List resource groups. |
az group lock | Manage Azure resource group locks. |
az group lock create | Create a resource group lock. |
az group lock delete | Delete a resource group lock. |
az group lock list | List lock information in the resource-group. |
az group lock show | Show the details of a resource group lock. |
az group lock update | Update a resource group lock. |
az group show | Gets a resource group. |
az group update | Update a resource group. |
az group wait | Place the CLI in a waiting state until a condition of the resource group is met. |
az group create
Create a new resource group.
az group create --location
--name
[--subscription]
[--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
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.
az group delete
Delete a resource group.
az group delete --name
[--no-wait]
[--subscription]
[--yes]
Examples
Delete a resource group.
az group delete -n MyResourceGroup
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Do not wait for the long-running operation to finish.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Do not prompt for confirmation.
az group exists
Check if a resource group exists.
az group exists --name
[--subscription]
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>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
az group export
Captures a resource group as a template.
az group export --name
[--include-comments]
[--include-parameter-default-value]
[--subscription]
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
az group list
List resource groups.
az group list [--subscription]
[--tag]
Examples
List all resource groups located in the West US region.
az group list --query "[?location=='westus']"
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
A single tag in 'key[=value]' format. Use "" to clear existing tags.
az group show
Gets a resource group.
az group show --name
[--subscription]
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
az group update
Update a resource group.
az group update --name
[--add]
[--force-string]
[--remove]
[--set]
[--subscription]
[--tags]
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
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.
Remove a property or an element from a list. Example: --remove property.list
Update an object by specifying a property path and value to set. Example: --set property1.property2=
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Space-separated tags in 'key[=value]' format. Use "" to clear existing tags.
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]
[--subscription]
[--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
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.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.