Class Notification (7.3.2)

A Notification object is created from your Bucket object using . Use it to interact with Cloud Pub/Sub notifications.

See Cloud Pub/Sub Notifications for Google Cloud Storage

Inheritance

ServiceObject < Notification , NotificationMetadata > > Notification

Package

@google-cloud/storage

Example

  const 
  
 { 
 Storage 
 } 
  
 = 
  
 require 
 ( 
 ' @google-cloud/storage 
' 
 ); 
 const 
  
 storage 
  
 = 
  
 new 
  
 Storage 
 (); 
 const 
  
 myBucket 
  
 = 
  
 storage 
 . 
 bucket 
 ( 
 'my-bucket' 
 ); 
 const 
  
 notification 
  
 = 
  
 myBucket 
 . 
  notification 
 
 ( 
 '1' 
 ); 
 

Constructors

(constructor)(bucket, id)

  constructor 
 ( 
 bucket 
 : 
  
 Bucket 
 , 
  
 id 
 : 
  
 string 
 ); 
 

Constructs a new instance of the Notification class

Parameters
Name
Description
bucket
id
string
Design a Mobile Site
View Site in Mobile | Classic
Share by: