Method: projects.locations.queues.tasks.buffer

Creates and buffers a new task without the need to explicitly define a Task message. The queue must have HTTP target . 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.

HTTP request

POST https://cloudtasks.googleapis.com/v2beta3/{queue=projects/*/locations/*/queues/*}/tasks/{taskId}:buffer

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
queue

string

Required. The parent queue name. For example: projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`

The queue must already exist.

Authorization requires the following IAM permission on the specified resource queue :

  • cloudtasks.tasks.create
taskId

string

Optional. Task ID for the task being created. If not provided, a random task ID is assigned to the task.

Request body

The request body contains data with the following structure:

JSON representation
 { 
 "body" 
 : 
 { 
 object (  HttpBody 
 
) 
 } 
 } 
Fields
body

object ( 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].

Response body

Response message for tasks.buffer .

If successful, the response body contains data with the following structure:

JSON representation
 { 
 "task" 
 : 
 { 
 object (  Task 
 
) 
 } 
 } 
Fields
task

object ( Task )

The created task.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/cloud-tasks

For more information, see the Authentication Overview .

Design a Mobile Site
View Site in Mobile | Classic
Share by: