Search in sources :

Example 6 with WindowsConfiguration

use of com.microsoft.azure.management.compute.WindowsConfiguration in project azure-sdk-for-java by Azure.

the class VirtualMachineScaleSetImpl method withSpecificWindowsImageVersion.

@Override
public VirtualMachineScaleSetImpl withSpecificWindowsImageVersion(ImageReference imageReference) {
    this.inner().virtualMachineProfile().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
    this.inner().virtualMachineProfile().storageProfile().withImageReference(imageReference.inner());
    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;
}
Also used : WindowsConfiguration(com.microsoft.azure.management.compute.WindowsConfiguration)

Aggregations

WindowsConfiguration (com.microsoft.azure.management.compute.WindowsConfiguration)6 VirtualHardDisk (com.microsoft.azure.management.compute.VirtualHardDisk)2