Linux command
az-group 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Create a resource group
az group create -l [westus] -n [MyResourceGroup]
List all resource groups
az group list -o table
Show details
az group show -n [MyResourceGroup]
Check if a resource group exists
az group exists -n [MyResourceGroup]
Delete a resource group
az group delete -n [MyResourceGroup]
Export a resource group
az group export -n [MyResourceGroup]
List resource groups
az group list --query "[?location=='westus']"
说明
az group manages Azure resource groups, which are logical containers for Azure resources. All resources in Azure must belong to a resource group, and groups provide a way to organize, manage, and apply policies to related resources. Resource groups define the lifecycle scope for resources; deleting a group deletes all contained resources. Groups also provide a scope for role-based access control (RBAC) and policy assignments.
参数
- -n, --name _value_
- Name of the resource group
- -l, --location _value_
- Location for the resource group (e.g., westus, eastus)
- --tags _value_
- Space-separated tags in key=value format
- --export-format _value_
- Export format: json (default) or bicep
FAQ
What is the az-group command used for?
az group manages Azure resource groups, which are logical containers for Azure resources. All resources in Azure must belong to a resource group, and groups provide a way to organize, manage, and apply policies to related resources. Resource groups define the lifecycle scope for resources; deleting a group deletes all contained resources. Groups also provide a scope for role-based access control (RBAC) and policy assignments.
How do I run a basic az-group example?
Run `az group create -l [westus] -n [MyResourceGroup]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n, --name _value_ do in az-group?
Name of the resource group