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.
相关问题
- running headless chrome in an microsoft azure web
- Docker task in Azure devops won't accept "$(pw
- Register MicroServices in Azure Active Directory (
- Removing VHD's from Azure Resource Manager aft
- Cannot use the Knowledge academic API
相关文章
- SQL Azure Reset autoincrement
- How to cast Azure DocumentDB Document class to my
- Can't get azure web role to run locally using
- Azure WebApp - Unable to auto-detect the runtime s
- How to change region for Azure WebSite
- Azure webjob vs cloud service
- Azure data transfer Identity Column Seed Jumped by
- Download Azure web app?
Now you can get the instance size programmatically using the Service Management API under operations on Hosted Services Get Deployment. See this LINK for info.
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.
EDIT: Here's a screen snapshot where I pushed an Extra-Large instance to Windows Azure and called Environment.ProcessorCount:
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.