I am working on a Java project that needs to retrieve a VM's public ip and private ip with Azure Java SDK.
I find two potentially useful classes com.microsoft.azure.management.compute.VirtualMachine
and
com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner
After hours of investigation, I cannot figure out how. The VirtualMachine class only has a function to get primary public ip. Neither of them has a function to get private ip.
Did I missing anything from the two classes?
Is there a way to list all details of VMs under a subscription with Java SDK like what we get with az vm list -d --subscription $Subscription_Id
in Azure CLI?
Thanks in advance