connector_version.proto 7.6 KB

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