Skip to content

Commit 65b4634

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add CloudSQL support for RestoreCluster operation
feat: Add new fields and methods to the AlloyDB API feat: Improve documentation of existing API fields feat: Add GCA Entitlement type feat: Add fields to PscInstanceConfig feat: Add recommended_value and scope field to SupportedDatabaseFlags feat: make user optional in ExecuteSql API feat: Add Import and Export functionalities feat: Add machine_type field to instance config feat: Add a new GCAEntitlement field in Gemini config feat: Add the GCAInstanceConfig field in instance docs: A comment for field `encryption_config` in message `.google.cloud.alloydb.v1beta.AutomatedBackupPolicy` is changed docs: A comment for field `encryption_config` in message `.google.cloud.alloydb.v1beta.ContinuousBackupConfig` is changed docs: A comment for message `Instance` is changed docs: A comment for field `track_wait_event_types` in message `.google.cloud.alloydb.v1beta.Instance` is changed docs: A comment for field `user` in message `.google.cloud.alloydb.v1beta.ExecuteSqlRequest` is changed docs: A comment for field `use_metadata_exchange` in message `.google.cloud.alloydb.v1beta.GenerateClientCertificateRequest` is changed PiperOrigin-RevId: 757969486
1 parent bfe034c commit 65b4634

11 files changed

Lines changed: 312 additions & 30 deletions

File tree

