本文整理汇总了Java中com.microsoft.azure.management.compute.ImageDataDisk.managedDisk方法的典型用法代码示例。如果您正苦于以下问题:Java ImageDataDisk.managedDisk方法的具体用法?Java ImageDataDisk.managedDisk怎么用?Java ImageDataDisk.managedDisk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.microsoft.azure.management.compute.ImageDataDisk
的用法示例。
在下文中一共展示了ImageDataDisk.managedDisk方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: print
import com.microsoft.azure.management.compute.ImageDataDisk; //导入方法依赖的package包/类
/**
* Prints information of a virtual machine custom image.
*
* @param image the image
*/
public static void print(VirtualMachineCustomImage image) {
StringBuilder builder = new StringBuilder().append("Virtual machine custom image: ").append(image.id())
.append("Name: ").append(image.name())
.append("\n\tResource group: ").append(image.resourceGroupName())
.append("\n\tCreated from virtual machine: ").append(image.sourceVirtualMachineId());
builder.append("\n\tOS disk image: ")
.append("\n\t\tOperating system: ").append(image.osDiskImage().osType())
.append("\n\t\tOperating system state: ").append(image.osDiskImage().osState())
.append("\n\t\tCaching: ").append(image.osDiskImage().caching())
.append("\n\t\tSize (GB): ").append(image.osDiskImage().diskSizeGB());
if (image.isCreatedFromVirtualMachine()) {
builder.append("\n\t\tSource virtual machine: ").append(image.sourceVirtualMachineId());
}
if (image.osDiskImage().managedDisk() != null) {
builder.append("\n\t\tSource managed disk: ").append(image.osDiskImage().managedDisk().id());
}
if (image.osDiskImage().snapshot() != null) {
builder.append("\n\t\tSource snapshot: ").append(image.osDiskImage().snapshot().id());
}
if (image.osDiskImage().blobUri() != null) {
builder.append("\n\t\tSource un-managed vhd: ").append(image.osDiskImage().blobUri());
}
if (image.dataDiskImages() != null) {
for (ImageDataDisk diskImage : image.dataDiskImages().values()) {
builder.append("\n\tDisk Image (Lun) #: ").append(diskImage.lun())
.append("\n\t\tCaching: ").append(diskImage.caching())
.append("\n\t\tSize (GB): ").append(diskImage.diskSizeGB());
if (image.isCreatedFromVirtualMachine()) {
builder.append("\n\t\tSource virtual machine: ").append(image.sourceVirtualMachineId());
}
if (diskImage.managedDisk() != null) {
builder.append("\n\t\tSource managed disk: ").append(diskImage.managedDisk().id());
}
if (diskImage.snapshot() != null) {
builder.append("\n\t\tSource snapshot: ").append(diskImage.snapshot().id());
}
if (diskImage.blobUri() != null) {
builder.append("\n\t\tSource un-managed vhd: ").append(diskImage.blobUri());
}
}
}
System.out.println(builder.toString());
}