Class VirtualMachineDiskOptions

java.lang.Object
com.azure.resourcemanager.compute.models.VirtualMachineDiskOptions

public final class VirtualMachineDiskOptions extends Object
Options for managed data disk of a virtual machine.
  • Constructor Details

    • VirtualMachineDiskOptions

      public VirtualMachineDiskOptions()
  • Method Details

    • storageAccountType

      public StorageAccountTypes storageAccountType()
      Returns:
      the disk storage account type
    • cachingTypes

      public CachingTypes cachingTypes()
      Returns:
      the disk caching type
    • deleteOptions

      public DeleteOptions deleteOptions()
      Returns:
      the disk delete options
    • writeAcceleratorEnabled

      public Boolean writeAcceleratorEnabled()
      Gets whether the write accelerator is enabled. null if no change.
      Returns:
      whether the write accelerator is enabled
    • isDiskEncryptionSetConfigured

      public boolean isDiskEncryptionSetConfigured()
      Returns:
      whether disk encryption set is configured, either as the ID of disk encryption set, or as null to override default configuration.
    • diskEncryptionSetId

      public String diskEncryptionSetId()
      Returns:
      the ID of disk encryption set
    • withStorageAccountTypes

      public VirtualMachineDiskOptions withStorageAccountTypes(StorageAccountTypes storageAccountType)
      Sets the storage account type.

      Storage account type configured here will not work when attaching a disk.

      Parameters:
      storageAccountType - the storage account type
      Returns:
      self
    • withCachingTypes

      public VirtualMachineDiskOptions withCachingTypes(CachingTypes cachingTypes)
      Sets the caching type.
      Parameters:
      cachingTypes - the caching type
      Returns:
      self
    • withDeleteOptions

      public VirtualMachineDiskOptions withDeleteOptions(DeleteOptions deleteOptions)
      Sets the delete options of the disk, when the virtual machine is deleted.
      Parameters:
      deleteOptions - the delete options
      Returns:
      self
    • withWriteAcceleratorEnabled

      public VirtualMachineDiskOptions withWriteAcceleratorEnabled(boolean writeAcceleratorEnabled)
      Enables/disables the write accelerator.

      Write Accelerator is generally available for M-series VMs in the Public Cloud. Enabling write accelerator for the operating system disk of the VM will reboot the VM. The Premium disk caching must be set to 'None' or 'Read Only'. All other caching modes are not supported.

      Parameters:
      writeAcceleratorEnabled - whether to enable the write accelerator
      Returns:
      self
    • withDiskEncryptionSet

      public VirtualMachineDiskOptions withDiskEncryptionSet(String diskEncryptionSetId)
      Sets the ID of disk encryption set. null to indicate that do not configure disk encryption set. If disk is already encrypted with customer-managed key, it remains so when attached.
      Parameters:
      diskEncryptionSetId - the ID of disk encryption set
      Returns:
      self