"Cost management data is unavailable for subscription" AZURE 成本使用 API

"Cost management data is unavailable for subscription" AZURE cost usage API

我正在尝试使用 Azure 成本使用情况检索管理组的 Azure 成本数据 API。

https://docs.microsoft.com/en-us/rest/api/cost-management/query/usage

但是我遇到了以下错误。

“成本管理数据无法用于订阅 xxxxxxxxxxx。不支持报价 MS-AZR-xxxxP。(请求 ID:xxxxx-xxxxx-xxx-xxx-xxxxx)”

请求URL https://management.azure.com/providers/Microsoft.Management/managementGroups/xxxxxxxxxx/providers/Microsoft.CostManagement/query?api-version=2019-11-01&$top=5000

是否有任何方法可以跳过此类订阅并使用以上 API.Please 帮助获取支持订阅的数据。

您看到此消息的原因可能是因为并非所有 Azure Offer types.

都支持 Azure 成本管理

请检查此 link 以了解 Azure 成本管理的 supported/unsupported Azure 优惠类型:https://docs.microsoft.com/en-us/azure/cost-management-billing/costs/understand-cost-mgt-data#supported-microsoft-azure-offers