Endpoints: 30,862MCP servers: 18,584Payout addresses: 2,106Paid calls: 1,609Letters: 14Defects: 1,350counted just now
teppi

Server definition

Hash
sha256:111afb6878b623a1c3dc7656a6738875e9c49b001eac90d4058558021d6364e4
What it is
What a remote MCP server returned when asked what it offers: 15 tools

The blob, as servednamed by its sha256

{ "instructions": null, "tools": [ { "description": "Create a Cloud SQL instance as a clone of a source instance.\n\n* This tool returns a long-running operation. Use the `get_operation` tool to poll its\n status until the operation completes.\n* The clone operation can take several minutes. Use a command line tool to pause for 30\n seconds before rechecking the status.\n", "inputSchema": { "$defs": { "BinLogCoordinates": { "description": "Binary log coordinates.", "properties": { "binLogFileName": { "description": "Name of the binary log file for a Cloud SQL instance.", "type": "string" }, "binLogPosition": { "description": "Position (offset) within the binary log file.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#binLogCoordinates`.", "type": "string" } }, "type": "object" }, "CloneContext": { "description": "Database instance clone context.", "properties": { "allocatedIpRange": { "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.", "type": "string" }, "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." }, "databaseNames": { "description": "(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.", "items": { "type": "string" }, "type": "array" }, "destinationInstanceName": { "description": "Required. Name of the Cloud SQL instance to be created as a clone.", "type": "string" }, "destinationNetwork": { "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.", "type": "string" }, "destinationProject": { "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.", "type": "string" }, "kind": { "description": "This is always `sql#cloneContext`.", "type": "string" }, "pitrTimestampMs": { "description": "Reserved for future use.", "format": "int64", "type": "string" }, "pointInTime": { "description": "Timestamp, if specified, identifies the time to which the source instance is cloned.", "format": "date-time", "type": "string" }, "preferredSecondaryZone": { "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.", "type": "string" }, "preferredZone": { "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.", "type": "string" }, "sourceInstanceDeletionTime": { "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.", "format": "date-time", "type": "string" } }, "required": [ "destinationInstanceName" ], "type": "object" }, "InstancesCloneRequest": { "description": "Database instance clone request.", "properties": { "cloneContext": { "$ref": "#/$defs/CloneContext", "description": "Required. Contains details about the clone operation." } }, "required": [ "cloneContext" ], "type": "object" } }, "description": "Instance clone request.", "properties": { "body": { "$ref": "#/$defs/InstancesCloneRequest" }, "instance": { "description": "Required. The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.", "type": "string" }, "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "project": { "description": "Required. Project ID of the source Cloud SQL instance.", "type": "string" } }, "required": [ "instance", "project", "body" ], "type": "object" }, "name": "clone_instance", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Takes a backup on a Cloud SQL instance. Always populate the project and instance fields on\nthe request. The location (region) and description of the backup may also be optionally\nprovided, in which case the corresponding request fields should also be populated.\n", "inputSchema": { "description": "Backup runs insert request for MCP.", "properties": { "description": { "description": "Optional. The description of this backup run.", "type": "string" }, "instance": { "description": "Required. Cloud SQL instance ID. This does not include the project ID.", "type": "string" }, "location": { "description": "Optional. Location of the backup run.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" } }, "required": [ "instance", "project" ], "type": "object" }, "name": "create_backup", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Initiates the creation of a Cloud SQL instance.\n\n* The tool returns a long-running operation. Use the `get_operation` tool to poll its status\n until the operation completes.\n* The instance creation operation can take several minutes. Use a command line tool to pause\n for 30 seconds before rechecking the status.\n* After you use the `create_instance` tool to create an instance,\n you can use the `create_user` tool to create an\n IAM user account for the user currently logged in to the project.\n* IMPORTANT: Set `ipv4_enabled` to 'false' if creating a Private Service Connect\n or a Private Service Access instance.\n* Set `free_trial` to 'true' to create a free trial instance. Free trial instances\n let you test majority of Cloud SQL features for up to 30 days without financial\n commitment. Subject to eligibility and availability.\n\n* The value of `data_api_access` is set to `ALLOW_DATA_API` by default. This setting\n lets you execute SQL statements using the `execute_sql` tool and the `executeSql` API.\n\n Unless otherwise specified, a newly created instance uses the default\n instance configuration of a development environment.\n\n The following is the default configuration for an instance in a\n development environment:\n\n```\n{\n \"tier\": \"db-perf-optimized-N-2\",\n \"data_disk_size_gb\": 100,\n \"region\": \"us-central1\",\n \"database_version\": \"POSTGRES_18\",\n \"edition\": \"ENTERPRISE_PLUS\",\n \"availability_type\": \"ZONAL\",\n \"tags\": [{\"environment\": \"dev\"}]\n}\n```\n\nThe following configuration is recommended for an instance in a\nproduction environment:\n\n```\n{\n \"tier\": \"db-perf-optimized-N-8\",\n \"data_disk_size_gb\": 250,\n \"region\": \"us-central1\",\n \"database_version\": \"POSTGRES_18\",\n \"edition\": \"ENTERPRISE_PLUS\",\n \"availability_type\": \"REGIONAL\",\n \"tags\": [{\"environment\": \"prod\"}]\n}\n```\n\nThe following instance configuration is recommended for SQL Server:\n\n```\n{\n \"tier\": \"db-perf-optimized-N-8\",\n \"data_disk_size_gb\": 250,\n \"region\": \"us-central1\",\n \"database_version\": \"SQLSERVER_2022_STANDARD\",\n \"edition\": \"ENTERPRISE\",\n \"availability_type\": \"REGIONAL\",\n \"tags\": [{\"environment\": \"prod\"}]\n}\n```\n", "inputSchema": { "$defs": { "PsaMcpConfig": { "description": "Configuration for creating a Cloud SQL instance with Private Service Access.", "properties": { "allocatedIpRange": { "description": "Optional: The name of an allocated IP range in the consumer VPC.", "type": "string" }, "network": { "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.", "type": "string" } }, "required": [ "network" ], "type": "object" }, "PscMcpConfig": { "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.", "properties": { "network": { "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.", "type": "string" }, "project": { "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.", "type": "string" }, "pscEnabled": { "description": "Optional. Whether PSC connectivity is enabled for this instance.", "type": "boolean" } }, "type": "object" } }, "description": "Instance insert request for MCP.", "properties": { "availabilityType": { "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).", "type": "string" }, "dataCacheEnabled": { "description": "Optional. Whether data cache is enabled for the instance.", "type": "boolean" }, "dataDiskSizeGb": { "description": "Optional. Data disk size in GB. Default value is 100.", "format": "int64", "type": "string" }, "databaseVersion": { "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.", "type": "string" }, "edition": { "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.", "type": "string" }, "enableGoogleMlIntegration": { "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.", "type": "boolean" }, "freeTrial": { "description": "Optional. Whether the instance is a free trial instance. If true, the instance will be created with a free trial configuration.", "type": "boolean" }, "ipv4Enabled": { "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.", "type": "boolean" }, "name": { "description": "Required. Name of the Cloud SQL instance. This does not include the project ID.", "type": "string" }, "project": { "description": "Required. Project ID of the project to which the newly created Cloud SQL instances should belong.", "type": "string" }, "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." }, "region": { "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`.", "type": "string" }, "tags": { "additionalProperties": { "type": "string" }, "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\", ```", "type": "object", "writeOnly": true }, "tier": { "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}.", "type": "string" } }, "required": [ "project", "name" ], "type": "object" }, "name": "create_instance", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Create a database user for a Cloud SQL instance.\n\n* This tool returns a long-running operation. Use the `get_operation` tool to poll\n its status until the operation completes.\n* When you use the `create_user` tool, specify the type of user:\n `CLOUD_IAM_USER`, `CLOUD_IAM_SERVICE_ACCOUNT`, or `BUILT_IN`.\n* By default the newly created user is assigned the `cloudsqlsuperuser` role, unless\n you specify other database roles explicitly in the request.\n* You can use a newly created user with the `execute_sql` tool if the user is a\n currently logged in IAM user. The `execute_sql` tool executes the SQL statements\n using the privileges of the database user logged in using IAM database\n authentication.\n\nThe `create_user` tool has the following limitations:\n\n* To create a built-in user with password, use the `password_secret_version` field to provide password using the\n Google Cloud Secret Manager. The value of `password_secret_version` should be the resource name of\n the secret version, like `projects/12345/locations/us-central1/secrets/my-password-secret/versions/1` or\n `projects/12345/locations/us-central1/secrets/my-password-secret/versions/latest`. The caller needs to have\n `secretmanager.secretVersions.access` permission on the secret version.\n* The `create_user` tool doesn't support creating a user for SQL Server.\n\nTo create an IAM user in PostgreSQL:\n\n* The database username must be the IAM user's email address and all lowercase.\n For example, to create user for PostgreSQL IAM user `[email protected]`,\n you can use the following request:\n\n```\n{\n \"name\": \"[email protected]\",\n \"type\": \"CLOUD_IAM_USER\",\n \"instance\":\"test-instance\",\n \"project\": \"test-project\"\n}\n```\n\nThe created database username for the IAM user is `[email protected]`.\n\nTo create an IAM service account in PostgreSQL:\n\n* The database username must be created without the `.gserviceaccount.com` suffix even though\n the full email address for the account is`[email protected]`.\n For example, to create an IAM service account for PostgreSQL you can use the following request\n format:\n\n```\n{\n \"name\": \"[email protected]\",\n \"type\": \"CLOUD_IAM_SERVICE_ACCOUNT\",\n \"instance\": \"test-instance\",\n \"project\": \"test-project\"\n}\n```\n\nThe created database username for the IAM service account is `[email protected]`.\n\nTo create an IAM user or IAM service account in MySQL:\n\n* When Cloud SQL for MySQL stores a username, it truncates the @ and the domain name from\n the user or service account's email address.\n For example, `[email protected]` becomes `example-user`.\n* For this reason, you can't add two IAM users or service accounts\n with the same username but different domain names to the same Cloud SQL instance.\n* For example, to create user for the MySQL IAM user `[email protected]`,\n use the following request:\n\n```\n{\n \"name\": \"[email protected]\",\n \"type\": \"CLOUD_IAM_USER\",\n \"instance\": \"test-instance\",\n \"project\": \"test-project\"\n}\n```\n\nThe created database username for the IAM user is `example-user`.\n\n* For example, to create the MySQL IAM service account\n`[email protected]`, use the\nfollowing request:\n\n```\n{\n \"name\": \"[email protected]\",\n \"type\": \"CLOUD_IAM_SERVICE_ACCOUNT\",\n \"instance\": \"test-instance\",\n \"project\": \"test-project\"\n}\n```\n\nThe created database username for the IAM service account is\n`service-account-name`.\n", "inputSchema": { "description": "User insert request for MCP.", "properties": { "databaseRoles": { "description": "Optional. Role memberships of the user. Default value is [cloudsqlsuperuser].", "items": { "type": "string" }, "type": "array" }, "instance": { "description": "Required. Database instance ID. This does not include the project ID.", "type": "string" }, "name": { "description": "Required. The name of the user in the Cloud SQL instance.", "type": "string" }, "passwordSecretVersion": { "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.", "type": "string", "writeOnly": true }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" }, "type": { "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.", "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", "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." ] } }, "required": [ "project", "instance", "type", "name" ], "type": "object" }, "name": "create_user", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Execute any valid SQL statement, including data definition language (DDL),\ndata control language (DCL), data query language (DQL), or\ndata manipulation language (DML) statements, on a Cloud SQL instance.\n\nTo support the `execute_sql` tool, a Cloud SQL instance must meet\nthe following requirements:\n\n* The value of `data_api_access` must be set to `ALLOW_DATA_API`.\n* For built_in users password_secret_version must be set.\n* Otherwise, for IAM users, for a MySQL instance, the database flag\n `cloudsql_iam_authentication` must be set to `on`.\n For a PostgreSQL instance, the database flag `cloudsql.iam_authentication` must be set\n to `on`.\n* After you use the `create_instance` tool to create an instance,\n you can use the `create_user` tool to create an\n IAM user account for the user currently logged in to the project.\n\n The `execute_sql` tool has the following limitations:\n\n* If a SQL statement returns a response larger than 10&nbsp;MB,\n then the response will be truncated.\n* The `execute_sql` tool has a default timeout of 30 seconds.\n If a query runs longer than 30 seconds, then the tool returns a\n `DEADLINE_EXCEEDED` error.\n\n If you receive errors similar to \"IAM authentication is not enabled for the instance\",\n then you can use the `get_instance` tool to check the value of the IAM\n database authentication flag for the instance.\n\n If you receive errors like \"The instance doesn't allow using executeSql to access this\n instance\", then you can use `get_instance` tool to check the `data_api_access` setting.\n\n When you receive authentication errors:\n\n 1. Check if the currently logged-in user account exists as an IAM user on the\n instance using the `list_users` tool.\n 2. If the IAM user account doesn't exist, then use the `create_user` tool to\n create the IAM user account for the logged-in user.\n 3. If the currently logged in user doesn't have the proper database user roles, then\n you can use `update_user` tool to grant database roles to the user. For example,\n `cloudsqlsuperuser` role can provide an IAM user with many required permissions.\n 4. Check if the currently logged in user has the correct IAM permissions assigned for\n the project. You can use `gcloud projects get-iam-policy [PROJECT_ID]` command to\n check if the user has the proper IAM roles or permissions assigned for the project.\n\n * The user must have `cloudsql.instance.login` permission to do automatic IAM database\n authentication.\n * The user must have `cloudsql.instances.executeSql` permission to execute SQL statements\n using the `execute_sql` tool or `executeSql` API.\n * Common IAM roles that contain the required permissions: Cloud SQL Instance User\n (`roles/cloudsql.instanceUser`) or Cloud SQL Admin (`roles/cloudsql.admin`)\n\nWhen receiving an `ExecuteSqlResponse`, always check the `message` and `status` fields\nwithin the response body. A successful HTTP status code doesn't guarantee full success of\nall SQL statements.\nThe `message` and `status` fields will indicate if there were any partial errors or\nwarnings during SQL statement execution.\n", "inputSchema": { "description": "Instance execute sql request for MCP.", "properties": { "database": { "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.", "type": "string" }, "instance": { "description": "Required. Database instance ID. This does not include the project ID.", "type": "string" }, "passwordSecretVersion": { "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.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" }, "sqlCommenterEnabled": { "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.", "type": "boolean" }, "sqlStatement": { "description": "Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.", "type": "string" }, "user": { "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.", "type": "string" } }, "required": [ "instance", "project", "sqlStatement" ], "type": "object" }, "name": "execute_sql", "outputSchema": { "$defs": { "Column": { "description": "Contains the name and datatype of a column.", "properties": { "name": { "description": "Name of the column.", "type": "string" }, "type": { "description": "Datatype of the column.", "type": "string" } }, "type": "object" }, "Message": { "description": "Represents a notice or warning message from the database.", "properties": { "message": { "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.", "type": "string" }, "severity": { "description": "The severity of the message (e.g., \"NOTICE\" for PostgreSQL, \"WARNING\" for MySQL).", "type": "string" } }, "type": "object" }, "Metadata": { "description": "The additional metadata information regarding the execution of the SQL statements.", "properties": { "sqlStatementExecutionTime": { "description": "The time taken to execute the SQL statements.", "format": "google-duration", "type": "string" } }, "type": "object" }, "QueryResult": { "description": "QueryResult contains the result of executing a single SQL statement.", "properties": { "columns": { "description": "List of columns included in the result. This also includes the data type of the column.", "items": { "$ref": "#/$defs/Column" }, "type": "array" }, "message": { "description": "Message related to the SQL execution result.", "type": "string" }, "partialResult": { "description": "Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results.", "type": "boolean" }, "rows": { "description": "Rows returned by the SQL statement.", "items": { "$ref": "#/$defs/Row" }, "type": "array" }, "status": { "$ref": "#/$defs/Status", "description": "If results were truncated due to an error, details of that error." } }, "type": "object" }, "Row": { "description": "Contains the values for a row.", "properties": { "values": { "description": "The values for the row.", "items": { "$ref": "#/$defs/Value" }, "type": "array" } }, "type": "object" }, "Status": { "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).", "properties": { "code": { "description": "The status code, which should be an enum value of google.rpc.Code.", "format": "int32", "type": "integer" }, "details": { "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", "items": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL." }, "type": "object" }, "type": "array" }, "message": { "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.", "type": "string" } }, "type": "object" }, "Value": { "description": "The cell value of the table.", "properties": { "nullValue": { "description": "If cell value is null, then this flag will be set to true.", "type": "boolean" }, "value": { "description": "The cell value in string format.", "type": "string" } }, "type": "object" } }, "properties": { "messages": { "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.", "items": { "$ref": "#/$defs/Message" }, "type": "array" }, "metadata": { "$ref": "#/$defs/Metadata", "description": "The additional metadata information regarding the execution of the SQL statements." }, "results": { "description": "The list of results after executing all the SQL statements.", "items": { "$ref": "#/$defs/QueryResult" }, "type": "array" }, "status": { "$ref": "#/$defs/Status", "description": "Contains the error from the database if the SQL execution failed." } }, "type": "object" } }, { "description": "Execute any valid read only SQL statement on a Cloud SQL instance.\n\nTo support the `execute_sql_readonly` tool, a Cloud SQL instance must meet\nthe following requirements:\n\n* The value of `data_api_access` must be set to `ALLOW_DATA_API`.\n* For a MySQL instance, the database flag `cloudsql_iam_authentication` must be set to `on`.\n For a PostgreSQL instance, the database flag `cloudsql.iam_authentication` must be set\n to `on`.\n* An IAM user account or IAM service account (`CLOUD_IAM_USER` or `CLOUD_IAM_SERVICE_ACCOUNT`)\n is required to call the `execute_sql_readonly` tool.\n The tool executes the SQL statements using the privileges of the database user\n logged with IAM database authentication.\n\n After you use the `create_instance` tool to create an instance,\n you can use the `create_user` tool to create an\n IAM user account for the user currently logged in to the project.\n\n The `execute_sql_readonly` tool has the following limitations:\n\n* If a SQL statement returns a response larger than 10&nbsp;MB,\n then the response will be truncated.\n* The tool has a default timeout of 30 seconds.\n If a query runs longer than 30 seconds, then the tool returns a\n `DEADLINE_EXCEEDED` error.\n\n If you receive errors similar to \"IAM authentication is not enabled for the instance\",\n then you can use the `get_instance` tool to check the value of the IAM\n database authentication flag for the instance.\n\n If you receive errors like \"The instance doesn't allow using executeSql to access this\n instance\", then you can use `get_instance` tool to check the `data_api_access` setting.\n\n When you receive authentication errors:\n\n 1. Check if the currently logged-in user account exists as an IAM user on the\n instance using the `list_users` tool.\n 2. If the IAM user account doesn't exist, then use the `create_user` tool to\n create the IAM user account for the logged-in user.\n 3. If the currently logged in user doesn't have the proper database user roles, then\n you can use `update_user` tool to grant database roles to the user. For example,\n `cloudsqlsuperuser` role can provide an IAM user with many required permissions.\n 4. Check if the currently logged in user has the correct IAM permissions assigned for\n the project. You can use `gcloud projects get-iam-policy [PROJECT_ID]` command to\n check if the user has the proper IAM roles or permissions assigned for the project.\n\n * The user must have `cloudsql.instance.login` permission to do automatic IAM database\n authentication.\n * The user must have `cloudsql.instances.executeSql` permission to execute SQL statements\n using the `execute_sql_readonly` tool or `executeSql` API.\n * Common IAM roles that contain the required permissions: Cloud SQL Instance User\n (`roles/cloudsql.instanceUser`) or Cloud SQL Admin (`roles/cloudsql.admin`)\n\nWhen receiving an `ExecuteSqlResponse`, always check the `message` and `status` fields\nwithin the response body. A successful HTTP status code doesn't guarantee full success of\nall SQL statements.\nThe `message` and `status` fields will indicate if there were any partial errors or\nwarnings during SQL statement execution.\n", "inputSchema": { "description": "Instance execute sql request for MCP.", "properties": { "database": { "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.", "type": "string" }, "instance": { "description": "Required. Database instance ID. This does not include the project ID.", "type": "string" }, "passwordSecretVersion": { "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.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" }, "sqlCommenterEnabled": { "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.", "type": "boolean" }, "sqlStatement": { "description": "Required. SQL statements to run on the database. It can be a single statement or a sequence of statements separated by semicolons.", "type": "string" }, "user": { "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.", "type": "string" } }, "required": [ "instance", "project", "sqlStatement" ], "type": "object" }, "name": "execute_sql_readonly", "outputSchema": { "$defs": { "Column": { "description": "Contains the name and datatype of a column.", "properties": { "name": { "description": "Name of the column.", "type": "string" }, "type": { "description": "Datatype of the column.", "type": "string" } }, "type": "object" }, "Message": { "description": "Represents a notice or warning message from the database.", "properties": { "message": { "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.", "type": "string" }, "severity": { "description": "The severity of the message (e.g., \"NOTICE\" for PostgreSQL, \"WARNING\" for MySQL).", "type": "string" } }, "type": "object" }, "Metadata": { "description": "The additional metadata information regarding the execution of the SQL statements.", "properties": { "sqlStatementExecutionTime": { "description": "The time taken to execute the SQL statements.", "format": "google-duration", "type": "string" } }, "type": "object" }, "QueryResult": { "description": "QueryResult contains the result of executing a single SQL statement.", "properties": { "columns": { "description": "List of columns included in the result. This also includes the data type of the column.", "items": { "$ref": "#/$defs/Column" }, "type": "array" }, "message": { "description": "Message related to the SQL execution result.", "type": "string" }, "partialResult": { "description": "Set to true if the SQL execution's result is truncated due to size limits or an error retrieving results.", "type": "boolean" }, "rows": { "description": "Rows returned by the SQL statement.", "items": { "$ref": "#/$defs/Row" }, "type": "array" }, "status": { "$ref": "#/$defs/Status", "description": "If results were truncated due to an error, details of that error." } }, "type": "object" }, "Row": { "description": "Contains the values for a row.", "properties": { "values": { "description": "The values for the row.", "items": { "$ref": "#/$defs/Value" }, "type": "array" } }, "type": "object" }, "Status": { "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).", "properties": { "code": { "description": "The status code, which should be an enum value of google.rpc.Code.", "format": "int32", "type": "integer" }, "details": { "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", "items": { "additionalProperties": { "description": "Properties of the object. Contains field @type with type URL." }, "type": "object" }, "type": "array" }, "message": { "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.", "type": "string" } }, "type": "object" }, "Value": { "description": "The cell value of the table.", "properties": { "nullValue": { "description": "If cell value is null, then this flag will be set to true.", "type": "boolean" }, "value": { "description": "The cell value in string format.", "type": "string" } }, "type": "object" } }, "properties": { "messages": { "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.", "items": { "$ref": "#/$defs/Message" }, "type": "array" }, "metadata": { "$ref": "#/$defs/Metadata", "description": "The additional metadata information regarding the execution of the SQL statements." }, "results": { "description": "The list of results after executing all the SQL statements.", "items": { "$ref": "#/$defs/QueryResult" }, "type": "array" }, "status": { "$ref": "#/$defs/Status", "description": "Contains the error from the database if the SQL execution failed." } }, "type": "object" } }, { "description": "Get the details of a Cloud SQL instance.", "inputSchema": { "description": "Instance get request.", "properties": { "instance": { "description": "Required. Database instance ID. This does not include the project ID.", "type": "string" }, "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" } }, "required": [ "instance", "project" ], "type": "object" }, "name": "get_instance", "outputSchema": { "$defs": { "AclEntry": { "description": "An entry for an Access Control list.", "properties": { "expirationTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#aclEntry`.", "type": "string" }, "name": { "description": "Optional. A label to identify this entry.", "type": "string" }, "value": { "description": "The allowlisted value for the access control list.", "type": "string" } }, "type": "object" }, "AdvancedMachineFeatures": { "description": "Specifies options for controlling advanced machine features.", "properties": { "threadsPerCore": { "description": "The number of threads per physical core.", "format": "int32", "type": "integer" } }, "type": "object" }, "AvailableDatabaseVersion": { "description": "An available database version. It can be a major or a minor version.", "properties": { "displayName": { "description": "The database version's display name.", "type": "string" }, "majorVersion": { "description": "The version's major version name.", "type": "string" }, "name": { "description": "The database version name. For MySQL 8.0, this string provides the database major and minor version.", "type": "string" } }, "type": "object" }, "BackupConfiguration": { "description": "Database instance backup configuration.", "properties": { "backupRetentionSettings": { "$ref": "#/$defs/BackupRetentionSettings", "description": "Backup retention settings." }, "backupTier": { "description": "Output only. Backup tier that manages the backups for the instance.", "enum": [ "BACKUP_TIER_UNSPECIFIED", "STANDARD", "ADVANCED", "ENHANCED" ], "readOnly": true, "type": "string", "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": { "description": "(MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.", "type": "boolean" }, "enabled": { "description": "Whether this configuration is enabled.", "type": "boolean" }, "kind": { "description": "This is always `sql#backupConfiguration`.", "type": "string" }, "location": { "description": "Location of the backup", "type": "string" }, "pointInTimeRecoveryEnabled": { "description": "Whether point in time recovery is enabled.", "type": "boolean" }, "replicationLogArchivingEnabled": { "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.", "type": "boolean" }, "startTime": { "description": "Start time for the daily backup configuration in UTC timezone in the 24 hour format - `HH:MM`.", "type": "string" }, "transactionLogRetentionDays": { "description": "The number of days of transaction logs we retain for point in time restore, from 1-7.", "format": "int32", "type": "integer" }, "transactionalLogStorageState": { "description": "Output only. This value contains the storage location of transactional logs used to perform point-in-time recovery (PITR) for the database.", "enum": [ "TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED", "DISK", "SWITCHING_TO_CLOUD_STORAGE", "SWITCHED_TO_CLOUD_STORAGE", "CLOUD_STORAGE" ], "readOnly": true, "type": "string", "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." ] } }, "type": "object" }, "BackupRetentionSettings": { "description": "We currently only support backup retention by specifying the number of backups we will retain.", "properties": { "retainedBackups": { "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.", "format": "int32", "type": "integer" }, "retentionUnit": { "description": "The unit that 'retained_backups' represents.", "enum": [ "RETENTION_UNIT_UNSPECIFIED", "COUNT" ], "type": "string", "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\"." ] } }, "type": "object" }, "BlueGreenDeploymentInfo": { "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.", "properties": { "deploymentId": { "description": "Output only. The resource ID of the blue-green deployment.", "readOnly": true, "type": "string" }, "source": { "$ref": "#/$defs/SourceRole", "description": "Output only. The source instance for the Blue-Green deployment.", "readOnly": true }, "state": { "description": "Output only. The current state of blue-green-deployment for UI tags", "enum": [ "STATE_UNSPECIFIED", "PRE_SWITCHOVER", "POST_SWITCHOVER" ], "readOnly": true, "type": "string", "x-google-enum-descriptions": [ "The state of the deployment is unknown.", "The deployment is pre-switchover.", "The deployment is post-switchover." ] }, "target": { "$ref": "#/$defs/TargetRole", "description": "Output only. The target instance for the Blue-Green deployment.", "readOnly": true } }, "type": "object" }, "ConnectionPoolConfig": { "description": "The managed connection pooling configuration.", "properties": { "connectionPoolingEnabled": { "description": "Whether managed connection pooling is enabled.", "type": "boolean" }, "flags": { "description": "Optional. List of connection pool configuration flags.", "items": { "$ref": "#/$defs/ConnectionPoolFlags" }, "type": "array" }, "poolerCount": { "description": "Output only. Number of connection poolers.", "format": "int32", "readOnly": true, "type": "integer" } }, "type": "object" }, "ConnectionPoolFlags": { "description": "Connection pool flags for Cloud SQL instances managed connection pool configuration.", "properties": { "name": { "description": "Required. The name of the flag.", "type": "string" }, "value": { "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.", "type": "string" } }, "type": "object" }, "DataCacheConfig": { "description": "Data cache configurations.", "properties": { "dataCacheEnabled": { "description": "Whether data cache is enabled for the instance.", "type": "boolean" } }, "type": "object" }, "DatabaseFlags": { "description": "Database flags for Cloud SQL instances.", "properties": { "name": { "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.", "type": "string" }, "value": { "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.", "type": "string" } }, "type": "object" }, "DenyMaintenancePeriod": { "description": "Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.", "properties": { "endDate": { "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", "type": "string" }, "startDate": { "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", "type": "string" }, "time": { "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", "type": "string" } }, "type": "object" }, "DiskEncryptionConfiguration": { "description": "Disk encryption configuration for an instance.", "properties": { "cmekSourceLogEncryptionEnforced": { "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.", "type": "boolean" }, "confidentialMode": { "description": "Optional. If true, enables Confidential Mode for the instance's Hyperdisk Balanced volumes. Only supported for zonal C4A instances currently.", "type": "boolean" }, "kind": { "description": "This is always `sql#diskEncryptionConfiguration`.", "type": "string" }, "kmsKeyName": { "description": "Resource name of KMS key for disk encryption.", "type": "string" } }, "type": "object" }, "DiskEncryptionStatus": { "description": "Disk encryption status for an instance.", "properties": { "kind": { "description": "This is always `sql#diskEncryptionStatus`.", "type": "string" }, "kmsKeyVersionName": { "description": "KMS key version used to encrypt the Cloud SQL instance resource", "type": "string" } }, "type": "object" }, "DnsNameMapping": { "description": "DNS metadata.", "properties": { "connectionType": { "description": "Output only. The connection type of the DNS name.", "enum": [ "CONNECTION_TYPE_UNSPECIFIED", "PUBLIC", "PRIVATE_SERVICES_ACCESS", "PRIVATE_SERVICE_CONNECT" ], "readOnly": true, "type": "string", "x-google-enum-descriptions": [ "Unknown connection type.", "Public IP.", "Private services access (private IP).", "Private Service Connect." ] }, "dnsScope": { "description": "Output only. The scope that the DNS name applies to.", "enum": [ "DNS_SCOPE_UNSPECIFIED", "INSTANCE", "CLUSTER" ], "readOnly": true, "type": "string", "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." ] }, "name": { "description": "Output only. The DNS name.", "readOnly": true, "type": "string" }, "recordManager": { "description": "Output only. The manager for this DNS record.", "enum": [ "RECORD_MANAGER_UNSPECIFIED", "CUSTOMER", "CLOUD_SQL_AUTOMATION" ], "readOnly": true, "type": "string", "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." ] } }, "type": "object" }, "FinalBackupConfig": { "description": "Config used to determine the final backup settings for the instance.", "properties": { "enabled": { "description": "Whether the final backup is enabled for the instance.", "type": "boolean" }, "retentionDays": { "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).", "format": "int32", "type": "integer" } }, "type": "object" }, "GeminiInstanceConfig": { "description": "Gemini instance configuration.", "properties": { "activeQueryEnabled": { "description": "Output only. Whether the active query is enabled.", "readOnly": true, "type": "boolean" }, "entitled": { "description": "Output only. Whether Gemini is enabled.", "readOnly": true, "type": "boolean" }, "flagRecommenderEnabled": { "description": "Output only. Whether the flag recommender is enabled.", "readOnly": true, "type": "boolean" }, "googleVacuumMgmtEnabled": { "description": "Output only. Whether the vacuum management is enabled.", "readOnly": true, "type": "boolean" }, "indexAdvisorEnabled": { "description": "Output only. Whether the index advisor is enabled.", "readOnly": true, "type": "boolean" }, "oomSessionCancelEnabled": { "description": "Output only. Whether canceling the out-of-memory (OOM) session is enabled.", "readOnly": true, "type": "boolean" } }, "type": "object" }, "InsightsConfig": { "description": "Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration.", "properties": { "enhancedQueryInsightsEnabled": { "description": "Optional. Whether enhanced query insights feature is enabled.", "type": "boolean" }, "queryInsightsEnabled": { "description": "Whether Query Insights feature is enabled.", "type": "boolean" }, "queryPlansPerMinute": { "description": "Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.", "format": "int32", "type": "integer" }, "queryStringLength": { "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.", "format": "int32", "type": "integer" }, "recordApplicationTags": { "description": "Whether Query Insights will record application tags from query when enabled.", "type": "boolean" }, "recordClientAddress": { "description": "Whether Query Insights will record client address when enabled.", "type": "boolean" } }, "type": "object" }, "InstanceReference": { "description": "Reference to another Cloud SQL instance.", "properties": { "name": { "description": "The name of the Cloud SQL instance being referenced. This does not include the project ID.", "type": "string" }, "project": { "description": "The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.", "type": "string" }, "region": { "description": "The region of the Cloud SQL instance being referenced.", "type": "string" } }, "type": "object" }, "IpConfiguration": { "description": "IP Management configuration.", "properties": { "allocatedIpRange": { "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])?.`", "type": "string" }, "authorizedNetworks": { "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`).", "items": { "$ref": "#/$defs/AclEntry" }, "type": "array" }, "customSubjectAlternativeNames": { "description": "Optional. Custom Subject Alternative Name(SAN)s for a Cloud SQL instance.", "items": { "type": "string" }, "type": "array" }, "enablePrivatePathForGoogleCloudServices": { "description": "Controls connectivity to private IP instances from Google services, such as BigQuery.", "type": "boolean" }, "ipv4Enabled": { "description": "Whether the instance is assigned a public IP address or not.", "type": "boolean" }, "privateNetwork": { "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.", "type": "string" }, "pscConfig": { "$ref": "#/$defs/PscConfig", "description": "PSC settings for this instance." }, "requireSsl": { "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.", "type": "boolean" }, "serverCaMode": { "description": "Specify what type of CA is used for the server certificate.", "enum": [ "CA_MODE_UNSPECIFIED", "GOOGLE_MANAGED_INTERNAL_CA", "GOOGLE_MANAGED_CAS_CA", "CUSTOMER_MANAGED_CAS_CA" ], "type": "string", "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": { "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}", "type": "string" }, "serverCertificateRotationMode": { "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.", "enum": [ "SERVER_CERTIFICATE_ROTATION_MODE_UNSPECIFIED", "NO_AUTOMATIC_ROTATION", "AUTOMATIC_ROTATION_DURING_MAINTENANCE" ], "type": "string", "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`." ] }, "sslMode": { "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.", "enum": [ "SSL_MODE_UNSPECIFIED", "ALLOW_UNENCRYPTED_AND_ENCRYPTED", "ENCRYPTED_ONLY", "TRUSTED_CLIENT_CERTIFICATE_REQUIRED" ], "type": "string", "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." ] } }, "type": "object" }, "IpMapping": { "description": "Database instance IP mapping", "properties": { "ipAddress": { "description": "The IP address assigned.", "type": "string" }, "timeToRetire": { "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.", "format": "date-time", "type": "string" }, "type": { "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.", "enum": [ "SQL_IP_ADDRESS_TYPE_UNSPECIFIED", "PRIMARY", "OUTGOING", "PRIVATE", "MIGRATED_1ST_GEN" ], "type": "string", "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." ] } }, "type": "object" }, "LocationPreference": { "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.", "properties": { "followGaeApplication": { "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.", "type": "string" }, "kind": { "description": "This is always `sql#locationPreference`.", "type": "string" }, "secondaryZone": { "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'.", "type": "string" }, "zone": { "description": "The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.", "type": "string" } }, "type": "object" }, "MaintenanceWindow": { "description": "Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes.", "properties": { "day": { "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.", "format": "int32", "type": "integer" }, "hour": { "description": "Hour of day - 0 to 23. Specify in the UTC time zone.", "format": "int32", "type": "integer" }, "kind": { "description": "This is always `sql#maintenanceWindow`.", "type": "string" }, "updateTrack": { "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).", "enum": [ "SQL_UPDATE_TRACK_UNSPECIFIED", "canary", "stable", "week5" ], "type": "string", "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." ] } }, "type": "object" }, "MySqlReplicaConfiguration": { "description": "Read-replica configuration specific to MySQL databases.", "properties": { "caCertificate": { "description": "PEM representation of the trusted CA's x509 certificate.", "type": "string" }, "clientCertificate": { "description": "PEM representation of the replica's x509 certificate.", "type": "string" }, "clientKey": { "description": "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate.", "type": "string" }, "connectRetryInterval": { "description": "Seconds to wait between connect retries. MySQL's default is 60 seconds.", "format": "int32", "type": "integer" }, "dumpFilePath": { "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.", "type": "string" }, "kind": { "description": "This is always `sql#mysqlReplicaConfiguration`.", "type": "string" }, "masterHeartbeatPeriod": { "description": "Interval in milliseconds between replication heartbeats.", "format": "int64", "type": "string" }, "password": { "description": "The password for the replication connection.", "type": "string" }, "sslCipher": { "description": "A list of permissible ciphers to use for SSL encryption.", "type": "string" }, "username": { "description": "The username for the replication connection.", "type": "string" }, "verifyServerCertificate": { "description": "Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake.", "type": "boolean" } }, "type": "object" }, "OnPremisesConfiguration": { "description": "On-premises instance configuration.", "properties": { "caCertificate": { "description": "PEM representation of the trusted CA's x509 certificate.", "type": "string" }, "clientCertificate": { "description": "PEM representation of the replica's x509 certificate.", "type": "string" }, "clientKey": { "description": "PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate.", "type": "string" }, "dmsManaged": { "description": "Output only. Indicates whether the resource is managed by Database Migration Service.", "readOnly": true, "type": "boolean" }, "dumpFilePath": { "description": "The dump file to create the Cloud SQL replica.", "type": "string" }, "hostPort": { "description": "The host and port of the on-premises instance in host:port format", "type": "string" }, "kind": { "description": "This is always `sql#onPremisesConfiguration`.", "type": "string" }, "password": { "description": "The password for connecting to on-premises instance.", "type": "string" }, "selectedObjects": { "description": "Optional. A list of objects that the user selects for replication from an external source instance.", "items": { "$ref": "#/$defs/SelectedObjects" }, "type": "array" }, "sourceInstance": { "$ref": "#/$defs/InstanceReference", "description": "The reference to Cloud SQL instance if the source is Cloud SQL." }, "sslOption": { "description": "Optional. SSL option for replica connection to the on-premises source.", "enum": [ "SSL_OPTION_UNSPECIFIED", "DISABLE", "REQUIRE", "VERIFY_CA" ], "type": "string", "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." ] }, "username": { "description": "The username for connecting to on-premises instance.", "type": "string" } }, "type": "object" }, "PasswordValidationPolicy": { "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.", "properties": { "complexity": { "description": "The complexity of the password.", "enum": [ "COMPLEXITY_UNSPECIFIED", "COMPLEXITY_DEFAULT" ], "type": "string", "x-google-enum-descriptions": [ "Complexity check is not specified.", "A combination of lowercase, uppercase, numeric, and non-alphanumeric characters." ] }, "disallowCompromisedCredentials": { "deprecated": true, "description": "This field is deprecated and will be removed in a future version of the API.", "type": "boolean" }, "disallowUsernameSubstring": { "description": "Disallow username as a part of the password.", "type": "boolean" }, "enablePasswordPolicy": { "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.", "type": "boolean" }, "minLength": { "description": "Minimum number of characters allowed.", "format": "int32", "type": "integer" }, "passwordChangeInterval": { "description": "Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.", "format": "google-duration", "type": "string" }, "reuseInterval": { "description": "Number of previous passwords that cannot be reused.", "format": "int32", "type": "integer" } }, "type": "object" }, "PerformanceCaptureConfig": { "description": "Performance capture configuration.", "properties": { "cpuUtilizationThresholdPercent": { "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.", "format": "int32", "type": "integer" }, "enabled": { "description": "Optional. Enables or disables the performance capture feature.", "type": "boolean" }, "historyListLengthThresholdCount": { "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.", "format": "int32", "type": "integer" }, "memoryUsageThresholdPercent": { "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.", "format": "int32", "type": "integer" }, "probeThreshold": { "description": "Optional. Specifies the minimum number of consecutive probe threshold that triggers performance capture.", "format": "int32", "type": "integer" }, "probingIntervalSeconds": { "description": "Optional. Specifies the interval in seconds between consecutive probes that check if any trigger condition thresholds have been reached.", "format": "int32", "type": "integer" }, "runningThreadsThreshold": { "description": "Optional. Specifies the minimum number of MySQL `Threads_running` to trigger the performance capture on the primary instance.", "format": "int32", "type": "integer" }, "secondsBehindSourceThreshold": { "description": "Optional. Specifies the minimum number of seconds replica must be lagging behind primary instance to trigger the performance capture on replica.", "format": "int32", "type": "integer" }, "semaphoreWaitThresholdCount": { "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.", "format": "int32", "type": "integer" }, "transactionDurationThreshold": { "description": "Optional. Specifies the amount of time in seconds that a transaction needs to have been open before the watcher starts recording it.", "format": "int32", "type": "integer" }, "transactionKillExcludedUserHosts": { "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\", \"[email protected]\", \"report_user@%\"]`", "items": { "type": "string" }, "type": "array" }, "transactionKillThresholdSeconds": { "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.", "format": "int32", "type": "integer" }, "transactionKillType": { "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.", "enum": [ "TRANSACTION_KILL_TYPE_UNSPECIFIED", "READ_ONLY_TRANSACTIONS", "ALL_TRANSACTIONS" ], "type": "string", "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)." ] }, "transactionLockWaitThresholdCount": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "PoolNodeConfig": { "description": "Details of a single read pool node of a read pool.", "properties": { "dnsName": { "description": "Output only. The DNS name of the read pool node.", "readOnly": true, "type": "string" }, "dnsNames": { "description": "Output only. The list of DNS names used by this read pool node.", "items": { "$ref": "#/$defs/DnsNameMapping" }, "readOnly": true, "type": "array" }, "gceZone": { "description": "Output only. The zone of the read pool node.", "readOnly": true, "type": "string" }, "ipAddresses": { "description": "Output only. Mappings containing IP addresses that can be used to connect to the read pool node.", "items": { "$ref": "#/$defs/IpMapping" }, "readOnly": true, "type": "array" }, "name": { "description": "Output only. The name of the read pool node, to be used for retrieving metrics and logs.", "readOnly": true, "type": "string" }, "pscAutoConnections": { "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.", "items": { "$ref": "#/$defs/PscAutoConnectionConfig" }, "readOnly": true, "type": "array" }, "pscServiceAttachmentLink": { "description": "Output only. The Private Service Connect (PSC) service attachment of the read pool node.", "readOnly": true, "type": "string" }, "state": { "description": "Output only. The current state of the read pool node.", "enum": [ "SQL_INSTANCE_STATE_UNSPECIFIED", "RUNNABLE", "SUSPENDED", "PENDING_DELETE", "PENDING_CREATE", "MAINTENANCE", "FAILED", "ONLINE_MAINTENANCE", "REPAIRING" ], "readOnly": true, "type": "string", "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." ] } }, "type": "object" }, "PscAutoConnectionConfig": { "description": "Settings for an automatically-setup Private Service Connect consumer endpoint that is used to connect to a Cloud SQL instance.", "properties": { "consumerNetwork": { "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.", "type": "string" }, "consumerNetworkStatus": { "description": "The connection policy status of the consumer network.", "type": "string" }, "consumerProject": { "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.", "type": "string" }, "instanceAutoDnsStatus": { "description": "Output only. The status of automated DNS provisioning.", "enum": [ "AUTO_DNS_STATUS_UNSPECIFIED", "AUTO_DNS_OK", "AUTO_DNS_FAILED", "AUTO_DNS_UNKNOWN" ], "readOnly": true, "type": "string", "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." ] }, "ipAddress": { "description": "The IP address of the consumer endpoint.", "type": "string" }, "serviceConnectionPolicy": { "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`.", "readOnly": true, "type": "string" }, "serviceConnectionPolicyCreationResult": { "description": "Output only. The status of service connection policy creation.", "readOnly": true, "type": "string" }, "status": { "description": "The connection status of the consumer endpoint.", "type": "string" }, "writeEndpointAutoDnsStatus": { "description": "Output only. The status of automated DNS provisioning for the write endpoint.", "enum": [ "AUTO_DNS_STATUS_UNSPECIFIED", "AUTO_DNS_OK", "AUTO_DNS_FAILED", "AUTO_DNS_UNKNOWN" ], "readOnly": true, "type": "string", "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." ] } }, "type": "object" }, "PscConfig": { "description": "PSC settings for a Cloud SQL instance.", "properties": { "allowedConsumerProjects": { "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).", "items": { "type": "string" }, "type": "array" }, "networkAttachmentUri": { "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", "type": "string" }, "pscAutoConnectionPolicyEnabled": { "description": "Optional. Whether to set up the PSC service connection policy automatically.", "type": "boolean" }, "pscAutoConnections": { "description": "Optional. The list of settings for requested Private Service Connect consumer endpoints that can be used to connect to this Cloud SQL instance.", "items": { "$ref": "#/$defs/PscAutoConnectionConfig" }, "type": "array" }, "pscAutoDnsEnabled": { "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.", "type": "boolean" }, "pscEnabled": { "description": "Whether PSC connectivity is enabled for this instance.", "type": "boolean" }, "pscWriteEndpointDnsEnabled": { "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.", "type": "boolean" } }, "type": "object" }, "ReadPoolAutoScaleConfig": { "description": "The read pool auto-scale configuration.", "properties": { "disableScaleIn": { "description": "Indicates whether read pool auto scaling supports scale in operations (removing nodes).", "type": "boolean" }, "enabled": { "description": "Indicates whether read pool auto scaling is enabled.", "type": "boolean" }, "maxNodeCount": { "description": "Maximum number of read pool nodes to be maintained.", "format": "int32", "type": "integer" }, "minNodeCount": { "description": "Minimum number of read pool nodes to be maintained.", "format": "int32", "type": "integer" }, "scaleInCooldownSeconds": { "description": "The cooldown period for scale-in operations.", "format": "int32", "type": "integer" }, "scaleOutCooldownSeconds": { "description": "The cooldown period for scale-out operations.", "format": "int32", "type": "integer" }, "targetMetrics": { "description": "Optional. Target metrics for read pool auto scaling.", "items": { "$ref": "#/$defs/TargetMetric" }, "type": "array" } }, "type": "object" }, "ReplicaConfiguration": { "description": "Read-replica configuration for connecting to the primary instance.", "properties": { "cascadableReplica": { "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.", "type": "boolean" }, "failoverTarget": { "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.", "type": "boolean" }, "kind": { "description": "This is always `sql#replicaConfiguration`.", "type": "string" }, "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." } }, "type": "object" }, "ReplicationCluster": { "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.", "properties": { "drReplica": { "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.", "readOnly": true, "type": "boolean" }, "failoverDrReplicaName": { "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.", "type": "string" }, "psaWriteEndpoint": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "SelectedObjects": { "description": "A list of objects that the user selects for replication from an external source instance.", "properties": { "database": { "description": "Required. The name of the database to migrate.", "type": "string" } }, "type": "object" }, "Settings": { "description": "Database instance settings.", "properties": { "acceleratedReplicaMode": { "description": "Optional. Whether the replica is in accelerated mode. This feature is in private preview and requires allowlisting to take effect.", "type": "boolean" }, "activationPolicy": { "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.", "enum": [ "SQL_ACTIVATION_POLICY_UNSPECIFIED", "ALWAYS", "NEVER", "ON_DEMAND" ], "type": "string", "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." ] }, "activeDirectoryConfig": { "$ref": "#/$defs/SqlActiveDirectoryConfig", "description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server." }, "advancedMachineFeatures": { "$ref": "#/$defs/AdvancedMachineFeatures", "description": "Specifies advanced machine configuration for the instances relevant only for SQL Server." }, "authorizedGaeApplications": { "deprecated": true, "description": "The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.", "items": { "type": "string" }, "type": "array" }, "autoUpgradeEnabled": { "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.", "type": "boolean" }, "availabilityType": { "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).", "enum": [ "SQL_AVAILABILITY_TYPE_UNSPECIFIED", "ZONAL", "REGIONAL" ], "type": "string", "x-google-enum-descriptions": [ "This is an unknown Availability type.", "Zonal available instance.", "Regional available instance." ] }, "backupConfiguration": { "$ref": "#/$defs/BackupConfiguration", "description": "The daily backup configuration for the instance." }, "collation": { "description": "The name of server Instance collation.", "type": "string" }, "connectionPoolConfig": { "$ref": "#/$defs/ConnectionPoolConfig", "description": "Optional. The managed connection pooling configuration for the instance." }, "connectorEnforcement": { "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.", "enum": [ "CONNECTOR_ENFORCEMENT_UNSPECIFIED", "NOT_REQUIRED", "REQUIRED" ], "type": "string", "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." ] }, "crashSafeReplicationEnabled": { "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.", "type": "boolean" }, "dataApiAccess": { "description": "This parameter controls whether to allow using ExecuteSql API to connect to the instance. Not allowed by default.", "enum": [ "DATA_API_ACCESS_UNSPECIFIED", "DISALLOW_DATA_API", "ALLOW_DATA_API" ], "type": "string", "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." ] }, "dataCacheConfig": { "$ref": "#/$defs/DataCacheConfig", "description": "Configuration for data cache." }, "dataDiskProvisionedIops": { "description": "Optional. Provisioned number of I/O operations per second for the data disk. This field is only used for hyperdisk-balanced disk types.", "format": "int64", "type": "string" }, "dataDiskProvisionedThroughput": { "description": "Optional. Provisioned throughput measured in MiB per second for the data disk. This field is only used for hyperdisk-balanced disk types.", "format": "int64", "type": "string" }, "dataDiskSizeGb": { "description": "The size of data disk, in GB. The data disk size minimum is 10GB.", "format": "int64", "type": "string" }, "dataDiskType": { "description": "The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.", "enum": [ "SQL_DATA_DISK_TYPE_UNSPECIFIED", "PD_SSD", "PD_HDD", "OBSOLETE_LOCAL_SSD", "HYPERDISK_BALANCED" ], "type": "string", "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." ] }, "databaseFlags": { "description": "The database flags passed to the instance at startup.", "items": { "$ref": "#/$defs/DatabaseFlags" }, "type": "array" }, "databaseReplicationEnabled": { "description": "Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.", "type": "boolean" }, "deletionProtectionEnabled": { "description": "Configuration to protect against accidental instance deletion.", "type": "boolean" }, "denyMaintenancePeriods": { "description": "Deny maintenance periods", "items": { "$ref": "#/$defs/DenyMaintenancePeriod" }, "type": "array" }, "edition": { "description": "Optional. The edition type of the Cloud SQL instance.", "enum": [ "EDITION_UNSPECIFIED", "ENTERPRISE", "ENTERPRISE_PLUS", "DEVELOPER" ], "type": "string", "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." ] }, "enableDataplexIntegration": { "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.", "type": "boolean" }, "enableGoogleMlIntegration": { "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.", "type": "boolean" }, "entraidConfig": { "$ref": "#/$defs/SqlServerEntraIdConfig", "description": "Optional. The Microsoft Entra ID configuration for the SQL Server instance." }, "finalBackupConfig": { "$ref": "#/$defs/FinalBackupConfig", "description": "Optional. The final backup configuration for the instance." }, "insightsConfig": { "$ref": "#/$defs/InsightsConfig", "description": "Insights configuration, for now relevant only for Postgres." }, "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." }, "kind": { "description": "This is always `sql#settings`.", "type": "string" }, "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." }, "maintenanceWindow": { "$ref": "#/$defs/MaintenanceWindow", "description": "The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes." }, "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." }, "pricingPlan": { "description": "The pricing plan for this instance. This can be either `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.", "enum": [ "SQL_PRICING_PLAN_UNSPECIFIED", "PACKAGE", "PER_USE" ], "type": "string", "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." ] }, "readPoolAutoScaleConfig": { "$ref": "#/$defs/ReadPoolAutoScaleConfig", "description": "Optional. The read pool auto-scale configuration for the instance." }, "replicationLagMaxSeconds": { "description": "Optional. Configuration value for recreation of replica after certain replication lag", "format": "int32", "type": "integer" }, "replicationType": { "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.", "enum": [ "SQL_REPLICATION_TYPE_UNSPECIFIED", "SYNCHRONOUS", "ASYNCHRONOUS" ], "type": "string", "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." ] }, "retainBackupsOnDelete": { "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.", "type": "boolean" }, "settingsVersion": { "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.", "format": "int64", "type": "string" }, "sqlServerAuditConfig": { "$ref": "#/$defs/SqlServerAuditConfig", "description": "SQL Server specific audit configuration." }, "storageAutoResize": { "description": "Configuration to increase storage size automatically. The default value is true.", "type": "boolean" }, "storageAutoResizeLimit": { "description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.", "format": "int64", "type": "string" }, "tier": { "description": "The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.", "type": "string" }, "timeZone": { "description": "Server timezone, relevant only for Cloud SQL for SQL Server.", "type": "string" }, "userLabels": { "additionalProperties": { "type": "string" }, "description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", "type": "object" } }, "type": "object" }, "SourceRole": { "description": "The source instance for the Blue-Green deployment.", "properties": { "targetId": { "$ref": "#/$defs/InstanceReference", "description": "Output only. The target instance paired with this source instance in a blue-green deployment.", "readOnly": true } }, "type": "object" }, "SqlActiveDirectoryConfig": { "description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server.", "properties": { "adminCredentialSecretName": { "description": "Optional. The secret manager key storing the administrator credential. (e.g., projects/{project}/secrets/{secret}).", "type": "string" }, "dnsServers": { "description": "Optional. Domain controller IPv4 addresses used to bootstrap Active Directory.", "items": { "type": "string" }, "type": "array" }, "domain": { "description": "The name of the domain (e.g., mydomain.com).", "type": "string" }, "kind": { "description": "This is always sql#activeDirectoryConfig.", "type": "string" }, "mode": { "description": "Optional. The mode of the Active Directory configuration.", "enum": [ "ACTIVE_DIRECTORY_MODE_UNSPECIFIED", "MANAGED_ACTIVE_DIRECTORY", "SELF_MANAGED_ACTIVE_DIRECTORY", "CUSTOMER_MANAGED_ACTIVE_DIRECTORY" ], "type": "string", "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." ] }, "organizationalUnit": { "description": "Optional. The organizational unit distinguished name. This is the full hierarchical path to the organizational unit.", "type": "string" } }, "type": "object" }, "SqlFailoverReplica": { "properties": { "available": { "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.", "type": "boolean" }, "name": { "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.", "type": "string" } }, "type": "object" }, "SqlOutOfDiskReport": { "description": "This message wraps up the information written by out-of-disk detection job.", "properties": { "sqlMinRecommendedIncreaseSizeGb": { "description": "The minimum recommended increase size in GigaBytes This field is consumed by the frontend * Writers: * the proactive database wellness job for OOD. * Readers:", "format": "int32", "type": "integer" }, "sqlOutOfDiskState": { "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", "enum": [ "SQL_OUT_OF_DISK_STATE_UNSPECIFIED", "NORMAL", "SOFT_SHUTDOWN" ], "type": "string", "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." ] } }, "type": "object" }, "SqlScheduledMaintenance": { "description": "Any scheduled maintenance for this instance.", "properties": { "canDefer": { "deprecated": true, "type": "boolean" }, "canReschedule": { "description": "If the scheduled maintenance can be rescheduled.", "type": "boolean" }, "scheduleDeadlineTime": { "description": "Maintenance cannot be rescheduled to start beyond this deadline.", "format": "date-time", "type": "string" }, "startTime": { "description": "The start time of any upcoming scheduled maintenance for this instance.", "format": "date-time", "type": "string" } }, "type": "object" }, "SqlServerAuditConfig": { "description": "SQL Server specific audit configuration.", "properties": { "bucket": { "description": "The name of the destination bucket (e.g., gs://mybucket).", "type": "string" }, "kind": { "description": "This is always sql#sqlServerAuditConfig", "type": "string" }, "retentionInterval": { "description": "How long to keep generated audit files.", "format": "google-duration", "type": "string" }, "uploadInterval": { "description": "How often to upload generated audit files.", "format": "google-duration", "type": "string" } }, "type": "object" }, "SqlServerEntraIdConfig": { "description": "SQL Server Entra ID configuration.", "properties": { "applicationId": { "description": "Optional. The application ID for the Entra ID configuration.", "type": "string" }, "kind": { "description": "Output only. This is always sql#sqlServerEntraIdConfig", "readOnly": true, "type": "string" }, "tenantId": { "description": "Optional. The tenant ID for the Entra ID configuration.", "type": "string" } }, "type": "object" }, "SslCert": { "description": "SslCerts Resource", "properties": { "cert": { "description": "PEM representation.", "type": "string" }, "certSerialNumber": { "description": "Serial number, as extracted from the certificate.", "type": "string" }, "commonName": { "description": "User supplied name. Constrained to [a-zA-Z.-_ ]+.", "type": "string" }, "createTime": { "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`", "format": "date-time", "type": "string" }, "expirationTime": { "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`.", "format": "date-time", "type": "string" }, "instance": { "description": "Name of the database instance.", "type": "string" }, "kind": { "description": "This is always `sql#sslCert`.", "type": "string" }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "sha1Fingerprint": { "description": "Sha1 Fingerprint.", "type": "string" } }, "type": "object" }, "TargetMetric": { "description": "Target metric for read pool auto scaling.", "properties": { "metric": { "description": "The metric name to be used for auto scaling.", "type": "string" }, "targetValue": { "description": "The target value for the metric.", "format": "float", "type": "number" } }, "type": "object" }, "TargetRole": { "description": "The target instance for the Blue-Green deployment.", "properties": { "sourceId": { "$ref": "#/$defs/InstanceReference", "description": "Output only. The source instance paired with this target instance in a blue-green deployment.", "readOnly": true } }, "type": "object" } }, "description": "A Cloud SQL instance resource.", "properties": { "availableMaintenanceVersions": { "description": "Output only. List all maintenance versions applicable on the instance", "items": { "type": "string" }, "readOnly": true, "type": "array" }, "backendType": { "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.", "enum": [ "SQL_BACKEND_TYPE_UNSPECIFIED", "FIRST_GEN", "SECOND_GEN", "EXTERNAL" ], "type": "string", "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." ] }, "connectionName": { "description": "Connection name of the Cloud SQL instance used in connection strings.", "type": "string" }, "createTime": { "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`.", "format": "date-time", "readOnly": true, "type": "string" }, "currentDiskSize": { "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.", "format": "int64", "type": "string" }, "databaseCenterIntegrationEnabled": { "description": "Optional. If true, instance metadata is sent to the Database Center. If false, instance metadata is not sent to the Database Center.", "type": "boolean" }, "databaseInstalledVersion": { "description": "Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.", "readOnly": true, "type": "string" }, "databaseVersion": { "description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.", "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", "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." ] }, "deploymentInfo": { "$ref": "#/$defs/BlueGreenDeploymentInfo", "description": "Output only. Deployment info for the instance. This is set if the instance is currently part of any blue-green setup.", "readOnly": true }, "diskEncryptionConfiguration": { "$ref": "#/$defs/DiskEncryptionConfiguration", "description": "Disk encryption configuration specific to an instance." }, "diskEncryptionStatus": { "$ref": "#/$defs/DiskEncryptionStatus", "description": "Disk encryption status specific to an instance." }, "dnsName": { "description": "Output only. The dns name of the instance.", "readOnly": true, "type": "string" }, "dnsNames": { "description": "Output only. The list of DNS names used by this instance.", "items": { "$ref": "#/$defs/DnsNameMapping" }, "readOnly": true, "type": "array" }, "etag": { "description": "This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.", "type": "string" }, "failoverReplica": { "$ref": "#/$defs/SqlFailoverReplica", "description": "The name and status of the failover replica." }, "gceZone": { "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.", "type": "string" }, "geminiConfig": { "$ref": "#/$defs/GeminiInstanceConfig", "description": "Gemini instance configuration." }, "includeReplicasForMajorVersionUpgrade": { "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.", "type": "boolean", "writeOnly": true }, "instanceType": { "description": "The instance type.", "enum": [ "SQL_INSTANCE_TYPE_UNSPECIFIED", "CLOUD_SQL_INSTANCE", "ON_PREMISES_INSTANCE", "READ_REPLICA_INSTANCE", "READ_POOL_INSTANCE", "GREEN_INSTANCE" ], "type": "string", "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)" ] }, "ipAddresses": { "description": "The assigned IP addresses for the instance.", "items": { "$ref": "#/$defs/IpMapping" }, "type": "array" }, "ipv6Address": { "deprecated": true, "description": "The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.", "type": "string" }, "kind": { "description": "This is always `sql#instance`.", "type": "string" }, "maintenanceVersion": { "description": "The current software version on the instance.", "type": "string" }, "masterInstanceName": { "description": "The name of the instance which will act as primary in the replication setup.", "type": "string" }, "maxDiskSize": { "deprecated": true, "description": "The maximum disk size of the instance in bytes.", "format": "int64", "type": "string" }, "name": { "description": "Name of the Cloud SQL instance. This does not include the project ID.", "type": "string" }, "nodeCount": { "description": "The number of read pool nodes in a read pool.", "format": "int32", "type": "integer" }, "nodes": { "description": "Output only. Entries containing information about each read pool node of the read pool.", "items": { "$ref": "#/$defs/PoolNodeConfig" }, "readOnly": true, "type": "array" }, "onPremisesConfiguration": { "$ref": "#/$defs/OnPremisesConfiguration", "description": "Configuration specific to on-premises instances." }, "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" }, "primaryDnsName": { "deprecated": true, "description": "Output only. DEPRECATED: please use write_endpoint instead.", "readOnly": true, "type": "string" }, "project": { "description": "The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.", "type": "string" }, "pscServiceAttachmentLink": { "description": "Output only. The link to service attachment of PSC instance.", "readOnly": true, "type": "string" }, "region": { "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`.", "type": "string" }, "replicaConfiguration": { "$ref": "#/$defs/ReplicaConfiguration", "description": "Configuration specific to failover replicas and read replicas." }, "replicaNames": { "description": "The replicas of the instance.", "items": { "type": "string" }, "type": "array" }, "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." }, "rootPassword": { "description": "Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.", "type": "string" }, "satisfiesPzi": { "description": "Output only. This status indicates whether the instance satisfies PZI. The status is reserved for future use.", "readOnly": true, "type": "boolean" }, "satisfiesPzs": { "description": "This status indicates whether the instance satisfies PZS. The status is reserved for future use.", "type": "boolean" }, "scheduledMaintenance": { "$ref": "#/$defs/SqlScheduledMaintenance", "description": "The start time of any upcoming scheduled maintenance for this instance." }, "secondaryGceZone": { "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.", "type": "string" }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "serverCaCert": { "$ref": "#/$defs/SslCert", "description": "SSL configuration." }, "serviceAccountEmailAddress": { "description": "The service account email address assigned to the instance.\\This property is read-only.", "type": "string" }, "settings": { "$ref": "#/$defs/Settings", "description": "The user settings." }, "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." ] }, "state": { "description": "The current serving state of the Cloud SQL instance.", "enum": [ "SQL_INSTANCE_STATE_UNSPECIFIED", "RUNNABLE", "SUSPENDED", "PENDING_DELETE", "PENDING_CREATE", "MAINTENANCE", "FAILED", "ONLINE_MAINTENANCE", "REPAIRING" ], "type": "string", "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." ] }, "suspensionReason": { "description": "If the instance state is SUSPENDED, the reason for the suspension.", "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." ] }, "type": "array" }, "switchTransactionLogsToCloudStorageEnabled": { "description": "Input only. Whether Cloud SQL is enabled to switch storing point-in-time recovery log files from a data disk to Cloud Storage.", "type": "boolean", "writeOnly": true }, "tags": { "additionalProperties": { "type": "string" }, "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.", "type": "object", "writeOnly": true, "x-google-immutable": true }, "upgradableDatabaseVersions": { "description": "Output only. All database versions that are available for upgrade.", "items": { "$ref": "#/$defs/AvailableDatabaseVersion" }, "readOnly": true, "type": "array" }, "writeEndpoint": { "description": "Output only. The dns name of the primary instance in a replication group.", "readOnly": true, "type": "string" } }, "type": "object" } }, { "description": "Get the status of a long-running operation. A long-running operation can take several\nminutes to complete. If an operation takes an extended amount of time, then use a command\nline tool to pause for 30 seconds before rechecking the status of the operation.\n", "inputSchema": { "description": "Operations get request.", "properties": { "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "operation": { "description": "Required. Instance operation ID.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" } }, "required": [ "operation", "project" ], "type": "object" }, "name": "get_operation", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Import data into a Cloud SQL instance.\n\nIf the file doesn't start with `gs://`, then the assumption is that the file is stored\nlocally. If the file is local, then the file must be uploaded to Cloud Storage\nbefore you can make the actual `import_data` call. To upload the file to Cloud Storage,\nyou can use the `gcloud` or `gsutil` commands.\n\nBefore you upload the file to Cloud Storage, consider whether you want to use an existing\nbucket or create a new bucket in the provided project.\n\nAfter the file is uploaded to Cloud Storage, the instance service account must have\nsufficient permissions to read the uploaded file from the Cloud Storage bucket.\n\nThis can be accomplished as follows:\n\n1. Use the `get_instance` tool to get the email address of the instance service account.\n From the output of the tool, get the value of the `serviceAccountEmailAddress` field.\n2. Grant the instance service account the `storage.objectAdmin` role on the\n provided Cloud Storage bucket. Use a command like `gcloud storage buckets\n add-iam-policy-binding` or a request to the Cloud Storage API. It can take from\n two to up to seven minutes or more for the role to be granted and the permissions to be\n propagated to the service account in Cloud Storage. If you encounter a permissions error\n after updatingthe IAM policy, then wait a few minutes and try again.\n\nAfter permissions are granted, you can import the data. We recommend that you leave optional\nparameters empty and use the system defaults. The file type can typically be determined by\nthe file extension. For example, if the file is a SQL file, `.sql` or `.csv` for CSV file.\n\nThe following is a sample SQL `importContext` for MySQL.\n\n```\n{\n \"uri\": \"gs://sample-gcs-bucket/sample-file.sql\",\n \"kind\": \"sql#importContext\",\n \"fileType\": \"SQL\"\n}\n```\n\nThere is no `database` parameter present for MySQL since the database name is\nexpected to be present in the SQL file. Specify only one URI.\nNo other fields are required outside of `importContext`.\n\nFor PostgreSQL, the `database` field is required. The following is a sample\nPostgreSQL `importContext` with the `database` field specified.\n\n```\n{\n \"uri\": \"gs://sample-gcs-bucket/sample-file.sql\",\n \"kind\": \"sql#importContext\",\n \"fileType\": \"SQL\",\n \"database\": \"sample-db\"\n}\n```\n\nThe `import_data` tool returns a long-running operation. Use the `get_operation` tool\nto poll its status until the operation completes.\n", "inputSchema": { "$defs": { "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "InstancesImportRequest": { "description": "Database instance import request.", "properties": { "importContext": { "$ref": "#/$defs/ImportContext", "description": "Contains details about the import operation." } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "required": [ "certificatePath", "privateKeyPath", "privateKeyPassword", "name" ], "type": "object" } }, "description": "Instance import request.", "properties": { "body": { "$ref": "#/$defs/InstancesImportRequest" }, "instance": { "description": "Cloud SQL instance ID. This does not include the project ID.", "type": "string" }, "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "project": { "description": "Project ID of the project that contains the instance.", "type": "string" } }, "type": "object" }, "name": "import_data", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "List all Cloud SQL instances in the project.", "inputSchema": { "description": "Instance list request.", "properties": { "filter": { "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.", "type": "string" }, "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "maxResults": { "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.", "format": "int64", "maximum": 4294967295, "minimum": 0, "type": "integer" }, "pageToken": { "description": "A previously-returned page token representing part of the larger set of results to view.", "type": "string" }, "project": { "description": "Project ID of the project for which to list Cloud SQL instances.", "type": "string" } }, "type": "object" }, "name": "list_instances", "outputSchema": { "$defs": { "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "McpDatabaseInstance": { "description": "An instance resource for MCP.", "properties": { "availabilityType": { "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).", "type": "string" }, "dataDiskSizeGb": { "description": "Optional. Data disk size in GB. Default value is 100.", "format": "int64", "type": "string" }, "databaseVersion": { "type": "string" }, "edition": { "description": "Optional. The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.", "type": "string" }, "name": { "description": "Required. Name of the Cloud SQL instance. This does not include the project ID.", "type": "string" }, "project": { "description": "Required. Project ID of the project for which to list Cloud SQL instances.", "type": "string" }, "region": { "description": "Optional. The geographical region of the Cloud SQL instance. For example, `us-central1`, `europe-west1`, and `asia-east1`.", "type": "string" }, "state": { "description": "Output only. State of the Cloud SQL instance.", "enum": [ "SQL_INSTANCE_STATE_UNSPECIFIED", "RUNNABLE", "SUSPENDED", "PENDING_DELETE", "PENDING_CREATE", "MAINTENANCE", "FAILED", "ONLINE_MAINTENANCE", "REPAIRING" ], "readOnly": true, "type": "string", "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." ] }, "tags": { "additionalProperties": { "type": "string" }, "description": "Optional. Input only. Tag keys and tag values that are bound to this instance.", "type": "object", "writeOnly": true }, "tier": { "description": "Optional. The tier (or machine type) for this instance.", "type": "string" } }, "type": "object" } }, "description": "Instance list response for MCP.", "properties": { "items": { "description": "List of mcp instance resources.", "items": { "$ref": "#/$defs/McpDatabaseInstance" }, "type": "array" }, "kind": { "description": "This is always sql#instancesList.", "type": "string" }, "nextPageToken": { "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.", "type": "string" }, "warnings": { "description": "List of warnings that occurred while handling the request.", "items": { "$ref": "#/$defs/ApiWarning" }, "type": "array" } }, "type": "object" } }, { "description": "List all database users for a Cloud SQL instance.", "inputSchema": { "properties": { "instance": { "description": "Database instance ID. This does not include the project ID.", "type": "string" }, "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "project": { "description": "Project ID of the project that contains the instance.", "type": "string" } }, "type": "object" }, "name": "list_users", "outputSchema": { "$defs": { "PasswordStatus": { "description": "Read-only password status.", "properties": { "locked": { "description": "If true, user does not have login privileges.", "type": "boolean" }, "passwordExpirationTime": { "description": "The expiration time of the current password.", "format": "date-time", "type": "string" } }, "type": "object" }, "SqlServerUserDetails": { "description": "Represents a Sql Server user on the Cloud SQL instance.", "properties": { "disabled": { "description": "Indicates if the user has been disabled.", "type": "boolean" }, "serverRoles": { "description": "Indicates the server roles for this user.", "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "User": { "description": "A Cloud SQL user resource.", "properties": { "databaseRoles": { "description": "Optional. Role memberships of the user", "items": { "type": "string" }, "type": "array" }, "dualPasswordType": { "description": "Dual password status for the user.", "enum": [ "DUAL_PASSWORD_TYPE_UNSPECIFIED", "NO_MODIFY_DUAL_PASSWORD", "NO_DUAL_PASSWORD", "DUAL_PASSWORD" ], "type": "string", "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." ] }, "etag": { "description": "This field is deprecated and will be removed from a future version of the API.", "type": "string" }, "host": { "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.", "type": "string" }, "iamEmail": { "description": "Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.", "type": "string" }, "iamStatus": { "description": "Indicates if a group is active or inactive for IAM database authentication.", "enum": [ "IAM_STATUS_UNSPECIFIED", "INACTIVE", "ACTIVE" ], "type": "string", "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." ] }, "instance": { "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.", "type": "string" }, "kind": { "description": "This is always `sql#user`.", "type": "string" }, "name": { "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": "string" }, "password": { "description": "The password for the user.", "type": "string" }, "passwordPolicy": { "$ref": "#/$defs/UserPasswordValidationPolicy", "description": "User level password validation policy." }, "project": { "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.", "type": "string" }, "serverRoles": { "description": "Optional. The server roles for the SQL Server login.", "items": { "type": "string" }, "type": "array" }, "sqlserverUserDetails": { "$ref": "#/$defs/SqlServerUserDetails" }, "type": { "description": "The user type. It determines the method to authenticate the user during login. The default is the database's built-in user 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", "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." ] } }, "type": "object" }, "UserPasswordValidationPolicy": { "description": "User level password validation policy.", "properties": { "allowedFailedAttempts": { "description": "Number of failed login attempts allowed before user get locked.", "format": "int32", "type": "integer" }, "enableFailedAttemptsCheck": { "description": "If true, failed login attempts check will be enabled.", "type": "boolean" }, "enablePasswordVerification": { "description": "If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.", "type": "boolean" }, "passwordExpirationDuration": { "description": "Expiration duration after password is updated.", "format": "google-duration", "type": "string" }, "status": { "$ref": "#/$defs/PasswordStatus", "description": "Output only. Read-only password status.", "readOnly": true } }, "type": "object" } }, "description": "User list response.", "properties": { "items": { "description": "List of user resources in the instance.", "items": { "$ref": "#/$defs/User" }, "type": "array" }, "kind": { "description": "This is always `sql#usersList`.", "type": "string" }, "nextPageToken": { "deprecated": true, "description": "Unused.", "type": "string" } }, "type": "object" } }, { "description": "Checks if a Cloud SQL for PostgreSQL instance is ready for a major version upgrade to the\nspecified target version.\n\nThe `target_database_version` MUST be provided in the request (e.g., `POSTGRES_15`).\n\nThis tool helps identify potential issues *before*\nattempting the actual upgrade, reducing the risk of failure or downtime.\n\nThis tool is only supported for PostgreSQL primary instances and does not run on read replicas.\n\nThe precheck typically evaluates:\n\n- Database schema compatibility with the target version.\n- Cloud SQL limitations and unsupported features.\n- Instance resource constraints (e.g., number of relations).\n- Compatibility of current database settings and extensions.\n- Overall instance health and readiness.\n\nThis tool returns a long-running operation. Use the `get_operation`\ntool with the operation name returned by this call to poll its status.\n\nIMPORTANT: Once the operation status is DONE, the detailed precheck results are\navailable within the `Operation` resource. You will need to inspect\nthe response from `get_operation`. The findings are located in the\n`pre_check_major_version_upgrade_context.pre_check_response` field.\n\nThe findings are structured, indicating:\n\n - INFO: General information.\n - WARNING: Potential issues that don't block the upgrade but should be reviewed.\n - ERROR: Critical issues that MUST be resolved before attempting the upgrade.\n\nEach finding should include a message and any required actions. Addressing\nany reported issues is crucial before proceeding with the major version upgrade.\nIf `pre_check_response` is empty or missing, it indicates that no issues were\nidentified during the precheck.\n\nRunning this precheck does not impact the instance's availability.\n", "inputSchema": { "$defs": { "InstancesPreCheckMajorVersionUpgradeRequest": { "description": "Request for Pre-checks for MVU", "properties": { "preCheckMajorVersionUpgradeContext": { "$ref": "#/$defs/PreCheckMajorVersionUpgradeContext", "description": "Required. Contains details about the pre-check major version upgrade operation." } }, "required": [ "preCheckMajorVersionUpgradeContext" ], "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "required": [ "targetDatabaseVersion" ], "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" } }, "description": "Request for Pre-checks for MVU", "properties": { "body": { "$ref": "#/$defs/InstancesPreCheckMajorVersionUpgradeRequest", "description": "Required. The context for request to perform the pre-check major version upgrade operation." }, "instance": { "description": "Required. Cloud SQL instance ID. This does not include the project ID.", "type": "string" }, "location": { "description": "Optional. Region of the Cloud SQL instance.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" } }, "required": [ "instance", "project", "body" ], "type": "object" }, "name": "postgres_upgrade_precheck", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Restores a backup to a Cloud SQL instance.\n\nThe target_instance and target_project must be provided and populated in the request.\n\nThe backup identifier can be provided in several ways:\n\n1. A backup_run_id (which is an integer).\n2. A backup URI of the format `projects/{project-id}/backups/{backup-uid}`.\n3. A backup URI of the format `projects/{project-id}/locations/{location}/backupVaults/{backupvault}/dataSources/{datasource}/backups/{backup-uid}`.\n\nUse the identifier to populate the `backup_id` field in the request.\n\nThe source_project must be populated in the request. If the identifier is a backup_run_id,\nthe source_project will be provided. If the identifier is a backup URI, the source_project\nmay need to be extracted from the URI. Do not confuse the extracted source_project with the\ntarget_project, which will be provided in other ways.\n\nIn addition, if the identifier is a backup_run_id, the source_instance must be provided and\npopulated in the request.\n\nDo not try to create the instance before the restore, the restore itself will create the\ninstance if needed.\n\nConfirm the parameters with the user before executing the restore.\n", "inputSchema": { "description": "Instance restore backup request for MCP.", "properties": { "backupId": { "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}'.", "type": "string" }, "sourceInstance": { "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.", "type": "string" }, "sourceProject": { "description": "Required. The project ID of the source instance containing the backup.", "type": "string" }, "targetInstance": { "description": "Required. Cloud SQL instance ID of the target. This does not include the project ID.", "type": "string" }, "targetProject": { "description": "Required. Project ID of the target project.", "type": "string" } }, "required": [ "targetProject", "targetInstance", "backupId", "sourceProject" ], "type": "object" }, "name": "restore_backup", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Partially updates the configuration settings of a Cloud SQL instance.\n\n* This tool returns a long-running operation. Use the `get_operation` tool to poll\n its status until the operation completes.\n* Some update operations, such as changing the edition upgrade or instance tier, etc might\n cause the instance to restart, resulting in downtime. Before you proceed with such\n operations, get confirmation from the user.\n", "inputSchema": { "$defs": { "DataCacheConfig": { "description": "Data cache configurations.", "properties": { "dataCacheEnabled": { "description": "Whether data cache is enabled for the instance.", "type": "boolean" } }, "type": "object" }, "DatabaseFlags": { "description": "Database flags for Cloud SQL instances.", "properties": { "name": { "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.", "type": "string" }, "value": { "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.", "type": "string" } }, "type": "object" }, "PsaMcpConfig": { "description": "Configuration for creating a Cloud SQL instance with Private Service Access.", "properties": { "allocatedIpRange": { "description": "Optional: The name of an allocated IP range in the consumer VPC.", "type": "string" }, "network": { "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.", "type": "string" } }, "required": [ "network" ], "type": "object" }, "PscMcpConfig": { "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.", "properties": { "network": { "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.", "type": "string" }, "project": { "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.", "type": "string" }, "pscEnabled": { "description": "Optional. Whether PSC connectivity is enabled for this instance.", "type": "boolean" } }, "type": "object" } }, "description": "Instance patch request for MCP.", "properties": { "dataApiAccess": { "description": "Optional. The settings for controlling data API access to an instance.", "enum": [ "DATA_API_ACCESS_UNSPECIFIED", "DISALLOW_DATA_API", "ALLOW_DATA_API" ], "type": "string", "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." ] }, "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." }, "dataDiskSizeGb": { "description": "Optional. Data disk size in GB.", "format": "int64", "type": "string" }, "databaseFlags": { "description": "Optional. The database flags.", "items": { "$ref": "#/$defs/DatabaseFlags" }, "type": "array" }, "edition": { "description": "Optional. The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS.", "type": "string" }, "googleMlIntegrationEnabled": { "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.", "type": "boolean" }, "instance": { "description": "Required. Cloud SQL instance ID. This does not include the project ID.", "type": "string" }, "ipv4Enabled": { "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.", "type": "boolean" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" }, "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." }, "tier": { "description": "Optional. The tier (or machine type) for this instance. format: db-custom-{CPUs}-{Memory}.", "type": "string" } }, "required": [ "project", "instance" ], "type": "object" }, "name": "update_instance", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } }, { "description": "Update a database user for a Cloud SQL instance. A common use case for\nthe `update_user` is to grant a user the `cloudsqlsuperuser` role,\nwhich can provide a user with many required permissions.\n\nThis tool only supports updating users to assign database roles.\n\n* This tool returns a long-running operation. Use the `get_operation` tool to poll its status\n until the operation completes.\n* Before calling the `update_user` tool, always check the existing configuration of the user\n such as the user type with `list_users` tool.\n* As a special case for MySQL, if the `list_users` tool returns a full email address for\n the `iamEmail` field, for example `{name=test-account,\n [email protected]}`, then in your `update_user`\n request, use the full email address in the `iamEmail` field in the `name` field of your\n toolrequest. For example, `[email protected]`.\n\nKey parameters for updating user roles:\n\n* `database_roles`: A list of database roles to be assigned to the user.\n* `revokeExistingRoles`: A boolean field (default: false) that controls how existing roles\n are handled.\n\nHow role updates work:\n\n1. **If `revokeExistingRoles` is true:**\n\n * Any existing roles granted to the user but NOT in the provided `database_roles` list\n will be REVOKED.\n * Revoking only applies to non-system roles. System roles like `cloudsqliamuser` etc won't be revoked.\n * Any roles in the `database_roles` list that the user does NOT already have will be GRANTED.\n * If `database_roles` is empty, then ALL existing non-system roles are revoked.\n\n2. **If `revokeExistingRoles` is false (default):**\n\n * Any roles in the `database_roles` list that the user does NOT already have will be GRANTED.\n * Existing roles NOT in the `database_roles` list are KEPT.\n * If `database_roles` is empty, then there is no change to the user's roles.\n\nExamples:\n\n* Existing Roles: `[roleA, roleB]`\n\n * Request: `database_roles: [roleB, roleC], revokeExistingRoles: true`\n * Result: Revokes `roleA`, Grants `roleC`. User roles become `[roleB, roleC]`.\n\n * Request: `database_roles: [roleB, roleC], revokeExistingRoles: false`\n * Result: Grants `roleC`. User roles become `[roleA, roleB, roleC]`.\n\n * Request: `database_roles: [], revokeExistingRoles: true`\n * Result: Revokes `roleA`, Revokes `roleB`. User roles become `[]`.\n\n * Request: `database_roles: [], revokeExistingRoles: false`\n * Result: No change. User roles remain `[roleA, roleB]`.\n", "inputSchema": { "description": "User update request for MCP.", "properties": { "databaseRoles": { "description": "Optional. List of database roles to grant to the user. body.database_roles will be ignored for update request.", "items": { "type": "string" }, "type": "array" }, "host": { "description": "Optional. Host of the user in the instance.", "type": "string" }, "instance": { "description": "Required. Database instance ID. This does not include the project ID.", "type": "string" }, "name": { "description": "Required. Name of the user in the instance.", "type": "string" }, "project": { "description": "Required. Project ID of the project that contains the instance.", "type": "string" }, "revokeExistingRoles": { "description": "Optional. revoke the existing roles granted to the user.", "type": "boolean" }, "type": { "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.", "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", "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." ] } }, "required": [ "instance", "name", "project", "type" ], "type": "object" }, "name": "update_user", "outputSchema": { "$defs": { "AcquireSsrsLeaseContext": { "description": "Acquire SSRS lease context.", "properties": { "duration": { "description": "Lease duration needed for SSRS setup.", "format": "google-duration", "type": "string" }, "reportDatabase": { "description": "The report database to be used for SSRS setup.", "type": "string" }, "serviceLogin": { "description": "The username to be used as the service login to connect to the report database for SSRS setup.", "type": "string" }, "setupLogin": { "description": "The username to be used as the setup login to connect to the database server for SSRS setup.", "type": "string" } }, "type": "object" }, "ApiWarning": { "description": "An Admin API warning message.", "properties": { "code": { "description": "Code to uniquely identify the warning type.", "enum": [ "SQL_API_WARNING_CODE_UNSPECIFIED", "REGION_UNREACHABLE", "MAX_RESULTS_EXCEEDS_LIMIT", "COMPROMISED_CREDENTIALS", "INTERNAL_STATE_FAILURE" ], "type": "string", "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." ] }, "message": { "description": "The warning message.", "type": "string" }, "region": { "description": "The region name for REGION_UNREACHABLE warning.", "type": "string" } }, "type": "object" }, "BackupContext": { "description": "Backup context.", "properties": { "backupId": { "description": "The identifier of the backup.", "format": "int64", "type": "string" }, "kind": { "description": "This is always `sql#backupContext`.", "type": "string" }, "name": { "description": "The name of the backup. Format: projects/{project}/backups/{backup}", "type": "string" } }, "type": "object" }, "EncryptionOptions": { "properties": { "certPath": { "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.", "type": "string" }, "keepEncrypted": { "description": "Optional. Whether the imported file remains encrypted.", "type": "boolean" }, "pvkPassword": { "description": "Password that encrypts the private key", "type": "string" }, "pvkPath": { "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.", "type": "string" } }, "type": "object" }, "ExportContext": { "description": "Database instance export context.", "properties": { "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." }, "databases": { "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`.", "items": { "type": "string" }, "type": "array" }, "fileType": { "description": "The file type for the specified uri.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "kind": { "description": "This is always `sql#exportContext`.", "type": "string" }, "offload": { "description": "Whether to perform a serverless export.", "type": "boolean" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "ImportContext": { "description": "Database instance import context.", "properties": { "bakImportOptions": { "$ref": "#/$defs/SqlBakImportOptions", "description": "Import parameters specific to SQL Server .BAK files" }, "csvImportOptions": { "$ref": "#/$defs/SqlCsvImportOptions", "description": "Options for importing data as CSV." }, "database": { "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.", "type": "string" }, "fileType": { "description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", "enum": [ "SQL_FILE_TYPE_UNSPECIFIED", "SQL", "CSV", "BAK", "TDE" ], "type": "string", "x-google-enum-descriptions": [ "Unknown file type.", "File containing SQL statements.", "File in CSV format.", "", "TDE certificate." ] }, "importUser": { "description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", "type": "string" }, "kind": { "description": "This is always `sql#importContext`.", "type": "string" }, "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" }, "uri": { "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.", "type": "string" } }, "type": "object" }, "MysqlExportOptions": { "description": "Options for exporting from MySQL.", "properties": { "masterData": { "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.", "format": "int32", "type": "integer" } }, "type": "object" }, "OperationError": { "description": "Database instance operation error.", "properties": { "code": { "description": "Identifies the specific error that occurred.", "type": "string" }, "kind": { "description": "This is always `sql#operationError`.", "type": "string" }, "message": { "description": "Additional information about the error encountered.", "type": "string" } }, "type": "object" }, "OperationErrors": { "description": "Database instance operation errors list wrapper.", "properties": { "errors": { "description": "The list of errors encountered while processing this operation.", "items": { "$ref": "#/$defs/OperationError" }, "type": "array" }, "kind": { "description": "This is always `sql#operationErrors`.", "type": "string" } }, "type": "object" }, "PostgresExportOptions": { "description": "Options for exporting from a Cloud SQL for PostgreSQL instance.", "properties": { "clean": { "description": "Optional. Use this option to include DROP <object> SQL statements. Use these statements to delete database objects before running the import operation.", "type": "boolean" }, "ifExists": { "description": "Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean.", "type": "boolean" } }, "type": "object" }, "PostgresImportOptions": { "properties": { "clean": { "description": "Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel.", "type": "boolean" }, "ifExists": { "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.", "type": "boolean" } }, "type": "object" }, "PreCheckMajorVersionUpgradeContext": { "description": "Pre-check major version upgrade context.", "properties": { "kind": { "description": "Optional. This is always `sql#preCheckMajorVersionUpgradeContext`.", "type": "string" }, "preCheckResponse": { "description": "Output only. The responses from the precheck operation.", "items": { "$ref": "#/$defs/PreCheckResponse" }, "readOnly": true, "type": "array" }, "targetDatabaseVersion": { "description": "Required. The target database version to upgrade to.", "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", "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." ] } }, "type": "object" }, "PreCheckResponse": { "description": "Structured PreCheckResponse containing message, type, and required actions.", "properties": { "actionsRequired": { "description": "The actions that the user needs to take. Use repeated for multiple actions.", "items": { "type": "string" }, "type": "array" }, "message": { "description": "The message to be displayed to the user.", "type": "string" }, "messageType": { "description": "The type of message whether it is an info, warning, or error.", "enum": [ "MESSAGE_TYPE_UNSPECIFIED", "INFO", "WARNING", "ERROR" ], "type": "string", "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." ] } }, "type": "object" }, "SqlBakExportOptions": { "description": "Options for exporting BAK files (SQL Server-only)", "properties": { "bakType": { "description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "copyOnly": { "deprecated": true, "description": "Deprecated: copy_only is deprecated. Use differential_base instead", "type": "boolean" }, "differentialBase": { "description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", "type": "boolean" }, "exportLogEndTime": { "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.", "format": "date-time", "type": "string" }, "exportLogStartTime": { "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.", "format": "date-time", "type": "string" }, "stripeCount": { "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.", "format": "int32", "type": "integer" }, "striped": { "description": "Whether or not the export should be striped.", "type": "boolean" } }, "type": "object" }, "SqlBakImportOptions": { "properties": { "bakType": { "description": "Type of the bak content, FULL or DIFF", "enum": [ "BAK_TYPE_UNSPECIFIED", "FULL", "DIFF", "TLOG" ], "type": "string", "x-google-enum-descriptions": [ "Default type.", "Full backup.", "Differential backup.", "Transaction Log backup" ] }, "encryptionOptions": { "$ref": "#/$defs/EncryptionOptions" }, "noRecovery": { "description": "Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server.", "type": "boolean" }, "recoveryOnly": { "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.", "type": "boolean" }, "stopAt": { "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.", "format": "date-time", "type": "string" }, "stopAtMark": { "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.", "type": "string" }, "striped": { "description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", "type": "boolean" } }, "type": "object" }, "SqlCsvExportOptions": { "properties": { "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "selectQuery": { "description": "The select query used to extract the data.", "type": "string" } }, "type": "object" }, "SqlCsvImportOptions": { "properties": { "columns": { "description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", "items": { "type": "string" }, "type": "array" }, "escapeCharacter": { "description": "Specifies the character that should appear before a data character that needs to be escaped.", "type": "string" }, "fieldsTerminatedBy": { "description": "Specifies the character that separates columns within each row (line) of the file.", "type": "string" }, "linesTerminatedBy": { "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.", "type": "string" }, "quoteCharacter": { "description": "Specifies the quoting character to be used when a data value is quoted.", "type": "string" }, "table": { "description": "The table to which CSV data is imported.", "type": "string" } }, "type": "object" }, "SqlExportOptions": { "properties": { "mysqlExportOptions": { "$ref": "#/$defs/MysqlExportOptions" }, "parallel": { "description": "Optional. Whether or not the export should be parallel.", "type": "boolean" }, "postgresExportOptions": { "$ref": "#/$defs/PostgresExportOptions", "description": "Optional. Options for exporting from a Cloud SQL for PostgreSQL instance." }, "schemaOnly": { "description": "Export only schemas.", "type": "boolean" }, "tables": { "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.", "items": { "type": "string" }, "type": "array" }, "threads": { "description": "Optional. The number of threads to use for parallel export.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlImportOptions": { "properties": { "parallel": { "description": "Optional. Whether or not the import should be parallel.", "type": "boolean" }, "postgresImportOptions": { "$ref": "#/$defs/PostgresImportOptions", "description": "Optional. Options for importing from a Cloud SQL for PostgreSQL instance." }, "threads": { "description": "Optional. The number of threads to use for parallel import.", "format": "int32", "type": "integer" } }, "type": "object" }, "SqlSubOperationType": { "description": "The sub operation type based on the operation type.", "properties": { "maintenanceType": { "description": "The type of maintenance to be performed on the instance.", "enum": [ "SQL_MAINTENANCE_TYPE_UNSPECIFIED", "INSTANCE_MAINTENANCE", "REPLICA_INCLUDED_MAINTENANCE", "INSTANCE_SELF_SERVICE_MAINTENANCE", "REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE" ], "type": "string", "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." ] } }, "type": "object" }, "SqlTdeExportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "SqlTdeImportOptions": { "properties": { "certificatePath": { "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.", "type": "string" }, "name": { "description": "Required. Certificate name. Applicable only for SQL Server instances.", "type": "string" }, "privateKeyPassword": { "description": "Required. Password that encrypts the private key.", "type": "string" }, "privateKeyPath": { "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.", "type": "string" } }, "type": "object" }, "StartWorkloadCaptureContext": { "description": "The context for the `StartWorkloadCapture` operation, which contains details to start recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "enableLiveReplay": { "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.", "type": "boolean" }, "replayInstance": { "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.", "type": "string" } }, "type": "object" }, "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).", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" }, "StopWorkloadCaptureContext": { "description": "The context for the `StopWorkloadCapture` operation, which contains details to stop recording the workload (SQL queries) on a Cloud SQL instance.", "properties": { "abortLiveReplay": { "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.", "type": "boolean" } }, "type": "object" }, "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.", "properties": { "replayInstance": { "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.", "type": "string" }, "workloadId": { "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.", "readOnly": true, "type": "string" } }, "type": "object" } }, "description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", "properties": { "acquireSsrsLeaseContext": { "$ref": "#/$defs/AcquireSsrsLeaseContext", "description": "The context for acquire SSRS lease operation, if applicable." }, "apiWarning": { "$ref": "#/$defs/ApiWarning", "description": "An Admin API warning message." }, "backupContext": { "$ref": "#/$defs/BackupContext", "description": "The context for backup operation, if applicable." }, "endTime": { "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`.", "format": "date-time", "type": "string" }, "error": { "$ref": "#/$defs/OperationErrors", "description": "If errors occurred during processing of this operation, this field will be populated." }, "exportContext": { "$ref": "#/$defs/ExportContext", "description": "The context for export operation, if applicable." }, "importContext": { "$ref": "#/$defs/ImportContext", "description": "The context for import operation, if applicable." }, "insertTime": { "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`.", "format": "date-time", "type": "string" }, "kind": { "description": "This is always `sql#operation`.", "type": "string" }, "name": { "description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", "type": "string" }, "operationType": { "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`", "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", "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." ] }, "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)." }, "selfLink": { "description": "The URI of this resource.", "type": "string" }, "startTime": { "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`.", "format": "date-time", "type": "string" }, "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." }, "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)." }, "status": { "description": "The status of an operation.", "enum": [ "SQL_OPERATION_STATUS_UNSPECIFIED", "PENDING", "RUNNING", "DONE" ], "type": "string", "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." ] }, "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." }, "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." }, "subOperationType": { "$ref": "#/$defs/SqlSubOperationType", "description": "Optional. The sub operation based on the operation type." }, "targetId": { "description": "Name of the resource on which this operation runs.", "type": "string" }, "targetLink": { "type": "string" }, "targetProject": { "description": "The project ID of the target instance related to this operation.", "type": "string" }, "user": { "description": "The email address of the user who initiated this operation.", "type": "string" } }, "type": "object" } } ] }
Verify it yourselfcurl -s https://api.teppi.xyz/v1/evidence/sha256:111afb6878b623a1c3dc7656a6738875e9c49b001eac90d4058558021d6364e4 | sha256sum