mirror of
https://github.com/imjasonh/gcloud-help
synced 2026-07-20 04:58:26 +00:00
gcloud: Wed Apr 8 12:08:12 UTC 2026
This commit is contained in:
parent
89a3bc9276
commit
5b03e16435
766 changed files with 29847 additions and 8950 deletions
112
gcloud/beta/alloydb/connect
Normal file
112
gcloud/beta/alloydb/connect
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
NAME
|
||||
gcloud beta alloydb connect - connect to an AlloyDB instance using the
|
||||
AlloyDB Auth Proxy
|
||||
|
||||
SYNOPSIS
|
||||
gcloud beta alloydb connect INSTANCE --cluster=CLUSTER --region=REGION
|
||||
[--database=DATABASE, -d DATABASE] [--port=PORT; default=9471]
|
||||
[--auto-iam-authn | --user=USER, -u USER] [--psc | --public-ip]
|
||||
[GCLOUD_WIDE_FLAG ...]
|
||||
|
||||
DESCRIPTION
|
||||
(BETA) Connects to an AlloyDB instance using the AlloyDB Auth Proxy and
|
||||
psql.
|
||||
|
||||
EXAMPLES
|
||||
To connect to an AlloyDB instance using the postgres user and database over
|
||||
private IP, run:
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1
|
||||
|
||||
To connect over public IP, run:
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1 --public-ip
|
||||
|
||||
To connect over Private Service Connect, run:
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1 --psc
|
||||
|
||||
To connect with a particular user and database, run:
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1 --user mydbuser --database mydatabase
|
||||
|
||||
To connect with Auto IAM Authentication using your authenticated gcloud
|
||||
user, run
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1 --auto-iam-authn
|
||||
|
||||
To use an impersonated service account with the AlloyDB Auth Proxy, run:
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1 \
|
||||
--impersonate-service-account \
|
||||
impersonated@myproject.iam.gserviceaccount.com
|
||||
|
||||
NOTE: the impersonated service account will be used by the Auth Proxy to
|
||||
retrieve connection info, but will not be used for authenticating to the
|
||||
database. To also authenticate to the database as the impersonated user,
|
||||
add the --auto-iam-authn flag.
|
||||
|
||||
To use an impersonated service account with the AlloyDB Auth Proxy and
|
||||
authenticate to your database with the same impersonated user, run:
|
||||
|
||||
$ gcloud beta alloydb connect my-instance --cluster=my-cluster \
|
||||
--region=us-central1 \
|
||||
--impersonate-service-account \
|
||||
impersonated@myproject.iam.gserviceaccount.com --auto-iam-authn
|
||||
|
||||
POSITIONAL ARGUMENTS
|
||||
INSTANCE
|
||||
AlloyDB instance ID
|
||||
|
||||
REQUIRED FLAGS
|
||||
--cluster=CLUSTER
|
||||
AlloyDB cluster ID
|
||||
|
||||
--region=REGION
|
||||
Regional location (e.g. asia-east1, us-east1). See the full list of
|
||||
regions at https://cloud.google.com/sql/docs/instance-locations.
|
||||
|
||||
OPTIONAL FLAGS
|
||||
--database=DATABASE, -d DATABASE
|
||||
The AlloyDB database to connect to
|
||||
|
||||
--port=PORT; default=9471
|
||||
Port number used by the AlloyDB Auth Proxy to start a localhost
|
||||
listener
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--auto-iam-authn
|
||||
Enables Auto IAM authentication
|
||||
|
||||
--user=USER, -u USER
|
||||
Built-in database user to connect to the database as
|
||||
|
||||
At most one of these can be specified:
|
||||
|
||||
--psc
|
||||
Connect to the AlloyDB instance using Private Service Connect.
|
||||
|
||||
--public-ip
|
||||
Connect to the AlloyDB instance with Public IP
|
||||
|
||||
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. This
|
||||
variant is also available:
|
||||
|
||||
$ gcloud alpha alloydb connect
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue