当前位置: 首页>>代码示例>>Java>>正文


Java VirtualHardDisk.withUri方法代码示例

本文整理汇总了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;
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:27,代码来源:VirtualMachineScaleSetImpl.java

示例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;
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:20,代码来源:VirtualMachineScaleSetImpl.java

示例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;
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:15,代码来源:VirtualMachineImpl.java

示例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;
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:14,代码来源:VirtualMachineImpl.java

示例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;
}
 
开发者ID:Azure,项目名称:azure-libraries-for-java,代码行数:11,代码来源:VirtualMachineImpl.java


注:本文中的com.microsoft.azure.management.compute.VirtualHardDisk.withUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。