Share via


JobRouterClient.CancelJob Method

Definition

Overloads

CancelJob(CancelJobOptions, CancellationToken)

Submits request to cancel an existing job by Id while supplying free-form cancellation reason.

CancelJob(String, RequestContent, RequestContext)

[Protocol Method] Submits request to cancel an existing job by Id while supplying free-form cancellation reason.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
  • Please try the simpler Azure.Communication.JobRouter.JobRouterClient.CancelJob(System.String,Azure.Communication.JobRouter.CancelJobOptions,System.Threading.CancellationToken) convenience overload with strongly typed models first.

CancelJob(CancelJobOptions, CancellationToken)

Source:
JobRouterClient.cs
Source:
JobRouterClient.cs

Submits request to cancel an existing job by Id while supplying free-form cancellation reason.

public virtual Azure.Response CancelJob (Azure.Communication.JobRouter.CancelJobOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member CancelJob : Azure.Communication.JobRouter.CancelJobOptions * System.Threading.CancellationToken -> Azure.Response
override this.CancelJob : Azure.Communication.JobRouter.CancelJobOptions * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function CancelJob (options As CancelJobOptions, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

options
CancelJobOptions

Options for cancelling job.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

The server returned an error. See Message for details returned from the server.

options is null.

Applies to

CancelJob(String, RequestContent, RequestContext)

Source:
JobRouterClient.cs
Source:
JobRouterClient.cs

[Protocol Method] Submits request to cancel an existing job by Id while supplying free-form cancellation reason.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
  • Please try the simpler Azure.Communication.JobRouter.JobRouterClient.CancelJob(System.String,Azure.Communication.JobRouter.CancelJobOptions,System.Threading.CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Response CancelJob (string jobId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member CancelJob : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
override this.CancelJob : string * Azure.Core.RequestContent * Azure.RequestContext -> Azure.Response
Public Overridable Function CancelJob (jobId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Response

Parameters

jobId
String

Id of a job.

content
RequestContent

The content to send as the body of the request.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

jobId is null.

jobId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Applies to