Reputation: 9537
How can I get the location (e.g. US West, Europe North) of a worker role progromatically from .Net?
I've been looking around this:
RoleEnvironment.CurrentRoleInstance.Role
But can't find the Location anywhere.
Also how do you get the current Role VM Size?
Upvotes: 1
Views: 228
Reputation: 432
you might want to check out the classic REST api for Azure Management.There is a method called "Get Deployment", which gets the properties for the cloud service role.Basically the response would contain a bunch of attributes. I certainly remember using it for the role size. But not sure about the location.
Hope this helps!
https://msdn.microsoft.com/en-us/library/ee460804.aspx
Upvotes: 1