xref: /aosp_15_r20/external/googleapis/google/cloud/dataplex/v1/service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
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.dataplex.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/cloud/dataplex/v1/analyze.proto";
24import "google/cloud/dataplex/v1/resources.proto";
25import "google/cloud/dataplex/v1/tasks.proto";
26import "google/longrunning/operations.proto";
27import "google/protobuf/empty.proto";
28import "google/protobuf/field_mask.proto";
29import "google/protobuf/timestamp.proto";
30
31option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb";
32option java_multiple_files = true;
33option java_outer_classname = "ServiceProto";
34option java_package = "com.google.cloud.dataplex.v1";
35
36// Dataplex service provides data lakes as a service. The primary resources
37// offered by this service are Lakes, Zones and Assets which collectively allow
38// a data administrator to organize, manage, secure and catalog data across
39// their organization located across cloud projects in a variety of storage
40// systems including Cloud Storage and BigQuery.
41service DataplexService {
42  option (google.api.default_host) = "dataplex.googleapis.com";
43  option (google.api.oauth_scopes) =
44      "https://www.googleapis.com/auth/cloud-platform";
45
46  // Creates a lake resource.
47  rpc CreateLake(CreateLakeRequest) returns (google.longrunning.Operation) {
48    option (google.api.http) = {
49      post: "/v1/{parent=projects/*/locations/*}/lakes"
50      body: "lake"
51    };
52    option (google.api.method_signature) = "parent,lake,lake_id";
53    option (google.longrunning.operation_info) = {
54      response_type: "Lake"
55      metadata_type: "OperationMetadata"
56    };
57  }
58
59  // Updates a lake resource.
60  rpc UpdateLake(UpdateLakeRequest) returns (google.longrunning.Operation) {
61    option (google.api.http) = {
62      patch: "/v1/{lake.name=projects/*/locations/*/lakes/*}"
63      body: "lake"
64    };
65    option (google.api.method_signature) = "lake,update_mask";
66    option (google.longrunning.operation_info) = {
67      response_type: "Lake"
68      metadata_type: "OperationMetadata"
69    };
70  }
71
72  // Deletes a lake resource. All zones within the lake must be deleted before
73  // the lake can be deleted.
74  rpc DeleteLake(DeleteLakeRequest) returns (google.longrunning.Operation) {
75    option (google.api.http) = {
76      delete: "/v1/{name=projects/*/locations/*/lakes/*}"
77    };
78    option (google.api.method_signature) = "name";
79    option (google.longrunning.operation_info) = {
80      response_type: "google.protobuf.Empty"
81      metadata_type: "OperationMetadata"
82    };
83  }
84
85  // Lists lake resources in a project and location.
86  rpc ListLakes(ListLakesRequest) returns (ListLakesResponse) {
87    option (google.api.http) = {
88      get: "/v1/{parent=projects/*/locations/*}/lakes"
89    };
90    option (google.api.method_signature) = "parent";
91  }
92
93  // Retrieves a lake resource.
94  rpc GetLake(GetLakeRequest) returns (Lake) {
95    option (google.api.http) = {
96      get: "/v1/{name=projects/*/locations/*/lakes/*}"
97    };
98    option (google.api.method_signature) = "name";
99  }
100
101  // Lists action resources in a lake.
102  rpc ListLakeActions(ListLakeActionsRequest) returns (ListActionsResponse) {
103    option (google.api.http) = {
104      get: "/v1/{parent=projects/*/locations/*/lakes/*}/actions"
105    };
106    option (google.api.method_signature) = "parent";
107  }
108
109  // Creates a zone resource within a lake.
110  rpc CreateZone(CreateZoneRequest) returns (google.longrunning.Operation) {
111    option (google.api.http) = {
112      post: "/v1/{parent=projects/*/locations/*/lakes/*}/zones"
113      body: "zone"
114    };
115    option (google.api.method_signature) = "parent,zone,zone_id";
116    option (google.longrunning.operation_info) = {
117      response_type: "Zone"
118      metadata_type: "OperationMetadata"
119    };
120  }
121
122  // Updates a zone resource.
123  rpc UpdateZone(UpdateZoneRequest) returns (google.longrunning.Operation) {
124    option (google.api.http) = {
125      patch: "/v1/{zone.name=projects/*/locations/*/lakes/*/zones/*}"
126      body: "zone"
127    };
128    option (google.api.method_signature) = "zone,update_mask";
129    option (google.longrunning.operation_info) = {
130      response_type: "Zone"
131      metadata_type: "OperationMetadata"
132    };
133  }
134
135  // Deletes a zone resource. All assets within a zone must be deleted before
136  // the zone can be deleted.
137  rpc DeleteZone(DeleteZoneRequest) returns (google.longrunning.Operation) {
138    option (google.api.http) = {
139      delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}"
140    };
141    option (google.api.method_signature) = "name";
142    option (google.longrunning.operation_info) = {
143      response_type: "google.protobuf.Empty"
144      metadata_type: "OperationMetadata"
145    };
146  }
147
148  // Lists zone resources in a lake.
149  rpc ListZones(ListZonesRequest) returns (ListZonesResponse) {
150    option (google.api.http) = {
151      get: "/v1/{parent=projects/*/locations/*/lakes/*}/zones"
152    };
153    option (google.api.method_signature) = "parent";
154  }
155
156  // Retrieves a zone resource.
157  rpc GetZone(GetZoneRequest) returns (Zone) {
158    option (google.api.http) = {
159      get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*}"
160    };
161    option (google.api.method_signature) = "name";
162  }
163
164  // Lists action resources in a zone.
165  rpc ListZoneActions(ListZoneActionsRequest) returns (ListActionsResponse) {
166    option (google.api.http) = {
167      get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/actions"
168    };
169    option (google.api.method_signature) = "parent";
170  }
171
172  // Creates an asset resource.
173  rpc CreateAsset(CreateAssetRequest) returns (google.longrunning.Operation) {
174    option (google.api.http) = {
175      post: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets"
176      body: "asset"
177    };
178    option (google.api.method_signature) = "parent,asset,asset_id";
179    option (google.longrunning.operation_info) = {
180      response_type: "Asset"
181      metadata_type: "OperationMetadata"
182    };
183  }
184
185  // Updates an asset resource.
186  rpc UpdateAsset(UpdateAssetRequest) returns (google.longrunning.Operation) {
187    option (google.api.http) = {
188      patch: "/v1/{asset.name=projects/*/locations/*/lakes/*/zones/*/assets/*}"
189      body: "asset"
190    };
191    option (google.api.method_signature) = "asset,update_mask";
192    option (google.longrunning.operation_info) = {
193      response_type: "Asset"
194      metadata_type: "OperationMetadata"
195    };
196  }
197
198  // Deletes an asset resource. The referenced storage resource is detached
199  // (default) or deleted based on the associated Lifecycle policy.
200  rpc DeleteAsset(DeleteAssetRequest) returns (google.longrunning.Operation) {
201    option (google.api.http) = {
202      delete: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}"
203    };
204    option (google.api.method_signature) = "name";
205    option (google.longrunning.operation_info) = {
206      response_type: "google.protobuf.Empty"
207      metadata_type: "OperationMetadata"
208    };
209  }
210
211  // Lists asset resources in a zone.
212  rpc ListAssets(ListAssetsRequest) returns (ListAssetsResponse) {
213    option (google.api.http) = {
214      get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*}/assets"
215    };
216    option (google.api.method_signature) = "parent";
217  }
218
219  // Retrieves an asset resource.
220  rpc GetAsset(GetAssetRequest) returns (Asset) {
221    option (google.api.http) = {
222      get: "/v1/{name=projects/*/locations/*/lakes/*/zones/*/assets/*}"
223    };
224    option (google.api.method_signature) = "name";
225  }
226
227  // Lists action resources in an asset.
228  rpc ListAssetActions(ListAssetActionsRequest) returns (ListActionsResponse) {
229    option (google.api.http) = {
230      get: "/v1/{parent=projects/*/locations/*/lakes/*/zones/*/assets/*}/actions"
231    };
232    option (google.api.method_signature) = "parent";
233  }
234
235  // Creates a task resource within a lake.
236  rpc CreateTask(CreateTaskRequest) returns (google.longrunning.Operation) {
237    option (google.api.http) = {
238      post: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks"
239      body: "task"
240    };
241    option (google.api.method_signature) = "parent,task,task_id";
242    option (google.longrunning.operation_info) = {
243      response_type: "Task"
244      metadata_type: "OperationMetadata"
245    };
246  }
247
248  // Update the task resource.
249  rpc UpdateTask(UpdateTaskRequest) returns (google.longrunning.Operation) {
250    option (google.api.http) = {
251      patch: "/v1/{task.name=projects/*/locations/*/lakes/*/tasks/*}"
252      body: "task"
253    };
254    option (google.api.method_signature) = "task,update_mask";
255    option (google.longrunning.operation_info) = {
256      response_type: "Task"
257      metadata_type: "OperationMetadata"
258    };
259  }
260
261  // Delete the task resource.
262  rpc DeleteTask(DeleteTaskRequest) returns (google.longrunning.Operation) {
263    option (google.api.http) = {
264      delete: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}"
265    };
266    option (google.api.method_signature) = "name";
267    option (google.longrunning.operation_info) = {
268      response_type: "google.protobuf.Empty"
269      metadata_type: "OperationMetadata"
270    };
271  }
272
273  // Lists tasks under the given lake.
274  rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) {
275    option (google.api.http) = {
276      get: "/v1/{parent=projects/*/locations/*/lakes/*}/tasks"
277    };
278    option (google.api.method_signature) = "parent";
279  }
280
281  // Get task resource.
282  rpc GetTask(GetTaskRequest) returns (Task) {
283    option (google.api.http) = {
284      get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}"
285    };
286    option (google.api.method_signature) = "name";
287  }
288
289  // Lists Jobs under the given task.
290  rpc ListJobs(ListJobsRequest) returns (ListJobsResponse) {
291    option (google.api.http) = {
292      get: "/v1/{parent=projects/*/locations/*/lakes/*/tasks/*}/jobs"
293    };
294    option (google.api.method_signature) = "parent";
295  }
296
297  // Run an on demand execution of a Task.
298  rpc RunTask(RunTaskRequest) returns (RunTaskResponse) {
299    option (google.api.http) = {
300      post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*}:run"
301      body: "*"
302    };
303    option (google.api.method_signature) = "name";
304  }
305
306  // Get job resource.
307  rpc GetJob(GetJobRequest) returns (Job) {
308    option (google.api.http) = {
309      get: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}"
310    };
311    option (google.api.method_signature) = "name";
312  }
313
314  // Cancel jobs running for the task resource.
315  rpc CancelJob(CancelJobRequest) returns (google.protobuf.Empty) {
316    option (google.api.http) = {
317      post: "/v1/{name=projects/*/locations/*/lakes/*/tasks/*/jobs/*}:cancel"
318      body: "*"
319    };
320    option (google.api.method_signature) = "name";
321  }
322
323  // Create an environment resource.
324  rpc CreateEnvironment(CreateEnvironmentRequest)
325      returns (google.longrunning.Operation) {
326    option (google.api.http) = {
327      post: "/v1/{parent=projects/*/locations/*/lakes/*}/environments"
328      body: "environment"
329    };
330    option (google.api.method_signature) = "parent,environment,environment_id";
331    option (google.longrunning.operation_info) = {
332      response_type: "Environment"
333      metadata_type: "OperationMetadata"
334    };
335  }
336
337  // Update the environment resource.
338  rpc UpdateEnvironment(UpdateEnvironmentRequest)
339      returns (google.longrunning.Operation) {
340    option (google.api.http) = {
341      patch: "/v1/{environment.name=projects/*/locations/*/lakes/*/environments/*}"
342      body: "environment"
343    };
344    option (google.api.method_signature) = "environment,update_mask";
345    option (google.longrunning.operation_info) = {
346      response_type: "Environment"
347      metadata_type: "OperationMetadata"
348    };
349  }
350
351  // Delete the environment resource. All the child resources must have been
352  // deleted before environment deletion can be initiated.
353  rpc DeleteEnvironment(DeleteEnvironmentRequest)
354      returns (google.longrunning.Operation) {
355    option (google.api.http) = {
356      delete: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}"
357    };
358    option (google.api.method_signature) = "name";
359    option (google.longrunning.operation_info) = {
360      response_type: "google.protobuf.Empty"
361      metadata_type: "OperationMetadata"
362    };
363  }
364
365  // Lists environments under the given lake.
366  rpc ListEnvironments(ListEnvironmentsRequest)
367      returns (ListEnvironmentsResponse) {
368    option (google.api.http) = {
369      get: "/v1/{parent=projects/*/locations/*/lakes/*}/environments"
370    };
371    option (google.api.method_signature) = "parent";
372  }
373
374  // Get environment resource.
375  rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) {
376    option (google.api.http) = {
377      get: "/v1/{name=projects/*/locations/*/lakes/*/environments/*}"
378    };
379    option (google.api.method_signature) = "name";
380  }
381
382  // Lists session resources in an environment.
383  rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
384    option (google.api.http) = {
385      get: "/v1/{parent=projects/*/locations/*/lakes/*/environments/*}/sessions"
386    };
387    option (google.api.method_signature) = "parent";
388  }
389}
390
391// Create lake request.
392message CreateLakeRequest {
393  // Required. The resource name of the lake location, of the form:
394  // projects/{project_number}/locations/{location_id}
395  // where `location_id` refers to a GCP region.
396  string parent = 1 [
397    (google.api.field_behavior) = REQUIRED,
398    (google.api.resource_reference) = {
399      type: "locations.googleapis.com/Location"
400    }
401  ];
402
403  // Required. Lake identifier.
404  // This ID will be used to generate names such as database and dataset names
405  // when publishing metadata to Hive Metastore and BigQuery.
406  // * Must contain only lowercase letters, numbers and hyphens.
407  // * Must start with a letter.
408  // * Must end with a number or a letter.
409  // * Must be between 1-63 characters.
410  // * Must be unique within the customer project / location.
411  string lake_id = 2 [(google.api.field_behavior) = REQUIRED];
412
413  // Required. Lake resource
414  Lake lake = 3 [(google.api.field_behavior) = REQUIRED];
415
416  // Optional. Only validate the request, but do not perform mutations.
417  // The default is false.
418  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
419}
420
421// Update lake request.
422message UpdateLakeRequest {
423  // Required. Mask of fields to update.
424  google.protobuf.FieldMask update_mask = 1
425      [(google.api.field_behavior) = REQUIRED];
426
427  // Required. Update description.
428  // Only fields specified in `update_mask` are updated.
429  Lake lake = 2 [(google.api.field_behavior) = REQUIRED];
430
431  // Optional. Only validate the request, but do not perform mutations.
432  // The default is false.
433  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
434}
435
436// Delete lake request.
437message DeleteLakeRequest {
438  // Required. The resource name of the lake:
439  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
440  string name = 1 [
441    (google.api.field_behavior) = REQUIRED,
442    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
443  ];
444}
445
446// List lakes request.
447message ListLakesRequest {
448  // Required. The resource name of the lake location, of the form:
449  // `projects/{project_number}/locations/{location_id}`
450  // where `location_id` refers to a GCP region.
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  // Optional. Maximum number of Lakes to return. The service may return fewer
459  // than this value. If unspecified, at most 10 lakes will be returned. The
460  // maximum value is 1000; values above 1000 will be coerced to 1000.
461  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
462
463  // Optional. Page token received from a previous `ListLakes` call. Provide
464  // this to retrieve the subsequent page. When paginating, all other parameters
465  // provided to `ListLakes` must match the call that provided the page token.
466  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
467
468  // Optional. Filter request.
469  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
470
471  // Optional. Order by fields for the result.
472  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
473}
474
475// List lakes response.
476message ListLakesResponse {
477  // Lakes under the given parent location.
478  repeated Lake lakes = 1;
479
480  // Token to retrieve the next page of results, or empty if there are no more
481  // results in the list.
482  string next_page_token = 2;
483
484  // Locations that could not be reached.
485  repeated string unreachable_locations = 3;
486}
487
488// List lake actions request.
489message ListLakeActionsRequest {
490  // Required. The resource name of the parent lake:
491  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
492  string parent = 1 [
493    (google.api.field_behavior) = REQUIRED,
494    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
495  ];
496
497  // Optional. Maximum number of actions to return. The service may return fewer
498  // than this value. If unspecified, at most 10 actions will be returned. The
499  // maximum value is 1000; values above 1000 will be coerced to 1000.
500  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
501
502  // Optional. Page token received from a previous `ListLakeActions` call.
503  // Provide this to retrieve the subsequent page. When paginating, all other
504  // parameters provided to `ListLakeActions` must match the call that provided
505  // the page token.
506  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
507}
508
509// List actions response.
510message ListActionsResponse {
511  // Actions under the given parent lake/zone/asset.
512  repeated Action actions = 1;
513
514  // Token to retrieve the next page of results, or empty if there are no more
515  // results in the list.
516  string next_page_token = 2;
517}
518
519// Get lake request.
520message GetLakeRequest {
521  // Required. The resource name of the lake:
522  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
523  string name = 1 [
524    (google.api.field_behavior) = REQUIRED,
525    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
526  ];
527}
528
529// Create zone request.
530message CreateZoneRequest {
531  // Required. The resource name of the parent lake:
532  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
533  string parent = 1 [
534    (google.api.field_behavior) = REQUIRED,
535    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
536  ];
537
538  // Required. Zone identifier.
539  // This ID will be used to generate names such as database and dataset names
540  // when publishing metadata to Hive Metastore and BigQuery.
541  // * Must contain only lowercase letters, numbers and hyphens.
542  // * Must start with a letter.
543  // * Must end with a number or a letter.
544  // * Must be between 1-63 characters.
545  // * Must be unique across all lakes from all locations in a project.
546  // * Must not be one of the reserved IDs (i.e. "default", "global-temp")
547  string zone_id = 2 [(google.api.field_behavior) = REQUIRED];
548
549  // Required. Zone resource.
550  Zone zone = 3 [(google.api.field_behavior) = REQUIRED];
551
552  // Optional. Only validate the request, but do not perform mutations.
553  // The default is false.
554  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
555}
556
557// Update zone request.
558message UpdateZoneRequest {
559  // Required. Mask of fields to update.
560  google.protobuf.FieldMask update_mask = 1
561      [(google.api.field_behavior) = REQUIRED];
562
563  // Required. Update description.
564  // Only fields specified in `update_mask` are updated.
565  Zone zone = 2 [(google.api.field_behavior) = REQUIRED];
566
567  // Optional. Only validate the request, but do not perform mutations.
568  // The default is false.
569  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
570}
571
572// Delete zone request.
573message DeleteZoneRequest {
574  // Required. The resource name of the zone:
575  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
576  string name = 1 [
577    (google.api.field_behavior) = REQUIRED,
578    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" }
579  ];
580}
581
582// List zones request.
583message ListZonesRequest {
584  // Required. The resource name of the parent lake:
585  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
586  string parent = 1 [
587    (google.api.field_behavior) = REQUIRED,
588    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
589  ];
590
591  // Optional. Maximum number of zones to return. The service may return fewer
592  // than this value. If unspecified, at most 10 zones will be returned. The
593  // maximum value is 1000; values above 1000 will be coerced to 1000.
594  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
595
596  // Optional. Page token received from a previous `ListZones` call. Provide
597  // this to retrieve the subsequent page. When paginating, all other parameters
598  // provided to `ListZones` must match the call that provided the page token.
599  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
600
601  // Optional. Filter request.
602  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
603
604  // Optional. Order by fields for the result.
605  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
606}
607
608// List zones response.
609message ListZonesResponse {
610  // Zones under the given parent lake.
611  repeated Zone zones = 1;
612
613  // Token to retrieve the next page of results, or empty if there are no more
614  // results in the list.
615  string next_page_token = 2;
616}
617
618// List zone actions request.
619message ListZoneActionsRequest {
620  // Required. The resource name of the parent zone:
621  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
622  string parent = 1 [
623    (google.api.field_behavior) = REQUIRED,
624    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" }
625  ];
626
627  // Optional. Maximum number of actions to return. The service may return fewer
628  // than this value. If unspecified, at most 10 actions will be returned. The
629  // maximum value is 1000; values above 1000 will be coerced to 1000.
630  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
631
632  // Optional. Page token received from a previous `ListZoneActions` call.
633  // Provide this to retrieve the subsequent page. When paginating, all other
634  // parameters provided to `ListZoneActions` must match the call that provided
635  // the page token.
636  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
637}
638
639// Get zone request.
640message GetZoneRequest {
641  // Required. The resource name of the zone:
642  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
643  string name = 1 [
644    (google.api.field_behavior) = REQUIRED,
645    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" }
646  ];
647}
648
649// Create asset request.
650message CreateAssetRequest {
651  // Required. The resource name of the parent zone:
652  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
653  string parent = 1 [
654    (google.api.field_behavior) = REQUIRED,
655    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" }
656  ];
657
658  // Required. Asset identifier.
659  // This ID will be used to generate names such as table names when publishing
660  // metadata to Hive Metastore and BigQuery.
661  // * Must contain only lowercase letters, numbers and hyphens.
662  // * Must start with a letter.
663  // * Must end with a number or a letter.
664  // * Must be between 1-63 characters.
665  // * Must be unique within the zone.
666  string asset_id = 2 [(google.api.field_behavior) = REQUIRED];
667
668  // Required. Asset resource.
669  Asset asset = 3 [(google.api.field_behavior) = REQUIRED];
670
671  // Optional. Only validate the request, but do not perform mutations.
672  // The default is false.
673  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
674}
675
676// Update asset request.
677message UpdateAssetRequest {
678  // Required. Mask of fields to update.
679  google.protobuf.FieldMask update_mask = 1
680      [(google.api.field_behavior) = REQUIRED];
681
682  // Required. Update description.
683  // Only fields specified in `update_mask` are updated.
684  Asset asset = 2 [(google.api.field_behavior) = REQUIRED];
685
686  // Optional. Only validate the request, but do not perform mutations.
687  // The default is false.
688  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
689}
690
691// Delete asset request.
692message DeleteAssetRequest {
693  // Required. The resource name of the asset:
694  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
695  string name = 1 [
696    (google.api.field_behavior) = REQUIRED,
697    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" }
698  ];
699}
700
701// List assets request.
702message ListAssetsRequest {
703  // Required. The resource name of the parent zone:
704  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
705  string parent = 1 [
706    (google.api.field_behavior) = REQUIRED,
707    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" }
708  ];
709
710  // Optional. Maximum number of asset to return. The service may return fewer
711  // than this value. If unspecified, at most 10 assets will be returned. The
712  // maximum value is 1000; values above 1000 will be coerced to 1000.
713  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
714
715  // Optional. Page token received from a previous `ListAssets` call. Provide
716  // this to retrieve the subsequent page. When paginating, all other parameters
717  // provided to `ListAssets` must match the call that provided the page
718  // token.
719  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
720
721  // Optional. Filter request.
722  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
723
724  // Optional. Order by fields for the result.
725  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
726}
727
728// List assets response.
729message ListAssetsResponse {
730  // Asset under the given parent zone.
731  repeated Asset assets = 1;
732
733  // Token to retrieve the next page of results, or empty if there are no more
734  // results in the list.
735  string next_page_token = 2;
736}
737
738// List asset actions request.
739message ListAssetActionsRequest {
740  // Required. The resource name of the parent asset:
741  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
742  string parent = 1 [
743    (google.api.field_behavior) = REQUIRED,
744    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" }
745  ];
746
747  // Optional. Maximum number of actions to return. The service may return fewer
748  // than this value. If unspecified, at most 10 actions will be returned. The
749  // maximum value is 1000; values above 1000 will be coerced to 1000.
750  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
751
752  // Optional. Page token received from a previous `ListAssetActions` call.
753  // Provide this to retrieve the subsequent page. When paginating, all other
754  // parameters provided to `ListAssetActions` must match the call that provided
755  // the page token.
756  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
757}
758
759// Get asset request.
760message GetAssetRequest {
761  // Required. The resource name of the asset:
762  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`.
763  string name = 1 [
764    (google.api.field_behavior) = REQUIRED,
765    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" }
766  ];
767}
768
769// Represents the metadata of a long-running operation.
770message OperationMetadata {
771  // Output only. The time the operation was created.
772  google.protobuf.Timestamp create_time = 1
773      [(google.api.field_behavior) = OUTPUT_ONLY];
774
775  // Output only. The time the operation finished running.
776  google.protobuf.Timestamp end_time = 2
777      [(google.api.field_behavior) = OUTPUT_ONLY];
778
779  // Output only. Server-defined resource path for the target of the operation.
780  string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
781
782  // Output only. Name of the verb executed by the operation.
783  string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
784
785  // Output only. Human-readable status of the operation, if any.
786  string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
787
788  // Output only. Identifies whether the user has requested cancellation
789  // of the operation. Operations that have successfully been cancelled
790  // have [Operation.error][] value with a
791  // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to
792  // `Code.CANCELLED`.
793  bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
794
795  // Output only. API version used to start the operation.
796  string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
797}
798
799// Create task request.
800message CreateTaskRequest {
801  // Required. The resource name of the parent lake:
802  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
803  string parent = 1 [
804    (google.api.field_behavior) = REQUIRED,
805    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
806  ];
807
808  // Required. Task identifier.
809  string task_id = 2 [(google.api.field_behavior) = REQUIRED];
810
811  // Required. Task resource.
812  Task task = 3 [(google.api.field_behavior) = REQUIRED];
813
814  // Optional. Only validate the request, but do not perform mutations.
815  // The default is false.
816  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
817}
818
819// Update task request.
820message UpdateTaskRequest {
821  // Required. Mask of fields to update.
822  google.protobuf.FieldMask update_mask = 1
823      [(google.api.field_behavior) = REQUIRED];
824
825  // Required. Update description.
826  // Only fields specified in `update_mask` are updated.
827  Task task = 2 [(google.api.field_behavior) = REQUIRED];
828
829  // Optional. Only validate the request, but do not perform mutations.
830  // The default is false.
831  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
832}
833
834// Delete task request.
835message DeleteTaskRequest {
836  // Required. The resource name of the task:
837  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}`.
838  string name = 1 [
839    (google.api.field_behavior) = REQUIRED,
840    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" }
841  ];
842}
843
844// List tasks request.
845message ListTasksRequest {
846  // Required. The resource name of the parent lake:
847  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
848  string parent = 1 [
849    (google.api.field_behavior) = REQUIRED,
850    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
851  ];
852
853  // Optional. Maximum number of tasks to return. The service may return fewer
854  // than this value. If unspecified, at most 10 tasks will be returned. The
855  // maximum value is 1000; values above 1000 will be coerced to 1000.
856  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
857
858  // Optional. Page token received from a previous `ListZones` call. Provide
859  // this to retrieve the subsequent page. When paginating, all other parameters
860  // provided to `ListZones` must match the call that provided the page token.
861  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
862
863  // Optional. Filter request.
864  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
865
866  // Optional. Order by fields for the result.
867  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
868}
869
870// List tasks response.
871message ListTasksResponse {
872  // Tasks under the given parent lake.
873  repeated Task tasks = 1;
874
875  // Token to retrieve the next page of results, or empty if there are no more
876  // results in the list.
877  string next_page_token = 2;
878
879  // Locations that could not be reached.
880  repeated string unreachable_locations = 3;
881}
882
883// Get task request.
884message GetTaskRequest {
885  // Required. The resource name of the task:
886  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
887  string name = 1 [
888    (google.api.field_behavior) = REQUIRED,
889    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" }
890  ];
891}
892
893// Get job request.
894message GetJobRequest {
895  // Required. The resource name of the job:
896  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`.
897  string name = 1 [
898    (google.api.field_behavior) = REQUIRED,
899    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" }
900  ];
901}
902
903message RunTaskRequest {
904  // Required. The resource name of the task:
905  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
906  string name = 1 [
907    (google.api.field_behavior) = REQUIRED,
908    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" }
909  ];
910
911  // Optional. User-defined labels for the task. If the map is left empty, the
912  // task will run with existing labels from task definition. If the map
913  // contains an entry with a new key, the same will be added to existing set of
914  // labels. If the map contains an entry with an existing label key in task
915  // definition, the task will run with new label value for that entry. Clearing
916  // an existing label will require label value to be explicitly set to a hyphen
917  // "-". The label value cannot be empty.
918  map<string, string> labels = 3 [(google.api.field_behavior) = OPTIONAL];
919
920  // Optional. Execution spec arguments. If the map is left empty, the task will
921  // run with existing execution spec args from task definition. If the map
922  // contains an entry with a new key, the same will be added to existing set of
923  // args. If the map contains an entry with an existing arg key in task
924  // definition, the task will run with new arg value for that entry. Clearing
925  // an existing arg will require arg value to be explicitly set to a hyphen
926  // "-". The arg value cannot be empty.
927  map<string, string> args = 4 [(google.api.field_behavior) = OPTIONAL];
928}
929
930message RunTaskResponse {
931  // Jobs created by RunTask API.
932  Job job = 1;
933}
934
935// List jobs request.
936message ListJobsRequest {
937  // Required. The resource name of the parent environment:
938  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}`.
939  string parent = 1 [
940    (google.api.field_behavior) = REQUIRED,
941    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" }
942  ];
943
944  // Optional. Maximum number of jobs to return. The service may return fewer
945  // than this value. If unspecified, at most 10 jobs will be returned. The
946  // maximum value is 1000; values above 1000 will be coerced to 1000.
947  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
948
949  // Optional. Page token received from a previous `ListJobs` call. Provide this
950  // to retrieve the subsequent page. When paginating, all other parameters
951  // provided to `ListJobs` must match the call that provided the page
952  // token.
953  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
954}
955
956// List jobs response.
957message ListJobsResponse {
958  // Jobs under a given task.
959  repeated Job jobs = 1;
960
961  // Token to retrieve the next page of results, or empty if there are no more
962  // results in the list.
963  string next_page_token = 2;
964}
965
966// Cancel task jobs.
967message CancelJobRequest {
968  // Required. The resource name of the job:
969  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/task/{task_id}/job/{job_id}`.
970  string name = 1 [
971    (google.api.field_behavior) = REQUIRED,
972    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Job" }
973  ];
974}
975
976// Create environment request.
977message CreateEnvironmentRequest {
978  // Required. The resource name of the parent lake:
979  // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
980  string parent = 1 [
981    (google.api.field_behavior) = REQUIRED,
982    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
983  ];
984
985  // Required. Environment identifier.
986  // * Must contain only lowercase letters, numbers and hyphens.
987  // * Must start with a letter.
988  // * Must be between 1-63 characters.
989  // * Must end with a number or a letter.
990  // * Must be unique within the lake.
991  string environment_id = 2 [(google.api.field_behavior) = REQUIRED];
992
993  // Required. Environment resource.
994  Environment environment = 3 [(google.api.field_behavior) = REQUIRED];
995
996  // Optional. Only validate the request, but do not perform mutations.
997  // The default is false.
998  bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL];
999}
1000
1001// Update environment request.
1002message UpdateEnvironmentRequest {
1003  // Required. Mask of fields to update.
1004  google.protobuf.FieldMask update_mask = 1
1005      [(google.api.field_behavior) = REQUIRED];
1006
1007  // Required. Update description.
1008  // Only fields specified in `update_mask` are updated.
1009  Environment environment = 2 [(google.api.field_behavior) = REQUIRED];
1010
1011  // Optional. Only validate the request, but do not perform mutations.
1012  // The default is false.
1013  bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL];
1014}
1015
1016// Delete environment request.
1017message DeleteEnvironmentRequest {
1018  // Required. The resource name of the environment:
1019  // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
1020  string name = 1 [
1021    (google.api.field_behavior) = REQUIRED,
1022    (google.api.resource_reference) = {
1023      type: "dataplex.googleapis.com/Environment"
1024    }
1025  ];
1026}
1027
1028// List environments request.
1029message ListEnvironmentsRequest {
1030  // Required. The resource name of the parent lake:
1031  // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
1032  string parent = 1 [
1033    (google.api.field_behavior) = REQUIRED,
1034    (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" }
1035  ];
1036
1037  // Optional. Maximum number of environments to return. The service may return
1038  // fewer than this value. If unspecified, at most 10 environments will be
1039  // returned. The maximum value is 1000; values above 1000 will be coerced to
1040  // 1000.
1041  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1042
1043  // Optional. Page token received from a previous `ListEnvironments` call.
1044  // Provide this to retrieve the subsequent page. When paginating, all other
1045  // parameters provided to `ListEnvironments` must match the call that provided
1046  // the page token.
1047  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1048
1049  // Optional. Filter request.
1050  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1051
1052  // Optional. Order by fields for the result.
1053  string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
1054}
1055
1056// List environments response.
1057message ListEnvironmentsResponse {
1058  // Environments under the given parent lake.
1059  repeated Environment environments = 1;
1060
1061  // Token to retrieve the next page of results, or empty if there are no more
1062  // results in the list.
1063  string next_page_token = 2;
1064}
1065
1066// Get environment request.
1067message GetEnvironmentRequest {
1068  // Required. The resource name of the environment:
1069  // `projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`.
1070  string name = 1 [
1071    (google.api.field_behavior) = REQUIRED,
1072    (google.api.resource_reference) = {
1073      type: "dataplex.googleapis.com/Environment"
1074    }
1075  ];
1076}
1077
1078// List sessions request.
1079message ListSessionsRequest {
1080  // Required. The resource name of the parent environment:
1081  // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}`.
1082  string parent = 1 [
1083    (google.api.field_behavior) = REQUIRED,
1084    (google.api.resource_reference) = {
1085      type: "dataplex.googleapis.com/Environment"
1086    }
1087  ];
1088
1089  // Optional. Maximum number of sessions to return. The service may return
1090  // fewer than this value. If unspecified, at most 10 sessions will be
1091  // returned. The maximum value is 1000; values above 1000 will be coerced to
1092  // 1000.
1093  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
1094
1095  // Optional. Page token received from a previous `ListSessions` call. Provide
1096  // this to retrieve the subsequent page. When paginating, all other parameters
1097  // provided to `ListSessions` must match the call that provided the page
1098  // token.
1099  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
1100
1101  // Optional. Filter request. The following `mode` filter is supported to
1102  // return only the sessions belonging to the requester when the mode is USER
1103  // and return sessions of all the users when the mode is ADMIN. When no filter
1104  // is sent default to USER mode. NOTE: When the mode is ADMIN, the requester
1105  // should have `dataplex.environments.listAllSessions` permission to list all
1106  // sessions, in absence of the permission, the request fails.
1107  //
1108  // mode = ADMIN | USER
1109  string filter = 4 [(google.api.field_behavior) = OPTIONAL];
1110}
1111
1112// List sessions response.
1113message ListSessionsResponse {
1114  // Sessions under a given environment.
1115  repeated Session sessions = 1;
1116
1117  // Token to retrieve the next page of results, or empty if there are no more
1118  // results in the list.
1119  string next_page_token = 2;
1120}
1121