Delen via


JobRouterClient.GetWorkers Method

Definition

Overloads

GetWorkers(String, String, String, Nullable<Boolean>, RequestContext)

[Protocol Method] Retrieves existing workers.

  • 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.GetWorkers(System.Nullable{System.Int32},System.Nullable{Azure.Communication.JobRouter.RouterWorkerStateSelector},System.String,System.String,System.Nullable{System.Boolean},System.Threading.CancellationToken) convenience overload with strongly typed models first.
GetWorkers(Nullable<RouterWorkerStateSelector>, String, String, Nullable<Boolean>, CancellationToken)

Retrieves existing workers.

GetWorkers(String, String, String, Nullable<Boolean>, RequestContext)

Source:
JobRouterClient.cs
Source:
JobRouterClient.cs

[Protocol Method] Retrieves existing workers.

  • 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.GetWorkers(System.Nullable{System.Int32},System.Nullable{Azure.Communication.JobRouter.RouterWorkerStateSelector},System.String,System.String,System.Nullable{System.Boolean},System.Threading.CancellationToken) convenience overload with strongly typed models first.
public virtual Azure.Pageable<BinaryData> GetWorkers (string state, string channelId, string queueId, bool? hasCapacity, Azure.RequestContext context);
abstract member GetWorkers : string * string * string * Nullable<bool> * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetWorkers : string * string * string * Nullable<bool> * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetWorkers (state As String, channelId As String, queueId As String, hasCapacity As Nullable(Of Boolean), context As RequestContext) As Pageable(Of BinaryData)

Parameters

state
String

If specified, select workers by worker state. Allowed values: "active" | "draining" | "inactive" | "all".

channelId
String

If specified, select workers who have a channel configuration with this channel.

queueId
String

If specified, select workers who are assigned to this queue.

hasCapacity
Nullable<Boolean>

If set to true, select only workers who have capacity for the channel specified by channelId or for any channel if channelId not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false.

context
RequestContext

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

Returns

The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.

Exceptions

Service returned a non-success status code.

Applies to

GetWorkers(Nullable<RouterWorkerStateSelector>, String, String, Nullable<Boolean>, CancellationToken)

Source:
JobRouterClient.cs
Source:
JobRouterClient.cs

Retrieves existing workers.

public virtual Azure.Pageable<Azure.Communication.JobRouter.RouterWorker> GetWorkers (Azure.Communication.JobRouter.RouterWorkerStateSelector? state = default, string channelId = default, string queueId = default, bool? hasCapacity = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetWorkers : Nullable<Azure.Communication.JobRouter.RouterWorkerStateSelector> * string * string * Nullable<bool> * System.Threading.CancellationToken -> Azure.Pageable<Azure.Communication.JobRouter.RouterWorker>
override this.GetWorkers : Nullable<Azure.Communication.JobRouter.RouterWorkerStateSelector> * string * string * Nullable<bool> * System.Threading.CancellationToken -> Azure.Pageable<Azure.Communication.JobRouter.RouterWorker>
Public Overridable Function GetWorkers (Optional state As Nullable(Of RouterWorkerStateSelector) = Nothing, Optional channelId As String = Nothing, Optional queueId As String = Nothing, Optional hasCapacity As Nullable(Of Boolean) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of RouterWorker)

Parameters

state
Nullable<RouterWorkerStateSelector>

If specified, select workers by worker state.

channelId
String

If specified, select workers who have a channel configuration with this channel.

queueId
String

If specified, select workers who are assigned to this queue.

hasCapacity
Nullable<Boolean>

If set to true, select only workers who have capacity for the channel specified by channelId or for any channel if channelId not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to