我正在Azure存储上创建指标警报,因为我确实具有ARM模板当我通过Azure Powershell执行它时,我将收到如下所述的错误,并且我不确定是什么导致了此问题。
POWERSHELL COMMAND:New-AzResourceGroupDeployment -name "StorageBlobDeployment" -ResourceGroupName TestStorage-RG -TemplateFile "C:\ARM\azureDeploy.storage.json" -TemplateParameterFile "C:\ARM\azureDeploy.storage.parameters.json"
尽管当我通过Portal部署相同的ARM模板时,它可以很好地工作。
以下错误:
new-AzResourceGroupDeployment : 2:37:34 PM - Resource microsoft.insights/metricAlerts '-storage_account_ingress_traffic_alert' failed with message '{
"Code": "BadRequest",
"Message": "The resource type could not be found in the namespace 'Microsoft.storage' for api version '2018-01-01'."
}
我想这是因为您的Azure Powershell已过时。更新它,它将正常工作。