datafusion.proto 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. // Copyright 2021 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.datafusion.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/longrunning/operations.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. option csharp_namespace = "Google.Cloud.DataFusion.V1";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/datafusion/v1;datafusion";
  25. option java_multiple_files = true;
  26. option java_package = "com.google.cloud.datafusion.v1";
  27. option php_namespace = "Google\\Cloud\\DataFusion\\V1";
  28. option ruby_package = "Google::Cloud::DataFusion::V1";
  29. option (google.api.resource_definition) = {
  30. type: "cloudkms.googleapis.com/CryptoKey"
  31. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
  32. };
  33. // Service for creating and managing Data Fusion instances.
  34. // Data Fusion enables ETL developers to build code-free, data integration
  35. // pipelines via a point-and-click UI.
  36. service DataFusion {
  37. option (google.api.default_host) = "datafusion.googleapis.com";
  38. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  39. // Lists possible versions for Data Fusion instances in the specified project
  40. // and location.
  41. rpc ListAvailableVersions(ListAvailableVersionsRequest) returns (ListAvailableVersionsResponse) {
  42. option (google.api.http) = {
  43. get: "/v1/{parent=projects/*/locations/*}/versions"
  44. };
  45. option (google.api.method_signature) = "parent";
  46. }
  47. // Lists Data Fusion instances in the specified project and location.
  48. rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
  49. option (google.api.http) = {
  50. get: "/v1/{parent=projects/*/locations/*}/instances"
  51. };
  52. }
  53. // Gets details of a single Data Fusion instance.
  54. rpc GetInstance(GetInstanceRequest) returns (Instance) {
  55. option (google.api.http) = {
  56. get: "/v1/{name=projects/*/locations/*/instances/*}"
  57. };
  58. }
  59. // Creates a new Data Fusion instance in the specified project and location.
  60. rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
  61. option (google.api.http) = {
  62. post: "/v1/{parent=projects/*/locations/*}/instances"
  63. body: "instance"
  64. };
  65. option (google.api.method_signature) = "parent,instance,instance_id";
  66. option (google.longrunning.operation_info) = {
  67. response_type: "Instance"
  68. metadata_type: "OperationMetadata"
  69. };
  70. }
  71. // Deletes a single Date Fusion instance.
  72. rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
  73. option (google.api.http) = {
  74. delete: "/v1/{name=projects/*/locations/*/instances/*}"
  75. };
  76. option (google.api.method_signature) = "name";
  77. option (google.longrunning.operation_info) = {
  78. response_type: "google.protobuf.Empty"
  79. metadata_type: "OperationMetadata"
  80. };
  81. }
  82. // Updates a single Data Fusion instance.
  83. rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
  84. option (google.api.http) = {
  85. patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
  86. body: "instance"
  87. };
  88. option (google.api.method_signature) = "instance,update_mask";
  89. option (google.longrunning.operation_info) = {
  90. response_type: "Instance"
  91. metadata_type: "OperationMetadata"
  92. };
  93. }
  94. // Restart a single Data Fusion instance.
  95. // At the end of an operation instance is fully restarted.
  96. rpc RestartInstance(RestartInstanceRequest) returns (google.longrunning.Operation) {
  97. option (google.api.http) = {
  98. post: "/v1/{name=projects/*/locations/*/instances/*}:restart"
  99. body: "*"
  100. };
  101. option (google.longrunning.operation_info) = {
  102. response_type: "Instance"
  103. metadata_type: "OperationMetadata"
  104. };
  105. }
  106. }
  107. // Network configuration for a Data Fusion instance. These configurations
  108. // are used for peering with the customer network. Configurations are optional
  109. // when a public Data Fusion instance is to be created. However, providing
  110. // these configurations allows several benefits, such as reduced network latency
  111. // while accessing the customer resources from managed Data Fusion instance
  112. // nodes, as well as access to the customer on-prem resources.
  113. message NetworkConfig {
  114. // Name of the network in the customer project with which the Tenant Project
  115. // will be peered for executing pipelines. In case of shared VPC where the
  116. // network resides in another host project the network should specified in
  117. // the form of projects/{host-project-id}/global/networks/{network}
  118. string network = 1;
  119. // The IP range in CIDR notation to use for the managed Data Fusion instance
  120. // nodes. This range must not overlap with any other ranges used in the
  121. // customer network.
  122. string ip_allocation = 2;
  123. }
  124. // The Data Fusion version. This proto message stores information about certain
  125. // Data Fusion version, which is used for Data Fusion version upgrade.
  126. message Version {
  127. // Each type represents the release availability of a CDF version
  128. enum Type {
  129. // Version does not have availability yet
  130. TYPE_UNSPECIFIED = 0;
  131. // Version is under development and not considered stable
  132. TYPE_PREVIEW = 1;
  133. // Version is available for public use
  134. TYPE_GENERAL_AVAILABILITY = 2;
  135. }
  136. // The version number of the Data Fusion instance, such as '6.0.1.0'.
  137. string version_number = 1;
  138. // Whether this is currently the default version for Cloud Data Fusion
  139. bool default_version = 2;
  140. // Represents a list of available feature names for a given version.
  141. repeated string available_features = 3;
  142. // Type represents the release availability of the version
  143. Type type = 4;
  144. }
  145. // Identifies Data Fusion accelerators for an instance.
  146. message Accelerator {
  147. // Each type represents an Accelerator (Add-On) supported by Cloud Data Fusion
  148. // service.
  149. enum AcceleratorType {
  150. // Default value, if unspecified.
  151. ACCELERATOR_TYPE_UNSPECIFIED = 0;
  152. // Change Data Capture accelerator for CDF.
  153. CDC = 1;
  154. // Cloud Healthcare accelerator for CDF. This accelerator is to enable Cloud
  155. // Healthcare specific CDF plugins developed by Healthcare team.
  156. HEALTHCARE = 2;
  157. // Contact Center AI Insights
  158. // This accelerator is used to enable import and export pipelines
  159. // custom built to streamline CCAI Insights processing.
  160. CCAI_INSIGHTS = 3;
  161. }
  162. // Different values possible for the state of an accelerator
  163. enum State {
  164. // Default value, do not use
  165. STATE_UNSPECIFIED = 0;
  166. // Indicates that the accelerator is enabled and available to use
  167. ENABLED = 1;
  168. // Indicates that the accelerator is disabled and not available to use
  169. DISABLED = 2;
  170. // Indicates that accelerator state is currently unknown.
  171. // Requests for enable, disable could be retried while in this state
  172. UNKNOWN = 3;
  173. }
  174. // The type of an accelator for a CDF instance.
  175. AcceleratorType accelerator_type = 1;
  176. // The state of the accelerator
  177. State state = 2;
  178. }
  179. // The crypto key configuration. This field is used by the Customer-managed
  180. // encryption keys (CMEK) feature.
  181. message CryptoKeyConfig {
  182. // The name of the key which is used to encrypt/decrypt customer data. For key
  183. // in Cloud KMS, the key should be in the format of
  184. // `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
  185. string key_reference = 1 [(google.api.resource_reference) = {
  186. type: "cloudkms.googleapis.com/CryptoKey"
  187. }];
  188. }
  189. // Represents a Data Fusion instance.
  190. message Instance {
  191. option (google.api.resource) = {
  192. type: "datafusion.googleapis.com/Instance"
  193. pattern: "projects/{project}/locations/{location}/instances/{instance}"
  194. };
  195. // Represents the type of Data Fusion instance. Each type is configured with
  196. // the default settings for processing and memory.
  197. enum Type {
  198. // No type specified. The instance creation will fail.
  199. TYPE_UNSPECIFIED = 0;
  200. // Basic Data Fusion instance. In Basic type, the user will be able to
  201. // create data pipelines using point and click UI. However, there are
  202. // certain limitations, such as fewer number of concurrent pipelines, no
  203. // support for streaming pipelines, etc.
  204. BASIC = 1;
  205. // Enterprise Data Fusion instance. In Enterprise type, the user will have
  206. // all features available, such as support for streaming pipelines, higher
  207. // number of concurrent pipelines, etc.
  208. ENTERPRISE = 2;
  209. // Developer Data Fusion instance. In Developer type, the user will have all
  210. // features available but with restrictive capabilities. This is to help
  211. // enterprises design and develop their data ingestion and integration
  212. // pipelines at low cost.
  213. DEVELOPER = 3;
  214. }
  215. // Represents the state of a Data Fusion instance
  216. enum State {
  217. // Instance does not have a state yet
  218. STATE_UNSPECIFIED = 0;
  219. // Instance is being created
  220. CREATING = 1;
  221. // Instance is active and ready for requests. This corresponds to 'RUNNING'
  222. // in datafusion.v1beta1.
  223. ACTIVE = 2;
  224. // Instance creation failed
  225. FAILED = 3;
  226. // Instance is being deleted
  227. DELETING = 4;
  228. // Instance is being upgraded
  229. UPGRADING = 5;
  230. // Instance is being restarted
  231. RESTARTING = 6;
  232. // Instance is being updated on customer request
  233. UPDATING = 7;
  234. // Instance is being auto-updated
  235. AUTO_UPDATING = 8;
  236. // Instance is being auto-upgraded
  237. AUTO_UPGRADING = 9;
  238. // Instance is disabled
  239. DISABLED = 10;
  240. }
  241. // The reason for disabling the instance if the state is DISABLED.
  242. enum DisabledReason {
  243. // This is an unknown reason for disabling.
  244. DISABLED_REASON_UNSPECIFIED = 0;
  245. // The KMS key used by the instance is either revoked or denied access to
  246. KMS_KEY_ISSUE = 1;
  247. }
  248. // Output only. The name of this instance is in the form of
  249. // projects/{project}/locations/{location}/instances/{instance}.
  250. string name = 1 [
  251. (google.api.field_behavior) = OUTPUT_ONLY,
  252. (google.api.resource_reference) = {
  253. type: "datafusion.googleapis.com/Instance"
  254. }
  255. ];
  256. // A description of this instance.
  257. string description = 2;
  258. // Required. Instance type.
  259. Type type = 3 [(google.api.field_behavior) = REQUIRED];
  260. // Option to enable Stackdriver Logging.
  261. bool enable_stackdriver_logging = 4;
  262. // Option to enable Stackdriver Monitoring.
  263. bool enable_stackdriver_monitoring = 5;
  264. // Specifies whether the Data Fusion instance should be private. If set to
  265. // true, all Data Fusion nodes will have private IP addresses and will not be
  266. // able to access the public internet.
  267. bool private_instance = 6;
  268. // Network configuration options. These are required when a private Data
  269. // Fusion instance is to be created.
  270. NetworkConfig network_config = 7;
  271. // The resource labels for instance to use to annotate any related underlying
  272. // resources such as Compute Engine VMs. The character '=' is not allowed to
  273. // be used within the labels.
  274. map<string, string> labels = 8;
  275. // Map of additional options used to configure the behavior of
  276. // Data Fusion instance.
  277. map<string, string> options = 9;
  278. // Output only. The time the instance was created.
  279. google.protobuf.Timestamp create_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  280. // Output only. The time the instance was last updated.
  281. google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  282. // Output only. The current state of this Data Fusion instance.
  283. State state = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  284. // Output only. Additional information about the current state of this Data
  285. // Fusion instance if available.
  286. string state_message = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  287. // Output only. Endpoint on which the Data Fusion UI is accessible.
  288. string service_endpoint = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
  289. // Name of the zone in which the Data Fusion instance will be created. Only
  290. // DEVELOPER instances use this field.
  291. string zone = 15;
  292. // Current version of the Data Fusion. Only specifiable in Update.
  293. string version = 16;
  294. // Output only. Deprecated. Use tenant_project_id instead to extract the tenant project ID.
  295. string service_account = 17 [
  296. deprecated = true,
  297. (google.api.field_behavior) = OUTPUT_ONLY
  298. ];
  299. // Display name for an instance.
  300. string display_name = 18;
  301. // Available versions that the instance can be upgraded to using
  302. // UpdateInstanceRequest.
  303. repeated Version available_version = 19;
  304. // Output only. Endpoint on which the REST APIs is accessible.
  305. string api_endpoint = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
  306. // Output only. Cloud Storage bucket generated by Data Fusion in the customer project.
  307. string gcs_bucket = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
  308. // List of accelerators enabled for this CDF instance.
  309. repeated Accelerator accelerators = 22;
  310. // Output only. P4 service account for the customer project.
  311. string p4_service_account = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
  312. // Output only. The name of the tenant project.
  313. string tenant_project_id = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
  314. // User-managed service account to set on Dataproc when Cloud Data Fusion
  315. // creates Dataproc to run data processing pipelines.
  316. //
  317. // This allows users to have fine-grained access control on Dataproc's
  318. // accesses to cloud resources.
  319. string dataproc_service_account = 25;
  320. // Option to enable granular role-based access control.
  321. bool enable_rbac = 27;
  322. // The crypto key configuration. This field is used by the Customer-Managed
  323. // Encryption Keys (CMEK) feature.
  324. CryptoKeyConfig crypto_key_config = 28;
  325. // Output only. If the instance state is DISABLED, the reason for disabling the instance.
  326. repeated DisabledReason disabled_reason = 29 [(google.api.field_behavior) = OUTPUT_ONLY];
  327. }
  328. // Request message for listing Data Fusion instances.
  329. message ListInstancesRequest {
  330. // Required. The project and location for which to retrieve instance information
  331. // in the format projects/{project}/locations/{location}. If the location is
  332. // specified as '-' (wildcard), then all regions available to the project
  333. // are queried, and the results are aggregated.
  334. string parent = 1 [
  335. (google.api.field_behavior) = REQUIRED,
  336. (google.api.resource_reference) = {
  337. type: "locations.googleapis.com/Location"
  338. }
  339. ];
  340. // The maximum number of items to return.
  341. int32 page_size = 2;
  342. // The next_page_token value to use if there are additional
  343. // results to retrieve for this list request.
  344. string page_token = 3;
  345. // List filter.
  346. string filter = 4;
  347. // Sort results. Supported values are "name", "name desc", or "" (unsorted).
  348. string order_by = 5;
  349. }
  350. // Response message for the list instance request.
  351. message ListInstancesResponse {
  352. // Represents a list of Data Fusion instances.
  353. repeated Instance instances = 1;
  354. // Token to retrieve the next page of results or empty if there are no more
  355. // results in the list.
  356. string next_page_token = 2;
  357. // Locations that could not be reached.
  358. repeated string unreachable = 3;
  359. }
  360. // Request message for the list available versions request.
  361. message ListAvailableVersionsRequest {
  362. // Required. The project and location for which to retrieve instance information
  363. // in the format projects/{project}/locations/{location}.
  364. string parent = 1 [
  365. (google.api.field_behavior) = REQUIRED,
  366. (google.api.resource_reference) = {
  367. type: "locations.googleapis.com/Location"
  368. }
  369. ];
  370. // The maximum number of items to return.
  371. int32 page_size = 2;
  372. // The next_page_token value to use if there are additional
  373. // results to retrieve for this list request.
  374. string page_token = 3;
  375. // Whether or not to return the latest patch of every available minor version.
  376. // If true, only the latest patch will be returned. Ex. if allowed versions is
  377. // [6.1.1, 6.1.2, 6.2.0] then response will be [6.1.2, 6.2.0]
  378. bool latest_patch_only = 4;
  379. }
  380. // Response message for the list available versions request.
  381. message ListAvailableVersionsResponse {
  382. // Represents a list of versions that are supported.
  383. repeated Version available_versions = 1;
  384. // Token to retrieve the next page of results or empty if there are no more
  385. // results in the list.
  386. string next_page_token = 2;
  387. }
  388. // Request message for getting details about a Data Fusion instance.
  389. message GetInstanceRequest {
  390. // Required. The instance resource name in the format
  391. // projects/{project}/locations/{location}/instances/{instance}.
  392. string name = 1 [
  393. (google.api.field_behavior) = REQUIRED,
  394. (google.api.resource_reference) = {
  395. type: "datafusion.googleapis.com/Instance"
  396. }
  397. ];
  398. }
  399. // Request message for creating a Data Fusion instance.
  400. message CreateInstanceRequest {
  401. // Required. The instance's project and location in the format
  402. // projects/{project}/locations/{location}.
  403. string parent = 1 [
  404. (google.api.field_behavior) = REQUIRED,
  405. (google.api.resource_reference) = {
  406. type: "locations.googleapis.com/Location"
  407. }
  408. ];
  409. // Required. The name of the instance to create.
  410. string instance_id = 2 [(google.api.field_behavior) = REQUIRED];
  411. // An instance resource.
  412. Instance instance = 3;
  413. }
  414. // Request message for deleting a Data Fusion instance.
  415. message DeleteInstanceRequest {
  416. // Required. The instance resource name in the format
  417. // projects/{project}/locations/{location}/instances/{instance}
  418. string name = 1 [
  419. (google.api.field_behavior) = REQUIRED,
  420. (google.api.resource_reference) = {
  421. type: "datafusion.googleapis.com/Instance"
  422. }
  423. ];
  424. }
  425. // Request message for updating a Data Fusion instance.
  426. // Data Fusion allows updating the labels, options, and stack driver settings.
  427. // This is also used for CDF version upgrade.
  428. message UpdateInstanceRequest {
  429. // Required. The instance resource that replaces the resource on the server. Currently,
  430. // Data Fusion only allows replacing labels, options, and stack driver
  431. // settings. All other fields will be ignored.
  432. Instance instance = 1 [(google.api.field_behavior) = REQUIRED];
  433. // Field mask is used to specify the fields that the update will overwrite
  434. // in an instance resource. The fields specified in the update_mask are
  435. // relative to the resource, not the full request.
  436. // A field will be overwritten if it is in the mask.
  437. // If the user does not provide a mask, all the supported fields (labels,
  438. // options, and version currently) will be overwritten.
  439. google.protobuf.FieldMask update_mask = 2;
  440. }
  441. // Request message for restarting a Data Fusion instance.
  442. message RestartInstanceRequest {
  443. // Required. Name of the Data Fusion instance which need to be restarted in the form of
  444. // projects/{project}/locations/{location}/instances/{instance}
  445. string name = 1 [
  446. (google.api.field_behavior) = REQUIRED,
  447. (google.api.resource_reference) = {
  448. type: "datafusion.googleapis.com/Instance"
  449. }
  450. ];
  451. }
  452. // Represents the metadata of a long-running operation.
  453. message OperationMetadata {
  454. // The time the operation was created.
  455. google.protobuf.Timestamp create_time = 1;
  456. // The time the operation finished running.
  457. google.protobuf.Timestamp end_time = 2;
  458. // Server-defined resource path for the target of the operation.
  459. string target = 3;
  460. // Name of the verb executed by the operation.
  461. string verb = 4;
  462. // Human-readable status of the operation if any.
  463. string status_detail = 5;
  464. // Identifies whether the user has requested cancellation
  465. // of the operation. Operations that have successfully been cancelled
  466. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  467. // corresponding to `Code.CANCELLED`.
  468. bool requested_cancellation = 6;
  469. // API version used to start the operation.
  470. string api_version = 7;
  471. // Map to hold any additional status info for the operation
  472. // If there is an accelerator being enabled/disabled/deleted, this will be
  473. // populated with accelerator name as key and status as
  474. // ENABLING, DISABLING or DELETING
  475. map<string, string> additional_status = 8;
  476. }