Class Notification (5.8.5)

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

[Cloud Pub/Sub Notifications for Google Cloud Storage]https://cloud.google.com/storage/docs/pubsub-notifications

Inheritance

ServiceObject >Notification

Package

@google-cloud/storage!

Constructors

(constructor)(bucket, id)

constructor(bucket:Bucket,id:string);

Constructs a new instance of theNotification class

Parameters
NameDescription
bucketBucket
idstring

Methods

delete(options)

delete(options?:DeleteNotificationOptions):Promise<[Metadata]>;
Parameter
NameDescription
optionsDeleteNotificationOptions
Returns
TypeDescription
Promise<[Metadata]>

delete(options, callback)

delete(options:DeleteNotificationOptions,callback:DeleteNotificationCallback):void;
Parameters
NameDescription
optionsDeleteNotificationOptions
callbackDeleteNotificationCallback
Returns
TypeDescription
void

delete(callback)

delete(callback:DeleteNotificationCallback):void;
Parameter
NameDescription
callbackDeleteNotificationCallback
Returns
TypeDescription
void

get(options)

get(options?:GetNotificationOptions):Promise<GetNotificationResponse>;
Parameter
NameDescription
optionsGetNotificationOptions
Returns
TypeDescription
Promise<GetNotificationResponse>

get(options, callback)

get(options:GetNotificationOptions,callback:GetNotificationCallback):void;
Parameters
NameDescription
optionsGetNotificationOptions
callbackGetNotificationCallback
Returns
TypeDescription
void

get(callback)

get(callback:GetNotificationCallback):void;
Parameter
NameDescription
callbackGetNotificationCallback
Returns
TypeDescription
void

getMetadata(options)

getMetadata(options?:GetNotificationMetadataOptions):Promise<GetNotificationMetadataResponse>;
Parameter
NameDescription
optionsGetNotificationMetadataOptions
Returns
TypeDescription
Promise<GetNotificationMetadataResponse>

getMetadata(options, callback)

getMetadata(options:GetNotificationMetadataOptions,callback:MetadataCallback):void;
Parameters
NameDescription
optionsGetNotificationMetadataOptions
callbackMetadataCallback
Returns
TypeDescription
void

getMetadata(callback)

getMetadata(callback:MetadataCallback):void;
Parameter
NameDescription
callbackMetadataCallback
Returns
TypeDescription
void

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-30 UTC.