@hmkwon@lgcns.com Apologies for the delay in response and all the inconvenience caused because of the issue.
You can refer to this article where it is mentioned how to get information about Virtual Machines using Java SDK:
VirtualMachine virtualMachine = computeManager.virtualMachines()
.getByResourceGroup(<your resource group>, <your virtual machine>);
Also you can refer to below official documentation as well for Supported Java SDK for Virtual Machines:
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/java
https://azure.github.io/azure-sdk-for-java/
One such old sample is here too:
The current version of azure java sdk supports listing virtual machines. You need to import following packages
group: 'com.microsoft.azure', name: 'azure', version: '1.12.0'
group: 'commons-net', name: 'commons-net', version: '3.3'
group: 'com.microsoft.azure', name: 'azure-storage', version: '8.0.0'
Then authenticate with client id and client secret
ApplicationTokenCredentials credentials = new ApplicationTokenCredentials('<client id>', '<tenant id>', '<client secret>', AzureEnvironment.AZURE);
Azure azure = Azure.authenticate(credentials).withSubscription('SubscriptionGuid');
Then use the following code to list virtual machinesPagedList<VirtualMachine> vms = azure.virtualMachines().list();
Hope it helps!!!
Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.