How to programmatically determine the role size of an Azure instance?

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

+4
source share
2 answers

VM size is not displayed in the API, as you already found out. As Neil Mackenzie suggested here , you can call Environment.ProcessorCount from your Azure application, which allows you to determine the size of the virtual machine. Then you can save this in an Azure table, for example, and query the table.

EDIT: here is a screenshot where I clicked an Extra-Large instance on Windows Azure and called Environment.ProcessorCount:

enter image description here

EDIT June 6, 2011 - The Serivce Management API has been updated, including GetDeployment updates that return instance size, SDK version, etc. See the blog post here for more details.

+6
source

Now you can get the instance size programmatically using the Service Management API in operations with Hosted Services Get Deployment . See LINK for information.

+2
source

Source: https://habr.com/ru/post/1339541/


All Articles