# Google Cloud Tasks v2 API - Class CloudTasks.CloudTasksClient (3.6.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.6.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [3.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.5.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [3.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.4.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [3.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.3.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.2.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [3.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.1.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [3.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/3.0.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [2.5.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.5.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [2.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.4.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [2.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.3.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)
- [2.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/2.2.0/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient)

    public class CloudTasks.CloudTasksClient : ClientBase<CloudTasks.CloudTasksClient>

Reference documentation and code samples for the Google Cloud Tasks v2 API class CloudTasks.CloudTasksClient.

Client for CloudTasks

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html) \> [ClientBase](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html)[CloudTasks](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CloudTasks)[CloudTasksClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient) \> CloudTasks.CloudTasksClient

## Inherited Members

[ClientBase\<CloudTasks.CloudTasksClient\>.WithHost(string)](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.html#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.html#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Tasks.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2)

## Assembly

Google.Cloud.Tasks.V2.dll

## Constructors

### CloudTasksClient()

    protected CloudTasksClient()

Protected parameterless constructor to allow creation of test doubles.

### CloudTasksClient(CallInvoker)

    public CloudTasksClient(CallInvoker callInvoker)

Creates a new client for CloudTasks that uses a custom `CallInvoker`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callInvoker` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallInvoker.html` The callInvoker to use to make remote calls. |

### CloudTasksClient(ChannelBase)

    public CloudTasksClient(ChannelBase channel)

Creates a new client for CloudTasks

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `channel` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ChannelBase.html` The channel to use to make remote calls. |

### CloudTasksClient(ClientBaseConfiguration)

    protected CloudTasksClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` The client configuration. |

## Methods

### CreateLocationsClient()

    public virtual Locations.LocationsClient CreateLocationsClient()

Creates a new instance of [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) using the same call invoker as
this client.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html` | A new [Locations.LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.Locations.LocationsClient.html) for the same target as this client. |

### CreateQueue(CreateQueueRequest, CallOptions)

    public virtual Queue CreateQueue(CreateQueueRequest request, CallOptions options)

Creates a queue.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### CreateQueue(CreateQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Queue CreateQueue(CreateQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a queue.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### CreateQueueAsync(CreateQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Queue> CreateQueueAsync(CreateQueueRequest request, CallOptions options)

Creates a queue.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### CreateQueueAsync(CreateQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Queue> CreateQueueAsync(CreateQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a queue.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### CreateTask(CreateTaskRequest, CallOptions)

    public virtual Task CreateTask(CreateTaskRequest request, CallOptions options)

Creates a task and adds it to a queue.

Tasks cannot be updated after creation; there is no UpdateTask command.

- The maximum task size is 100KB.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The response received from the server. |

### CreateTask(CreateTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual Task CreateTask(CreateTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a task and adds it to a queue.

Tasks cannot be updated after creation; there is no UpdateTask command.

- The maximum task size is 100KB.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The response received from the server. |

### CreateTaskAsync(CreateTaskRequest, CallOptions)

    public virtual AsyncUnaryCall<Task> CreateTaskAsync(CreateTaskRequest request, CallOptions options)

Creates a task and adds it to a queue.

Tasks cannot be updated after creation; there is no UpdateTask command.

- The maximum task size is 100KB.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The call object. |

### CreateTaskAsync(CreateTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Task> CreateTaskAsync(CreateTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Creates a task and adds it to a queue.

Tasks cannot be updated after creation; there is no UpdateTask command.

- The maximum task size is 100KB.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CreateTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The call object. |

### DeleteQueue(DeleteQueueRequest, CallOptions)

    public virtual Empty DeleteQueue(DeleteQueueRequest request, CallOptions options)

Deletes a queue.

This command will delete the queue even if it has tasks in it.

Note: If you delete a queue, a queue with the same name can't be created
for 7 days.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response received from the server. |

### DeleteQueue(DeleteQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Empty DeleteQueue(DeleteQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a queue.

This command will delete the queue even if it has tasks in it.

Note: If you delete a queue, a queue with the same name can't be created
for 7 days.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response received from the server. |

### DeleteQueueAsync(DeleteQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Empty> DeleteQueueAsync(DeleteQueueRequest request, CallOptions options)

Deletes a queue.

This command will delete the queue even if it has tasks in it.

Note: If you delete a queue, a queue with the same name can't be created
for 7 days.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The call object. |

### DeleteQueueAsync(DeleteQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Empty> DeleteQueueAsync(DeleteQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a queue.

This command will delete the queue even if it has tasks in it.

Note: If you delete a queue, a queue with the same name can't be created
for 7 days.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The call object. |

### DeleteTask(DeleteTaskRequest, CallOptions)

    public virtual Empty DeleteTask(DeleteTaskRequest request, CallOptions options)

Deletes a task.

A task can be deleted if it is scheduled or dispatched. A task
cannot be deleted if it has executed successfully or permanently
failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response received from the server. |

### DeleteTask(DeleteTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual Empty DeleteTask(DeleteTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a task.

A task can be deleted if it is scheduled or dispatched. A task
cannot be deleted if it has executed successfully or permanently
failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response received from the server. |

### DeleteTaskAsync(DeleteTaskRequest, CallOptions)

    public virtual AsyncUnaryCall<Empty> DeleteTaskAsync(DeleteTaskRequest request, CallOptions options)

Deletes a task.

A task can be deleted if it is scheduled or dispatched. A task
cannot be deleted if it has executed successfully or permanently
failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The call object. |

### DeleteTaskAsync(DeleteTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Empty> DeleteTaskAsync(DeleteTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Deletes a task.

A task can be deleted if it is scheduled or dispatched. A task
cannot be deleted if it has executed successfully or permanently
failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.DeleteTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The call object. |

### GetIamPolicy(GetIamPolicyRequest, CallOptions)

    public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallOptions options)

Gets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Returns an empty policy if the resource exists and does not have a policy
set.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.getIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The response received from the server. |

### GetIamPolicy(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

    public virtual Policy GetIamPolicy(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Returns an empty policy if the resource exists and does not have a policy
set.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.getIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The response received from the server. |

### GetIamPolicyAsync(GetIamPolicyRequest, CallOptions)

    public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallOptions options)

Gets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Returns an empty policy if the resource exists and does not have a policy
set.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.getIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The call object. |

### GetIamPolicyAsync(GetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Returns an empty policy if the resource exists and does not have a policy
set.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.getIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The call object. |

### GetQueue(GetQueueRequest, CallOptions)

    public virtual Queue GetQueue(GetQueueRequest request, CallOptions options)

Gets a queue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### GetQueue(GetQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Queue GetQueue(GetQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a queue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### GetQueueAsync(GetQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Queue> GetQueueAsync(GetQueueRequest request, CallOptions options)

Gets a queue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### GetQueueAsync(GetQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Queue> GetQueueAsync(GetQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a queue.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### GetTask(GetTaskRequest, CallOptions)

    public virtual Task GetTask(GetTaskRequest request, CallOptions options)

Gets a task.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The response received from the server. |

### GetTask(GetTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual Task GetTask(GetTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a task.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The response received from the server. |

### GetTaskAsync(GetTaskRequest, CallOptions)

    public virtual AsyncUnaryCall<Task> GetTaskAsync(GetTaskRequest request, CallOptions options)

Gets a task.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The call object. |

### GetTaskAsync(GetTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Task> GetTaskAsync(GetTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Gets a task.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.GetTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The call object. |

### ListQueues(ListQueuesRequest, CallOptions)

    public virtual ListQueuesResponse ListQueues(ListQueuesRequest request, CallOptions options)

Lists queues.

Queues are returned in lexicographical order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesResponse` | The response received from the server. |

### ListQueues(ListQueuesRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListQueuesResponse ListQueues(ListQueuesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists queues.

Queues are returned in lexicographical order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesResponse` | The response received from the server. |

### ListQueuesAsync(ListQueuesRequest, CallOptions)

    public virtual AsyncUnaryCall<ListQueuesResponse> ListQueuesAsync(ListQueuesRequest request, CallOptions options)

Lists queues.

Queues are returned in lexicographical order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesResponse` | The call object. |

### ListQueuesAsync(ListQueuesRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListQueuesResponse> ListQueuesAsync(ListQueuesRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists queues.

Queues are returned in lexicographical order.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListQueuesResponse` | The call object. |

### ListTasks(ListTasksRequest, CallOptions)

    public virtual ListTasksResponse ListTasks(ListTasksRequest request, CallOptions options)

Lists the tasks in a queue.

By default, only the \[BASIC\]\[google.cloud.tasks.v2.Task.View.BASIC\] view is
retrieved due to performance considerations;
\[response_view\]\[google.cloud.tasks.v2.ListTasksRequest.response_view\]
controls the subset of information which is returned.

The tasks may be returned in any order. The ordering may change at any
time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksResponse` | The response received from the server. |

### ListTasks(ListTasksRequest, Metadata, DateTime?, CancellationToken)

    public virtual ListTasksResponse ListTasks(ListTasksRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the tasks in a queue.

By default, only the \[BASIC\]\[google.cloud.tasks.v2.Task.View.BASIC\] view is
retrieved due to performance considerations;
\[response_view\]\[google.cloud.tasks.v2.ListTasksRequest.response_view\]
controls the subset of information which is returned.

The tasks may be returned in any order. The ordering may change at any
time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksResponse` | The response received from the server. |

### ListTasksAsync(ListTasksRequest, CallOptions)

    public virtual AsyncUnaryCall<ListTasksResponse> ListTasksAsync(ListTasksRequest request, CallOptions options)

Lists the tasks in a queue.

By default, only the \[BASIC\]\[google.cloud.tasks.v2.Task.View.BASIC\] view is
retrieved due to performance considerations;
\[response_view\]\[google.cloud.tasks.v2.ListTasksRequest.response_view\]
controls the subset of information which is returned.

The tasks may be returned in any order. The ordering may change at any
time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksResponse` | The call object. |

### ListTasksAsync(ListTasksRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<ListTasksResponse> ListTasksAsync(ListTasksRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Lists the tasks in a queue.

By default, only the \[BASIC\]\[google.cloud.tasks.v2.Task.View.BASIC\] view is
retrieved due to performance considerations;
\[response_view\]\[google.cloud.tasks.v2.ListTasksRequest.response_view\]
controls the subset of information which is returned.

The tasks may be returned in any order. The ordering may change at any
time.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ListTasksResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override CloudTasks.CloudTasksClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.htmlhttps://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.ClientBaseConfiguration.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CloudTaskshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.Tasks.V2.CloudTasks.CloudTasksClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)

### PauseQueue(PauseQueueRequest, CallOptions)

    public virtual Queue PauseQueue(PauseQueueRequest request, CallOptions options)

Pauses the queue.

If a queue is paused then the system will stop dispatching tasks
until the queue is resumed via
\[ResumeQueue\]\[google.cloud.tasks.v2.CloudTasks.ResumeQueue\]. Tasks can
still be added when the queue is paused. A queue is paused if its
\[state\]\[google.cloud.tasks.v2.Queue.state\] is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PauseQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### PauseQueue(PauseQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Queue PauseQueue(PauseQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Pauses the queue.

If a queue is paused then the system will stop dispatching tasks
until the queue is resumed via
\[ResumeQueue\]\[google.cloud.tasks.v2.CloudTasks.ResumeQueue\]. Tasks can
still be added when the queue is paused. A queue is paused if its
\[state\]\[google.cloud.tasks.v2.Queue.state\] is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PauseQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### PauseQueueAsync(PauseQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Queue> PauseQueueAsync(PauseQueueRequest request, CallOptions options)

Pauses the queue.

If a queue is paused then the system will stop dispatching tasks
until the queue is resumed via
\[ResumeQueue\]\[google.cloud.tasks.v2.CloudTasks.ResumeQueue\]. Tasks can
still be added when the queue is paused. A queue is paused if its
\[state\]\[google.cloud.tasks.v2.Queue.state\] is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PauseQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### PauseQueueAsync(PauseQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Queue> PauseQueueAsync(PauseQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Pauses the queue.

If a queue is paused then the system will stop dispatching tasks
until the queue is resumed via
\[ResumeQueue\]\[google.cloud.tasks.v2.CloudTasks.ResumeQueue\]. Tasks can
still be added when the queue is paused. A queue is paused if its
\[state\]\[google.cloud.tasks.v2.Queue.state\] is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PauseQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### PurgeQueue(PurgeQueueRequest, CallOptions)

    public virtual Queue PurgeQueue(PurgeQueueRequest request, CallOptions options)

Purges a queue by deleting all of its tasks.

All tasks created before this method is called are permanently deleted.

Purge operations can take up to one minute to take effect. Tasks
might be dispatched before the purge takes effect. A purge is irreversible.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PurgeQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### PurgeQueue(PurgeQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Queue PurgeQueue(PurgeQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Purges a queue by deleting all of its tasks.

All tasks created before this method is called are permanently deleted.

Purge operations can take up to one minute to take effect. Tasks
might be dispatched before the purge takes effect. A purge is irreversible.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PurgeQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### PurgeQueueAsync(PurgeQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Queue> PurgeQueueAsync(PurgeQueueRequest request, CallOptions options)

Purges a queue by deleting all of its tasks.

All tasks created before this method is called are permanently deleted.

Purge operations can take up to one minute to take effect. Tasks
might be dispatched before the purge takes effect. A purge is irreversible.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PurgeQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### PurgeQueueAsync(PurgeQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Queue> PurgeQueueAsync(PurgeQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Purges a queue by deleting all of its tasks.

All tasks created before this method is called are permanently deleted.

Purge operations can take up to one minute to take effect. Tasks
might be dispatched before the purge takes effect. A purge is irreversible.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.PurgeQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### ResumeQueue(ResumeQueueRequest, CallOptions)

    public virtual Queue ResumeQueue(ResumeQueueRequest request, CallOptions options)

Resume a queue.

This method resumes a queue after it has been
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\] or
\[DISABLED\]\[google.cloud.tasks.v2.Queue.State.DISABLED\]. The state of a
queue is stored in the queue's \[state\]\[google.cloud.tasks.v2.Queue.state\];
after calling this method it will be set to
\[RUNNING\]\[google.cloud.tasks.v2.Queue.State.RUNNING\].

WARNING: Resuming many high-QPS queues at the same time can
lead to target overloading. If you are resuming high-QPS
queues, follow the 500/50/5 pattern described in
[Managing Cloud Tasks Scaling
Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ResumeQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### ResumeQueue(ResumeQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Queue ResumeQueue(ResumeQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Resume a queue.

This method resumes a queue after it has been
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\] or
\[DISABLED\]\[google.cloud.tasks.v2.Queue.State.DISABLED\]. The state of a
queue is stored in the queue's \[state\]\[google.cloud.tasks.v2.Queue.state\];
after calling this method it will be set to
\[RUNNING\]\[google.cloud.tasks.v2.Queue.State.RUNNING\].

WARNING: Resuming many high-QPS queues at the same time can
lead to target overloading. If you are resuming high-QPS
queues, follow the 500/50/5 pattern described in
[Managing Cloud Tasks Scaling
Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ResumeQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### ResumeQueueAsync(ResumeQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Queue> ResumeQueueAsync(ResumeQueueRequest request, CallOptions options)

Resume a queue.

This method resumes a queue after it has been
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\] or
\[DISABLED\]\[google.cloud.tasks.v2.Queue.State.DISABLED\]. The state of a
queue is stored in the queue's \[state\]\[google.cloud.tasks.v2.Queue.state\];
after calling this method it will be set to
\[RUNNING\]\[google.cloud.tasks.v2.Queue.State.RUNNING\].

WARNING: Resuming many high-QPS queues at the same time can
lead to target overloading. If you are resuming high-QPS
queues, follow the 500/50/5 pattern described in
[Managing Cloud Tasks Scaling
Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ResumeQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### ResumeQueueAsync(ResumeQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Queue> ResumeQueueAsync(ResumeQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Resume a queue.

This method resumes a queue after it has been
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\] or
\[DISABLED\]\[google.cloud.tasks.v2.Queue.State.DISABLED\]. The state of a
queue is stored in the queue's \[state\]\[google.cloud.tasks.v2.Queue.state\];
after calling this method it will be set to
\[RUNNING\]\[google.cloud.tasks.v2.Queue.State.RUNNING\].

WARNING: Resuming many high-QPS queues at the same time can
lead to target overloading. If you are resuming high-QPS
queues, follow the 500/50/5 pattern described in
[Managing Cloud Tasks Scaling
Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.ResumeQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### RunTask(RunTaskRequest, CallOptions)

    public virtual Task RunTask(RunTaskRequest request, CallOptions options)

Forces a task to run now.

When this method is called, Cloud Tasks will dispatch the task, even if
the task is already running, the queue has reached its
\[RateLimits\]\[google.cloud.tasks.v2.RateLimits\] or is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

This command is meant to be used for manual debugging. For
example, \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] can be used to
retry a failed task after a fix has been made or to manually force a task
to be dispatched now.

The dispatched task is returned. That is, the task that is returned
contains the \[status\]\[Task.status\] after the task is dispatched but
before the task is received by its target.

If Cloud Tasks receives a successful response from the task's
target, then the task will be deleted; otherwise the task's
\[schedule_time\]\[google.cloud.tasks.v2.Task.schedule_time\] will be reset to
the time that \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] was
called plus the retry delay specified in the queue's
\[RetryConfig\]\[google.cloud.tasks.v2.RetryConfig\].

