azure - Azure Depolyment 的 Azure 标记不起作用
问题描述
我正在尝试使用 Tag 参数创建一个 Azure 部署,以使用命令 New-AzResourceGroupDeployment将标签放在部署上,例如 -
New-AzResourceGroupDeployment -ResourceGroupName "demo" -TemplateFile "D:\Templates\storage.json" -Tag @{"CreatedFrom"="PS"; "Env"="Dev";}
但面对这个问题 -
New-AzResourceGroupDeployment : A parameter cannot be found that matches parameter name 'Tag'.
At line:1 char:102
+ ... Name "demo" -TemplateFile "D:\Templates\storage.json" -Tag @{"Crea ...
+ ~~~~
+ CategoryInfo : InvalidArgument: (:) [New-AzResourceGroupDeployment], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.N
ewAzureResourceGroupDeploymentCmdlet
根据文档,我们可以将标签参数与New-AzResourceGroupDeployment
命令一起使用,但它对我不起作用。
对于我在这里做错的任何帮助将不胜感激!
解决方案
该命令在这里工作正常。确保您拥有最新版本的命令。
https://docs.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-6.1.0
推荐阅读
- java - 在 Netty 处理程序中管理 CompletionStage
- javascript - Python GEE 从 Landsat 图像中提取特征收集时间序列
- amazon-web-services - amplify init fails on validation caused [$LATEST] inside 'stackName' value
- c# - 在游戏对象仍在改变其比例时将其销毁
- python - 如何在 keras 中对一组图像及其掩码执行数据增强?
- netty - Micronaut 应用服务器启动错误
- laravel - 如何检查购物车是否已经添加不允许更多并更新如果不同的购物车
- rust - How to "use another-file" in rust? Module with hyphens in it
- flutter - 如何将子小部件定位在父小部件的边缘
- maven - 将一个模块转换为独立的 Maven 项目,包括一个最小的工作 POM