<PackageReference Include="Azure.Core" Version="1.42.0" />

Operation

public abstract class Operation
Represents a long-running operation.
public abstract bool HasCompleted { get; }

Returns true if the long-running operation completed.

public abstract string Id { get; }

Gets an ID representing the operation that can be used to poll for the status of the long-running operation. There are cases that operation id is not available, we return "NOT_SET" for unavailable operation id.

protected Operation()

public static Operation<T> Rehydrate<T>(HttpPipeline pipeline, RehydrationToken rehydrationToken, ClientOptions options = null) where T : IPersistableModel<T>

Rehydrates an operation from a RehydrationToken.

public static Operation Rehydrate(HttpPipeline pipeline, RehydrationToken rehydrationToken, ClientOptions options = null)

Rehydrates an operation from a RehydrationToken.

public static Task<Operation<T>> RehydrateAsync<T>(HttpPipeline pipeline, RehydrationToken rehydrationToken, ClientOptions options = null) where T : IPersistableModel<T>

Rehydrates an operation from a RehydrationToken.

public static Task<Operation> RehydrateAsync(HttpPipeline pipeline, RehydrationToken rehydrationToken, ClientOptions options = null)

Rehydrates an operation from a RehydrationToken.

public abstract Response GetRawResponse()

The last HTTP response received from the server.

Get a token that can be used to rehydrate the operation.

public abstract Response UpdateStatus(CancellationToken cancellationToken = default)

Calls the server to get updated status of the long-running operation.

public abstract ValueTask<Response> UpdateStatusAsync(CancellationToken cancellationToken = default)

Calls the server to get updated status of the long-running operation.

public virtual Response WaitForCompletionResponse(CancellationToken cancellationToken = default)

Periodically calls the server till the long-running operation completes.

public virtual Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default)

Periodically calls the server till the long-running operation completes.

public virtual Response WaitForCompletionResponse(DelayStrategy delayStrategy, CancellationToken cancellationToken = default)

Periodically calls the server till the long-running operation completes.

public virtual ValueTask<Response> WaitForCompletionResponseAsync(CancellationToken cancellationToken = default)

Periodically calls the server till the long-running operation completes.

public virtual ValueTask<Response> WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default)

Periodically calls the server till the long-running operation completes.

public virtual ValueTask<Response> WaitForCompletionResponseAsync(DelayStrategy delayStrategy, CancellationToken cancellationToken = default)

Periodically calls the server till the long-running operation completes.