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/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/duration.proto"; 22import "google/protobuf/timestamp.proto"; 23 24option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; 25option java_multiple_files = true; 26option java_outer_classname = "ResourcesProto"; 27option java_package = "com.google.cloud.dataplex.v1"; 28 29// A lake is a centralized repository for managing enterprise data across the 30// organization distributed across many cloud projects, and stored in a variety 31// of storage services such as Google Cloud Storage and BigQuery. The resources 32// attached to a lake are referred to as managed resources. Data within these 33// managed resources can be structured or unstructured. A lake provides data 34// admins with tools to organize, secure and manage their data at scale, and 35// provides data scientists and data engineers an integrated experience to 36// easily search, discover, analyze and transform data and associated metadata. 37message Lake { 38 option (google.api.resource) = { 39 type: "dataplex.googleapis.com/Lake" 40 pattern: "projects/{project}/locations/{location}/lakes/{lake}" 41 }; 42 43 // Settings to manage association of Dataproc Metastore with a lake. 44 message Metastore { 45 // Optional. A relative reference to the Dataproc Metastore 46 // (https://cloud.google.com/dataproc-metastore/docs) service associated 47 // with the lake: 48 // `projects/{project_id}/locations/{location_id}/services/{service_id}` 49 string service = 1 [(google.api.field_behavior) = OPTIONAL]; 50 } 51 52 // Status of Lake and Dataproc Metastore service instance association. 53 message MetastoreStatus { 54 // Current state of association. 55 enum State { 56 // Unspecified. 57 STATE_UNSPECIFIED = 0; 58 59 // A Metastore service instance is not associated with the lake. 60 NONE = 1; 61 62 // A Metastore service instance is attached to the lake. 63 READY = 2; 64 65 // Attach/detach is in progress. 66 UPDATING = 3; 67 68 // Attach/detach could not be done due to errors. 69 ERROR = 4; 70 } 71 72 // Current state of association. 73 State state = 1; 74 75 // Additional information about the current status. 76 string message = 2; 77 78 // Last update time of the metastore status of the lake. 79 google.protobuf.Timestamp update_time = 3; 80 81 // The URI of the endpoint used to access the Metastore service. 82 string endpoint = 4; 83 } 84 85 // Output only. The relative resource name of the lake, of the form: 86 // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. 87 string name = 1 [ 88 (google.api.field_behavior) = OUTPUT_ONLY, 89 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } 90 ]; 91 92 // Optional. User friendly display name. 93 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 94 95 // Output only. System generated globally unique ID for the lake. This ID will 96 // be different if the lake is deleted and re-created with the same name. 97 string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 98 99 // Output only. The time when the lake was created. 100 google.protobuf.Timestamp create_time = 4 101 [(google.api.field_behavior) = OUTPUT_ONLY]; 102 103 // Output only. The time when the lake was last updated. 104 google.protobuf.Timestamp update_time = 5 105 [(google.api.field_behavior) = OUTPUT_ONLY]; 106 107 // Optional. User-defined labels for the lake. 108 map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL]; 109 110 // Optional. Description of the lake. 111 string description = 7 [(google.api.field_behavior) = OPTIONAL]; 112 113 // Output only. Current state of the lake. 114 State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 115 116 // Output only. Service account associated with this lake. This service 117 // account must be authorized to access or operate on resources managed by the 118 // lake. 119 string service_account = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 120 121 // Optional. Settings to manage lake and Dataproc Metastore service instance 122 // association. 123 Metastore metastore = 102 [(google.api.field_behavior) = OPTIONAL]; 124 125 // Output only. Aggregated status of the underlying assets of the lake. 126 AssetStatus asset_status = 103 [(google.api.field_behavior) = OUTPUT_ONLY]; 127 128 // Output only. Metastore status of the lake. 129 MetastoreStatus metastore_status = 104 130 [(google.api.field_behavior) = OUTPUT_ONLY]; 131} 132 133// Aggregated status of the underlying assets of a lake or zone. 134message AssetStatus { 135 // Last update time of the status. 136 google.protobuf.Timestamp update_time = 1; 137 138 // Number of active assets. 139 int32 active_assets = 2; 140 141 // Number of assets that are in process of updating the security policy on 142 // attached resources. 143 int32 security_policy_applying_assets = 3; 144} 145 146// A zone represents a logical group of related assets within a lake. A zone can 147// be used to map to organizational structure or represent stages of data 148// readiness from raw to curated. It provides managing behavior that is shared 149// or inherited by all contained assets. 150message Zone { 151 option (google.api.resource) = { 152 type: "dataplex.googleapis.com/Zone" 153 pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}" 154 }; 155 156 // Type of zone. 157 enum Type { 158 // Zone type not specified. 159 TYPE_UNSPECIFIED = 0; 160 161 // A zone that contains data that needs further processing before it is 162 // considered generally ready for consumption and analytics workloads. 163 RAW = 1; 164 165 // A zone that contains data that is considered to be ready for broader 166 // consumption and analytics workloads. Curated structured data stored in 167 // Cloud Storage must conform to certain file formats (parquet, avro and 168 // orc) and organized in a hive-compatible directory layout. 169 CURATED = 2; 170 } 171 172 // Settings for resources attached as assets within a zone. 173 message ResourceSpec { 174 // Location type of the resources attached to a zone. 175 enum LocationType { 176 // Unspecified location type. 177 LOCATION_TYPE_UNSPECIFIED = 0; 178 179 // Resources that are associated with a single region. 180 SINGLE_REGION = 1; 181 182 // Resources that are associated with a multi-region location. 183 MULTI_REGION = 2; 184 } 185 186 // Required. Immutable. The location type of the resources that are allowed 187 // to be attached to the assets within this zone. 188 LocationType location_type = 1 [ 189 (google.api.field_behavior) = REQUIRED, 190 (google.api.field_behavior) = IMMUTABLE 191 ]; 192 } 193 194 // Settings to manage the metadata discovery and publishing in a zone. 195 message DiscoverySpec { 196 // Describe CSV and similar semi-structured data formats. 197 message CsvOptions { 198 // Optional. The number of rows to interpret as header rows that should be 199 // skipped when reading data rows. 200 int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; 201 202 // Optional. The delimiter being used to separate values. This defaults to 203 // ','. 204 string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; 205 206 // Optional. The character encoding of the data. The default is UTF-8. 207 string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; 208 209 // Optional. Whether to disable the inference of data type for CSV data. 210 // If true, all columns will be registered as strings. 211 bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; 212 } 213 214 // Describe JSON data format. 215 message JsonOptions { 216 // Optional. The character encoding of the data. The default is UTF-8. 217 string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; 218 219 // Optional. Whether to disable the inference of data type for Json data. 220 // If true, all columns will be registered as their primitive types 221 // (strings, number or boolean). 222 bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; 223 } 224 225 // Required. Whether discovery is enabled. 226 bool enabled = 1 [(google.api.field_behavior) = REQUIRED]; 227 228 // Optional. The list of patterns to apply for selecting data to include 229 // during discovery if only a subset of the data should considered. For 230 // Cloud Storage bucket assets, these are interpreted as glob patterns used 231 // to match object names. For BigQuery dataset assets, these are interpreted 232 // as patterns to match table names. 233 repeated string include_patterns = 2 234 [(google.api.field_behavior) = OPTIONAL]; 235 236 // Optional. The list of patterns to apply for selecting data to exclude 237 // during discovery. For Cloud Storage bucket assets, these are interpreted 238 // as glob patterns used to match object names. For BigQuery dataset assets, 239 // these are interpreted as patterns to match table names. 240 repeated string exclude_patterns = 3 241 [(google.api.field_behavior) = OPTIONAL]; 242 243 // Optional. Configuration for CSV data. 244 CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; 245 246 // Optional. Configuration for Json data. 247 JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; 248 249 // Determines when discovery is triggered. 250 oneof trigger { 251 // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for 252 // running discovery periodically. Successive discovery runs must be 253 // scheduled at least 60 minutes apart. The default value is to run 254 // discovery every 60 minutes. To explicitly set a timezone to the cron 255 // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or 256 // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string 257 // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 258 // * * * *`, or `TZ=America/New_York 1 * * * *`. 259 string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; 260 } 261 } 262 263 // Output only. The relative resource name of the zone, of the form: 264 // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. 265 string name = 1 [ 266 (google.api.field_behavior) = OUTPUT_ONLY, 267 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } 268 ]; 269 270 // Optional. User friendly display name. 271 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 272 273 // Output only. System generated globally unique ID for the zone. This ID will 274 // be different if the zone is deleted and re-created with the same name. 275 string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 276 277 // Output only. The time when the zone was created. 278 google.protobuf.Timestamp create_time = 4 279 [(google.api.field_behavior) = OUTPUT_ONLY]; 280 281 // Output only. The time when the zone was last updated. 282 google.protobuf.Timestamp update_time = 5 283 [(google.api.field_behavior) = OUTPUT_ONLY]; 284 285 // Optional. User defined labels for the zone. 286 map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL]; 287 288 // Optional. Description of the zone. 289 string description = 7 [(google.api.field_behavior) = OPTIONAL]; 290 291 // Output only. Current state of the zone. 292 State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 293 294 // Required. Immutable. The type of the zone. 295 Type type = 9 [ 296 (google.api.field_behavior) = REQUIRED, 297 (google.api.field_behavior) = IMMUTABLE 298 ]; 299 300 // Optional. Specification of the discovery feature applied to data in this 301 // zone. 302 DiscoverySpec discovery_spec = 103 [(google.api.field_behavior) = OPTIONAL]; 303 304 // Required. Specification of the resources that are referenced by the assets 305 // within this zone. 306 ResourceSpec resource_spec = 104 [(google.api.field_behavior) = REQUIRED]; 307 308 // Output only. Aggregated status of the underlying assets of the zone. 309 AssetStatus asset_status = 105 [(google.api.field_behavior) = OUTPUT_ONLY]; 310} 311 312// Action represents an issue requiring administrator action for resolution. 313message Action { 314 option (google.api.resource) = { 315 type: "dataplex.googleapis.com/Action" 316 pattern: "projects/{project}/locations/{location}/lakes/{lake}/actions/{action}" 317 pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}" 318 pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}" 319 }; 320 321 // The category of issues. 322 enum Category { 323 // Unspecified category. 324 CATEGORY_UNSPECIFIED = 0; 325 326 // Resource management related issues. 327 RESOURCE_MANAGEMENT = 1; 328 329 // Security policy related issues. 330 SECURITY_POLICY = 2; 331 332 // Data and discovery related issues. 333 DATA_DISCOVERY = 3; 334 } 335 336 // Action details for resource references in assets that cannot be located. 337 message MissingResource {} 338 339 // Action details for unauthorized resource issues raised to indicate that the 340 // service account associated with the lake instance is not authorized to 341 // access or manage the resource associated with an asset. 342 message UnauthorizedResource {} 343 344 // Failed to apply security policy to the managed resource(s) under a 345 // lake, zone or an asset. For a lake or zone resource, one or more underlying 346 // assets has a failure applying security policy to the associated managed 347 // resource. 348 message FailedSecurityPolicyApply { 349 // Resource name of one of the assets with failing security policy 350 // application. Populated for a lake or zone resource only. 351 string asset = 1; 352 } 353 354 // Action details for invalid or unsupported data files detected by discovery. 355 message InvalidDataFormat { 356 // The list of data locations sampled and used for format/schema 357 // inference. 358 repeated string sampled_data_locations = 1; 359 360 // The expected data format of the entity. 361 string expected_format = 2; 362 363 // The new unexpected data format within the entity. 364 string new_format = 3; 365 } 366 367 // Action details for incompatible schemas detected by discovery. 368 message IncompatibleDataSchema { 369 // Whether the action relates to a schema that is incompatible or modified. 370 enum SchemaChange { 371 // Schema change unspecified. 372 SCHEMA_CHANGE_UNSPECIFIED = 0; 373 374 // Newly discovered schema is incompatible with existing schema. 375 INCOMPATIBLE = 1; 376 377 // Newly discovered schema has changed from existing schema for data in a 378 // curated zone. 379 MODIFIED = 2; 380 } 381 382 // The name of the table containing invalid data. 383 string table = 1; 384 385 // The existing and expected schema of the table. The schema is provided as 386 // a JSON formatted structure listing columns and data types. 387 string existing_schema = 2; 388 389 // The new and incompatible schema within the table. The schema is provided 390 // as a JSON formatted structured listing columns and data types. 391 string new_schema = 3; 392 393 // The list of data locations sampled and used for format/schema 394 // inference. 395 repeated string sampled_data_locations = 4; 396 397 // Whether the action relates to a schema that is incompatible or modified. 398 SchemaChange schema_change = 5; 399 } 400 401 // Action details for invalid or unsupported partitions detected by discovery. 402 message InvalidDataPartition { 403 // The expected partition structure. 404 enum PartitionStructure { 405 // PartitionStructure unspecified. 406 PARTITION_STRUCTURE_UNSPECIFIED = 0; 407 408 // Consistent hive-style partition definition (both raw and curated zone). 409 CONSISTENT_KEYS = 1; 410 411 // Hive style partition definition (curated zone only). 412 HIVE_STYLE_KEYS = 2; 413 } 414 415 // The issue type of InvalidDataPartition. 416 PartitionStructure expected_structure = 1; 417 } 418 419 // Action details for absence of data detected by discovery. 420 message MissingData {} 421 422 // Action details for invalid data arrangement. 423 message InvalidDataOrganization {} 424 425 // The category of issue associated with the action. 426 Category category = 1; 427 428 // Detailed description of the issue requiring action. 429 string issue = 2; 430 431 // The time that the issue was detected. 432 google.protobuf.Timestamp detect_time = 4; 433 434 // Output only. The relative resource name of the action, of the form: 435 // `projects/{project}/locations/{location}/lakes/{lake}/actions/{action}` 436 // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/actions/{action}` 437 // `projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}/actions/{action}`. 438 string name = 5 [ 439 (google.api.field_behavior) = OUTPUT_ONLY, 440 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Action" } 441 ]; 442 443 // Output only. The relative resource name of the lake, of the form: 444 // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`. 445 string lake = 6 [ 446 (google.api.field_behavior) = OUTPUT_ONLY, 447 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Lake" } 448 ]; 449 450 // Output only. The relative resource name of the zone, of the form: 451 // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`. 452 string zone = 7 [ 453 (google.api.field_behavior) = OUTPUT_ONLY, 454 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Zone" } 455 ]; 456 457 // Output only. The relative resource name of the asset, of the form: 458 // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. 459 string asset = 8 [ 460 (google.api.field_behavior) = OUTPUT_ONLY, 461 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } 462 ]; 463 464 // The list of data locations associated with this action. Cloud Storage 465 // locations are represented as URI paths(E.g. 466 // `gs://bucket/table1/year=2020/month=Jan/`). BigQuery locations refer to 467 // resource names(E.g. 468 // `bigquery.googleapis.com/projects/project-id/datasets/dataset-id`). 469 repeated string data_locations = 9; 470 471 // Additional details about the action based on the action category. 472 oneof details { 473 // Details for issues related to invalid or unsupported data formats. 474 InvalidDataFormat invalid_data_format = 10; 475 476 // Details for issues related to incompatible schemas detected within data. 477 IncompatibleDataSchema incompatible_data_schema = 11; 478 479 // Details for issues related to invalid or unsupported data partition 480 // structure. 481 InvalidDataPartition invalid_data_partition = 12; 482 483 // Details for issues related to absence of data within managed resources. 484 MissingData missing_data = 13; 485 486 // Details for issues related to absence of a managed resource. 487 MissingResource missing_resource = 14; 488 489 // Details for issues related to lack of permissions to access data 490 // resources. 491 UnauthorizedResource unauthorized_resource = 15; 492 493 // Details for issues related to applying security policy. 494 FailedSecurityPolicyApply failed_security_policy_apply = 21; 495 496 // Details for issues related to invalid data arrangement. 497 InvalidDataOrganization invalid_data_organization = 22; 498 } 499} 500 501// An asset represents a cloud resource that is being managed within a lake as a 502// member of a zone. 503message Asset { 504 option (google.api.resource) = { 505 type: "dataplex.googleapis.com/Asset" 506 pattern: "projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/assets/{asset}" 507 }; 508 509 // Security policy status of the asset. Data security policy, i.e., readers, 510 // writers & owners, should be specified in the lake/zone/asset IAM policy. 511 message SecurityStatus { 512 // The state of the security policy. 513 enum State { 514 // State unspecified. 515 STATE_UNSPECIFIED = 0; 516 517 // Security policy has been successfully applied to the attached resource. 518 READY = 1; 519 520 // Security policy is in the process of being applied to the attached 521 // resource. 522 APPLYING = 2; 523 524 // Security policy could not be applied to the attached resource due to 525 // errors. 526 ERROR = 3; 527 } 528 529 // The current state of the security policy applied to the attached 530 // resource. 531 State state = 1; 532 533 // Additional information about the current state. 534 string message = 2; 535 536 // Last update time of the status. 537 google.protobuf.Timestamp update_time = 3; 538 } 539 540 // Settings to manage the metadata discovery and publishing for an asset. 541 message DiscoverySpec { 542 // Describe CSV and similar semi-structured data formats. 543 message CsvOptions { 544 // Optional. The number of rows to interpret as header rows that should be 545 // skipped when reading data rows. 546 int32 header_rows = 1 [(google.api.field_behavior) = OPTIONAL]; 547 548 // Optional. The delimiter being used to separate values. This defaults to 549 // ','. 550 string delimiter = 2 [(google.api.field_behavior) = OPTIONAL]; 551 552 // Optional. The character encoding of the data. The default is UTF-8. 553 string encoding = 3 [(google.api.field_behavior) = OPTIONAL]; 554 555 // Optional. Whether to disable the inference of data type for CSV data. 556 // If true, all columns will be registered as strings. 557 bool disable_type_inference = 4 [(google.api.field_behavior) = OPTIONAL]; 558 } 559 560 // Describe JSON data format. 561 message JsonOptions { 562 // Optional. The character encoding of the data. The default is UTF-8. 563 string encoding = 1 [(google.api.field_behavior) = OPTIONAL]; 564 565 // Optional. Whether to disable the inference of data type for Json data. 566 // If true, all columns will be registered as their primitive types 567 // (strings, number or boolean). 568 bool disable_type_inference = 2 [(google.api.field_behavior) = OPTIONAL]; 569 } 570 571 // Optional. Whether discovery is enabled. 572 bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; 573 574 // Optional. The list of patterns to apply for selecting data to include 575 // during discovery if only a subset of the data should considered. For 576 // Cloud Storage bucket assets, these are interpreted as glob patterns used 577 // to match object names. For BigQuery dataset assets, these are interpreted 578 // as patterns to match table names. 579 repeated string include_patterns = 2 580 [(google.api.field_behavior) = OPTIONAL]; 581 582 // Optional. The list of patterns to apply for selecting data to exclude 583 // during discovery. For Cloud Storage bucket assets, these are interpreted 584 // as glob patterns used to match object names. For BigQuery dataset assets, 585 // these are interpreted as patterns to match table names. 586 repeated string exclude_patterns = 3 587 [(google.api.field_behavior) = OPTIONAL]; 588 589 // Optional. Configuration for CSV data. 590 CsvOptions csv_options = 4 [(google.api.field_behavior) = OPTIONAL]; 591 592 // Optional. Configuration for Json data. 593 JsonOptions json_options = 5 [(google.api.field_behavior) = OPTIONAL]; 594 595 // Determines when discovery is triggered. 596 oneof trigger { 597 // Optional. Cron schedule (https://en.wikipedia.org/wiki/Cron) for 598 // running discovery periodically. Successive discovery runs must be 599 // scheduled at least 60 minutes apart. The default value is to run 600 // discovery every 60 minutes. To explicitly set a timezone to the cron 601 // tab, apply a prefix in the cron tab: "CRON_TZ=${IANA_TIME_ZONE}" or 602 // TZ=${IANA_TIME_ZONE}". The ${IANA_TIME_ZONE} may only be a valid string 603 // from IANA time zone database. For example, `CRON_TZ=America/New_York 1 604 // * * * *`, or `TZ=America/New_York 1 * * * *`. 605 string schedule = 10 [(google.api.field_behavior) = OPTIONAL]; 606 } 607 } 608 609 // Identifies the cloud resource that is referenced by this asset. 610 message ResourceSpec { 611 // Type of resource. 612 enum Type { 613 // Type not specified. 614 TYPE_UNSPECIFIED = 0; 615 616 // Cloud Storage bucket. 617 STORAGE_BUCKET = 1; 618 619 // BigQuery dataset. 620 BIGQUERY_DATASET = 2; 621 } 622 623 // Access Mode determines how data stored within the resource is read. This 624 // is only applicable to storage bucket assets. 625 enum AccessMode { 626 // Access mode unspecified. 627 ACCESS_MODE_UNSPECIFIED = 0; 628 629 // Default. Data is accessed directly using storage APIs. 630 DIRECT = 1; 631 632 // Data is accessed through a managed interface using BigQuery APIs. 633 MANAGED = 2; 634 } 635 636 // Immutable. Relative name of the cloud resource that contains the data 637 // that is being managed within a lake. For example: 638 // `projects/{project_number}/buckets/{bucket_id}` 639 // `projects/{project_number}/datasets/{dataset_id}` 640 string name = 1 [(google.api.field_behavior) = IMMUTABLE]; 641 642 // Required. Immutable. Type of resource. 643 Type type = 2 [ 644 (google.api.field_behavior) = REQUIRED, 645 (google.api.field_behavior) = IMMUTABLE 646 ]; 647 648 // Optional. Determines how read permissions are handled for each asset and 649 // their associated tables. Only available to storage buckets assets. 650 AccessMode read_access_mode = 5 [(google.api.field_behavior) = OPTIONAL]; 651 } 652 653 // Status of the resource referenced by an asset. 654 message ResourceStatus { 655 // The state of a resource. 656 enum State { 657 // State unspecified. 658 STATE_UNSPECIFIED = 0; 659 660 // Resource does not have any errors. 661 READY = 1; 662 663 // Resource has errors. 664 ERROR = 2; 665 } 666 667 // The current state of the managed resource. 668 State state = 1; 669 670 // Additional information about the current state. 671 string message = 2; 672 673 // Last update time of the status. 674 google.protobuf.Timestamp update_time = 3; 675 676 // Output only. Service account associated with the BigQuery Connection. 677 string managed_access_identity = 4 678 [(google.api.field_behavior) = OUTPUT_ONLY]; 679 } 680 681 // Status of discovery for an asset. 682 message DiscoveryStatus { 683 // Current state of discovery. 684 enum State { 685 // State is unspecified. 686 STATE_UNSPECIFIED = 0; 687 688 // Discovery for the asset is scheduled. 689 SCHEDULED = 1; 690 691 // Discovery for the asset is running. 692 IN_PROGRESS = 2; 693 694 // Discovery for the asset is currently paused (e.g. due to a lack 695 // of available resources). It will be automatically resumed. 696 PAUSED = 3; 697 698 // Discovery for the asset is disabled. 699 DISABLED = 5; 700 } 701 702 // The aggregated data statistics for the asset reported by discovery. 703 message Stats { 704 // The count of data items within the referenced resource. 705 int64 data_items = 1; 706 707 // The number of stored data bytes within the referenced resource. 708 int64 data_size = 2; 709 710 // The count of table entities within the referenced resource. 711 int64 tables = 3; 712 713 // The count of fileset entities within the referenced resource. 714 int64 filesets = 4; 715 } 716 717 // The current status of the discovery feature. 718 State state = 1; 719 720 // Additional information about the current state. 721 string message = 2; 722 723 // Last update time of the status. 724 google.protobuf.Timestamp update_time = 3; 725 726 // The start time of the last discovery run. 727 google.protobuf.Timestamp last_run_time = 4; 728 729 // Data Stats of the asset reported by discovery. 730 Stats stats = 6; 731 732 // The duration of the last discovery run. 733 google.protobuf.Duration last_run_duration = 7; 734 } 735 736 // Output only. The relative resource name of the asset, of the form: 737 // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/assets/{asset_id}`. 738 string name = 1 [ 739 (google.api.field_behavior) = OUTPUT_ONLY, 740 (google.api.resource_reference) = { type: "dataplex.googleapis.com/Asset" } 741 ]; 742 743 // Optional. User friendly display name. 744 string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; 745 746 // Output only. System generated globally unique ID for the asset. This ID 747 // will be different if the asset is deleted and re-created with the same 748 // name. 749 string uid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 750 751 // Output only. The time when the asset was created. 752 google.protobuf.Timestamp create_time = 4 753 [(google.api.field_behavior) = OUTPUT_ONLY]; 754 755 // Output only. The time when the asset was last updated. 756 google.protobuf.Timestamp update_time = 5 757 [(google.api.field_behavior) = OUTPUT_ONLY]; 758 759 // Optional. User defined labels for the asset. 760 map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL]; 761 762 // Optional. Description of the asset. 763 string description = 7 [(google.api.field_behavior) = OPTIONAL]; 764 765 // Output only. Current state of the asset. 766 State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 767 768 // Required. Specification of the resource that is referenced by this asset. 769 ResourceSpec resource_spec = 100 [(google.api.field_behavior) = REQUIRED]; 770 771 // Output only. Status of the resource referenced by this asset. 772 ResourceStatus resource_status = 101 773 [(google.api.field_behavior) = OUTPUT_ONLY]; 774 775 // Output only. Status of the security policy applied to resource referenced 776 // by this asset. 777 SecurityStatus security_status = 103 778 [(google.api.field_behavior) = OUTPUT_ONLY]; 779 780 // Optional. Specification of the discovery feature applied to data referenced 781 // by this asset. When this spec is left unset, the asset will use the spec 782 // set on the parent zone. 783 DiscoverySpec discovery_spec = 106 [(google.api.field_behavior) = OPTIONAL]; 784 785 // Output only. Status of the discovery feature applied to data referenced by 786 // this asset. 787 DiscoveryStatus discovery_status = 107 788 [(google.api.field_behavior) = OUTPUT_ONLY]; 789} 790 791// State of a resource. 792enum State { 793 // State is not specified. 794 STATE_UNSPECIFIED = 0; 795 796 // Resource is active, i.e., ready to use. 797 ACTIVE = 1; 798 799 // Resource is under creation. 800 CREATING = 2; 801 802 // Resource is under deletion. 803 DELETING = 3; 804 805 // Resource is active but has unresolved actions. 806 ACTION_REQUIRED = 4; 807} 808