VirtualMachineScaleSetOSDisk Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. VirtualMachineScaleSetOSDisk
- com.
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 Virtual |
Method Summary
Modifier and Type | Method and Description |
---|---|
Caching |
caching()
Get the caching property: Specifies the caching requirements. |
Disk |
createOption()
Get the create |
Disk |
deleteOption()
Get the delete |
Diff |
diffDiskSettings()
Get the diff |
Integer |
diskSizeGB()
Get the disk |
static
Virtual |
fromJson(JsonReader jsonReader)
Reads an instance of Virtual |
Virtual |
image()
Get the image property: Specifies information about the unmanaged user image to base the scale set on. |
Virtual |
managedDisk()
Get the managed |
String |
name()
Get the name property: The disk name. |
Operating |
osType()
Get the os |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
List<String> |
vhdContainers()
Get the vhd |
Virtual |
withCaching(CachingTypes caching)
Set the caching property: Specifies the caching requirements. |
Virtual |
withCreateOption(DiskCreateOptionTypes createOption)
Set the create |
Virtual |
withDeleteOption(DiskDeleteOptionTypes deleteOption)
Set the delete |
Virtual |
withDiffDiskSettings(DiffDiskSettings diffDiskSettings)
Set the diff |
Virtual |
withDiskSizeGB(Integer diskSizeGB)
Set the disk |
Virtual |
withImage(VirtualHardDisk image)
Set the image property: Specifies information about the unmanaged user image to base the scale set on. |
Virtual |
withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)
Set the managed |
Virtual |
withName(String name)
Set the name property: The disk name. |
Virtual |
withOsType(OperatingSystemTypes osType)
Set the os |
Virtual |
withVhdContainers(List<String> vhdContainers)
Set the vhd |
Virtual |
withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)
Set the write |
Boolean |
writeAcceleratorEnabled()
Get the write |
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:
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:
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:
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:
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:
fromJson
public static VirtualMachineScaleSetOSDisk fromJson(JsonReader jsonReader)
Reads an instance of VirtualMachineScaleSetOSDisk from the JsonReader.
Parameters:
Returns:
Throws:
image
public VirtualHardDisk image()
Get the image property: Specifies information about the unmanaged user image to base the scale set on.
Returns:
managedDisk
public VirtualMachineScaleSetManagedDiskParameters managedDisk()
Get the managedDisk property: The managed disk parameters.
Returns:
name
public String name()
Get the name property: The disk name.
Returns:
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:
toJson
validate
public void validate()
Validates the instance.
vhdContainers
public List
Get the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
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:
Returns:
withImage
public VirtualMachineScaleSetOSDisk withImage(VirtualHardDisk image)
Set the image property: Specifies information about the unmanaged user image to base the scale set on.
Parameters:
Returns:
withManagedDisk
public VirtualMachineScaleSetOSDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)
Set the managedDisk property: The managed disk parameters.
Parameters:
Returns:
withName
public VirtualMachineScaleSetOSDisk withName(String name)
Set the name property: The disk name.
Parameters:
Returns:
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:
Returns:
withVhdContainers
public VirtualMachineScaleSetOSDisk withVhdContainers(List
Set the vhdContainers property: Specifies the container urls that are used to store operating system disks for the scale set.
Parameters:
Returns:
withWriteAcceleratorEnabled
public VirtualMachineScaleSetOSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)
Set the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.
Parameters:
Returns:
writeAcceleratorEnabled
public Boolean writeAcceleratorEnabled()
Get the writeAcceleratorEnabled property: Specifies whether writeAccelerator should be enabled or disabled on the disk.
Returns:
Applies to
Azure SDK for Java