Azure Java SDK中的流畅接口中的条件

问题描述

我正在使用来自Java sdk的共享图像库中的自定义图像来创建linux vm。

virtualMachine = azure.virtualMachines()
                        .define(linuxVMName)
                        .withRegion(location)
                        .withExistingResourceGroup(resourceGroup)
                        .withExistingPrimaryNetworkInterface(networkInterface)
                        .withLinuxCustomImage(customImageUrl)
                        .withRootUsername(username)
                        .withRootPassword(password)
                        .withCustomData(custDatastring)
                        .withComputerName(linuxVMName)
                        .withExistingStorageAccount(storageAccount)
                        .withSize(vmSize())
                        .create();

这还支持从通用公共映像创建Linux实例,例如

.withLatestLinuxImage(publisher,offer,sku)

我想知道的是 是否可以在这种模式下使用条件语句,例如Azure是否已实现该部分。

另一种情况是代替root密码,我也可以使用root SSH,所以这里有很多条件

我在文档部分也没有运气。
是的,我可以编写一个整体,否则也可以复制粘贴代码,我只想知道是否有更好的方法来实现这一目标。
预先感谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...