snapshots_create {googlePubsubR}R Documentation

Creates a snapshot from the requested subscription

Description

Snapshots are used in Seek 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. If the snapshot already exists, returns ALREADY_EXISTS. If the requested subscription doesn't exist, returns NOT_FOUND. If the backlog in the subscription is too old – and the resulting snapshot would expire in less than 1 hour – then FAILED_PRECONDITION is returned. See also the Snapshot.expire_time field. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription, conforming to the resource name format. The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must

Usage

snapshots_create(name, subscription, labels = NULL)

Arguments

name

Snapshot, character Required, an instance of a Snapshot object or a snapshot name

subscription

Subscription, character Required, an instance of a Subscription object or a subscription name

labels

list Key-value pairs for snapshot labels

Value

An instance of a Snapshot object

See Also

Other Snapshot functions: snapshots_delete(), snapshots_exists(), snapshots_list(), snapshots_patch()


[Package googlePubsubR version 0.0.4 Index]