Можно ли как-то узнать стоимость отдельных ресурсов с помощью Azure Python SDK [https://docs.microsoft.com/en-us/python/api/overview/azure/?view=azure-python]?
Я использовал RateCard [https://docs.microsoft.com/en-us/python/api/azure-mgmt-commerce/azure.mgmt.commerce.operations.ratecardoperations?view=azure-python] и API использования [https://docs.microsoft.com/en-us/python/api/azure-mgmt-commerce/azure.mgmt.commerce.operations.usageaggregatesoperations?view=azure-python]] для расчета стоимости. Но в поисках лучшего решения.
query = "OfferDurableId eq '" + offer_id + \ "' and Currency eq 'USD' and Locale eq 'en-US' and RegionInfo eq 'US'" ratecard = usage_client.rate_card.get(filter=query) usage = usage_client.usage_aggregates.list(reported_start_time=start, reported_end_time=end, show_details=True, aggregation_granularity="Daily"):
Получите стоимость отдельного ресурса за последние 30 дней с помощью Azure SDK.