如何使用 API 获取 Azure 优惠详情?
How to get Azure offer details using the API?
我正在尝试查询 Azure 最近的使用情况和计费 API,发现我可以使用以下 API 来获取价目表:
https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq '{offer-id}' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'
但是,这需要我明确知道 offerDurableId,这是我从 Azure's website.
开始了解我的案例的
有 API 可以给我这些优惠代码吗?
据我所知,没有 API 获取优惠代码。事实上,如果您查看 Billing API 文档 here
,他们还会要求您从您提到的 link 中获取相关信息。
Set {OfferDurableId} to a valid Offer ID code (e.g., MS-AZR-0026P).
See Microsoft Azure Offer Details for more information on the list of
available Offer IDs, country/region availability, and billing
currency. The Offer ID parameter consists of the “MS-AZR-“ prefix,
plus the Offer ID number.
考虑到报价代码不会改变,我认为将此信息保存在您自己的数据库中比较安全
一种可能是这样。但它没有正式记录或支持。它是 Azure 门户调用以获取优惠信息的 API。
没有 public API,但是有一个功能请求,please vote for it。
我正在尝试查询 Azure 最近的使用情况和计费 API,发现我可以使用以下 API 来获取价目表:
https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Commerce/RateCard?api-version=2015-06-01-preview&$filter=OfferDurableId eq '{offer-id}' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'
但是,这需要我明确知道 offerDurableId,这是我从 Azure's website.
开始了解我的案例的有 API 可以给我这些优惠代码吗?
据我所知,没有 API 获取优惠代码。事实上,如果您查看 Billing API 文档 here
,他们还会要求您从您提到的 link 中获取相关信息。
Set {OfferDurableId} to a valid Offer ID code (e.g., MS-AZR-0026P). See Microsoft Azure Offer Details for more information on the list of available Offer IDs, country/region availability, and billing currency. The Offer ID parameter consists of the “MS-AZR-“ prefix, plus the Offer ID number.
考虑到报价代码不会改变,我认为将此信息保存在您自己的数据库中比较安全
一种可能是这样。但它没有正式记录或支持。它是 Azure 门户调用以获取优惠信息的 API。
没有 public API,但是有一个功能请求,please vote for it。