本文整理汇总了Java中com.microsoft.azure.management.compute.VirtualHardDisk.withUri方法的典型用法代码示例。如果您正苦于以下问题:Java VirtualHardDisk.withUri方法的具体用法?Java VirtualHardDisk.withUri怎么用?Java VirtualHardDisk.withUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.microsoft.azure.management.compute.VirtualHardDisk
的用法示例。
在下文中一共展示了VirtualHardDisk.withUri方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: withStoredWindowsImage
import com.microsoft.azure.management.compute.VirtualHardDisk; //导入方法依赖的package包/类
@Override
public VirtualMachineScaleSetImpl withStoredWindowsImage(String imageUrl) {
VirtualHardDisk userImageVhd = new VirtualHardDisk();
userImageVhd.withUri(imageUrl);
this.inner()
.virtualMachineProfile()
.storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner()
.virtualMachineProfile()
.storageProfile().osDisk().withImage(userImageVhd);
// For platform image osType will be null, azure will pick it from the image metadata.
this.inner()
.virtualMachineProfile()
.storageProfile().osDisk().withOsType(OperatingSystemTypes.WINDOWS);
this.inner()
.virtualMachineProfile()
.osProfile().withWindowsConfiguration(new WindowsConfiguration());
// sets defaults for "Stored(Custom)Image" or "VM(Platform)Image"
this.inner()
.virtualMachineProfile()
.osProfile().windowsConfiguration().withProvisionVMAgent(true);
this.inner()
.virtualMachineProfile()
.osProfile().windowsConfiguration().withEnableAutomaticUpdates(true);
return this;
}
示例2: withStoredLinuxImage
import com.microsoft.azure.management.compute.VirtualHardDisk; //导入方法依赖的package包/类
@Override
public VirtualMachineScaleSetImpl withStoredLinuxImage(String imageUrl) {
VirtualHardDisk userImageVhd = new VirtualHardDisk();
userImageVhd.withUri(imageUrl);
this.inner()
.virtualMachineProfile()
.storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner()
.virtualMachineProfile()
.storageProfile().osDisk().withImage(userImageVhd);
// For platform image osType will be null, azure will pick it from the image metadata.
this.inner()
.virtualMachineProfile()
.storageProfile().osDisk().withOsType(OperatingSystemTypes.LINUX);
this.inner()
.virtualMachineProfile()
.osProfile().withLinuxConfiguration(new LinuxConfiguration());
return this;
}
示例3: withStoredWindowsImage
import com.microsoft.azure.management.compute.VirtualHardDisk; //导入方法依赖的package包/类
@Override
public VirtualMachineImpl withStoredWindowsImage(String imageUrl) {
VirtualHardDisk userImageVhd = new VirtualHardDisk();
userImageVhd.withUri(imageUrl);
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().storageProfile().osDisk().withImage(userImageVhd);
// For platform image osType will be null, azure will pick it from the image metadata.
this.inner().storageProfile().osDisk().withOsType(OperatingSystemTypes.WINDOWS);
this.inner().osProfile().withWindowsConfiguration(new WindowsConfiguration());
// sets defaults for "Stored(User)Image" or "VM(Platform)Image"
this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(true);
this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(true);
return this;
}
示例4: withStoredLinuxImage
import com.microsoft.azure.management.compute.VirtualHardDisk; //导入方法依赖的package包/类
@Override
public VirtualMachineImpl withStoredLinuxImage(String imageUrl) {
VirtualHardDisk userImageVhd = new VirtualHardDisk();
userImageVhd.withUri(imageUrl);
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().storageProfile().osDisk().withImage(userImageVhd);
// For platform | custom image osType will be null, azure will pick it from the image metadata.
// But for stored image, osType needs to be specified explicitly
//
this.inner().storageProfile().osDisk().withOsType(OperatingSystemTypes.LINUX);
this.inner().osProfile().withLinuxConfiguration(new LinuxConfiguration());
return this;
}
示例5: withSpecializedOSUnmanagedDisk
import com.microsoft.azure.management.compute.VirtualHardDisk; //导入方法依赖的package包/类
@Override
public VirtualMachineImpl withSpecializedOSUnmanagedDisk(String osDiskUrl, OperatingSystemTypes osType) {
VirtualHardDisk osVhd = new VirtualHardDisk();
osVhd.withUri(osDiskUrl);
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.ATTACH);
this.inner().storageProfile().osDisk().withVhd(osVhd);
this.inner().storageProfile().osDisk().withOsType(osType);
this.inner().storageProfile().osDisk().withManagedDisk(null);
return this;
}