Disk Interface
Implements
public interface Disk
extends GroupableResource<ComputeManager,DiskInner>, Refreshable<Disk>, Updatable<Update>
An immutable client-side representation of an Azure managed disk.
Method Summary
Modifier and Type | Method and Description |
---|---|
abstract
Set<Availability |
availabilityZones()
Gets the availability zones assigned to the disk. |
abstract
Disk |
creationMethod()
Gets the disk creation method. |
abstract Long |
diskIopsReadOnly()
Gets the total number of IOPS allowed across all VMs mounting this shared disk as read-only. |
abstract Long |
diskIopsReadWrite()
Gets the number of IOPS allowed for this disk. |
abstract Long |
diskMBpsReadOnly()
Gets the total throughput (MBps) allowed across all VMs mounting this shared disk as read-only. |
abstract Long |
diskMBpsReadWrite()
Gets the throughput (MBps) allowed for this disk. |
abstract Encryption |
encryption()
Gets the disk encryption. |
abstract
Encryption |
encryptionSettings()
Gets the disk encryption settings. |
abstract String |
grantAccess(int accessDurationInSeconds)
Grants access to the disk. |
abstract Mono<String> |
grantAccessAsync(int accessDurationInSeconds)
Grants access to the disk asynchronously. |
abstract
Hyper |
hyperVGeneration()
Gets the hypervisor generation. |
abstract boolean |
isAttachedToVirtualMachine()
Checks whether the disk is attached to a virtual machine. |
abstract boolean |
isHibernationSupported()
Checks whether the OS on a disk supports hibernation. |
abstract Integer |
logicalSectorSizeInBytes()
Gets logical sector size in bytes for Premium SSD v2 and Ultra disks. |
abstract int |
maximumShares()
Gets the maximum number of VMs that can attach to the disk at the same time. |
abstract
Operating |
osType()
Gets the type of the operating system on the disk. |
abstract
Public |
publicNetworkAccess()
Whether the disk can be accessed from public network. |
abstract void |
revokeAccess()
Revokes access granted to the disk. |
abstract Mono<Void> |
revokeAccessAsync()
Revokes access granted to the disk asynchronously. |
abstract long |
sizeInByte()
Gets disk size in byte. |
abstract int |
sizeInGB()
Gets disk size in GB. |
abstract
Disk |
sku()
Gets the disk SKU. |
abstract
Creation |
source()
Gets the details of the source from which the disk is created. |
abstract String |
virtualMachineId()
Gets the resource ID of the virtual machine this disk is attached to. |
abstract List<String> |
virtualMachineIds()
Gets the list of the virtual machines that this disk is attached to. |
Method Details
availabilityZones
public abstract Set<AvailabilityZoneId> availabilityZones()
Gets the availability zones assigned to the disk.
Returns:
creationMethod
public abstract DiskCreateOption creationMethod()
Gets the disk creation method.
Returns:
diskIopsReadOnly
public abstract Long diskIopsReadOnly()
Gets the total number of IOPS allowed across all VMs mounting this shared disk as read-only.
Returns:
diskIopsReadWrite
public abstract Long diskIopsReadWrite()
Gets the number of IOPS allowed for this disk.
Returns:
diskMBpsReadOnly
public abstract Long diskMBpsReadOnly()
Gets the total throughput (MBps) allowed across all VMs mounting this shared disk as read-only.
Returns:
diskMBpsReadWrite
public abstract Long diskMBpsReadWrite()
Gets the throughput (MBps) allowed for this disk.
Returns:
encryption
public abstract Encryption encryption()
Gets the disk encryption.
Returns:
encryptionSettings
public abstract EncryptionSettingsCollection encryptionSettings()
Gets the disk encryption settings.
Returns:
grantAccess
public abstract String grantAccess(int accessDurationInSeconds)
Grants access to the disk.
Parameters:
Returns:
grantAccessAsync
public abstract Mono<String> grantAccessAsync(int accessDurationInSeconds)
Grants access to the disk asynchronously.
Parameters:
Returns:
hyperVGeneration
public abstract HyperVGeneration hyperVGeneration()
Gets the hypervisor generation.
Returns:
isAttachedToVirtualMachine
public abstract boolean isAttachedToVirtualMachine()
Checks whether the disk is attached to a virtual machine.
Returns:
isHibernationSupported
public abstract boolean isHibernationSupported()
Checks whether the OS on a disk supports hibernation.
Returns:
logicalSectorSizeInBytes
public abstract Integer logicalSectorSizeInBytes()
Gets logical sector size in bytes for Premium SSD v2 and Ultra disks.
Returns:
maximumShares
public abstract int maximumShares()
Gets the maximum number of VMs that can attach to the disk at the same time.
Returns:
osType
public abstract OperatingSystemTypes osType()
Gets the type of the operating system on the disk.
Returns:
publicNetworkAccess
public abstract PublicNetworkAccess publicNetworkAccess()
Whether the disk can be accessed from public network.
Returns:
revokeAccess
public abstract void revokeAccess()
Revokes access granted to the disk.
revokeAccessAsync
public abstract Mono<Void> revokeAccessAsync()
Revokes access granted to the disk asynchronously.
Returns:
sizeInByte
public abstract long sizeInByte()
Gets disk size in byte.
Returns:
sizeInGB
public abstract int sizeInGB()
Gets disk size in GB.
Returns:
sku
public abstract DiskSkuTypes sku()
Gets the disk SKU.
Returns:
source
public abstract CreationSource source()
Gets the details of the source from which the disk is created.
Returns:
virtualMachineId
public abstract String virtualMachineId()
Gets the resource ID of the virtual machine this disk is attached to.
If the disk can be shared, use virtualMachineIds() to get the list of all virtual machines.
Returns:
virtualMachineIds
public abstract List<String> virtualMachineIds()
Gets the list of the virtual machines that this disk is attached to.
A disk could be attached to multiple virtual machines.
Returns: