Compartir a través de


Snapshots Interface

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

Entry point to managed snapshot management API in Azure.

Method Summary

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

Grants access to a snapshot.

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

Grants access to the snapshot asynchronously.

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

Grants access to the snapshot asynchronously.

void revokeAccess(String resourceGroupName, String snapName)

Revoke access granted to a snapshot.

Completable revokeAccessAsync(String resourceGroupName, String snapName)

Revoke access granted to the snapshot asynchronously.

ServiceFuture<Void> revokeAccessAsync(String resourceGroupName, String snapName, 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 snapshotName, AccessLevel accessLevel, int accessDuration)

Grants access to a snapshot.

Parameters:

resourceGroupName - the resource group name
snapshotName - the snapshot name
accessLevel - access level
accessDuration - access duration

Returns:

the read-only SAS URI to the snapshot

grantAccessAsync

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

Grants access to the snapshot asynchronously.

Parameters:

resourceGroupName - the resource group name
snapshotName - the snapshot 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 snapshot

grantAccessAsync

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

Grants access to the snapshot asynchronously.

Parameters:

resourceGroupName - the resource group name
snapshotName - the snapshot 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 snapshot in callback

Returns:

a handle to cancel the request

revokeAccess

public void revokeAccess(String resourceGroupName, String snapName)

Revoke access granted to a snapshot.

Parameters:

resourceGroupName - the resource group name
snapName - the snapshot name

revokeAccessAsync

public Completable revokeAccessAsync(String resourceGroupName, String snapName)

Revoke access granted to the snapshot asynchronously.

Parameters:

resourceGroupName - the resource group name
snapName - the snapshot name

Returns:

a representation of the deferred computation of this call

revokeAccessAsync

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

Revoke access granted to the snapshot asynchronously.

Parameters:

resourceGroupName - the resource group name
snapName - the snapshot name
callback - the callback to call on success or failure

Returns:

a handle to cancel the request

Applies to