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<AvailabilityZoneId> availabilityZones()
abstract DiskCreateOption creationMethod()
abstract Encryption encryption()
abstract EncryptionSettingsCollection encryptionSettings()
abstract String grantAccess(int accessDurationInSeconds)

Grants access to the disk.

abstract Mono<String> grantAccessAsync(int accessDurationInSeconds)

Grants access to the disk asynchronously.

abstract HyperVGeneration hyperVGeneration()
abstract boolean isAttachedToVirtualMachine()
abstract boolean isHibernationSupported()
abstract Integer logicalSectorSizeInBytes()
abstract OperatingSystemTypes osType()
abstract PublicNetworkAccess 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()
abstract int sizeInGB()
abstract DiskSkuTypes sku()
abstract CreationSource source()
abstract String virtualMachineId()

Method Details

availabilityZones

public abstract Set availabilityZones()

Returns:

the availability zones assigned to the disk

creationMethod

public abstract DiskCreateOption creationMethod()

Returns:

the disk creation method

encryption

public abstract Encryption encryption()

Returns:

the disk encryption

encryptionSettings

public abstract EncryptionSettingsCollection encryptionSettings()

Returns:

the disk encryption settings

grantAccess

public abstract String grantAccess(int accessDurationInSeconds)

Grants access to the disk.

Parameters:

accessDurationInSeconds - the access duration in seconds

Returns:

the read-only SAS URI to the disk

grantAccessAsync

public abstract Mono grantAccessAsync(int accessDurationInSeconds)

Grants access to the disk asynchronously.

Parameters:

accessDurationInSeconds - the access duration in seconds

Returns:

a representation of the deferred computation of this call returning a read-only SAS URI to the disk

hyperVGeneration

public abstract HyperVGeneration hyperVGeneration()

Returns:

the hypervisor generation.

isAttachedToVirtualMachine

public abstract boolean isAttachedToVirtualMachine()

Returns:

true if the disk is attached to a virtual machine, otherwise false

isHibernationSupported

public abstract boolean isHibernationSupported()

Returns:

whether the OS on a disk supports hibernation.

logicalSectorSizeInBytes

public abstract Integer logicalSectorSizeInBytes()

Returns:

logical sector size in bytes for Premium SSD v2 and Ultra disks.

osType

public abstract OperatingSystemTypes osType()

Returns:

the type of the operating system on the disk

publicNetworkAccess

public abstract PublicNetworkAccess publicNetworkAccess()

Whether the disk can be accessed from public network.

Returns:

whether the disk can be accessed from public network.

revokeAccess

public abstract void revokeAccess()

Revokes access granted to the disk.

revokeAccessAsync

public abstract Mono revokeAccessAsync()

Revokes access granted to the disk asynchronously.

Returns:

a representation of the deferred computation of this call

sizeInByte

public abstract long sizeInByte()

Returns:

disk size in byte

sizeInGB

public abstract int sizeInGB()

Returns:

disk size in GB

sku

public abstract DiskSkuTypes sku()

Returns:

the disk SKU

source

public abstract CreationSource source()

Returns:

the details of the source from which the disk is created

virtualMachineId

public abstract String virtualMachineId()

Returns:

the resource ID of the virtual machine this disk is attached to, or null if the disk is in a detached state

Applies to