Delete a queue

Deletes a queue for migrating from taskqueues example.

Explore further

For detailed documentation that includes this code sample, see the following:

Code sample

Python

To learn how to install and use the client library for Cloud Tasks, see Cloud Tasks client libraries.

To authenticate to Cloud Tasks, set up Application Default Credentials. For more information, see Set up authentication for a local development environment.

client = tasks.CloudTasksClient()

# TODO(developer): Uncomment these lines and replace with your values.
# project = 'my-project-id'
# location = 'us- central1'
# queue = 'queue1'

queue_path = client.queue_path(project, location, queue)
response = client.delete_queue(name=queue_path)

What's next

To search and filter code samples for other Google Cloud products, see the Google Cloud sample browser.