Class VirtualMachineDiskOptions
java.lang.Object
com.azure.resourcemanager.compute.models.VirtualMachineDiskOptions
Options for managed data disk of a virtual machine.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of VirtualMachineDiskOptions. -
Method Summary
Modifier and TypeMethodDescriptionGets the disk caching type.Gets the disk delete options.Gets the ID of disk encryption set.booleanChecks whether disk encryption set is configured.Gets the disk storage account type.withCachingTypes(CachingTypes cachingTypes) Sets the caching type.withDeleteOptions(DeleteOptions deleteOptions) Sets the delete options of the disk, when the virtual machine is deleted.withDiskEncryptionSet(String diskEncryptionSetId) Sets the ID of disk encryption set.withStorageAccountTypes(StorageAccountTypes storageAccountType) Sets the storage account type.withWriteAcceleratorEnabled(boolean writeAcceleratorEnabled) Enables/disables the write accelerator.Gets whether the write accelerator is enabled.
-
Constructor Details
-
VirtualMachineDiskOptions
public VirtualMachineDiskOptions()Creates a new instance of VirtualMachineDiskOptions.
-
-
Method Details
-
storageAccountType
Gets the disk storage account type.- Returns:
- the disk storage account type
-
cachingTypes
-
deleteOptions
-
writeAcceleratorEnabled
Gets whether the write accelerator is enabled. null if no change.- Returns:
- whether the write accelerator is enabled
-
isDiskEncryptionSetConfigured
public boolean isDiskEncryptionSetConfigured()Checks whether disk encryption set is configured.- Returns:
- whether disk encryption set is configured,
either as the ID of disk encryption set, or as
nullto override default configuration.
-
diskEncryptionSetId
Gets the ID of disk encryption set.- Returns:
- the ID of disk encryption set
-
withStorageAccountTypes
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
Sets the caching type.- Parameters:
cachingTypes- the caching type- Returns:
- self
-
withDeleteOptions
Sets the delete options of the disk, when the virtual machine is deleted.- Parameters:
deleteOptions- the delete options- Returns:
- self
-
withWriteAcceleratorEnabled
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
Sets the ID of disk encryption set.nullto 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
-