0

Im pretty new to the Azure cloud world, so kinldy bare with my question. I have the following requirements,

  1. Fetch the azure vm name
  2. Start and Stop this application from another application in the same vm. For example: Lets say we project A and B A can start and stop B and both are inside the same Azure vm

I see that we can use Azure's IMDS to fetch the vm name and an whopping amount of metadata using the non-routable IP (169.254.169.254) but is there any equivalent Java SDK ?

  • Hi there, not sure if i understand your question correctly but if A and B are in the same VM then there should be nothing to do with Azure right? – Yuchen Wang Oct 14 '21 at 07:59

1 Answers1

0

Microsoft does not currently publish any SDK for interacting with IMDS, although some SDKs do have helpers that wrap calls to IMDS as a part of their implementation details.

You need to construct the REST calls yourself, but fortunately it's a very simple API. You can find example code here: https://github.com/microsoft/azureimds/blob/master/imdssample.java

If an SDK something you'd like to see, consider making that feature request to Microsoft :)