Snapshot Interface

public interface Snapshot extends GroupableResource<ComputeManager, SnapshotInner>,Refreshable,Updatable<Snapshot.Update>

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

Method Summary

Modifier and Type Method and Description
DiskCreateOption creationMethod()
String grantAccess(int accessDurationInSeconds)

Grants access to the snapshot.

Observable<String> grantAccessAsync(int accessDurationInSeconds)

Grants access to the snapshot asynchronously.

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

Grants access to the snapshot asynchronously.

OperatingSystemTypes osType()
void revokeAccess()

Revoke access granted to the snapshot.

Completable revokeAccessAsync()

Revoke access granted to the snapshot asynchronously.

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

Revoke access granted to the snapshot asynchronously.

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

Inherited Members

Method Details

creationMethod

public DiskCreateOption creationMethod()

Returns:

the snapshot creation method

grantAccess

public String grantAccess(int accessDurationInSeconds)

Grants access to the snapshot.

Parameters:

accessDurationInSeconds - the access duration in seconds

Returns:

the read-only SAS URI to the snapshot

grantAccessAsync

public Observable grantAccessAsync(int accessDurationInSeconds)

Grants access to the snapshot 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 snapshot asynchronously.

Parameters:

accessDurationInSeconds - the access duration in seconds
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

osType

public OperatingSystemTypes osType()

Returns:

the type of operating system in the snapshot

revokeAccess

public void revokeAccess()

Revoke access granted to the snapshot.

revokeAccessAsync

public Completable revokeAccessAsync()

Revoke access granted to the snapshot asynchronously.

Returns:

a representation of the deferred computation of this call

revokeAccessAsync

public ServiceFuture revokeAccessAsync(ServiceCallback callback)

Revoke access granted to the snapshot 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 snapshot SKU type

source

public CreationSource source()

Returns:

the details of the source from which snapshot is created

Applies to