main.py•64.9 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T02:57:45+00:00
import argparse
import json
import os
from typing import *
from typing import Optional
from autogen.mcp.mcp_proxy import MCPProxy
from autogen.mcp.mcp_proxy.security import BaseSecurity, UnsuportedSecurityStub
from fastapi import Path, Query
from models import (
Alt,
BackupRun,
BackupRunsListResponse,
ConnectSettings,
Database,
DatabaseInstance,
DatabasesListResponse,
FieldXgafv,
FlagsListResponse,
GenerateEphemeralCertRequest,
GenerateEphemeralCertResponse,
InstancesCloneRequest,
InstancesDemoteMasterRequest,
InstancesExportRequest,
InstancesFailoverRequest,
InstancesImportRequest,
InstancesListResponse,
InstancesListServerCasResponse,
InstancesRestoreBackupRequest,
InstancesRotateServerCaRequest,
InstancesTruncateLogRequest,
Operation,
OperationsListResponse,
PerformDiskShrinkContext,
SqlInstancesGetDiskShrinkConfigResponse,
SqlInstancesRescheduleMaintenanceRequestBody,
SqlInstancesResetReplicaSizeRequest,
SqlInstancesStartExternalSyncRequest,
SqlInstancesVerifyExternalSyncSettingsRequest,
SqlInstancesVerifyExternalSyncSettingsResponse,
SslCert,
SslCertsCreateEphemeralRequest,
SslCertsInsertRequest,
SslCertsInsertResponse,
SslCertsListResponse,
TiersListResponse,
User,
UsersListResponse,
)
app = MCPProxy(
contact={'name': 'Google', 'url': 'https://google.com', 'x-twitter': 'youtube'},
description='API for Cloud SQL database instance management',
license={
'name': 'Creative Commons Attribution 3.0',
'url': 'http://creativecommons.org/licenses/by/3.0/',
},
termsOfService='https://developers.google.com/terms/',
title='Cloud SQL Admin API',
version='v1',
servers=[{'url': 'https://sqladmin.googleapis.com/'}],
)
@app.get(
'/v1/flags',
description=""" Lists all available database flags for Cloud SQL instances. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_flags_list(
database_version: Optional[str] = Query(None, alias='databaseVersion'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances',
description=""" Lists instances under a given project. """,
tags=['sql_database_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_list(
project: str,
filter: Optional[str] = None,
max_results: Optional[int] = Query(None, alias='maxResults'),
page_token: Optional[str] = Query(None, alias='pageToken'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances',
description=""" Creates a new Cloud SQL instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_insert(
project: str,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: DatabaseInstance = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/projects/{project}/instances/{instance}',
description=""" Deletes a Cloud SQL instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_delete(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}',
description=""" Retrieves a resource containing information about a Cloud SQL instance. """,
tags=['sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_get(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/projects/{project}/instances/{instance}',
description=""" Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_patch(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: DatabaseInstance = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/v1/projects/{project}/instances/{instance}',
description=""" Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_update(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: DatabaseInstance = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/addServerCa',
description=""" Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in. """,
tags=['sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_add_server_ca(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/backupRuns',
description=""" Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time. """,
tags=[
'sql_instance_management',
'sql_database_management',
'sql_instance_operations',
],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_backup_runs_list(
project: str,
instance: str = ...,
max_results: Optional[int] = Query(None, alias='maxResults'),
page_token: Optional[str] = Query(None, alias='pageToken'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/backupRuns',
description=""" Creates a new backup run on demand. """,
tags=['sql_backup_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_backup_runs_insert(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: BackupRun = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/projects/{project}/instances/{instance}/backupRuns/{id}',
description=""" Deletes the backup taken by a backup run. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_backup_runs_delete(
project: str,
instance: str = ...,
id: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/backupRuns/{id}',
description=""" Retrieves a resource containing information about a backup run. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_backup_runs_get(
project: str,
instance: str = ...,
id: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/clone',
description=""" Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_clone(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesCloneRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/connectSettings',
description=""" Retrieves connect settings about a Cloud SQL instance. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_connect_get(
project: str,
instance: str = ...,
read_time: Optional[str] = Query(None, alias='readTime'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/createEphemeral',
description=""" Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. """,
tags=['sql_ssl_configuration', 'sql_ssl_certificate_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_ssl_certs_create_ephemeral(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: SslCertsCreateEphemeralRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/databases',
description=""" Lists databases in the specified Cloud SQL instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_databases_list(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/databases',
description=""" Inserts a resource containing information about a database inside a Cloud SQL instance. """,
tags=['sql_database_management', 'sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_databases_insert(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: Database = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/projects/{project}/instances/{instance}/databases/{database}',
description=""" Deletes a database from a Cloud SQL instance. """,
tags=['sql_instance_management', 'sql_database_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_databases_delete(
project: str,
instance: str = ...,
database: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/databases/{database}',
description=""" Retrieves a resource containing information about a database inside a Cloud SQL instance. """,
tags=['sql_database_management', 'sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_databases_get(
project: str,
instance: str = ...,
database: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.patch(
'/v1/projects/{project}/instances/{instance}/databases/{database}',
description=""" Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics. """,
tags=['sql_database_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_databases_patch(
project: str,
instance: str = ...,
database: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: Database = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/v1/projects/{project}/instances/{instance}/databases/{database}',
description=""" Updates a resource containing information about a database inside a Cloud SQL instance. """,
tags=['sql_database_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_databases_update(
project: str,
instance: str = ...,
database: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: Database = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/demoteMaster',
description=""" Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_demote_master(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesDemoteMasterRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/export',
description=""" Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_export(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesExportRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/failover',
description=""" Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_failover(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesFailoverRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/getDiskShrinkConfig',
description=""" Get Disk Shrink Config for a given instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_projects_instances_get_disk_shrink_config(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/import',
description=""" Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_import(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesImportRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/listServerCas',
description=""" Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out. """,
tags=['sql_instance_operations', 'sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_list_server_cas(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/performDiskShrink',
description=""" Perform Disk Shrink on primary instance. """,
tags=['sql_disk_configuration', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_projects_instances_perform_disk_shrink(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: PerformDiskShrinkContext = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/promoteReplica',
description=""" Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_promote_replica(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/rescheduleMaintenance',
description=""" Reschedules the maintenance on the given instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_projects_instances_reschedule_maintenance(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: SqlInstancesRescheduleMaintenanceRequestBody = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/resetReplicaSize',
description=""" Reset Replica Size to primary instance disk size. """,
tags=[
'sql_instance_management',
'sql_instance_operations',
'sql_disk_configuration',
],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_projects_instances_reset_replica_size(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: SqlInstancesResetReplicaSizeRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/resetSslConfig',
description=""" Deletes all client certificates and generates a new server SSL certificate for the instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_reset_ssl_config(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/restart',
description=""" Restarts a Cloud SQL instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_restart(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/restoreBackup',
description=""" Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart. """,
tags=['sql_backup_management', 'sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_restore_backup(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesRestoreBackupRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/rotateServerCa',
description=""" Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method. """,
tags=['sql_ssl_configuration', 'sql_ssl_certificate_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_rotate_server_ca(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesRotateServerCaRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/sslCerts',
description=""" Lists all of the current SSL certificates for the instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_ssl_certs_list(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/sslCerts',
description=""" Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted. """,
tags=['sql_ssl_certificate_management', 'sql_ssl_configuration'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_ssl_certs_insert(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: SslCertsInsertRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}',
description=""" Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_ssl_certs_delete(
project: str,
instance: str = ...,
sha1_fingerprint: str = Path(..., alias='sha1Fingerprint'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}',
description=""" Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_ssl_certs_get(
project: str,
instance: str = ...,
sha1_fingerprint: str = Path(..., alias='sha1Fingerprint'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/startExternalSync',
description=""" Start External primary instance migration. """,
tags=['sql_external_sync_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_projects_instances_start_external_sync(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: SqlInstancesStartExternalSyncRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/startReplica',
description=""" Starts the replication in the read replica instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_start_replica(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/stopReplica',
description=""" Stops the replication in the read replica instance. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_stop_replica(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/truncateLog',
description=""" Truncate MySQL general and slow query log tables MySQL only. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_instances_truncate_log(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: InstancesTruncateLogRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.delete(
'/v1/projects/{project}/instances/{instance}/users',
description=""" Deletes a user from a Cloud SQL instance. """,
tags=[
'sql_instance_management',
'sql_database_management',
'sql_instance_operations',
],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_users_delete(
project: str,
instance: str = ...,
host: Optional[str] = None,
name: Optional[str] = None,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/users',
description=""" Lists users in the specified Cloud SQL instance. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_users_list(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/users',
description=""" Creates a new user in a Cloud SQL instance. """,
tags=['sql_instance_management', 'sql_user_account_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_users_insert(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: User = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.put(
'/v1/projects/{project}/instances/{instance}/users',
description=""" Updates an existing user in a Cloud SQL instance. """,
tags=['sql_user_account_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_users_update(
project: str,
instance: str = ...,
host: Optional[str] = None,
name: Optional[str] = None,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: User = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/instances/{instance}/users/{name}',
description=""" Retrieves a resource containing information about a user. """,
tags=['sql_instance_management', 'sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_users_get(
project: str,
instance: str = ...,
name: str = ...,
host: Optional[str] = None,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings',
description=""" Verify External primary instance external sync settings. """,
tags=['sql_external_sync_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_projects_instances_verify_external_sync_settings(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: SqlInstancesVerifyExternalSyncSettingsRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.post(
'/v1/projects/{project}/instances/{instance}:generateEphemeralCert',
description=""" Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database. """,
tags=['sql_ssl_configuration', 'sql_instance_management'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_connect_generate_ephemeral(
project: str,
instance: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
body: GenerateEphemeralCertRequest = None,
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/operations',
description=""" Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time. """,
tags=[
'sql_instance_management',
'sql_database_management',
'sql_instance_operations',
],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_operations_list(
project: str,
instance: Optional[str] = None,
max_results: Optional[int] = Query(None, alias='maxResults'),
page_token: Optional[str] = Query(None, alias='pageToken'),
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/operations/{operation}',
description=""" Retrieves an instance operation that has been performed on an instance. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_operations_get(
project: str,
operation: str = ...,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
@app.get(
'/v1/projects/{project}/tiers',
description=""" Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For more information, see https://cloud.google.com/sql/pricing. """,
tags=['sql_instance_operations'],
security=[
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
UnsuportedSecurityStub(name="None"),
],
)
def sql_tiers_list(
project: str,
field__xgafv: Optional[FieldXgafv] = Query(None, alias='$.xgafv'),
access_token: Optional[str] = None,
alt: Optional[Alt] = None,
callback: Optional[str] = None,
fields: Optional[str] = None,
key: Optional[str] = None,
oauth_token: Optional[str] = None,
pretty_print: Optional[bool] = Query(None, alias='prettyPrint'),
quota_user: Optional[str] = Query(None, alias='quotaUser'),
upload_protocol: Optional[str] = None,
upload_type: Optional[str] = Query(None, alias='uploadType'),
):
raise RuntimeError("Should be patched by MCPProxy and never executed")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="MCP Server")
parser.add_argument(
"transport",
choices=["stdio", "sse", "streamable-http"],
help="Transport mode (stdio, sse or streamable-http)",
)
args = parser.parse_args()
if "CONFIG_PATH" in os.environ:
config_path = os.environ["CONFIG_PATH"]
app.load_configuration(config_path)
if "CONFIG" in os.environ:
config = os.environ["CONFIG"]
app.load_configuration_from_string(config)
if "SECURITY" in os.environ:
security_params = BaseSecurity.parse_security_parameters_from_env(
os.environ,
)
app.set_security_params(security_params)
mcp_settings = json.loads(os.environ.get("MCP_SETTINGS", "{}"))
app.get_mcp(**mcp_settings).run(transport=args.transport)