Compartilhar via


GrpcDurableTaskClient.SuspendInstanceAsync Method

Definition

Suspends an orchestration instance, halting processing of it until ResumeInstanceAsync(String, String, CancellationToken) is used to resume the orchestration.

public override System.Threading.Tasks.Task SuspendInstanceAsync (string instanceId, string? reason = default, System.Threading.CancellationToken cancellation = default);
override this.SuspendInstanceAsync : string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overrides Function SuspendInstanceAsync (instanceId As String, Optional reason As String = Nothing, Optional cancellation As CancellationToken = Nothing) As Task

Parameters

instanceId
String

The instance ID of the orchestration to suspend.

reason
String

The optional suspension reason.

cancellation
CancellationToken

A CancellationToken that can be used to cancel the suspend operation. Note, cancelling this token does not resume the orchestration if suspend was successful.

Returns

A task that completes when the suspend has been committed to the backend.

Applies to