如何以编程方式找到的Azure实例的作用大小? [英] How to find an Azure instance role size programmatically?

查看:280
本文介绍了如何以编程方式找到的Azure实例的作用大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有蔚蓝的API找到一个角色(和实例角色)的属性?我找实例大小,它是不是在Azure管理API提供。

Is there an API in azure to find the properties of a role (and an instance role)? I'm looking for the instance size, and it is not available in the Azure Management API.

推荐答案

VM大小是不API暴露,因为你已经发现了。至于建议由尼尔·麦肯齐<一个href=\"http://social.msdn.microsoft.com/Forums/en/windowsazure/thread/6f2bf92a-67b1-4897-a8fa-19f1951336cf\"相对=nofollow>这里,您可以从您的Azure应用程序,它可以让你演绎VM大小打电话Environment.ProcessorCount。然后,您可以,其存储在一个蓝色的表为例,查询该表。

VM size isn't exposed in the API, as you've already found out. As suggested by Neil Mackenzie here, you can call Environment.ProcessorCount from your Azure application, which lets you deduce VM size. You could then store this in an Azure table, for example, and query the table.

编辑:在这里我把超大的实例到Windows Azure,并呼吁Environment.ProcessorCount屏幕快照:

Here's a screen snapshot where I pushed an Extra-Large instance to Windows Azure and called Environment.ProcessorCount:

编辑2011年6月6日 - 中的service管理API只是更新,包括更新GetDeployment返回实例大小,SDK版本,等等。请参见博客文章<一个href=\"http://blogs.msdn.com/b/windowsazure/archive/2011/06/06/new-windows-azure-service-management-api-features-ease-management-of-storage-services.aspx\"相对=nofollow>这里了解更多详情。

EDIT June 6, 2011 - The Serivce Management API was just updated, including updates to GetDeployment which returns instance size, SDK version, and more. See blog post here for more details.

这篇关于如何以编程方式找到的Azure实例的作用大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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