Send feedback
Class Snapshot (2.17.0) Stay organized with collections
Save and categorize content based on your preferences.
Version 2.17.0 keyboard_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
name
Property Value
parent
parent
:
Subscription
|
PubSub
;
Property Value
Methods
create(gaxOpts)
create
(
gaxOpts
?:
CallOptions
)
:
Promise<CreateSnapshotResponse>
;
Parameter
Returns
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
delete(callback)
delete
(
callback
:
EmptyCallback
)
:
void
;
Parameter
Returns
static
formatName_
(
projectId
:
string
,
name
:
string
)
:
string
;
Parameters
Returns
seek(gaxOpts)
seek
(
gaxOpts
?:
CallOptions
)
:
Promise<SeekResponse>
;
Parameter
Returns
seek(callback)
seek
(
callback
:
SeekCallback
)
:
void
;
Parameter
Returns
seek(gaxOpts, callback)
seek
(
gaxOpts
:
CallOptions
,
callback
:
SeekCallback
)
:
void
;
Parameters
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-09-04 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-09-04 UTC."],[],[],null,[]]