gcloud pubsub snapshots create - creates one or more Cloud Pub/Sub snapshots
gcloud pubsub snapshots create SNAPSHOT [SNAPSHOT ...] --subscription=SUBSCRIPTION [--labels=[KEY=VALUE,...]] [--subscription-project=SUBSCRIPTION_PROJECT] [GCLOUD_WIDE_FLAG ...]
Creates one or more Cloud Pub/Sub snapshots.
- SNAPSHOT [SNAPSHOT ...]
One or more snapshot names to create.
- --subscription=SUBSCRIPTION
The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain a) The existing backlog on the subscription, i.e., the set of messages in the subscription that are unacknowledged upon the successful completion of the create snapshot request, b) Any messages published to the subscription's topic following the successful creation of the snapshot.
- --labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens (-), underscores (_), lowercase characters, and numbers. Values must contain only hyphens (-), underscores (_), lowercase characters, and numbers.
- --subscription-project=SUBSCRIPTION_PROJECT
The name of the project the provided subscription belongs to. If not set, it defaults to the currently selected cloud project.
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
These variants are also available:
$ gcloud alpha pubsub snapshots create
$ gcloud beta pubsub snapshots create