Cloud SQL Admin Source
A “cloud-sql-admin” source provides a client for the Cloud SQL Admin API.
2 minute read
About
The cloud-sql-admin source provides a client to interact with the Google
Cloud SQL Admin API. This
allows tools to perform administrative tasks on Cloud SQL instances, such as
creating users and databases.
Authentication can be handled in two ways:
- Application Default Credentials (ADC): By default, the source uses ADC to authenticate with the API.
- Client-side OAuth: If
useClientOAuthis set totrue, the source will expect an OAuth 2.0 access token to be provided by the client (e.g., a web browser) for each request.
Available Tools
Cloud SQL Admin Source Tools
| Tool Name | Description |
|---|---|
| cloud-sql-list-databases Tool | List Cloud SQL databases in an instance. |
| cloud-sql-list-instances Tool | List Cloud SQL instances in a project. |
| cloud-sql-mysql-create-instance Tool | Create a Cloud SQL for MySQL instance. |
| cloud-sql-clone-instance Tool | Clone a Cloud SQL instance. |
| cloud-sql-create-backup Tool | Creates a backup on a Cloud SQL instance. |
| cloud-sql-create-database Tool | Create a new database in a Cloud SQL instance. |
| cloud-sql-create-users Tool | Create a new user in a Cloud SQL instance. |
| cloud-sql-get-instance Tool | Get a Cloud SQL instance resource. |
| cloud-sql-mssql-create-instance Tool | Create a Cloud SQL for SQL Server instance. |
| cloud-sql-postgres-create-instance Tool | Create a Cloud SQL for PostgreSQL instance. |
| cloud-sql-restore-backup Tool | Restores a backup of a Cloud SQL instance. |
| cloud-sql-wait-for-operation Tool | Wait for a long-running Cloud SQL operation to complete. |
| postgres-upgrade-precheck Tool | Perform a pre-check for a Cloud SQL for PostgreSQL major version upgrade. |
Example
kind: sources
name: my-cloud-sql-admin
type: cloud-sql-admin
---
kind: sources
name: my-oauth-cloud-sql-admin
type: cloud-sql-admin
useClientOAuth: true
Reference
| field | type | required | description |
|---|---|---|---|
| type | string | true | Must be “cloud-sql-admin”. |
| defaultProject | string | false | The Google Cloud project ID to use for Cloud SQL infrastructure tools. |
| useClientOAuth | boolean | false | If true, the source will use client-side OAuth for authorization. Otherwise, it will use Application Default Credentials. Defaults to false. |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.