\[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] returns
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] when it is called on a
task that has already succeeded or permanently failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.RunTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The response received from the server. |

### RunTask(RunTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual Task RunTask(RunTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Forces a task to run now.

When this method is called, Cloud Tasks will dispatch the task, even if
the task is already running, the queue has reached its
\[RateLimits\]\[google.cloud.tasks.v2.RateLimits\] or is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

This command is meant to be used for manual debugging. For
example, \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] can be used to
retry a failed task after a fix has been made or to manually force a task
to be dispatched now.

The dispatched task is returned. That is, the task that is returned
contains the \[status\]\[Task.status\] after the task is dispatched but
before the task is received by its target.

If Cloud Tasks receives a successful response from the task's
target, then the task will be deleted; otherwise the task's
\[schedule_time\]\[google.cloud.tasks.v2.Task.schedule_time\] will be reset to
the time that \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] was
called plus the retry delay specified in the queue's
\[RetryConfig\]\[google.cloud.tasks.v2.RetryConfig\].

\[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] returns
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] when it is called on a
task that has already succeeded or permanently failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.RunTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The response received from the server. |

### RunTaskAsync(RunTaskRequest, CallOptions)

    public virtual AsyncUnaryCall<Task> RunTaskAsync(RunTaskRequest request, CallOptions options)

