// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package google.cloud.sql.v1; import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/cloud/sql/v1/cloud_sql_resources.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; import "google/api/client.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/sql/v1;sql"; option java_multiple_files = true; option java_outer_classname = "CloudSqlServiceProto"; option java_package = "com.google.cloud.sql.v1"; // LINT: LEGACY_NAMES // Service to manage Cloud SQL instances. service SqlInstancesService { option (google.api.default_host) = "sqladmin.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform," "https://www.googleapis.com/auth/sqlservice.admin"; // Adds a new trusted Certificate Authority (CA) version for the specified // instance. Required to prepare for a certificate rotation. If a CA version // was previously added but never used in a certificate rotation, this // operation replaces that version. There cannot be more than one CA version // waiting to be rotated in. rpc AddServerCa(SqlInstancesAddServerCaRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/addServerCa" }; } // Creates a Cloud SQL instance as a clone of the source instance. Using this // operation might cause your instance to restart. rpc Clone(SqlInstancesCloneRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/clone" body: "body" }; } // Deletes a Cloud SQL instance. rpc Delete(SqlInstancesDeleteRequest) returns (Operation) { option (google.api.http) = { delete: "/v1/projects/{project}/instances/{instance}" }; } // Demotes the stand-alone instance to be a Cloud SQL read replica for an // external database server. rpc DemoteMaster(SqlInstancesDemoteMasterRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/demoteMaster" body: "body" }; } // Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL // dump or CSV file. rpc Export(SqlInstancesExportRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/export" body: "body" }; } // Initiates a manual failover of a high availability (HA) primary instance // to a standby instance, which becomes the primary instance. Users are // then rerouted to the new primary. For more information, see the // [Overview of high // availability](https://cloud.google.com/sql/docs/mysql/high-availability) // page in the Cloud SQL documentation. // If using Legacy HA (MySQL only), this causes the instance to failover to // its failover replica instance. rpc Failover(SqlInstancesFailoverRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/failover" body: "body" }; } // Retrieves a resource containing information about a Cloud SQL instance. rpc Get(SqlInstancesGetRequest) returns (DatabaseInstance) { option (google.api.http) = { get: "/v1/projects/{project}/instances/{instance}" }; } // Imports data into a Cloud SQL instance from a SQL dump or CSV file in // Cloud Storage. rpc Import(SqlInstancesImportRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/import" body: "body" }; } // Creates a new Cloud SQL instance. rpc Insert(SqlInstancesInsertRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances" body: "body" }; } // Lists instances under a given project. rpc List(SqlInstancesListRequest) returns (InstancesListResponse) { option (google.api.http) = { get: "/v1/projects/{project}/instances" }; } // Lists all of the trusted Certificate Authorities (CAs) for the specified // instance. There can be up to three CAs listed: the CA that was used to sign // the certificate that is currently in use, a CA that has been added but not // yet used to sign a certificate, and a CA used to sign a certificate that // has previously rotated out. rpc ListServerCas(SqlInstancesListServerCasRequest) returns (InstancesListServerCasResponse) { option (google.api.http) = { get: "/v1/projects/{project}/instances/{instance}/listServerCas" }; } // Updates settings of a Cloud SQL instance. // This method supports patch semantics. rpc Patch(SqlInstancesPatchRequest) returns (Operation) { option (google.api.http) = { patch: "/v1/projects/{project}/instances/{instance}" body: "body" }; } // Promotes the read replica instance to be a stand-alone Cloud SQL instance. // Using this operation might cause your instance to restart. rpc PromoteReplica(SqlInstancesPromoteReplicaRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/promoteReplica" }; } // Deletes all client certificates and generates a new server SSL certificate // for the instance. rpc ResetSslConfig(SqlInstancesResetSslConfigRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/resetSslConfig" }; } // Restarts a Cloud SQL instance. rpc Restart(SqlInstancesRestartRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/restart" }; } // Restores a backup of a Cloud SQL instance. Using this operation might cause // your instance to restart. rpc RestoreBackup(SqlInstancesRestoreBackupRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/restoreBackup" body: "body" }; } // Rotates the server certificate to one signed by the Certificate Authority // (CA) version previously added with the addServerCA method. rpc RotateServerCa(SqlInstancesRotateServerCaRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/rotateServerCa" body: "body" }; } // Starts the replication in the read replica instance. rpc StartReplica(SqlInstancesStartReplicaRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/startReplica" }; } // Stops the replication in the read replica instance. rpc StopReplica(SqlInstancesStopReplicaRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/stopReplica" }; } // Truncate MySQL general and slow query log tables // MySQL only. rpc TruncateLog(SqlInstancesTruncateLogRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/truncateLog" body: "body" }; } // Updates settings of a Cloud SQL instance. Using this operation might cause // your instance to restart. rpc Update(SqlInstancesUpdateRequest) returns (Operation) { option (google.api.http) = { put: "/v1/projects/{project}/instances/{instance}" body: "body" }; } // Generates a short-lived X509 certificate containing the provided public key // and signed by a private key specific to the target instance. Users may use // the certificate to authenticate as themselves when connecting to the // database. rpc CreateEphemeral(SqlInstancesCreateEphemeralCertRequest) returns (SslCert) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/createEphemeral" body: "body" }; } // Reschedules the maintenance on the given instance. rpc RescheduleMaintenance(SqlInstancesRescheduleMaintenanceRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/rescheduleMaintenance" body: "body" }; } // Verify External primary instance external sync settings. rpc VerifyExternalSyncSettings(SqlInstancesVerifyExternalSyncSettingsRequest) returns (SqlInstancesVerifyExternalSyncSettingsResponse) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings" body: "*" }; } // Start External primary instance migration. rpc StartExternalSync(SqlInstancesStartExternalSyncRequest) returns (Operation) { option (google.api.http) = { post: "/v1/projects/{project}/instances/{instance}/startExternalSync" body: "*" }; } } // Instance add server CA request. message SqlInstancesAddServerCaRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; } // Instance clone request. message SqlInstancesCloneRequest { // The ID of the Cloud SQL instance to be cloned (source). This does not // include the project ID. string instance = 1; // Project ID of the source as well as the clone Cloud SQL instance. string project = 2; InstancesCloneRequest body = 100; } // Instance delete request. message SqlInstancesDeleteRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance to be deleted. string project = 2; } // Instance demote master request. message SqlInstancesDemoteMasterRequest { // Cloud SQL instance name. string instance = 1; // ID of the project that contains the instance. string project = 2; InstancesDemoteMasterRequest body = 100; } // Instance export request. message SqlInstancesExportRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance to be exported. string project = 2; InstancesExportRequest body = 100; } // Instance failover request. message SqlInstancesFailoverRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // ID of the project that contains the read replica. string project = 2; InstancesFailoverRequest body = 100; } // Instance get request. message SqlInstancesGetRequest { // Database instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; } // Instance import request. message SqlInstancesImportRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; InstancesImportRequest body = 100; } // Instance insert request. message SqlInstancesInsertRequest { // Project ID of the project to which the newly created Cloud SQL instances // should belong. string project = 1; DatabaseInstance body = 100; } // Instance list request. message SqlInstancesListRequest { // 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. string filter = 1; // The maximum number of results to return per response. uint32 max_results = 2; // A previously-returned page token representing part of the larger set of // results to view. string page_token = 3; // Project ID of the project for which to list Cloud SQL instances. string project = 4; } // Instance list server CAs request. message SqlInstancesListServerCasRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; } // Instance patch request. message SqlInstancesPatchRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; DatabaseInstance body = 100; } // Instance promote replica request. message SqlInstancesPromoteReplicaRequest { // Cloud SQL read replica instance name. string instance = 1; // ID of the project that contains the read replica. string project = 2; } // Instance reset SSL config request. message SqlInstancesResetSslConfigRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; } // Instance restart request. message SqlInstancesRestartRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance to be restarted. string project = 2; } // Instance restore backup request. message SqlInstancesRestoreBackupRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; InstancesRestoreBackupRequest body = 100; } // Instance rotate server CA request. message SqlInstancesRotateServerCaRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; InstancesRotateServerCaRequest body = 100; } // Instance start replica request. message SqlInstancesStartReplicaRequest { // Cloud SQL read replica instance name. string instance = 1; // ID of the project that contains the read replica. string project = 2; } // Instance stop replica request. message SqlInstancesStopReplicaRequest { // Cloud SQL read replica instance name. string instance = 1; // ID of the project that contains the read replica. string project = 2; } // Instance truncate log request. message SqlInstancesTruncateLogRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the Cloud SQL project. string project = 2; InstancesTruncateLogRequest body = 100; } // Instance update request. message SqlInstancesUpdateRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; DatabaseInstance body = 100; } // Instance reschedule maintenance request. message SqlInstancesRescheduleMaintenanceRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // ID of the project that contains the instance. string project = 2; SqlInstancesRescheduleMaintenanceRequestBody body = 100; } // Instance verify external sync settings request. message SqlInstancesVerifyExternalSyncSettingsRequest { enum ExternalSyncMode { // Unknown external sync mode, will be defaulted to ONLINE mode EXTERNAL_SYNC_MODE_UNSPECIFIED = 0; // Online external sync will set up replication after initial data external // sync ONLINE = 1; // Offline external sync only dumps and loads a one-time snapshot of // the primary instance's data OFFLINE = 2; } // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the project that contains the instance. string project = 2; // Flag to enable verifying connection only bool verify_connection_only = 3; // External sync mode ExternalSyncMode sync_mode = 4; // Optional. Flag to verify settings required by replication setup only bool verify_replication_only = 5 [(google.api.field_behavior) = OPTIONAL]; oneof sync_config { // Optional. MySQL-specific settings for start external sync. MySqlSyncConfig mysql_sync_config = 6 [(google.api.field_behavior) = OPTIONAL]; } } // Instance start external sync request. message SqlInstancesStartExternalSyncRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // ID of the project that contains the instance. string project = 2; // External sync mode. SqlInstancesVerifyExternalSyncSettingsRequest.ExternalSyncMode sync_mode = 3; // Whether to skip the verification step (VESS). bool skip_verification = 4; oneof sync_config { // MySQL-specific settings for start external sync. MySqlSyncConfig mysql_sync_config = 6; } } // Instance create ephemeral certificate request. message SqlInstancesCreateEphemeralCertRequest { // Cloud SQL instance ID. This does not include the project ID. string instance = 1; // Project ID of the Cloud SQL project. string project = 2; SslCertsCreateEphemeralRequest body = 100; } // Database instance clone request. message InstancesCloneRequest { // Contains details about the clone operation. CloneContext clone_context = 1; } // Database demote primary instance request. message InstancesDemoteMasterRequest { // Contains details about the demoteMaster operation. DemoteMasterContext demote_master_context = 1; } // Database instance export request. message InstancesExportRequest { // Contains details about the export operation. ExportContext export_context = 1; } // Instance failover request. message InstancesFailoverRequest { // Failover Context. FailoverContext failover_context = 1; } // SslCerts create ephemeral certificate request. message SslCertsCreateEphemeralRequest { // PEM encoded public key to include in the signed certificate. string public_key = 1; // Access token to include in the signed certificate. string access_token = 2; } // Database instance import request. message InstancesImportRequest { // Contains details about the import operation. ImportContext import_context = 1; } // Database instances list response. message InstancesListResponse { // This is always **sql#instancesList**. string kind = 1; // List of warnings that occurred while handling the request. repeated ApiWarning warnings = 2; // List of database instance resources. repeated DatabaseInstance items = 3; // The continuation token, used to page through large result sets. Provide // this value in a subsequent request to return the next page of results. string next_page_token = 4; } // Instances ListServerCas response. message InstancesListServerCasResponse { // List of server CA certificates for the instance. repeated SslCert certs = 1; string active_version = 2; // This is always **sql#instancesListServerCas**. string kind = 3; } // Database instance restore backup request. message InstancesRestoreBackupRequest { // Parameters required to perform the restore backup operation. RestoreBackupContext restore_backup_context = 1; } // Rotate server CA request. message InstancesRotateServerCaRequest { // Contains details about the rotate server CA operation. RotateServerCaContext rotate_server_ca_context = 1; } // Instance truncate log request. message InstancesTruncateLogRequest { // Contains details about the truncate log operation. TruncateLogContext truncate_log_context = 1; } // Instance verify external sync settings response. message SqlInstancesVerifyExternalSyncSettingsResponse { // This is always **sql#migrationSettingErrorList**. string kind = 1; // List of migration violations. repeated SqlExternalSyncSettingError errors = 2; // List of migration warnings. repeated SqlExternalSyncSettingError warnings = 3; } // Database instance clone context. message CloneContext { // This is always **sql#cloneContext**. string kind = 1; // Reserved for future use. int64 pitr_timestamp_ms = 2; // Name of the Cloud SQL instance to be created as a clone. string destination_instance_name = 3; // 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. BinLogCoordinates bin_log_coordinates = 4; // Timestamp, if specified, identifies the time to which the source instance // is cloned. google.protobuf.Timestamp point_in_time = 5; } // Binary log coordinates. message BinLogCoordinates { // Name of the binary log file for a Cloud SQL instance. string bin_log_file_name = 1; // Position (offset) within the binary log file. int64 bin_log_position = 2; // This is always **sql#binLogCoordinates**. string kind = 3; } // A Cloud SQL instance resource. message DatabaseInstance { message SqlFailoverReplica { // 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. string name = 1; // 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. google.protobuf.BoolValue available = 2; } // Any scheduled maintenance for this instance. message SqlScheduledMaintenance { // The start time of any upcoming scheduled maintenance for this instance. google.protobuf.Timestamp start_time = 1; bool can_defer = 2 [deprecated = true]; // If the scheduled maintenance can be rescheduled. bool can_reschedule = 3; // Maintenance cannot be rescheduled to start beyond this deadline. optional google.protobuf.Timestamp schedule_deadline_time = 4; } // This message wraps up the information written by out-of-disk detection job. message SqlOutOfDiskReport { // This enum lists all possible states regarding out-of-disk issues. enum SqlOutOfDiskState { // Unspecified state SQL_OUT_OF_DISK_STATE_UNSPECIFIED = 0; // The instance has plenty space on data disk NORMAL = 1; // Data disk is almost used up. It is shutdown to prevent data // corruption. SOFT_SHUTDOWN = 2; } // 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 optional SqlOutOfDiskState sql_out_of_disk_state = 1; // The minimum recommended increase size in GigaBytes // This field is consumed by the frontend // * Writers: // * the proactive database wellness job for OOD. // * Readers: optional int32 sql_min_recommended_increase_size_gb = 2; } // The current serving state of the database instance. enum SqlInstanceState { // The state of the instance is unknown. SQL_INSTANCE_STATE_UNSPECIFIED = 0; // The instance is running, or has been stopped by owner. RUNNABLE = 1; // The instance is not available, for example due to problems with billing. SUSPENDED = 2; // The instance is being deleted. PENDING_DELETE = 3; // The instance is being created. PENDING_CREATE = 4; // The instance is down for maintenance. MAINTENANCE = 5; // The creation of the instance failed or a fatal error occurred during // maintenance. FAILED = 6; // The instance is under maintenance operations and the database is // available. ONLINE_MAINTENANCE = 7; } // This is always **sql#instance**. string kind = 1; // The current serving state of the Cloud SQL instance. This can be one of the // following: // * **SQL_INSTANCE_STATE_UNSPECIFIED**: The state of the instance is // unknown. // * **RUNNABLE**: The instance is running, or has been stopped by owner. // * **SUSPENDED**: The instance is not available, for example due to // problems with billing. // * **PENDING_DELETE**: The instance is being deleted. // * **PENDING_CREATE**: The instance is being created. // * **MAINTENANCE**: The instance is down for maintenance. // * **FAILED**: The instance creation failed. SqlInstanceState state = 2; // The database engine type and version. The **databaseVersion** field cannot // be changed after instance creation. // * **MySQL instances**: MYSQL_8_0, MYSQL_5_7 (default), or MYSQL_5_6. // * **PostgreSQL instances**: POSTGRES_9_6, POSTGRES_10, POSTGRES_11, // POSTGRES_12, POSTGRES_13 (default). // * **SQL Server instances**: SQLSERVER_2019_STANDARD, // SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, or SQLSERVER_2019_WEB, // SQLSERVER_2017_STANDARD (default), SQLSERVER_2017_ENTERPRISE, // SQLSERVER_2017_EXPRESS, or SQLSERVER_2017_WEB. SqlDatabaseVersion database_version = 3; // The user settings. Settings settings = 4; // This field is deprecated and will be removed from a future version of the // API. Use the **settings.settingsVersion** field instead. string etag = 5; // The name and status of the failover replica. SqlFailoverReplica failover_replica = 6; // The name of the instance which will act as primary in the replication // setup. string master_instance_name = 7; // The replicas of the instance. repeated string replica_names = 8; // The maximum disk size of the instance in bytes. google.protobuf.Int64Value max_disk_size = 9 [deprecated = true]; // 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. google.protobuf.Int64Value current_disk_size = 10 [deprecated = true]; // The assigned IP addresses for the instance. repeated IpMapping ip_addresses = 11; // SSL configuration. SslCert server_ca_cert = 12; // The instance type. This can be one of the following: // * **CLOUD_SQL_INSTANCE**: A Cloud SQL instance that is not replicating // from a primary instance. // * **ON_PREMISES_INSTANCE**: An instance running on the customer's // premises. // * **READ_REPLICA_INSTANCE**: A Cloud SQL instance configured as a // read-replica. SqlInstanceType instance_type = 13; // The project ID of the project containing the Cloud SQL instance. The Google // apps domain is prefixed if applicable. string project = 14; // The IPv6 address assigned to the instance. // (Deprecated) This property was applicable only // to First Generation instances. string ipv6_address = 15 [deprecated = true]; // The service account email address assigned to the instance.
This // property is read-only. string service_account_email_address = 16; // Configuration specific to on-premises instances. OnPremisesConfiguration on_premises_configuration = 17; // Configuration specific to failover replicas and read replicas. ReplicaConfiguration replica_configuration = 18; // 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. SqlBackendType backend_type = 19; // The URI of this resource. string self_link = 20; // If the instance state is SUSPENDED, the reason for the suspension. repeated SqlSuspensionReason suspension_reason = 21; // Connection name of the Cloud SQL instance used in connection strings. string connection_name = 22; // Name of the Cloud SQL instance. This does not include the project ID. string name = 23; // The geographical region. Can be: // * **us-central** (**FIRST_GEN** instances only) // * **us-central1** (**SECOND_GEN** instances only) // * **asia-east1** or **europe-west1**. // // Defaults to **us-central** or **us-central1** depending on the instance // type. The region cannot be changed after instance creation. string region = 24; // 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. string gce_zone = 25; // 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. // Reserved for future use. string secondary_gce_zone = 34; // Disk encryption configuration specific to an instance. DiskEncryptionConfiguration disk_encryption_configuration = 26; // Disk encryption status specific to an instance. DiskEncryptionStatus disk_encryption_status = 27; // Initial root password. Use only on creation. string root_password = 29; // The start time of any upcoming scheduled maintenance for this instance. SqlScheduledMaintenance scheduled_maintenance = 30; // The status indicating if instance satisfiesPzs. // Reserved for future use. google.protobuf.BoolValue satisfies_pzs = 35; // 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 optional SqlOutOfDiskReport out_of_disk_report = 38; // 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**. google.protobuf.Timestamp create_time = 39 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Reschedule options for maintenance windows. message SqlInstancesRescheduleMaintenanceRequestBody { message Reschedule { // Required. The type of the reschedule. RescheduleType reschedule_type = 1; // Optional. Timestamp when the maintenance shall be rescheduled to if // reschedule_type=SPECIFIC_TIME, in // [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example // **2012-11-15T16:19:00.094Z**. google.protobuf.Timestamp schedule_time = 2 [(google.api.field_behavior) = OPTIONAL]; } enum RescheduleType { RESCHEDULE_TYPE_UNSPECIFIED = 0; // Reschedules maintenance to happen now (within 5 minutes). IMMEDIATE = 1; // Reschedules maintenance to occur within one week from the originally // scheduled day and time. NEXT_AVAILABLE_WINDOW = 2; // Reschedules maintenance to a specific time and day. SPECIFIC_TIME = 3; } // Required. The type of the reschedule the user wants. Reschedule reschedule = 3; } // Database instance demote primary instance context. message DemoteMasterContext { // This is always **sql#demoteMasterContext**. string kind = 1; // Verify GTID consistency for demote operation. Default value: // **True**. Setting this flag to false enables you to bypass GTID consistency // check between on-premises primary instance and Cloud SQL instance during // the demotion operation but also exposes you to the risk of future // replication failures. Change the value only if you know the reason for the // GTID divergence and are confident that doing so will not cause any // replication issues. google.protobuf.BoolValue verify_gtid_consistency = 2; // The name of the instance which will act as on-premises primary instance // in the replication setup. string master_instance_name = 3; // Configuration specific to read-replicas replicating from the on-premises // primary instance. DemoteMasterConfiguration replica_configuration = 4; // Flag to skip replication setup on the instance. bool skip_replication_setup = 5; } // Database instance failover context. message FailoverContext { // The current settings version of this instance. Request will be rejected if // this version doesn't match the current settings version. int64 settings_version = 1; // This is always **sql#failoverContext**. string kind = 2; } // Database instance restore from backup context. // Backup context contains source instance id and project id. message RestoreBackupContext { // This is always **sql#restoreBackupContext**. string kind = 1; // The ID of the backup run to restore from. int64 backup_run_id = 2; // The ID of the instance that the backup was taken from. string instance_id = 3; // The full project ID of the source instance. string project = 4; } // Instance rotate server CA context. message RotateServerCaContext { // This is always **sql#rotateServerCaContext**. string kind = 1; // The fingerprint of the next version to be rotated to. If left unspecified, // will be rotated to the most recently added server CA version. string next_version = 2; } // Database Instance truncate log context. message TruncateLogContext { // This is always **sql#truncateLogContext**. string kind = 1; // The type of log to truncate. Valid values are **MYSQL_GENERAL_TABLE** and // **MYSQL_SLOW_TABLE**. string log_type = 2; } // External primary instance migration setting error/warning. message SqlExternalSyncSettingError { enum SqlExternalSyncSettingErrorType { SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED = 0; CONNECTION_FAILURE = 1; BINLOG_NOT_ENABLED = 2; INCOMPATIBLE_DATABASE_VERSION = 3; REPLICA_ALREADY_SETUP = 4; INSUFFICIENT_PRIVILEGE = 5; // Unsupported migration type. UNSUPPORTED_MIGRATION_TYPE = 6; // No pglogical extension installed on databases, applicable for postgres. NO_PGLOGICAL_INSTALLED = 7; // pglogical node already exists on databases, applicable for postgres. PGLOGICAL_NODE_ALREADY_EXISTS = 8; // The value of parameter wal_level is not set to logical. INVALID_WAL_LEVEL = 9; // The value of parameter shared_preload_libraries does not include // pglogical. INVALID_SHARED_PRELOAD_LIBRARY = 10; // The value of parameter max_replication_slots is not sufficient. INSUFFICIENT_MAX_REPLICATION_SLOTS = 11; // The value of parameter max_wal_senders is not sufficient. INSUFFICIENT_MAX_WAL_SENDERS = 12; // The value of parameter max_worker_processes is not sufficient. INSUFFICIENT_MAX_WORKER_PROCESSES = 13; // Extensions installed are either not supported or having unsupported // versions UNSUPPORTED_EXTENSIONS = 14; // The value of parameter rds.logical_replication is not set to 1. INVALID_RDS_LOGICAL_REPLICATION = 15; // The primary instance logging setup doesn't allow EM sync. INVALID_LOGGING_SETUP = 16; // The primary instance database parameter setup doesn't allow EM sync. INVALID_DB_PARAM = 17; // The gtid_mode is not supported, applicable for MySQL. UNSUPPORTED_GTID_MODE = 18; // SQL Server Agent is not running. SQLSERVER_AGENT_NOT_RUNNING = 19; // The table definition is not support due to missing primary key or replica // identity, applicable for postgres. UNSUPPORTED_TABLE_DEFINITION = 20; // The customer has a definer that will break EM setup. UNSUPPORTED_DEFINER = 21; // SQL Server @@SERVERNAME does not match actual host name SQLSERVER_SERVERNAME_MISMATCH = 22; // The primary instance has been setup and will fail the setup. PRIMARY_ALREADY_SETUP = 23; // The primary instance has unsupported binary log format. UNSUPPORTED_BINLOG_FORMAT = 24; // The primary instance's binary log retention setting. BINLOG_RETENTION_SETTING = 25; } // Can be **sql#externalSyncSettingError** or // **sql#externalSyncSettingWarning**. string kind = 1; // Identifies the specific error that occurred. SqlExternalSyncSettingErrorType type = 2; // Additional information about the error encountered. string detail = 3; } // On-premises instance configuration. message OnPremisesConfiguration { // The host and port of the on-premises instance in host:port format string host_port = 1; // This is always **sql#onPremisesConfiguration**. string kind = 2; // The username for connecting to on-premises instance. string username = 3; // The password for connecting to on-premises instance. string password = 4; // PEM representation of the trusted CA's x509 certificate. string ca_certificate = 5; // PEM representation of the replica's x509 certificate. string client_certificate = 6; // PEM representation of the replica's private key. The corresponsing public // key is encoded in the client's certificate. string client_key = 7; // The dump file to create the Cloud SQL replica. string dump_file_path = 8; // The reference to Cloud SQL instance if the source is Cloud SQL. InstanceReference source_instance = 15; } // Read-replica configuration for connecting to the primary instance. message ReplicaConfiguration { // This is always **sql#replicaConfiguration**. string kind = 1; // 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. MySqlReplicaConfiguration mysql_replica_configuration = 2; // 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. google.protobuf.BoolValue failover_target = 3; } enum SqlInstanceType { // This is an unknown Cloud SQL instance type. SQL_INSTANCE_TYPE_UNSPECIFIED = 0; // A regular Cloud SQL instance. CLOUD_SQL_INSTANCE = 1; // An instance running on the customer's premises that is not managed by // Cloud SQL. ON_PREMISES_INSTANCE = 2; // A Cloud SQL instance acting as a read-replica. READ_REPLICA_INSTANCE = 3; } // The suspension reason of the database instance if the state is SUSPENDED. enum SqlSuspensionReason { // This is an unknown suspension reason. SQL_SUSPENSION_REASON_UNSPECIFIED = 0; // The instance is suspended due to billing issues (for example:, GCP account // issue) BILLING_ISSUE = 2; // The instance is suspended due to illegal content (for example:, child // pornography, copyrighted material, etc.). LEGAL_ISSUE = 3; // The instance is causing operational issues (for example:, causing the // database to crash). OPERATIONAL_ISSUE = 4; // The KMS key used by the instance is either revoked or denied access to KMS_KEY_ISSUE = 5; }