gcloud beta pubsub snapshots create

NAME
gcloud beta pubsub snapshots create - creates one or more Cloud Pub/Sub snapshots
SYNOPSIS
gcloud beta pubsub snapshots createSNAPSHOT[SNAPSHOT …]--subscription=SUBSCRIPTION[--labels=[KEY=VALUE,…]][--subscription-project=SUBSCRIPTION_PROJECT][--tags=[KEY=VALUE,…]][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Creates one or more Cloud Pub/Sub snapshots.
POSITIONAL ARGUMENTS
SNAPSHOT [SNAPSHOT …]
One or more snapshot names to create.
REQUIRED FLAGS
--subscription=SUBSCRIPTION
The subscription whose backlog the snapshot retains. Specifically, the createdsnapshot is guaranteed to retain a) The existing backlog on the subscription,i.e., the set of messages in the subscription that are unacknowledged upon thesuccessful completion of the create snapshot request, b) Any messages publishedto the subscription's topic following the successful creation of the snapshot.
OPTIONAL FLAGS
--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, andnumbers. 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, itdefaults to the currently selected cloud project.
--tags=[KEY=VALUE,…]
List of tags KEY=VALUE pairs to bind. Each item must be expressed as<tag-key-namespaced-name>=<tag-value-short-name>.Example:123/environment=production,123/costCenter=marketing
GCLOUD WIDE FLAGS
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.

NOTES
This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudpubsubsnapshotscreate
gcloudalphapubsubsnapshotscreate

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-04 UTC.