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 ?

1
  • 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? Commented Oct 14, 2021 at 7:59

1 Answer 1

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 :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.