Skip to content

Commit dfda765

Browse files
Google APIscopybara-github
authored andcommitted
fix!: removed password field from SshPublicKey message
feat: added display_name field in AuthConfigTemplate message feat: added description field in AuthConfigTemplate message feat: added OAUTH2_AUTH_CODE_FLOW in AuthType enum feat: added is_advanced field in ConfigVariableTemplate message feat: added PRIVATE_PREVIEW in LaunchStage enum feat: added SslConfig in Connection message feat: added name field in ConnectionSchemaMetadata message feat: added update_time field in ConnectionSchemaMetadata message feat: added refresh_time field in ConnectionSchemaMetadata message feat: added state field in ConnectionSchemaMetadata message fix!: fix the resource reference to ConnectionSchemaMetadata resource. feat: added a refreshConnectionSchema API feat: added AUTHORIZATION_REQUIRED in State enum feat: added SslConfigTemplate field in ConnectorVersion message feat: added a GetGlobalSettings API PiperOrigin-RevId: 519106228
1 parent 71bd02e commit dfda765

13 files changed

Lines changed: 386 additions & 72 deletions

google/cloud/connectors/v1/BUILD.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ proto_library(
3030
"destination_config.proto",
3131
"provider.proto",
3232
"runtime.proto",
33+
"settings.proto",
34+
"ssl_config.proto",
3335
],
3436
deps = [
3537
"//google/api:annotations_proto",
@@ -85,9 +87,9 @@ java_gapic_library(
8587
rest_numeric_enums = True,
8688
service_yaml = "connectors_v1.yaml",
8789
test_deps = [
88-
":connectors_java_grpc",
8990
"//google/cloud/location:location_java_grpc",
9091
"//google/iam/v1:iam_java_grpc",
92+
":connectors_java_grpc",
9193
],
9294
transport = "grpc+rest",
9395
deps = [
@@ -321,9 +323,7 @@ ruby_grpc_library(
321323
ruby_cloud_gapic_library(
322324
name = "connectors_ruby_gapic",
323325
srcs = [":connectors_proto_with_info"],
324-
extra_protoc_parameters = [
325-
"ruby-cloud-gem-name=google-cloud-connectors-v1",
326-
],
326+
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-connectors-v1"],
327327
grpc_service_config = "connectors_grpc_service_config.json",
328328
rest_numeric_enums = True,
329329
service_yaml = "connectors_v1.yaml",

google/cloud/connectors/v1/authconfig.proto

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -75,10 +75,6 @@ message AuthConfig {
7575
// The user account used to authenticate.
7676
string username = 1;
7777

78-
// This is an optional field used in case client has enabled multi-factor
79-
// authentication
80-
Secret password = 2;
81-
8278
// SSH Client Cert. It should contain both public and private key.
8379
Secret ssh_client_cert = 3;
8480

@@ -118,6 +114,12 @@ message AuthConfigTemplate {
118114

119115
// Config variables to describe an `AuthConfig` for a `Connection`.
120116
repeated ConfigVariableTemplate config_variable_templates = 2;
117+
118+
// Display name for authentication template.
119+
string display_name = 3;
120+
121+
// Connector specific description for an authentication template.
122+
string description = 4;
121123
}
122124

123125
// AuthType defines different authentication types.
@@ -137,4 +139,7 @@ enum AuthType {
137139

138140
// SSH Public Key Authentication
139141
SSH_PUBLIC_KEY = 4;
142+
143+
// Oauth 2.0 Authorization Code Flow
144+
OAUTH2_AUTH_CODE_FLOW = 5;
140145
}

google/cloud/connectors/v1/common.proto

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -27,10 +27,12 @@ option java_package = "com.google.cloud.connectors.v1";
2727
// Represents the metadata of the long-running operation.
2828
message OperationMetadata {
2929
// Output only. The time the operation was created.
30-
google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
30+
google.protobuf.Timestamp create_time = 1
31+
[(google.api.field_behavior) = OUTPUT_ONLY];
3132

3233
// Output only. The time the operation finished running.
33-
google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
34+
google.protobuf.Timestamp end_time = 2
35+
[(google.api.field_behavior) = OUTPUT_ONLY];
3436

3537
// Output only. Server-defined resource path for the target of the operation.
3638
string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -43,8 +45,9 @@ message OperationMetadata {
4345

4446
// Output only. Identifies whether the user has requested cancellation
4547
// of the operation. Operations that have successfully been cancelled
46-
// have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
47-
// corresponding to `Code.CANCELLED`.
48+
// have [Operation.error][] value with a
49+
// [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
50+
// `Code.CANCELLED`.
4851
bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
4952

5053
// Output only. API version used to start the operation.
@@ -123,6 +126,9 @@ message ConfigVariableTemplate {
123126

124127
// State of the config variable.
125128
State state = 10;
129+
130+
// Indicates if current template is part of advanced settings
131+
bool is_advanced = 11;
126132
}
127133

128134
// Secret provides a reference to entries in Secret Manager.
@@ -242,7 +248,7 @@ message AuthorizationCodeLink {
242248
}
243249

244250
// LaunchStage is a enum to indicate launch stage:
245-
// PREVIEW, GA, DEPRECATED.
251+
// PREVIEW, GA, DEPRECATED, PRIVATE_PREVIEW.
246252
enum LaunchStage {
247253
// LAUNCH_STAGE_UNSPECIFIED.
248254
LAUNCH_STAGE_UNSPECIFIED = 0;
@@ -255,4 +261,7 @@ enum LaunchStage {
255261

256262
// DEPRECATED.
257263
DEPRECATED = 3;
264+
265+
// PRIVATE_PREVIEW.
266+
PRIVATE_PREVIEW = 5;
258267
}

google/cloud/connectors/v1/connection.proto

Lines changed: 102 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -21,6 +21,7 @@ import "google/api/resource.proto";
2121
import "google/cloud/connectors/v1/authconfig.proto";
2222
import "google/cloud/connectors/v1/common.proto";
2323
import "google/cloud/connectors/v1/destination_config.proto";
24+
import "google/cloud/connectors/v1/ssl_config.proto";
2425
import "google/protobuf/field_mask.proto";
2526
import "google/protobuf/struct.proto";
2627
import "google/protobuf/timestamp.proto";
@@ -42,10 +43,12 @@ message Connection {
4243
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
4344

4445
// Output only. Created time.
45-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
46+
google.protobuf.Timestamp create_time = 2
47+
[(google.api.field_behavior) = OUTPUT_ONLY];
4648

4749
// Output only. Updated time.
48-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
50+
google.protobuf.Timestamp update_time = 3
51+
[(google.api.field_behavior) = OUTPUT_ONLY];
4952

5053
// Optional. Resource labels to represent user-provided metadata.
5154
// Refer to cloud documentation on labels for more details.
@@ -69,19 +72,23 @@ message Connection {
6972
// Output only. Current status of the connection.
7073
ConnectionStatus status = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
7174

72-
// Optional. Configuration for configuring the connection with an external system.
73-
repeated ConfigVariable config_variables = 8 [(google.api.field_behavior) = OPTIONAL];
75+
// Optional. Configuration for configuring the connection with an external
76+
// system.
77+
repeated ConfigVariable config_variables = 8
78+
[(google.api.field_behavior) = OPTIONAL];
7479

75-
// Optional. Configuration for establishing the connection's authentication with an
76-
// external system.
80+
// Optional. Configuration for establishing the connection's authentication
81+
// with an external system.
7782
AuthConfig auth_config = 9 [(google.api.field_behavior) = OPTIONAL];
7883

79-
// Optional. Configuration that indicates whether or not the Connection can be edited.
84+
// Optional. Configuration that indicates whether or not the Connection can be
85+
// edited.
8086
LockConfig lock_config = 10 [(google.api.field_behavior) = OPTIONAL];
8187

82-
// Optional. Configuration of the Connector's destination. Only accepted for Connectors
83-
// that accepts user defined destination(s).
84-
repeated DestinationConfig destination_configs = 18 [(google.api.field_behavior) = OPTIONAL];
88+
// Optional. Configuration of the Connector's destination. Only accepted for
89+
// Connectors that accepts user defined destination(s).
90+
repeated DestinationConfig destination_configs = 18
91+
[(google.api.field_behavior) = OPTIONAL];
8592

8693
// Output only. GCR location where the runtime image is stored.
8794
// formatted like: gcr.io/{bucketName}/{imageName}
@@ -103,11 +110,14 @@ message Connection {
103110
// Optional. Suspended indicates if a user has suspended a connection or not.
104111
bool suspended = 17 [(google.api.field_behavior) = OPTIONAL];
105112

106-
// Optional. Configuration for the connection.
113+
// Optional. Node configuration for the connection.
107114
NodeConfig node_config = 19 [(google.api.field_behavior) = OPTIONAL];
115+
116+
// Optional. Ssl config of a connection
117+
SslConfig ssl_config = 21 [(google.api.field_behavior) = OPTIONAL];
108118
}
109119

110-
// Configuration for the connection.
120+
// Node configuration for the connection.
111121
message NodeConfig {
112122
// Minimum number of nodes in the runtime nodes.
113123
int32 min_node_count = 1;
@@ -116,13 +126,49 @@ message NodeConfig {
116126
int32 max_node_count = 2;
117127
}
118128

119-
// Metadata of connection schema.
129+
// ConnectionSchemaMetadata is the singleton resource of each connection.
130+
// It includes the entity and action names of runtime resources exposed
131+
// by a connection backend.
120132
message ConnectionSchemaMetadata {
133+
option (google.api.resource) = {
134+
type: "connectors.googleapis.com/ConnectionSchemaMetadata"
135+
pattern: "projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata"
136+
};
137+
138+
// State of connection runtime schema.
139+
enum State {
140+
// Default state.
141+
STATE_UNSPECIFIED = 0;
142+
143+
// Schema refresh is in progress.
144+
REFRESHING = 1;
145+
146+
// Schema has been updated.
147+
UPDATED = 2;
148+
}
149+
121150
// Output only. List of entity names.
122151
repeated string entities = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
123152

124153
// Output only. List of actions.
125154
repeated string actions = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
155+
156+
// Output only. Resource name.
157+
// Format:
158+
// projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata
159+
string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
160+
161+
// Output only. Timestamp when the connection runtime schema was updated.
162+
google.protobuf.Timestamp update_time = 4
163+
[(google.api.field_behavior) = OUTPUT_ONLY];
164+
165+
// Output only. Timestamp when the connection runtime schema refresh was
166+
// triggered.
167+
google.protobuf.Timestamp refresh_time = 5
168+
[(google.api.field_behavior) = OUTPUT_ONLY];
169+
170+
// Output only. The current state of runtime schema.
171+
State state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
126172
}
127173

128174
// Schema of a runtime entity.
@@ -202,10 +248,12 @@ message RuntimeActionSchema {
202248
string action = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
203249

204250
// Output only. List of input parameter metadata for the action.
205-
repeated InputParameter input_parameters = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
251+
repeated InputParameter input_parameters = 2
252+
[(google.api.field_behavior) = OUTPUT_ONLY];
206253

207254
// Output only. List of result field metadata.
208-
repeated ResultMetadata result_metadata = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
255+
repeated ResultMetadata result_metadata = 3
256+
[(google.api.field_behavior) = OUTPUT_ONLY];
209257
}
210258

211259
// Determines whether or no a connection is locked. If locked, a reason must be
@@ -285,8 +333,8 @@ message CreateConnectionRequest {
285333
}
286334
];
287335

288-
// Required. Identifier to assign to the Connection. Must be unique within scope of
289-
// the parent resource.
336+
// Required. Identifier to assign to the Connection. Must be unique within
337+
// scope of the parent resource.
290338
string connection_id = 2 [(google.api.field_behavior) = REQUIRED];
291339

292340
// Required. Connection resource.
@@ -298,12 +346,24 @@ message UpdateConnectionRequest {
298346
// Required. Connection resource.
299347
Connection connection = 1 [(google.api.field_behavior) = REQUIRED];
300348

301-
// Required. Field mask is used to specify the fields to be overwritten in the
302-
// Connection resource by the update.
303-
// The fields specified in the update_mask are relative to the resource, not
304-
// the full request. A field will be overwritten if it is in the mask. If the
305-
// user does not provide a mask then all fields will be overwritten.
306-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
349+
// Required. You can modify only the fields listed below.
350+
//
351+
// To lock/unlock a connection:
352+
// * `lock_config`
353+
//
354+
// To suspend/resume a connection:
355+
// * `suspended`
356+
//
357+
// To update the connection details:
358+
// * `description`
359+
// * `labels`
360+
// * `connector_version`
361+
// * `config_variables`
362+
// * `auth_config`
363+
// * `destination_configs`
364+
// * `node_config`
365+
google.protobuf.FieldMask update_mask = 2
366+
[(google.api.field_behavior) = REQUIRED];
307367
}
308368

309369
// Request message for ConnectorsService.DeleteConnection.
@@ -326,7 +386,20 @@ message GetConnectionSchemaMetadataRequest {
326386
string name = 1 [
327387
(google.api.field_behavior) = REQUIRED,
328388
(google.api.resource_reference) = {
329-
type: "connectors.googleapis.com/Connection"
389+
type: "connectors.googleapis.com/ConnectionSchemaMetadata"
390+
}
391+
];
392+
}
393+
394+
// Request message for ConnectorsService.RefreshConnectionSchemaMetadata.
395+
message RefreshConnectionSchemaMetadataRequest {
396+
// Required. Resource name.
397+
// Format:
398+
// projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata
399+
string name = 1 [
400+
(google.api.field_behavior) = REQUIRED,
401+
(google.api.resource_reference) = {
402+
type: "connectors.googleapis.com/ConnectionSchemaMetadata"
330403
}
331404
];
332405
}
@@ -433,6 +506,10 @@ message ConnectionStatus {
433506

434507
// Connection is not running due to an error.
435508
ERROR = 6;
509+
510+
// Connection is not running due to an auth error for the Oauth2 Auth Code
511+
// based connector.
512+
AUTHORIZATION_REQUIRED = 7;
436513
}
437514

438515
// State.

google/cloud/connectors/v1/connector.proto

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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.
@@ -40,10 +40,12 @@ message Connector {
4040
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
4141

4242
// Output only. Created time.
43-
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
43+
google.protobuf.Timestamp create_time = 2
44+
[(google.api.field_behavior) = OUTPUT_ONLY];
4445

4546
// Output only. Updated time.
46-
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
47+
google.protobuf.Timestamp update_time = 3
48+
[(google.api.field_behavior) = OUTPUT_ONLY];
4749

4850
// Output only. Resource labels to represent user-provided metadata.
4951
// Refer to cloud documentation on labels for more details.

0 commit comments

Comments
 (0)