Forces a task to run now.

When this method is called, Cloud Tasks will dispatch the task, even if
the task is already running, the queue has reached its
\[RateLimits\]\[google.cloud.tasks.v2.RateLimits\] or is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

This command is meant to be used for manual debugging. For
example, \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] can be used to
retry a failed task after a fix has been made or to manually force a task
to be dispatched now.

The dispatched task is returned. That is, the task that is returned
contains the \[status\]\[Task.status\] after the task is dispatched but
before the task is received by its target.

If Cloud Tasks receives a successful response from the task's
target, then the task will be deleted; otherwise the task's
\[schedule_time\]\[google.cloud.tasks.v2.Task.schedule_time\] will be reset to
the time that \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] was
called plus the retry delay specified in the queue's
\[RetryConfig\]\[google.cloud.tasks.v2.RetryConfig\].

\[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] returns
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] when it is called on a
task that has already succeeded or permanently failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.RunTaskRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The call object. |

### RunTaskAsync(RunTaskRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Task> RunTaskAsync(RunTaskRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Forces a task to run now.

When this method is called, Cloud Tasks will dispatch the task, even if
the task is already running, the queue has reached its
\[RateLimits\]\[google.cloud.tasks.v2.RateLimits\] or is
\[PAUSED\]\[google.cloud.tasks.v2.Queue.State.PAUSED\].

