Share via


JobRouterClient.GetWorkerAsync Method

Definition

Overloads

GetWorkerAsync(String, CancellationToken)

Retrieves an existing worker by Id.

GetWorkerAsync(String, RequestContext)

[Protocol Method] Retrieves an existing worker by Id.

GetWorkerAsync(String, CancellationToken)

Source:
JobRouterClient.cs
Source:
JobRouterClient.cs

Retrieves an existing worker by Id.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.RouterWorker>> GetWorkerAsync (string workerId, System.Threading.CancellationToken cancellationToken = default);
abstract member GetWorkerAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.RouterWorker>>
override this.GetWorkerAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.RouterWorker>>
Public Overridable Function GetWorkerAsync (workerId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of RouterWorker))

Parameters

workerId
String

Id of a worker.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

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

workerId is null.

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

Applies to

GetWorkerAsync(String, RequestContext)

Source:
JobRouterClient.cs
Source:
JobRouterClient.cs

[Protocol Method] Retrieves an existing worker by Id.

public virtual System.Threading.Tasks.Task<Azure.Response> GetWorkerAsync (string workerId, Azure.RequestContext context);
abstract member GetWorkerAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetWorkerAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetWorkerAsync (workerId As String, context As RequestContext) As Task(Of Response)

Parameters

workerId
String

Id of a worker.

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

workerId is null.

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

Service returned a non-success status code.

Applies to