use of com.microsoft.azure.management.compute.WindowsConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineImpl method withSpecificWindowsImageVersion.
@Override
public VirtualMachineImpl withSpecificWindowsImageVersion(ImageReference imageReference) {
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().storageProfile().withImageReference(imageReference.inner());
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;
}
use of com.microsoft.azure.management.compute.WindowsConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineScaleSetImpl method withStoredWindowsImage.
@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;
}
use of com.microsoft.azure.management.compute.WindowsConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineScaleSetImpl method withWindowsCustomImage.
@Override
public VirtualMachineScaleSetImpl withWindowsCustomImage(String customImageId) {
ImageReferenceInner imageReferenceInner = new ImageReferenceInner();
imageReferenceInner.withId(customImageId);
this.inner().virtualMachineProfile().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().virtualMachineProfile().storageProfile().withImageReference(imageReferenceInner);
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;
}
use of com.microsoft.azure.management.compute.WindowsConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineImpl method withWindowsCustomImage.
@Override
public VirtualMachineImpl withWindowsCustomImage(String customImageId) {
ImageReferenceInner imageReferenceInner = new ImageReferenceInner();
imageReferenceInner.withId(customImageId);
this.inner().storageProfile().osDisk().withCreateOption(DiskCreateOptionTypes.FROM_IMAGE);
this.inner().storageProfile().withImageReference(imageReferenceInner);
this.inner().osProfile().withWindowsConfiguration(new WindowsConfiguration());
// sets defaults for "Stored(User)Image", "VM(Platform | Custom)Image"
this.inner().osProfile().windowsConfiguration().withProvisionVMAgent(true);
this.inner().osProfile().windowsConfiguration().withEnableAutomaticUpdates(true);
return this;
}
use of com.microsoft.azure.management.compute.WindowsConfiguration in project azure-sdk-for-java by Azure.
the class VirtualMachineImpl method withStoredWindowsImage.
// Virtual machine image specific fluent methods
//
@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;
}
Aggregations