This command is meant to be used for manual debugging. For
example, \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] can be used to
retry a failed task after a fix has been made or to manually force a task
to be dispatched now.

The dispatched task is returned. That is, the task that is returned
contains the \[status\]\[Task.status\] after the task is dispatched but
before the task is received by its target.

If Cloud Tasks receives a successful response from the task's
target, then the task will be deleted; otherwise the task's
\[schedule_time\]\[google.cloud.tasks.v2.Task.schedule_time\] will be reset to
the time that \[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] was
called plus the retry delay specified in the queue's
\[RetryConfig\]\[google.cloud.tasks.v2.RetryConfig\].

\[RunTask\]\[google.cloud.tasks.v2.CloudTasks.RunTask\] returns
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] when it is called on a
task that has already succeeded or permanently failed.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.RunTaskRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Task` | The call object. |

### SetIamPolicy(SetIamPolicyRequest, CallOptions)

    public virtual Policy SetIamPolicy(SetIamPolicyRequest request, CallOptions options)

Sets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Replaces any existing policy.

Note: The Cloud Console does not check queue-level IAM permissions yet.
Project-level permissions are required to use the Cloud Console.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.setIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The response received from the server. |

### SetIamPolicy(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

    public virtual Policy SetIamPolicy(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Replaces any existing policy.

Note: The Cloud Console does not check queue-level IAM permissions yet.
Project-level permissions are required to use the Cloud Console.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.setIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The response received from the server. |

### SetIamPolicyAsync(SetIamPolicyRequest, CallOptions)

    public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallOptions options)

Sets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Replaces any existing policy.

Note: The Cloud Console does not check queue-level IAM permissions yet.
Project-level permissions are required to use the Cloud Console.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.setIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The call object. |

### SetIamPolicyAsync(SetIamPolicyRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Sets the access control policy for a \[Queue\]\[google.cloud.tasks.v2.Queue\].
Replaces any existing policy.

Note: The Cloud Console does not check queue-level IAM permissions yet.
Project-level permissions are required to use the Cloud Console.

Authorization requires the following
[Google IAM](https://cloud.google.com/iam) permission on the specified
resource parent:

- `cloudtasks.queues.setIamPolicy`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The call object. |

### TestIamPermissions(TestIamPermissionsRequest, CallOptions)

    public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallOptions options)

Returns permissions that a caller has on a
\[Queue\]\[google.cloud.tasks.v2.Queue\]. If the resource does not exist, this
will return an empty set of permissions, not a
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] error.

Note: This operation is designed to be used for building permission-aware
UIs and command-line tools, not for authorization checking. This operation
may "fail open" without warning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The response received from the server. |

### TestIamPermissions(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

    public virtual TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on a
\[Queue\]\[google.cloud.tasks.v2.Queue\]. If the resource does not exist, this
will return an empty set of permissions, not a
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] error.

Note: This operation is designed to be used for building permission-aware
UIs and command-line tools, not for authorization checking. This operation
may "fail open" without warning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The response received from the server. |

### TestIamPermissionsAsync(TestIamPermissionsRequest, CallOptions)

    public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallOptions options)

Returns permissions that a caller has on a
\[Queue\]\[google.cloud.tasks.v2.Queue\]. If the resource does not exist, this
will return an empty set of permissions, not a
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] error.

Note: This operation is designed to be used for building permission-aware
UIs and command-line tools, not for authorization checking. This operation
may "fail open" without warning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The call object. |

### TestIamPermissionsAsync(TestIamPermissionsRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Returns permissions that a caller has on a
\[Queue\]\[google.cloud.tasks.v2.Queue\]. If the resource does not exist, this
will return an empty set of permissions, not a
\[NOT_FOUND\]\[google.rpc.Code.NOT_FOUND\] error.

Note: This operation is designed to be used for building permission-aware
UIs and command-line tools, not for authorization checking. This operation
may "fail open" without warning.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The call object. |

### UpdateQueue(UpdateQueueRequest, CallOptions)

    public virtual Queue UpdateQueue(UpdateQueueRequest request, CallOptions options)

Updates a queue.

This method creates the queue if it does not exist and updates
the queue if it does exist.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.UpdateQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### UpdateQueue(UpdateQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual Queue UpdateQueue(UpdateQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a queue.

This method creates the queue if it does not exist and updates
the queue if it does exist.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.UpdateQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The response received from the server. |

### UpdateQueueAsync(UpdateQueueRequest, CallOptions)

    public virtual AsyncUnaryCall<Queue> UpdateQueueAsync(UpdateQueueRequest request, CallOptions options)

Updates a queue.

This method creates the queue if it does not exist and updates
the queue if it does exist.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.UpdateQueueRequest` The request to send to the server. |
| `options` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.CallOptions.html` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |

### UpdateQueueAsync(UpdateQueueRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<Queue> UpdateQueueAsync(UpdateQueueRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

Updates a queue.

This method creates the queue if it does not exist and updates
the queue if it does exist.

Queues created with this method allow tasks to live for a maximum of 31
days. After a task is 31 days old, the task will be deleted regardless of
whether it was dispatched or not.

WARNING: Using this method may have unintended side effects if you are
using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
Read
[Overview of Queue Management and
queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using
this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.UpdateQueueRequest` The request to send to the server. |
| `headers` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.Metadata.html` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.AsyncUnaryCall-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Tasks.V2/latest/Google.Cloud.Tasks.V2.Queue` | The call object. |