Send feedback
Class Snapshot (2.17.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.17.0keyboard_arrow_down
A Snapshot object will give you access to your Cloud Pub/Sub snapshot.
Snapshots are sometimes retrieved when using various methods:
Snapshots may be created with:
-
Package
@google-cloud/pubsub!
Constructors
(constructor)(parent, name)
constructor ( parent : Subscription | PubSub , name : string );
Constructs a new instance of the Snapshot
class
Parameters
Properties
metadata ?: google . pubsub . v1 . ISnapshot ;
Property Value
Type
Description
google.pubsub.v1.ISnapshot
name
Property Value
parent
parent : Subscription | PubSub ;
Property Value
Methods
create(gaxOpts)
create ( gaxOpts ?: CallOptions ) : Promise<CreateSnapshotResponse> ;
Parameter
Name
Description
gaxOpts
CallOptions
Returns
Type
Description
Promise <CreateSnapshotResponse >
create(callback)
create ( callback : CreateSnapshotCallback ) : void ;
Parameter
Name
Description
callback
CreateSnapshotCallback
Returns
create(gaxOpts, callback)
create ( gaxOpts : CallOptions , callback : CreateSnapshotCallback ) : void ;
Parameters
Name
Description
gaxOpts
CallOptions
callback
CreateSnapshotCallback
Returns
delete()
delete () : Promise<EmptyResponse> ;
Returns
Type
Description
Promise <EmptyResponse >
delete(callback)
delete ( callback : EmptyCallback ) : void ;
Parameter
Name
Description
callback
EmptyCallback
Returns
static formatName_ ( projectId : string , name : string ) : string ;
Parameters
Name
Description
projectId
string
name
string
Returns
seek(gaxOpts)
seek ( gaxOpts ?: CallOptions ) : Promise<SeekResponse> ;
Parameter
Name
Description
gaxOpts
CallOptions
Returns
Type
Description
Promise <SeekResponse >
seek(callback)
seek ( callback : SeekCallback ) : void ;
Parameter
Name
Description
callback
SeekCallback
Returns
seek(gaxOpts, callback)
seek ( gaxOpts : CallOptions , callback : SeekCallback ) : void ;
Parameters
Name
Description
gaxOpts
CallOptions
callback
SeekCallback
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[],[]]