简体   繁体   English

Azure Forecast Rest Api 返回错误代码 404:“订阅不支持成本管理数据”

[英]Azure Forecast Rest Api Returning Error code 404: “Cost management data is not supported for subscription”

I'm trying to use the azure forecast rest API of version "2019-10-01".And the Version which I'm using is the latest version.我正在尝试使用版本“2019-10-01”的 azure 预测休息 API。我使用的版本是最新版本。

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts?$filter={$filter}&api-version=2019-10-01获取https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Consumption/forecasts?$filter={$filter}&api-version=2019-10-01

I am able to get the forecast details for other subscription but unable to get the response for a specific subscription id cxxxxx-xxxx-xxx-xxxxxxxxxxxx8.Please someone help to resolve this issue.我能够获得其他订阅的预测详细信息,但无法获得特定订阅 ID cxxxxx-xxxx-xxx-xxxxxxxxxxxx8 的响应。请有人帮助解决此问题。

Error message:: {'error': {'code': '404', 'message': 'Cost management data is not supported for subscription(s) cxxxxx-xxxx-xxx-xxxxxxxxxxxx8 in the provided api-version.错误消息:: {'error': {'code': '404', 'message': 'Cxxxxx-xxxx-xxx-xxxxxxxxxxxx8 在提供的 api 版本中不支持订阅成本管理数据。 Please use api-version 2019-10-01 or later.请使用 api-version 2019-10-01 或更高版本。 (Request ID: 0cd6dd95-642d-4de0-9f31-5b2897ef2c61)'}} (请求 ID:0cd6dd95-642d-4de0-9f31-5b2897ef2c61)'}}

I would go and check the subscription type for which it is not working.我会去检查它不起作用的订阅类型。

You're most likely to encounter this issue if the subscription type is of one of the below :如果订阅类型是以下之一,您最有可能遇到此问题:

MS-AZR-0145P (CSP)
MS-AZR-0146P (CSP)
MS-AZR-159P (CSP)
MS-AZR-0036P (sponsored)
MS-AZR-0143P (sponsored)
MS-AZR-0015P (internal)
MS-AZR-0144P (DreamSpark)

The above offer id/subscription types are not supported by API. API 不支持上述优惠 ID/订阅类型。

To check from the portal,要从门户检查,

Access portal.azure.com --> Subscriptions访问 portal.azure.com --> 订阅

在此处输入图片说明

Find the subscription that is not working and click the same.找到不起作用的订阅并单击它。 You could the offer ID in the resulting page under the Essentials.您可以在 Essentials 下的结果页面中提供商品 ID。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM