Skip to content

IDurableHttpClient.CancelOperationAsync(Uri, string?)

CancelOperationAsync(Uri, string?)

abstract
public abstract DurableTask<DurableOperation> CancelOperationAsync(Uri operationLocation, string? reason = null)
Requests cancellation of an operation with POST {status monitor}:cancel, as a step of the calling task.

Parameters

operationLocationUri
The URL of the operation's status monitor.
reasonstring?
The reason which the operation's task reads, or null for none.

Returns

A durable task which returns the operation's status: running while its cancellation proceeds, or terminal.

Exceptions

System.Net.Http.HttpRequestException
The response doesn't have a success status code.