Skip to content

Commit ac90fa9

Browse files
Google APIscopybara-github
authored andcommitted
feat: add Cluster maintenance and Self-service maintenance to SqlOperationType
feat: add MySQL 8.4 to SqlDatabaseVersion docs: update a variety of documentation PiperOrigin-RevId: 642030046
1 parent 51e66d3 commit ac90fa9

2 files changed

Lines changed: 90 additions & 49 deletions

File tree

google/cloud/sql/v1beta4/cloud_sql.proto

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -274,15 +274,17 @@ service SqlInstancesService {
274274
};
275275
}
276276

277-
// Promotes the read replica instance to be a stand-alone Cloud SQL instance.
277+
// Promotes the read replica instance to be an independent Cloud SQL
278+
// primary instance.
278279
// Using this operation might cause your instance to restart.
279280
rpc PromoteReplica(SqlInstancesPromoteReplicaRequest) returns (Operation) {
280281
option (google.api.http) = {
281282
post: "/sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica"
282283
};
283284
}
284285

285-
// Switches over from the primary instance to a replica instance.
286+
// Switches over from the primary instance to the designated DR replica
287+
// instance.
286288
rpc Switchover(SqlInstancesSwitchoverRequest) returns (Operation) {
287289
option (google.api.http) = {
288290
post: "/sql/v1beta4/projects/{project}/instances/{instance}/switchover"
@@ -770,9 +772,13 @@ message SqlInstancesPromoteReplicaRequest {
770772
// ID of the project that contains the read replica.
771773
string project = 2;
772774

773-
// Set to true if the promote operation should attempt to re-add the original
774-
// primary as a replica when it comes back online. Otherwise, if this value is
775-
// false or not set, the original primary will be a standalone instance.
775+
// Set to true to invoke a replica failover to the designated DR replica.
776+
// As part of replica failover, the promote operation attempts
777+
// to add the original primary instance as a replica of the promoted
778+
// DR replica when the original primary instance comes back online.
779+
// If set to false or not specified, then the original primary
780+
// instance becomes an independent Cloud SQL primary instance.
781+
// Only applicable to MySQL.
776782
bool failover = 3;
777783
}
778784

@@ -953,16 +959,16 @@ message SqlInstancesVerifyExternalSyncSettingsRequest {
953959
OFFLINE = 2;
954960
}
955961

956-
// MigrationType enum decides if the migration is a physical file based
957-
// migration or logical migration
962+
// MigrationType determines whether the migration is a physical file-based
963+
// migration or a logical dump file-based migration.
958964
enum MigrationType {
959-
// If no migration type is specified it will be defaulted to LOGICAL.
965+
// Default value is a logical dump file-based migration
960966
MIGRATION_TYPE_UNSPECIFIED = 0;
961967

962-
// Logical Migrations
968+
// Logical dump file-based migration
963969
LOGICAL = 1;
964970

965-
// Physical file based Migrations
971+
// Physical file-based migration
966972
PHYSICAL = 2;
967973
}
968974

@@ -987,12 +993,13 @@ message SqlInstancesVerifyExternalSyncSettingsRequest {
987993
[(google.api.field_behavior) = OPTIONAL];
988994
}
989995

990-
// Optional. MigrationType field decides if the migration is a physical file
991-
// based migration or logical migration
996+
// Optional. MigrationType configures the migration to use physical files or
997+
// logical dump files. If not set, then the logical dump file configuration is
998+
// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
992999
MigrationType migration_type = 7 [(google.api.field_behavior) = OPTIONAL];
9931000

994-
// Optional. Parallel level for initial data sync. Currently only applicable
995-
// for PostgreSQL.
1001+
// Optional. Parallel level for initial data sync. Only applicable for
1002+
// PostgreSQL.
9961003
ExternalSyncParallelLevel sync_parallel_level = 8
9971004
[(google.api.field_behavior) = OPTIONAL];
9981005
}
@@ -1020,8 +1027,9 @@ message SqlInstancesStartExternalSyncRequest {
10201027
ExternalSyncParallelLevel sync_parallel_level = 7
10211028
[(google.api.field_behavior) = OPTIONAL];
10221029

1023-
// Optional. MigrationType decides if the migration is a physical file based
1024-
// migration or logical migration.
1030+
// Optional. MigrationType configures the migration to use physical files or
1031+
// logical dump files. If not set, then the logical dump file configuration is
1032+
// used. Valid values are `LOGICAL` or `PHYSICAL`. Only applicable to MySQL.
10251033
SqlInstancesVerifyExternalSyncSettingsRequest.MigrationType migration_type = 8
10261034
[(google.api.field_behavior) = OPTIONAL];
10271035
}

google/cloud/sql/v1beta4/cloud_sql_resources.proto

Lines changed: 66 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,28 @@ message BackupRetentionSettings {
9999

100100
// Database instance backup configuration.
101101
message BackupConfiguration {
102-
// This value contains the storage location of transactional logs for the
103-
// database for point-in-time recovery.
102+
// This value contains the storage location of the transactional logs
103+
// used to perform point-in-time recovery (PITR) for the database.
104104
enum TransactionalLogStorageState {
105105
// Unspecified.
106106
TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED = 0;
107107

108-
// The transaction logs for the instance are stored on a data disk.
108+
// The transaction logs used for PITR for the instance are stored
109+
// on a data disk.
109110
DISK = 1;
110111

111-
// The transaction logs for the instance are switching from being stored on
112-
// a data disk to being stored in Cloud Storage.
112+
// The transaction logs used for PITR for the instance are switching from
113+
// being stored on a data disk to being stored in Cloud Storage.
114+
// Only applicable to MySQL.
113115
SWITCHING_TO_CLOUD_STORAGE = 2;
114116

115-
// The transaction logs for the instance are now stored in Cloud Storage.
116-
// Previously, they were stored on a data disk.
117+
// The transaction logs used for PITR for the instance are now stored
118+
// in Cloud Storage. Previously, they were stored on a data disk.
119+
// Only applicable to MySQL.
117120
SWITCHED_TO_CLOUD_STORAGE = 3;
118121

119-
// The transaction logs for the instance are stored in Cloud Storage.
122+
// The transaction logs used for PITR for the instance are stored in
123+
// Cloud Storage. Only applicable to MySQL and PostgreSQL.
120124
CLOUD_STORAGE = 4;
121125
}
122126

@@ -646,55 +650,58 @@ message DatabaseInstance {
646650
optional string write_endpoint = 52
647651
[(google.api.field_behavior) = OUTPUT_ONLY];
648652

649-
// The pair of a primary instance and disaster recovery (DR) replica.
653+
// A primary instance and disaster recovery (DR) replica pair.
650654
// A DR replica is a cross-region replica that you designate
651655
// for failover in the event that the primary instance
652-
// has regional failure.
656+
// experiences regional failure. Only applicable to MySQL.
653657
optional ReplicationCluster replication_cluster = 54;
654658

655659
// Gemini instance configuration.
656660
optional GeminiInstanceConfig gemini_config = 55;
657661
}
658662

659-
// Gemini configuration.
663+
// Gemini instance configuration.
660664
message GeminiInstanceConfig {
661665
// Output only. Whether Gemini is enabled.
662666
optional bool entitled = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
663667

664-
// Output only. Whether vacuum management is enabled.
668+
// Output only. Whether the vacuum management is enabled.
665669
optional bool google_vacuum_mgmt_enabled = 2
666670
[(google.api.field_behavior) = OUTPUT_ONLY];
667671

668-
// Output only. Whether oom session cancel is enabled.
672+
// Output only. Whether canceling the out-of-memory (OOM) session is enabled.
669673
optional bool oom_session_cancel_enabled = 3
670674
[(google.api.field_behavior) = OUTPUT_ONLY];
671675

672-
// Output only. Whether active query is enabled.
676+
// Output only. Whether the active query is enabled.
673677
optional bool active_query_enabled = 4
674678
[(google.api.field_behavior) = OUTPUT_ONLY];
675679

676-
// Output only. Whether index advisor is enabled.
680+
// Output only. Whether the index advisor is enabled.
677681
optional bool index_advisor_enabled = 5
678682
[(google.api.field_behavior) = OUTPUT_ONLY];
679683

680-
// Output only. Whether flag recommender is enabled.
684+
// Output only. Whether the flag recommender is enabled.
681685
optional bool flag_recommender_enabled = 6
682686
[(google.api.field_behavior) = OUTPUT_ONLY];
683687
}
684688

685-
// Primary-DR replica pair
689+
// A primary instance and disaster recovery (DR) replica pair.
690+
// A DR replica is a cross-region replica that you designate for failover
691+
// in the event that the primary instance has regional failure.
692+
// Only applicable to MySQL.
686693
message ReplicationCluster {
687694
// Optional. If the instance is a primary instance, then this field identifies
688695
// the disaster recovery (DR) replica. A DR replica is an optional
689696
// configuration for Enterprise Plus edition instances. If the instance is a
690-
// read replica, then the field is not set. Users can set this field to set a
691-
// designated DR replica for a primary. Removing this field removes the DR
692-
// replica.
697+
// read replica, then the field is not set. Set this field to a replica name
698+
// to designate a DR replica for a primary instance. Remove the replica name
699+
// to remove the DR replica designation.
693700
optional string failover_dr_replica_name = 2
694701
[(google.api.field_behavior) = OPTIONAL];
695702

696-
// Output only. read-only field that indicates if the replica is a dr_replica;
697-
// not set for a primary.
703+
// Output only. Read-only field that indicates whether the replica is a DR
704+
// replica. This field is not set if the instance is a primary instance.
698705
optional bool dr_replica = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
699706
}
700707

@@ -1402,19 +1409,25 @@ message IpConfiguration {
14021409
// The SSL mode is unknown.
14031410
SSL_MODE_UNSPECIFIED = 0;
14041411

1405-
// Allow non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections,
1406-
// the client certificate won't be verified.
1412+
// Allow non-SSL/non-TLS and SSL/TLS connections.
1413+
// For SSL connections to MySQL and PostgreSQL, the client certificate
1414+
// isn't verified.
1415+
//
14071416
// When this value is used, the legacy `require_ssl` flag must be false or
1408-
// cleared to avoid the conflict between values of two flags.
1417+
// cleared to avoid a conflict between the values of the two flags.
14091418
ALLOW_UNENCRYPTED_AND_ENCRYPTED = 1;
14101419

14111420
// Only allow connections encrypted with SSL/TLS.
1421+
// For SSL connections to MySQL and PostgreSQL, the client certificate
1422+
// isn't verified.
1423+
//
14121424
// When this value is used, the legacy `require_ssl` flag must be false or
1413-
// cleared to avoid the conflict between values of two flags.
1425+
// cleared to avoid a conflict between the values of the two flags.
14141426
ENCRYPTED_ONLY = 2;
14151427

14161428
// Only allow connections encrypted with SSL/TLS and with valid
14171429
// client certificates.
1430+
//
14181431
// When this value is used, the legacy `require_ssl` flag must be true or
14191432
// cleared to avoid the conflict between values of two flags.
14201433
// PostgreSQL clients or users that connect using IAM database
@@ -1424,7 +1437,8 @@ message IpConfiguration {
14241437
// [Cloud SQL
14251438
// Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors)
14261439
// to enforce client identity verification.
1427-
// This value is not applicable to SQL Server.
1440+
//
1441+
// Only applicable to MySQL and PostgreSQL. Not applicable to SQL Server.
14281442
TRUSTED_CLIENT_CERTIFICATE_REQUIRED = 3;
14291443
}
14301444

@@ -1470,20 +1484,23 @@ message IpConfiguration {
14701484
// value pairs are valid:
14711485
//
14721486
// For PostgreSQL and MySQL:
1487+
//
14731488
// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
14741489
// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`
14751490
// * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true`
14761491
//
14771492
// For SQL Server:
1493+
//
14781494
// * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false`
14791495
// * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true`
14801496
//
1481-
// The value of `ssl_mode` gets priority over the value of `require_ssl`. For
1482-
// example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`,
1483-
// the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the
1484-
// `require_ssl=false` means accept both non-SSL and SSL connections. MySQL
1485-
// and PostgreSQL databases respect `ssl_mode` in this case and accept only
1486-
// SSL connections.
1497+
// The value of `ssl_mode` has priority over the value of `require_ssl`.
1498+
//
1499+
// For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and
1500+
// `require_ssl=false`, `ssl_mode=ENCRYPTED_ONLY` means accept only SSL
1501+
// connections, while `require_ssl=false` means accept both non-SSL
1502+
// and SSL connections. In this case, MySQL and PostgreSQL databases respect
1503+
// `ssl_mode` and accepts only SSL connections.
14871504
SslMode ssl_mode = 8;
14881505

14891506
// PSC settings for this instance.
@@ -1835,6 +1852,19 @@ message Operation {
18351852
// asynchronously from the promote replica operation executed to the
18361853
// replica.
18371854
RECONFIGURE_OLD_PRIMARY = 44;
1855+
1856+
// Indicates that the instance, its read replicas, and its cascading
1857+
// replicas are in maintenance. Maintenance typically gets initiated on
1858+
// groups of replicas first, followed by the primary instance. For each
1859+
// instance, maintenance typically causes the instance to be unavailable for
1860+
// 1-3 minutes.
1861+
CLUSTER_MAINTENANCE = 45;
1862+
1863+
// Indicates that the instance (and any of its replicas) are currently in
1864+
// maintenance. This is initiated as a self-service request by using SSM.
1865+
// Maintenance typically causes the instance to be unavailable for 1-3
1866+
// minutes.
1867+
SELF_SERVICE_MAINTENANCE = 46;
18381868
}
18391869

18401870
// The status of an operation.
@@ -2620,6 +2650,9 @@ enum SqlDatabaseVersion {
26202650
// The database major version is MySQL 8.0 and the minor version is 40.
26212651
MYSQL_8_0_40 = 358;
26222652

2653+
// The database version is MySQL 8.4.
2654+
MYSQL_8_4 = 398;
2655+
26232656
// The database version is SQL Server 2019 Standard.
26242657
SQLSERVER_2019_STANDARD = 26;
26252658

0 commit comments

Comments
 (0)