[英]Azure CLI - Azure Advisor Recommendation - does not have cost data for 'Microsoft.Compute/virtualMachines'
I was using az cli to get the Azure advisor recommendation data我正在使用 az cli 获取 Azure 顾问推荐数据
az advisor recommendation list --category cost --subscription ************* -o json --query "[?impactedField == 'Microsoft.Compute/virtualMachines'].{resource: impactedValue, cat: category, cpu: extendedProperties.MaxCpuP95 , memory: extendedProperties.MaxMemoryP95, saving: extendedProperties.savingsAmount, Recommendation: shortDescription.solution }"
While downloading pdf from portal it has "Potential savings/yr".从门户网站下载 pdf 时,它具有“潜在节省/年”。 I found az cli is retuning different output for "Reserve Instances Recommendation" but for VM's it does not have cost related information.
我发现 az cli 正在为“预留实例建议”重新调整不同的 output,但对于 VM,它没有成本相关信息。
You can use the below PowerShell cmdlet to pull the Potential savings of the virtual machine's in the subscription.您可以使用以下 PowerShell cmdlet 提取订阅中虚拟机的潜在节省。
Get-AzAdvisorRecommendation -Category Cost | Where-Object {$_.ImpactedField -eq "Microsoft.Compute/virtualMachines"} | Select-Object -ExpandProperty ExtendedProperties
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.