VirtualMachineScaleSetDataDisk Class

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

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 VirtualMachineScaleSetDataDisk 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: The create option.

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**.

Long diskIopsReadWrite()

Get the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk.

Long diskMBpsReadWrite()

Get the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk.

Integer diskSizeGB()

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

static VirtualMachineScaleSetDataDisk fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineScaleSetDataDisk from the JsonReader.

int lun()

Get the lun property: Specifies the logical unit number of the data disk.

VirtualMachineScaleSetManagedDiskParameters managedDisk()

Get the managedDisk property: The managed disk parameters.

String name()

Get the name property: The disk name.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VirtualMachineScaleSetDataDisk withCaching(CachingTypes caching)

Set the caching property: Specifies the caching requirements.

VirtualMachineScaleSetDataDisk withCreateOption(DiskCreateOptionTypes createOption)

Set the createOption property: The create option.

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**.

VirtualMachineScaleSetDataDisk withDiskIopsReadWrite(Long diskIopsReadWrite)

Set the diskIopsReadWrite property: Specifies the Read-Write IOPS for the managed disk.

VirtualMachineScaleSetDataDisk withDiskMBpsReadWrite(Long diskMBpsReadWrite)

Set the diskMBpsReadWrite property: Specifies the bandwidth in MB per second for the managed disk.

VirtualMachineScaleSetDataDisk withDiskSizeGB(Integer diskSizeGB)

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

VirtualMachineScaleSetDataDisk withLun(int lun)

Set the lun property: Specifies the logical unit number of the data disk.

VirtualMachineScaleSetDataDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)

Set the managedDisk property: The managed disk parameters.

VirtualMachineScaleSetDataDisk withName(String name)

Set the name property: The disk name.

VirtualMachineScaleSetDataDisk 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

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:

the caching value.

createOption

public DiskCreateOptionTypes createOption()

Get the createOption property: The create option.

Returns:

the createOption value.

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:

the deleteOption value.

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:

the diskIopsReadWrite value.

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:

the diskMBpsReadWrite 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 VirtualMachineScaleSetDataDisk fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineScaleSetDataDisk from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualMachineScaleSetDataDisk 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.

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:

the lun 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

caching - the caching value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

withCreateOption

public VirtualMachineScaleSetDataDisk withCreateOption(DiskCreateOptionTypes createOption)

Set the createOption property: The create option.

Parameters:

createOption - the createOption value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

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:

deleteOption - the deleteOption value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

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:

diskIopsReadWrite - the diskIopsReadWrite value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

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:

diskMBpsReadWrite - the diskMBpsReadWrite value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

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:

diskSizeGB - the diskSizeGB value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

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:

lun - the lun value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

withManagedDisk

public VirtualMachineScaleSetDataDisk withManagedDisk(VirtualMachineScaleSetManagedDiskParameters managedDisk)

Set the managedDisk property: The managed disk parameters.

Parameters:

managedDisk - the managedDisk value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

withName

public VirtualMachineScaleSetDataDisk withName(String name)

Set the name property: The disk name.

Parameters:

name - the name value to set.

Returns:

the VirtualMachineScaleSetDataDisk object itself.

withWriteAcceleratorEnabled

public VirtualMachineScaleSetDataDisk 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 VirtualMachineScaleSetDataDisk 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