Class Snapshot (2.17.0)
Stay organized with collections
Save and categorize content based on your preferences.
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
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 2024-05-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]