- NAME
-
- gcloud alloydb users create - creates a user in a given cluster
- SYNOPSIS
-
-
gcloud alloydb users createUSERNAME--cluster=CLUSTER--region=REGION[--db-roles=[ROLE,…]] [--keep-extra-roles=KEEP_EXTRA_ROLES] [--password=PASSWORD] [--superuser=SUPERUSER] [--type=TYPE; default="BUILT_IN"] [GCLOUD_WIDE_FLAG …]
-
- DESCRIPTION
- Creates a user in a given cluster with specified username, cluster, region, type, and password.
- EXAMPLES
-
To create a new user, run:
gcloud alloydb users create my-username --cluster=my-cluster --region=us-central1 --password=postgres - POSITIONAL ARGUMENTS
-
USERNAME- AlloyDB username
- 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
-
--db-roles=[ROLE,…]- Comma separated list of database roles this new user will be granted upon creation.
--keep-extra-roles=KEEP_EXTRA_ROLES- If the user already exists and has extra roles, keep them.
--password=PASSWORD- Password for this database user.
--superuser=SUPERUSER- If true, new user will have AlloyDB superuser privileges. Default value is false.
--type=TYPE; default="BUILT_IN"-
Type corresponds to the user type.
TYPEmust be one of:BUILT_IN- This database user can authenticate via password-based authentication
IAM_BASED- This database user can authenticate via IAM-based authentication
- 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 helpfor details. - NOTES
-
These variants are also available:
gcloud alpha alloydb users creategcloud beta alloydb users create
gcloud alloydb users create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-13 UTC.