以编程方式获取Azure虚拟机大小的列表 [英] Programmatically getting the list of azure virtual machine sizes

查看:47
本文介绍了以编程方式获取Azure虚拟机大小的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是.net的Azure管理库的新手.我们如何枚举有关订阅的可用VM实例大小,或者通常如何使用适用于.Net或Rest API的Azure管理库?请提出建议.

I am new to Azure management libraries for .net. How can we enumerate VM instance sizes available with respect to subscription or in general using Azure Management libraries for .Net or Rest APIs? Please suggest.

推荐答案

您可以通过调用

https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/{location}/vmSizes?api-version={api-version}

如此处所述-列出区域中所有可用的虚拟机大小

也有一个.Net类,但是我没有找到使用它的任何示例-在此处记录-

There is also a .Net Class for the same, but I've not found any examples of it being used - documented here - VirtualMachineSizeOperationsExtensions.List

这篇关于以编程方式获取Azure虚拟机大小的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