mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-08 18:45:13 +00:00
285 lines
12 KiB
Text
285 lines
12 KiB
Text
NAME
|
|
gcloud database-migration connection-profiles create cloudsql - create a
|
|
Database Migration Service connection profile for Cloud SQL
|
|
|
|
SYNOPSIS
|
|
gcloud database-migration connection-profiles create cloudsql
|
|
(CONNECTION_PROFILE : --region=REGION) --source-id=SOURCE_ID
|
|
--tier=TIER
|
|
(--database-version=DATABASE_VERSION
|
|
| --database-version-name=DATABASE_VERSION_NAME)
|
|
[--activation-policy=ACTIVATION_POLICY]
|
|
[--allocated-ip-range=ALLOCATED_IP_RANGE] [--no-async]
|
|
[--authorized-networks=NETWORK,[NETWORK,...]]
|
|
[--no-auto-storage-increase] [--availability-type=AVAILABILITY_TYPE]
|
|
[--data-disk-size=DATA_DISK_SIZE] [--data-disk-type=DATA_DISK_TYPE]
|
|
[--database-flags=[FLAG=VALUE,...]] [--display-name=DISPLAY_NAME]
|
|
[--edition=EDITION] [--no-enable-ip-v4] [--labels=[KEY=VALUE,...]]
|
|
[--private-network=PRIVATE_NETWORK] [--provider=PROVIDER]
|
|
[--require-ssl] [--root-password=ROOT_PASSWORD]
|
|
[--secondary-zone=SECONDARY_ZONE]
|
|
[--storage-auto-resize-limit=STORAGE_AUTO_RESIZE_LIMIT]
|
|
[--user-labels=[KEY=VALUE,...]] [--zone=ZONE]
|
|
[--cmek-key=CMEK_KEY
|
|
: --cmek-keyring=CMEK_KEYRING --cmek-project=CMEK_PROJECT]
|
|
[GCLOUD_WIDE_FLAG ...]
|
|
|
|
DESCRIPTION
|
|
Create a Database Migration Service destination connection profile for
|
|
Cloud SQL. This will create a Cloud SQL replica. Used for PostgreSQL and
|
|
MySQL migrations.
|
|
|
|
EXAMPLES
|
|
To create a connection profile for Cloud SQL with database version MySQL
|
|
5.6:
|
|
|
|
$ gcloud database-migration connection-profiles create cloudsql \
|
|
my-profile --region=us-central1 --database-version=MYSQL_5_6 \
|
|
--source-id=cp1 --tier=db-n1-standard-1
|
|
|
|
To create a connection profile for Cloud SQL and a Cloud SQL replica with
|
|
database version PostgreSQL 10:
|
|
|
|
$ gcloud database-migration connection-profiles create cloudsql \
|
|
my-profile --region=us-central1 --database-version=POSTGRES_10 \
|
|
--source-id=cp1 --tier=db-custom-1-3840 --zone=us-central1-a
|
|
|
|
POSITIONAL ARGUMENTS
|
|
Connection profile resource - The connection profile to create. The
|
|
arguments in this group can be used to specify the attributes of this
|
|
resource. (NOTE) Some attributes are not given arguments in this group but
|
|
can be set in other ways.
|
|
|
|
To set the project attribute:
|
|
◆ provide the argument connection_profile on the command line with a
|
|
fully specified name;
|
|
◆ provide the argument --project on the command line;
|
|
◆ set the property core/project.
|
|
|
|
This must be specified.
|
|
|
|
CONNECTION_PROFILE
|
|
ID of the connection_profile or fully qualified identifier for the
|
|
connection_profile.
|
|
|
|
To set the connection_profile attribute:
|
|
▸ provide the argument connection_profile on the command line.
|
|
|
|
This positional argument must be specified if any of the other
|
|
arguments in this group are specified.
|
|
|
|
--region=REGION
|
|
The Cloud region for the connection_profile.
|
|
|
|
To set the region attribute:
|
|
▸ provide the argument connection_profile on the command line with
|
|
a fully specified name;
|
|
▸ provide the argument --region on the command line.
|
|
|
|
REQUIRED FLAGS
|
|
Connection profile resource - Database Migration Service source connection
|
|
profile ID. This represents a Cloud resource. (NOTE) Some attributes are
|
|
not given arguments in this group but can be set in other ways.
|
|
|
|
To set the project attribute:
|
|
◆ provide the argument --source-id on the command line with a fully
|
|
specified name;
|
|
◆ provide the argument --project on the command line;
|
|
◆ set the property core/project.
|
|
|
|
To set the region attribute:
|
|
◆ provide the argument --source-id on the command line with a fully
|
|
specified name;
|
|
◆ provide the argument --region on the command line.
|
|
|
|
This must be specified.
|
|
|
|
--source-id=SOURCE_ID
|
|
ID of the connection_profile or fully qualified identifier for the
|
|
connection_profile.
|
|
|
|
To set the connection_profile attribute:
|
|
▸ provide the argument --source-id on the command line.
|
|
|
|
--tier=TIER
|
|
Tier (or machine type) for this instance, for example: db-n1-standard-1
|
|
(MySQL instances) or db-custom-1-3840 (PostgreSQL instances). For more
|
|
information, see Cloud SQL Instance Settings
|
|
(https://cloud.google.com/sql/docs/mysql/instance-settings).
|
|
|
|
Exactly one of these must be specified:
|
|
|
|
--database-version=DATABASE_VERSION
|
|
Database engine type and version. DATABASE_VERSION must be one of:
|
|
MYSQL_5_7, MYSQL_5_6, MYSQL_8_0, MYSQL_8_0_18, MYSQL_8_0_26,
|
|
MYSQL_8_0_27, MYSQL_8_0_28, MYSQL_8_0_30, MYSQL_8_0_31, MYSQL_8_0_32,
|
|
MYSQL_8_0_33, MYSQL_8_0_34, MYSQL_8_0_35, MYSQL_8_0_36, MYSQL_8_0_37,
|
|
MYSQL_8_4, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12,
|
|
POSTGRES_13, POSTGRES_14, POSTGRES_15, POSTGRES_16.
|
|
|
|
--database-version-name=DATABASE_VERSION_NAME
|
|
Database version name (e.g. POSTGRES_15)
|
|
|
|
OPTIONAL FLAGS
|
|
--activation-policy=ACTIVATION_POLICY
|
|
Activation policy specifies when the instance is activated; it is
|
|
applicable only when the instance state is 'RUNNABLE'. Valid values:
|
|
|
|
ALWAYS: The instance is on, and remains so even in the absence of
|
|
connection requests.
|
|
|
|
NEVER: The instance is off; it is not activated, even if a connection
|
|
request arrives.
|
|
|
|
ACTIVATION_POLICY must be one of: ALWAYS, NEVER.
|
|
|
|
--allocated-ip-range=ALLOCATED_IP_RANGE
|
|
The name of the allocated IP range for the private IP Cloud SQL
|
|
instance. This name refers to an already allocated IP range. If set,
|
|
the instance IP will be created in the allocated range.
|
|
|
|
--no-async
|
|
Waits for the operation in progress to complete before returning.
|
|
|
|
--authorized-networks=NETWORK,[NETWORK,...]
|
|
List of external networks that are allowed to connect to the instance.
|
|
Specify values in CIDR notation, also known as 'slash' notation
|
|
(e.g.192.168.100.0/24).
|
|
|
|
--auto-storage-increase
|
|
If you enable this setting, Cloud SQL checks your available storage
|
|
every 30 seconds. If the available storage falls below a threshold
|
|
size, Cloud SQL automatically adds additional storage capacity. If the
|
|
available storage repeatedly falls below the threshold size, Cloud SQL
|
|
continues to add storage until it reaches the maximum of 64 TB.
|
|
Default: ON. Enabled by default, use --no-auto-storage-increase to
|
|
disable.
|
|
|
|
--availability-type=AVAILABILITY_TYPE
|
|
Cloud SQL availability type. AVAILABILITY_TYPE must be one of:
|
|
REGIONAL, ZONAL.
|
|
|
|
--data-disk-size=DATA_DISK_SIZE
|
|
Storage capacity available to the database, in GB. The minimum (and
|
|
default) size is 10GB.
|
|
|
|
--data-disk-type=DATA_DISK_TYPE
|
|
Type of storage. DATA_DISK_TYPE must be one of: PD_SSD, PD_HDD.
|
|
|
|
--database-flags=[FLAG=VALUE,...]
|
|
Comma-separated list of database flags to set on the instance. Use an
|
|
equals sign to separate the flag name and value. Flags without values,
|
|
like skip_grant_tables, can be written out without a value, e.g.,
|
|
skip_grant_tables=. Use on/off values for booleans. View the Instance
|
|
Resource API for allowed flags. (e.g., --database-flags
|
|
max_allowed_packet=55555 skip_grant_tables=,log_output=1).
|
|
|
|
--display-name=DISPLAY_NAME
|
|
A user-friendly name for the connection profile. The display name can
|
|
include letters, numbers, spaces, and hyphens, and must start with a
|
|
letter.
|
|
|
|
--edition=EDITION
|
|
Specifies edition. EDITION must be one of:
|
|
|
|
enterprise
|
|
Enterprise is the standard option for smaller instances.
|
|
enterprise-plus
|
|
Enterprise plus option recommended for cpu-intensive workloads.
|
|
Offers access to premium features and capabilities.
|
|
|
|
--enable-ip-v4
|
|
Whether the instance should be assigned an IPv4 address or not. Enabled
|
|
by default, use --no-enable-ip-v4 to disable.
|
|
|
|
--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.
|
|
|
|
--private-network=PRIVATE_NETWORK
|
|
Resource link for the VPC network from which the Cloud SQL instance is
|
|
accessible for private IP. For example,
|
|
/projects/myProject/global/networks/default. This setting can be
|
|
updated, but it cannot be removed after it is set.
|
|
|
|
--provider=PROVIDER
|
|
Database provider, for managed databases. PROVIDER must be one of: RDS,
|
|
CLOUDSQL.
|
|
|
|
--require-ssl
|
|
Whether SSL connections over IP should be enforced or not.
|
|
|
|
--root-password=ROOT_PASSWORD
|
|
Root Cloud SQL user's password.
|
|
|
|
--secondary-zone=SECONDARY_ZONE
|
|
Google Cloud Platform zone where the failover Cloud SQL database
|
|
instance is located. Used when the Cloud SQL database availability type
|
|
is REGIONAL (i.e. multiple zones / highly available).
|
|
|
|
--storage-auto-resize-limit=STORAGE_AUTO_RESIZE_LIMIT
|
|
Maximum size to which storage capacity can be automatically increased.
|
|
The default value is 0, which specifies that there is no limit.
|
|
|
|
--user-labels=[KEY=VALUE,...]
|
|
The resource labels for a Cloud SQL instance to use to annotate any
|
|
related underlying resources such as Compute Engine VMs. An object
|
|
containing a list of "key": "value" pairs.
|
|
|
|
--zone=ZONE
|
|
Google Cloud Platform zone where your Cloud SQL database instance is
|
|
located.
|
|
|
|
Cmek key resource - Name of the CMEK (customer-managed encryption key)
|
|
used for the connection profile. For example,
|
|
projects/myProject/locations/us-central1/keyRings/myKeyRing/cryptoKeys/myKey.
|
|
The arguments in this group can be used to specify the attributes of this
|
|
resource. (NOTE) Some attributes are not given arguments in this group but
|
|
can be set in other ways.
|
|
|
|
To set the region attribute:
|
|
◆ provide the argument --cmek-key on the command line with a fully
|
|
specified name.
|
|
|
|
--cmek-key=CMEK_KEY
|
|
ID of the cmek-key or fully qualified identifier for the cmek-key.
|
|
|
|
To set the cmek-key attribute:
|
|
▸ provide the argument --cmek-key on the command line.
|
|
|
|
This flag argument must be specified if any of the other arguments in
|
|
this group are specified.
|
|
|
|
--cmek-keyring=CMEK_KEYRING
|
|
The CMEK keyring id of the cmek-key.
|
|
|
|
To set the cmek-keyring attribute:
|
|
▸ provide the argument --cmek-key on the command line with a fully
|
|
specified name;
|
|
▸ provide the argument --cmek-keyring on the command line.
|
|
|
|
--cmek-project=CMEK_PROJECT
|
|
The Cloud project id for the cmek-key.
|
|
|
|
To set the cmek-project attribute:
|
|
▸ provide the argument --cmek-key on the command line with a fully
|
|
specified name;
|
|
▸ provide the argument --cmek-project on the command line.
|
|
|
|
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 variant is also available:
|
|
|
|
$ gcloud alpha database-migration connection-profiles create cloudsql
|
|
|