1// Copyright 2023 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 15syntax = "proto3"; 16 17package google.cloud.connectors.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/connectors/v1/authconfig.proto"; 22import "google/cloud/connectors/v1/common.proto"; 23import "google/cloud/connectors/v1/ssl_config.proto"; 24import "google/protobuf/timestamp.proto"; 25 26option go_package = "cloud.google.com/go/connectors/apiv1/connectorspb;connectorspb"; 27option java_multiple_files = true; 28option java_outer_classname = "ConnectorVersionProto"; 29option java_package = "com.google.cloud.connectors.v1"; 30 31// ConnectorVersion indicates a specific version of a connector. 32message ConnectorVersion { 33 option (google.api.resource) = { 34 type: "connectors.googleapis.com/ConnectorVersion" 35 pattern: "projects/{project}/locations/{location}/providers/{provider}/connectors/{connector}/versions/{version}" 36 }; 37 38 // Output only. Resource name of the Version. 39 // Format: 40 // projects/{project}/locations/{location}/providers/{provider}/connectors/{connector}/versions/{version} 41 // Only global location is supported for Connector resource. 42 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 43 44 // Output only. Created time. 45 google.protobuf.Timestamp create_time = 2 46 [(google.api.field_behavior) = OUTPUT_ONLY]; 47 48 // Output only. Updated time. 49 google.protobuf.Timestamp update_time = 3 50 [(google.api.field_behavior) = OUTPUT_ONLY]; 51 52 // Output only. Resource labels to represent user-provided metadata. 53 // Refer to cloud documentation on labels for more details. 54 // https://cloud.google.com/compute/docs/labeling-resources 55 map<string, string> labels = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 56 57 // Output only. Flag to mark the version indicating the launch stage. 58 LaunchStage launch_stage = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 59 60 // Output only. ReleaseVersion of the connector, for example: "1.0.1-alpha". 61 string release_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 62 63 // Output only. List of auth configs supported by the Connector Version. 64 repeated AuthConfigTemplate auth_config_templates = 8 65 [(google.api.field_behavior) = OUTPUT_ONLY]; 66 67 // Output only. List of config variables needed to create a connection. 68 repeated ConfigVariableTemplate config_variable_templates = 9 69 [(google.api.field_behavior) = OUTPUT_ONLY]; 70 71 // Output only. Information about the runtime features supported by the 72 // Connector. 73 SupportedRuntimeFeatures supported_runtime_features = 10 74 [(google.api.field_behavior) = OUTPUT_ONLY]; 75 76 // Output only. Display name. 77 string display_name = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 78 79 // Output only. Configuration for Egress Control. 80 EgressControlConfig egress_control_config = 12 81 [(google.api.field_behavior) = OUTPUT_ONLY]; 82 83 // Output only. Role grant configurations for this connector version. 84 repeated RoleGrant role_grants = 14 85 [(google.api.field_behavior) = OUTPUT_ONLY]; 86 87 // Output only. Role grant configuration for this config variable. It will be 88 // DEPRECATED soon. 89 RoleGrant role_grant = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; 90 91 // Output only. Ssl configuration supported by the Connector. 92 SslConfigTemplate ssl_config_template = 17 93 [(google.api.field_behavior) = OUTPUT_ONLY]; 94} 95 96// Request message for Connectors.GetConnectorVersion. 97message GetConnectorVersionRequest { 98 // Required. Resource name of the form: 99 // `projects/*/locations/*/providers/*/connectors/*/versions/*` 100 // Only global location is supported for ConnectorVersion resource. 101 string name = 1 [ 102 (google.api.field_behavior) = REQUIRED, 103 (google.api.resource_reference) = { 104 type: "connectors.googleapis.com/ConnectorVersion" 105 } 106 ]; 107 108 // Specifies which fields of the ConnectorVersion are returned in the 109 // response. Defaults to `CUSTOMER` view. 110 ConnectorVersionView view = 2; 111} 112 113// Request message for Connectors.ListConnectorVersions. 114message ListConnectorVersionsRequest { 115 // Required. Parent resource of the connectors, of the form: 116 // `projects/*/locations/*/providers/*/connectors/*` 117 // Only global location is supported for ConnectorVersion resource. 118 string parent = 1 [ 119 (google.api.field_behavior) = REQUIRED, 120 (google.api.resource_reference) = { 121 type: "connectors.googleapis.com/Connector" 122 } 123 ]; 124 125 // Page size. 126 int32 page_size = 2; 127 128 // Page token. 129 string page_token = 3; 130 131 // Specifies which fields of the ConnectorVersion are returned in the 132 // response. Defaults to `BASIC` view. 133 ConnectorVersionView view = 4; 134} 135 136// Response message for Connectors.ListConnectorVersions. 137message ListConnectorVersionsResponse { 138 // A list of connector versions. 139 repeated ConnectorVersion connector_versions = 1; 140 141 // Next page token. 142 string next_page_token = 2; 143 144 // Locations that could not be reached. 145 repeated string unreachable = 3; 146} 147 148// Supported runtime features of a connector version. This is passed to the 149// management layer to add a new connector version by the connector developer. 150// Details about how this proto is passed to the management layer is covered in 151// this doc - go/runtime-manifest. 152message SupportedRuntimeFeatures { 153 // Specifies if the connector supports entity apis like 'createEntity'. 154 bool entity_apis = 1; 155 156 // Specifies if the connector supports action apis like 'executeAction'. 157 bool action_apis = 2; 158 159 // Specifies if the connector supports 'ExecuteSqlQuery' operation. 160 bool sql_query = 3; 161} 162 163// Egress control config for connector runtime. These configurations define the 164// rules to identify which outbound domains/hosts needs to be whitelisted. It 165// may be a static information for a particular connector version or it is 166// derived from the configurations provided by the customer in Connection 167// resource. 168message EgressControlConfig { 169 oneof oneof_backends { 170 // Static Comma separated backends which are common for all Connection 171 // resources. Supported formats for each backend are host:port or just 172 // host (host can be ip address or domain name). 173 string backends = 1; 174 175 // Extractions Rules to extract the backends from customer provided 176 // configuration. 177 ExtractionRules extraction_rules = 2; 178 } 179} 180 181// Extraction Rules to identity the backends from customer provided 182// configuration in Connection resource. 183message ExtractionRules { 184 // Collection of Extraction Rule. 185 repeated ExtractionRule extraction_rule = 1; 186} 187 188// Extraction Rule. 189message ExtractionRule { 190 // Source to extract the backend from. 191 message Source { 192 // Type of the source. 193 SourceType source_type = 1; 194 195 // Field identifier. For example config vaiable name. 196 string field_id = 2; 197 } 198 199 // Supported Source types for extraction. 200 enum SourceType { 201 // Default SOURCE. 202 SOURCE_TYPE_UNSPECIFIED = 0; 203 204 // Config Variable source type. 205 CONFIG_VARIABLE = 1; 206 } 207 208 // Source on which the rule is applied. 209 Source source = 1; 210 211 // Regex used to extract backend details from source. If empty, whole source 212 // value will be used. 213 string extraction_regex = 2; 214} 215 216// Enum to control which fields should be included in the response. 217enum ConnectorVersionView { 218 // CONNECTOR_VERSION_VIEW_UNSPECIFIED. 219 CONNECTOR_VERSION_VIEW_UNSPECIFIED = 0; 220 221 // Do not include role grant configs. 222 CONNECTOR_VERSION_VIEW_BASIC = 1; 223 224 // Include role grant configs. 225 CONNECTOR_VERSION_VIEW_FULL = 2; 226} 227