1

对门户刀片上的https://s2.billing.ext.azure.com/api/Billing/Subscription/GetSpecsCosts?api-version=2019-01-14的调用成功,但响应中的定价成本为零。

问题似乎出在这一特定订阅上。

是否有任何理由为什么特定订阅不应该获得计费成本而其他订阅呢?

4

2 回答 2

0

这是什么类型的订阅?

价格仅适用于现收现付 (PAYG)、企业协议 (EA) 和 Microsoft 客户协议 (MCA) 订阅。价格不适用于云解决方案提供商 (CSP) 订阅。另请注意,对于企业协议 (EA) 或 Microsoft 客户协议 (MCA) 订阅,可以禁用对价格/成本的访问,但这将适用于计费帐户中的所有订阅。

https://docs.microsoft.com/en-us/azure/cost-management/assign-access-acm-data#enable-access-to-costs-in-the-ea-portal

于 2019-09-13T06:37:40.223 回答
0
You need to pass the correct specResourceSets in the request body along with the subscriptionId.

The request body will look like this:

{
    "subscriptionId": "<pass subscription id here>",
    "specResourceSets": [{
        "id": "Standard_D2s_v3",
        "firstParty": [{
            "id": "Standard_D2s_v3",
            "resourceId": "671fdefb-f93c-446c-9e1a-bcbeb12b9d13",
            "quantity": 730
        }],
        "thirdParty": []
    }],
    "specsToAllowZeroCost": `enter code here`["Standard_D2s_v3"],
    "specType": "Microsoft_Azure_Compute"
}
于 2021-01-14T17:45:08.157 回答