Method: projects.locations.queues.delete

Deletes a queue.

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

Note: If you delete a queue, you may be prevented from creating a new queue with the same name as the deleted queue for a tombstone window of up to 3 days. During this window, the queues.create operation may appear to recreate the queue, but this can be misleading. If you attempt to create a queue with the same name as one that is in the tombstone window, run queues.get to confirm that the queue creation was successful. If queues.get returns 200 response code, your queue was successfully created with the name of the previously deleted queue. Otherwise, your queue did not successfully recreate.

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.

HTTP request

DELETE https://cloudtasks.googleapis.com/v2/{name=projects/*/locations/*/queues/*}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

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

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

  • cloudtasks.queues.delete

Request body

The request body must be empty.

Response body

If successful, the response body is empty.

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.