gcloud alpha firestore databases connection-string

NAME
gcloud alpha firestore databases connection-string - prints the mongo connection string for the given Firestore database
SYNOPSIS
gcloud alpha firestore databases connection-string--database=DATABASE[--auth=AUTH; default="none"    |--validate=VALIDATE][GCLOUD_WIDE_FLAG]
EXAMPLES
To get the connection string for a Firestore database with a databaseIdtestdb without auth configuration.
gcloudalphafirestoredatabasesconnection-string--database=testdb--auth=none

To get the connection string for a Firestore database with a databaseIdtestdb with Google Compute Engine VM auth.

gcloudalphafirestoredatabasesconnection-string--database=testdb--auth=gce-vm
REQUIRED FLAGS
--database=DATABASE
The database to operate on.

For example, to operate on databasefoo:

gcloudalphafirestoredatabasesconnection-string--database='foo'
OPTIONAL FLAGS
At most one of these can be specified:
--auth=AUTH; default="none"
The auth configuration for the connection string.

If connecting from a Google Compute Engine VM, usegce-vm. Forshort term access using the gcloud CLI's access token, useaccess-token. For password auth use scram-sha-256. Otherwise, usenone and configure auth manually.

AUTH must be one of:none,gce-vm,access-token,scram-sha-256.

--validate=VALIDATE
Validate the specified connection string for the current database. This commandchecks that the connection string is well formed, contains the requiredparameters, and specifies correct configuration values for the current database.
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 alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudfirestoredatabasesconnection-string
gcloudbetafirestoredatabasesconnection-string

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-08-19 UTC.