DurableTaskClient.GetInstancesAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetInstancesAsync(String, CancellationToken) |
Fetches orchestration instance metadata from the configured durable store. |
GetInstancesAsync(String, Boolean, CancellationToken) |
Fetches orchestration instance metadata from the configured durable store. |
GetInstancesAsync(String, CancellationToken)
Fetches orchestration instance metadata from the configured durable store.
public virtual System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata?> GetInstancesAsync (string instanceId, System.Threading.CancellationToken cancellation);
abstract member GetInstancesAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata>
override this.GetInstancesAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata>
Public Overridable Function GetInstancesAsync (instanceId As String, cancellation As CancellationToken) As Task(Of OrchestrationMetadata)
Parameters
- instanceId
- String
- cancellation
- CancellationToken
Returns
Applies to
GetInstancesAsync(String, Boolean, CancellationToken)
Fetches orchestration instance metadata from the configured durable store.
public abstract System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata?> GetInstancesAsync (string instanceId, bool getInputsAndOutputs = false, System.Threading.CancellationToken cancellation = default);
abstract member GetInstancesAsync : string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.DurableTask.Client.OrchestrationMetadata>
Public MustOverride Function GetInstancesAsync (instanceId As String, Optional getInputsAndOutputs As Boolean = false, Optional cancellation As CancellationToken = Nothing) As Task(Of OrchestrationMetadata)
Parameters
- instanceId
- String
The unique ID of the orchestration instance to wait for.
- getInputsAndOutputs
- Boolean
Specify true
to fetch the orchestration instance's inputs, outputs, and custom status, or false
to
omit them. The default value is false
to minimize the network bandwidth, serialization, and memory costs
associated with fetching the instance metadata.
- cancellation
- CancellationToken
A CancellationToken that can be used to cancel the wait operation.
Returns
Returns a OrchestrationMetadata record that describes the orchestration instance and its execution
status or null
if no instance with ID instanceId
is found.
Remarks
You can use the getInputsAndOutputs
parameter to determine whether to fetch input and output data for the target orchestration instance. If your code doesn't require access to this data, it's recommended that you set this parameter to false
to minimize the network bandwidth, serialization, and memory costs associated with fetching the instance metadata.