我们如何在 C# 中获取 Azure VM 的成本?
How can we get the cost of an Azure VM in C#?
我正在尝试了解如何在 c# 中获取不同 Azure VM 大小的成本。我可以获得所有不同尺寸的列表,但无法获得成本。例如,我的 VM 是通用 B2s VM,在 Azure 门户中显示为 $40.30。我还没有找到在 C# 中获得此成本的方法。任何帮助将不胜感激。
我想您可以另外使用 Azure 零售价格 API 来查询详细的 VM 价格:https://docs.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices
我正在尝试了解如何在 c# 中获取不同 Azure VM 大小的成本。我可以获得所有不同尺寸的列表,但无法获得成本。例如,我的 VM 是通用 B2s VM,在 Azure 门户中显示为 $40.30。我还没有找到在 C# 中获得此成本的方法。任何帮助将不胜感激。
我想您可以另外使用 Azure 零售价格 API 来查询详细的 VM 价格:https://docs.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices