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

Function createNotification

storage/createNotification.js:46–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 const storage = new Storage();
45
46 async function createNotification() {
47 try {
48 // Creates a notification
49 await storage.bucket(bucketName).createNotification(topic);
50
51 console.log('Notification subscription created.');
52 } catch (error) {
53 console.error(
54 'Error executing create notification:',
55 error.message || error
56 );
57 }
58 }
59
60 createNotification();
61 // [END storage_create_bucket_notifications]

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected