Skip to content

Commit 4880248

Browse files
gcf-owl-bot[bot]quirogassofisl
authored
feat: [sql] introduces auto_upgrade_enabled option for MySQL in DatabaseInstance.Settings (#6969)
* feat: introduces auto_upgrade_enabled option for MySQL in DatabaseInstance.Settings feat: Exposing API proto for Performance Capture feat: Making new API fields to support creating/updating users with database roles feat: add an instance setting data_api_access feat: add a mode option for reset SSL config requests feat: Add `iamStatus` field to show if IAM Group is active or inactive feat: Added fields to User message in the API definition for supporting database roles feat: add ConnectSettings.support_metadata_exchange field feat: Introduce minimum and maximum TLS versions on the instance feat: adding "TEST" & "GCLOUD_TESTER" visibility labels for the newly added management config in Instance proto. This helps in internal testing purposes feat: added protos for backupdr_transaction_log_retention_days feat: added protos for backupdr_transaction_log_retention_days feat: added protos for backupdr_transaction_log_retention_days fix!: Enums `IamStatus` temporarily removed feat: add network_attachment_uri field in Cloud SQL instance proto fix!: An existing enum `iam_status` temporarily removed feat: adding iam_status field for Cloud SQL users feat: allow gcloud to access the networkAttachmentUri field feat: remove visibility restrictions for `data_disk_provisioned_iops` and `data_disk_provisioned_throughput` feat: Proto changes to update operation type from Advanced to Enhanced backup feat: Changed backup tier from Advanced to Enhanced docs: fix typos in protobuf comments feat: remove visibility restrictions from HYPERDISK_BALANCED feat: add replication_lag_max_seconds field in Cloud SQL instance proto feat: Expose subOperationType in ListOperation API feat: add custom_subject_alternative_names field in Cloud SQL instance proto feat: GOOGLE_INTERNAL field is used by BackupDR to fetch the instance uid feat: Add support for MySQL 8.0.41/42 feat: added protos to indicate GCBDR management of the instance feat: add psc_auto_connections field in Cloud SQL instance proto feat: allow gcloud to access the PscAutoConnectionConfig field feat: expose IP address and connection status for PSC instances with service automation PiperOrigin-RevId: 853221352 Source-Link: googleapis/googleapis@cfd2754 Source-Link: googleapis/googleapis-gen@f924c11 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiZjkyNGMxMWVlZTM1NWEyYWM3N2RjYTU5OGM4ZWU2MzgyNzcxOWZiMCJ9 * feat: introduces auto_upgrade_enabled option for MySQL in DatabaseInstance.Settings feat: Exposing API proto for Performance Capture feat: Making new API fields to support creating/updating users with database roles feat: add an instance setting data_api_access feat: add a mode option for reset SSL config requests feat: Add `iamStatus` field to show if IAM Group is active or inactive feat: Added fields to User message in the API definition for supporting database roles feat: add ConnectSettings.support_metadata_exchange field feat: Introduce minimum and maximum TLS versions on the instance feat: adding "TEST" & "GCLOUD_TESTER" visibility labels for the newly added management config in Instance proto. This helps in internal testing purposes feat: added protos for backupdr_transaction_log_retention_days feat: added protos for backupdr_transaction_log_retention_days feat: added protos for backupdr_transaction_log_retention_days fix!: Enums `IamStatus` temporarily removed feat: add network_attachment_uri field in Cloud SQL instance proto fix!: An existing enum `iam_status` temporarily removed feat: adding iam_status field for Cloud SQL users feat: allow gcloud to access the networkAttachmentUri field feat: remove visibility restrictions for `data_disk_provisioned_iops` and `data_disk_provisioned_throughput` feat: Proto changes to update operation type from Advanced to Enhanced backup feat: Changed backup tier from Advanced to Enhanced docs: fix typos in protobuf comments feat: remove visibility restrictions from HYPERDISK_BALANCED feat: add replication_lag_max_seconds field in Cloud SQL instance proto feat: Expose subOperationType in ListOperation API feat: add custom_subject_alternative_names field in Cloud SQL instance proto feat: GOOGLE_INTERNAL field is used by BackupDR to fetch the instance uid feat: Add support for MySQL 8.0.41/42 feat: added protos to indicate GCBDR management of the instance feat: add psc_auto_connections field in Cloud SQL instance proto PiperOrigin-RevId: 853222543 Source-Link: googleapis/googleapis@110554f Source-Link: googleapis/googleapis-gen@1e9acb9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXNxbC8uT3dsQm90LnlhbWwiLCJoIjoiMWU5YWNiOTFhZDdjM2JkODVhOGVhNjM2MmNiY2EwZTZmMDI3M2ZmZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: remove empty array block --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Santiago Quiroga <22756465+quirogas@users.noreply.github.com> Co-authored-by: Sofia Leon <sofialeon@google.com>
1 parent 57941be commit 4880248

238 files changed

Lines changed: 101392 additions & 23164 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-sql/.jsdoc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ module.exports = {
4040
includePattern: '\\.js$'
4141
},
4242
templates: {
43-
copyright: 'Copyright 2025 Google LLC',
43+
copyright: 'Copyright 2026 Google LLC',
4444
includeDate: false,
4545
sourceFiles: false,
4646
systemName: '@google-cloud/sql',

packages/google-cloud-sql/.mocharc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-sql/.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

packages/google-cloud-sql/README.md

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_available_database_versions.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.sql.v1;
1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
2223

2324
option go_package = "cloud.google.com/go/sql/apiv1/sqlpb;sqlpb";
2425
option java_multiple_files = true;

packages/google-cloud-sql/protos/google/cloud/sql/v1/cloud_sql_backup_runs.proto

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ message BackupRun {
173173
// Location of the backups.
174174
string location = 13;
175175

176+
// Output only. The instance database version at the time this backup was
177+
// made.
178+
SqlDatabaseVersion database_version = 15
179+
[(google.api.field_behavior) = OUTPUT_ONLY];
180+
176181
// Encryption configuration specific to a backup.
177182
DiskEncryptionConfiguration disk_encryption_configuration = 16;
178183

@@ -245,10 +250,10 @@ enum SqlBackupKind {
245250
// This is an unknown BackupKind.
246251
SQL_BACKUP_KIND_UNSPECIFIED = 0;
247252

248-
// The snapshot based backups
253+
// Snapshot-based backups.
249254
SNAPSHOT = 1;
250255

251-
// Physical backups
256+
// Physical backups.
252257
PHYSICAL = 2;
253258
}
254259

Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.sql.v1;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/field_behavior.proto";
22+
import "google/api/resource.proto";
23+
import "google/cloud/sql/v1/cloud_sql_backup_runs.proto";
24+
import "google/cloud/sql/v1/cloud_sql_instances.proto";
25+
import "google/cloud/sql/v1/cloud_sql_resources.proto";
26+
import "google/protobuf/field_mask.proto";
27+
import "google/protobuf/timestamp.proto";
28+
import "google/protobuf/wrappers.proto";
29+
import "google/type/interval.proto";
30+
31+
option go_package = "cloud.google.com/go/sql/apiv1/sqlpb;sqlpb";
32+
option java_multiple_files = true;
33+
option java_outer_classname = "CloudSqlBackupsProto";
34+
option java_package = "com.google.cloud.sql.v1";
35+
36+
service SqlBackupsService {
37+
option (google.api.default_host) = "sqladmin.googleapis.com";
38+
option (google.api.oauth_scopes) =
39+
"https://www.googleapis.com/auth/cloud-platform,"
40+
"https://www.googleapis.com/auth/sqlservice.admin";
41+
42+
// Creates a backup for a Cloud SQL instance. This API can be used only to
43+
// create on-demand backups.
44+
rpc CreateBackup(CreateBackupRequest) returns (Operation) {
45+
option (google.api.http) = {
46+
post: "/v1/{parent=projects/*}/backups"
47+
body: "backup"
48+
};
49+
option (google.api.method_signature) = "parent, backup";
50+
}
51+
52+
// Retrieves a resource containing information about a backup.
53+
rpc GetBackup(GetBackupRequest) returns (Backup) {
54+
option (google.api.http) = {
55+
get: "/v1/{name=projects/*/backups/*}"
56+
};
57+
option (google.api.method_signature) = "name";
58+
}
59+
60+
// Lists all backups associated with the project.
61+
rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
62+
option (google.api.http) = {
63+
get: "/v1/{parent=projects/*}/backups"
64+
};
65+
option (google.api.method_signature) = "parent";
66+
}
67+
68+
// Updates the retention period and description of the backup. You can use
69+
// this API to update final backups only.
70+
rpc UpdateBackup(UpdateBackupRequest) returns (Operation) {
71+
option (google.api.http) = {
72+
patch: "/v1/{backup.name=projects/*/backups/*}"
73+
body: "backup"
74+
};
75+
option (google.api.method_signature) = "backup, update_mask";
76+
}
77+
78+
// Deletes the backup.
79+
rpc DeleteBackup(DeleteBackupRequest) returns (Operation) {
80+
option (google.api.http) = {
81+
delete: "/v1/{name=projects/*/backups/*}"
82+
};
83+
option (google.api.method_signature) = "name";
84+
}
85+
}
86+
87+
// The request payload to create the backup
88+
message CreateBackupRequest {
89+
// Required. The parent resource where this backup is created.
90+
// Format: projects/{project}
91+
string parent = 1 [
92+
(google.api.field_behavior) = REQUIRED,
93+
(google.api.resource_reference) = {
94+
child_type: "sqladmin.googleapis.com/Backup"
95+
}
96+
];
97+
98+
// Required. The Backup to create.
99+
Backup backup = 2 [(google.api.field_behavior) = REQUIRED];
100+
}
101+
102+
// The request payload to get the backup.
103+
message GetBackupRequest {
104+
// Required. The name of the backup to retrieve.
105+
// Format: projects/{project}/backups/{backup}
106+
string name = 1 [
107+
(google.api.field_behavior) = REQUIRED,
108+
(google.api.resource_reference) = { type: "sqladmin.googleapis.com/Backup" }
109+
];
110+
}
111+
112+
// The request payload to list the backups.
113+
message ListBackupsRequest {
114+
// Required. The parent that owns this collection of backups.
115+
// Format: projects/{project}
116+
string parent = 1 [
117+
(google.api.field_behavior) = REQUIRED,
118+
(google.api.resource_reference) = {
119+
child_type: "sqladmin.googleapis.com/Backup"
120+
}
121+
];
122+
123+
// The maximum number of backups to return per response. The service might
124+
// return fewer backups than this value. If a value for this parameter isn't
125+
// specified, then, at most, 500 backups are returned. The maximum value is
126+
// 2,000. Any values that you set, which are greater than 2,000, are changed
127+
// to 2,000.
128+
int32 page_size = 2;
129+
130+
// A page token, received from a previous `ListBackups` call.
131+
// Provide this to retrieve the subsequent page.
132+
//
133+
// When paginating, all other parameters provided to `ListBackups` must match
134+
// the call that provided the page token.
135+
string page_token = 3;
136+
137+
// Multiple filter queries are separated by spaces. For example,
138+
// 'instance:abc AND type:FINAL, 'location:us',
139+
// 'backupInterval.startTime>=1950-01-01T01:01:25.771Z'. You can filter by
140+
// type, instance, backupInterval.startTime (creation time), or location.
141+
string filter = 4;
142+
}
143+
144+
// The response payload containing a list of the backups.
145+
message ListBackupsResponse {
146+
// A list of backups.
147+
repeated Backup backups = 1;
148+
149+
// A token, which can be sent as `page_token` to retrieve the next page.
150+
// If this field is omitted, then there aren't subsequent pages.
151+
string next_page_token = 2;
152+
153+
// If a region isn't unavailable or if an unknown error occurs, then a warning
154+
// message is returned.
155+
repeated ApiWarning warnings = 3;
156+
}
157+
158+
// The request payload to update the backup.
159+
message UpdateBackupRequest {
160+
// Required. The backup to update.
161+
// The backup’s `name` field is used to identify the backup to update.
162+
// Format: projects/{project}/backups/{backup}
163+
Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
164+
165+
// The list of fields that you can update. You can update only the description
166+
// and retention period of the final backup.
167+
google.protobuf.FieldMask update_mask = 2;
168+
}
169+
170+
// The request payload to delete the backup.
171+
message DeleteBackupRequest {
172+
// Required. The name of the backup to delete.
173+
// Format: projects/{project}/backups/{backup}
174+
string name = 1 [
175+
(google.api.field_behavior) = REQUIRED,
176+
(google.api.resource_reference) = { type: "sqladmin.googleapis.com/Backup" }
177+
];
178+
}
179+
180+
// A backup resource.
181+
message Backup {
182+
option (google.api.resource) = {
183+
type: "sqladmin.googleapis.com/Backup"
184+
pattern: "projects/{project}/backups/{backup}"
185+
};
186+
187+
// The backup type.
188+
enum SqlBackupType {
189+
// This is an unknown backup type.
190+
SQL_BACKUP_TYPE_UNSPECIFIED = 0;
191+
192+
// The backup schedule triggers a backup automatically.
193+
AUTOMATED = 1;
194+
195+
// The user triggers a backup manually.
196+
ON_DEMAND = 2;
197+
198+
// The backup created when instance is deleted.
199+
FINAL = 3;
200+
}
201+
202+
// The backup's state
203+
enum SqlBackupState {
204+
// The state of the backup is unknown.
205+
SQL_BACKUP_STATE_UNSPECIFIED = 0;
206+
207+
// The backup that's added to a queue.
208+
ENQUEUED = 1;
209+
210+
// The backup is in progress.
211+
RUNNING = 2;
212+
213+
// The backup failed.
214+
FAILED = 3;
215+
216+
// The backup is successful.
217+
SUCCESSFUL = 4;
218+
219+
// The backup is being deleted.
220+
DELETING = 5;
221+
222+
// Deletion of the backup failed.
223+
DELETION_FAILED = 6;
224+
}
225+
226+
// Output only. The resource name of the backup.
227+
// Format: projects/{project}/backups/{backup}.
228+
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
229+
230+
// Output only. This is always `sql#backup`.
231+
string kind = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
232+
233+
// Output only. The URI of this resource.
234+
string self_link = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
235+
236+
// Output only. The type of this backup. The type can be "AUTOMATED",
237+
// "ON_DEMAND" or “FINAL”.
238+
SqlBackupType type = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
239+
240+
// The description of this backup.
241+
string description = 5;
242+
243+
// The name of the source database instance.
244+
string instance = 6;
245+
246+
// The storage location of the backups. The location can be multi-regional.
247+
string location = 7;
248+
249+
// Output only. This output contains the following values:
250+
// start_time: All database writes up to this time are available.
251+
// end_time: Any database writes after this time aren't available.
252+
google.type.Interval backup_interval = 8
253+
[(google.api.field_behavior) = OUTPUT_ONLY];
254+
255+
// Output only. The status of this backup.
256+
SqlBackupState state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
257+
258+
// Output only. Information about why the backup operation fails (for example,
259+
// when the backup state fails).
260+
OperationError error = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
261+
262+
// Output only. This output contains the encryption configuration for a backup
263+
// and the resource name of the KMS key for disk encryption.
264+
string kms_key = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
265+
266+
// Output only. This output contains the encryption status for a backup and
267+
// the version of the KMS key that's used to encrypt the Cloud SQL instance.
268+
string kms_key_version = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
269+
270+
// Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
271+
SqlBackupKind backup_kind = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
272+
273+
// Output only. This output contains a backup time zone. If a Cloud SQL for
274+
// SQL Server instance has a different time zone from the backup's time zone,
275+
// then the restore to the instance doesn't happen.
276+
string time_zone = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
277+
278+
oneof expiration {
279+
// Input only. The time-to-live (TTL) interval for this resource (in days).
280+
// For example: ttlDays:7, means 7 days from the current time. The
281+
// expiration time can't exceed 365 days from the time that the backup is
282+
// created.
283+
int64 ttl_days = 16 [(google.api.field_behavior) = INPUT_ONLY];
284+
285+
// Backup expiration time.
286+
// A UTC timestamp of when this backup expired.
287+
google.protobuf.Timestamp expiry_time = 17;
288+
}
289+
290+
// Output only. The database version of the instance of at the time this
291+
// backup was made.
292+
SqlDatabaseVersion database_version = 20
293+
[(google.api.field_behavior) = OUTPUT_ONLY];
294+
295+
// Output only. The maximum chargeable bytes for the backup.
296+
optional int64 max_chargeable_bytes = 23
297+
[(google.api.field_behavior) = OUTPUT_ONLY];
298+
299+
// Optional. Output only. Timestamp in UTC of when the instance associated
300+
// with this backup is deleted.
301+
google.protobuf.Timestamp instance_deletion_time = 24 [
302+
(google.api.field_behavior) = OPTIONAL,
303+
(google.api.field_behavior) = OUTPUT_ONLY
304+
];
305+
306+
// Optional. Output only. The instance setting of the source instance that's
307+
// associated with this backup.
308+
DatabaseInstance instance_settings = 25 [
309+
(google.api.field_behavior) = OPTIONAL,
310+
(google.api.field_behavior) = OUTPUT_ONLY
311+
];
312+
313+
// Output only. The mapping to backup run resource used for IAM validations.
314+
string backup_run = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
315+
316+
// Output only. This status indicates whether the backup satisfies PZS.
317+
//
318+
// The status is reserved for future use.
319+
google.protobuf.BoolValue satisfies_pzs = 27
320+
[(google.api.field_behavior) = OUTPUT_ONLY];
321+
322+
// Output only. This status indicates whether the backup satisfies PZI.
323+
//
324+
// The status is reserved for future use.
325+
google.protobuf.BoolValue satisfies_pzi = 28
326+
[(google.api.field_behavior) = OUTPUT_ONLY];
327+
}

0 commit comments

Comments
 (0)