Disks Interface

public interface Disks extends SupportsCreating<Disk.DefinitionStages.Blank>,SupportsListing,SupportsListingByResourceGroup,SupportsGettingByResourceGroup,SupportsGettingById,SupportsDeletingById,SupportsDeletingByResourceGroup,SupportsBatchCreation,SupportsBatchDeletion,HasManager,HasInner

Entry point to managed disk management API in Azure.

Method Summary

Modifier and Type Method and Description
String grantAccess(String resourceGroupName, String diskName, AccessLevel accessLevel, int accessDuration)

Grants access to a disk.

Observable<String> grantAccessAsync(String resourceGroupName, String diskName, AccessLevel accessLevel, int accessDuration)

Grants access to the disk asynchronously.

ServiceFuture<String> grantAccessAsync(String resourceGroupName, String diskName, AccessLevel accessLevel, int accessDuration, ServiceCallback<String> callback)

Grants access to the disk asynchronously.

void revokeAccess(String resourceGroupName, String diskName)

Revoke access granted to a disk.

Completable revokeAccessAsync(String resourceGroupName, String diskName)

Revoke access granted to the snapshot asynchronously.

ServiceFuture<Void> revokeAccessAsync(String resourceGroupName, String diskName, ServiceCallback<Void> callback)

Revoke access granted to the snapshot asynchronously.

Inherited Members

SupportsBatchCreation<ResourceT>.create(Creatable<ResourceT>... creatables) SupportsBatchCreation<ResourceT>.create(List<Creatable<ResourceT>> creatables) SupportsBatchCreation<ResourceT>.createAsync(Creatable<ResourceT>... creatables) SupportsBatchCreation<ResourceT>.createAsync(List<Creatable<ResourceT>> creatables) SupportsBatchCreation<ResourceT>.createAsync(ServiceCallback<CreatedResources<ResourceT>> callback, Creatable<ResourceT>... creatables) SupportsBatchCreation<ResourceT>.createAsync(final ServiceCallback<CreatedResources<ResourceT>> callback, List<Creatable<ResourceT>> creatables) SupportsCreating<T>.define(String name) SupportsDeletingById.deleteById(String id) SupportsDeletingById.deleteByIdAsync(String id, ServiceCallback<Void> callback) SupportsDeletingById.deleteByIdAsync(String id) SupportsBatchDeletion.deleteByIds(Collection<String> ids) SupportsBatchDeletion.deleteByIds(String...ids) SupportsBatchDeletion.deleteByIdsAsync(Collection<String> ids) SupportsBatchDeletion.deleteByIdsAsync(String...ids) SupportsDeletingByResourceGroup.deleteByResourceGroup(String resourceGroupName, String name) SupportsDeletingByResourceGroup.deleteByResourceGroupAsync(String resourceGroupName, String name, ServiceCallback<Void> callback) SupportsDeletingByResourceGroup.deleteByResourceGroupAsync(String resourceGroupName, String name) SupportsGettingById<T>.getById(String id) SupportsGettingById<T>.getByIdAsync(String id) SupportsGettingById<T>.getByIdAsync(String id, ServiceCallback<T> callback) SupportsGettingByResourceGroup<T>.getByResourceGroup(String resourceGroupName, String name) SupportsGettingByResourceGroup<T>.getByResourceGroupAsync(String resourceGroupName, String name) SupportsGettingByResourceGroup<T>.getByResourceGroupAsync(String resourceGroupName, String name, ServiceCallback<T> callback) HasInner<T>.inner() SupportsListing<T>.list() SupportsListing<T>.listAsync() SupportsListingByResourceGroup<T>.listByResourceGroup(String resourceGroupName) SupportsListingByResourceGroup<T>.listByResourceGroupAsync(String resourceGroupName) HasManager<ManagerT>.manager()

Method Details

grantAccess

public String grantAccess(String resourceGroupName, String diskName, AccessLevel accessLevel, int accessDuration)

Grants access to a disk.

Parameters:

resourceGroupName - a resource group name
diskName - a disk name
accessLevel - access level
accessDuration - access duration

Returns:

the read-only SAS URI to the disk

grantAccessAsync

public Observable grantAccessAsync(String resourceGroupName, String diskName, AccessLevel accessLevel, int accessDuration)

Grants access to the disk asynchronously.

Parameters:

resourceGroupName - the resource group name
diskName - the disk name
accessLevel - access level
accessDuration - access duration

Returns:

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

grantAccessAsync

public ServiceFuture grantAccessAsync(String resourceGroupName, String diskName, AccessLevel accessLevel, int accessDuration, ServiceCallback callback)

Grants access to the disk asynchronously.

Parameters:

resourceGroupName - the resource group name
diskName - the disk name
accessLevel - access level
accessDuration - access duration
callback - the callback to call on success or failure, on success it will pass read-only SAS URI to the disk in callback

Returns:

a handle to cancel the request

revokeAccess

public void revokeAccess(String resourceGroupName, String diskName)

Revoke access granted to a disk.

Parameters:

resourceGroupName - the resource group name
diskName - the disk name

revokeAccessAsync

public Completable revokeAccessAsync(String resourceGroupName, String diskName)

Revoke access granted to the snapshot asynchronously.

Parameters:

resourceGroupName - the resource group name
diskName - the disk name

Returns:

a representation of the deferred computation of this call

revokeAccessAsync

public ServiceFuture revokeAccessAsync(String resourceGroupName, String diskName, ServiceCallback callback)

Revoke access granted to the snapshot asynchronously.

Parameters:

resourceGroupName - the resource group name
diskName - the disk name
callback - the callback to call on success or failure

Returns:

a handle to cancel the request

Applies to