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 > ClientBase > ClientBaseCloudTasksCloudTasksClient > CloudTasks.CloudTasksClientNamespace
Google.Cloud.Tasks.V2Assembly
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 | CallInvoker The callInvoker to use to make remote calls. |
CloudTasksClient(ChannelBase)
public CloudTasksClient(ChannelBase channel)
Creates a new client for CloudTasks
Parameter | |
---|---|
Name | Description |
channel | ChannelBase 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 | ClientBaseClientBaseConfiguration The client configuration. |
Methods
CreateLocationsClient()
public virtual Locations.LocationsClient CreateLocationsClient()
Creates a new instance of Locations.LocationsClient using the same call invoker as this client.
Returns | |
---|---|
Type | Description |
LocationsLocationsClient | A new Locations.LocationsClient 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | CreateQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | CreateQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | CreateQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | CreateQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 | CreateTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | CreateTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | CreateTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTask | 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 | CreateTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTask | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | DeleteQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Empty | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | DeleteQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Empty | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | DeleteQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallEmpty | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | DeleteQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallEmpty | 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 | DeleteTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Empty | 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 | DeleteTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Empty | 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 | DeleteTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallEmpty | 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 | DeleteTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallEmpty | 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 permission on the specified resource parent:
cloudtasks.queues.getIamPolicy
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Policy | 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 permission on the specified resource parent:
cloudtasks.queues.getIamPolicy
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Policy | 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 permission on the specified resource parent:
cloudtasks.queues.getIamPolicy
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallPolicy | 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 permission on the specified resource parent:
cloudtasks.queues.getIamPolicy
Parameters | |
---|---|
Name | Description |
request | GetIamPolicyRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallPolicy | The call object. |
GetQueue(GetQueueRequest, CallOptions)
public virtual Queue GetQueue(GetQueueRequest request, CallOptions options)
Gets a queue.
Parameters | |
---|---|
Name | Description |
request | GetQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | GetQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | GetQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 | GetQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | The call object. |
GetTask(GetTaskRequest, CallOptions)
public virtual Task GetTask(GetTaskRequest request, CallOptions options)
Gets a task.
Parameters | |
---|---|
Name | Description |
request | GetTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | GetTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | GetTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTask | 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 | GetTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTask | 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 | ListQueuesRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | ListQueuesRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | ListQueuesRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallListQueuesResponse | 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 | ListQueuesRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallListQueuesResponse | 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 | ListTasksRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | ListTasksRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | ListTasksRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallListTasksResponse | 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 | ListTasksRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallListTasksResponse | 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 | ClientBaseClientBaseConfiguration |
Returns | |
---|---|
Type | Description |
CloudTasksCloudTasksClient |
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 | PauseQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | PauseQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | PauseQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 | PauseQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 | PurgeQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | PurgeQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | PurgeQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 | PurgeQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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.
Parameters | |
---|---|
Name | Description |
request | ResumeQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
request | ResumeQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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.
Parameters | |
---|---|
Name | Description |
request | ResumeQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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.
Parameters | |
---|---|
Name | Description |
request | ResumeQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 | RunTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 | RunTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 | RunTaskRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTask | 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 | RunTaskRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTask | 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 permission on the specified resource parent:
cloudtasks.queues.setIamPolicy
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Policy | 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 permission on the specified resource parent:
cloudtasks.queues.setIamPolicy
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Policy | 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 permission on the specified resource parent:
cloudtasks.queues.setIamPolicy
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallPolicy | 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 permission on the specified resource parent:
cloudtasks.queues.setIamPolicy
Parameters | |
---|---|
Name | Description |
request | SetIamPolicyRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallPolicy | 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 | TestIamPermissionsRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | 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 | TestIamPermissionsRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
TestIamPermissionsResponse | 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 | TestIamPermissionsRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTestIamPermissionsResponse | 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 | TestIamPermissionsRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallTestIamPermissionsResponse | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | UpdateQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | UpdateQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | UpdateQueueRequest The request to send to the server. |
options | CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | 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 before using
this method.
Parameters | |
---|---|
Name | Description |
request | UpdateQueueRequest The request to send to the server. |
headers | Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | DateTime An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AsyncUnaryCallQueue | The call object. |