MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / listQueues

Function listQueues

cloud-tasks/snippets/listQueues.js:28–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 const client = new cloudTasks.CloudTasksClient();
27
28 async function listQueues() {
29 // Get the fully qualified path to the region
30 const parent = client.locationPath(project, location);
31
32 // list all fo the queues
33 const [queues] = await client.listQueues({parent});
34
35 if (queues.length > 0) {
36 console.log('Queues:');
37 queues.forEach(queue => {
38 console.log(` ${queue.name}`);
39 });
40 } else {
41 console.log('No queues found!');
42 }
43 }
44 listQueues();
45 // [END cloud_tasks_list_queues]
46}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected