public final class OSDisk extends Object
Constructor and Description |
---|
OSDisk() |
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 machine should be created.<br><br> Possible
values are:<br><br> **Attach** – This value is used when you are using a specialized disk to
create the virtual machine.<br><br> **FromImage** – This value is used when you are using an
image to create the virtual machine.
|
DiffDiskSettings |
diffDiskSettings()
Get the diffDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by
the virtual machine.
|
Integer |
diskSizeGB()
Get the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.
|
DiskEncryptionSettings |
encryptionSettings()
Get the encryptionSettings property: Specifies the encryption settings for the OS Disk.
|
VirtualHardDisk |
image()
Get the image property: The source user image virtual hard disk.
|
ManagedDiskParameters |
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.
|
void |
validate()
Validates the instance.
|
VirtualHardDisk |
vhd()
Get the vhd property: The virtual hard disk.
|
OSDisk |
withCaching(CachingTypes caching)
Set the caching property: Specifies the caching requirements.
|
OSDisk |
withCreateOption(DiskCreateOptionTypes createOption)
Set the createOption property: Specifies how the virtual machine should be created.<br><br> Possible
values are:<br><br> **Attach** – This value is used when you are using a specialized disk to
create the virtual machine.<br><br> **FromImage** – This value is used when you are using an
image to create the virtual machine.
|
OSDisk |
withDiffDiskSettings(DiffDiskSettings diffDiskSettings)
Set the diffDiskSettings property: Specifies the ephemeral Disk Settings for the operating system disk used by
the virtual machine.
|
OSDisk |
withDiskSizeGB(Integer diskSizeGB)
Set the diskSizeGB property: Specifies the size of an empty data disk in gigabytes.
|
OSDisk |
withEncryptionSettings(DiskEncryptionSettings encryptionSettings)
Set the encryptionSettings property: Specifies the encryption settings for the OS Disk.
|
OSDisk |
withImage(VirtualHardDisk image)
Set the image property: The source user image virtual hard disk.
|
OSDisk |
withManagedDisk(ManagedDiskParameters managedDisk)
Set the managedDisk property: The managed disk parameters.
|
OSDisk |
withName(String name)
Set the name property: The disk name.
|
OSDisk |
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.
|
OSDisk |
withVhd(VirtualHardDisk vhd)
Set the vhd property: The virtual hard disk.
|
OSDisk |
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.
|
public OperatingSystemTypes osType()
public OSDisk withOsType(OperatingSystemTypes osType)
osType
- the osType value to set.public DiskEncryptionSettings encryptionSettings()
public OSDisk withEncryptionSettings(DiskEncryptionSettings encryptionSettings)
encryptionSettings
- the encryptionSettings value to set.public String name()
public OSDisk withName(String name)
name
- the name value to set.public VirtualHardDisk vhd()
public OSDisk withVhd(VirtualHardDisk vhd)
vhd
- the vhd value to set.public VirtualHardDisk image()
public OSDisk withImage(VirtualHardDisk image)
image
- the image value to set.public CachingTypes caching()
public OSDisk withCaching(CachingTypes caching)
caching
- the caching value to set.public Boolean writeAcceleratorEnabled()
public OSDisk withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)
writeAcceleratorEnabled
- the writeAcceleratorEnabled value to set.public DiffDiskSettings diffDiskSettings()
public OSDisk withDiffDiskSettings(DiffDiskSettings diffDiskSettings)
diffDiskSettings
- the diffDiskSettings value to set.public DiskCreateOptionTypes createOption()
public OSDisk withCreateOption(DiskCreateOptionTypes createOption)
createOption
- the createOption value to set.public Integer diskSizeGB()
public OSDisk withDiskSizeGB(Integer diskSizeGB)
diskSizeGB
- the diskSizeGB value to set.public ManagedDiskParameters managedDisk()
public OSDisk withManagedDisk(ManagedDiskParameters managedDisk)
managedDisk
- the managedDisk value to set.public void validate()
IllegalArgumentException
- thrown if the instance is not valid.Copyright © 2020 Microsoft Corporation. All rights reserved.