VirtualMachineDiskProperties Class

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

Implements

public final class VirtualMachineDiskProperties
implements JsonSerializable<VirtualMachineDiskProperties>

Specifies the properties of a managed disk that can be set at the time of implicit creation of the disk.

Constructor Summary

Constructor Description
VirtualMachineDiskProperties()

Creates an instance of VirtualMachineDiskProperties class.

Method Summary

Modifier and Type Method and Description
DiskAvailabilityPolicy availabilityPolicy()

Get the availabilityPolicy property: In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.

Boolean burstingEnabled()

Get the burstingEnabled property: Set to true to enable bursting beyond the provisioned performance target of the disk.

String diskAccessId()

Get the diskAccessId property: Azure resource Id of the DiskAccess resource for using private endpoints on disks.

Long diskIOPSReadOnly()

Get the diskIOPSReadOnly property: The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly.

Long diskMBpsReadOnly()

Get the diskMBpsReadOnly property: The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly.

static VirtualMachineDiskProperties fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineDiskProperties from the JsonReader.

Integer logicalSectorSize()

Get the logicalSectorSize property: Logical sector size in bytes for Ultra Disks.

Integer maxShares()

Get the maxShares property: The maximum number of VMs that can attach to the disk at the same time.

VirtualMachineDiskNetworkAccessPolicy networkAccessPolicy()

Get the networkAccessPolicy property: Policy for accessing the disk via network.

Boolean optimizedForFrequentAttach()

Get the optimizedForFrequentAttach property: Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another.

Boolean performancePlus()

Get the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed.

String tier()

Get the tier property: Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

VirtualMachineDiskProperties withAvailabilityPolicy(DiskAvailabilityPolicy availabilityPolicy)

Set the availabilityPolicy property: In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.

VirtualMachineDiskProperties withBurstingEnabled(Boolean burstingEnabled)

Set the burstingEnabled property: Set to true to enable bursting beyond the provisioned performance target of the disk.

VirtualMachineDiskProperties withDiskAccessId(String diskAccessId)

Set the diskAccessId property: Azure resource Id of the DiskAccess resource for using private endpoints on disks.

VirtualMachineDiskProperties withDiskIOPSReadOnly(Long diskIOPSReadOnly)

Set the diskIOPSReadOnly property: The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly.

VirtualMachineDiskProperties withDiskMBpsReadOnly(Long diskMBpsReadOnly)

Set the diskMBpsReadOnly property: The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly.

VirtualMachineDiskProperties withLogicalSectorSize(Integer logicalSectorSize)

Set the logicalSectorSize property: Logical sector size in bytes for Ultra Disks.

VirtualMachineDiskProperties withMaxShares(Integer maxShares)

Set the maxShares property: The maximum number of VMs that can attach to the disk at the same time.

VirtualMachineDiskProperties withNetworkAccessPolicy(VirtualMachineDiskNetworkAccessPolicy networkAccessPolicy)

Set the networkAccessPolicy property: Policy for accessing the disk via network.

VirtualMachineDiskProperties withOptimizedForFrequentAttach(Boolean optimizedForFrequentAttach)

Set the optimizedForFrequentAttach property: Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another.

VirtualMachineDiskProperties withPerformancePlus(Boolean performancePlus)

Set the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed.

VirtualMachineDiskProperties withTier(String tier)

Set the tier property: Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/.

Methods inherited from java.lang.Object

Constructor Details

VirtualMachineDiskProperties

public VirtualMachineDiskProperties()

Creates an instance of VirtualMachineDiskProperties class.

Method Details

availabilityPolicy

public DiskAvailabilityPolicy availabilityPolicy()

Get the availabilityPolicy property: In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.

Returns:

the availabilityPolicy value.

burstingEnabled

public Boolean burstingEnabled()

Get the burstingEnabled property: Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.

Returns:

the burstingEnabled value.

diskAccessId

public String diskAccessId()

Get the diskAccessId property: Azure resource Id of the DiskAccess resource for using private endpoints on disks.

Returns:

the diskAccessId value.

diskIOPSReadOnly

public Long diskIOPSReadOnly()

Get the diskIOPSReadOnly property: The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.

Returns:

the diskIOPSReadOnly value.

diskMBpsReadOnly

public Long diskMBpsReadOnly()

Get the diskMBpsReadOnly property: The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.

Returns:

the diskMBpsReadOnly value.

fromJson

public static VirtualMachineDiskProperties fromJson(JsonReader jsonReader)

Reads an instance of VirtualMachineDiskProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of VirtualMachineDiskProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the VirtualMachineDiskProperties.

