1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-08 10:35:03 +00:00
gcloud-help/gcloud/spanner/instance-configs/create

165 lines
5.8 KiB
Text
Raw Normal View History

2022-10-05 10:40:53 +00:00
NAME
gcloud spanner instance-configs create - create a Cloud Spanner instance
configuration
SYNOPSIS
gcloud spanner instance-configs create INSTANCE_CONFIG
(--base-config=BASE_CONFIG --replicas=location=LOCATION,type=TYPE:[...]
| [--clone-config=INSTANCE_CONFIG
: --add-replicas=location=LOCATION,type=TYPE:[...]
--skip-replicas=location=LOCATION,type=TYPE:[...]]) [--async]
[--display-name=DISPLAY_NAME] [--etag=ETAG] [--labels=[KEY=VALUE,...]]
[--validate-only] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Create a Cloud Spanner instance configuration.
EXAMPLES
To create a custom Cloud Spanner instance configuration based on an
2024-09-18 09:49:45 +00:00
existing Google-managed configuration (nam3) by adding a READ_ONLY type
replica in location us-east4, run:
2022-10-05 10:40:53 +00:00
$ gcloud spanner instance-configs create custom-instance-config \
--clone-config=nam3 \
--add-replicas=location=us-east4,type=READ_ONLY
2022-10-18 11:38:19 +00:00
To create a custom Cloud Spanner instance configuration based on another
2024-09-18 09:49:45 +00:00
custom configuration (custom-instance-config) by adding a READ_ONLY type
replica in location us-east1 and removing a READ_ONLY type replica in
location us-east4, run:
2022-10-05 10:40:53 +00:00
2022-10-18 11:38:19 +00:00
$ gcloud spanner instance-configs create custom-instance-config1 \
--clone-config=custom-instance-config \
--add-replicas=location=us-east1,type=READ_ONLY \
--skip-replicas=location=us-east4,type=READ_ONLY
2022-10-05 10:40:53 +00:00
POSITIONAL ARGUMENTS
INSTANCE_CONFIG
Cloud Spanner instance configuration. The 'custom-' prefix is required
to avoid name conflicts with Google-managed configurations.
REQUIRED FLAGS
Exactly one of these must be specified:
Command-line flags to setup a custom instance configuration replicas:
--base-config=BASE_CONFIG
The name of the Google-managed instance configuration, based on
which your custom configuration is created.
This flag argument must be specified if any of the other arguments
in this group are specified.
--replicas=location=LOCATION,type=TYPE:[...]
The geographic placement of nodes in this instance configuration
and their replication types.
location
The location of the serving resources, e.g. "us-central1".
type
The type of replica.
Items in the list are separated by ":". The allowed values and
formats are as follows.
READ_ONLY
Read-only replicas only support reads (not writes). Read-only
replicas:
▫ Maintain a full copy of your data.
▫ Serve reads.
▫ Do not participate in voting to commit writes.
▫ Are not eligible to become a leader.
READ_WRITE
Read-write replicas support both reads and writes. These replicas:
▫ Maintain a full copy of your data.
▫ Serve reads.
▫ Can vote whether to commit a write.
▫ Participate in leadership election.
▫ Are eligible to become a leader.
WITNESS
Witness replicas don't support reads but do participate in voting
to commit writes. Witness replicas:
▫ Do not maintain a full copy of data.
▫ Do not serve reads.
▫ Vote whether to commit writes.
▫ Participate in leader election but are not eligible to become
leader.
This flag argument must be specified if any of the other arguments
in this group are specified.
Command-line flags to setup a custom instance configuration using clone
options:
--clone-config=INSTANCE_CONFIG
The ID of the instance config, based on which this configuration is
created. The clone is an independent copy of this config. Available
configurations can be found by running "gcloud spanner
instance-configs list"
This flag argument must be specified if any of the other arguments
in this group are specified.
--add-replicas=location=LOCATION,type=TYPE:[...]
Add new replicas while cloning from the source config.
--skip-replicas=location=LOCATION,type=TYPE:[...]
Skip replicas from the source config while cloning. Each replica in
the list must exist in the source config replicas list.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--display-name=DISPLAY_NAME
The name of this instance configuration as it appears in UIs. Must
specify this option if creating an instance-config with --replicas.
--etag=ETAG
Used for optimistic concurrency control.
--labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to add.
Keys must start with a lowercase character and contain only hyphens
(-), underscores (_), lowercase characters, and numbers. Values must
contain only hyphens (-), underscores (_), lowercase characters, and
numbers.
--validate-only
2024-09-18 09:49:45 +00:00
If specified, validate that the creation will succeed without creating
the instance configuration.
2022-10-05 10:40:53 +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
These variants are also available:
$ gcloud alpha spanner instance-configs create
$ gcloud beta spanner instance-configs create