通过资源分组对CostManagment的API请求 [英] API request to CostManagment with grouping by Resources

查看:89
本文介绍了通过资源分组对CostManagment的API请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好, 
$


我们在成本管理中遇到API请求问题 - 成本分析。通过网络面板,我们可以使用"按资源划分的费用"进行报告。和"资源"分组,但通过API,我们只能使用"ResourseType"提出请求 或
" ServiceName"。$


请求JSON:

Hello, 

We have some trouble with API request in Cost Management - Cost analysis. Via web panel we're able to make report with "Cost by resource" and Group by "Resource", but via API we can make request only with "ResourseType"  or "ServiceName".

Request JSON:

{
 "type": "Usage",
 "timeframe": "TheLastMonth",
  "dataset": {
    "granularity": "Monthly",
    "aggregation": {
      "totalCost": {
        "name": "PreTaxCost",
        "function": "Sum"
      }
    },
    "grouping": [
      {
        "type": "Dimension",
        "name": "ResourceType"
      }
    ],
    "sorting": [
      {
        "name": "ResourceType",
        "direction": "Descending"
      }
    ]
  }
}




我读过https://docs.microsoft .com / zh-cn / rest / api / cost-management / query / usagebyscoper好几次,但没有运气。

以后这个功能有可能出现吗?




I've read https://docs.microsoft.com/en-us/rest/api/cost-management/query/usagebyscoper several times, but with no luck.
Is there any chance this functionality will be present in future?


推荐答案


链接
已损坏。查看
成本管理范围
,它似乎只支持资源类型或服务名称请求。但我会在此请求您的耐心,同时我会从产品团队得到确认。 
The link you've shared in your post is broken. Looking at the cost management scopes, it does seem like it supports only resource type or service name requests. But I would request your patience here in the meanwhile I shall get confirmation on this from the product team. 


这篇关于通过资源分组对CostManagment的API请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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