Sdílet prostřednictvím


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()

Gets the availability zones assigned to the disk.

abstract DiskCreateOption creationMethod()

Gets the disk creation method.

abstract Encryption encryption()

Gets the disk encryption.

abstract EncryptionSettingsCollection 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 HyperVGeneration 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 OperatingSystemTypes osType()

Gets the type of the operating system on the disk.

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()

Gets disk size in byte.

abstract int sizeInGB()

Gets disk size in GB.

abstract DiskSkuTypes sku()

Gets the disk SKU.

abstract CreationSource 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.

Method Details

availabilityZones

public abstract Set availabilityZones()

Gets the availability zones assigned to the disk.

Returns:

the availability zones assigned to the disk

creationMethod

public abstract DiskCreateOption creationMethod()

Gets the disk creation method.

Returns:

the disk creation method

encryption

public abstract Encryption encryption()

Gets the disk encryption.

Returns:

the disk encryption

encryptionSettings

public abstract EncryptionSettingsCollection encryptionSettings()

Gets the disk encryption settings.

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()

Gets the hypervisor generation.

Returns:

the hypervisor generation.

isAttachedToVirtualMachine

public abstract boolean isAttachedToVirtualMachine()

Checks whether the disk is attached to a virtual machine.

Returns:

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

isHibernationSupported

public abstract boolean isHibernationSupported()

Checks whether the OS on a disk supports hibernation.

Returns:

whether the OS on a disk supports hibernation.

logicalSectorSizeInBytes

public abstract Integer logicalSectorSizeInBytes()

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

Returns:

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

osType

public abstract OperatingSystemTypes osType()

Gets the type of the operating system on the disk.

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()

Gets disk size in byte.

Returns:

disk size in byte

sizeInGB

public abstract int sizeInGB()

Gets disk size in GB.

Returns:

disk size in GB

sku

public abstract DiskSkuTypes sku()

Gets the disk SKU.

Returns:

the disk SKU

source

public abstract CreationSource source()

Gets the details of the source from which the disk is created.

Returns:

the details of the source from which the disk is created

virtualMachineId

public abstract String virtualMachineId()

Gets the resource ID of the virtual machine this disk is attached to.

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