# `Twilio.Taskrouter.V1.Workspace.TaskQueueService`
[🔗](https://github.com/jeffhuen/twilio_elixir/blob/main/lib/twilio/taskrouter/v1/workspace/task_queue_service.ex#L2)

Service for TaskQueue API operations.

Operations: `list`, `create`, `fetch`, `update`, `delete`

# `create`

```elixir
@spec create(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Taskrouter.V1.Workspace.TaskQueue.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `CreateTaskQueue` | Tags: TaskrouterV1TaskQueue

## Required Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. |
## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `AssignmentActivitySid` | string | The SID of the Activity to assign Workers when a task is assigned to them. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `MaxReservedWorkers` | integer | The maximum number of Workers to reserve for the assignment of a Task in the queue. Can be an integer between 1 and 50, inclusive and defaults to 1. |
| `ReservationActivitySid` | string | The SID of the Activity to assign Workers when a task is reserved for them. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `TargetWorkers` | string | A string that describes the Worker selection criteria for any Tasks that enter the TaskQueue. For example, `'"language" == "spanish"'`. The default value is `1==1`. If this value is empty, Tasks will wait in the TaskQueue until they are deleted or moved to another TaskQueue. For more information about Worker selection, see [Describing Worker selection criteria](https://www.twilio.com/docs/taskrouter/api/taskqueues#target-workers). |
| `TaskOrder` | string |  Values: `FIFO`, `LIFO` |

# `delete`

```elixir
@spec delete(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:ok, map(), map()} | :ok | {:error, Twilio.Error.t()}
```

Operation: `DeleteTaskQueue` | Tags: TaskrouterV1TaskQueue

# `fetch`

```elixir
@spec fetch(Twilio.Client.t(), String.t(), String.t(), keyword()) ::
  {:ok, Twilio.Resources.Taskrouter.V1.Workspace.TaskQueue.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `FetchTaskQueue` | Tags: TaskrouterV1TaskQueue

# `list`

```elixir
@spec list(Twilio.Client.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Page.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `ListTaskQueue` | Tags: TaskrouterV1TaskQueue

## Query Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `FriendlyName` | string | The `friendly_name` of the TaskQueue resources to read. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `EvaluateWorkerAttributes` | string | The attributes of the Workers to read. Returns the TaskQueues with Workers that match the attributes specified in this parameter. |
| `WorkerSid` | string | The SID of the Worker with the TaskQueue resources to read. |
| `Ordering` | string | Sorting parameter for TaskQueues |

# `stream`

```elixir
@spec stream(Twilio.Client.t(), String.t(), map(), keyword()) :: Enumerable.t()
```

Stream:  (lazy auto-pagination).

# `update`

```elixir
@spec update(Twilio.Client.t(), String.t(), String.t(), map(), keyword()) ::
  {:ok, Twilio.Resources.Taskrouter.V1.Workspace.TaskQueue.t()}
  | {:ok, map(), map()}
  | :ok
  | {:error, Twilio.Error.t()}
```

Operation: `UpdateTaskQueue` | Tags: TaskrouterV1TaskQueue

## Optional Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `AssignmentActivitySid` | string | The SID of the Activity to assign Workers when a task is assigned for them. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `FriendlyName` | string | A descriptive string that you create to describe the TaskQueue. For example `Support-Tier 1`, `Sales`, or `Escalation`. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `MaxReservedWorkers` | integer | The maximum number of Workers to create reservations for the assignment of a task while in the queue. Maximum of 50. |
| `ReservationActivitySid` | string | The SID of the Activity to assign Workers when a task is reserved for them. |
# credo:disable-for-next-line Credo.Check.Readability.MaxLineLength
| `TargetWorkers` | string | A string describing the Worker selection criteria for any Tasks that enter the TaskQueue. For example '"language" == "spanish"' If no TargetWorkers parameter is provided, Tasks will wait in the queue until they are either deleted or moved to another queue. Additional examples on how to describing Worker selection criteria below. |
| `TaskOrder` | string |  Values: `FIFO`, `LIFO` |

---

*Consult [api-reference.md](api-reference.md) for complete listing*
