- NAME
-
- gcloud sql generate-login-token - generate an IAM login token for Cloud SQL
- SYNOPSIS
-
-
gcloud sql generate-login-token
[--application-default-credential
] [--instance
=INSTANCE
,-i
INSTANCE
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
- gcloud sql generate-login-token generates an IAM token to use for logging in to Cloud SQL instances.
- EXAMPLES
-
To generate an IAM login token using gcloud credentials, run:
gcloud sql generate-login-token
To generate an IAM login token using application default credentials, run:
gcloud sql generate-login-token --application-default-credential
To generate an IAM login token using gcloud credentials for instance
my-instance
, run:gcloud sql generate-login-token --instance=my-instance
To generate an IAM login token using application default credentials for instance
my-instance
, run:gcloud sql generate-login-token --instance=my-instance --application-default-credential
- FLAGS
-
--application-default-credential
- Use application default credentials to generate the login token.
--instance
=INSTANCE
,-i
INSTANCE
- 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 help
for details. - NOTES
-
These variants are also available:
gcloud alpha sql generate-login-token
gcloud beta sql generate-login-token
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 2024-02-06 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-02-06 UTC.",
"state": ""
}