- NAME
-
- gcloud beta firestore change-streams create - create a Cloud Firestore change stream
- SYNOPSIS
-
-
gcloud beta firestore change-streams createCHANGE_STREAM(--collection-group-scope=COLLECTION_GROUP_ID|--database-scope) [--database=DATABASE; default="(default)"] [--retention=RETENTION; default="7d"] [GCLOUD_WIDE_FLAG …]
-
- EXAMPLES
-
To create a database-scoped change stream named
my-streamin databasemy-db:gcloud beta firestore change-streams create my-stream --database=my-db --database-scopeTo create a collection-group-scoped change stream named
my-cg-streamfor collection groupmy-cgin databasemy-dbwith a retention period of 1 day:gcloud beta firestore change-streams create my-cg-stream --database=my-db --collection-group-scope=my-cg --retention=1d - POSITIONAL ARGUMENTS
-
CHANGE_STREAM- The ID of the change stream.
- REQUIRED FLAGS
-
-
Exactly one of these must be specified:
--collection-group-scope=COLLECTION_GROUP_ID- Create a collection-group-scoped change stream for the specified collection group (e.g., --collection-group-scope=my-collection-group).
--database-scope- Create a database-scoped change stream.
-
Exactly one of these must be specified:
- OPTIONAL FLAGS
-
--database=DATABASE; default="(default)"-
The database to operate on. The default value is
(default).For example, to operate on database
foo:gcloud beta firestore change-streams create --database='foo' --retention=RETENTION; default="7d"- The retention period of the change stream (e.g. 1d, 7d). Must be between 1 and 7 days, in day granularity. Default is 7d.
- 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 helpfor details. - NOTES
-
This command is currently in beta and might change without notice. This variant
is also available:
gcloud alpha firestore change-streams create
gcloud beta firestore change-streams create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-09-09 UTC.