1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-11 07:29:40 +00:00
gcloud-help/gcloud/beta/firestore/databases/create

94 lines
3.2 KiB
Text
Raw Normal View History

2022-03-01 04:29:52 +00:00
NAME
gcloud beta firestore databases create - create a Google Cloud Firestore
2023-03-01 10:23:17 +00:00
database via Firestore API
2022-03-01 04:29:52 +00:00
SYNOPSIS
2023-03-01 10:23:17 +00:00
gcloud beta firestore databases create --location=LOCATION
2023-09-07 10:42:28 +00:00
[--database=DATABASE; default="(default)"] [--delete-protection]
2023-10-11 10:37:28 +00:00
[--enable-pitr] [--type=TYPE; default="firestore-native"]
[GCLOUD_WIDE_FLAG ...]
2022-03-01 04:29:52 +00:00
EXAMPLES
2023-05-04 10:43:54 +00:00
To create a Firestore Native database in nam5.
2023-03-01 10:23:17 +00:00
$ gcloud beta firestore databases create --location=nam5
2023-05-04 10:43:54 +00:00
To create a Datastore Mode database in us-east1.
2023-03-01 10:23:17 +00:00
$ gcloud beta firestore databases create --location=us-east1 \
--type=datastore-mode
2024-01-10 10:17:49 +00:00
To create a Datastore Mode database in us-east1 with a databaseId foo.
2022-03-01 04:29:52 +00:00
2023-05-04 10:43:54 +00:00
$ gcloud beta firestore databases create --database=foo \
2023-03-01 10:23:17 +00:00
--location=us-east1 --type=datastore-mode
2022-03-01 04:29:52 +00:00
2023-09-07 10:42:28 +00:00
To create a Firestore Native database in nam5 with delete protection
enabled.
$ gcloud beta firestore databases create --location=nam5 \
--delete-protection
2023-10-11 10:37:28 +00:00
To create a Firestore Native database in nam5 with Point In Time Recovery
(PITR) enabled.
$ gcloud beta firestore databases create --location=nam5 \
--enable-pitr
2023-03-01 10:23:17 +00:00
REQUIRED FLAGS
--location=LOCATION
2023-06-08 11:29:23 +00:00
The location to operate on. Available locations are listed at
2023-03-01 10:23:17 +00:00
https://cloud.google.com/firestore/docs/locations.
2022-03-01 04:29:52 +00:00
2023-06-08 11:29:23 +00:00
For example, to operate on location us-east1:
$ gcloud beta firestore databases create --location='us-east1'
2023-03-01 10:23:17 +00:00
OPTIONAL FLAGS
--database=DATABASE; 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.
2022-08-10 08:48:58 +00:00
2023-03-01 10:23:17 +00:00
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}/.
2022-08-10 08:48:58 +00:00
2023-03-01 10:23:17 +00:00
Using "(default)" database ID is also allowed.
2022-03-01 04:29:52 +00:00
2023-09-07 10:42:28 +00:00
--delete-protection
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.
2023-10-11 10:37:28 +00:00
--enable-pitr
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.
2023-03-01 10:23:17 +00:00
--type=TYPE; default="firestore-native"
The type of the database. TYPE must be one of: firestore-native,
datastore-mode.
2022-03-01 04:29:52 +00:00
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. These
variants are also available:
$ gcloud firestore databases create
$ gcloud alpha firestore databases create