gcloud beta sql generate-login-token Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta sql generate-login-token - generate an IAM login token for Cloud SQL
- SYNOPSIS
gcloud beta sql generate-login-token[--application-default-credential][--instance=INSTANCE,-iINSTANCE][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(BETA)gcloud beta sql generate-login-token generates an IAM tokento use for logging in to Cloud SQL instances.- EXAMPLES
- To generate an IAM login token using gcloud credentials, run:
gcloudbetasqlgenerate-login-tokenTo generate an IAM login token using application default credentials, run:
gcloudbetasqlgenerate-login-token--application-default-credentialTo generate an IAM login token using gcloud credentials for instance
my-instance, run:gcloudbetasqlgenerate-login-token--instance=my-instanceTo generate an IAM login token using application default credentials forinstance
my-instance, run:gcloudbetasqlgenerate-login-token--instance=my-instance--application-default-credential - FLAGS
--application-default-credential- Use application default credentials to generate the login token.
--instance=INSTANCE,-iINSTANCE- Cloud SQL instance ID.
- 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
- This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudsqlgenerate-login-tokengcloudalphasqlgenerate-login-token
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.