1- // Copyright 2022 Google LLC
1+ // Copyright 2023 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.
@@ -56,7 +56,8 @@ service ConnectionService {
5656 }
5757
5858 // Returns a list of connections in the given project.
59- rpc ListConnections (ListConnectionsRequest ) returns (ListConnectionsResponse ) {
59+ rpc ListConnections (ListConnectionsRequest )
60+ returns (ListConnectionsResponse ) {
6061 option (google.api.http ) = {
6162 get : "/v1/{parent=projects/*/locations/*}/connections"
6263 };
@@ -74,7 +75,8 @@ service ConnectionService {
7475 }
7576
7677 // Deletes connection and associated credential.
77- rpc DeleteConnection (DeleteConnectionRequest ) returns (google.protobuf.Empty ) {
78+ rpc DeleteConnection (DeleteConnectionRequest )
79+ returns (google.protobuf.Empty ) {
7880 option (google.api.http ) = {
7981 delete : "/v1/{name=projects/*/locations/*/connections/*}"
8082 };
@@ -84,7 +86,8 @@ service ConnectionService {
8486 // Gets the access control policy for a resource.
8587 // Returns an empty policy if the resource exists and does not have a policy
8688 // set.
87- rpc GetIamPolicy (google.iam.v1.GetIamPolicyRequest ) returns (google.iam.v1.Policy ) {
89+ rpc GetIamPolicy (google.iam.v1.GetIamPolicyRequest )
90+ returns (google.iam.v1.Policy ) {
8891 option (google.api.http ) = {
8992 post : "/v1/{resource=projects/*/locations/*/connections/*}:getIamPolicy"
9093 body : "*"
@@ -96,7 +99,8 @@ service ConnectionService {
9699 // existing policy.
97100 //
98101 // Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
99- rpc SetIamPolicy (google.iam.v1.SetIamPolicyRequest ) returns (google.iam.v1.Policy ) {
102+ rpc SetIamPolicy (google.iam.v1.SetIamPolicyRequest )
103+ returns (google.iam.v1.Policy ) {
100104 option (google.api.http ) = {
101105 post : "/v1/{resource=projects/*/locations/*/connections/*}:setIamPolicy"
102106 body : "*"
@@ -111,7 +115,8 @@ service ConnectionService {
111115 // Note: This operation is designed to be used for building permission-aware
112116 // UIs and command-line tools, not for authorization checking. This operation
113117 // may "fail open" without warning.
114- rpc TestIamPermissions (google.iam.v1.TestIamPermissionsRequest ) returns (google.iam.v1.TestIamPermissionsResponse ) {
118+ rpc TestIamPermissions (google.iam.v1.TestIamPermissionsRequest )
119+ returns (google.iam.v1.TestIamPermissionsResponse ) {
115120 option (google.api.http ) = {
116121 post : "/v1/{resource=projects/*/locations/*/connections/*}:testIamPermissions"
117122 body : "*"
@@ -120,7 +125,8 @@ service ConnectionService {
120125 }
121126}
122127
123- // The request for [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection].
128+ // The request for
129+ // [ConnectionService.CreateConnection][google.cloud.bigquery.connection.v1.ConnectionService.CreateConnection].
124130message CreateConnectionRequest {
125131 // Required. Parent resource name.
126132 // Must be in the format `projects/{project_id}/locations/{location_id}`
@@ -138,7 +144,8 @@ message CreateConnectionRequest {
138144 Connection connection = 3 [(google.api.field_behavior ) = REQUIRED ];
139145}
140146
141- // The request for [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1.ConnectionService.GetConnection].
147+ // The request for
148+ // [ConnectionService.GetConnection][google.cloud.bigquery.connection.v1.ConnectionService.GetConnection].
142149message GetConnectionRequest {
143150 // Required. Name of the requested connection, for example:
144151 // `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
@@ -150,7 +157,8 @@ message GetConnectionRequest {
150157 ];
151158}
152159
153- // The request for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections].
160+ // The request for
161+ // [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections].
154162message ListConnectionsRequest {
155163 // Required. Parent resource name.
156164 // Must be in the form: `projects/{project_id}/locations/{location_id}`
@@ -168,7 +176,8 @@ message ListConnectionsRequest {
168176 string page_token = 3 ;
169177}
170178
171- // The response for [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections].
179+ // The response for
180+ // [ConnectionService.ListConnections][google.cloud.bigquery.connection.v1.ConnectionService.ListConnections].
172181message ListConnectionsResponse {
173182 // Next page token.
174183 string next_page_token = 1 ;
@@ -177,7 +186,8 @@ message ListConnectionsResponse {
177186 repeated Connection connections = 2 ;
178187}
179188
180- // The request for [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection].
189+ // The request for
190+ // [ConnectionService.UpdateConnection][google.cloud.bigquery.connection.v1.ConnectionService.UpdateConnection].
181191message UpdateConnectionRequest {
182192 // Required. Name of the connection to update, for example:
183193 // `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
@@ -192,7 +202,8 @@ message UpdateConnectionRequest {
192202 Connection connection = 2 [(google.api.field_behavior ) = REQUIRED ];
193203
194204 // Required. Update mask for the connection fields to be updated.
195- google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior ) = REQUIRED ];
205+ google.protobuf.FieldMask update_mask = 3
206+ [(google.api.field_behavior ) = REQUIRED ];
196207}
197208
198209// The request for [ConnectionService.DeleteConnectionRequest][].
@@ -279,10 +290,11 @@ message CloudSqlProperties {
279290 // Input only. Cloud SQL credential.
280291 CloudSqlCredential credential = 4 [(google.api.field_behavior ) = INPUT_ONLY ];
281292
282- // Output only. The account ID of the service used for the purpose of this connection.
293+ // Output only. The account ID of the service used for the purpose of this
294+ // connection.
283295 //
284296 // When the connection is used in the context of an operation in
285- // BigQuery, this service account will serve as identity being used for
297+ // BigQuery, this service account will serve as the identity being used for
286298 // connecting to the CloudSQL instance specified in this connection.
287299 string service_account_id = 5 [(google.api.field_behavior ) = OUTPUT_ONLY ];
288300}
@@ -303,6 +315,25 @@ message CloudSpannerProperties {
303315
304316 // If parallelism should be used when reading from Cloud Spanner
305317 bool use_parallelism = 2 ;
318+
319+ // If the serverless analytics service should be used to read data from Cloud
320+ // Spanner.
321+ // Note: `use_parallelism` must be set when using serverless analytics.
322+ bool use_serverless_analytics = 3 ;
323+
324+ // Optional. Cloud Spanner database role for fine-grained access control.
325+ // A database role is a collection of fine-grained access privileges. Example:
326+ // Admin predefines roles that provides user a set of permissions (SELECT,
327+ // INSERT, ..). The user can then specify a predefined role on a connection to
328+ // execute their Cloud Spanner query. The role is passthrough here. If the
329+ // user is not authorized to use the specified role, they get an error. This
330+ // validation happens on Cloud Spanner.
331+ //
332+ // See https://cloud.google.com/spanner/docs/fgac-about for more details.
333+ //
334+ // REQUIRES: database role name must start with uppercase/lowercase letter
335+ // and only contain uppercase/lowercase letters, numbers, and underscores.
336+ string database_role = 4 [(google.api.field_behavior ) = OPTIONAL ];
306337}
307338
308339// Connection properties specific to Amazon Web Services (AWS).
@@ -330,8 +361,9 @@ message AwsCrossAccountRole {
330361 // Output only. Google-owned AWS IAM User for a Connection.
331362 string iam_user_id = 2 [(google.api.field_behavior ) = OUTPUT_ONLY ];
332363
333- // Output only. A Google-generated id for representing Connection’s identity in AWS.
334- // External Id is also used for preventing the Confused Deputy Problem. See
364+ // Output only. A Google-generated id for representing Connection’s identity
365+ // in AWS. External Id is also used for preventing the Confused Deputy
366+ // Problem. See
335367 // https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html
336368 string external_id = 3 [(google.api.field_behavior ) = OUTPUT_ONLY ];
337369}
@@ -366,20 +398,21 @@ message AzureProperties {
366398 // setup.
367399 string redirect_uri = 5 ;
368400
369- // The client id of the user's Azure Active Directory Application used for a
401+ // The client ID of the user's Azure Active Directory Application used for a
370402 // federated connection.
371403 string federated_application_client_id = 6 ;
372404
373- // Output only. A unique Google-owned and Google-generated identity for the Connection.
374- // This identity will be used to access the user's Azure Active Directory
375- // Application.
405+ // Output only. A unique Google-owned and Google-generated identity for the
406+ // Connection. This identity will be used to access the user's Azure Active
407+ // Directory Application.
376408 string identity = 7 [(google.api.field_behavior ) = OUTPUT_ONLY ];
377409}
378410
379411// Container for connection properties for delegation of access to GCP
380412// resources.
381413message CloudResourceProperties {
382- // Output only. The account ID of the service created for the purpose of this connection.
414+ // Output only. The account ID of the service created for the purpose of this
415+ // connection.
383416 //
384417 // The service account does not have any permissions associated with it
385418 // when it is created. After creation, customers delegate permissions
0 commit comments