logicalSectorSize

public Integer logicalSectorSize()

Get the logicalSectorSize property: Logical sector size in bytes for Ultra Disks. Supported values are 512 and 4096. 4096 is the default.

Returns:

the logicalSectorSize value.

maxShares

public Integer maxShares()

Get the maxShares property: The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. Applies to data disks only.

Returns:

the maxShares value.

networkAccessPolicy

public VirtualMachineDiskNetworkAccessPolicy networkAccessPolicy()

Get the networkAccessPolicy property: Policy for accessing the disk via network.

Returns:

the networkAccessPolicy value.

optimizedForFrequentAttach

public Boolean optimizedForFrequentAttach()

Get the optimizedForFrequentAttach property: Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.

Returns:

the optimizedForFrequentAttach value.

performancePlus

public Boolean performancePlus()

Get the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled.

Returns:

the performancePlus value.

tier

public String tier()

Get the tier property: Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.

Returns:

the tier value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAvailabilityPolicy

public VirtualMachineDiskProperties withAvailabilityPolicy(DiskAvailabilityPolicy availabilityPolicy)

Set the availabilityPolicy property: In the case of an availability or connectivity issue with the disk, specify the behavior of your VM.

Parameters:

availabilityPolicy - the availabilityPolicy value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withBurstingEnabled

public VirtualMachineDiskProperties withBurstingEnabled(Boolean burstingEnabled)

Set the burstingEnabled property: Set to true to enable bursting beyond the provisioned performance target of the disk. Bursting is disabled by default. Does not apply to Ultra disks.

Parameters:

burstingEnabled - the burstingEnabled value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withDiskAccessId

public VirtualMachineDiskProperties withDiskAccessId(String diskAccessId)

Set the diskAccessId property: Azure resource Id of the DiskAccess resource for using private endpoints on disks.

Parameters:

diskAccessId - the diskAccessId value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withDiskIOPSReadOnly

public VirtualMachineDiskProperties withDiskIOPSReadOnly(Long diskIOPSReadOnly)

Set the diskIOPSReadOnly property: The total number of IOPS that will be allowed across all VMs mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes.

Parameters:

diskIOPSReadOnly - the diskIOPSReadOnly value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withDiskMBpsReadOnly

public VirtualMachineDiskProperties withDiskMBpsReadOnly(Long diskMBpsReadOnly)

Set the diskMBpsReadOnly property: The total throughput (MBps) that will be allowed across all VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.

Parameters:

diskMBpsReadOnly - the diskMBpsReadOnly value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withLogicalSectorSize

public VirtualMachineDiskProperties withLogicalSectorSize(Integer logicalSectorSize)

Set the logicalSectorSize property: Logical sector size in bytes for Ultra Disks. Supported values are 512 and 4096. 4096 is the default.

Parameters:

logicalSectorSize - the logicalSectorSize value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withMaxShares

public VirtualMachineDiskProperties withMaxShares(Integer maxShares)

Set the maxShares property: The maximum number of VMs that can attach to the disk at the same time. Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. Applies to data disks only.

Parameters:

maxShares - the maxShares value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withNetworkAccessPolicy

public VirtualMachineDiskProperties withNetworkAccessPolicy(VirtualMachineDiskNetworkAccessPolicy networkAccessPolicy)

Set the networkAccessPolicy property: Policy for accessing the disk via network.

Parameters:

networkAccessPolicy - the networkAccessPolicy value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withOptimizedForFrequentAttach

public VirtualMachineDiskProperties withOptimizedForFrequentAttach(Boolean optimizedForFrequentAttach)

Set the optimizedForFrequentAttach property: Setting this property to true improves reliability and performance of data disks that are frequently (more than 5 times a day) detached from one virtual machine and attached to another. This property should not be set for disks that are not detached and attached frequently as it causes the disks to not align with the fault domain of the virtual machine.

Parameters:

optimizedForFrequentAttach - the optimizedForFrequentAttach value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withPerformancePlus

public VirtualMachineDiskProperties withPerformancePlus(Boolean performancePlus)

Set the performancePlus property: Set this flag to true to get a boost on the performance target of the disk deployed. This flag can only be set on disk creation time and cannot be disabled after enabled.

Parameters:

performancePlus - the performancePlus value to set.

Returns:

the VirtualMachineDiskProperties object itself.

withTier

public VirtualMachineDiskProperties withTier(String tier)

Set the tier property: Performance tier of the disk (e.g., P4, S10) as described here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra disks.

Parameters:

tier - the tier value to set.

Returns:

the VirtualMachineDiskProperties object itself.

Applies to