null
如果我列出我的资源,它会告诉我有标签az resource list --tag Departement=Finance
az resource list --tag Departement=Finance
[
{
"id": "/subscriptions/28b7bf82-0a7d-4ca7-9827-811c620d6d52/resourceGroups/msftlearn-core-infrastructure-rg/providers/Microsoft.Network/virtualNetworks/msftlearn-vnet1",
"identity": null,
"kind": null,
"location": "switzerlandnorth",
"managedBy": null,
"name": "msftlearn-vnet1",
"plan": null,
"properties": null,
"resourceGroup": "msftlearn-core-infrastructure-rg",
"sku": null,
"tags": null,
"type": "Microsoft.Network/virtualNetworks"
}
]
但az resource list --resource-group msftlearn-core-infrastructure-rg
它显示了我所有的标签。
az resource list --resource-group msftlearn-core-infrastructure-rg
[
{
"id": "/subscriptions/28b7bf82-0a7d-4ca7-9827-811c620d6d52/resourceGroups/msftlearn-core-infrastructure-rg/providers/Microsoft.Network/virtualNetworks/msftlearn-vnet1",
"identity": null,
"kind": null,
"location": "switzerlandnorth",
"managedBy": null,
"name": "msftlearn-vnet1",
"plan": null,
"properties": null,
"resourceGroup": "msftlearn-core-infrastructure-rg",
"sku": null,
"tags": {
"Departement": "Finance",
"Environment": "learn"
},
"type": "Microsoft.Network/virtualNetworks"
},
{
"id": "/subscriptions/28b7bf82-0a7d-4ca7-9827-811c620d6d52/resourceGroups/msftlearn-core-infrastructure-rg/providers/Microsoft.Network/virtualNetworks/msftlearn-vnet2",
"identity": null,
"kind": null,
"location": "switzerlandnorth",
"managedBy": null,
"name": "msftlearn-vnet2",
"plan": null,
"properties": null,
"resourceGroup": "msftlearn-core-infrastructure-rg",
"sku": null,
"tags": {
"Departement": "Marketing",
"Environment": "learn"
},
"type": "Microsoft.Network/virtualNetworks"
}
]
这是一个错误还是必须是这样?