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

Function createQueue

cloud-tasks/snippets/createQueue.js:32–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 const client = new cloudTasks.CloudTasksClient();
31
32 async function createQueue() {
33 // Send create queue request.
34 const [response] = await client.createQueue({
35 // The fully qualified path to the location where the queue is created
36 parent: client.locationPath(project, location),
37 queue: {
38 // The fully qualified path to the queue
39 name: client.queuePath(project, location, queue),
40 appEngineHttpQueue: {
41 appEngineRoutingOverride: {
42 // The App Engine service that will receive the tasks.
43 service: 'default',
44 },
45 },
46 },
47 });
48 console.log(`Created queue ${response.name}`);
49 }
50 createQueue();
51 // [END cloud_tasks_create_queue]
52}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected