VirtualMachineScaleSetOSDisk Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.VirtualMachineScaleSetOSDisk

Implements

public final class VirtualMachineScaleSetOSDisk
implements JsonSerializable<VirtualMachineScaleSetOSDisk>

Describes a virtual machine scale set operating system disk.

Constructor Summary

Constructor Description
VirtualMachineScaleSetOSDisk()

Creates an instance of VirtualMachineScaleSetOSDisk class.

Method Summary

Modifier and Type Method and Description
CachingTypes caching()

Get the caching property: Specifies the caching requirements.

DiskCreateOptionTypes createOption()

Get the createOption property: Specifies how the virtual machines in the scale set should be created.

DiskDeleteOptionTypes deleteOption()

Get the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

DiffDiskSettings diffDiskSettings()

Get the diffDiskSettings property: Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.

Integer diskSizeGB()

Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.

static VirtualMachineScaleSetOSDisk fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineScaleSetOSDisk from the JsonReader.

VirtualHardDisk image()

Get the image property: Specifies information about the unmanaged user image to base the scale set on.

VirtualMachineScaleSetManagedDiskParameters managedDisk()

Get the managedDisk property: The managed disk parameters.

String name()

Get the name property: The disk name.

OperatingSystemTypes osType()

Get the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

List<String> vhdContainers()

Get the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.

VirtualMachineScaleSetOSDisk withCaching(CachingTypes caching)

Set the caching property: Specifies the caching requirements.

VirtualMachineScaleSetOSDisk withCreateOption(DiskCreateOptionTypes createOption)

Set the createOption property: Specifies how the virtual machines in the scale set should be created.

VirtualMachineScaleSetOSDisk withDeleteOption(DiskDeleteOptionTypes deleteOption)

Set the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

VirtualMachineScaleSetOSDisk withDiffDiskSettings(DiffDiskSettings diffDiskSettings)

Set the diffDiskSettings property: Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.

VirtualMachineScaleSetOSDisk withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.

VirtualMachineScaleSetOSDisk withImage(VirtualHardDisk image)

Set the image property: Specifies information about the unmanaged user image to base the scale set on.

VirtualMachineScaleSetOSDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)

Set the managedDisk property: The managed disk parameters.

VirtualMachineScaleSetOSDisk withName(String name)

Set the name property: The disk name.

VirtualMachineScaleSetOSDisk withOsType(OperatingSystemTypes osType)

Set the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.

VirtualMachineScaleSetOSDisk withVhdContainers(List<String> vhdContainers)

Set the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.

VirtualMachineScaleSetOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)

Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Boolean writeAcceleratorEnabled()

Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineScaleSetOSDisk

public VirtualMachineScaleSetOSDisk()

Creates an instance of VirtualMachineScaleSetOSDisk class.

Method Details

caching

public CachingTypes caching()

Get the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**.

Returns:

the caching value.

createOption

public DiskCreateOptionTypes createOption()

Get the createOption property: Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.

Returns:

the createOption value.

deleteOption

public DiskDeleteOptionTypes deleteOption()

Get the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk.

Returns:

the deleteOption value.

diffDiskSettings

public DiffDiskSettings diffDiskSettings()

Get the diffDiskSettings property: Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.

Returns:

the diffDiskSettings value.

diskSizeGB

public Integer diskSizeGB()

Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.

Returns:

the diskSizeGB value.

fromJson

public static VirtualMachineScaleSetOSDisk fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineScaleSetOSDisk from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualMachineScaleSetOSDisk if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

image

public VirtualHardDisk image()

Get the image property: Specifies information about the unmanaged user image to base the scale set on.

Returns:

the image value.

managedDisk

public VirtualMachineScaleSetManagedDiskParameters managedDisk()

Get the managedDisk property: The managed disk parameters.

Returns:

the managedDisk value.

name

public String name()

Get the name property: The disk name.

Returns:

the name value.

osType

public OperatingSystemTypes osType()

Get the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**.

Returns:

the osType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

vhdContainers

public List vhdContainers()

Get the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.

Returns:

the vhdContainers value.

withCaching

public VirtualMachineScaleSetOSDisk withCaching(CachingTypes caching)

Set the caching property: Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**.

Parameters:

caching - the caching value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withCreateOption

public VirtualMachineScaleSetOSDisk withCreateOption(DiskCreateOptionTypes createOption)

Set the createOption property: Specifies how the virtual machines in the scale set should be created. The only allowed value is: **FromImage.** This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described.

Parameters:

createOption - the createOption value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withDeleteOption

public VirtualMachineScaleSetOSDisk withDeleteOption(DiskDeleteOptionTypes deleteOption)

Set the deleteOption property: Specifies whether OS Disk should be deleted or detached upon VMSS Flex deletion (This feature is available for VMSS with Flexible OrchestrationMode only).

Possible values:

**Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.

**Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted.

The default value is set to **Delete**. For an Ephemeral OS Disk, the default value is set to **Delete**. User cannot change the delete option for Ephemeral OS Disk.

Parameters:

deleteOption - the deleteOption value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withDiffDiskSettings

public VirtualMachineScaleSetOSDisk withDiffDiskSettings(DiffDiskSettings diffDiskSettings)

Set the diffDiskSettings property: Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.

Parameters:

diffDiskSettings - the diffDiskSettings value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withDiskSizeGB

public VirtualMachineScaleSetOSDisk withDiskSizeGB(Integer diskSizeGB)

Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image. The property 'diskSizeGB' is the number of bytes x 1024^3 for the disk and the value cannot be larger than 1023.

Parameters:

diskSizeGB - the diskSizeGB value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withImage

public VirtualMachineScaleSetOSDisk withImage(VirtualHardDisk image)

Set the image property: Specifies information about the unmanaged user image to base the scale set on.

Parameters:

image - the image value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withManagedDisk

public VirtualMachineScaleSetOSDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)

Set the managedDisk property: The managed disk parameters.

Parameters:

managedDisk - the managedDisk value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withName

public VirtualMachineScaleSetOSDisk withName(String name)

Set the name property: The disk name.

Parameters:

name - the name value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withOsType

public VirtualMachineScaleSetOSDisk withOsType(OperatingSystemTypes osType)

Set the osType property: This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**.

Parameters:

osType - the osType value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withVhdContainers

public VirtualMachineScaleSetOSDisk withVhdContainers(List vhdContainers)

Set the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.

Parameters:

vhdContainers - the vhdContainers value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

withWriteAcceleratorEnabled

public VirtualMachineScaleSetOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)

Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Parameters:

writeAcceleratorEnabled - the writeAcceleratorEnabled value to set.

Returns:

the VirtualMachineScaleSetOSDisk object itself.

writeAcceleratorEnabled

public Boolean writeAcceleratorEnabled()

Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.

Returns:

the writeAcceleratorEnabled value.

Applies to