public abstract class CloudTasksClient
Reference documentation and code samples for the Google Cloud Tasks v2beta3 API class CloudTasksClient.
CloudTasks client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.Tasks.V2Beta3Assembly
Google.Cloud.Tasks.V2Beta3.dll
Remarks
Cloud Tasks allows developers to manage the execution of background work in their applications.
Properties
DefaultEndpoint
public static string DefaultEndpoint { get; }
The default endpoint for the CloudTasks service, which is a host of "cloudtasks.googleapis.com" and a port of 443.
Property Value | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default CloudTasks scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default CloudTasks scopes are:
GrpcClient
public virtual CloudTasks.CloudTasksClient GrpcClient { get; }
The underlying gRPC CloudTasks client
Property Value | |
---|---|
Type | Description |
CloudTasksCloudTasksClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
Methods
BufferTask(BufferTaskRequest, CallSettings)
public virtual BufferTaskResponse BufferTask(BufferTaskRequest request, CallSettings callSettings = null)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
request | BufferTaskRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BufferTaskResponse | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::BufferTaskRequest request = new gctv::BufferTaskRequest
{
QueueAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
TaskId = "",
Body = new HttpBody(),
};
// Make the request
gctv::BufferTaskResponse response = cloudTasksClient.BufferTask(request);
BufferTask(QueueName, string, HttpBody, CallSettings)
public virtual BufferTaskResponse BufferTask(QueueName queue, string taskId, HttpBody body, CallSettings callSettings = null)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
queue | QueueName Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |
taskId | string Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task. |
body | HttpBody Optional. Body of the HTTP request. The body can take any generic value. The value is written to the [HttpRequest][payload] of the [Task]. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BufferTaskResponse | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::QueueName queue = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
string taskId = "";
HttpBody body = new HttpBody();
// Make the request
gctv::BufferTaskResponse response = cloudTasksClient.BufferTask(queue, taskId, body);
BufferTask(string, string, HttpBody, CallSettings)
public virtual BufferTaskResponse BufferTask(string queue, string taskId, HttpBody body, CallSettings callSettings = null)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
queue | string Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |
taskId | string Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task. |
body | HttpBody Optional. Body of the HTTP request. The body can take any generic value. The value is written to the [HttpRequest][payload] of the [Task]. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BufferTaskResponse | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string queue = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
string taskId = "";
HttpBody body = new HttpBody();
// Make the request
gctv::BufferTaskResponse response = cloudTasksClient.BufferTask(queue, taskId, body);
BufferTaskAsync(BufferTaskRequest, CallSettings)
public virtual Task<BufferTaskResponse> BufferTaskAsync(BufferTaskRequest request, CallSettings callSettings = null)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
request | BufferTaskRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBufferTaskResponse | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::BufferTaskRequest request = new gctv::BufferTaskRequest
{
QueueAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
TaskId = "",
Body = new HttpBody(),
};
// Make the request
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(request);
BufferTaskAsync(BufferTaskRequest, CancellationToken)
public virtual Task<BufferTaskResponse> BufferTaskAsync(BufferTaskRequest request, CancellationToken cancellationToken)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
request | BufferTaskRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBufferTaskResponse | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::BufferTaskRequest request = new gctv::BufferTaskRequest
{
QueueAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
TaskId = "",
Body = new HttpBody(),
};
// Make the request
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(request);
BufferTaskAsync(QueueName, string, HttpBody, CallSettings)
public virtual Task<BufferTaskResponse> BufferTaskAsync(QueueName queue, string taskId, HttpBody body, CallSettings callSettings = null)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
queue | QueueName Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |
taskId | string Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task. |
body | HttpBody Optional. Body of the HTTP request. The body can take any generic value. The value is written to the [HttpRequest][payload] of the [Task]. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBufferTaskResponse | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName queue = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
string taskId = "";
HttpBody body = new HttpBody();
// Make the request
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(queue, taskId, body);
BufferTaskAsync(QueueName, string, HttpBody, CancellationToken)
public virtual Task<BufferTaskResponse> BufferTaskAsync(QueueName queue, string taskId, HttpBody body, CancellationToken cancellationToken)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
queue | QueueName Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |
taskId | string Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task. |
body | HttpBody Optional. Body of the HTTP request. The body can take any generic value. The value is written to the [HttpRequest][payload] of the [Task]. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBufferTaskResponse | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName queue = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
string taskId = "";
HttpBody body = new HttpBody();
// Make the request
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(queue, taskId, body);
BufferTaskAsync(string, string, HttpBody, CallSettings)
public virtual Task<BufferTaskResponse> BufferTaskAsync(string queue, string taskId, HttpBody body, CallSettings callSettings = null)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
queue | string Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |
taskId | string Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task. |
body | HttpBody Optional. Body of the HTTP request. The body can take any generic value. The value is written to the [HttpRequest][payload] of the [Task]. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBufferTaskResponse | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string queue = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
string taskId = "";
HttpBody body = new HttpBody();
// Make the request
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(queue, taskId, body);
BufferTaskAsync(string, string, HttpBody, CancellationToken)
public virtual Task<BufferTaskResponse> BufferTaskAsync(string queue, string taskId, HttpBody body, CancellationToken cancellationToken)
Creates and buffers a new task without the need to explicitly define a Task message. The queue must have [HTTP target][google.cloud.tasks.v2beta3.HttpTarget]. To create the task with a custom ID, use the following format and set TASK_ID to your desired ID: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID:buffer To create the task with an automatically generated ID, use the following format: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks:buffer. Note: This feature is in its experimental stage. You must request access to the API through the Cloud Tasks BufferTask Experiment Signup form.
Parameters | |
---|---|
Name | Description |
queue | string Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist. |
taskId | string Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task. |
body | HttpBody Optional. Body of the HTTP request. The body can take any generic value. The value is written to the [HttpRequest][payload] of the [Task]. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBufferTaskResponse | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string queue = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
string taskId = "";
HttpBody body = new HttpBody();
// Make the request
gctv::BufferTaskResponse response = await cloudTasksClient.BufferTaskAsync(queue, taskId, body);
Create()
public static CloudTasksClient Create()
Synchronously creates a CloudTasksClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudTasksClientBuilder.
Returns | |
---|---|
Type | Description |
CloudTasksClient | The created CloudTasksClient. |
CreateAsync(CancellationToken)
public static Task<CloudTasksClient> CreateAsync(CancellationToken cancellationToken = default)
Asynchronously creates a CloudTasksClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use CloudTasksClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
TaskCloudTasksClient | The task representing the created CloudTasksClient. |
CreateQueue(LocationName, Queue, CallSettings)
public virtual Queue CreateQueue(LocationName parent, Queue queue, CallSettings callSettings = null)
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 |
parent | LocationName Required. The location name in which the queue will be created.
For example: The list of allowed locations can be obtained by calling Cloud Tasks' implementation of [ListLocations][google.cloud.location.Locations.ListLocations]. |
queue | Queue Required. The queue to create. [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Queue | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gctv::Queue queue = new gctv::Queue();
// Make the request
gctv::Queue response = cloudTasksClient.CreateQueue(parent, queue);
CreateQueue(CreateQueueRequest, CallSettings)
public virtual Queue CreateQueue(CreateQueueRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Queue | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::CreateQueueRequest request = new gctv::CreateQueueRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Queue = new gctv::Queue(),
};
// Make the request
gctv::Queue response = cloudTasksClient.CreateQueue(request);
CreateQueue(string, Queue, CallSettings)
public virtual Queue CreateQueue(string parent, Queue queue, CallSettings callSettings = null)
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 |
parent | string Required. The location name in which the queue will be created.
For example: The list of allowed locations can be obtained by calling Cloud Tasks' implementation of [ListLocations][google.cloud.location.Locations.ListLocations]. |
queue | Queue Required. The queue to create. [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Queue | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gctv::Queue queue = new gctv::Queue();
// Make the request
gctv::Queue response = cloudTasksClient.CreateQueue(parent, queue);
CreateQueueAsync(LocationName, Queue, CallSettings)
public virtual Task<Queue> CreateQueueAsync(LocationName parent, Queue queue, CallSettings callSettings = null)
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 |
parent | LocationName Required. The location name in which the queue will be created.
For example: The list of allowed locations can be obtained by calling Cloud Tasks' implementation of [ListLocations][google.cloud.location.Locations.ListLocations]. |
queue | Queue Required. The queue to create. [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gctv::Queue queue = new gctv::Queue();
// Make the request
gctv::Queue response = await cloudTasksClient.CreateQueueAsync(parent, queue);
CreateQueueAsync(LocationName, Queue, CancellationToken)
public virtual Task<Queue> CreateQueueAsync(LocationName parent, Queue queue, CancellationToken cancellationToken)
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 |
parent | LocationName Required. The location name in which the queue will be created.
For example: The list of allowed locations can be obtained by calling Cloud Tasks' implementation of [ListLocations][google.cloud.location.Locations.ListLocations]. |
queue | Queue Required. The queue to create. [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
gctv::Queue queue = new gctv::Queue();
// Make the request
gctv::Queue response = await cloudTasksClient.CreateQueueAsync(parent, queue);
CreateQueueAsync(CreateQueueRequest, CallSettings)
public virtual Task<Queue> CreateQueueAsync(CreateQueueRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::CreateQueueRequest request = new gctv::CreateQueueRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Queue = new gctv::Queue(),
};
// Make the request
gctv::Queue response = await cloudTasksClient.CreateQueueAsync(request);
CreateQueueAsync(CreateQueueRequest, CancellationToken)
public virtual Task<Queue> CreateQueueAsync(CreateQueueRequest request, CancellationToken cancellationToken)
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 object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::CreateQueueRequest request = new gctv::CreateQueueRequest
{
ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
Queue = new gctv::Queue(),
};
// Make the request
gctv::Queue response = await cloudTasksClient.CreateQueueAsync(request);
CreateQueueAsync(string, Queue, CallSettings)
public virtual Task<Queue> CreateQueueAsync(string parent, Queue queue, CallSettings callSettings = null)
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 |
parent | string Required. The location name in which the queue will be created.
For example: The list of allowed locations can be obtained by calling Cloud Tasks' implementation of [ListLocations][google.cloud.location.Locations.ListLocations]. |
queue | Queue Required. The queue to create. [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gctv::Queue queue = new gctv::Queue();
// Make the request
gctv::Queue response = await cloudTasksClient.CreateQueueAsync(parent, queue);
CreateQueueAsync(string, Queue, CancellationToken)
public virtual Task<Queue> CreateQueueAsync(string parent, Queue queue, CancellationToken cancellationToken)
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 |
parent | string Required. The location name in which the queue will be created.
For example: The list of allowed locations can be obtained by calling Cloud Tasks' implementation of [ListLocations][google.cloud.location.Locations.ListLocations]. |
queue | Queue Required. The queue to create. [Queue's name][google.cloud.tasks.v2beta3.Queue.name] cannot be the same as an existing queue. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
gctv::Queue queue = new gctv::Queue();
// Make the request
gctv::Queue response = await cloudTasksClient.CreateQueueAsync(parent, queue);
CreateTask(CreateTaskRequest, CallSettings)
public virtual Task CreateTask(CreateTaskRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::CreateTaskRequest request = new gctv::CreateTaskRequest
{
ParentAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
Task = new gctv::Task(),
ResponseView = gctv::Task.Types.View.Unspecified,
};
// Make the request
gctv::Task response = cloudTasksClient.CreateTask(request);
CreateTask(QueueName, Task, CallSettings)
public virtual Task CreateTask(QueueName parent, Task task, CallSettings callSettings = null)
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 |
parent | QueueName Required. The queue name. For example:
The queue must already exist. |
task | Task Required. The task to add. Task names have the following format:
If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1 hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::QueueName parent = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
gctv::Task task = new gctv::Task();
// Make the request
gctv::Task response = cloudTasksClient.CreateTask(parent, task);
CreateTask(string, Task, CallSettings)
public virtual Task CreateTask(string parent, Task task, CallSettings callSettings = null)
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 |
parent | string Required. The queue name. For example:
The queue must already exist. |
task | Task Required. The task to add. Task names have the following format:
If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1 hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
gctv::Task task = new gctv::Task();
// Make the request
gctv::Task response = cloudTasksClient.CreateTask(parent, task);
CreateTaskAsync(CreateTaskRequest, CallSettings)
public virtual Task<Task> CreateTaskAsync(CreateTaskRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTask | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::CreateTaskRequest request = new gctv::CreateTaskRequest
{
ParentAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
Task = new gctv::Task(),
ResponseView = gctv::Task.Types.View.Unspecified,
};
// Make the request
gctv::Task response = await cloudTasksClient.CreateTaskAsync(request);
CreateTaskAsync(CreateTaskRequest, CancellationToken)
public virtual Task<Task> CreateTaskAsync(CreateTaskRequest request, CancellationToken cancellationToken)
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 object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTask | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::CreateTaskRequest request = new gctv::CreateTaskRequest
{
ParentAsQueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
Task = new gctv::Task(),
ResponseView = gctv::Task.Types.View.Unspecified,
};
// Make the request
gctv::Task response = await cloudTasksClient.CreateTaskAsync(request);
CreateTaskAsync(QueueName, Task, CallSettings)
public virtual Task<Task> CreateTaskAsync(QueueName parent, Task task, CallSettings callSettings = null)
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 |
parent | QueueName Required. The queue name. For example:
The queue must already exist. |
task | Task Required. The task to add. Task names have the following format:
If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1 hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTask | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName parent = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
gctv::Task task = new gctv::Task();
// Make the request
gctv::Task response = await cloudTasksClient.CreateTaskAsync(parent, task);
CreateTaskAsync(QueueName, Task, CancellationToken)
public virtual Task<Task> CreateTaskAsync(QueueName parent, Task task, CancellationToken cancellationToken)
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 |
parent | QueueName Required. The queue name. For example:
The queue must already exist. |
task | Task Required. The task to add. Task names have the following format:
If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1 hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTask | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName parent = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
gctv::Task task = new gctv::Task();
// Make the request
gctv::Task response = await cloudTasksClient.CreateTaskAsync(parent, task);
CreateTaskAsync(string, Task, CallSettings)
public virtual Task<Task> CreateTaskAsync(string parent, Task task, CallSettings callSettings = null)
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 |
parent | string Required. The queue name. For example:
The queue must already exist. |
task | Task Required. The task to add. Task names have the following format:
If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1 hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskTask | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
gctv::Task task = new gctv::Task();
// Make the request
gctv::Task response = await cloudTasksClient.CreateTaskAsync(parent, task);
CreateTaskAsync(string, Task, CancellationToken)
public virtual Task<Task> CreateTaskAsync(string parent, Task task, CancellationToken cancellationToken)
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 |
parent | string Required. The queue name. For example:
The queue must already exist. |
task | Task Required. The task to add. Task names have the following format:
If [schedule_time][google.cloud.tasks.v2beta3.Task.schedule_time] is not set or is in the past then Cloud Tasks will set it to the current time. Task De-duplication: Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical to that of an existing task or a task that was deleted or executed recently then the call will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was created using Cloud Tasks, then another task with the same name can't be created for ~1 hour after the original task was deleted or executed. If the task's queue was created using queue.yaml or queue.xml, then another task with the same name can't be created for ~9 days after the original task was deleted or executed. Because there is an extra lookup cost to identify duplicate task names, these [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] calls have significantly increased latency. Using hashed strings for the task id or for the prefix of the task id is recommended. Choosing task ids that are sequential or have sequential prefixes, for example using a timestamp, causes an increase in latency and error rates in all task commands. The infrastructure relies on an approximately uniform distribution of task ids to store and serve tasks efficiently. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskTask | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
gctv::Task task = new gctv::Task();
// Make the request
gctv::Task response = await cloudTasksClient.CreateTaskAsync(parent, task);
DeleteQueue(DeleteQueueRequest, CallSettings)
public virtual void DeleteQueue(DeleteQueueRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::DeleteQueueRequest request = new gctv::DeleteQueueRequest
{
QueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
};
// Make the request
cloudTasksClient.DeleteQueue(request);
DeleteQueue(QueueName, CallSettings)
public virtual void DeleteQueue(QueueName name, CallSettings callSettings = null)
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 |
name | QueueName Required. The queue name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::QueueName name = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
// Make the request
cloudTasksClient.DeleteQueue(name);
DeleteQueue(string, CallSettings)
public virtual void DeleteQueue(string name, CallSettings callSettings = null)
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 |
name | string Required. The queue name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
// Make the request
cloudTasksClient.DeleteQueue(name);
DeleteQueueAsync(DeleteQueueRequest, CallSettings)
public virtual Task DeleteQueueAsync(DeleteQueueRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::DeleteQueueRequest request = new gctv::DeleteQueueRequest
{
QueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
};
// Make the request
await cloudTasksClient.DeleteQueueAsync(request);
DeleteQueueAsync(DeleteQueueRequest, CancellationToken)
public virtual Task DeleteQueueAsync(DeleteQueueRequest request, CancellationToken cancellationToken)
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 object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::DeleteQueueRequest request = new gctv::DeleteQueueRequest
{
QueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
};
// Make the request
await cloudTasksClient.DeleteQueueAsync(request);
DeleteQueueAsync(QueueName, CallSettings)
public virtual Task DeleteQueueAsync(QueueName name, CallSettings callSettings = null)
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 |
name | QueueName Required. The queue name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName name = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
// Make the request
await cloudTasksClient.DeleteQueueAsync(name);
DeleteQueueAsync(QueueName, CancellationToken)
public virtual Task DeleteQueueAsync(QueueName name, CancellationToken cancellationToken)
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 |
name | QueueName Required. The queue name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName name = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
// Make the request
await cloudTasksClient.DeleteQueueAsync(name);
DeleteQueueAsync(string, CallSettings)
public virtual Task DeleteQueueAsync(string name, CallSettings callSettings = null)
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 |
name | string Required. The queue name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
// Make the request
await cloudTasksClient.DeleteQueueAsync(name);
DeleteQueueAsync(string, CancellationToken)
public virtual Task DeleteQueueAsync(string name, CancellationToken cancellationToken)
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 |
name | string Required. The queue name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
// Make the request
await cloudTasksClient.DeleteQueueAsync(name);
DeleteTask(DeleteTaskRequest, CallSettings)
public virtual void DeleteTask(DeleteTaskRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::DeleteTaskRequest request = new gctv::DeleteTaskRequest
{
TaskName = gctv::TaskName.FromProjectLocationQueueTask("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"),
};
// Make the request
cloudTasksClient.DeleteTask(request);
DeleteTask(TaskName, CallSettings)
public virtual void DeleteTask(TaskName name, CallSettings callSettings = null)
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 |
name | TaskName Required. The task name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::TaskName name = gctv::TaskName.FromProjectLocationQueueTask("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
// Make the request
cloudTasksClient.DeleteTask(name);
DeleteTask(string, CallSettings)
public virtual void DeleteTask(string name, CallSettings callSettings = null)
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 |
name | string Required. The task name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]/tasks/[TASK]";
// Make the request
cloudTasksClient.DeleteTask(name);
DeleteTaskAsync(DeleteTaskRequest, CallSettings)
public virtual Task DeleteTaskAsync(DeleteTaskRequest request, CallSettings callSettings = null)
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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::DeleteTaskRequest request = new gctv::DeleteTaskRequest
{
TaskName = gctv::TaskName.FromProjectLocationQueueTask("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"),
};
// Make the request
await cloudTasksClient.DeleteTaskAsync(request);
DeleteTaskAsync(DeleteTaskRequest, CancellationToken)
public virtual Task DeleteTaskAsync(DeleteTaskRequest request, CancellationToken cancellationToken)
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 object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::DeleteTaskRequest request = new gctv::DeleteTaskRequest
{
TaskName = gctv::TaskName.FromProjectLocationQueueTask("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"),
};
// Make the request
await cloudTasksClient.DeleteTaskAsync(request);
DeleteTaskAsync(TaskName, CallSettings)
public virtual Task DeleteTaskAsync(TaskName name, CallSettings callSettings = null)
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 |
name | TaskName Required. The task name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::TaskName name = gctv::TaskName.FromProjectLocationQueueTask("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
// Make the request
await cloudTasksClient.DeleteTaskAsync(name);
DeleteTaskAsync(TaskName, CancellationToken)
public virtual Task DeleteTaskAsync(TaskName name, CancellationToken cancellationToken)
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 |
name | TaskName Required. The task name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::TaskName name = gctv::TaskName.FromProjectLocationQueueTask("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
// Make the request
await cloudTasksClient.DeleteTaskAsync(name);
DeleteTaskAsync(string, CallSettings)
public virtual Task DeleteTaskAsync(string name, CallSettings callSettings = null)
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 |
name | string Required. The task name. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]/tasks/[TASK]";
// Make the request
await cloudTasksClient.DeleteTaskAsync(name);
DeleteTaskAsync(string, CancellationToken)
public virtual Task DeleteTaskAsync(string name, CancellationToken cancellationToken)
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 |
name | string Required. The task name. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]/tasks/[TASK]";
// Make the request
await cloudTasksClient.DeleteTaskAsync(name);
GetIamPolicy(IResourceName, CallSettings)
public virtual Policy GetIamPolicy(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = cloudTasksClient.GetIamPolicy(resource);
GetIamPolicy(GetIamPolicyRequest, CallSettings)
public virtual Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = cloudTasksClient.GetIamPolicy(request);
GetIamPolicy(string, CallSettings)
public virtual Policy GetIamPolicy(string resource, CallSettings callSettings = null)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Policy | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = cloudTasksClient.GetIamPolicy(resource);
GetIamPolicyAsync(IResourceName, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CallSettings callSettings = null)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await cloudTasksClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(IResourceName, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(IResourceName resource, CancellationToken cancellationToken)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 |
resource | IResourceName REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
IResourceName resource = new UnparsedResourceName("a/wildcard/resource");
// Make the request
Policy response = await cloudTasksClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await cloudTasksClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(GetIamPolicyRequest, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CancellationToken cancellationToken)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await cloudTasksClient.GetIamPolicyAsync(request);
GetIamPolicyAsync(string, CallSettings)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CallSettings callSettings = null)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await cloudTasksClient.GetIamPolicyAsync(resource);
GetIamPolicyAsync(string, CancellationToken)
public virtual Task<Policy> GetIamPolicyAsync(string resource, CancellationToken cancellationToken)
Gets the access control policy for a [Queue][google.cloud.tasks.v2beta3.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 |
resource | string REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskPolicy | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
string resource = "a/wildcard/resource";
// Make the request
Policy response = await cloudTasksClient.GetIamPolicyAsync(resource);
GetQueue(GetQueueRequest, CallSettings)
public virtual Queue GetQueue(GetQueueRequest request, CallSettings callSettings = null)
Gets a queue.
Parameters | |
---|---|
Name | Description |
request | GetQueueRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Queue | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::GetQueueRequest request = new gctv::GetQueueRequest
{
QueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
ReadMask = new FieldMask(),
};
// Make the request
gctv::Queue response = cloudTasksClient.GetQueue(request);
GetQueue(QueueName, CallSettings)
public virtual Queue GetQueue(QueueName name, CallSettings callSettings = null)
Gets a queue.
Parameters | |
---|---|
Name | Description |
name | QueueName Required. The resource name of the queue. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Queue | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
gctv::QueueName name = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
// Make the request
gctv::Queue response = cloudTasksClient.GetQueue(name);
GetQueue(string, CallSettings)
public virtual Queue GetQueue(string name, CallSettings callSettings = null)
Gets a queue.
Parameters | |
---|---|
Name | Description |
name | string Required. The resource name of the queue. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Queue | The RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = gctv::CloudTasksClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/queues/[QUEUE]";
// Make the request
gctv::Queue response = cloudTasksClient.GetQueue(name);
GetQueueAsync(GetQueueRequest, CallSettings)
public virtual Task<Queue> GetQueueAsync(GetQueueRequest request, CallSettings callSettings = null)
Gets a queue.
Parameters | |
---|---|
Name | Description |
request | GetQueueRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::GetQueueRequest request = new gctv::GetQueueRequest
{
QueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
ReadMask = new FieldMask(),
};
// Make the request
gctv::Queue response = await cloudTasksClient.GetQueueAsync(request);
GetQueueAsync(GetQueueRequest, CancellationToken)
public virtual Task<Queue> GetQueueAsync(GetQueueRequest request, CancellationToken cancellationToken)
Gets a queue.
Parameters | |
---|---|
Name | Description |
request | GetQueueRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::GetQueueRequest request = new gctv::GetQueueRequest
{
QueueName = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]"),
ReadMask = new FieldMask(),
};
// Make the request
gctv::Queue response = await cloudTasksClient.GetQueueAsync(request);
GetQueueAsync(QueueName, CallSettings)
public virtual Task<Queue> GetQueueAsync(QueueName name, CallSettings callSettings = null)
Gets a queue.
Parameters | |
---|---|
Name | Description |
name | QueueName Required. The resource name of the queue. For example:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName name = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
// Make the request
gctv::Queue response = await cloudTasksClient.GetQueueAsync(name);
GetQueueAsync(QueueName, CancellationToken)
public virtual Task<Queue> GetQueueAsync(QueueName name, CancellationToken cancellationToken)
Gets a queue.
Parameters | |
---|---|
Name | Description |
name | QueueName Required. The resource name of the queue. For example:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskQueue | A Task containing the RPC response. |
// Create client
gctv::CloudTasksClient cloudTasksClient = await gctv::CloudTasksClient.CreateAsync();
// Initialize request argument(s)
gctv::QueueName name = gctv::QueueName.FromProjectLocationQueue("[PROJECT]", "[LOCATION]", "[QUEUE]");
// Make the request
gctv::Queue response = await cloudTasksClient.GetQueueAsync(name);
GetQueueAsync(string, CallSettings)
public virtual Task<Queue> GetQueueAs