mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-05 20:54:56 -05:00
## Description This pull request adds a new tool, cloud-sql-create-backup, which enables taking a backup on a Cloud SQL instance from the toolbox using the Cloud SQL Admin API. The tool supports optionally supplying a location or description for the backup. Tested: <img width="1561" height="425" alt="image" src="https://github.com/user-attachments/assets/c8984b07-5450-470a-9ac6-df16943e25e9" /> ## 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 #2140 --------- Co-authored-by: Yuan Teoh <45984206+Yuan325@users.noreply.github.com> Co-authored-by: Averi Kitsch <akitsch@google.com>
45 lines
2.2 KiB
Markdown
45 lines
2.2 KiB
Markdown
---
|
|
title: cloud-sql-create-backup
|
|
type: docs
|
|
weight: 10
|
|
description: "Creates a backup on a Cloud SQL instance."
|
|
---
|
|
|
|
The `cloud-sql-create-backup` tool creates an on-demand backup on a Cloud SQL instance using the Cloud SQL Admin API.
|
|
|
|
{{< notice info dd>}}
|
|
This tool uses a `source` of kind `cloud-sql-admin`.
|
|
{{< /notice >}}
|
|
|
|
## Examples
|
|
|
|
Basic backup creation (current state)
|
|
|
|
```yaml
|
|
tools:
|
|
backup-creation-basic:
|
|
kind: cloud-sql-create-backup
|
|
source: cloud-sql-admin-source
|
|
description: "Creates a backup on the given Cloud SQL instance."
|
|
```
|
|
## Reference
|
|
### Tool Configuration
|
|
| **field** | **type** | **required** | **description** |
|
|
| -------------- | :------: | :----------: | ------------------------------------------------------------- |
|
|
| kind | string | true | Must be "cloud-sql-create-backup". |
|
|
| source | string | true | The name of the `cloud-sql-admin` source to use. |
|
|
| description | string | false | A description of the tool. |
|
|
|
|
### Tool Inputs
|
|
|
|
| **parameter** | **type** | **required** | **description** |
|
|
| -------------------------- | :------: | :----------: | ------------------------------------------------------------------------------- |
|
|
| project | string | true | The project ID. |
|
|
| instance | string | true | The name of the instance to take a backup on. Does not include the project ID. |
|
|
| location | string | false | (Optional) Location of the backup run. |
|
|
| backup_description | string | false | (Optional) The description of this backup run. |
|
|
|
|
## See Also
|
|
- [Cloud SQL Admin API documentation](https://cloud.google.com/sql/docs/mysql/admin-api)
|
|
- [Toolbox Cloud SQL tools documentation](../cloudsql)
|
|
- [Cloud SQL Backup API documentation](https://cloud.google.com/sql/docs/mysql/backup-recovery/backups) |