Class DiskUpdateProperties

java.lang.Object
com.azure.resourcemanager.compute.fluent.models.DiskUpdateProperties
All Implemented Interfaces:
com.azure.json.JsonSerializable<DiskUpdateProperties>

public final class DiskUpdateProperties extends Object implements com.azure.json.JsonSerializable<DiskUpdateProperties>
Disk resource update properties.
  • Constructor Details

    • DiskUpdateProperties

      public DiskUpdateProperties()
      Creates an instance of DiskUpdateProperties class.
  • Method Details

    • osType

      public OperatingSystemTypes osType()
      Get the osType property: the Operating System type.
      Returns:
      the osType value.
    • withOsType

      public DiskUpdateProperties withOsType(OperatingSystemTypes osType)
      Set the osType property: the Operating System type.
      Parameters:
      osType - the osType value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • diskSizeGB

      public Integer diskSizeGB()
      Get the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
      Returns:
      the diskSizeGB value.
    • withDiskSizeGB

      public DiskUpdateProperties withDiskSizeGB(Integer diskSizeGB)
      Set the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it indicates the size of the disk to create. If this field is present for updates or creation with other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can only increase the disk's size.
      Parameters:
      diskSizeGB - the diskSizeGB value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • encryptionSettingsCollection

      public EncryptionSettingsCollection encryptionSettingsCollection()
      Get the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
      Returns:
      the encryptionSettingsCollection value.
    • withEncryptionSettingsCollection

      public DiskUpdateProperties withEncryptionSettingsCollection(EncryptionSettingsCollection encryptionSettingsCollection)
      Set the encryptionSettingsCollection property: Encryption settings collection used be Azure Disk Encryption, can contain multiple encryption settings per disk or snapshot.
      Parameters:
      encryptionSettingsCollection - the encryptionSettingsCollection value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • diskIopsReadWrite

      public Long diskIopsReadWrite()
      Get the diskIopsReadWrite property: The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
      Returns:
      the diskIopsReadWrite value.
    • withDiskIopsReadWrite

      public DiskUpdateProperties withDiskIopsReadWrite(Long diskIopsReadWrite)
      Set the diskIopsReadWrite property: The number of IOPS allowed for this disk; only settable for UltraSSD disks. One operation can transfer between 4k and 256k bytes.
      Parameters:
      diskIopsReadWrite - the diskIopsReadWrite value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • diskMBpsReadWrite

      public Long diskMBpsReadWrite()
      Get the diskMBpsReadWrite property: The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
      Returns:
      the diskMBpsReadWrite value.
    • withDiskMBpsReadWrite

      public DiskUpdateProperties withDiskMBpsReadWrite(Long diskMBpsReadWrite)
      Set the diskMBpsReadWrite property: The bandwidth allowed for this disk; only settable for UltraSSD disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of 10.
      Parameters:
      diskMBpsReadWrite - the diskMBpsReadWrite value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • 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.
    • withDiskIopsReadOnly

      public DiskUpdateProperties 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 DiskUpdateProperties object itself.
    • 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.
    • withDiskMBpsReadOnly

      public DiskUpdateProperties 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 DiskUpdateProperties object itself.
    • 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.
      Returns:
      the maxShares value.
    • withMaxShares

      public DiskUpdateProperties 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.
      Parameters:
      maxShares - the maxShares value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • encryption

      public Encryption encryption()
      Get the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
      Returns:
      the encryption value.
    • withEncryption

      public DiskUpdateProperties withEncryption(Encryption encryption)
      Set the encryption property: Encryption property can be used to encrypt data at rest with customer managed keys or platform managed keys.
      Parameters:
      encryption - the encryption value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • networkAccessPolicy

      public NetworkAccessPolicy networkAccessPolicy()
      Get the networkAccessPolicy property: Policy for accessing the disk via network.
      Returns:
      the networkAccessPolicy value.
    • withNetworkAccessPolicy

      public DiskUpdateProperties withNetworkAccessPolicy(NetworkAccessPolicy networkAccessPolicy)
      Set the networkAccessPolicy property: Policy for accessing the disk via network.
      Parameters:
      networkAccessPolicy - the networkAccessPolicy value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • diskAccessId

      public String diskAccessId()
      Get the diskAccessId property: ARM id of the DiskAccess resource for using private endpoints on disks.
      Returns:
      the diskAccessId value.
    • withDiskAccessId

      public DiskUpdateProperties withDiskAccessId(String diskAccessId)
      Set the diskAccessId property: ARM id of the DiskAccess resource for using private endpoints on disks.
      Parameters:
      diskAccessId - the diskAccessId value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • 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.
    • withTier

      public DiskUpdateProperties 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 DiskUpdateProperties object itself.
    • 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.
    • withBurstingEnabled

      public DiskUpdateProperties 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 DiskUpdateProperties object itself.
    • purchasePlan

      public DiskPurchasePlan purchasePlan()
      Get the purchasePlan property: Purchase plan information to be added on the OS disk.
      Returns:
      the purchasePlan value.
    • withPurchasePlan

      public DiskUpdateProperties withPurchasePlan(DiskPurchasePlan purchasePlan)
      Set the purchasePlan property: Purchase plan information to be added on the OS disk.
      Parameters:
      purchasePlan - the purchasePlan value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • supportedCapabilities

      public SupportedCapabilities supportedCapabilities()
      Get the supportedCapabilities property: List of supported capabilities to be added on the OS disk.
      Returns:
      the supportedCapabilities value.
    • withSupportedCapabilities

      public DiskUpdateProperties withSupportedCapabilities(SupportedCapabilities supportedCapabilities)
      Set the supportedCapabilities property: List of supported capabilities to be added on the OS disk.
      Parameters:
      supportedCapabilities - the supportedCapabilities value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • propertyUpdatesInProgress

      public PropertyUpdatesInProgress propertyUpdatesInProgress()
      Get the propertyUpdatesInProgress property: Properties of the disk for which update is pending.
      Returns:
      the propertyUpdatesInProgress value.
    • supportsHibernation

      public Boolean supportsHibernation()
      Get the supportsHibernation property: Indicates the OS on a disk supports hibernation.
      Returns:
      the supportsHibernation value.
    • withSupportsHibernation

      public DiskUpdateProperties withSupportsHibernation(Boolean supportsHibernation)
      Set the supportsHibernation property: Indicates the OS on a disk supports hibernation.
      Parameters:
      supportsHibernation - the supportsHibernation value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • publicNetworkAccess

      public PublicNetworkAccess publicNetworkAccess()
      Get the publicNetworkAccess property: Policy for controlling export on the disk.
      Returns:
      the publicNetworkAccess value.
    • withPublicNetworkAccess

      public DiskUpdateProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess)
      Set the publicNetworkAccess property: Policy for controlling export on the disk.
      Parameters:
      publicNetworkAccess - the publicNetworkAccess value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • dataAccessAuthMode

      public DataAccessAuthMode dataAccessAuthMode()
      Get the dataAccessAuthMode property: Additional authentication requirements when exporting or uploading to a disk or snapshot.
      Returns:
      the dataAccessAuthMode value.
    • withDataAccessAuthMode

      public DiskUpdateProperties withDataAccessAuthMode(DataAccessAuthMode dataAccessAuthMode)
      Set the dataAccessAuthMode property: Additional authentication requirements when exporting or uploading to a disk or snapshot.
      Parameters:
      dataAccessAuthMode - the dataAccessAuthMode value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • 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) by 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.
    • withOptimizedForFrequentAttach

      public DiskUpdateProperties 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) by 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 DiskUpdateProperties object itself.
    • availabilityPolicy

      public AvailabilityPolicy availabilityPolicy()
      Get the availabilityPolicy property: Determines how platform treats disk failures.
      Returns:
      the availabilityPolicy value.
    • withAvailabilityPolicy

      public DiskUpdateProperties withAvailabilityPolicy(AvailabilityPolicy availabilityPolicy)
      Set the availabilityPolicy property: Determines how platform treats disk failures.
      Parameters:
      availabilityPolicy - the availabilityPolicy value to set.
      Returns:
      the DiskUpdateProperties object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<DiskUpdateProperties>
      Throws:
      IOException
    • fromJson

      public static DiskUpdateProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of DiskUpdateProperties from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of DiskUpdateProperties 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 DiskUpdateProperties.