mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-08 18:45:13 +00:00
124 lines
5 KiB
Text
124 lines
5 KiB
Text
NAME
|
|
gcloud database-migration connection-profiles create postgresql - create a
|
|
Database Migration Service connection profile for PostgreSQL
|
|
|
|
SYNOPSIS
|
|
gcloud database-migration connection-profiles create postgresql
|
|
(CONNECTION_PROFILE : --region=REGION) --host=HOST --port=PORT
|
|
--username=USERNAME (--password=PASSWORD | --prompt-for-password)
|
|
[--no-async] [--cloudsql-instance=CLOUDSQL_INSTANCE]
|
|
[--display-name=DISPLAY_NAME] [--labels=[KEY=VALUE,...]]
|
|
[--ca-certificate=CA_CERTIFICATE
|
|
: --client-certificate=CLIENT_CERTIFICATE --private-key=PRIVATE_KEY]
|
|
[GCLOUD_WIDE_FLAG ...]
|
|
|
|
DESCRIPTION
|
|
Create a Database Migration Service connection profile for PostgreSQL.
|
|
|
|
EXAMPLES
|
|
To create a connection profile for PostgreSQL:
|
|
|
|
$ gcloud database-migration connection-profiles create postgresql \
|
|
my-profile --region=us-central1 --password=123456 \
|
|
--username=my-user --host=1.2.3.4 --port=5432
|
|
|
|
If the source is a Cloud SQL database, run:
|
|
|
|
$ gcloud database-migration connection-profiles create postgresql \
|
|
my-profile --region=us-central1 --password=123456 \
|
|
--username=my-user --host=1.2.3.4 --port=5432 \
|
|
--cloudsql-instance=my-instance
|
|
|
|
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
|
|
--host=HOST
|
|
IP or hostname of the source database.
|
|
|
|
--port=PORT
|
|
Network port of the source database.
|
|
|
|
--username=USERNAME
|
|
Username that Database Migration Service uses to connect to the
|
|
database. Database Migration Service encrypts the value when storing
|
|
it.
|
|
|
|
Exactly one of these must be specified:
|
|
|
|
--password=PASSWORD
|
|
Password for the user that Database Migration Service uses to connect
|
|
to the source database. Database Migration Service encrypts the value
|
|
when storing it, and the field is not returned on request.
|
|
|
|
--prompt-for-password
|
|
Prompt for the password used to connect to the database.
|
|
|
|
OPTIONAL FLAGS
|
|
--no-async
|
|
Waits for the operation in progress to complete before returning.
|
|
|
|
--cloudsql-instance=CLOUDSQL_INSTANCE
|
|
If the source is a Cloud SQL database, use this field to provide the
|
|
Cloud SQL instance ID of the source.
|
|
|
|
--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.
|
|
|
|
--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.
|
|
|
|
--ca-certificate=CA_CERTIFICATE
|
|
x509 PEM-encoded certificate of the CA that signed the source database
|
|
server's certificate. The replica will use this certificate to verify
|
|
it's connecting to the correct host. Database Migration Service
|
|
encrypts the value when storing it.
|
|
|
|
--client-certificate=CLIENT_CERTIFICATE
|
|
x509 PEM-encoded certificate that will be used by the replica to
|
|
authenticate against the source database server. Database Migration
|
|
Service encrypts the value when storing it.
|
|
|
|
--private-key=PRIVATE_KEY
|
|
Unencrypted PKCS#1 or PKCS#8 PEM-encoded private key associated with
|
|
the Client Certificate. Database Migration Service encrypts the value
|
|
when storing it.
|
|
|
|
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.
|