File: //snap/google-cloud-cli/current/help/man/man1/gcloud_alpha_firestore_databases_create.1
.TH "GCLOUD_ALPHA_FIRESTORE_DATABASES_CREATE" 1
.SH "NAME"
.HP
gcloud alpha firestore databases create \- create a Google Cloud Firestore database via Firestore API
.SH "SYNOPSIS"
.HP
\f5gcloud alpha firestore databases create\fR \fB\-\-location\fR=\fILOCATION\fR [\fB\-\-database\fR=\fIDATABASE\fR;\ default="(default)"] [\fB\-\-delete\-protection\fR] [\fB\-\-edition\fR=\fIEDITION\fR;\ default="standard"] [\fB\-\-enable\-pitr\fR] [\fB\-\-kms\-key\-name\fR=\fIKMS_KEY_NAME\fR] [\fB\-\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]] [\fB\-\-type\fR=\fITYPE\fR;\ default="firestore\-native"] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "EXAMPLES"
To create a Firestore Enterprise database named \f5foo\fR in \f5nam5\fR for use
with MongoDB Compatibility.
.RS 2m
$ gcloud alpha firestore databases create \-\-database=foo \e
\-\-edition=enterprise \-\-location=nam5
.RE
To create a Firestore Native database in \f5nam5\fR.
.RS 2m
$ gcloud alpha firestore databases create \-\-location=nam5
.RE
To create a Firestore Native database in \f5us\-central1\fR with tags.
.RS 2m
$ gcloud alpha firestore databases create \-\-location=us\-central1 \e
\-\-tags=key1=value1,key2=value2
.RE
To create a Datastore Mode database in \f5us\-east1\fR.
.RS 2m
$ gcloud alpha firestore databases create \-\-location=us\-east1 \e
\-\-type=datastore\-mode
.RE
To create a Datastore Mode database in \f5us\-east1\fR with a databaseId
\f5foo\fR.
.RS 2m
$ gcloud alpha firestore databases create \-\-database=foo \e
\-\-location=us\-east1 \-\-type=datastore\-mode
.RE
To create a Firestore Native database in \f5nam5\fR with delete protection
enabled.
.RS 2m
$ gcloud alpha firestore databases create \-\-location=nam5 \e
\-\-delete\-protection
.RE
To create a Firestore Native database in \f5nam5\fR with Point In Time Recovery
(PITR) enabled.
.RS 2m
$ gcloud alpha firestore databases create \-\-location=nam5 \e
\-\-enable\-pitr
.RE
To create a Firestore Native database in \f5nam5\fR encrypted by a
Customer\-managed encryption key (CMEK).
.RS 2m
$ gcloud alpha firestore databases create \-\-location=nam5 \e
\-\-kms\-key\-name=projects/PROJECT_ID/locations/us/keyRings/\e
KEY_RING_ID/cryptoKeys/CRYPTO_KEY_ID
.RE
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-location\fR=\fILOCATION\fR
The location to operate on. Available locations are listed at
https://cloud.google.com/firestore/docs/locations.
For example, to operate on location \f5us\-east1\fR:
.RS 2m
$ gcloud alpha firestore databases create \-\-location='us\-east1'
.RE
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-database\fR=\fIDATABASE\fR; default="(default)"
The ID to use for the database, which will become the final component of the
database's resource name. If database ID is not provided, (default) will be used
as database ID.
This value should be 4\-63 characters. Valid characters are /[a\-z][0\-9]\-/
with first character a letter and the last a letter or a number. Must not be
UUID\-like /[0\-9a\-f]{8}(\-[0\-9a\-f]{4}){3}\-[0\-9a\-f]{12}/.
Using "(default)" database ID is also allowed.
.TP 2m
\fB\-\-delete\-protection\fR
Whether to enable delete protection on the created database.
If set to true, delete protection of the new database will be enabled and delete
operations will fail unless delete protection is disabled.
Default to false.
.TP 2m
\fB\-\-edition\fR=\fIEDITION\fR; default="standard"
The edition of the database. \fIEDITION\fR must be one of: \fBstandard\fR,
\fBenterprise\fR.
.TP 2m
\fB\-\-enable\-pitr\fR
Whether to enable Point In Time Recovery (PITR) on the created database.
If set to true, PITR on the new database will be enabled. By default, this
feature is not enabled.
.TP 2m
\fB\-\-kms\-key\-name\fR=\fIKMS_KEY_NAME\fR
The resource ID of a Cloud KMS key. If set, the database created will be a
Customer\-Managed Encryption Key (CMEK) database encrypted with this key. This
feature is allowlist only in initial launch.
Only a key in the same location as this database is allowed to be used for
encryption. For Firestore's nam5 multi\-region, this corresponds to Cloud KMS
location us. For Firestore's eur3 multi\-region, this corresponds to Cloud KMS
location europe. See https://cloud.google.com/kms/docs/locations.
This value should be the KMS key resource ID in the format of
\f5projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\fR.
How to retrieve this resource ID is listed at
https://cloud.google.com/kms/docs/getting\-resource\-ids#getting_the_id_for_a_key_and_version.
.TP 2m
\fB\-\-tags\fR=[\fIKEY\fR=\fIVALUE\fR,...]
Tags to attach to the destination database. Example:
\-\-tags=key1=value1,key2=value2
For example, to attach tags to a database:
$ \-\-tags=key1=value1,key2=value2
.TP 2m
\fB\-\-type\fR=\fITYPE\fR; default="firestore\-native"
The type of the database. \fITYPE\fR must be one of: \fBfirestore\-native\fR,
\fBdatastore\-mode\fR.
.RE
.sp
.SH "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 \fB$ gcloud help\fR for details.
.SH "NOTES"
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:
.RS 2m
$ gcloud firestore databases create
.RE
.RS 2m
$ gcloud beta firestore databases create
.RE