class Google::Apis::PubsubV1::Snapshot

A snapshot resource. Snapshots are used in [Seek](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

expire_time[RW]

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. Corresponds to the JSON property `expireTime` @return [String]

labels[RW]

See [Creating and managing labels] (cloud.google.com/pubsub/docs/ labels). Corresponds to the JSON property `labels` @return [Hash<String,String>]

name[RW]

The name of the snapshot. Corresponds to the JSON property `name` @return [String]

topic[RW]

The name of the topic from which this snapshot is retaining messages. Corresponds to the JSON property `topic` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/pubsub_v1/classes.rb, line 1216
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/pubsub_v1/classes.rb, line 1221
def update!(**args)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @labels = args[:labels] if args.key?(:labels)
  @name = args[:name] if args.key?(:name)
  @topic = args[:topic] if args.key?(:topic)
end