A snapshot resource. Snapshots are used in
Seek <https://cloud.google.com/pubsub/docs/replay-overview>__
operations, which allow you to manage message acknowledgments in
bulk. That is, you can set the acknowledgment state of messages in
an existing subscription to the state captured by a snapshot.
Attributes
Name
Description
name
:noindex:
str
Optional. The name of the snapshot.
topic
:noindex:
str
Optional. The name of the topic from which
this snapshot is retaining messages.
expire_time
:noindex:
google.protobuf.timestamp_pb2.Timestamp
Optional. The snapshot is guaranteed to exist up until this
time. A newly-created snapshot expires no later than 7 days
from the time of its creation. Its exact lifetime is
determined at creation by the existing backlog in the source
subscription. Specifically, the lifetime of the snapshot is
7 days - (age of oldest unacked message in the subscription).
For example, consider a subscription whose oldest unacked
message is 3 days old. If a snapshot is created from this
subscription, the snapshot -- which will always capture this
3-day-old backlog as long as the snapshot exists -- will
expire in 4 days. The service will refuse to create a
snapshot that would expire in less than 1 hour after
creation.
labels
:noindex:
MutableMapping[str, str]
Optional. See [Creating and managing labels]
(https://cloud.google.com/pubsub/docs/labels).
[[["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-08-28 UTC."],[],[],null,["# Class Snapshot (2.31.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.31.0 (latest)](/python/docs/reference/pubsub/latest/google.cloud.pubsub_v1.types.Snapshot)\n- [2.30.0](/python/docs/reference/pubsub/2.30.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.29.1](/python/docs/reference/pubsub/2.29.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.28.0](/python/docs/reference/pubsub/2.28.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.27.3](/python/docs/reference/pubsub/2.27.3/google.cloud.pubsub_v1.types.Snapshot)\n- [2.26.1](/python/docs/reference/pubsub/2.26.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.25.2](/python/docs/reference/pubsub/2.25.2/google.cloud.pubsub_v1.types.Snapshot)\n- [2.23.1](/python/docs/reference/pubsub/2.23.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.22.0](/python/docs/reference/pubsub/2.22.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.21.5](/python/docs/reference/pubsub/2.21.5/google.cloud.pubsub_v1.types.Snapshot)\n- [2.20.3](/python/docs/reference/pubsub/2.20.3/google.cloud.pubsub_v1.types.Snapshot)\n- [2.19.8](/python/docs/reference/pubsub/2.19.8/google.cloud.pubsub_v1.types.Snapshot)\n- [2.18.4](/python/docs/reference/pubsub/2.18.4/google.cloud.pubsub_v1.types.Snapshot)\n- [2.17.1](/python/docs/reference/pubsub/2.17.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.16.1](/python/docs/reference/pubsub/2.16.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.15.2](/python/docs/reference/pubsub/2.15.2/google.cloud.pubsub_v1.types.Snapshot)\n- [2.14.1](/python/docs/reference/pubsub/2.14.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.13.12](/python/docs/reference/pubsub/2.13.12/google.cloud.pubsub_v1.types.Snapshot)\n- [2.12.1](/python/docs/reference/pubsub/2.12.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.11.1](/python/docs/reference/pubsub/2.11.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.10.0](/python/docs/reference/pubsub/2.10.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.9.0](/python/docs/reference/pubsub/2.9.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.8.0](/python/docs/reference/pubsub/2.8.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.7.1](/python/docs/reference/pubsub/2.7.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.6.1](/python/docs/reference/pubsub/2.6.1/google.cloud.pubsub_v1.types.Snapshot)\n- [2.5.0](/python/docs/reference/pubsub/2.5.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.4.2](/python/docs/reference/pubsub/2.4.2/google.cloud.pubsub_v1.types.Snapshot)\n- [2.3.0](/python/docs/reference/pubsub/2.3.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.2.0](/python/docs/reference/pubsub/2.2.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.1.0](/python/docs/reference/pubsub/2.1.0/google.cloud.pubsub_v1.types.Snapshot)\n- [2.0.0](/python/docs/reference/pubsub/2.0.0/google.cloud.pubsub_v1.types.Snapshot)\n- [1.7.2](/python/docs/reference/pubsub/1.7.2/google.cloud.pubsub_v1.types.Snapshot)\n- [1.6.1](/python/docs/reference/pubsub/1.6.1/google.cloud.pubsub_v1.types.Snapshot)\n- [1.5.0](/python/docs/reference/pubsub/1.5.0/google.cloud.pubsub_v1.types.Snapshot)\n- [1.4.3](/python/docs/reference/pubsub/1.4.3/google.cloud.pubsub_v1.types.Snapshot)\n- [1.3.1](/python/docs/reference/pubsub/1.3.1/google.cloud.pubsub_v1.types.Snapshot)\n- [1.2.0](/python/docs/reference/pubsub/1.2.0/google.cloud.pubsub_v1.types.Snapshot)\n- [1.1.0](/python/docs/reference/pubsub/1.1.0/google.cloud.pubsub_v1.types.Snapshot)\n- [1.0.2](/python/docs/reference/pubsub/1.0.2/google.cloud.pubsub_v1.types.Snapshot)\n- [0.45.0](/python/docs/reference/pubsub/0.45.0/google.cloud.pubsub_v1.types.Snapshot)\n- [0.44.0](/python/docs/reference/pubsub/0.44.0/google.cloud.pubsub_v1.types.Snapshot)\n- [0.43.0](/python/docs/reference/pubsub/0.43.0/google.cloud.pubsub_v1.types.Snapshot) \n\n Snapshot(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nA snapshot resource. Snapshots are used in\n`Seek \u003chttps://cloud.google.com/pubsub/docs/replay-overview\u003e`__\noperations, which allow you to manage message acknowledgments in\nbulk. That is, you can set the acknowledgment state of messages in\nan existing subscription to the state captured by a snapshot.\n\nClasses\n-------\n\n### LabelsEntry\n\n LabelsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nThe abstract base class for a message."]]