I have been trying to deploy an Azure VM to an availability zone like the following link https://azure.microsoft.com/en-us/blog/java-manage-availability-zones-and-more/, but I keep on getting the following error.
cannot find symbol
symbol: method withAvailabilityZone(AvailabilityZoneId)
location: interface WithCreate
It seems as if Java can't find a withAvailabilityZone method, but in the link above it seems to work fine. When I look in the Azure documentation, the only withAvailabilityZone method is in the withManagedCreate class, so I'm not sure how to alter the following code to match that:
VM_1 = azure.virtualMachines().define(name)
.withRegion(reg)
.withExistingResourceGroup(rg)
.withExistingPrimaryNetworkInterface(nI)
.withPopularLinuxImage(pli)
.withExistingDataDisk(dd)
.withSize(type_1)
.withPriority(priority_var)
.withAvailabilityZone(availabilityZone) //error occurs here
.create();
If you want to create Azure VM in Avilability Zone with java, please refer to the following steps
2.code