共用方式為


Snapshot Interface

Implements

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

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

Method Summary

Modifier and Type Method and Description
abstract void awaitCopyStartCompletion()

Await CopyStart completion indefinitely unless errors are encountered.

abstract Boolean awaitCopyStartCompletion(Duration maxWaitTime)

Await CopyStart completion for a specified timeout.

abstract Mono<Void> awaitCopyStartCompletionAsync()

Await CopyStart completion in async manner.

abstract CopyCompletionError copyCompletionError()

Gets the error details if the background copy of a resource created via the CopyStart operation fails.

abstract Float copyCompletionPercent()

Gets the percentage complete for the background copy when a resource is created via the CopyStart operation.

abstract DiskCreateOption creationMethod()

Gets the snapshot creation method.

abstract String grantAccess(int accessDurationInSeconds)

Grants access to the snapshot.

abstract Mono<String> grantAccessAsync(int accessDurationInSeconds)

Grants access to the snapshot asynchronously.

abstract boolean incremental()

Checks whether a snapshot id incremental.

abstract OperatingSystemTypes osType()

Gets the type of operating system in the snapshot.

abstract PublicNetworkAccess publicNetworkAccess()

Checks whether the snapshot can be accessed from public network.

abstract void revokeAccess()

Revoke access granted to the snapshot.

abstract Mono<Void> revokeAccessAsync()

Revoke access granted to the snapshot asynchronously.

abstract int sizeInGB()

Gets disk size in GB.

abstract SnapshotSkuType skuType()

Gets the snapshot SKU type.

abstract CreationSource source()

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

Method Details

awaitCopyStartCompletion

public abstract void awaitCopyStartCompletion()

Await CopyStart completion indefinitely unless errors are encountered.

awaitCopyStartCompletion

public abstract Boolean awaitCopyStartCompletion(Duration maxWaitTime)

Await CopyStart completion for a specified timeout.

Parameters:

maxWaitTime - max timeout to wait for completion

Returns:

true if CopyStart complete successfully, false if timeout

awaitCopyStartCompletionAsync

public abstract Mono awaitCopyStartCompletionAsync()

Await CopyStart completion in async manner.

Returns:

a representation of the deferred computation of this call

copyCompletionError

public abstract CopyCompletionError copyCompletionError()

Gets the error details if the background copy of a resource created via the CopyStart operation fails.

For latest progress,Snapshot#refresh() or Snapshot#refreshAsync() should be called prior to this method.

Returns:

the error details

copyCompletionPercent

public abstract Float copyCompletionPercent()

Gets the percentage complete for the background copy when a resource is created via the CopyStart operation.

For latest progress,Snapshot#refresh() or Snapshot#refreshAsync() should be called prior to this method.

Returns:

the percentage complete, ranging from 0 to 100, or null if creationMethod() is not COPY_START

creationMethod

public abstract DiskCreateOption creationMethod()

Gets the snapshot creation method.

Returns:

the snapshot creation method

grantAccess

public abstract 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 abstract Mono 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

incremental

public abstract boolean incremental()

Checks whether a snapshot id incremental.

Returns:

whether a snapshot is incremental

osType

public abstract OperatingSystemTypes osType()

Gets the type of operating system in the snapshot.

Returns:

the type of operating system in the snapshot

publicNetworkAccess

public abstract PublicNetworkAccess publicNetworkAccess()

Checks whether the snapshot can be accessed from public network.

Returns:

whether the snapshot can be accessed from public network.

revokeAccess

public abstract void revokeAccess()

Revoke access granted to the snapshot.

revokeAccessAsync

public abstract Mono revokeAccessAsync()

Revoke access granted to the snapshot asynchronously.

Returns:

a representation of the deferred computation of this call

sizeInGB

public abstract int sizeInGB()

Gets disk size in GB.

Returns:

disk size in GB

skuType

public abstract SnapshotSkuType skuType()

Gets the snapshot SKU type.

Returns:

the snapshot SKU type.

source

public abstract CreationSource source()

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

Returns:

the details of the source from which snapshot is created

Applies to