mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-08 18:45:13 +00:00
111 lines
4.4 KiB
Text
111 lines
4.4 KiB
Text
NAME
|
|
gcloud alpha firestore databases create - create a Google Cloud Firestore
|
|
database via Firestore API
|
|
|
|
SYNOPSIS
|
|
gcloud alpha firestore databases create --location=LOCATION
|
|
[--database=DATABASE; default="(default)"] [--delete-protection]
|
|
[--enable-pitr] [--kms-key-name=KMS_KEY_NAME]
|
|
[--type=TYPE; default="firestore-native"] [GCLOUD_WIDE_FLAG ...]
|
|
|
|
EXAMPLES
|
|
To create a Firestore Native database in nam5.
|
|
|
|
$ gcloud alpha firestore databases create --location=nam5
|
|
|
|
To create a Datastore Mode database in us-east1.
|
|
|
|
$ gcloud alpha firestore databases create --location=us-east1 \
|
|
--type=datastore-mode
|
|
|
|
To create a Datastore Mode database in us-east1 with a databaseId foo.
|
|
|
|
$ gcloud alpha firestore databases create --database=foo \
|
|
--location=us-east1 --type=datastore-mode
|
|
|
|
To create a Firestore Native database in nam5 with delete protection
|
|
enabled.
|
|
|
|
$ gcloud alpha firestore databases create --location=nam5 \
|
|
--delete-protection
|
|
|
|
To create a Firestore Native database in nam5 with Point In Time Recovery
|
|
(PITR) enabled.
|
|
|
|
$ gcloud alpha firestore databases create --location=nam5 \
|
|
--enable-pitr
|
|
|
|
REQUIRED FLAGS
|
|
--location=LOCATION
|
|
The location to operate on. Available locations are listed at
|
|
https://cloud.google.com/firestore/docs/locations.
|
|
|
|
For example, to operate on location us-east1:
|
|
|
|
$ gcloud alpha firestore databases create --location='us-east1'
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
--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.
|
|
|
|
--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.
|
|
|
|
--kms-key-name=KMS_KEY_NAME
|
|
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 the 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
|
|
`projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.
|
|
How to retrive this resource ID is listed at https://cloud.google.com/kms/docs/getting-resource-ids#getting_the_id_for_a_key_and_version.
|
|
|
|
--type=TYPE; default="firestore-native"
|
|
The type of the database. TYPE must be one of: firestore-native,
|
|
datastore-mode.
|
|
|
|
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 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:
|
|
|
|
$ gcloud firestore databases create
|
|
|
|
$ gcloud beta firestore databases create
|
|
|