Tool: create_instance
Initiates the creation of a Cloud SQL instance.
- The tool returns a long-running operation. Use the
get_operationtool to poll its status until the operation completes. - The instance creation operation can take several minutes. Use a command line tool to pause for 30 seconds before rechecking the status.
- For MySQL and PostgreSQL instances, after you use the
create_instancetool to create an instance, you can use thecreate_usertool to create an IAM user account for the user currently logged in to the project. - IMPORTANT: Set
ipv4_enabledto 'false' if creating a Private Service Connect or a Private Service Access instance. - Set
free_trialto 'true' to create a free trial instance. Free trial instances let you test majority of Cloud SQL features for up to 30 days without financial commitment. Subject to eligibility and availability. The value of
data_api_accessis set toALLOW_DATA_APIby default. This setting lets you execute SQL statements using theexecute_sqltool and theexecuteSqlAPI.
Unless otherwise specified, a newly created instance uses the default instance configuration of a development environment.
The following is the default configuration for an instance in a development environment:
{
"tier": "db-perf-optimized-N-2",
"data_disk_size_gb": 100,
"region": "us-central1",
"database_version": "POSTGRES_18",
"edition": "ENTERPRISE_PLUS",
"availability_type": "ZONAL",
"tags": [{"environment": "dev"}]
}
The following configuration is recommended for an instance in a production environment:
{
"tier": "db-perf-optimized-N-8",
"data_disk_size_gb": 250,
"region": "us-central1",
"database_version": "POSTGRES_18",
"edition": "ENTERPRISE_PLUS",
"availability_type": "REGIONAL",
"tags": [{"environment": "prod"}]
}
The following instance configuration is recommended for SQL Server:
{
"tier": "db-perf-optimized-N-8",
"data_disk_size_gb": 250,
"region": "us-central1",
"database_version": "SQLSERVER_2022_STANDARD",
"edition": "ENTERPRISE",
"availability_type": "REGIONAL",
"tags": [{"environment": "prod"}]
}
The following code sample shows how to use curl to call the create_instance MCP tool.
| Curl Request |
|---|
curl --location 'https://sqladmin.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "create_instance", "arguments": { // Provide these details according to the MCP tool specification. } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Instance insert request for MCP.
SqlInstancesInsertMcpRequest
| JSON representation |
|---|
{ "project": string, "name": string, "databaseVersion": string, "region": string, "edition": string, "tier": string, "dataDiskSizeGb": string, "availabilityType": string, "tags": { string: string, ... }, "dataCacheEnabled": boolean, "enableGoogleMlIntegration": boolean, "ipv4Enabled": boolean, "freeTrial": boolean, // Union field |
| Fields | |
|---|---|
project |
Required. Project ID of the project to which the newly created Cloud SQL instances should belong. |
name |
Required. Name of the Cloud SQL instance. This does not include the project ID. |
databaseVersion |
Optional. The database engine type and version. The default value is For Mysql, it can be |
region |
Optional. The geographical region of the Cloud SQL instance. For example, If not specified, the default value is |
edition |
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. |
tier |
Optional. The tier (or machine type) for this instance. If not specified: - For 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}. |
dataDiskSizeGb |
Optional. Data disk size in GB. Default value is 100. |
availabilityType |
Optional. Availability type. Potential values: * |
tags |
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: An object containing a list of |
dataCacheEnabled |
Optional. Whether data cache is enabled for the instance. |
enableGoogleMlIntegration |
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. |
ipv4Enabled |
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 |
freeTrial |
Optional. Whether the instance is a free trial instance. If true, the instance will be created with a free trial configuration. |
Union field
|
|
pscMcpConfig |
Optional. Configuration for Private Service Connect (PSC) instance creation. |
Union field
|
|
psaMcpConfig |
Optional. Use this to connect to the Cloud SQL instance using Private Service Access. |
Int64Value
| JSON representation |
|---|
{ "value": string } |
| Fields | |
|---|---|
value |
The int64 value. |
TagsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
BoolValue
| JSON representation |
|---|
{ "value": boolean } |
| Fields | |
|---|---|
value |
The bool value. |
PscMcpConfig
| JSON representation |
|---|
{ "pscEnabled": boolean, "project": string, "network": string } |
| Fields | |
|---|---|
pscEnabled |
Optional. Whether PSC connectivity is enabled for this instance. |
project |
Optional. The project ID of the service project of this PSC consumer endpoint. This is only applicable if |
network |
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, The consumer host project of this network might be different from the consumer service project. |
PsaMcpConfig
| JSON representation |
|---|
{ "network": string, // Union field |
| Fields | |
|---|---|
network |
Required. The full resource name of the VPC network to connect to via PSA. Format: projects/{project}/global/networks/{network} REQUIRED if enabling PSA. |
Union field
|
|
allocatedIpRange |
Optional: The name of an allocated IP range in the consumer VPC. |
Output Schema
An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.
Operation
| JSON representation |
|---|
{ "kind": string, "targetLink": string, "status": enum ( |
| Fields | |
|---|---|
kind |
This is always |
targetLink |
|
status |
The status of an operation. |
user |
The email address of the user who initiated this operation. |
insertTime |
The time this operation was enqueued in UTC timezone in RFC 3339 format, for example Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
startTime |
The time this operation actually started in UTC timezone in RFC 3339 format, for example Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
endTime |
The time this operation finished in UTC timezone in RFC 3339 format, for example Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
error |
If errors occurred during processing of this operation, this field will be populated. |
apiWarning |
An Admin API warning message. |
operationType |
The type of the operation. Valid values are: * |
importContext |
The context for import operation, if applicable. |
exportContext |
The context for export operation, if applicable. |
backupContext |
The context for backup operation, if applicable. |
preCheckMajorVersionUpgradeContext |
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). |
startWorkloadCaptureContext |
The context for the |
stopWorkloadCaptureContext |
The context for the |
startWorkloadReplayContext |
The context for the |
stopWorkloadReplayContext |
The context for the |
name |
An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation. |
targetId |
Name of the resource on which this operation runs. |
selfLink |
The URI of this resource. |
targetProject |
The project ID of the target instance related to this operation. |
acquireSsrsLeaseContext |
The context for acquire SSRS lease operation, if applicable. |
subOperationType |
Optional. The sub operation based on the operation type. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
OperationErrors
| JSON representation |
|---|
{
"kind": string,
"errors": [
{
object ( |
| Fields | |
|---|---|
kind |
This is always |
errors[] |
The list of errors encountered while processing this operation. |
OperationError
| JSON representation |
|---|
{ "kind": string, "code": string, "message": string } |
| Fields | |
|---|---|
kind |
This is always |
code |
Identifies the specific error that occurred. |
message |
Additional information about the error encountered. |
ApiWarning
| JSON representation |
|---|
{
"code": enum ( |
| Fields | |
|---|---|
code |
Code to uniquely identify the warning type. |
message |
The warning message. |
region |
The region name for REGION_UNREACHABLE warning. |
ImportContext
| JSON representation |
|---|
{ "uri": string, "database": string, "kind": string, "fileType": enum ( |
| Fields | |
|---|---|
uri |
Path to the import file in Cloud Storage, in the form |
database |
The target database for the import. If |
kind |
This is always |
fileType |
The file type for the specified uri.`SQL |
csvImportOptions |
Options for importing data as CSV. |
importUser |
The PostgreSQL user for this import operation. PostgreSQL instances only. |
bakImportOptions |
Import parameters specific to SQL Server .BAK files |
sqlImportOptions |
Optional. Options for importing data from SQL statements. |
tdeImportOptions |
Optional. Import parameters specific to SQL Server TDE certificates |
SqlCsvImportOptions
| JSON representation |
|---|
{ "table": string, "columns": [ string ], "escapeCharacter": string, "quoteCharacter": string, "fieldsTerminatedBy": string, "linesTerminatedBy": string } |
| Fields | |
|---|---|
table |
The table to which CSV data is imported. |
columns[] |
The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data. |
escapeCharacter |
Specifies the character that should appear before a data character that needs to be escaped. |
quoteCharacter |
Specifies the quoting character to be used when a data value is quoted. |
fieldsTerminatedBy |
Specifies the character that separates columns within each row (line) of the file. |
linesTerminatedBy |
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. |
SqlBakImportOptions
| JSON representation |
|---|
{ "encryptionOptions": { object ( |
| Fields | |
|---|---|
encryptionOptions |
|
striped |
Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server. |
noRecovery |
Whether or not the backup importing will restore database with NORECOVERY option. Applies only to Cloud SQL for SQL Server. |
recoveryOnly |
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. |
bakType |
Type of the bak content, FULL or DIFF |
stopAt |
Optional. The timestamp when the import should stop. This timestamp is in the RFC 3339 format (for example, Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
stopAtMark |
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. |
EncryptionOptions
| JSON representation |
|---|
{ "certPath": string, "pvkPath": string, "pvkPassword": string, "keepEncrypted": boolean } |
| Fields | |
|---|---|
certPath |
Path to the Certificate (.cer) in Cloud Storage, in the form |
pvkPath |
Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form |
pvkPassword |
Password that encrypts the private key |
keepEncrypted |
Optional. Whether the imported file remains encrypted. |
BoolValue
| JSON representation |
|---|
{ "value": boolean } |
| Fields | |
|---|---|
value |
The bool value. |
SqlImportOptions
| JSON representation |
|---|
{
"threads": integer,
"parallel": boolean,
"postgresImportOptions": {
object ( |
| Fields | |
|---|---|
threads |
Optional. The number of threads to use for parallel import. |
parallel |
Optional. Whether or not the import should be parallel. |
postgresImportOptions |
Optional. Options for importing from a Cloud SQL for PostgreSQL instance. |
Int32Value
| JSON representation |
|---|
{ "value": integer } |
| Fields | |
|---|---|
value |
The int32 value. |
PostgresImportOptions
| JSON representation |
|---|
{ "clean": boolean, "ifExists": boolean } |
| Fields | |
|---|---|
clean |
Optional. The --clean flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel. |
ifExists |
Optional. The --if-exists flag for the pg_restore utility. This flag applies only if you enabled Cloud SQL to import files in parallel. |
SqlTdeImportOptions
| JSON representation |
|---|
{ "certificatePath": string, "privateKeyPath": string, "privateKeyPassword": string, "name": string } |
| Fields | |
|---|---|
certificatePath |
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. |
privateKeyPath |
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. |
privateKeyPassword |
Required. Password that encrypts the private key. |
name |
Required. Certificate name. Applicable only for SQL Server instances. |
ExportContext
| JSON representation |
|---|
{ "uri": string, "databases": [ string ], "kind": string, "sqlExportOptions": { object ( |
| Fields | |
|---|---|
uri |
The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form |
databases[] |
Databases to be exported. |
kind |
This is always |
sqlExportOptions |
Options for exporting data as SQL statements. |
csvExportOptions |
Options for exporting data as CSV. |
fileType |
The file type for the specified uri. |
offload |
Whether to perform a serverless export. |
bakExportOptions |
Options for exporting data as BAK files. |
tdeExportOptions |
Optional. Export parameters specific to SQL Server TDE certificates |
SqlExportOptions
| JSON representation |
|---|
{ "tables": [ string ], "schemaOnly": boolean, "mysqlExportOptions": { object ( |
| Fields | |
|---|---|
tables[] |
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. |
schemaOnly |
Export only schemas. |
mysqlExportOptions |
|
threads |
Optional. The number of threads to use for parallel export. |
parallel |
Optional. Whether or not the export should be parallel. |
postgresExportOptions |
Optional. Options for exporting from a Cloud SQL for PostgreSQL instance. |
MysqlExportOptions
| JSON representation |
|---|
{ "masterData": integer } |
| Fields | |
|---|---|
masterData |
Option to include SQL statement required to set up replication. If set to |
PostgresExportOptions
| JSON representation |
|---|
{ "clean": boolean, "ifExists": boolean } |
| Fields | |
|---|---|
clean |
Optional. Use this option to include DROP |
ifExists |
Optional. Option to include an IF EXISTS SQL statement with each DROP statement produced by clean. |
SqlCsvExportOptions
| JSON representation |
|---|
{ "selectQuery": string, "escapeCharacter": string, "quoteCharacter": string, "fieldsTerminatedBy": string, "linesTerminatedBy": string } |
| Fields | |
|---|---|
selectQuery |
The select query used to extract the data. |
escapeCharacter |
Specifies the character that should appear before a data character that needs to be escaped. |
quoteCharacter |
Specifies the quoting character to be used when a data value is quoted. |
fieldsTerminatedBy |
Specifies the character that separates columns within each row (line) of the file. |
linesTerminatedBy |
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. |
SqlBakExportOptions
| JSON representation |
|---|
{
"striped": boolean,
"stripeCount": integer,
"bakType": enum ( |
| Fields | |
|---|---|
striped |
Whether or not the export should be striped. |
stripeCount |
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. |
bakType |
Type of this bak file will be export, FULL or DIFF, SQL Server only |
copyOnly |
Deprecated: copy_only is deprecated. Use differential_base instead |
differentialBase |
Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base |
exportLogStartTime |
Optional. The begin timestamp when transaction log will be included in the export operation. RFC 3339 format (for example, Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
exportLogEndTime |
Optional. The end timestamp when transaction log will be included in the export operation. RFC 3339 format (for example, Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
SqlTdeExportOptions
| JSON representation |
|---|
{ "certificatePath": string, "privateKeyPath": string, "privateKeyPassword": string, "name": string } |
| Fields | |
|---|---|
certificatePath |
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. |
privateKeyPath |
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. |
privateKeyPassword |
Required. Password that encrypts the private key. |
name |
Required. Certificate name. Applicable only for SQL Server instances. |
BackupContext
| JSON representation |
|---|
{ "backupId": string, "kind": string, "name": string } |
| Fields | |
|---|---|
backupId |
The identifier of the backup. |
kind |
This is always |
name |
The name of the backup. Format: projects/{project}/backups/{backup} |
PreCheckMajorVersionUpgradeContext
| JSON representation |
|---|
{ "targetDatabaseVersion": enum ( |
| Fields | |
|---|---|
targetDatabaseVersion |
Required. The target database version to upgrade to. |
preCheckResponse[] |
Output only. The responses from the precheck operation. |
kind |
Optional. This is always |
Union field
|
|
maxRuntime |
Optional. The maximum allowed runtime for the precheck operation. A duration in seconds with up to nine fractional digits, ending with ' |
PreCheckResponse
| JSON representation |
|---|
{ "actionsRequired": [ string ], // Union field |
| Fields | |
|---|---|
actionsRequired[] |
The actions that the user needs to take. Use repeated for multiple actions. |
Union field
|
|
message |
The message to be displayed to the user. |
Union field
|
|
messageType |
The type of message whether it is an info, warning, or error. |
Duration
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years |
nanos |
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 |
StartWorkloadCaptureContext
| JSON representation |
|---|
{ "enableLiveReplay": boolean, // Union field |
| Fields | |
|---|---|
enableLiveReplay |
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 |
Union field
|
|
replayInstance |
Optional. Required if |
StopWorkloadCaptureContext
| JSON representation |
|---|
{ "abortLiveReplay": boolean } |
| Fields | |
|---|---|
abortLiveReplay |
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. |
StartWorkloadReplayContext
| JSON representation |
|---|
{ "replayInstance": string, "workloadId": string } |
| Fields | |
|---|---|
replayInstance |
Required. The name of the Cloud SQL instance where the captured workload (SQL queries) is being executed, excluding the project ID (for example, |
workloadId |
Output only. The ID of the workload to start executing on the replay instance. Each workload capture generates a unique ID in the format |
AcquireSsrsLeaseContext
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field
|
|
setupLogin |
The username to be used as the setup login to connect to the database server for SSRS setup. |
Union field
|
|
serviceLogin |
The username to be used as the service login to connect to the report database for SSRS setup. |
Union field
|
|
reportDatabase |
The report database to be used for SSRS setup. |
Union field
|
|
duration |
Lease duration needed for SSRS setup. A duration in seconds with up to nine fractional digits, ending with ' |
SqlSubOperationType
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field sub_operation_details. Sub operation details corresponding to the operation type. sub_operation_details can be only one of the following: |
|
maintenanceType |
The type of maintenance to be performed on the instance. |
SqlOperationStatus
The status of an operation.
| Enums | |
|---|---|
SQL_OPERATION_STATUS_UNSPECIFIED |
The state of the operation is unknown. |
PENDING |
The operation has been queued, but has not started yet. |
RUNNING |
The operation is running. |
DONE |
The operation completed. |
SqlApiWarningCode
| Enums | |
|---|---|
SQL_API_WARNING_CODE_UNSPECIFIED |
An unknown or unset warning type from Cloud SQL API. |
REGION_UNREACHABLE |
Warning when one or more regions are not reachable. The returned result set may be incomplete. |
MAX_RESULTS_EXCEEDS_LIMIT |
Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete. |
COMPROMISED_CREDENTIALS |
Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach. |
INTERNAL_STATE_FAILURE |
Warning when the operation succeeds but some non-critical workflow state failed. |
SqlOperationType
The type of Cloud SQL operation.
| Enums | |
|---|---|
SQL_OPERATION_TYPE_UNSPECIFIED |
Unknown operation type. |
IMPORT |
Imports data into a Cloud SQL instance. |
EXPORT |
Exports data from a Cloud SQL instance to a Cloud Storage bucket. |
CREATE |
Creates a new Cloud SQL instance. |
UPDATE |
Updates the settings of a Cloud SQL instance. |
DELETE |
Deletes a Cloud SQL instance. |
RESTART |
Restarts the Cloud SQL instance. |
BACKUP |
|
SNAPSHOT |
|
BACKUP_VOLUME |
Performs instance backup. |
DELETE_VOLUME |
Deletes an instance backup. |
RESTORE_VOLUME |
Restores an instance backup. |
INJECT_USER |
Injects a privileged user in mysql for MOB instances. |
CLONE |
Clones a Cloud SQL instance. |
STOP_REPLICA |
Stops replication on a Cloud SQL read replica instance. |
START_REPLICA |
Starts replication on a Cloud SQL read replica instance. |
PROMOTE_REPLICA |
Promotes a Cloud SQL replica instance. |
CREATE_REPLICA |
Creates a Cloud SQL replica instance. |
CREATE_USER |
Creates a new user in a Cloud SQL instance. |
DELETE_USER |
Deletes a user from a Cloud SQL instance. |
UPDATE_USER |
Updates an existing user in a Cloud SQL instance. If a user with the specified username doesn't exist, a new user is created. |
CREATE_DATABASE |
Creates a database in the Cloud SQL instance. |
DELETE_DATABASE |
Deletes a database in the Cloud SQL instance. |
UPDATE_DATABASE |
Updates a database in the Cloud SQL instance. |
FAILOVER |
Performs failover of an HA-enabled Cloud SQL failover replica. |
DELETE_BACKUP |
Deletes the backup taken by a backup run. |
RECREATE_REPLICA |
|
TRUNCATE_LOG |
Truncates a general or slow log table in MySQL. |
DEMOTE_MASTER |
Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server. |
MAINTENANCE |
Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes. |
ENABLE_PRIVATE_IP |
This field is deprecated, and will be removed in future version of API. |
DEFER_MAINTENANCE |
|
CREATE_CLONE |
Creates clone instance. |
RESCHEDULE_MAINTENANCE |
Reschedule maintenance to another time. |
START_EXTERNAL_SYNC |
Starts external sync of a Cloud SQL EM replica to an external primary instance. |
LOG_CLEANUP |
Recovers logs from an instance's old data disk. |
AUTO_RESTART |
Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery. |
REENCRYPT |
Re-encrypts CMEK instances with latest key version. |
SWITCHOVER |
Switches the roles of the primary and replica pair. The target instance should be the replica. |
UPDATE_BACKUP |
Update a backup. |
ACQUIRE_SSRS_LEASE |
Acquire a lease for the setup of SQL Server Reporting Services (SSRS). |
RELEASE_SSRS_LEASE |
Release a lease for the setup of SQL Server Reporting Services (SSRS). |
RECONFIGURE_OLD_PRIMARY |
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. |
CLUSTER_MAINTENANCE |
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. |
SELF_SERVICE_MAINTENANCE |
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. |
SWITCHOVER_TO_REPLICA |
Switches a primary instance to a replica. This operation runs as part of a switchover operation to the original primary instance. |
MAJOR_VERSION_UPGRADE |
Updates the major version of a Cloud SQL instance. |
ADVANCED_BACKUP |
Deprecated: ADVANCED_BACKUP is deprecated. Use ENHANCED_BACKUP instead. |
MANAGE_BACKUP |
Changes the BackupTier of a Cloud SQL instance. |
ENHANCED_BACKUP |
Creates a backup for an Enhanced BackupTier Cloud SQL instance. |
REPAIR_READ_POOL |
Repairs entire read pool or specified read pool nodes in the read pool. |
CREATE_READ_POOL |
Creates a Cloud SQL read pool instance. |
PRE_CHECK_MAJOR_VERSION_UPGRADE |
Pre-checks the major version upgrade operation. |
SETUP_MIGRATION |
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. |
CREATE_BLUE_GREEN_DEPLOYMENT |
Creates a new Blue-Green deployment. |
SWITCHOVER_BLUE_GREEN_DEPLOYMENT |
Switches over a Blue-Green deployment. |
DELETE_BLUE_GREEN_DEPLOYMENT |
Deletes a Blue-Green deployment. |
SqlFileType
| Enums | |
|---|---|
SQL_FILE_TYPE_UNSPECIFIED |
Unknown file type. |
SQL |
File containing SQL statements. |
CSV |
File in CSV format. |
BAK |
|
TDE |
TDE certificate. |
BakType
| Enums | |
|---|---|
BAK_TYPE_UNSPECIFIED |
Default type. |
FULL |
Full backup. |
DIFF |
Differential backup. |
TLOG |
Transaction Log backup |
SqlDatabaseVersion
The database engine type and version.
| Enums | |
|---|---|
SQL_DATABASE_VERSION_UNSPECIFIED |
This is an unknown database version. |
MYSQL_5_1 |
The database version is MySQL 5.1. |
MYSQL_5_5 |
The database version is MySQL 5.5. |
MYSQL_5_6 |
The database version is MySQL 5.6. |
MYSQL_5_7 |
The database version is MySQL 5.7. |
MYSQL_8_0 |
The database version is MySQL 8. |
MYSQL_8_0_18 |
The database major version is MySQL 8.0 and the minor version is 18. |
MYSQL_8_0_26 |
The database major version is MySQL 8.0 and the minor version is 26. |
MYSQL_8_0_27 |
The database major version is MySQL 8.0 and the minor version is 27. |
MYSQL_8_0_28 |
The database major version is MySQL 8.0 and the minor version is 28. |
MYSQL_8_0_29 |
The database major version is MySQL 8.0 and the minor version is 29. |
MYSQL_8_0_30 |
The database major version is MySQL 8.0 and the minor version is 30. |
MYSQL_8_0_31 |
The database major version is MySQL 8.0 and the minor version is 31. |
MYSQL_8_0_32 |
The database major version is MySQL 8.0 and the minor version is 32. |
MYSQL_8_0_33 |
The database major version is MySQL 8.0 and the minor version is 33. |
MYSQL_8_0_34 |
The database major version is MySQL 8.0 and the minor version is 34. |
MYSQL_8_0_35 |
The database major version is MySQL 8.0 and the minor version is 35. |
MYSQL_8_0_36 |
The database major version is MySQL 8.0 and the minor version is 36. |
MYSQL_8_0_37 |
The database major version is MySQL 8.0 and the minor version is 37. |
MYSQL_8_0_39 |
The database major version is MySQL 8.0 and the minor version is 39. |
MYSQL_8_0_40 |
The database major version is MySQL 8.0 and the minor version is 40. |
MYSQL_8_0_41 |
The database major version is MySQL 8.0 and the minor version is 41. |
MYSQL_8_0_42 |
The database major version is MySQL 8.0 and the minor version is 42. |
MYSQL_8_0_43 |
The database major version is MySQL 8.0 and the minor version is 43. |
MYSQL_8_0_44 |
The database major version is MySQL 8.0 and the minor version is 44. |
MYSQL_8_0_45 |
The database major version is MySQL 8.0 and the minor version is 45. |
MYSQL_8_0_46 |
The database major version is MySQL 8.0 and the minor version is 46. |
MYSQL_8_4 |
The database version is MySQL 8.4. |
MYSQL_9_7 |
The database version is MySQL 9.7. |
SQLSERVER_2017_STANDARD |
The database version is SQL Server 2017 Standard. |
SQLSERVER_2017_ENTERPRISE |
The database version is SQL Server 2017 Enterprise. |
SQLSERVER_2017_EXPRESS |
The database version is SQL Server 2017 Express. |
SQLSERVER_2017_WEB |
The database version is SQL Server 2017 Web. |
POSTGRES_9_6 |
The database version is PostgreSQL 9.6. |
POSTGRES_10 |
The database version is PostgreSQL 10. |
POSTGRES_11 |
The database version is PostgreSQL 11. |
POSTGRES_12 |
The database version is PostgreSQL 12. |
POSTGRES_13 |
The database version is PostgreSQL 13. |
POSTGRES_14 |
The database version is PostgreSQL 14. |
POSTGRES_15 |
The database version is PostgreSQL 15. |
POSTGRES_16 |
The database version is PostgreSQL 16. |
POSTGRES_17 |
The database version is PostgreSQL 17. |
POSTGRES_18 |
The database version is PostgreSQL 18. |
POSTGRES_19 |
The database version is PostgreSQL 19. |
POSTGRES_20 |
The database version is PostgreSQL 20. |
SQLSERVER_2019_STANDARD |
The database version is SQL Server 2019 Standard. |
SQLSERVER_2019_ENTERPRISE |
The database version is SQL Server 2019 Enterprise. |
SQLSERVER_2019_EXPRESS |
The database version is SQL Server 2019 Express. |
SQLSERVER_2019_WEB |
The database version is SQL Server 2019 Web. |
SQLSERVER_2022_STANDARD |
The database version is SQL Server 2022 Standard. |
SQLSERVER_2022_ENTERPRISE |
The database version is SQL Server 2022 Enterprise. |
SQLSERVER_2022_EXPRESS |
The database version is SQL Server 2022 Express. |
SQLSERVER_2022_WEB |
The database version is SQL Server 2022 Web. |
SQLSERVER_2025_STANDARD |
The database version is SQL Server 2025 Standard. |
SQLSERVER_2025_ENTERPRISE |
The database version is SQL Server 2025 Enterprise. |
SQLSERVER_2025_EXPRESS |
The database version is SQL Server 2025 Express. |
MessageType
The type of message which can be an info, a warning, or an error that requires user intervention.
| Enums | |
|---|---|
MESSAGE_TYPE_UNSPECIFIED |
Default unspecified value to prevent unintended behavior changes. |
INFO |
General informational messages that don't require action. |
WARNING |
Warnings that might impact the upgrade but don't block it. |
ERROR |
Errors that a user must resolve before proceeding with the upgrade. |
SqlMaintenanceType
The type of maintenance to be performed on the instance.
| Enums | |
|---|---|
SQL_MAINTENANCE_TYPE_UNSPECIFIED |
Maintenance type is unspecified. |
INSTANCE_MAINTENANCE |
Indicates that a standalone instance is undergoing maintenance. The instance can be either a primary instance or a replica. |
REPLICA_INCLUDED_MAINTENANCE |
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. |
INSTANCE_SELF_SERVICE_MAINTENANCE |
Indicates that the standalone instance is undergoing maintenance, initiated by self-service. The instance can be either a primary instance or a replica. |
REPLICA_INCLUDED_SELF_SERVICE_MAINTENANCE |
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. |
Tool Annotations
Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.
Along with the title string, the following boolean hints are defined as follows:
readOnlyHint: If true, the tool doesn't modify its environment. Default: false.destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