Get-AzureRmComputeResourceSku如何访问Costs属性? [英] Get-AzureRmComputeResourceSku how to access the Costs Property ?

查看:86
本文介绍了Get-AzureRmComputeResourceSku如何访问Costs属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个函数,使我们的OPS团队可以从过滤列表中选择虚拟机大小.

$ ResSkuVMCAnadaCentral = Get-AzureRmComputeResourceSku | where对象{($ _.Locations -like'* canadacentral *'-AND $ _.ResourceType -like'* virtualmachines *')-AND $ _.Restrictions.ReasonCode -eq $ null} 

gm显示

    TypeName:Microsoft.Azure.Commands.Compute.Automation.Models.PSResourceSku

但是Costs属性为空?.我的帐户有权查看我们订阅的帐单信息.

But the Costs property is empty ?.  My account has permission to see the Billing info for our subscrption.

有人知道谁检索与类型为Microsoft.Azure.Management.Compute.Models.ResourceSkuRestrictions的对象相关联的费用信息吗?

Does anyone know who to retrieve the cost info associated to an object of type Microsoft.Azure.Management.Compute.Models.ResourceSkuRestrictions ?

谢谢

推荐答案

naimco,我建议您使用这是一篇包含说明和一些示例的文章:

Here is an article with instructions and some examples:

https://docs.microsoft.com/zh-cn/previous-versions/azure/reference/mt219004(v%3dazure.100)

您还可以访问此ScottGu的博客页面以获取其他信息: https://weblogs .asp.net/scottgu/new-azure-billing-apis-available

You can also visit this ScottGu's Blog page for additional information: https://weblogs.asp.net/scottgu/new-azure-billing-apis-available


这篇关于Get-AzureRmComputeResourceSku如何访问Costs属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