mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-14 00:54:56 -05:00
## Description --- This change introduces the `DefaultProject` field for the `alloydb-admin` and `cloud-sql-admin` sources. This field allows the alloydb and cloud sql control plane tools to use the project value from the environment variables (Ex: `ALLOYDB_POSTGRES_PROJECT`) if it is already set instead of asking the user. ## PR Checklist --- > Thank you for opening a Pull Request! Before submitting your PR, there are a > few things you can do to make sure it goes smoothly: - [x] Make sure you reviewed [CONTRIBUTING.md](https://github.com/googleapis/genai-toolbox/blob/main/CONTRIBUTING.md) - [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/genai-toolbox/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [x] Ensure the tests and linter pass - [x] Code coverage does not decrease (if any source code was changed) - [x] Appropriate docs were updated (if necessary) - [x] Make sure to add `!` if this involve a breaking change 🛠️ Fixes: https://github.com/gemini-cli-extensions/alloydb/issues/47 --------- Co-authored-by: Averi Kitsch <akitsch@google.com>
43 lines
1.9 KiB
Markdown
43 lines
1.9 KiB
Markdown
---
|
|
title: Cloud SQL Admin
|
|
type: docs
|
|
weight: 1
|
|
description: "A \"cloud-sql-admin\" source provides a client for the Cloud SQL Admin API.\n"
|
|
aliases: [/resources/sources/cloud-sql-admin]
|
|
---
|
|
|
|
## About
|
|
|
|
The `cloud-sql-admin` source provides a client to interact with the [Google
|
|
Cloud SQL Admin API](https://cloud.google.com/sql/docs/mysql/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:
|
|
|
|
1. **Application Default Credentials (ADC):** By default, the source uses ADC
|
|
to authenticate with the API.
|
|
2. **Client-side OAuth:** If `useClientOAuth` is set to `true`, the source will
|
|
expect an OAuth 2.0 access token to be provided by the client (e.g., a web
|
|
browser) for each request.
|
|
|
|
## Example
|
|
|
|
```yaml
|
|
sources:
|
|
my-cloud-sql-admin:
|
|
kind: cloud-sql-admin
|
|
|
|
my-oauth-cloud-sql-admin:
|
|
kind: cloud-sql-admin
|
|
useClientOAuth: true
|
|
```
|
|
|
|
## Reference
|
|
|
|
| **field** | **type** | **required** | **description** |
|
|
| -------------- | :------: | :----------: | ---------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| kind | 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`. |
|