VirtualMachineScaleSetDataDisk Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. VirtualMachineScaleSetDataDisk
- com.
Implements
public final class VirtualMachineScaleSetDataDisk
implements JsonSerializable<VirtualMachineScaleSetDataDisk>
Describes a virtual machine scale set data disk.
Constructor Summary
Constructor | Description |
---|---|
VirtualMachineScaleSetDataDisk() |
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 |
Long |
diskIopsReadWrite()
Get the disk |
Long |
diskMBpsReadWrite()
Get the disk |
Integer |
diskSizeGB()
Get the disk |
static
Virtual |
fromJson(JsonReader jsonReader)
Reads an instance of Virtual |
int |
lun()
Get the lun property: Specifies the logical unit number of the data disk. |
Virtual |
managedDisk()
Get the managed |
String |
name()
Get the name property: The disk name. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
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 |
withDiskIopsReadWrite(Long diskIopsReadWrite)
Set the disk |
Virtual |
withDiskMBpsReadWrite(Long diskMBpsReadWrite)
Set the disk |
Virtual |
withDiskSizeGB(Integer diskSizeGB)
Set the disk |
Virtual |
withLun(int lun)
Set the lun property: Specifies the logical unit number of the data disk. |
Virtual |
withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)
Set the managed |
Virtual |
withName(String name)
Set the name property: The disk name. |
Virtual |
withWriteAcceleratorEnabled(Boolean writeAcceleratorEnabled)
Set the write |
Boolean |
writeAcceleratorEnabled()
Get the write |
Methods inherited from java.lang.Object
Constructor Details
VirtualMachineScaleSetDataDisk
public VirtualMachineScaleSetDataDisk()
Creates an instance of VirtualMachineScaleSetDataDisk 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: The create option.
Returns:
deleteOption
public DiskDeleteOptionTypes deleteOption()
Get the deleteOption property: Specifies whether data 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 data disk is deleted when the VMSS Flex VM is deleted.
**Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.
The default value is set to **Delete**.
Returns:
diskIopsReadWrite
public Long diskIopsReadWrite()
Get the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
Returns:
diskMBpsReadWrite
public Long diskMBpsReadWrite()
Get the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
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 VirtualMachineScaleSetDataDisk fromJson(JsonReader jsonReader)
Reads an instance of VirtualMachineScaleSetDataDisk from the JsonReader.
Parameters:
Returns:
Throws:
lun
public int lun()
Get the lun property: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
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:
toJson
validate
public void validate()
Validates the instance.
withCaching
public VirtualMachineScaleSetDataDisk 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 VirtualMachineScaleSetDataDisk withCreateOption(DiskCreateOptionTypes createOption)
Set the createOption property: The create option.
Parameters:
Returns:
withDeleteOption
public VirtualMachineScaleSetDataDisk withDeleteOption(DiskDeleteOptionTypes deleteOption)
Set the deleteOption property: Specifies whether data 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 data disk is deleted when the VMSS Flex VM is deleted.
**Detach** If this value is used, the data disk is retained after VMSS Flex VM is deleted.
The default value is set to **Delete**.
Parameters:
Returns:
withDiskIopsReadWrite
public VirtualMachineScaleSetDataDisk withDiskIopsReadWrite(Long diskIopsReadWrite)
Set the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
Parameters:
Returns:
withDiskMBpsReadWrite
public VirtualMachineScaleSetDataDisk withDiskMBpsReadWrite(Long diskMBpsReadWrite)
Set the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk. Should be used only when StorageAccountType is UltraSSD_LRS. If not specified, a default value would be assigned based on diskSizeGB.
Parameters:
Returns:
withDiskSizeGB
public VirtualMachineScaleSetDataDisk 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:
withLun
public VirtualMachineScaleSetDataDisk withLun(int lun)
Set the lun property: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
Parameters:
Returns:
withManagedDisk
public VirtualMachineScaleSetDataDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)
Set the managedDisk property: The managed disk parameters.
Parameters:
Returns:
withName
public VirtualMachineScaleSetDataDisk withName(String name)
Set the name property: The disk name.
Parameters:
Returns:
withWriteAcceleratorEnabled
public VirtualMachineScaleSetDataDisk 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