Disk Interface

public interface Disk extends GroupableResource<ComputeManager, DiskInner>,Refreshable,Updatable<Disk.Update>

An immutable client-side representation of an Azure managed disk.

Method Summary

Modifier and Type Method and Description
Set<AvailabilityZoneId> availabilityZones()
DiskCreateOption creationMethod()
String grantAccess(int accessDurationInSeconds)

Grants access to the disk.

Observable<String> grantAccessAsync(int accessDurationInSeconds)

Grants access to the disk asynchronously.

ServiceFuture<String> grantAccessAsync(int accessDurationInSeconds, ServiceCallback<String> callback)

Grants access to the disk asynchronously.

boolean isAttachedToVirtualMachine()
OperatingSystemTypes osType()
void revokeAccess()

Revokes access granted to the disk.

Completable revokeAccessAsync()

Revokes access granted to the disk asynchronously.

ServiceFuture<Void> revokeAccessAsync(ServiceCallback<Void> callback)

Revokes access granted to the disk asynchronously.

int sizeInGB()
DiskSkuTypes sku()
CreationSource source()
String virtualMachineId()

Inherited Members

Method Details

availabilityZones

public Set availabilityZones()

Returns:

the availability zones assigned to the disk

creationMethod

public DiskCreateOption creationMethod()

Returns:

the disk creation method

grantAccess

public 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 Observable 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

grantAccessAsync

public ServiceFuture grantAccessAsync(int accessDurationInSeconds, ServiceCallback callback)

Grants access to the disk asynchronously.

Parameters:

accessDurationInSeconds - the access duration in seconds
callback - the callback to call on success or failure, containing a read-only SAS URI to the disk, if successful

Returns:

a handle to cancel the request

isAttachedToVirtualMachine

public boolean isAttachedToVirtualMachine()

Returns:

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

osType

public OperatingSystemTypes osType()

Returns:

the type of the operating system on the disk

revokeAccess

public void revokeAccess()

Revokes access granted to the disk.

revokeAccessAsync

public Completable revokeAccessAsync()

Revokes access granted to the disk asynchronously.

Returns:

a representation of the deferred computation of this call

revokeAccessAsync

public ServiceFuture revokeAccessAsync(ServiceCallback callback)

Revokes access granted to the disk asynchronously.

Parameters:

callback - the callback to call on success or failure

Returns:

a handle to cancel the request

sizeInGB

public int sizeInGB()

Returns:

disk size in GB

sku

public DiskSkuTypes sku()

Returns:

the disk SKU

source

public CreationSource source()

Returns:

the details of the source from which the disk is created

virtualMachineId

public 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