Class VirtualMachineScaleSetOSDisk
java.lang.Object
com.azure.resourcemanager.compute.models.VirtualMachineScaleSetOSDisk
- All Implemented Interfaces:
com.azure.json.JsonSerializable<VirtualMachineScaleSetOSDisk>
public final class VirtualMachineScaleSetOSDisk
extends Object
implements com.azure.json.JsonSerializable<VirtualMachineScaleSetOSDisk>
Describes a virtual machine scale set operating system disk.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of VirtualMachineScaleSetOSDisk class. -
Method Summary
Modifier and TypeMethodDescriptioncaching()Get the caching property: Specifies the caching requirements.Get the createOption property: Specifies how the virtual machines in the scale set should be created.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).Get the diffDiskSettings property: Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.static VirtualMachineScaleSetOSDiskfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of VirtualMachineScaleSetOSDisk from the JsonReader.image()Get the image property: Specifies information about the unmanaged user image to base the scale set on.Get the managedDisk property: The managed disk parameters.name()Get the name property: The disk name.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.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.withCaching(CachingTypes caching) Set the caching property: Specifies the caching requirements.withCreateOption(DiskCreateOptionTypes createOption) Set the createOption property: Specifies how the virtual machines in the scale set should be created.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).withDiffDiskSettings(DiffDiskSettings diffDiskSettings) Set the diffDiskSettings property: Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.withDiskSizeGB(Integer diskSizeGB) Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.withImage(VirtualHardDisk image) Set the image property: Specifies information about the unmanaged user image to base the scale set on.Set the managedDisk property: The managed disk parameters.Set the name property: The disk name.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.withVhdContainers(List<String> vhdContainers) Set the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled) Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
VirtualMachineScaleSetOSDisk
public VirtualMachineScaleSetOSDisk()Creates an instance of VirtualMachineScaleSetOSDisk class.
-
-
Method Details
-
name
-
withName
Set the name property: The disk name.- Parameters:
name- the name value to set.- Returns:
- the VirtualMachineScaleSetOSDisk object itself.
-
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.
-
withCaching
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.
-
writeAcceleratorEnabled
Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.- Returns:
- the writeAcceleratorEnabled value.
-
withWriteAcceleratorEnabled
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.
-
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.
-
withCreateOption
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.
-
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.
-
withDiffDiskSettings
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.
-
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.
-
withDiskSizeGB
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.
-
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.
-
withOsType
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.
-
image
Get the image property: Specifies information about the unmanaged user image to base the scale set on.- Returns:
- the image value.
-
withImage
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.
-
vhdContainers
-
withVhdContainers
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.
-
managedDisk
Get the managedDisk property: The managed disk parameters.- Returns:
- the managedDisk value.
-
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.
-
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). <br><br> Possible values: <br><br> **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted. <br><br> 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.
-
withDeleteOption
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). <br><br> Possible values: <br><br> **Delete** If this value is used, the OS disk is deleted when VMSS Flex VM is deleted.<br><br> **Detach** If this value is used, the OS disk is retained after VMSS Flex VM is deleted. <br><br> 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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<VirtualMachineScaleSetOSDisk>- Throws:
IOException
-
fromJson
public static VirtualMachineScaleSetOSDisk fromJson(com.azure.json.JsonReader jsonReader) throws IOException 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:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the VirtualMachineScaleSetOSDisk.
-