MCP Server

mcp

com.googleapis.sqladmin/mcp
Cloud & Infrastructure Developer Tools Public & reachable MCP 2026-07-28

What this MCP does

Creates, manages, backs up, restores, imports, and queries Google Cloud SQL instances and database users.

clone_instance
Create a Cloud SQL instance as a clone of a source instance. * This tool returns a long-running operation. Use the `get_operation` tool to poll its status until the operation completes. * The clone operation can take several minutes. Use a command line tool to pause for 30 seconds before rechecking the status.
Input schema
{'type': 'object', '$defs': {'CloneContext': {'type': 'object', 'required': ['destinationInstanceName'], 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#cloneContext`.'}, 'pointInTime': {'type': 'string', 'format': 'date-time', 'description': 'Timestamp, if specified, identifies the time to which the source instance is cloned.'}, 'databaseNames': {'type': 'array', 'items': {'type': 'string'}, 'description': '(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.'}, 'preferredZone': {'type': 'string', 'description': 'Optional. Copy clone and point-in-time recovery clone of an instance to the specified zone. If no zone is specified, clone to the same primary zone as the source instance. This field applies to all DB types.'}, 'pitrTimestampMs': {'type': 'string', 'format': 'int64', 'description': 'Reserved for future use.'}, 'allocatedIpRange': {'type': 'string', 'description': 'The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.'}, 'binLogCoordinates': {'$ref': '#/$defs/BinLogCoordinates', 'description': 'Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates.'}, 'destinationNetwork': {'type': 'string', 'description': 'Optional. The fully qualified URI of the VPC network to which the cloned instance will be connected via private services access for private IP. For example:`projects/my-network-project/global/networks/my-network`. This field is only required for cross-project cloning.'}, 'destinationProject': {'type': 'string', 'description': 'Optional. The project ID of the destination project where the cloned instance will be created. To perform a cross-project clone, this field is required. If not specified, the clone is created in the same project as the source instance.'}, 'preferredSecondaryZone': {'type': 'string', 'description': 'Optional. Copy clone and point-in-time recovery clone of a regional instance in the specified zones. If not specified, clone to the same secondary zone as the source instance. This value cannot be the same as the preferred_zone field. This field applies to all DB types.'}, 'destinationInstanceName': {'type': 'string', 'description': 'Required. Name of the Cloud SQL instance to be created as a clone.'}, 'sourceInstanceDeletionTime': {'type': 'string', 'format': 'date-time', 'description': 'The timestamp used to identify the time when the source instance is deleted. If this instance is deleted, then you must set the timestamp.'}}, 'description': 'Database instance clone context.'}, 'BinLogCoordinates': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#binLogCoordinates`.'}, 'binLogFileName': {'type': 'string', 'description': 'Name of the binary log file for a Cloud SQL instance.'}, 'binLogPosition': {'type': 'string', 'format': 'int64', 'description': 'Position (offset) within the binary log file.'}}, 'description': 'Binary log coordinates.'}, 'InstancesCloneRequest': {'type': 'object', 'required': ['cloneContext'], 'properties': {'cloneContext': {'$ref': '#/$defs/CloneContext', 'description': 'Required. Contains details about the clone operation.'}}, 'description': 'Database instance clone request.'}}, 'required': ['instance', 'project', 'body'], 'properties': {'body': {'$ref': '#/$defs/InstancesCloneRequest'}, 'project': {'type': 'string', 'description': 'Required. Project ID of the source Cloud SQL instance.'}, 'instance': {'type': 'string', 'description': 'Required. The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}}, 'description': 'Instance clone request.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
create_backup
Takes a backup on a Cloud SQL instance. Always populate the project and instance fields on the request. The location (region) and description of the backup may also be optionally provided, in which case the corresponding request fields should also be populated.
Input schema
{'type': 'object', 'required': ['instance', 'project'], 'properties': {'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Required. Cloud SQL instance ID. This does not include the project ID.'}, 'location': {'type': 'string', 'description': 'Optional. Location of the backup run.'}, 'description': {'type': 'string', 'description': 'Optional. The description of this backup run.'}}, 'description': 'Backup runs insert request for MCP.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
create_instance
Initiates the creation of a Cloud SQL instance. * The tool returns a long-running operation. Use the `get_operation` tool to poll its status until the operation completes. * The instance creation operation can take several minutes. Use a command line tool to pause for 30 seconds before rechecking the status. * After you use the `create_instance` tool to create an instance, you can use the `create_user` tool to create an IAM user account for the user currently logged in to the project. * IMPORTANT: Set `ipv4_enabled` to 'false' if creating a Private Service Connect or a Private Service Access instance. * Set `free_trial` to 'true' to create a free trial instance. Free trial instances let you test majority of Cloud SQL features for up to 30 days without financial commitment. Subject to eligibility and availability. * The value of `data_api_access` is set to `ALLOW_DATA_API` by default. This setting lets you execute SQL statements using the `execute_sql` tool and the `executeSql` API. Unless otherwise specified, a newly created instance uses the default instance configuration of a development environment. The following is the default configuration for an instance in a development environment: ``` { "tier": "db-perf-optimized-N-2", "data_disk_size_gb": 100, "region": "us-central1", "database_version": "POSTGRES_18", "edition": "ENTERPRISE_PLUS", "availability_type": "ZONAL", "tags": [{"environment": "dev"}] } ``` The following configuration is recommended for an instance in a production environment: ``` { "tier": "db-perf-optimized-N-8", "data_disk_size_gb": 250, "region": "us-central1", "database_version": "POSTGRES_18", "edition": "ENTERPRISE_PLUS", "availability_type": "REGIONAL", "tags": [{"environment": "prod"}] } ``` The following instance configuration is recommended for SQL Server: ``` { "tier": "db-perf-optimized-N-8", "data_disk_size_gb": 250, "region": "us-central1", "database_version": "SQLSERVER_2022_STANDARD", "edition": "ENTERPRISE", "availability_type": "REGIONAL", "tags": [{"environment": "prod"}] } ```
Input schema
{'type': 'object', '$defs': {'PsaMcpConfig': {'type': 'object', 'required': ['network'], 'properties': {'network': {'type': 'string', 'description': 'Required. The full resource name of the VPC network to connect to via PSA. Format: projects/{project}/global/networks/{network} REQUIRED if enabling PSA.'}, 'allocatedIpRange': {'type': 'string', 'description': 'Optional: The name of an allocated IP range in the consumer VPC.'}}, 'description': 'Configuration for creating a Cloud SQL instance with Private Service Access.'}, 'PscMcpConfig': {'type': 'object', 'properties': {'network': {'type': 'string', 'description': 'Optional. The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, `projects/project1/global/networks/network1`. The consumer host project of this network might be different from the consumer service project.'}, 'project': {'type': 'string', 'description': 'Optional. The project ID of the service project of this PSC consumer endpoint. This is only applicable if `network` is a shared VPC network.'}, 'pscEnabled': {'type': 'boolean', 'description': 'Optional. Whether PSC connectivity is enabled for this instance.'}}, 'description': 'Configuration for Private Service Connect (PSC) endpoint creation for MCP. psc_enabled is the only field needed for instance creation with Private Service Connect enabled. Other optional fields will be added later.'}}, 'required': ['project', 'name'], 'properties': {'name': {'type': 'string', 'description': 'Required. Name of the Cloud SQL instance. This does not include the project ID.'}, 'tags': {'type': 'object', 'writeOnly': True, 'description': 'Optional. Input only. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: ``` "environment": "prod", ```', 'additionalProperties': {'type': 'string'}}, 'tier': {'type': 'string', 'description': 'Optional. The tier (or machine type) for this instance. If not specified: - For `ENTERPRISE_PLUS` edition, the default tier is `db-perf-optimized-N-2`, which gives you 2 vCPUs and 16 GB of RAM. - For `ENTERPRISE` edition, the default tier is `db-custom-2-3840`, which gives you 2 vCPUs and 3.75 GB of RAM. ENTERPRISE_PLUS edition needs to use N2 machine series. ENTERPRISE edition can use custom machine type names use the following format: db-custom-{CPUs}-{Memory}.'}, 'region': {'type': 'string', 'description': 'Optional. The geographical region of the Cloud SQL instance. For example, `us-central1`, `europe-west1`, and `asia-east1`. If not specified, the default value is `us-central1`.'}, 'edition': {'type': 'string', 'description': 'Optional. The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS. If not specified: - For Postgres and Mysql, the default value is ENTERPRISE_PLUS. - For SQL Server, the default value is ENTERPRISE.'}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project to which the newly created Cloud SQL instances should belong.'}, 'freeTrial': {'type': 'boolean', 'description': 'Optional. Whether the instance is a free trial instance. If true, the instance will be created with a free trial configuration.'}, 'ipv4Enabled': {'type': 'boolean', 'description': "Optional. Whether to enable public IP for the instance. Enabling this flag makes the resource accessible from the public internet, which is a security risk if not properly managed. It is recommended to keep resources private whenever possible. This field defaults to 'false' if either `psc_mcp_config` or `psa_mcp_config` is set, or creating a Private Service Connect (PSC) or Private Service Access (PSA) instance."}, 'psaMcpConfig': {'$ref': '#/$defs/PsaMcpConfig', 'description': 'Optional. Use this to connect to the Cloud SQL instance using Private Service Access.'}, 'pscMcpConfig': {'$ref': '#/$defs/PscMcpConfig', 'description': 'Optional. Configuration for Private Service Connect (PSC) instance creation.'}, 'dataDiskSizeGb': {'type': 'string', 'format': 'int64', 'description': 'Optional. Data disk size in GB. Default value is 100.'}, 'databaseVersion': {'type': 'string', 'description': 'Optional. The database engine type and version. The default value is `POSTGRES_18`. For Mysql, it can be `MYSQL_8_4`, `MYSQL_8_0`, `MYSQL_5_7`, etc. For Postgres, it can be `POSTGRES_18`, `POSTGRES_17`, `POSTGRES_16`, etc. For SQL Server, it can be SQLSERVER_2022_STANDARD, SQLSERVER_2022_EXPRESS, SQLSERVER_2022_ENTERPRISE, etc.'}, 'availabilityType': {'type': 'string', 'description': 'Optional. Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. This is the default value. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).'}, 'dataCacheEnabled': {'type': 'boolean', 'description': 'Optional. Whether data cache is enabled for the instance.'}, 'enableGoogleMlIntegration': {'type': 'boolean', 'description': 'Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances.'}}, 'description': 'Instance insert request for MCP.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
create_user
Create a database user for a Cloud SQL instance. * This tool returns a long-running operation. Use the `get_operation` tool to poll its status until the operation completes. * When you use the `create_user` tool, specify the type of user: `CLOUD_IAM_USER`, `CLOUD_IAM_SERVICE_ACCOUNT`, or `BUILT_IN`. * By default the newly created user is assigned the `cloudsqlsuperuser` role, unless you specify other database roles explicitly in the request. * You can use a newly created user with the `execute_sql` tool if the user is a currently logged in IAM user. The `execute_sql` tool executes the SQL statements using the privileges of the database user logged in using IAM database authentication. The `create_user` tool has the following limitations: * To create a built-in user with password, use the `password_secret_version` field to provide password using the Google Cloud Secret Manager. The value of `password_secret_version` should be the resource name of the secret version, like `projects/12345/locations/us-central1/secrets/my-password-secret/versions/1` or `projects/12345/locations/us-central1/secrets/my-password-secret/versions/latest`. The caller needs to have `secretmanager.secretVersions.access` permission on the secret version. * The `create_user` tool doesn't support creating a user for SQL Server. To create an IAM user in PostgreSQL: * The database username must be the IAM user's email address and all lowercase. For example, to create user for PostgreSQL IAM user `example-user@example.com`, you can use the following request: ``` { "name": "example-user@example.com", "type": "CLOUD_IAM_USER", "instance":"test-instance", "project": "test-project" } ``` The created database username for the IAM user is `example-user@example.com`. To create an IAM service account in PostgreSQL: * The database username must be created without the `.gserviceaccount.com` suffix even though the full email address for the account is`service-account-name@project-id.iam.gserviceaccount.com`. For example, to create an IAM service account for PostgreSQL you can use the following request format: ``` { "name": "test@test-project.iam", "type": "CLOUD_IAM_SERVICE_ACCOUNT", "instance": "test-instance", "project": "test-project" } ``` The created database username for the IAM service account is `test@test-project.iam`. To create an IAM user or IAM service account in MySQL: * When Cloud SQL for MySQL stores a username, it truncates the @ and the domain name from the user or service account's email address. For example, `example-user@example.com` becomes `example-user`. * For this reason, you can't add two IAM users or service accounts with the same username but different domain names to the same Cloud SQL instance. * For example, to create user for the MySQL IAM user `example-user@example.com`, use the following request: ``` { "name": "example-user@example.com", "type": "CLOUD_IAM_USER", "instance": "test-instance", "project": "test-project" } ``` The created database username for the IAM user is `example-user`. * For example, to create the MySQL IAM service account `service-account-name@project-id.iam.gserviceaccount.com`, use the following request: ``` { "name": "service-account-name@project-id.iam.gserviceaccount.com", "type": "CLOUD_IAM_SERVICE_ACCOUNT", "instance": "test-instance", "project": "test-project" } ``` The created database username for the IAM service account is `service-account-name`.
Input schema
{'type': 'object', 'required': ['project', 'instance', 'type', 'name'], 'properties': {'name': {'type': 'string', 'description': 'Required. The name of the user in the Cloud SQL instance.'}, 'type': {'enum': ['BUILT_IN', 'CLOUD_IAM_USER', 'CLOUD_IAM_SERVICE_ACCOUNT', 'CLOUD_IAM_GROUP', 'CLOUD_IAM_GROUP_USER', 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', 'CLOUD_IAM_WORKFORCE_IDENTITY', 'ENTRAID_USER'], 'type': 'string', 'description': 'Required. The user type. It determines the method to authenticate the user during login. Use type CLOUD_IAM_USER when authenticating with a Cloud IAM user. Use type CLOUD_IAM_SERVICE_ACCOUNT when authenticating with a Cloud IAM service account.', 'x-google-enum-descriptions': ["The database's built-in user type.", 'Cloud IAM user.', 'Cloud IAM service account.', 'Cloud IAM group. Not used for login.', 'Read-only. Login for a user that belongs to the Cloud IAM group.', 'Read-only. Login for a service account that belongs to the Cloud IAM group.', 'Cloud IAM workforce identity managed by Workforce Identity Federation.', 'Microsoft Entra ID user.']}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Required. Database instance ID. This does not include the project ID.'}, 'databaseRoles': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. Role memberships of the user. Default value is [cloudsqlsuperuser].'}, 'passwordSecretVersion': {'type': 'string', 'writeOnly': True, 'description': 'Optional. Input only. The resource name of the Secret Manager secret holding the password for the user, only needed if `type` is `BUILT_IN`. The expected format is `projects/{project}/secrets/{secret}/versions/{secret_version}`. The secret resource name will not be stored.'}}, 'description': 'User insert request for MCP.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
execute_sql
Execute any valid SQL statement, including data definition language (DDL), data control language (DCL), data query language (DQL), or data manipulation language (DML) statements, on a Cloud SQL instance. To support the `execute_sql` tool, a Cloud SQL instance must meet the following requirements: * The value of `data_api_access` must be set to `ALLOW_DATA_API`. * For built_in users password_secret_version must be set. * Otherwise, for IAM users, for a MySQL instance, the database flag `cloudsql_iam_authentication` must be set to `on`. For a PostgreSQL instance, the database flag `cloudsql.iam_authentication` must be set to `on`. * After you use the `create_instance` tool to create an instance, you can use the `create_user` tool to create an IAM user account for the user currently logged in to the project. The `execute_sql` tool has the following limitations: * If a SQL statement returns a response larger than 10&nbsp;MB, then the response will be truncated. * The `execute_sql` tool has a default timeout of 30 seconds. If a query runs longer than 30 seconds, then the tool returns a `DEADLINE_EXCEEDED` error. If you receive errors similar to "IAM authentication is not enabled for the instance", then you can use the `get_instance` tool to check the value of the IAM database authentication flag for the instance. If you receive errors like "The instance doesn't allow using executeSql to access this instance", then you can use `get_instance` tool to check the `data_api_access` setting. When you receive authentication errors: 1. Check if the currently logged-in user account exists as an IAM user on the instance using the `list_users` tool. 2. If the IAM user account doesn't exist, then use the `create_user` tool to create the IAM user account for the logged-in user. 3. If the currently logged in user doesn't have the proper database user roles, then you can use `update_user` tool to grant database roles to the user. For example, `cloudsqlsuperuser` role can provide an IAM user with many required permissions. 4. Check if the currently logged in user has the correct IAM permissions assigned for the project. You can use `gcloud projects get-iam-policy [PROJECT_ID]` command to check if the user has the proper IAM roles or permissions assigned for the project. * The user must have `cloudsql.instance.login` permission to do automatic IAM database authentication. * The user must have `cloudsql.instances.executeSql` permission to execute SQL statements using the `execute_sql` tool or `executeSql` API. * Common IAM roles that contain the required permissions: Cloud SQL Instance User (`roles/cloudsql.instanceUser`) or Cloud SQL Admin (`roles/cloudsql.admin`) When receiving an `ExecuteSqlResponse`, always check the `message` and `status` fields within the response body. A successful HTTP status code doesn't guarantee full success of all SQL statements. The `message` and `status` fields will indicate if there were any partial errors or warnings during SQL statement execution.
Destructive
Input schema
{'type': 'object', 'required': ['instance', 'project', 'sqlStatement'], 'properties': {'user': {'type': 'string', 'description': "Optional. The name of an existing database user to connect to the database. This field is used together with the `password_secret_version` field. When not both are set, the API caller's identity is used for database authentication."}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'database': {'type': 'string', 'description': "Optional. Name of the database on which the statement will be executed. For Postgres it's required, for MySQL it's optional. For Postgres, if your query is not scoped to an existings database, like list databases / create new database / grant roles, you can pass in default value as postgres."}, 'instance': {'type': 'string', 'description': 'Required. Database instance ID. This does not include the project ID.'}, 'sqlStatement': {'type': 'string', 'description': 'Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.'}, 'sqlCommenterEnabled': {'type': 'boolean', 'description': 'Optional. If set to true, enables sqlcommenter-style tagging. Automatically collects and populates mcp.server, mcp.tool, mcp.client, and user.identity. See https://google.github.io/sqlcommenter/ for detail about sqlcommenter.'}, 'passwordSecretVersion': {'type': 'string', 'description': "Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}`. This field is used together with the `user` field. When not both are set, the API caller's identity is used for database authentication. The secret resource name will not be stored."}}, 'description': 'Instance execute sql request for MCP.'}
Output schema
{'type': 'object', '$defs': {'Row': {'type': 'object', 'properties': {'values': {'type': 'array', 'items': {'$ref': '#/$defs/Value'}, 'description': 'The values for the row.'}}, 'description': 'Contains the values for a row.'}, 'Value': {'type': 'object', 'properties': {'value': {'type': 'string', 'description': 'The cell value in string format.'}, 'nullValue': {'type': 'boolean', 'description': 'If cell value is null, then this flag will be set to true.'}}, 'description': 'The cell value of the table.'}, 'Column': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Name of the column.'}, 'type': {'type': 'string', 'description': 'Datatype of the column.'}}, 'description': 'Contains the name and datatype of a column.'}, 'Status': {'type': 'object', 'properties': {'code': {'type': 'integer', 'format': 'int32', 'description': 'The status code, which should be an enum value of google.rpc.Code.'}, 'details': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': {'description': 'Properties of the object. Contains field @type with type URL.'}}, 'description': 'A list of messages that carry the error details. There is a common set of message types for APIs to use.'}, 'message': {'type': 'string', 'description': 'A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.'}}, 'description': 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'}, 'Message': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The full message string. For PostgreSQL, this is a formatted string that may include severity, code, and the notice/warning message. For MySQL, this contains the warning message.'}, 'severity': {'type': 'string', 'description': 'The severity of the message (e.g., "NOTICE" for PostgreSQL, "WARNING" for MySQL).'}}, 'description': 'Represents a notice or warning message from the database.'}, 'Metadata': {'type': 'object', 'properties': {'sqlStatementExecutionTime': {'type': 'string', 'format': 'google-duration', 'description': 'The time taken to execute the SQL statements.'}}, 'description': 'The additional metadata information regarding the execution of the SQL statements.'}, 'QueryResult': {'type': 'object', 'properties': {'rows': {'type': 'array', 'items': {'$ref': '#/$defs/Row'}, 'description': 'Rows returned by the SQL statement.'}, 'status': {'$ref': '#/$defs/Status', 'description': 'If results were truncated due to an error, details of that error.'}, 'columns': {'type': 'array', 'items': {'$ref': '#/$defs/Column'}, 'description': 'List of columns included in the result. This also includes the data type of the column.'}, 'message': {'type': 'string', 'description': 'Message related to the SQL execution result.'}, 'partialResult': {'type': 'boolean', 'description': "Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results."}}, 'description': 'QueryResult contains the result of executing a single SQL statement.'}}, 'properties': {'status': {'$ref': '#/$defs/Status', 'description': 'Contains the error from the database if the SQL execution failed.'}, 'results': {'type': 'array', 'items': {'$ref': '#/$defs/QueryResult'}, 'description': 'The list of results after executing all the SQL statements.'}, 'messages': {'type': 'array', 'items': {'$ref': '#/$defs/Message'}, 'description': 'A list of notices and warnings generated during query execution. For PostgreSQL, this includes all notices and warnings. For MySQL, this includes warnings generated by the last executed statement. To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must be executed after each statement.'}, 'metadata': {'$ref': '#/$defs/Metadata', 'description': 'The additional metadata information regarding the execution of the SQL statements.'}}}
execute_sql_readonly
Execute any valid read only SQL statement on a Cloud SQL instance. To support the `execute_sql_readonly` tool, a Cloud SQL instance must meet the following requirements: * The value of `data_api_access` must be set to `ALLOW_DATA_API`. * For a MySQL instance, the database flag `cloudsql_iam_authentication` must be set to `on`. For a PostgreSQL instance, the database flag `cloudsql.iam_authentication` must be set to `on`. * An IAM user account or IAM service account (`CLOUD_IAM_USER` or `CLOUD_IAM_SERVICE_ACCOUNT`) is required to call the `execute_sql_readonly` tool. The tool executes the SQL statements using the privileges of the database user logged with IAM database authentication. After you use the `create_instance` tool to create an instance, you can use the `create_user` tool to create an IAM user account for the user currently logged in to the project. The `execute_sql_readonly` tool has the following limitations: * If a SQL statement returns a response larger than 10&nbsp;MB, then the response will be truncated. * The tool has a default timeout of 30 seconds. If a query runs longer than 30 seconds, then the tool returns a `DEADLINE_EXCEEDED` error. If you receive errors similar to "IAM authentication is not enabled for the instance", then you can use the `get_instance` tool to check the value of the IAM database authentication flag for the instance. If you receive errors like "The instance doesn't allow using executeSql to access this instance", then you can use `get_instance` tool to check the `data_api_access` setting. When you receive authentication errors: 1. Check if the currently logged-in user account exists as an IAM user on the instance using the `list_users` tool. 2. If the IAM user account doesn't exist, then use the `create_user` tool to create the IAM user account for the logged-in user. 3. If the currently logged in user doesn't have the proper database user roles, then you can use `update_user` tool to grant database roles to the user. For example, `cloudsqlsuperuser` role can provide an IAM user with many required permissions. 4. Check if the currently logged in user has the correct IAM permissions assigned for the project. You can use `gcloud projects get-iam-policy [PROJECT_ID]` command to check if the user has the proper IAM roles or permissions assigned for the project. * The user must have `cloudsql.instance.login` permission to do automatic IAM database authentication. * The user must have `cloudsql.instances.executeSql` permission to execute SQL statements using the `execute_sql_readonly` tool or `executeSql` API. * Common IAM roles that contain the required permissions: Cloud SQL Instance User (`roles/cloudsql.instanceUser`) or Cloud SQL Admin (`roles/cloudsql.admin`) When receiving an `ExecuteSqlResponse`, always check the `message` and `status` fields within the response body. A successful HTTP status code doesn't guarantee full success of all SQL statements. The `message` and `status` fields will indicate if there were any partial errors or warnings during SQL statement execution.
Read only Idempotent
Input schema
{'type': 'object', 'required': ['instance', 'project', 'sqlStatement'], 'properties': {'user': {'type': 'string', 'description': "Optional. The name of an existing database user to connect to the database. This field is used together with the `password_secret_version` field. When not both are set, the API caller's identity is used for database authentication."}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'database': {'type': 'string', 'description': "Optional. Name of the database on which the statement will be executed. For Postgres it's required, for MySQL it's optional. For Postgres, if your query is not scoped to an existings database, like list databases / create new database / grant roles, you can pass in default value as postgres."}, 'instance': {'type': 'string', 'description': 'Required. Database instance ID. This does not include the project ID.'}, 'sqlStatement': {'type': 'string', 'description': 'Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.'}, 'sqlCommenterEnabled': {'type': 'boolean', 'description': 'Optional. If set to true, enables sqlcommenter-style tagging. Automatically collects and populates mcp.server, mcp.tool, mcp.client, and user.identity. See https://google.github.io/sqlcommenter/ for detail about sqlcommenter.'}, 'passwordSecretVersion': {'type': 'string', 'description': "Optional. The resource name of the Secret Manager secret holding the password for the user to log into the database. The secret should be created using the regional endpoint (for API) or from the Regional Secrets page (for UI), and stored in the same region as the Cloud SQL instance. The expected resource name format is `projects/{project}/locations/{location}/secrets/{secret}/versions/{secret_version}`. This field is used together with the `user` field. When not both are set, the API caller's identity is used for database authentication. The secret resource name will not be stored."}}, 'description': 'Instance execute sql request for MCP.'}
Output schema
{'type': 'object', '$defs': {'Row': {'type': 'object', 'properties': {'values': {'type': 'array', 'items': {'$ref': '#/$defs/Value'}, 'description': 'The values for the row.'}}, 'description': 'Contains the values for a row.'}, 'Value': {'type': 'object', 'properties': {'value': {'type': 'string', 'description': 'The cell value in string format.'}, 'nullValue': {'type': 'boolean', 'description': 'If cell value is null, then this flag will be set to true.'}}, 'description': 'The cell value of the table.'}, 'Column': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Name of the column.'}, 'type': {'type': 'string', 'description': 'Datatype of the column.'}}, 'description': 'Contains the name and datatype of a column.'}, 'Status': {'type': 'object', 'properties': {'code': {'type': 'integer', 'format': 'int32', 'description': 'The status code, which should be an enum value of google.rpc.Code.'}, 'details': {'type': 'array', 'items': {'type': 'object', 'additionalProperties': {'description': 'Properties of the object. Contains field @type with type URL.'}}, 'description': 'A list of messages that carry the error details. There is a common set of message types for APIs to use.'}, 'message': {'type': 'string', 'description': 'A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.'}}, 'description': 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'}, 'Message': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The full message string. For PostgreSQL, this is a formatted string that may include severity, code, and the notice/warning message. For MySQL, this contains the warning message.'}, 'severity': {'type': 'string', 'description': 'The severity of the message (e.g., "NOTICE" for PostgreSQL, "WARNING" for MySQL).'}}, 'description': 'Represents a notice or warning message from the database.'}, 'Metadata': {'type': 'object', 'properties': {'sqlStatementExecutionTime': {'type': 'string', 'format': 'google-duration', 'description': 'The time taken to execute the SQL statements.'}}, 'description': 'The additional metadata information regarding the execution of the SQL statements.'}, 'QueryResult': {'type': 'object', 'properties': {'rows': {'type': 'array', 'items': {'$ref': '#/$defs/Row'}, 'description': 'Rows returned by the SQL statement.'}, 'status': {'$ref': '#/$defs/Status', 'description': 'If results were truncated due to an error, details of that error.'}, 'columns': {'type': 'array', 'items': {'$ref': '#/$defs/Column'}, 'description': 'List of columns included in the result. This also includes the data type of the column.'}, 'message': {'type': 'string', 'description': 'Message related to the SQL execution result.'}, 'partialResult': {'type': 'boolean', 'description': "Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results."}}, 'description': 'QueryResult contains the result of executing a single SQL statement.'}}, 'properties': {'status': {'$ref': '#/$defs/Status', 'description': 'Contains the error from the database if the SQL execution failed.'}, 'results': {'type': 'array', 'items': {'$ref': '#/$defs/QueryResult'}, 'description': 'The list of results after executing all the SQL statements.'}, 'messages': {'type': 'array', 'items': {'$ref': '#/$defs/Message'}, 'description': 'A list of notices and warnings generated during query execution. For PostgreSQL, this includes all notices and warnings. For MySQL, this includes warnings generated by the last executed statement. To retrieve all warnings for a multi-statement query, `SHOW WARNINGS` must be executed after each statement.'}, 'metadata': {'$ref': '#/$defs/Metadata', 'description': 'The additional metadata information regarding the execution of the SQL statements.'}}}
get_instance
Get the details of a Cloud SQL instance.
Read only
Input schema
{'type': 'object', 'required': ['instance', 'project'], 'properties': {'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Required. Database instance ID. This does not include the project ID.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}}, 'description': 'Instance get request.'}
Output schema
{'type': 'object', '$defs': {'SslCert': {'type': 'object', 'properties': {'cert': {'type': 'string', 'description': 'PEM representation.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#sslCert`.'}, 'instance': {'type': 'string', 'description': 'Name of the database instance.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'commonName': {'type': 'string', 'description': 'User supplied name. Constrained to [a-zA-Z.-_ ]+.'}, 'createTime': {'type': 'string', 'format': 'date-time', 'description': 'The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`'}, 'expirationTime': {'type': 'string', 'format': 'date-time', 'description': 'The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'sha1Fingerprint': {'type': 'string', 'description': 'Sha1 Fingerprint.'}, 'certSerialNumber': {'type': 'string', 'description': 'Serial number, as extracted from the certificate.'}}, 'description': 'SslCerts Resource'}, 'AclEntry': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#aclEntry`.'}, 'name': {'type': 'string', 'description': 'Optional. A label to identify this entry.'}, 'value': {'type': 'string', 'description': 'The allowlisted value for the access control list.'}, 'expirationTime': {'type': 'string', 'format': 'date-time', 'description': 'The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}}, 'description': 'An entry for an Access Control list.'}, 'Settings': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#settings`.'}, 'tier': {'type': 'string', 'description': 'The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.'}, 'edition': {'enum': ['EDITION_UNSPECIFIED', 'ENTERPRISE', 'ENTERPRISE_PLUS', 'DEVELOPER'], 'type': 'string', 'description': 'Optional. The edition type of the Cloud SQL instance.', 'x-google-enum-descriptions': ['The instance did not specify the edition.', 'The instance is an enterprise edition.', 'The instance is an Enterprise Plus edition.', 'This instance is a Cloud SQL developer edition instance.']}, 'timeZone': {'type': 'string', 'description': 'Server timezone, relevant only for Cloud SQL for SQL Server.'}, 'collation': {'type': 'string', 'description': 'The name of server Instance collation.'}, 'userLabels': {'type': 'object', 'description': 'User-provided labels, represented as a dictionary where each label is a single key value pair.', 'additionalProperties': {'type': 'string'}}, 'pricingPlan': {'enum': ['SQL_PRICING_PLAN_UNSPECIFIED', 'PACKAGE', 'PER_USE'], 'type': 'string', 'description': 'The pricing plan for this instance. This can be either `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.', 'x-google-enum-descriptions': ['This is an unknown pricing plan for this instance.', 'The instance is billed at a monthly flat rate.', 'The instance is billed per usage.']}, 'dataDiskType': {'enum': ['SQL_DATA_DISK_TYPE_UNSPECIFIED', 'PD_SSD', 'PD_HDD', 'OBSOLETE_LOCAL_SSD', 'HYPERDISK_BALANCED'], 'type': 'string', 'description': 'The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.', 'x-google-enum-deprecated': [False, False, False, True, False], 'x-google-enum-descriptions': ['This is an unknown data disk type.', 'An SSD data disk.', 'An HDD data disk.', 'This field is deprecated and will be removed from a future version of the API.', 'A Hyperdisk Balanced data disk.']}, 'dataApiAccess': {'enum': ['DATA_API_ACCESS_UNSPECIFIED', 'DISALLOW_DATA_API', 'ALLOW_DATA_API'], 'type': 'string', 'description': 'This parameter controls whether to allow using ExecuteSql API to connect to the instance. Not allowed by default.', 'x-google-enum-descriptions': ['Unspecified, effectively the same as `DISALLOW_DATA_API`.', 'Disallow using ExecuteSql API to connect to the instance.', 'Allow using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API.']}, 'databaseFlags': {'type': 'array', 'items': {'$ref': '#/$defs/DatabaseFlags'}, 'description': 'The database flags passed to the instance at startup.'}, 'entraidConfig': {'$ref': '#/$defs/SqlServerEntraIdConfig', 'description': 'Optional. The Microsoft Entra ID configuration for the SQL Server instance.'}, 'dataDiskSizeGb': {'type': 'string', 'format': 'int64', 'description': 'The size of data disk, in GB. The data disk size minimum is 10GB.'}, 'insightsConfig': {'$ref': '#/$defs/InsightsConfig', 'description': 'Insights configuration, for now relevant only for Postgres.'}, 'dataCacheConfig': {'$ref': '#/$defs/DataCacheConfig', 'description': 'Configuration for data cache.'}, 'ipConfiguration': {'$ref': '#/$defs/IpConfiguration', 'description': 'The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances.'}, 'replicationType': {'enum': ['SQL_REPLICATION_TYPE_UNSPECIFIED', 'SYNCHRONOUS', 'ASYNCHRONOUS'], 'type': 'string', 'deprecated': True, 'description': 'The type of replication this instance uses. This can be either `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only applicable to First Generation instances.', 'x-google-enum-descriptions': ['This is an unknown replication type for a Cloud SQL instance.', 'The synchronous replication mode for First Generation instances. It is the default value.', 'The asynchronous replication mode for First Generation instances. It provides a slight performance gain, but if an outage occurs while this option is set to asynchronous, you can lose up to a few seconds of updates to your data.']}, 'settingsVersion': {'type': 'string', 'format': 'int64', 'description': 'The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.'}, 'activationPolicy': {'enum': ['SQL_ACTIVATION_POLICY_UNSPECIFIED', 'ALWAYS', 'NEVER', 'ON_DEMAND'], 'type': 'string', 'description': 'The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * `ALWAYS`: The instance is on, and remains so even in the absence of connection requests. * `NEVER`: The instance is off; it is not activated, even if a connection request arrives.', 'x-google-enum-deprecated': [False, False, False, True], 'x-google-enum-descriptions': ['Unknown activation plan.', 'The instance is always up and running.', 'The instance never starts.', 'The instance starts upon receiving requests.']}, 'availabilityType': {'enum': ['SQL_AVAILABILITY_TYPE_UNSPECIFIED', 'ZONAL', 'REGIONAL'], 'type': 'string', 'description': 'Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see [Overview of the High Availability Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).', 'x-google-enum-descriptions': ['This is an unknown Availability type.', 'Zonal available instance.', 'Regional available instance.']}, 'finalBackupConfig': {'$ref': '#/$defs/FinalBackupConfig', 'description': 'Optional. The final backup configuration for the instance.'}, 'maintenanceWindow': {'$ref': '#/$defs/MaintenanceWindow', 'description': 'The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes.'}, 'storageAutoResize': {'type': 'boolean', 'description': 'Configuration to increase storage size automatically. The default value is true.'}, 'autoUpgradeEnabled': {'type': 'boolean', 'description': 'Optional. Cloud SQL for MySQL auto-upgrade configuration. When this parameter is set to true, auto-upgrade is enabled for MySQL 8.0 minor versions. The MySQL version must be 8.0.35 or higher.'}, 'locationPreference': {'$ref': '#/$defs/LocationPreference', 'description': 'The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances.'}, 'backupConfiguration': {'$ref': '#/$defs/BackupConfiguration', 'description': 'The daily backup configuration for the instance.'}, 'connectionPoolConfig': {'$ref': '#/$defs/ConnectionPoolConfig', 'description': 'Optional. The managed connection pooling configuration for the instance.'}, 'connectorEnforcement': {'enum': ['CONNECTOR_ENFORCEMENT_UNSPECIFIED', 'NOT_REQUIRED', 'REQUIRED'], 'type': 'string', 'description': 'Specifies if connections must use Cloud SQL connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL instances can be connected without Cloud SQL Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.', 'x-google-enum-descriptions': ['The requirement for Cloud SQL connectors is unknown.', 'Do not require Cloud SQL connectors.', 'Require all connections to use Cloud SQL connectors, including the Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. Note: This disables all existing authorized networks.']}, 'sqlServerAuditConfig': {'$ref': '#/$defs/SqlServerAuditConfig', 'description': 'SQL Server specific audit configuration.'}, 'activeDirectoryConfig': {'$ref': '#/$defs/SqlActiveDirectoryConfig', 'description': 'Active Directory configuration, relevant only for Cloud SQL for SQL Server.'}, 'retainBackupsOnDelete': {'type': 'boolean', 'description': 'Optional. When this parameter is set to true, Cloud SQL retains backups of the instance even after the instance is deleted. The ON_DEMAND backup will be retained until customer deletes the backup or the project. The AUTOMATED backup will be retained based on the backups retention setting.'}, 'acceleratedReplicaMode': {'type': 'boolean', 'description': 'Optional. Whether the replica is in accelerated mode. This feature is in private preview and requires allowlisting to take effect.'}, 'denyMaintenancePeriods': {'type': 'array', 'items': {'$ref': '#/$defs/DenyMaintenancePeriod'}, 'description': 'Deny maintenance periods'}, 'storageAutoResizeLimit': {'type': 'string', 'format': 'int64', 'description': 'The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.'}, 'advancedMachineFeatures': {'$ref': '#/$defs/AdvancedMachineFeatures', 'description': 'Specifies advanced machine configuration for the instances relevant only for SQL Server.'}, 'dataDiskProvisionedIops': {'type': 'string', 'format': 'int64', 'description': 'Optional. Provisioned number of I/O operations per second for the data disk. This field is only used for hyperdisk-balanced disk types.'}, 'readPoolAutoScaleConfig': {'$ref': '#/$defs/ReadPoolAutoScaleConfig', 'description': 'Optional. The read pool auto-scale configuration for the instance.'}, 'passwordValidationPolicy': {'$ref': '#/$defs/PasswordValidationPolicy', 'description': 'The local user password validation policy of the instance for PostgreSQL and MySQL.'}, 'performanceCaptureConfig': {'$ref': '#/$defs/PerformanceCaptureConfig', 'description': 'Optional. Configuration for Performance Capture, provides diagnostic metrics during high load situations.'}, 'replicationLagMaxSeconds': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Configuration value for recreation of replica after certain replication lag'}, 'authorizedGaeApplications': {'type': 'array', 'items': {'type': 'string'}, 'deprecated': True, 'description': 'The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.'}, 'deletionProtectionEnabled': {'type': 'boolean', 'description': 'Configuration to protect against accidental instance deletion.'}, 'enableDataplexIntegration': {'type': 'boolean', 'description': 'Optional. By default, Cloud SQL instances have schema extraction disabled for Dataplex. When this parameter is set to true, schema extraction for Dataplex on Cloud SQL instances is activated.'}, 'enableGoogleMlIntegration': {'type': 'boolean', 'description': 'Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances.'}, 'databaseReplicationEnabled': {'type': 'boolean', 'description': 'Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.'}, 'crashSafeReplicationEnabled': {'type': 'boolean', 'deprecated': True, 'description': 'Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.'}, 'dataDiskProvisionedThroughput': {'type': 'string', 'format': 'int64', 'description': 'Optional. Provisioned throughput measured in MiB per second for the data disk. This field is only used for hyperdisk-balanced disk types.'}}, 'description': 'Database instance settings.'}, 'IpMapping': {'type': 'object', 'properties': {'type': {'enum': ['SQL_IP_ADDRESS_TYPE_UNSPECIFIED', 'PRIMARY', 'OUTGOING', 'PRIVATE', 'MIGRATED_1ST_GEN'], 'type': 'string', 'description': 'The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.', 'x-google-enum-descriptions': ['This is an unknown IP address type.', "IP address the customer is supposed to connect to. Usually this is the load balancer's IP address", 'Source IP address of the connection a read replica establishes to its external primary instance. This IP address can be allowlisted by the customer in case it has a firewall that filters incoming connection to its on premises primary instance.', 'Private IP used when using private IPs and network peering.', 'V1 IP of a migrated instance. We want the user to decommission this IP as soon as the migration is complete. Note: V1 instances with V1 ip addresses will be counted as PRIMARY.']}, 'ipAddress': {'type': 'string', 'description': 'The IP address assigned.'}, 'timeToRetire': {'type': 'string', 'format': 'date-time', 'description': 'The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.'}}, 'description': 'Database instance IP mapping'}, 'PscConfig': {'type': 'object', 'properties': {'pscEnabled': {'type': 'boolean', 'description': 'Whether PSC connectivity is enabled for this instance.'}, 'pscAutoDnsEnabled': {'type': 'boolean', 'description': 'Optional. Indicates whether Private Service Connect DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal DNS record across all networks configured with Private Service Connect auto-connections. This will default to true for new instances when Private Service Connect is enabled.'}, 'pscAutoConnections': {'type': 'array', 'items': {'$ref': '#/$defs/PscAutoConnectionConfig'}, 'description': 'Optional. The list of settings for requested Private Service Connect consumer endpoints that can be used to connect to this Cloud SQL instance.'}, 'networkAttachmentUri': {'type': 'string', 'description': 'Optional. The network attachment of the consumer network that the Private Service Connect enabled Cloud SQL instance is authorized to connect using the PSC interface. format: projects/PROJECT/regions/REGION/networkAttachments/ID'}, 'allowedConsumerProjects': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).'}, 'pscWriteEndpointDnsEnabled': {'type': 'boolean', 'description': 'Optional. Indicates whether Private Service Connect write endpoint DNS automation is enabled for this instance. When enabled, Cloud SQL provisions a universal global DNS record across all networks configured with Private Service Connect auto-connections that points to the cluster primary instance. This feature is only supported for Enterprise Plus edition. This will default to true for new Enterprise Plus instances when `psc_auto_dns_enabled` is enabled.'}, 'pscAutoConnectionPolicyEnabled': {'type': 'boolean', 'description': 'Optional. Whether to set up the PSC service connection policy automatically.'}}, 'description': 'PSC settings for a Cloud SQL instance.'}, 'SourceRole': {'type': 'object', 'properties': {'targetId': {'$ref': '#/$defs/InstanceReference', 'readOnly': True, 'description': 'Output only. The target instance paired with this source instance in a blue-green deployment.'}}, 'description': 'The source instance for the Blue-Green deployment.'}, 'TargetRole': {'type': 'object', 'properties': {'sourceId': {'$ref': '#/$defs/InstanceReference', 'readOnly': True, 'description': 'Output only. The source instance paired with this target instance in a blue-green deployment.'}}, 'description': 'The target instance for the Blue-Green deployment.'}, 'TargetMetric': {'type': 'object', 'properties': {'metric': {'type': 'string', 'description': 'The metric name to be used for auto scaling.'}, 'targetValue': {'type': 'number', 'format': 'float', 'description': 'The target value for the metric.'}}, 'description': 'Target metric for read pool auto scaling.'}, 'DatabaseFlags': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.'}, 'value': {'type': 'string', 'description': "The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value."}}, 'description': 'Database flags for Cloud SQL instances.'}, 'DnsNameMapping': {'type': 'object', 'properties': {'name': {'type': 'string', 'readOnly': True, 'description': 'Output only. The DNS name.'}, 'dnsScope': {'enum': ['DNS_SCOPE_UNSPECIFIED', 'INSTANCE', 'CLUSTER'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The scope that the DNS name applies to.', 'x-google-enum-descriptions': ['DNS scope not set. This value should not be used.', 'Indicates an instance-level DNS name.', 'Indicates a cluster-level DNS name.']}, 'recordManager': {'enum': ['RECORD_MANAGER_UNSPECIFIED', 'CUSTOMER', 'CLOUD_SQL_AUTOMATION'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The manager for this DNS record.', 'x-google-enum-descriptions': ['Record manager not set. This value should not be used.', 'The record may be managed by the customer. It is not automatically managed by Cloud SQL automation.', 'The record is managed by Cloud SQL, which will create, update, and delete the DNS records for the zone automatically when the Cloud SQL database instance is created or updated.']}, 'connectionType': {'enum': ['CONNECTION_TYPE_UNSPECIFIED', 'PUBLIC', 'PRIVATE_SERVICES_ACCESS', 'PRIVATE_SERVICE_CONNECT'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The connection type of the DNS name.', 'x-google-enum-descriptions': ['Unknown connection type.', 'Public IP.', 'Private services access (private IP).', 'Private Service Connect.']}}, 'description': 'DNS metadata.'}, 'InsightsConfig': {'type': 'object', 'properties': {'queryStringLength': {'type': 'integer', 'format': 'int32', 'description': 'Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query lengths greater than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.'}, 'queryPlansPerMinute': {'type': 'integer', 'format': 'int32', 'description': 'Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.'}, 'recordClientAddress': {'type': 'boolean', 'description': 'Whether Query Insights will record client address when enabled.'}, 'queryInsightsEnabled': {'type': 'boolean', 'description': 'Whether Query Insights feature is enabled.'}, 'recordApplicationTags': {'type': 'boolean', 'description': 'Whether Query Insights will record application tags from query when enabled.'}, 'enhancedQueryInsightsEnabled': {'type': 'boolean', 'description': 'Optional. Whether enhanced query insights feature is enabled.'}}, 'description': 'Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration.'}, 'PoolNodeConfig': {'type': 'object', 'properties': {'name': {'type': 'string', 'readOnly': True, 'description': 'Output only. The name of the read pool node, to be used for retrieving metrics and logs.'}, 'state': {'enum': ['SQL_INSTANCE_STATE_UNSPECIFIED', 'RUNNABLE', 'SUSPENDED', 'PENDING_DELETE', 'PENDING_CREATE', 'MAINTENANCE', 'FAILED', 'ONLINE_MAINTENANCE', 'REPAIRING'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The current state of the read pool node.', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, False], 'x-google-enum-descriptions': ['The state of the instance is unknown.', 'The instance is running, or has been stopped by owner.', 'The instance is not available, for example due to problems with billing.', 'The instance is being deleted.', 'The instance is being created.', 'The instance is down for maintenance.', 'The creation of the instance failed or a fatal error occurred during maintenance.', 'Deprecated', '(Applicable to read pool nodes only.) The read pool node needs to be repaired. The database might be unavailable.']}, 'dnsName': {'type': 'string', 'readOnly': True, 'description': 'Output only. The DNS name of the read pool node.'}, 'gceZone': {'type': 'string', 'readOnly': True, 'description': 'Output only. The zone of the read pool node.'}, 'dnsNames': {'type': 'array', 'items': {'$ref': '#/$defs/DnsNameMapping'}, 'readOnly': True, 'description': 'Output only. The list of DNS names used by this read pool node.'}, 'ipAddresses': {'type': 'array', 'items': {'$ref': '#/$defs/IpMapping'}, 'readOnly': True, 'description': 'Output only. Mappings containing IP addresses that can be used to connect to the read pool node.'}, 'pscAutoConnections': {'type': 'array', 'items': {'$ref': '#/$defs/PscAutoConnectionConfig'}, 'readOnly': True, 'description': 'Output only. The list of settings for requested automatically-setup Private Service Connect (PSC) consumer endpoints that can be used to connect to this read pool node.'}, 'pscServiceAttachmentLink': {'type': 'string', 'readOnly': True, 'description': 'Output only. The Private Service Connect (PSC) service attachment of the read pool node.'}}, 'description': 'Details of a single read pool node of a read pool.'}, 'DataCacheConfig': {'type': 'object', 'properties': {'dataCacheEnabled': {'type': 'boolean', 'description': 'Whether data cache is enabled for the instance.'}}, 'description': 'Data cache configurations.'}, 'IpConfiguration': {'type': 'object', 'properties': {'sslMode': {'enum': ['SSL_MODE_UNSPECIFIED', 'ALLOW_UNENCRYPTED_AND_ENCRYPTED', 'ENCRYPTED_ONLY', 'TRUSTED_CLIENT_CERTIFICATE_REQUIRED'], 'type': 'string', 'description': 'Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` has priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL connections, while `require_ssl=false` means accept both non-SSL and SSL connections. In this case, MySQL and PostgreSQL databases respect `ssl_mode` and accepts only SSL connections.', 'x-google-enum-descriptions': ['The SSL mode is unknown.', "Allow non-SSL/non-TLS and SSL/TLS connections. For SSL connections to MySQL and PostgreSQL, the client certificate isn't verified. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid a conflict between the values of the two flags.", "Only allow connections encrypted with SSL/TLS. For SSL connections to MySQL and PostgreSQL, the client certificate isn't verified. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid a conflict between the values of the two flags.", 'Only allow connections encrypted with SSL/TLS and with valid client certificates. When this value is used, the legacy `require_ssl` flag must be true or cleared to avoid the conflict between values of two flags. PostgreSQL clients or users that connect using IAM database authentication must use either the [Cloud SQL Auth Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or [Cloud SQL Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) to enforce client identity verification. Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server.']}, 'pscConfig': {'$ref': '#/$defs/PscConfig', 'description': 'PSC settings for this instance.'}, 'requireSsl': {'type': 'boolean', 'description': "Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the `ssl_mode` flag instead of the `require_ssl` flag."}, 'ipv4Enabled': {'type': 'boolean', 'description': 'Whether the instance is assigned a public IP address or not.'}, 'serverCaMode': {'enum': ['CA_MODE_UNSPECIFIED', 'GOOGLE_MANAGED_INTERNAL_CA', 'GOOGLE_MANAGED_CAS_CA', 'CUSTOMER_MANAGED_CAS_CA'], 'type': 'string', 'description': 'Specify what type of CA is used for the server certificate.', 'x-google-enum-descriptions': ['CA mode is unspecified. It is effectively the same as `GOOGLE_MANAGED_INTERNAL_CA`.', 'Google-managed self-signed internal CA.', "Google-managed regional CA part of root CA hierarchy hosted on Google Cloud's Certificate Authority Service (CAS).", "Customer-managed CA hosted on Google Cloud's Certificate Authority Service (CAS)."]}, 'serverCaPool': {'type': 'string', 'description': 'Optional. The resource name of the server CA pool for an instance with `CUSTOMER_MANAGED_CAS_CA` as the `server_ca_mode`. Format: projects/{PROJECT}/locations/{REGION}/caPools/{CA_POOL_ID}'}, 'privateNetwork': {'type': 'string', 'description': 'The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.'}, 'allocatedIpRange': {'type': 'string', 'description': 'The name of the allocated ip range for the private ip Cloud SQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`'}, 'authorizedNetworks': {'type': 'array', 'items': {'$ref': '#/$defs/AclEntry'}, 'description': "The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`)."}, 'customSubjectAlternativeNames': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.'}, 'serverCertificateRotationMode': {'enum': ['SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED', 'NO_AUTOMATIC_ROTATION', 'AUTOMATIC_ROTATION_DURING_MAINTENANCE'], 'type': 'string', 'description': 'Optional. Controls the automatic server certificate rotation feature. This feature is disabled by default. When enabled, the server certificate will be automatically rotated during Cloud SQL scheduled maintenance or self-service maintenance updates up to six months before it expires. This setting can only be set if server_ca_mode is either GOOGLE_MANAGED_CAS_CA or CUSTOMER_MANAGED_CAS_CA.', 'x-google-enum-descriptions': ['Unspecified: no automatic server certificate rotation.', 'No automatic server certificate rotation. The user must [manage server certificate rotation](/sql/docs/mysql/manage-ssl-instance#rotate-server-certificate-cas) on their side.', 'Automatic server certificate rotation during Cloud SQL scheduled maintenance or self-service maintenance updates. Requires `server_ca_mode` to be `GOOGLE_MANAGED_CAS_CA` or `CUSTOMER_MANAGED_CAS_CA`.']}, 'enablePrivatePathForGoogleCloudServices': {'type': 'boolean', 'description': 'Controls connectivity to private IP instances from Google services, such as BigQuery.'}}, 'description': 'IP Management configuration.'}, 'SelectedObjects': {'type': 'object', 'properties': {'database': {'type': 'string', 'description': 'Required. The name of the database to migrate.'}}, 'description': 'A list of objects that the user selects for replication from an external source instance.'}, 'FinalBackupConfig': {'type': 'object', 'properties': {'enabled': {'type': 'boolean', 'description': 'Whether the final backup is enabled for the instance.'}, 'retentionDays': {'type': 'integer', 'format': 'int32', 'description': 'The number of days to retain the final backup after the instance deletion. The final backup will be purged at (time_of_instance_deletion + retention_days).'}}, 'description': 'Config used to determine the final backup settings for the instance.'}, 'InstanceReference': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name of the Cloud SQL instance being referenced. This does not include the project ID.'}, 'region': {'type': 'string', 'description': 'The region of the Cloud SQL instance being referenced.'}, 'project': {'type': 'string', 'description': 'The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.'}}, 'description': 'Reference to another Cloud SQL instance.'}, 'MaintenanceWindow': {'type': 'object', 'properties': {'day': {'type': 'integer', 'format': 'int32', 'description': 'Day of week - `MONDAY`, `TUESDAY`, `WEDNESDAY`, `THURSDAY`, `FRIDAY`, `SATURDAY`, or `SUNDAY`. Specify in the UTC time zone. Returned in output as an integer, 1 to 7, where `1` equals Monday.'}, 'hour': {'type': 'integer', 'format': 'int32', 'description': 'Hour of day - 0 to 23. Specify in the UTC time zone.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#maintenanceWindow`.'}, 'updateTrack': {'enum': ['SQL_UPDATE_TRACK_UNSPECIFIED', 'canary', 'stable', 'week5'], 'type': 'string', 'description': 'Maintenance timing settings: `canary`, `stable`, or `week5`. For more information, see [About maintenance on Cloud SQL instances](https://cloud.google.com/sql/docs/mysql/maintenance).', 'x-google-enum-descriptions': ['This is an unknown maintenance timing preference.', 'For an instance with a scheduled maintenance window, this maintenance timing indicates that the maintenance update is scheduled 7 to 14 days after the notification is sent out. Also referred to as `Week 1` (Console) and `preview` (gcloud CLI).', 'For an instance with a scheduled maintenance window, this maintenance timing indicates that the maintenance update is scheduled 15 to 21 days after the notification is sent out. Also referred to as `Week 2` (Console) and `production` (gcloud CLI).', 'For instance with a scheduled maintenance window, this maintenance timing indicates that the maintenance update is scheduled 35 to 42 days after the notification is sent out.']}}, 'description': 'Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes.'}, 'LocationPreference': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#locationPreference`.'}, 'zone': {'type': 'string', 'description': 'The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.'}, 'secondaryZone': {'type': 'string', 'description': "The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'."}, 'followGaeApplication': {'type': 'string', 'deprecated': True, 'description': 'The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.'}}, 'description': 'Preferred location. This specifies where a Cloud SQL instance is located. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.'}, 'ReplicationCluster': {'type': 'object', 'properties': {'drReplica': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Read-only field that indicates whether the replica is a DR replica. This field is not set if the instance is a primary instance.'}, 'psaWriteEndpoint': {'type': 'string', 'readOnly': True, 'description': "Output only. If set, this field indicates this instance has a private service access (PSA) DNS endpoint that is pointing to the primary instance of the cluster. If this instance is the primary, then the DNS endpoint points to this instance. After a switchover or replica failover operation, this DNS endpoint points to the promoted instance. This is a read-only field, returned to the user as information. This field can exist even if a standalone instance doesn't have a DR replica yet or the DR replica is deleted."}, 'failoverDrReplicaName': {'type': 'string', 'description': 'Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Set this field to a replica name to designate a DR replica for a primary instance. Remove the replica name to remove the DR replica designation.'}}, 'description': 'A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL.'}, 'SqlFailoverReplica': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': "The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID."}, 'available': {'type': 'boolean', 'description': 'The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.'}}}, 'SqlOutOfDiskReport': {'type': 'object', 'properties': {'sqlOutOfDiskState': {'enum': ['SQL_OUT_OF_DISK_STATE_UNSPECIFIED', 'NORMAL', 'SOFT_SHUTDOWN'], 'type': 'string', 'description': 'This field represents the state generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job', 'x-google-enum-descriptions': ['Unspecified state', 'The instance has plenty space on data disk', 'Data disk is almost used up. It is shutdown to prevent data corruption.']}, 'sqlMinRecommendedIncreaseSizeGb': {'type': 'integer', 'format': 'int32', 'description': 'The minimum recommended increase size in GigaBytes This field is consumed by the frontend * Writers: * the proactive database wellness job for OOD. * Readers:'}}, 'description': 'This message wraps up the information written by out-of-disk detection job.'}, 'BackupConfiguration': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupConfiguration`.'}, 'enabled': {'type': 'boolean', 'description': 'Whether this configuration is enabled.'}, 'location': {'type': 'string', 'description': 'Location of the backup'}, 'startTime': {'type': 'string', 'description': 'Start time for the daily backup configuration in UTC timezone in the 24 hour format - `HH:MM`.'}, 'backupTier': {'enum': ['BACKUP_TIER_UNSPECIFIED', 'STANDARD', 'ADVANCED', 'ENHANCED'], 'type': 'string', 'readOnly': True, 'description': 'Output only. Backup tier that manages the backups for the instance.', 'x-google-enum-deprecated': [False, False, True, False], 'x-google-enum-descriptions': ['Unspecified.', 'Instance is managed by Cloud SQL.', 'Deprecated: ADVANCED is deprecated. Please use ENHANCED instead.', 'Instance is managed by Google Cloud Backup and DR Service.']}, 'binaryLogEnabled': {'type': 'boolean', 'description': '(MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.'}, 'backupRetentionSettings': {'$ref': '#/$defs/BackupRetentionSettings', 'description': 'Backup retention settings.'}, 'pointInTimeRecoveryEnabled': {'type': 'boolean', 'description': 'Whether point in time recovery is enabled.'}, 'transactionLogRetentionDays': {'type': 'integer', 'format': 'int32', 'description': 'The number of days of transaction logs we retain for point in time restore, from 1-7.'}, 'transactionalLogStorageState': {'enum': ['TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED', 'DISK', 'SWITCHING_TO_CLOUD_STORAGE', 'SWITCHED_TO_CLOUD_STORAGE', 'CLOUD_STORAGE'], 'type': 'string', 'readOnly': True, 'description': 'Output only. This value contains the storage location of transactional logs used to perform point-in-time recovery (PITR) for the database.', 'x-google-enum-descriptions': ['Unspecified.', 'The transaction logs used for PITR for the instance are stored on a data disk.', 'The transaction logs used for PITR for the instance are switching from being stored on a data disk to being stored in Cloud Storage. Only applicable to MySQL.', 'The transaction logs used for PITR for the instance are now stored in Cloud Storage. Previously, they were stored on a data disk. Only applicable to MySQL.', 'The transaction logs used for PITR for the instance are stored in Cloud Storage. Only applicable to MySQL and PostgreSQL.']}, 'replicationLogArchivingEnabled': {'type': 'boolean', 'deprecated': True, 'description': 'Optional. Deprecated: replication_log_archiving_enabled is deprecated and will be removed from a future version of the API. Use point_in_time_recovery_enabled instead.'}}, 'description': 'Database instance backup configuration.'}, 'ConnectionPoolFlags': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. The name of the flag.'}, 'value': {'type': 'string', 'description': "Required. The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value."}}, 'description': 'Connection pool flags for Cloud SQL instances managed connection pool configuration.'}, 'ConnectionPoolConfig': {'type': 'object', 'properties': {'flags': {'type': 'array', 'items': {'$ref': '#/$defs/ConnectionPoolFlags'}, 'description': 'Optional. List of connection pool configuration flags.'}, 'poolerCount': {'type': 'integer', 'format': 'int32', 'readOnly': True, 'description': 'Output only. Number of connection poolers.'}, 'connectionPoolingEnabled': {'type': 'boolean', 'description': 'Whether managed connection pooling is enabled.'}}, 'description': 'The managed connection pooling configuration.'}, 'DiskEncryptionStatus': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#diskEncryptionStatus`.'}, 'kmsKeyVersionName': {'type': 'string', 'description': 'KMS key version used to encrypt the Cloud SQL instance resource'}}, 'description': 'Disk encryption status for an instance.'}, 'GeminiInstanceConfig': {'type': 'object', 'properties': {'entitled': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Whether Gemini is enabled.'}, 'activeQueryEnabled': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Whether the active query is enabled.'}, 'indexAdvisorEnabled': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Whether the index advisor is enabled.'}, 'flagRecommenderEnabled': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Whether the flag recommender is enabled.'}, 'googleVacuumMgmtEnabled': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Whether the vacuum management is enabled.'}, 'oomSessionCancelEnabled': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Whether canceling the out-of-memory (OOM) session is enabled.'}}, 'description': 'Gemini instance configuration.'}, 'ReplicaConfiguration': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#replicaConfiguration`.'}, 'failoverTarget': {'type': 'boolean', 'description': 'Specifies if the replica is the failover target. If the field is set to `true`, the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.'}, 'cascadableReplica': {'type': 'boolean', 'description': 'Optional. Specifies if a SQL Server replica is a cascadable replica. A cascadable replica is a SQL Server cross region replica that supports replica(s) under it.'}, 'mysqlReplicaConfiguration': {'$ref': '#/$defs/MySqlReplicaConfiguration', 'description': 'MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory.'}}, 'description': 'Read-replica configuration for connecting to the primary instance.'}, 'SqlServerAuditConfig': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always sql#sqlServerAuditConfig'}, 'bucket': {'type': 'string', 'description': 'The name of the destination bucket (e.g., gs://mybucket).'}, 'uploadInterval': {'type': 'string', 'format': 'google-duration', 'description': 'How often to upload generated audit files.'}, 'retentionInterval': {'type': 'string', 'format': 'google-duration', 'description': 'How long to keep generated audit files.'}}, 'description': 'SQL Server specific audit configuration.'}, 'DenyMaintenancePeriod': {'type': 'object', 'properties': {'time': {'type': 'string', 'description': 'Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00'}, 'endDate': {'type': 'string', 'description': '"deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01'}, 'startDate': {'type': 'string', 'description': '"deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01'}}, 'description': 'Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.'}, 'SqlServerEntraIdConfig': {'type': 'object', 'properties': {'kind': {'type': 'string', 'readOnly': True, 'description': 'Output only. This is always sql#sqlServerEntraIdConfig'}, 'tenantId': {'type': 'string', 'description': 'Optional. The tenant ID for the Entra ID configuration.'}, 'applicationId': {'type': 'string', 'description': 'Optional. The application ID for the Entra ID configuration.'}}, 'description': 'SQL Server Entra ID configuration.'}, 'AdvancedMachineFeatures': {'type': 'object', 'properties': {'threadsPerCore': {'type': 'integer', 'format': 'int32', 'description': 'The number of threads per physical core.'}}, 'description': 'Specifies options for controlling advanced machine features.'}, 'BackupRetentionSettings': {'type': 'object', 'properties': {'retentionUnit': {'enum': ['RETENTION_UNIT_UNSPECIFIED', 'COUNT'], 'type': 'string', 'description': "The unit that 'retained_backups' represents.", 'x-google-enum-descriptions': ['Backup retention unit is unspecified, will be treated as COUNT.', 'Retention will be by count, eg. "retain the most recent 7 backups".']}, 'retainedBackups': {'type': 'integer', 'format': 'int32', 'description': "Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups."}}, 'description': 'We currently only support backup retention by specifying the number of backups we will retain.'}, 'BlueGreenDeploymentInfo': {'type': 'object', 'properties': {'state': {'enum': ['STATE_UNSPECIFIED', 'PRE_SWITCHOVER', 'POST_SWITCHOVER'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The current state of blue-green-deployment for UI tags', 'x-google-enum-descriptions': ['The state of the deployment is unknown.', 'The deployment is pre-switchover.', 'The deployment is post-switchover.']}, 'source': {'$ref': '#/$defs/SourceRole', 'readOnly': True, 'description': 'Output only. The source instance for the Blue-Green deployment.'}, 'target': {'$ref': '#/$defs/TargetRole', 'readOnly': True, 'description': 'Output only. The target instance for the Blue-Green deployment.'}, 'deploymentId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The resource ID of the blue-green deployment.'}}, 'description': 'Blue-green deployment metadata for a database instance. In a blue-green deployment, we maintain two environments, one of which is live. This message contains details about the blue-green deployment.'}, 'OnPremisesConfiguration': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#onPremisesConfiguration`.'}, 'hostPort': {'type': 'string', 'description': 'The host and port of the on-premises instance in host:port format'}, 'password': {'type': 'string', 'description': 'The password for connecting to on-premises instance.'}, 'username': {'type': 'string', 'description': 'The username for connecting to on-premises instance.'}, 'clientKey': {'type': 'string', 'description': "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate."}, 'sslOption': {'enum': ['SSL_OPTION_UNSPECIFIED', 'DISABLE', 'REQUIRE', 'VERIFY_CA'], 'type': 'string', 'description': 'Optional. SSL option for replica connection to the on-premises source.', 'x-google-enum-descriptions': ['Unknown SSL option i.e. SSL option not specified by user.', 'SSL is not used for replica connection to the on-premises source.', 'SSL is required for replica connection to the on-premises source.', 'Verify CA is required for replica connection to the on-premises source.']}, 'dmsManaged': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. Indicates whether the resource is managed by Database Migration Service.'}, 'dumpFilePath': {'type': 'string', 'description': 'The dump file to create the Cloud SQL replica.'}, 'caCertificate': {'type': 'string', 'description': "PEM representation of the trusted CA's x509 certificate."}, 'sourceInstance': {'$ref': '#/$defs/InstanceReference', 'description': 'The reference to Cloud SQL instance if the source is Cloud SQL.'}, 'selectedObjects': {'type': 'array', 'items': {'$ref': '#/$defs/SelectedObjects'}, 'description': 'Optional. A list of objects that the user selects for replication from an external source instance.'}, 'clientCertificate': {'type': 'string', 'description': "PEM representation of the replica's x509 certificate."}}, 'description': 'On-premises instance configuration.'}, 'PscAutoConnectionConfig': {'type': 'object', 'properties': {'status': {'type': 'string', 'description': 'The connection status of the consumer endpoint.'}, 'ipAddress': {'type': 'string', 'description': 'The IP address of the consumer endpoint.'}, 'consumerNetwork': {'type': 'string', 'description': 'Optional. The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, `projects/project1/global/networks/network1`. The consumer host project of this network might be different from the consumer service project.'}, 'consumerProject': {'type': 'string', 'description': 'Optional. This is the project ID of consumer service project of this consumer endpoint. This is only applicable if `consumer_network` is a shared VPC network.'}, 'consumerNetworkStatus': {'type': 'string', 'description': 'The connection policy status of the consumer network.'}, 'instanceAutoDnsStatus': {'enum': ['AUTO_DNS_STATUS_UNSPECIFIED', 'AUTO_DNS_OK', 'AUTO_DNS_FAILED', 'AUTO_DNS_UNKNOWN'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The status of automated DNS provisioning.', 'x-google-enum-descriptions': ['Unspecified status. This means status is missing from dependency service.', 'DNS provisioning is OK.', 'DNS provisioning failed.', 'DNS provisioning status is not recognized by Cloud SQL.']}, 'serviceConnectionPolicy': {'type': 'string', 'readOnly': True, 'description': 'Output only. The service connection policy created automatically for the consumer network when `psc_auto_connection_policy_enabled` is true. It is in the format of: `projects/{project}/regions/{region}/serviceConnectionPolicies/{policy_id}` The `policy_id` is in format of `$NETWORK-$RANDOM`.'}, 'writeEndpointAutoDnsStatus': {'enum': ['AUTO_DNS_STATUS_UNSPECIFIED', 'AUTO_DNS_OK', 'AUTO_DNS_FAILED', 'AUTO_DNS_UNKNOWN'], 'type': 'string', 'readOnly': True, 'description': 'Output only. The status of automated DNS provisioning for the write endpoint.', 'x-google-enum-descriptions': ['Unspecified status. This means status is missing from dependency service.', 'DNS provisioning is OK.', 'DNS provisioning failed.', 'DNS provisioning status is not recognized by Cloud SQL.']}, 'serviceConnectionPolicyCreationResult': {'type': 'string', 'readOnly': True, 'description': 'Output only. The status of service connection policy creation.'}}, 'description': 'Settings for an automatically-setup Private Service Connect consumer endpoint that is used to connect to a Cloud SQL instance.'}, 'ReadPoolAutoScaleConfig': {'type': 'object', 'properties': {'enabled': {'type': 'boolean', 'description': 'Indicates whether read pool auto scaling is enabled.'}, 'maxNodeCount': {'type': 'integer', 'format': 'int32', 'description': 'Maximum number of read pool nodes to be maintained.'}, 'minNodeCount': {'type': 'integer', 'format': 'int32', 'description': 'Minimum number of read pool nodes to be maintained.'}, 'targetMetrics': {'type': 'array', 'items': {'$ref': '#/$defs/TargetMetric'}, 'description': 'Optional. Target metrics for read pool auto scaling.'}, 'disableScaleIn': {'type': 'boolean', 'description': 'Indicates whether read pool auto scaling supports scale in operations (removing nodes).'}, 'scaleInCooldownSeconds': {'type': 'integer', 'format': 'int32', 'description': 'The cooldown period for scale-in operations.'}, 'scaleOutCooldownSeconds': {'type': 'integer', 'format': 'int32', 'description': 'The cooldown period for scale-out operations.'}}, 'description': 'The read pool auto-scale configuration.'}, 'SqlScheduledMaintenance': {'type': 'object', 'properties': {'canDefer': {'type': 'boolean', 'deprecated': True}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The start time of any upcoming scheduled maintenance for this instance.'}, 'canReschedule': {'type': 'boolean', 'description': 'If the scheduled maintenance can be rescheduled.'}, 'scheduleDeadlineTime': {'type': 'string', 'format': 'date-time', 'description': 'Maintenance cannot be rescheduled to start beyond this deadline.'}}, 'description': 'Any scheduled maintenance for this instance.'}, 'AvailableDatabaseVersion': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The database version name. For MySQL 8.0, this string provides the database major and minor version.'}, 'displayName': {'type': 'string', 'description': "The database version's display name."}, 'majorVersion': {'type': 'string', 'description': "The version's major version name."}}, 'description': 'An available database version. It can be a major or a minor version.'}, 'PasswordValidationPolicy': {'type': 'object', 'properties': {'minLength': {'type': 'integer', 'format': 'int32', 'description': 'Minimum number of characters allowed.'}, 'complexity': {'enum': ['COMPLEXITY_UNSPECIFIED', 'COMPLEXITY_DEFAULT'], 'type': 'string', 'description': 'The complexity of the password.', 'x-google-enum-descriptions': ['Complexity check is not specified.', 'A combination of lowercase, uppercase, numeric, and non-alphanumeric characters.']}, 'reuseInterval': {'type': 'integer', 'format': 'int32', 'description': 'Number of previous passwords that cannot be reused.'}, 'enablePasswordPolicy': {'type': 'boolean', 'description': 'Whether to enable the password policy or not. When enabled, passwords must meet complexity requirements. Keep this policy enabled to help prevent unauthorized access. Disabling this policy allows weak passwords.'}, 'passwordChangeInterval': {'type': 'string', 'format': 'google-duration', 'description': 'Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.'}, 'disallowUsernameSubstring': {'type': 'boolean', 'description': 'Disallow username as a part of the password.'}, 'disallowCompromisedCredentials': {'type': 'boolean', 'deprecated': True, 'description': 'This field is deprecated and will be removed in a future version of the API.'}}, 'description': 'Database instance local user password validation policy. This message defines the password policy for local database users. When enabled, it enforces constraints on password complexity, length, and reuse. Keep this policy enabled to help prevent unauthorized access.'}, 'PerformanceCaptureConfig': {'type': 'object', 'properties': {'enabled': {'type': 'boolean', 'description': 'Optional. Enables or disables the performance capture feature.'}, 'probeThreshold': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum number of consecutive probe threshold that triggers performance capture.'}, 'transactionKillType': {'enum': ['TRANSACTION_KILL_TYPE_UNSPECIFIED', 'READ_ONLY_TRANSACTIONS', 'ALL_TRANSACTIONS'], 'type': 'string', 'description': 'Optional. Determines which transactions are allowed to be terminated when they exceed `transaction_kill_threshold_seconds`. This allows protecting write-heavy transactions from auto-termination if desired. Defaults to `READ_ONLY_TRANSACTIONS` if unspecified.', 'x-google-enum-descriptions': ['Unspecified.', 'Only read-only transactions are eligible for termination.', 'All transactions are eligible for termination, including those with write operations (such as INSERT, UPDATE, DELETE, or DDL).']}, 'probingIntervalSeconds': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the interval in seconds between consecutive probes that check if any trigger condition thresholds have been reached.'}, 'runningThreadsThreshold': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum number of MySQL `Threads_running` to trigger the performance capture on the primary instance.'}, 'memoryUsageThresholdPercent': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum percentage of memory usage to trigger the performance capture. Valid integers range from `10` to `99`. Enter `0` to disable the check.'}, 'semaphoreWaitThresholdCount': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum allowed number of semaphore waits to trigger the performance capture. Valid integers range from `10` to `10000`. Enter `0` to disable the check.'}, 'secondsBehindSourceThreshold': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum number of seconds replica must be lagging behind primary instance to trigger the performance capture on replica.'}, 'transactionDurationThreshold': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the amount of time in seconds that a transaction needs to have been open before the watcher starts recording it.'}, 'cpuUtilizationThresholdPercent': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum percentage of CPU utilization to trigger the performance capture. Valid integers range from `10` to `99`. Enter `0` to disable the check.'}, 'historyListLengthThresholdCount': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum number of undo log entries in the history list length to trigger the performance capture. Valid integers range from `10000` to `10000000`. Enter `0` to disable the check.'}, 'transactionKillThresholdSeconds': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the amount of time in seconds that a transaction needs to have been open before the watcher starts terminating it. Valid integers range from `60` to `604800` (7 days). Enter `0` to disable. If enabled (i.e., > 0), this value must be greater than or equal to `transaction_duration_threshold`. Configurations where `0 < transaction_kill_threshold_seconds < transaction_duration_threshold` will be rejected.'}, 'transactionKillExcludedUserHosts': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. Specifies a customer-defined list of users to exclude from transaction termination. Entries can be in the format \'user@host\' or just \'user\'. A standalone \'user\' implies \'user@%\', excluding the user from any host. Wildcard \'%\' is allowed in the host part of the \'user@host\' format. Example: `["app_user", "db_admin@10.1.2.3", "report_user@%"]`'}, 'transactionLockWaitThresholdCount': {'type': 'integer', 'format': 'int32', 'description': 'Optional. Specifies the minimum allowed number of transactions in lock wait state to trigger the performance capture. Valid integers range from `10` to `10000`. Enter `0` to disable the check.'}}, 'description': 'Performance capture configuration.'}, 'SqlActiveDirectoryConfig': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always sql#activeDirectoryConfig.'}, 'mode': {'enum': ['ACTIVE_DIRECTORY_MODE_UNSPECIFIED', 'MANAGED_ACTIVE_DIRECTORY', 'SELF_MANAGED_ACTIVE_DIRECTORY', 'CUSTOMER_MANAGED_ACTIVE_DIRECTORY'], 'type': 'string', 'description': 'Optional. The mode of the Active Directory configuration.', 'x-google-enum-deprecated': [False, False, True, False], 'x-google-enum-descriptions': ['Unspecified mode. Will default to MANAGED_ACTIVE_DIRECTORY if the mode is not specified to maintain backward compatibility.', 'Managed Active Directory mode.', 'Deprecated: Use CUSTOMER_MANAGED_ACTIVE_DIRECTORY instead.', 'Customer-managed Active Directory mode.']}, 'domain': {'type': 'string', 'description': 'The name of the domain (e.g., mydomain.com).'}, 'dnsServers': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. Domain controller IPv4 addresses used to bootstrap Active Directory.'}, 'organizationalUnit': {'type': 'string', 'description': 'Optional. The organizational unit distinguished name. This is the full hierarchical path to the organizational unit.'}, 'adminCredentialSecretName': {'type': 'string', 'description': 'Optional. The secret manager key storing the administrator credential. (e.g., projects/{project}/secrets/{secret}).'}}, 'description': 'Active Directory configuration, relevant only for Cloud SQL for SQL Server.'}, 'MySqlReplicaConfiguration': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#mysqlReplicaConfiguration`.'}, 'password': {'type': 'string', 'description': 'The password for the replication connection.'}, 'username': {'type': 'string', 'description': 'The username for the replication connection.'}, 'clientKey': {'type': 'string', 'description': "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate."}, 'sslCipher': {'type': 'string', 'description': 'A list of permissible ciphers to use for SSL encryption.'}, 'dumpFilePath': {'type': 'string', 'description': 'Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.'}, 'caCertificate': {'type': 'string', 'description': "PEM representation of the trusted CA's x509 certificate."}, 'clientCertificate': {'type': 'string', 'description': "PEM representation of the replica's x509 certificate."}, 'connectRetryInterval': {'type': 'integer', 'format': 'int32', 'description': "Seconds to wait between connect retries. MySQL's default is 60 seconds."}, 'masterHeartbeatPeriod': {'type': 'string', 'format': 'int64', 'description': 'Interval in milliseconds between replication heartbeats.'}, 'verifyServerCertificate': {'type': 'boolean', 'description': "Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake."}}, 'description': 'Read-replica configuration specific to MySQL databases.'}, 'DiskEncryptionConfiguration': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#diskEncryptionConfiguration`.'}, 'kmsKeyName': {'type': 'string', 'description': 'Resource name of KMS key for disk encryption.'}, 'confidentialMode': {'type': 'boolean', 'description': "Optional. If true, enables Confidential Mode for the instance's Hyperdisk Balanced volumes. Only supported for zonal C4A instances currently."}, 'cmekSourceLogEncryptionEnforced': {'type': 'boolean', 'description': 'Optional. Whether to enforce CMEK log encryption at source. When enforced, transaction logs are encrypted prior to being uploaded to Cloud Storage. If not enforced, then CMEK logs are encrypted by the Cloud Storage service.'}}, 'description': 'Disk encryption configuration for an instance.'}}, 'properties': {'etag': {'type': 'string', 'description': 'This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#instance`.'}, 'name': {'type': 'string', 'description': 'Name of the Cloud SQL instance. This does not include the project ID.'}, 'tags': {'type': 'object', 'writeOnly': True, 'description': 'Optional. Input only. Immutable. Tag keys and tag values that are bound to this instance. You must represent each item in the map as: `"" : ""`. For example, a single resource can have the following tags: ``` "123/environment": "production", "123/costCenter": "marketing", ``` For more information on tag creation and management, see https://cloud.google.com/resource-manager/docs/tags/tags-overview.', 'x-google-immutable': True, 'additionalProperties': {'type': 'string'}}, 'nodes': {'type': 'array', 'items': {'$ref': '#/$defs/PoolNodeConfig'}, 'readOnly': True, 'description': 'Output only. Entries containing information about each read pool node of the read pool.'}, 'state': {'enum': ['SQL_INSTANCE_STATE_UNSPECIFIED', 'RUNNABLE', 'SUSPENDED', 'PENDING_DELETE', 'PENDING_CREATE', 'MAINTENANCE', 'FAILED', 'ONLINE_MAINTENANCE', 'REPAIRING'], 'type': 'string', 'description': 'The current serving state of the Cloud SQL instance.', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, False], 'x-google-enum-descriptions': ['The state of the instance is unknown.', 'The instance is running, or has been stopped by owner.', 'The instance is not available, for example due to problems with billing.', 'The instance is being deleted.', 'The instance is being created.', 'The instance is down for maintenance.', 'The creation of the instance failed or a fatal error occurred during maintenance.', 'Deprecated', '(Applicable to read pool nodes only.) The read pool node needs to be repaired. The database might be unavailable.']}, 'region': {'type': 'string', 'description': 'The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.'}, 'dnsName': {'type': 'string', 'readOnly': True, 'description': 'Output only. The dns name of the instance.'}, 'gceZone': {'type': 'string', 'description': 'The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance.'}, 'project': {'type': 'string', 'description': 'The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.'}, 'dnsNames': {'type': 'array', 'items': {'$ref': '#/$defs/DnsNameMapping'}, 'readOnly': True, 'description': 'Output only. The list of DNS names used by this instance.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'settings': {'$ref': '#/$defs/Settings', 'description': 'The user settings.'}, 'nodeCount': {'type': 'integer', 'format': 'int32', 'description': 'The number of read pool nodes in a read pool.'}, 'createTime': {'type': 'string', 'format': 'date-time', 'readOnly': True, 'description': 'Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'backendType': {'enum': ['SQL_BACKEND_TYPE_UNSPECIFIED', 'FIRST_GEN', 'SECOND_GEN', 'EXTERNAL'], 'type': 'string', 'description': 'The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.', 'x-google-enum-deprecated': [False, True, False, False], 'x-google-enum-descriptions': ['This is an unknown backend type for instance.', 'V1 speckle instance.', 'V2 speckle instance.', 'On premises instance.']}, 'ipAddresses': {'type': 'array', 'items': {'$ref': '#/$defs/IpMapping'}, 'description': 'The assigned IP addresses for the instance.'}, 'ipv6Address': {'type': 'string', 'deprecated': True, 'description': 'The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.'}, 'maxDiskSize': {'type': 'string', 'format': 'int64', 'deprecated': True, 'description': 'The maximum disk size of the instance in bytes.'}, 'geminiConfig': {'$ref': '#/$defs/GeminiInstanceConfig', 'description': 'Gemini instance configuration.'}, 'instanceType': {'enum': ['SQL_INSTANCE_TYPE_UNSPECIFIED', 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE', 'READ_REPLICA_INSTANCE', 'READ_POOL_INSTANCE', 'GREEN_INSTANCE'], 'type': 'string', 'description': 'The instance type.', 'x-google-enum-descriptions': ['This is an unknown Cloud SQL instance type.', 'A regular Cloud SQL instance that is not replicating from a primary instance.', "An instance running on the customer's premises that is not managed by Cloud SQL.", 'A Cloud SQL instance acting as a read-replica.', 'A Cloud SQL read pool.', 'A Cloud SQL instance acting as a Blue-Green deployment target primary. (MySQL only)']}, 'replicaNames': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The replicas of the instance.'}, 'rootPassword': {'type': 'string', 'description': 'Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.'}, 'satisfiesPzi': {'type': 'boolean', 'readOnly': True, 'description': 'Output only. This status indicates whether the instance satisfies PZI. The status is reserved for future use.'}, 'satisfiesPzs': {'type': 'boolean', 'description': 'This status indicates whether the instance satisfies PZS. The status is reserved for future use.'}, 'serverCaCert': {'$ref': '#/$defs/SslCert', 'description': 'SSL configuration.'}, 'writeEndpoint': {'type': 'string', 'readOnly': True, 'description': 'Output only. The dns name of the primary instance in a replication group.'}, 'connectionName': {'type': 'string', 'description': 'Connection name of the Cloud SQL instance used in connection strings.'}, 'deploymentInfo': {'$ref': '#/$defs/BlueGreenDeploymentInfo', 'readOnly': True, 'description': 'Output only. Deployment info for the instance. This is set if the instance is currently part of any blue-green setup.'}, 'primaryDnsName': {'type': 'string', 'readOnly': True, 'deprecated': True, 'description': 'Output only. DEPRECATED: please use write_endpoint instead.'}, 'currentDiskSize': {'type': 'string', 'format': 'int64', 'deprecated': True, 'description': 'The current disk usage of the instance in bytes. This property has been deprecated. Use the "cloudsql.googleapis.com/database/disk/bytes_used" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details.'}, 'databaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}, 'failoverReplica': {'$ref': '#/$defs/SqlFailoverReplica', 'description': 'The name and status of the failover replica.'}, 'outOfDiskReport': {'$ref': '#/$defs/SqlOutOfDiskReport', 'description': 'This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job'}, 'secondaryGceZone': {'type': 'string', 'description': 'The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.'}, 'suspensionReason': {'type': 'array', 'items': {'enum': ['SQL_SUSPENSION_REASON_UNSPECIFIED', 'BILLING_ISSUE', 'LEGAL_ISSUE', 'OPERATIONAL_ISSUE', 'KMS_KEY_ISSUE', 'PROJECT_ABUSE'], 'type': 'string', 'x-google-enum-descriptions': ['This is an unknown suspension reason.', 'The instance is suspended due to billing issues (for example:, account issue)', 'The instance is suspended due to illegal content (for example:, child pornography, copyrighted material, etc.).', 'The instance is causing operational issues (for example:, causing the database to crash).', 'The KMS key used by the instance is either revoked or denied access to', 'The project is suspended due to abuse detected by Ares.']}, 'description': 'If the instance state is SUSPENDED, the reason for the suspension.'}, 'maintenanceVersion': {'type': 'string', 'description': 'The current software version on the instance.'}, 'masterInstanceName': {'type': 'string', 'description': 'The name of the instance which will act as primary in the replication setup.'}, 'replicationCluster': {'$ref': '#/$defs/ReplicationCluster', 'description': 'Optional. A primary instance and disaster recovery (DR) replica pair. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance experiences regional failure. Applicable to MySQL and PostgreSQL.'}, 'diskEncryptionStatus': {'$ref': '#/$defs/DiskEncryptionStatus', 'description': 'Disk encryption status specific to an instance.'}, 'replicaConfiguration': {'$ref': '#/$defs/ReplicaConfiguration', 'description': 'Configuration specific to failover replicas and read replicas.'}, 'scheduledMaintenance': {'$ref': '#/$defs/SqlScheduledMaintenance', 'description': 'The start time of any upcoming scheduled maintenance for this instance.'}, 'sqlNetworkArchitecture': {'enum': ['SQL_NETWORK_ARCHITECTURE_UNSPECIFIED', 'NEW_NETWORK_ARCHITECTURE', 'OLD_NETWORK_ARCHITECTURE'], 'type': 'string', 'x-google-enum-descriptions': ['', 'The instance uses the new network architecture.', 'The instance uses the old network architecture.']}, 'onPremisesConfiguration': {'$ref': '#/$defs/OnPremisesConfiguration', 'description': 'Configuration specific to on-premises instances.'}, 'databaseInstalledVersion': {'type': 'string', 'readOnly': True, 'description': 'Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.'}, 'pscServiceAttachmentLink': {'type': 'string', 'readOnly': True, 'description': 'Output only. The link to service attachment of PSC instance.'}, 'serviceAccountEmailAddress': {'type': 'string', 'description': 'The service account email address assigned to the instance.\\This property is read-only.'}, 'upgradableDatabaseVersions': {'type': 'array', 'items': {'$ref': '#/$defs/AvailableDatabaseVersion'}, 'readOnly': True, 'description': 'Output only. All database versions that are available for upgrade.'}, 'diskEncryptionConfiguration': {'$ref': '#/$defs/DiskEncryptionConfiguration', 'description': 'Disk encryption configuration specific to an instance.'}, 'availableMaintenanceVersions': {'type': 'array', 'items': {'type': 'string'}, 'readOnly': True, 'description': 'Output only. List all maintenance versions applicable on the instance'}, 'databaseCenterIntegrationEnabled': {'type': 'boolean', 'description': 'Optional. If true, instance metadata is sent to the Database Center. If false, instance metadata is not sent to the Database Center.'}, 'includeReplicasForMajorVersionUpgrade': {'type': 'boolean', 'writeOnly': True, 'description': 'Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.'}, 'switchTransactionLogsToCloudStorageEnabled': {'type': 'boolean', 'writeOnly': True, 'description': 'Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.'}}, 'description': 'A Cloud SQL instance resource.'}
get_operation
Get the status of a long-running operation. A long-running operation can take several minutes to complete. If an operation takes an extended amount of time, then use a command line tool to pause for 30 seconds before rechecking the status of the operation.
Read only
Input schema
{'type': 'object', 'required': ['operation', 'project'], 'properties': {'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}, 'operation': {'type': 'string', 'description': 'Required. Instance operation ID.'}}, 'description': 'Operations get request.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
import_data
Import data into a Cloud SQL instance. If the file doesn't start with `gs://`, then the assumption is that the file is stored locally. If the file is local, then the file must be uploaded to Cloud Storage before you can make the actual `import_data` call. To upload the file to Cloud Storage, you can use the `gcloud` or `gsutil` commands. Before you upload the file to Cloud Storage, consider whether you want to use an existing bucket or create a new bucket in the provided project. After the file is uploaded to Cloud Storage, the instance service account must have sufficient permissions to read the uploaded file from the Cloud Storage bucket. This can be accomplished as follows: 1. Use the `get_instance` tool to get the email address of the instance service account. From the output of the tool, get the value of the `serviceAccountEmailAddress` field. 2. Grant the instance service account the `storage.objectAdmin` role on the provided Cloud Storage bucket. Use a command like `gcloud storage buckets add-iam-policy-binding` or a request to the Cloud Storage API. It can take from two to up to seven minutes or more for the role to be granted and the permissions to be propagated to the service account in Cloud Storage. If you encounter a permissions error after updatingthe IAM policy, then wait a few minutes and try again. After permissions are granted, you can import the data. We recommend that you leave optional parameters empty and use the system defaults. The file type can typically be determined by the file extension. For example, if the file is a SQL file, `.sql` or `.csv` for CSV file. The following is a sample SQL `importContext` for MySQL. ``` { "uri": "gs://sample-gcs-bucket/sample-file.sql", "kind": "sql#importContext", "fileType": "SQL" } ``` There is no `database` parameter present for MySQL since the database name is expected to be present in the SQL file. Specify only one URI. No other fields are required outside of `importContext`. For PostgreSQL, the `database` field is required. The following is a sample PostgreSQL `importContext` with the `database` field specified. ``` { "uri": "gs://sample-gcs-bucket/sample-file.sql", "kind": "sql#importContext", "fileType": "SQL", "database": "sample-db" } ``` The `import_data` tool returns a long-running operation. Use the `get_operation` tool to poll its status until the operation completes.
Input schema
{'type': 'object', '$defs': {'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'required': ['certificatePath', 'privateKeyPath', 'privateKeyPassword', 'name'], 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'InstancesImportRequest': {'type': 'object', 'properties': {'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'Contains details about the import operation.'}}, 'description': 'Database instance import request.'}}, 'properties': {'body': {'$ref': '#/$defs/InstancesImportRequest'}, 'project': {'type': 'string', 'description': 'Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Cloud SQL instance ID. This does not include the project ID.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}}, 'description': 'Instance import request.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
list_instances
List all Cloud SQL instances in the project.
Read only
Input schema
{'type': 'object', 'properties': {'filter': {'type': 'string', 'description': "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly."}, 'project': {'type': 'string', 'description': 'Project ID of the project for which to list Cloud SQL instances.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}, 'pageToken': {'type': 'string', 'description': 'A previously-returned page token representing part of the larger set of results to view.'}, 'maxResults': {'type': 'integer', 'format': 'int64', 'maximum': 4294967295, 'minimum': 0, 'description': 'The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.'}}, 'description': 'Instance list request.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'McpDatabaseInstance': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Name of the Cloud SQL instance. This does not include the project ID.'}, 'tags': {'type': 'object', 'writeOnly': True, 'description': 'Optional. Input only. Tag keys and tag values that are bound to this instance.', 'additionalProperties': {'type': 'string'}}, 'tier': {'type': 'string', 'description': 'Optional. The tier (or machine type) for this instance.'}, 'state': {'enum': ['SQL_INSTANCE_STATE_UNSPECIFIED', 'RUNNABLE', 'SUSPENDED', 'PENDING_DELETE', 'PENDING_CREATE', 'MAINTENANCE', 'FAILED', 'ONLINE_MAINTENANCE', 'REPAIRING'], 'type': 'string', 'readOnly': True, 'description': 'Output only. State of the Cloud SQL instance.', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, False], 'x-google-enum-descriptions': ['The state of the instance is unknown.', 'The instance is running, or has been stopped by owner.', 'The instance is not available, for example due to problems with billing.', 'The instance is being deleted.', 'The instance is being created.', 'The instance is down for maintenance.', 'The creation of the instance failed or a fatal error occurred during maintenance.', 'Deprecated', '(Applicable to read pool nodes only.) The read pool node needs to be repaired. The database might be unavailable.']}, 'region': {'type': 'string', 'description': 'Optional. The geographical region of the Cloud SQL instance. For example, `us-central1`, `europe-west1`, and `asia-east1`.'}, 'edition': {'type': 'string', 'description': 'Optional. The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.'}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project for which to list Cloud SQL instances.'}, 'dataDiskSizeGb': {'type': 'string', 'format': 'int64', 'description': 'Optional. Data disk size in GB. Default value is 100.'}, 'databaseVersion': {'type': 'string'}, 'availabilityType': {'type': 'string', 'description': 'Optional. Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. This is the default value. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).'}}, 'description': 'An instance resource for MCP.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always sql#instancesList.'}, 'items': {'type': 'array', 'items': {'$ref': '#/$defs/McpDatabaseInstance'}, 'description': 'List of mcp instance resources.'}, 'warnings': {'type': 'array', 'items': {'$ref': '#/$defs/ApiWarning'}, 'description': 'List of warnings that occurred while handling the request.'}, 'nextPageToken': {'type': 'string', 'description': 'The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.'}}, 'description': 'Instance list response for MCP.'}
list_users
List all database users for a Cloud SQL instance.
Read only
Input schema
{'type': 'object', 'properties': {'project': {'type': 'string', 'description': 'Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Database instance ID. This does not include the project ID.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}}}
Output schema
{'type': 'object', '$defs': {'User': {'type': 'object', 'properties': {'etag': {'type': 'string', 'description': 'This field is deprecated and will be removed from a future version of the API.'}, 'host': {'type': 'string', 'description': "Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional."}, 'kind': {'type': 'string', 'description': 'This is always `sql#user`.'}, 'name': {'type': 'string', 'description': 'The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.'}, 'type': {'enum': ['BUILT_IN', 'CLOUD_IAM_USER', 'CLOUD_IAM_SERVICE_ACCOUNT', 'CLOUD_IAM_GROUP', 'CLOUD_IAM_GROUP_USER', 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', 'CLOUD_IAM_WORKFORCE_IDENTITY', 'ENTRAID_USER'], 'type': 'string', 'description': "The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.", 'x-google-enum-descriptions': ["The database's built-in user type.", 'Cloud IAM user.', 'Cloud IAM service account.', 'Cloud IAM group. Not used for login.', 'Read-only. Login for a user that belongs to the Cloud IAM group.', 'Read-only. Login for a service account that belongs to the Cloud IAM group.', 'Cloud IAM workforce identity managed by Workforce Identity Federation.', 'Microsoft Entra ID user.']}, 'project': {'type': 'string', 'description': 'The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL.'}, 'iamEmail': {'type': 'string', 'description': 'Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.'}, 'instance': {'type': 'string', 'description': 'The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL.'}, 'password': {'type': 'string', 'description': 'The password for the user.'}, 'iamStatus': {'enum': ['IAM_STATUS_UNSPECIFIED', 'INACTIVE', 'ACTIVE'], 'type': 'string', 'description': 'Indicates if a group is active or inactive for IAM database authentication.', 'x-google-enum-descriptions': ['The default value for users that are not of type CLOUD_IAM_GROUP. Only CLOUD_IAM_GROUP users will be inactive or active. Users with an IamStatus of IAM_STATUS_UNSPECIFIED will not display whether they are active or inactive as that is not applicable to them.', 'INACTIVE indicates a group is not available for IAM database authentication.', 'ACTIVE indicates a group is available for IAM database authentication.']}, 'serverRoles': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. The server roles for the SQL Server login.'}, 'databaseRoles': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. Role memberships of the user'}, 'passwordPolicy': {'$ref': '#/$defs/UserPasswordValidationPolicy', 'description': 'User level password validation policy.'}, 'dualPasswordType': {'enum': ['DUAL_PASSWORD_TYPE_UNSPECIFIED', 'NO_MODIFY_DUAL_PASSWORD', 'NO_DUAL_PASSWORD', 'DUAL_PASSWORD'], 'type': 'string', 'description': 'Dual password status for the user.', 'x-google-enum-descriptions': ['The default value.', "Do not update the user's dual password status.", 'No dual password usable for connecting using this user.', 'Dual password usable for connecting using this user.']}, 'sqlserverUserDetails': {'$ref': '#/$defs/SqlServerUserDetails'}}, 'description': 'A Cloud SQL user resource.'}, 'PasswordStatus': {'type': 'object', 'properties': {'locked': {'type': 'boolean', 'description': 'If true, user does not have login privileges.'}, 'passwordExpirationTime': {'type': 'string', 'format': 'date-time', 'description': 'The expiration time of the current password.'}}, 'description': 'Read-only password status.'}, 'SqlServerUserDetails': {'type': 'object', 'properties': {'disabled': {'type': 'boolean', 'description': 'Indicates if the user has been disabled.'}, 'serverRoles': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Indicates the server roles for this user.'}}, 'description': 'Represents a Sql Server user on the Cloud SQL instance.'}, 'UserPasswordValidationPolicy': {'type': 'object', 'properties': {'status': {'$ref': '#/$defs/PasswordStatus', 'readOnly': True, 'description': 'Output only. Read-only password status.'}, 'allowedFailedAttempts': {'type': 'integer', 'format': 'int32', 'description': 'Number of failed login attempts allowed before user get locked.'}, 'enableFailedAttemptsCheck': {'type': 'boolean', 'description': 'If true, failed login attempts check will be enabled.'}, 'enablePasswordVerification': {'type': 'boolean', 'description': 'If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.'}, 'passwordExpirationDuration': {'type': 'string', 'format': 'google-duration', 'description': 'Expiration duration after password is updated.'}}, 'description': 'User level password validation policy.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#usersList`.'}, 'items': {'type': 'array', 'items': {'$ref': '#/$defs/User'}, 'description': 'List of user resources in the instance.'}, 'nextPageToken': {'type': 'string', 'deprecated': True, 'description': 'Unused.'}}, 'description': 'User list response.'}
postgres_upgrade_precheck
Checks if a Cloud SQL for PostgreSQL instance is ready for a major version upgrade to the specified target version. The `target_database_version` MUST be provided in the request (e.g., `POSTGRES_15`). This tool helps identify potential issues *before* attempting the actual upgrade, reducing the risk of failure or downtime. This tool is only supported for PostgreSQL primary instances and does not run on read replicas. The precheck typically evaluates: - Database schema compatibility with the target version. - Cloud SQL limitations and unsupported features. - Instance resource constraints (e.g., number of relations). - Compatibility of current database settings and extensions. - Overall instance health and readiness. This tool returns a long-running operation. Use the `get_operation` tool with the operation name returned by this call to poll its status. IMPORTANT: Once the operation status is DONE, the detailed precheck results are available within the `Operation` resource. You will need to inspect the response from `get_operation`. The findings are located in the `pre_check_major_version_upgrade_context.pre_check_response` field. The findings are structured, indicating: - INFO: General information. - WARNING: Potential issues that don't block the upgrade but should be reviewed. - ERROR: Critical issues that MUST be resolved before attempting the upgrade. Each finding should include a message and any required actions. Addressing any reported issues is crucial before proceeding with the major version upgrade. If `pre_check_response` is empty or missing, it indicates that no issues were identified during the precheck. Running this precheck does not impact the instance's availability.
Input schema
{'type': 'object', '$defs': {'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'required': ['targetDatabaseVersion'], 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}, 'InstancesPreCheckMajorVersionUpgradeRequest': {'type': 'object', 'required': ['preCheckMajorVersionUpgradeContext'], 'properties': {'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'Required. Contains details about the pre-check major version upgrade operation.'}}, 'description': 'Request for Pre-checks for MVU'}}, 'required': ['instance', 'project', 'body'], 'properties': {'body': {'$ref': '#/$defs/InstancesPreCheckMajorVersionUpgradeRequest', 'description': 'Required. The context for request to perform the pre-check major version upgrade operation.'}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Required. Cloud SQL instance ID. This does not include the project ID.'}, 'location': {'type': 'string', 'description': 'Optional. Region of the Cloud SQL instance.'}}, 'description': 'Request for Pre-checks for MVU'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
restore_backup
Restores a backup to a Cloud SQL instance. The target_instance and target_project must be provided and populated in the request. The backup identifier can be provided in several ways: 1. A backup_run_id (which is an integer). 2. A backup URI of the format `projects/{project-id}/backups/{backup-uid}`. 3. A backup URI of the format `projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}`. Use the identifier to populate the `backup_id` field in the request. The source_project must be populated in the request. If the identifier is a backup_run_id, the source_project will be provided. If the identifier is a backup URI, the source_project may need to be extracted from the URI. Do not confuse the extracted source_project with the target_project, which will be provided in other ways. In addition, if the identifier is a backup_run_id, the source_instance must be provided and populated in the request. Do not try to create the instance before the restore, the restore itself will create the instance if needed. Confirm the parameters with the user before executing the restore.
Destructive
Input schema
{'type': 'object', 'required': ['targetProject', 'targetInstance', 'backupId', 'sourceProject'], 'properties': {'backupId': {'type': 'string', 'description': "Required. The identifier of the backup to restore. This will be one of the following: 1. An int64 containing a backup_run_id. 2. A backup name of the format 'projects/{project}/backups/{backup-uid}'. 3. A backupDR name of the format 'projects/{project}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}'."}, 'sourceProject': {'type': 'string', 'description': 'Required. The project ID of the source instance containing the backup.'}, 'targetProject': {'type': 'string', 'description': 'Required. Project ID of the target project.'}, 'sourceInstance': {'type': 'string', 'description': 'Optional. The Cloud SQL instance ID of the source instance containing the backup. Only necessary if the backup_id is a backup_run_id.'}, 'targetInstance': {'type': 'string', 'description': 'Required. Cloud SQL instance ID of the target. This does not include the project ID.'}}, 'description': 'Instance restore backup request for MCP.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
update_instance
Partially updates the configuration settings of a Cloud SQL instance. * This tool returns a long-running operation. Use the `get_operation` tool to poll its status until the operation completes. * Some update operations, such as changing the edition upgrade or instance tier, etc might cause the instance to restart, resulting in downtime. Before you proceed with such operations, get confirmation from the user.
Destructive
Input schema
{'type': 'object', '$defs': {'PsaMcpConfig': {'type': 'object', 'required': ['network'], 'properties': {'network': {'type': 'string', 'description': 'Required. The full resource name of the VPC network to connect to via PSA. Format: projects/{project}/global/networks/{network} REQUIRED if enabling PSA.'}, 'allocatedIpRange': {'type': 'string', 'description': 'Optional: The name of an allocated IP range in the consumer VPC.'}}, 'description': 'Configuration for creating a Cloud SQL instance with Private Service Access.'}, 'PscMcpConfig': {'type': 'object', 'properties': {'network': {'type': 'string', 'description': 'Optional. The consumer network of this consumer endpoint. This must be a resource path that includes both the host project and the network name. For example, `projects/project1/global/networks/network1`. The consumer host project of this network might be different from the consumer service project.'}, 'project': {'type': 'string', 'description': 'Optional. The project ID of the service project of this PSC consumer endpoint. This is only applicable if `network` is a shared VPC network.'}, 'pscEnabled': {'type': 'boolean', 'description': 'Optional. Whether PSC connectivity is enabled for this instance.'}}, 'description': 'Configuration for Private Service Connect (PSC) endpoint creation for MCP. psc_enabled is the only field needed for instance creation with Private Service Connect enabled. Other optional fields will be added later.'}, 'DatabaseFlags': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.'}, 'value': {'type': 'string', 'description': "The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value."}}, 'description': 'Database flags for Cloud SQL instances.'}, 'DataCacheConfig': {'type': 'object', 'properties': {'dataCacheEnabled': {'type': 'boolean', 'description': 'Whether data cache is enabled for the instance.'}}, 'description': 'Data cache configurations.'}}, 'required': ['project', 'instance'], 'properties': {'tier': {'type': 'string', 'description': 'Optional. The tier (or machine type) for this instance. format: db-custom-{CPUs}-{Memory}.'}, 'edition': {'type': 'string', 'description': 'Optional. The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.'}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Required. Cloud SQL instance ID. This does not include the project ID.'}, 'ipv4Enabled': {'type': 'boolean', 'description': 'Optional. Whether to enable public IP for the instance. Enabling this flag makes the resource accessible from the public internet, which is a security risk if not properly managed. It is recommended to keep resources private whenever possible.'}, 'psaMcpConfig': {'$ref': '#/$defs/PsaMcpConfig', 'description': 'Optional. Configuration for Private Service Access (PSA) instance update.'}, 'pscMcpConfig': {'$ref': '#/$defs/PscMcpConfig', 'description': 'Optional. Configuration for Private Service Connect (PSC) instance update.'}, 'dataApiAccess': {'enum': ['DATA_API_ACCESS_UNSPECIFIED', 'DISALLOW_DATA_API', 'ALLOW_DATA_API'], 'type': 'string', 'description': 'Optional. The settings for controlling data API access to an instance.', 'x-google-enum-descriptions': ['Unspecified, effectively the same as `DISALLOW_DATA_API`.', 'Disallow using ExecuteSql API to connect to the instance.', 'Allow using ExecuteSql API to connect to the instance. For private IP instances, this allows authorized users to access the instance from the public internet using ExecuteSql API.']}, 'databaseFlags': {'type': 'array', 'items': {'$ref': '#/$defs/DatabaseFlags'}, 'description': 'Optional. The database flags.'}, 'dataDiskSizeGb': {'type': 'string', 'format': 'int64', 'description': 'Optional. Data disk size in GB.'}, 'dataCacheConfig': {'$ref': '#/$defs/DataCacheConfig', 'description': 'Optional. Configuration for the data cache. A data cache can improve performance for read-heavy workloads by caching frequently accessed data in-memory.'}, 'googleMlIntegrationEnabled': {'type': 'boolean', 'description': 'Optional. Enables Cloud SQL instances to connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for MySQL and Cloud SQL for PostgreSQL instances.'}}, 'description': 'Instance patch request for MCP.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
update_user
Update a database user for a Cloud SQL instance. A common use case for the `update_user` is to grant a user the `cloudsqlsuperuser` role, which can provide a user with many required permissions. This tool only supports updating users to assign database roles. * This tool returns a long-running operation. Use the `get_operation` tool to poll its status until the operation completes. * Before calling the `update_user` tool, always check the existing configuration of the user such as the user type with `list_users` tool. * As a special case for MySQL, if the `list_users` tool returns a full email address for the `iamEmail` field, for example `{name=test-account, iamEmail=test-account@project-id.iam.gserviceaccount.com}`, then in your `update_user` request, use the full email address in the `iamEmail` field in the `name` field of your toolrequest. For example, `name=test-account@project-id.iam.gserviceaccount.com`. Key parameters for updating user roles: * `database_roles`: A list of database roles to be assigned to the user. * `revokeExistingRoles`: A boolean field (default: false) that controls how existing roles are handled. How role updates work: 1. **If `revokeExistingRoles` is true:** * Any existing roles granted to the user but NOT in the provided `database_roles` list will be REVOKED. * Revoking only applies to non-system roles. System roles like `cloudsqliamuser` etc won't be revoked. * Any roles in the `database_roles` list that the user does NOT already have will be GRANTED. * If `database_roles` is empty, then ALL existing non-system roles are revoked. 2. **If `revokeExistingRoles` is false (default):** * Any roles in the `database_roles` list that the user does NOT already have will be GRANTED. * Existing roles NOT in the `database_roles` list are KEPT. * If `database_roles` is empty, then there is no change to the user's roles. Examples: * Existing Roles: `[roleA, roleB]` * Request: `database_roles: [roleB, roleC], revokeExistingRoles: true` * Result: Revokes `roleA`, Grants `roleC`. User roles become `[roleB, roleC]`. * Request: `database_roles: [roleB, roleC], revokeExistingRoles: false` * Result: Grants `roleC`. User roles become `[roleA, roleB, roleC]`. * Request: `database_roles: [], revokeExistingRoles: true` * Result: Revokes `roleA`, Revokes `roleB`. User roles become `[]`. * Request: `database_roles: [], revokeExistingRoles: false` * Result: No change. User roles remain `[roleA, roleB]`.
Input schema
{'type': 'object', 'required': ['instance', 'name', 'project', 'type'], 'properties': {'host': {'type': 'string', 'description': 'Optional. Host of the user in the instance.'}, 'name': {'type': 'string', 'description': 'Required. Name of the user in the instance.'}, 'type': {'enum': ['BUILT_IN', 'CLOUD_IAM_USER', 'CLOUD_IAM_SERVICE_ACCOUNT', 'CLOUD_IAM_GROUP', 'CLOUD_IAM_GROUP_USER', 'CLOUD_IAM_GROUP_SERVICE_ACCOUNT', 'CLOUD_IAM_WORKFORCE_IDENTITY', 'ENTRAID_USER'], 'type': 'string', 'description': "Required. The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.", 'x-google-enum-descriptions': ["The database's built-in user type.", 'Cloud IAM user.', 'Cloud IAM service account.', 'Cloud IAM group. Not used for login.', 'Read-only. Login for a user that belongs to the Cloud IAM group.', 'Read-only. Login for a service account that belongs to the Cloud IAM group.', 'Cloud IAM workforce identity managed by Workforce Identity Federation.', 'Microsoft Entra ID user.']}, 'project': {'type': 'string', 'description': 'Required. Project ID of the project that contains the instance.'}, 'instance': {'type': 'string', 'description': 'Required. Database instance ID. This does not include the project ID.'}, 'databaseRoles': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.'}, 'revokeExistingRoles': {'type': 'boolean', 'description': 'Optional. revoke the existing roles granted to the user.'}}, 'description': 'User update request for MCP.'}
Output schema
{'type': 'object', '$defs': {'ApiWarning': {'type': 'object', 'properties': {'code': {'enum': ['SQL_API_WARNING_CODE_UNSPECIFIED', 'REGION_UNREACHABLE', 'MAX_RESULTS_EXCEEDS_LIMIT', 'COMPROMISED_CREDENTIALS', 'INTERNAL_STATE_FAILURE'], 'type': 'string', 'description': 'Code to uniquely identify the warning type.', 'x-google-enum-descriptions': ['An unknown or unset warning type from Cloud SQL API.', 'Warning when one or more regions are not reachable. The returned result set may be incomplete.', 'Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.', 'Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.', 'Warning when the operation succeeds but some non-critical workflow state failed.']}, 'region': {'type': 'string', 'description': 'The region name for REGION_UNREACHABLE warning.'}, 'message': {'type': 'string', 'description': 'The warning message.'}}, 'description': 'An Admin API warning message.'}, 'BackupContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#backupContext`.'}, 'name': {'type': 'string', 'description': 'The name of the backup. Format: projects/{project}/backups/{backup}'}, 'backupId': {'type': 'string', 'format': 'int64', 'description': 'The identifier of the backup.'}}, 'description': 'Backup context.'}, 'ExportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#exportContext`.'}, 'offload': {'type': 'boolean', 'description': 'Whether to perform a serverless export.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'databases': {'type': 'array', 'items': {'type': 'string'}, 'description': "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` If you don't specify a database by name, all user databases in the instance are exported. This excludes system databases and Cloud SQL databases used to manage internal operations. Exporting all user databases is only available for directory-formatted parallel export. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`."}, 'bakExportOptions': {'$ref': '#/$defs/SqlBakExportOptions', 'description': 'Options for exporting data as BAK files.'}, 'csvExportOptions': {'$ref': '#/$defs/SqlCsvExportOptions', 'description': 'Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.'}, 'sqlExportOptions': {'$ref': '#/$defs/SqlExportOptions', 'description': 'Options for exporting data as SQL statements.'}, 'tdeExportOptions': {'$ref': '#/$defs/SqlTdeExportOptions', 'description': 'Optional. Export parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance export context.'}, 'ImportContext': {'type': 'object', 'properties': {'uri': {'type': 'string', 'description': 'Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#importContext`.'}, 'database': {'type': 'string', 'description': 'The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. For entire instance parallel import operations, the database is overridden by the database name stored in subdirectory name. If `fileType` is `CSV`, one database must be specified.'}, 'fileType': {'enum': ['SQL_FILE_TYPE_UNSPECIFIED', 'SQL', 'CSV', 'BAK', 'TDE'], 'type': 'string', 'description': 'The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.', 'x-google-enum-descriptions': ['Unknown file type.', 'File containing SQL statements.', 'File in CSV format.', '', 'TDE certificate.']}, 'importUser': {'type': 'string', 'description': 'The PostgreSQL user for this import operation. PostgreSQL instances only.'}, 'bakImportOptions': {'$ref': '#/$defs/SqlBakImportOptions', 'description': 'Import parameters specific to SQL Server .BAK files'}, 'csvImportOptions': {'$ref': '#/$defs/SqlCsvImportOptions', 'description': 'Options for importing data as CSV.'}, 'sqlImportOptions': {'$ref': '#/$defs/SqlImportOptions', 'description': 'Optional. Options for importing data from SQL statements.'}, 'tdeImportOptions': {'$ref': '#/$defs/SqlTdeImportOptions', 'description': 'Optional. Import parameters specific to SQL Server TDE certificates'}}, 'description': 'Database instance import context.'}, 'OperationError': {'type': 'object', 'properties': {'code': {'type': 'string', 'description': 'Identifies the specific error that occurred.'}, 'kind': {'type': 'string', 'description': 'This is always `sql#operationError`.'}, 'message': {'type': 'string', 'description': 'Additional information about the error encountered.'}}, 'description': 'Database instance operation error.'}, 'OperationErrors': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operationErrors`.'}, 'errors': {'type': 'array', 'items': {'$ref': '#/$defs/OperationError'}, 'description': 'The list of errors encountered while processing this operation.'}}, 'description': 'Database instance operation errors list wrapper.'}, 'PreCheckResponse': {'type': 'object', 'properties': {'message': {'type': 'string', 'description': 'The message to be displayed to the user.'}, 'messageType': {'enum': ['MESSAGE_TYPE_UNSPECIFIED', 'INFO', 'WARNING', 'ERROR'], 'type': 'string', 'description': 'The type of message whether it is an info, warning, or error.', 'x-google-enum-descriptions': ['Default unspecified value to prevent unintended behavior changes.', "General informational messages that don't require action.", "Warnings that might impact the upgrade but don't block it.", 'Errors that a user must resolve before proceeding with the upgrade.']}, 'actionsRequired': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The actions that the user needs to take. Use repeated for multiple actions.'}}, 'description': 'Structured PreCheckResponse containing message, type, and required actions.'}, 'SqlExportOptions': {'type': 'object', 'properties': {'tables': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.'}, 'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel export.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the export should be parallel.'}, 'schemaOnly': {'type': 'boolean', 'description': 'Export only schemas.'}, 'mysqlExportOptions': {'$ref': '#/$defs/MysqlExportOptions'}, 'postgresExportOptions': {'$ref': '#/$defs/PostgresExportOptions', 'description': 'Optional. Options for exporting from a Cloud SQL for PostgreSQL instance.'}}}, 'SqlImportOptions': {'type': 'object', 'properties': {'threads': {'type': 'integer', 'format': 'int32', 'description': 'Optional. The number of threads to use for parallel import.'}, 'parallel': {'type': 'boolean', 'description': 'Optional. Whether or not the import should be parallel.'}, 'postgresImportOptions': {'$ref': '#/$defs/PostgresImportOptions', 'description': 'Optional. Options for importing from a Cloud SQL for PostgreSQL instance.'}}}, 'EncryptionOptions': {'type': 'object', 'properties': {'pvkPath': {'type': 'string', 'description': 'Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'certPath': {'type': 'string', 'description': 'Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.'}, 'pvkPassword': {'type': 'string', 'description': 'Password that encrypts the private key'}, 'keepEncrypted': {'type': 'boolean', 'description': 'Optional. Whether the imported file remains encrypted.'}}}, 'MysqlExportOptions': {'type': 'object', 'properties': {'masterData': {'type': 'integer', 'format': 'int32', 'description': 'Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.'}}, 'description': 'Options for exporting from MySQL.'}, 'SqlBakExportOptions': {'type': 'object', 'properties': {'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of this bak file will be export, FULL or DIFF, SQL Server only', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the export should be striped.'}, 'copyOnly': {'type': 'boolean', 'deprecated': True, 'description': 'Deprecated: copy_only is deprecated. Use differential_base instead'}, 'stripeCount': {'type': 'integer', 'format': 'int32', 'description': 'Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.'}, 'differentialBase': {'type': 'boolean', 'description': 'Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base'}, 'exportLogEndTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The end timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs until current time will be included. Only applied to Cloud SQL for SQL Server.'}, 'exportLogStartTime': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The begin timestamp when transaction log will be included in the export operation. [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`) in UTC. When omitted, all available logs from the beginning of retention period will be included. Only applied to Cloud SQL for SQL Server.'}}, 'description': 'Options for exporting BAK files (SQL Server-only)'}, 'SqlBakImportOptions': {'type': 'object', 'properties': {'stopAt': {'type': 'string', 'format': 'date-time', 'description': 'Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.'}, 'bakType': {'enum': ['BAK_TYPE_UNSPECIFIED', 'FULL', 'DIFF', 'TLOG'], 'type': 'string', 'description': 'Type of the bak content, FULL or DIFF', 'x-google-enum-descriptions': ['Default type.', 'Full backup.', 'Differential backup.', 'Transaction Log backup']}, 'striped': {'type': 'boolean', 'description': 'Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.'}, 'noRecovery': {'type': 'boolean', 'description': 'Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.'}, 'stopAtMark': {'type': 'string', 'description': 'Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.'}, 'recoveryOnly': {'type': 'boolean', 'description': 'Whether or not the backup importing request will just bring database online without downloading Bak content only one of "no_recovery" and "recovery_only" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.'}, 'encryptionOptions': {'$ref': '#/$defs/EncryptionOptions'}}}, 'SqlCsvExportOptions': {'type': 'object', 'properties': {'selectQuery': {'type': 'string', 'description': 'The select query used to extract the data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlCsvImportOptions': {'type': 'object', 'properties': {'table': {'type': 'string', 'description': 'The table to which CSV data is imported.'}, 'columns': {'type': 'array', 'items': {'type': 'string'}, 'description': 'The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.'}, 'quoteCharacter': {'type': 'string', 'description': 'Specifies the quoting character to be used when a data value is quoted.'}, 'escapeCharacter': {'type': 'string', 'description': 'Specifies the character that should appear before a data character that needs to be escaped.'}, 'linesTerminatedBy': {'type': 'string', 'description': 'This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.'}, 'fieldsTerminatedBy': {'type': 'string', 'description': 'Specifies the character that separates columns within each row (line) of the file.'}}}, 'SqlSubOperationType': {'type': 'object', 'properties': {'maintenanceType': {'enum': ['SQL_MAINTENANCE_TYPE_UNSPECIFIED', 'INSTANCE_MAINTENANCE', 'REPLICA_INCLUDED_MAINTENANCE', 'INSTANCE_SELF_SERVICE_MAINTENANCE', 'REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE'], 'type': 'string', 'description': 'The type of maintenance to be performed on the instance.', 'x-google-enum-descriptions': ['Maintenance type is unspecified.', 'Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas, including cascading replicas, are undergoing maintenance. Maintenance is performed on groups of replicas first, followed by the primary instance.', 'Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica.', 'Indicates that the primary instance and all of its replicas are undergoing maintenance, initiated by self-service. Maintenance is performed on groups of replicas first, followed by the primary instance.']}}, 'description': 'The sub operation type based on the operation type.'}, 'SqlTdeExportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the bucket. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'SqlTdeImportOptions': {'type': 'object', 'properties': {'name': {'type': 'string', 'description': 'Required. Certificate name. Applicable only for SQL Server instances.'}, 'privateKeyPath': {'type': 'string', 'description': 'Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'certificatePath': {'type': 'string', 'description': 'Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have read access to the file. Applicable only for SQL Server instances.'}, 'privateKeyPassword': {'type': 'string', 'description': 'Required. Password that encrypts the private key.'}}}, 'PostgresExportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.'}}, 'description': 'Options for exporting from a Cloud SQL for PostgreSQL instance.'}, 'PostgresImportOptions': {'type': 'object', 'properties': {'clean': {'type': 'boolean', 'description': 'Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}, 'ifExists': {'type': 'boolean', 'description': 'Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.'}}}, 'AcquireSsrsLeaseContext': {'type': 'object', 'properties': {'duration': {'type': 'string', 'format': 'google-duration', 'description': 'Lease duration needed for SSRS setup.'}, 'setupLogin': {'type': 'string', 'description': 'The username to be used as the setup login to connect to the database server for SSRS setup.'}, 'serviceLogin': {'type': 'string', 'description': 'The username to be used as the service login to connect to the report database for SSRS setup.'}, 'reportDatabase': {'type': 'string', 'description': 'The report database to be used for SSRS setup.'}}, 'description': 'Acquire SSRS lease context.'}, 'StopWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to stop executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to stop executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'StartWorkloadReplayContext': {'type': 'object', 'properties': {'workloadId': {'type': 'string', 'readOnly': True, 'description': 'Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format `workload-` (for example, `workload-1786046400`). Use this ID to start executing the recorded SQL queries.'}, 'replayInstance': {'type': 'string', 'description': 'Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}}, 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'StopWorkloadCaptureContext': {'type': 'object', 'properties': {'abortLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, immediately aborts the concurrent live replay and discards any un-replayed traffic alongside stopping the capture. If false (the default), the capture stops recording new traffic, but the live replay will continue executing until the entire backlog of captured traffic has been replayed.'}}, 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'StartWorkloadCaptureContext': {'type': 'object', 'properties': {'replayInstance': {'type': 'string', 'description': 'Optional. Required if `enable_live_replay` is true. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, `my-replay-instance`). The instance name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens. The combined length of `project-ID:instance-name` must be 98 characters or less.'}, 'enableLiveReplay': {'type': 'boolean', 'description': 'Optional. If true, the captured workload is simultaneously executed on a separate, ephemeral Cloud SQL instance. This "live replay" instance is automatically provisioned and is cloned from the source instance. If false (the default), the workload is only stored and no live replay occurs. It can be replayed later using a separate `StartWorkloadReplayRequest`. Note: The workload capture runs continuously until an explicit `StopWorkloadCaptureRequest` is issued.'}}, 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'PreCheckMajorVersionUpgradeContext': {'type': 'object', 'properties': {'kind': {'type': 'string', 'description': 'Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.'}, 'preCheckResponse': {'type': 'array', 'items': {'$ref': '#/$defs/PreCheckResponse'}, 'readOnly': True, 'description': 'Output only. The responses from the precheck operation.'}, 'targetDatabaseVersion': {'enum': ['SQL_DATABASE_VERSION_UNSPECIFIED', 'MYSQL_5_1', 'MYSQL_5_5', 'MYSQL_5_6', 'MYSQL_5_7', 'MYSQL_8_0', 'MYSQL_8_0_18', 'MYSQL_8_0_26', 'MYSQL_8_0_27', 'MYSQL_8_0_28', 'MYSQL_8_0_29', 'MYSQL_8_0_30', 'MYSQL_8_0_31', 'MYSQL_8_0_32', 'MYSQL_8_0_33', 'MYSQL_8_0_34', 'MYSQL_8_0_35', 'MYSQL_8_0_36', 'MYSQL_8_0_37', 'MYSQL_8_0_39', 'MYSQL_8_0_40', 'MYSQL_8_0_41', 'MYSQL_8_0_42', 'MYSQL_8_0_43', 'MYSQL_8_0_44', 'MYSQL_8_0_45', 'MYSQL_8_0_46', 'MYSQL_8_4', 'MYSQL_9_7', 'SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB', 'POSTGRES_9_6', 'POSTGRES_10', 'POSTGRES_11', 'POSTGRES_12', 'POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16', 'POSTGRES_17', 'POSTGRES_18', 'POSTGRES_19', 'POSTGRES_20', 'SQLSERVER_2019_STANDARD', 'SQLSERVER_2019_ENTERPRISE', 'SQLSERVER_2019_EXPRESS', 'SQLSERVER_2019_WEB', 'SQLSERVER_2022_STANDARD', 'SQLSERVER_2022_ENTERPRISE', 'SQLSERVER_2022_EXPRESS', 'SQLSERVER_2022_WEB', 'SQLSERVER_2025_STANDARD', 'SQLSERVER_2025_ENTERPRISE', 'SQLSERVER_2025_EXPRESS'], 'type': 'string', 'description': 'Required. The target database version to upgrade to.', 'x-google-enum-deprecated': [False, True, True, False, False, False, False, False, False, False, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['This is an unknown database version.', 'The database version is MySQL 5.1.', 'The database version is MySQL 5.5.', 'The database version is MySQL 5.6.', 'The database version is MySQL 5.7.', 'The database version is MySQL 8.', 'The database major version is MySQL 8.0 and the minor version is 18.', 'The database major version is MySQL 8.0 and the minor version is 26.', 'The database major version is MySQL 8.0 and the minor version is 27.', 'The database major version is MySQL 8.0 and the minor version is 28.', 'The database major version is MySQL 8.0 and the minor version is 29.', 'The database major version is MySQL 8.0 and the minor version is 30.', 'The database major version is MySQL 8.0 and the minor version is 31.', 'The database major version is MySQL 8.0 and the minor version is 32.', 'The database major version is MySQL 8.0 and the minor version is 33.', 'The database major version is MySQL 8.0 and the minor version is 34.', 'The database major version is MySQL 8.0 and the minor version is 35.', 'The database major version is MySQL 8.0 and the minor version is 36.', 'The database major version is MySQL 8.0 and the minor version is 37.', 'The database major version is MySQL 8.0 and the minor version is 39.', 'The database major version is MySQL 8.0 and the minor version is 40.', 'The database major version is MySQL 8.0 and the minor version is 41.', 'The database major version is MySQL 8.0 and the minor version is 42.', 'The database major version is MySQL 8.0 and the minor version is 43.', 'The database major version is MySQL 8.0 and the minor version is 44.', 'The database major version is MySQL 8.0 and the minor version is 45.', 'The database major version is MySQL 8.0 and the minor version is 46.', 'The database version is MySQL 8.4.', 'The database version is MySQL 9.7.', 'The database version is SQL Server 2017 Standard.', 'The database version is SQL Server 2017 Enterprise.', 'The database version is SQL Server 2017 Express.', 'The database version is SQL Server 2017 Web.', 'The database version is PostgreSQL 9.6.', 'The database version is PostgreSQL 10.', 'The database version is PostgreSQL 11.', 'The database version is PostgreSQL 12.', 'The database version is PostgreSQL 13.', 'The database version is PostgreSQL 14.', 'The database version is PostgreSQL 15.', 'The database version is PostgreSQL 16.', 'The database version is PostgreSQL 17.', 'The database version is PostgreSQL 18.', 'The database version is PostgreSQL 19.', 'The database version is PostgreSQL 20.', 'The database version is SQL Server 2019 Standard.', 'The database version is SQL Server 2019 Enterprise.', 'The database version is SQL Server 2019 Express.', 'The database version is SQL Server 2019 Web.', 'The database version is SQL Server 2022 Standard.', 'The database version is SQL Server 2022 Enterprise.', 'The database version is SQL Server 2022 Express.', 'The database version is SQL Server 2022 Web.', 'The database version is SQL Server 2025 Standard.', 'The database version is SQL Server 2025 Enterprise.', 'The database version is SQL Server 2025 Express.']}}, 'description': 'Pre-check major version upgrade context.'}}, 'properties': {'kind': {'type': 'string', 'description': 'This is always `sql#operation`.'}, 'name': {'type': 'string', 'description': 'An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.'}, 'user': {'type': 'string', 'description': 'The email address of the user who initiated this operation.'}, 'error': {'$ref': '#/$defs/OperationErrors', 'description': 'If errors occurred during processing of this operation, this field will be populated.'}, 'status': {'enum': ['SQL_OPERATION_STATUS_UNSPECIFIED', 'PENDING', 'RUNNING', 'DONE'], 'type': 'string', 'description': 'The status of an operation.', 'x-google-enum-descriptions': ['The state of the operation is unknown.', 'The operation has been queued, but has not started yet.', 'The operation is running.', 'The operation completed.']}, 'endTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'selfLink': {'type': 'string', 'description': 'The URI of this resource.'}, 'targetId': {'type': 'string', 'description': 'Name of the resource on which this operation runs.'}, 'startTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'apiWarning': {'$ref': '#/$defs/ApiWarning', 'description': 'An Admin API warning message.'}, 'insertTime': {'type': 'string', 'format': 'date-time', 'description': 'The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.'}, 'targetLink': {'type': 'string'}, 'backupContext': {'$ref': '#/$defs/BackupContext', 'description': 'The context for backup operation, if applicable.'}, 'exportContext': {'$ref': '#/$defs/ExportContext', 'description': 'The context for export operation, if applicable.'}, 'importContext': {'$ref': '#/$defs/ImportContext', 'description': 'The context for import operation, if applicable.'}, 'operationType': {'enum': ['SQL_OPERATION_TYPE_UNSPECIFIED', 'IMPORT', 'EXPORT', 'CREATE', 'UPDATE', 'DELETE', 'RESTART', 'BACKUP', 'SNAPSHOT', 'BACKUP_VOLUME', 'DELETE_VOLUME', 'RESTORE_VOLUME', 'INJECT_USER', 'CLONE', 'STOP_REPLICA', 'START_REPLICA', 'PROMOTE_REPLICA', 'CREATE_REPLICA', 'CREATE_USER', 'DELETE_USER', 'UPDATE_USER', 'CREATE_DATABASE', 'DELETE_DATABASE', 'UPDATE_DATABASE', 'FAILOVER', 'DELETE_BACKUP', 'RECREATE_REPLICA', 'TRUNCATE_LOG', 'DEMOTE_MASTER', 'MAINTENANCE', 'ENABLE_PRIVATE_IP', 'DEFER_MAINTENANCE', 'CREATE_CLONE', 'RESCHEDULE_MAINTENANCE', 'START_EXTERNAL_SYNC', 'LOG_CLEANUP', 'AUTO_RESTART', 'REENCRYPT', 'SWITCHOVER', 'UPDATE_BACKUP', 'ACQUIRE_SSRS_LEASE', 'RELEASE_SSRS_LEASE', 'RECONFIGURE_OLD_PRIMARY', 'CLUSTER_MAINTENANCE', 'SELF_SERVICE_MAINTENANCE', 'SWITCHOVER_TO_REPLICA', 'MAJOR_VERSION_UPGRADE', 'ADVANCED_BACKUP', 'MANAGE_BACKUP', 'ENHANCED_BACKUP', 'REPAIR_READ_POOL', 'CREATE_READ_POOL', 'PRE_CHECK_MAJOR_VERSION_UPGRADE', 'SETUP_MIGRATION', 'CREATE_BLUE_GREEN_DEPLOYMENT', 'SWITCHOVER_BLUE_GREEN_DEPLOYMENT', 'DELETE_BLUE_GREEN_DEPLOYMENT'], 'type': 'string', 'description': 'The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`', 'x-google-enum-deprecated': [False, False, False, False, False, False, False, True, True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, True, True, True, False, False, False, False, False, False, False, False, False, False, True, True, False, False, True, False, False, False, False, False, False, False, False, False], 'x-google-enum-descriptions': ['Unknown operation type.', 'Imports data into a Cloud SQL instance.', 'Exports data from a Cloud SQL instance to a Cloud Storage bucket.', 'Creates a new Cloud SQL instance.', 'Updates the settings of a Cloud SQL instance.', 'Deletes a Cloud SQL instance.', 'Restarts the Cloud SQL instance.', '', '', 'Performs instance backup.', 'Deletes an instance backup.', 'Restores an instance backup.', 'Injects a privileged user in mysql for MOB instances.', 'Clones a Cloud SQL instance.', 'Stops replication on a Cloud SQL read replica instance.', 'Starts replication on a Cloud SQL read replica instance.', 'Promotes a Cloud SQL replica instance.', 'Creates a Cloud SQL replica instance.', 'Creates a new user in a Cloud SQL instance.', 'Deletes a user from a Cloud SQL instance.', "Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created.", 'Creates a database in the Cloud SQL instance.', 'Deletes a database in the Cloud SQL instance.', 'Updates a database in the Cloud SQL instance.', 'Performs failover of an HA-enabled Cloud SQL failover replica.', 'Deletes the backup taken by a backup run.', '', 'Truncates a general or slow log table in MySQL.', 'Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.', 'Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'This field is deprecated, and will be removed in future version of API.', '', 'Creates clone instance.', 'Reschedule maintenance to another time.', 'Starts external sync of a Cloud SQL EM replica to an external primary instance.', "Recovers logs from an instance's old data disk.", 'Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.', 'Re-encrypts CMEK instances with latest key version.', 'Switches the roles of the primary and replica pair. The target instance should be the replica.', 'Update a backup.', 'Acquire a lease for the setup of SQL Server Reporting Services (SSRS).', 'Release a lease for the setup of SQL Server Reporting Services (SSRS).', 'Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica.', 'Indicates that the instance, its read replicas, and its cascading replicas are in maintenance. Maintenance typically gets initiated on groups of replicas first, followed by the primary instance. For each instance, maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Indicates that the instance (and any of its replicas) are currently in maintenance. This is initiated as a self-service request by using SSM. Maintenance typically causes the instance to be unavailable for 1-3 minutes.', 'Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance.', 'Updates the major version of a Cloud SQL instance.', 'Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead.', 'Changes the BackupTier of a Cloud SQL instance.', 'Creates a backup for an Enhanced BackupTier Cloud SQL instance.', 'Repairs entire read pool or specified read pool nodes in the read pool.', 'Creates a Cloud SQL read pool instance.', 'Pre-checks the major version upgrade operation.', "This operation type represents individual steps in a multi-step setup migration workflow: including configuration, replication, switchover/back, and data reseeding, as defined by operation's intent.", 'Creates a new Blue-Green deployment.', 'Switches over a Blue-Green deployment.', 'Deletes a Blue-Green deployment.']}, 'targetProject': {'type': 'string', 'description': 'The project ID of the target instance related to this operation.'}, 'subOperationType': {'$ref': '#/$defs/SqlSubOperationType', 'description': 'Optional. The sub operation based on the operation type.'}, 'acquireSsrsLeaseContext': {'$ref': '#/$defs/AcquireSsrsLeaseContext', 'description': 'The context for acquire SSRS lease operation, if applicable.'}, 'stopWorkloadReplayContext': {'$ref': '#/$defs/StopWorkloadReplayContext', 'description': 'The context for the `StopWorkloadReplay` operation, which contains details about stopping the execution of a captured workload (recorded read and write SQL queries) on a replay instance.'}, 'startWorkloadReplayContext': {'$ref': '#/$defs/StartWorkloadReplayContext', 'description': 'The context for the `StartWorkloadReplay` operation, which contains details about starting the execution of a captured workload (recorded read and write SQL queries) on a replay instance (the Cloud SQL instance where the recorded SQL queries are executed).'}, 'stopWorkloadCaptureContext': {'$ref': '#/$defs/StopWorkloadCaptureContext', 'description': 'The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.'}, 'startWorkloadCaptureContext': {'$ref': '#/$defs/StartWorkloadCaptureContext', 'description': 'The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.'}, 'preCheckMajorVersionUpgradeContext': {'$ref': '#/$defs/PreCheckMajorVersionUpgradeContext', 'description': 'This field is only populated when the operation_type is PRE_CHECK_MAJOR_VERSION_UPGRADE. The PreCheckMajorVersionUpgradeContext message itself contains the details for that pre-check, such as the target database version for the upgrade and the results of the check (including any warnings or errors found).'}}, 'description': 'An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.'}
Changed
postgres_upgrade_precheck
Sept. 19, 2026, 2:51 a.m.
Changed
import_data
Sept. 19, 2026, 2:51 a.m.
Changed
restore_backup
Sept. 19, 2026, 2:51 a.m.
Changed
create_backup
Sept. 19, 2026, 2:51 a.m.
Changed
list_users
Sept. 19, 2026, 2:51 a.m.
Changed
update_instance
Sept. 19, 2026, 2:51 a.m.
Changed
clone_instance
Sept. 19, 2026, 2:51 a.m.
Changed
update_user
Sept. 19, 2026, 2:51 a.m.
Changed
create_user
Sept. 19, 2026, 2:51 a.m.
Changed
get_operation
Sept. 19, 2026, 2:51 a.m.
Changed
execute_sql_readonly
Sept. 19, 2026, 2:51 a.m.
Changed
execute_sql
Sept. 19, 2026, 2:51 a.m.
Changed
create_instance
Sept. 19, 2026, 2:51 a.m.
Changed
get_instance
Sept. 19, 2026, 2:51 a.m.
Added
postgres_upgrade_precheck
Sept. 17, 2026, 12:35 p.m.
Added
import_data
Sept. 17, 2026, 12:35 p.m.
Added
restore_backup
Sept. 17, 2026, 12:35 p.m.
Added
create_backup
Sept. 17, 2026, 12:35 p.m.
Added
list_users
Sept. 17, 2026, 12:35 p.m.
Added
update_instance
Sept. 17, 2026, 12:35 p.m.
Added
clone_instance
Sept. 17, 2026, 12:35 p.m.
Added
update_user
Sept. 17, 2026, 12:35 p.m.
Added
create_user
Sept. 17, 2026, 12:35 p.m.
Added
get_operation
Sept. 17, 2026, 12:35 p.m.
Added
execute_sql_readonly
Sept. 17, 2026, 12:35 p.m.
Added
execute_sql
Sept. 17, 2026, 12:35 p.m.
Added
create_instance
Sept. 17, 2026, 12:35 p.m.
Added
get_instance
Sept. 17, 2026, 12:35 p.m.
Added
list_instances
Sept. 17, 2026, 12:35 p.m.