This repo contains samples in various languages to call into Azure Instance Metadata Service from within the VM in Azure. Please refer to LICENSE terms for use.
More details on Azure Instance Metadata service can be found here https://aka.ms/azureimds