我一直在尝试将一个azurevm部署到如下链接所示的可用性区域https://azure.microsoft.com/en-us/blog/java-manage-availability-zones-and-more/,但我不断得到以下错误。
cannot find symbol
symbol: method withAvailabilityZone(AvailabilityZoneId)
location: interface WithCreate
java似乎找不到withavailabilityzone方法,但在上面的链接中,它似乎可以正常工作。当我查看azure文档时,唯一的withavailabilityzone方法位于withmanagedcreate类中,因此我不确定如何更改以下代码以匹配该类:
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();
暂无答案!
目前还没有任何答案,快来回答吧!