google/cloud/alloydb/connectors/v1/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ proto_library(
2626
# buildifier: disable=same-origin-load
2727
load(
2828
"@com_google_googleapis_imports//:imports.bzl",
29-
"java_gapic_assembly_gradle_pkg",
3029
"java_proto_library",
30+
"java_gapic_assembly_gradle_pkg",
3131
)
3232

3333
java_proto_library(
@@ -39,8 +39,8 @@ java_proto_library(
3939
java_gapic_assembly_gradle_pkg(
4040
name = "google-cloud-alloydb-connectors-v1-java",
4141
deps = [
42-
":connectors_java_proto",
4342
":connectors_proto",
43+
":connectors_java_proto",
4444
],
4545
)
4646

@@ -50,8 +50,8 @@ java_gapic_assembly_gradle_pkg(
5050
# buildifier: disable=same-origin-load
5151
load(
5252
"@com_google_googleapis_imports//:imports.bzl",
53-
"go_gapic_assembly_pkg",
5453
"go_proto_library",
54+
"go_gapic_assembly_pkg",
5555
)
5656

5757
go_proto_library(
@@ -78,10 +78,10 @@ go_gapic_assembly_pkg(
7878
load(
7979
"@com_google_googleapis_imports//:imports.bzl",
8080
"moved_proto_library",
81-
"py_gapic_assembly_pkg",
82-
"py_gapic_library",
8381
"py_grpc_library",
8482
"py_proto_library",
83+
"py_gapic_library",
84+
"py_gapic_assembly_pkg",
8585
)
8686

8787
moved_proto_library(
@@ -167,8 +167,8 @@ ruby_grpc_library(
167167
# buildifier: disable=same-origin-load
168168
load(
169169
"@com_google_googleapis_imports//:imports.bzl",
170-
"csharp_gapic_assembly_pkg",
171170
"csharp_proto_library",
171+
"csharp_gapic_assembly_pkg",
172172
)
173173

174174
csharp_proto_library(

google/cloud/alloydb/connectors/v1alpha/BUILD.bazel

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ proto_library(
2626
# buildifier: disable=same-origin-load
2727
load(
2828
"@com_google_googleapis_imports//:imports.bzl",
29-
"java_gapic_assembly_gradle_pkg",
3029
"java_proto_library",
30+
"java_gapic_assembly_gradle_pkg",
3131
)
3232

3333
java_proto_library(
@@ -39,8 +39,8 @@ java_proto_library(
3939
java_gapic_assembly_gradle_pkg(
4040
name = "google-cloud-alloydb-connectors-v1alpha-java",
4141
deps = [
42-
":connectors_java_proto",
4342
":connectors_proto",
43+
":connectors_java_proto",
4444
],
4545
)
4646

@@ -50,12 +50,13 @@ java_gapic_assembly_gradle_pkg(
5050
# buildifier: disable=same-origin-load
5151
load(
5252
"@com_google_googleapis_imports//:imports.bzl",
53+
"go_proto_library",
5354
"go_gapic_assembly_pkg",
54-
"go_grpc_library",
5555
)
5656

57-
go_grpc_library(
57+
go_proto_library(
5858
name = "connectors_go_proto",
59+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
5960
importpath = "cloud.google.com/go/alloydb/connectors/apiv1alpha/connectorspb",
6061
protos = [":connectors_proto"],
6162
deps = [
@@ -77,10 +78,10 @@ go_gapic_assembly_pkg(
7778
load(
7879
"@com_google_googleapis_imports//:imports.bzl",
7980
"moved_proto_library",
80-
"py_gapic_assembly_pkg",
81-
"py_gapic_library",
8281
"py_grpc_library",
8382
"py_proto_library",
83+
"py_gapic_library",
84+
"py_gapic_assembly_pkg",
8485
)
8586

8687
moved_proto_library(
@@ -166,8 +167,8 @@ ruby_grpc_library(
166167
# buildifier: disable=same-origin-load
167168
load(
168169
"@com_google_googleapis_imports//:imports.bzl",
169-
"csharp_gapic_assembly_pkg",
170170
"csharp_proto_library",
171+
"csharp_gapic_assembly_pkg",
171172
)
172173

173174
csharp_proto_library(

google/cloud/alloydb/connectors/v1beta/BUILD.bazel

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ proto_library(
2626
# buildifier: disable=same-origin-load
2727
load(
2828
"@com_google_googleapis_imports//:imports.bzl",
29-
"java_gapic_assembly_gradle_pkg",
3029
"java_proto_library",
30+
"java_gapic_assembly_gradle_pkg",
3131
)
3232

3333
java_proto_library(
@@ -39,8 +39,8 @@ java_proto_library(
3939
java_gapic_assembly_gradle_pkg(
4040
name = "google-cloud-alloydb-connectors-v1beta-java",
4141
deps = [
42-
":connectors_java_proto",
4342
":connectors_proto",
43+
":connectors_java_proto",
4444
],
4545
)
4646

@@ -50,8 +50,8 @@ java_gapic_assembly_gradle_pkg(
5050
# buildifier: disable=same-origin-load
5151
load(
5252
"@com_google_googleapis_imports//:imports.bzl",
53-
"go_gapic_assembly_pkg",
5453
"go_proto_library",
54+
"go_gapic_assembly_pkg",
5555
)
5656

5757
go_proto_library(
@@ -78,10 +78,10 @@ go_gapic_assembly_pkg(
7878
load(
7979
"@com_google_googleapis_imports//:imports.bzl",
8080
"moved_proto_library",
81-
"py_gapic_assembly_pkg",
82-
"py_gapic_library",
8381
"py_grpc_library",
8482
"py_proto_library",
83+
"py_gapic_library",
84+
"py_gapic_assembly_pkg",
8585
)
8686

8787
moved_proto_library(
@@ -167,8 +167,8 @@ ruby_grpc_library(
167167
# buildifier: disable=same-origin-load
168168
load(
169169
"@com_google_googleapis_imports//:imports.bzl",
170-
"csharp_gapic_assembly_pkg",
171170
"csharp_proto_library",
171+
"csharp_gapic_assembly_pkg",
172172
)
173173

174174
csharp_proto_library(

google/cloud/alloydb/v1/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ load(
359359

360360
csharp_proto_library(
361361
name = "alloydb_csharp_proto",
362+
extra_opts = [],
362363
deps = [":alloydb_proto"],
363364
)
364365

google/cloud/alloydb/v1alpha/BUILD.bazel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,12 @@ load(
133133
"@com_google_googleapis_imports//:imports.bzl",
134134
"go_gapic_assembly_pkg",
135135
"go_gapic_library",
136-
"go_grpc_library",
136+
"go_proto_library",
137137
)
138138

139-
go_grpc_library(
139+
go_proto_library(
140140
name = "alloydb_go_proto",
141+
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
141142
importpath = "cloud.google.com/go/alloydb/apiv1alpha/alloydbpb",
142143
protos = [":alloydb_proto"],
143144
deps = [
@@ -356,6 +357,7 @@ load(
356357

357358
csharp_proto_library(
358359
name = "alloydb_csharp_proto",
360+
extra_opts = [],
359361
deps = [":alloydb_proto"],
360362
)
361363

google/cloud/alloydb/v1beta/BUILD.bazel

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ proto_library(
2525
name = "alloydb_proto",
2626
srcs = [
2727
"csql_resources.proto",
28+
"csql_service.proto",
2829
"data_model.proto",
2930
"gemini.proto",
3031
"resources.proto",
@@ -108,6 +109,8 @@ java_gapic_test(
108109
test_classes = [
109110
"com.google.cloud.alloydb.v1beta.AlloyDBAdminClientHttpJsonTest",
110111
"com.google.cloud.alloydb.v1beta.AlloyDBAdminClientTest",
112+
"com.google.cloud.alloydb.v1beta.AlloyDBCSQLAdminClientHttpJsonTest",
113+
"com.google.cloud.alloydb.v1beta.AlloyDBCSQLAdminClientTest",
111114
],
112115
runtime_deps = [":alloydb_java_gapic_test"],
113116
)
@@ -357,6 +360,7 @@ load(
357360

358361
csharp_proto_library(
359362
name = "alloydb_csharp_proto",
363+
extra_opts = [],
360364
deps = [":alloydb_proto"],
361365
)
362366

google/cloud/alloydb/v1beta/alloydb_v1beta.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: AlloyDB API
55

66
apis:
77
- name: google.cloud.alloydb.v1beta.AlloyDBAdmin
8+
- name: google.cloud.alloydb.v1beta.AlloyDBCSQLAdmin
89
- name: google.cloud.location.Locations
910
- name: google.iam.v1.IAMPolicy
1011
- name: google.longrunning.Operations
@@ -78,6 +79,10 @@ authentication:
7879
oauth:
7980
canonical_scopes: |-
8081
https://www.googleapis.com/auth/cloud-platform
82+
- selector: google.cloud.alloydb.v1beta.AlloyDBCSQLAdmin.RestoreFromCloudSQL
83+
oauth:
84+
canonical_scopes: |-
85+
https://www.googleapis.com/auth/cloud-platform
8186
- selector: google.cloud.location.Locations.GetLocation
8287
oauth:
8388
canonical_scopes: |-
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
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.alloydb.v1beta;
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/alloydb/v1beta/csql_resources.proto";
24+
import "google/cloud/alloydb/v1beta/resources.proto";
25+
import "google/cloud/alloydb/v1beta/service.proto";
26+
import "google/longrunning/operations.proto";
27+
28+
option csharp_namespace = "Google.Cloud.AlloyDb.V1Beta";
29+
option go_package = "cloud.google.com/go/alloydb/apiv1beta/alloydbpb;alloydbpb";
30+
option java_multiple_files = true;
31+
option java_outer_classname = "CSQLServiceProto";
32+
option java_package = "com.google.cloud.alloydb.v1beta";
33+
option php_namespace = "Google\\Cloud\\AlloyDb\\V1beta";
34+
option ruby_package = "Google::Cloud::AlloyDB::V1beta";
35+
36+
// Service for interactions with CloudSQL.
37+
service AlloyDBCSQLAdmin {
38+
option (google.api.default_host) = "alloydb.googleapis.com";
39+
option (google.api.oauth_scopes) =
40+
"https://www.googleapis.com/auth/cloud-platform";
41+
42+
// Restores an AlloyDB cluster from a CloudSQL resource.
43+
rpc RestoreFromCloudSQL(RestoreFromCloudSQLRequest)
44+
returns (google.longrunning.Operation) {
45+
option (google.api.http) = {
46+
post: "/v1beta/{parent=projects/*/locations/*}/clusters:restoreFromCloudSQL"
47+
body: "*"
48+
};
49+
option (google.api.method_signature) = "parent,cluster_id";
50+
option (google.longrunning.operation_info) = {
51+
response_type: "Cluster"
52+
metadata_type: "OperationMetadata"
53+
};
54+
}
55+
}
56+
57+
// Message for registering Restoring from CloudSQL resource.
58+
message RestoreFromCloudSQLRequest {
59+
// The source CloudSQL resource to restore from.
60+
oneof source {
61+
// Cluster created from CloudSQL backup run.
62+
CloudSQLBackupRunSource cloudsql_backup_run_source = 101;
63+
}
64+
65+
// Required. The location of the new cluster. For the required format, see the
66+
// comment on Cluster.name field.
67+
string parent = 1 [
68+
(google.api.field_behavior) = REQUIRED,
69+
(google.api.resource_reference) = {
70+
child_type: "alloydb.googleapis.com/Cluster"
71+
}
72+
];
73+
74+
// Required. ID of the requesting object.
75+
string cluster_id = 2 [(google.api.field_behavior) = REQUIRED];
76+
77+
// Required. The resource being created
78+
Cluster cluster = 3 [(google.api.field_behavior) = REQUIRED];
79+
}

google/cloud/alloydb/v1beta/gemini.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ option java_package = "com.google.cloud.alloydb.v1beta";
2626
option php_namespace = "Google\\Cloud\\AlloyDb\\V1beta";
2727
option ruby_package = "Google::Cloud::AlloyDB::V1beta";
2828

29+
// Enum representing the type of GCA entitlement assigned to a resource.
30+
enum GCAEntitlementType {
31+
// No GCA entitlement is assigned.
32+
GCA_ENTITLEMENT_TYPE_UNSPECIFIED = 0;
33+
34+
// The resource is entitled to the GCA Standard Tier.
35+
GCA_STANDARD = 1;
36+
}
37+
2938
// Cluster level configuration parameters related to the Gemini in Databases
3039
// add-on.
3140
message GeminiClusterConfig {
@@ -45,3 +54,11 @@ message GeminiInstanceConfig {
4554
// the Admin Control Center (ACC) and cannot be toggled using AlloyDB's APIs.
4655
bool entitled = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
4756
}
57+
58+
// Instance level configuration parameters related to the Gemini Cloud Assist
59+
// product.
60+
message GCAInstanceConfig {
61+
// Output only. Represents the GCA entitlement state of the instance.
62+
GCAEntitlementType gca_entitlement = 1
63+
[(google.api.field_behavior) = OUTPUT_ONLY];
64+
}

0 commit comments

Comments
 (0)