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