// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package google.cloud.datacatalog.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/datacatalog/v1/bigquery.proto"; import "google/cloud/datacatalog/v1/common.proto"; import "google/cloud/datacatalog/v1/data_source.proto"; import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto"; import "google/cloud/datacatalog/v1/schema.proto"; import "google/cloud/datacatalog/v1/search.proto"; import "google/cloud/datacatalog/v1/table_spec.proto"; import "google/cloud/datacatalog/v1/tags.proto"; import "google/cloud/datacatalog/v1/timestamps.proto"; import "google/cloud/datacatalog/v1/usage.proto"; import "google/iam/v1/iam_policy.proto"; import "google/iam/v1/policy.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.DataCatalog.V1"; option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; option java_multiple_files = true; option java_package = "com.google.cloud.datacatalog.v1"; option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; option ruby_package = "Google::Cloud::DataCatalog::V1"; option (google.api.resource_definition) = { type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue" pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}" }; // Data Catalog API service allows you to discover, understand, and manage // your data. service DataCatalog { option (google.api.default_host) = "datacatalog.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Searches Data Catalog for multiple resources like entries and tags that // match a query. // // This is a [Custom Method] // (https://cloud.google.com/apis/design/custom_methods) that doesn't return // all information on a resource, only its ID and high level fields. To get // more information, you can subsequently call specific get methods. // // Note: Data Catalog search queries don't guarantee full recall. Results // that match your query might not be returned, even in subsequent // result pages. Additionally, returned (and not returned) results can vary // if you repeat search queries. // // For more information, see [Data Catalog search syntax] // (https://cloud.google.com/data-catalog/docs/how-to/search-reference). rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { option (google.api.http) = { post: "/v1/catalog:search" body: "*" }; option (google.api.method_signature) = "scope,query"; } // Creates an entry group. // // An entry group contains logically related entries together with [Cloud // Identity and Access Management](/data-catalog/docs/concepts/iam) policies. // These policies specify users who can create, edit, and view entries // within entry groups. // // Data Catalog automatically creates entry groups with names that start with // the `@` symbol for the following resources: // // * BigQuery entries (`@bigquery`) // * Pub/Sub topics (`@pubsub`) // * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`) // // You can create your own entry groups for Cloud Storage fileset entries // and custom entries together with the corresponding IAM policies. // User-created entry groups can't contain the `@` symbol, it is reserved // for automatically created groups. // // Entry groups, like entries, can be searched. // // A maximum of 10,000 entry groups may be created per organization across all // locations. // // You must enable the Data Catalog API in the project identified by // the `parent` parameter. For more information, see [Data Catalog resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/entryGroups" body: "entry_group" }; option (google.api.method_signature) = "parent,entry_group_id,entry_group"; } // Gets an entry group. rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryGroups/*}" }; option (google.api.method_signature) = "name"; option (google.api.method_signature) = "name,read_mask"; } // Updates an entry group. // // You must enable the Data Catalog API in the project identified by // the `entry_group.name` parameter. For more information, see [Data Catalog // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { option (google.api.http) = { patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" body: "entry_group" }; option (google.api.method_signature) = "entry_group"; option (google.api.method_signature) = "entry_group,update_mask"; } // Deletes an entry group. // // You must enable the Data Catalog API in the project // identified by the `name` parameter. For more information, see [Data Catalog // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" }; option (google.api.method_signature) = "name"; } // Lists entry groups. rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/entryGroups" }; option (google.api.method_signature) = "parent"; } // Creates an entry. // // You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM', // or custom types. Data Catalog automatically creates entries with other // types during metadata ingestion from integrated systems. // // You must enable the Data Catalog API in the project identified by // the `parent` parameter. For more information, see [Data Catalog resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). // // An entry group can have a maximum of 100,000 entries. rpc CreateEntry(CreateEntryRequest) returns (Entry) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" body: "entry" }; option (google.api.method_signature) = "parent,entry_id,entry"; } // Updates an existing entry. // // You must enable the Data Catalog API in the project identified by // the `entry.name` parameter. For more information, see [Data Catalog // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { option (google.api.http) = { patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" body: "entry" }; option (google.api.method_signature) = "entry"; option (google.api.method_signature) = "entry,update_mask"; } // Deletes an existing entry. // // You can delete only the entries created by the // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] // method. // // You must enable the Data Catalog API in the project identified by // the `name` parameter. For more information, see [Data Catalog // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" }; option (google.api.method_signature) = "name"; } // Gets an entry. rpc GetEntry(GetEntryRequest) returns (Entry) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" }; option (google.api.method_signature) = "name"; } // Gets an entry by its target resource name. // // The resource name comes from the source Google Cloud Platform service. rpc LookupEntry(LookupEntryRequest) returns (Entry) { option (google.api.http) = { get: "/v1/entries:lookup" }; } // Lists entries. rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" }; option (google.api.method_signature) = "parent"; } // Creates a tag template. // // You must enable the Data Catalog API in the project identified by the // `parent` parameter. // For more information, see [Data Catalog resource project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/tagTemplates" body: "tag_template" }; option (google.api.method_signature) = "parent,tag_template_id,tag_template"; } // Gets a tag template. rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/tagTemplates/*}" }; option (google.api.method_signature) = "name"; } // Updates a tag template. // // You can't update template fields with this method. These fields are // separate resources with their own create, update, and delete methods. // // You must enable the Data Catalog API in the project identified by // the `tag_template.name` parameter. For more information, see [Data Catalog // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { option (google.api.http) = { patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" body: "tag_template" }; option (google.api.method_signature) = "tag_template"; option (google.api.method_signature) = "tag_template,update_mask"; } // Deletes a tag template and all tags that use it. // // You must enable the Data Catalog API in the project identified by // the `name` parameter. For more information, see [Data Catalog resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" }; option (google.api.method_signature) = "name,force"; } // Creates a field in a tag template. // // You must enable the Data Catalog API in the project identified by // the `parent` parameter. For more information, see [Data Catalog resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" body: "tag_template_field" }; option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; } // Updates a field in a tag template. // // You can't update the field type with this method. // // You must enable the Data Catalog API in the project // identified by the `name` parameter. For more information, see [Data Catalog // resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" body: "tag_template_field" }; option (google.api.method_signature) = "name,tag_template_field"; option (google.api.method_signature) = "name,tag_template_field,update_mask"; } // Renames a field in a tag template. // // You must enable the Data Catalog API in the project identified by the // `name` parameter. For more information, see [Data Catalog resource project] // (https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" body: "*" }; option (google.api.method_signature) = "name,new_tag_template_field_id"; } // Renames an enum value in a tag template. // // Within a single enum field, enum values must be unique. rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) returns (TagTemplateField) { option (google.api.http) = { post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename" body: "*" }; option (google.api.method_signature) = "name,new_enum_value_display_name"; } // Deletes a field in a tag template and all uses of this field from the tags // based on this template. // // You must enable the Data Catalog API in the project identified by // the `name` parameter. For more information, see [Data Catalog resource // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project). rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" }; option (google.api.method_signature) = "name,force"; } // Creates a tag and assigns it to: // // * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is // ``projects.locations.entryGroups.entries.tags.create``. // * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method // name is ``projects.locations.entryGroups.tags.create``. // // Note: The project identified by the `parent` parameter for the [tag] // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) // and the [tag template] // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) // used to create the tag must be in the same organization. rpc CreateTag(CreateTagRequest) returns (Tag) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" body: "tag" additional_bindings { post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" body: "tag" } }; option (google.api.method_signature) = "parent,tag"; } // Updates an existing tag. rpc UpdateTag(UpdateTagRequest) returns (Tag) { option (google.api.http) = { patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" body: "tag" additional_bindings { patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" body: "tag" } }; option (google.api.method_signature) = "tag"; option (google.api.method_signature) = "tag,update_mask"; } // Deletes a tag. rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" additional_bindings { delete: "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}" } }; option (google.api.method_signature) = "name"; } // Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry]. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" additional_bindings { get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" } }; option (google.api.method_signature) = "parent"; } // Sets an access control policy for a resource. Replaces any existing // policy. // // Supported resources are: // // - Tag templates // - Entry groups // // Note: This method sets policies only within Data Catalog and can't be // used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any // external Google Cloud Platform resources synced with the Data Catalog. // // To call this method, you must have the following Google IAM permissions: // // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag // templates. // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" body: "*" additional_bindings { post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" body: "*" } }; option (google.api.method_signature) = "resource,policy"; } // Gets the access control policy for a resource. // // May return: // // * A`NOT_FOUND` error if the resource doesn't exist or you don't have the // permission to view it. // * An empty policy if the resource exists but doesn't have a set policy. // // Supported resources are: // // - Tag templates // - Entry groups // // Note: This method doesn't get policies from Google Cloud Platform // resources ingested into Data Catalog. // // To call this method, you must have the following Google IAM permissions: // // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag // templates. // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" body: "*" additional_bindings { post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" body: "*" } additional_bindings { post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" body: "*" } }; option (google.api.method_signature) = "resource"; } // Gets your permissions on a resource. // // Returns an empty set of permissions if the resource doesn't exist. // // Supported resources are: // // - Tag templates // - Entry groups // // Note: This method gets policies only within Data Catalog and can't be // used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any // external Google Cloud Platform resources ingested into Data Catalog. // // No Google IAM permissions are required to call this method. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { option (google.api.http) = { post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" body: "*" additional_bindings { post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" body: "*" } additional_bindings { post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" body: "*" } }; } } // Request message for // [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. message SearchCatalogRequest { // The criteria that select the subspace used for query matching. message Scope { // The list of organization IDs to search within. // // To find your organization ID, follow the steps from // [Creating and managing organizations] // (/resource-manager/docs/creating-managing-organization). repeated string include_org_ids = 2; // The list of project IDs to search within. // // For more information on the distinction between project names, IDs, and // numbers, see [Projects](/docs/overview/#projects). repeated string include_project_ids = 3; // If `true`, include Google Cloud Platform (GCP) public datasets in // search results. By default, they are excluded. // // See [Google Cloud Public Datasets](/public-datasets) for more // information. bool include_gcp_public_datasets = 7; // Optional. The list of locations to search within. If empty, all locations are // searched. // // Returns an error if any location in the list isn't one of the [Supported // regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions). // // If a location is unreachable, its name is returned in the // `SearchCatalogResponse.unreachable` field. To get additional information // on the error, repeat the search request and set the location name as the // value of this parameter. repeated string restricted_locations = 16 [(google.api.field_behavior) = OPTIONAL]; // Optional. If `true`, include [public tag // templates][google.cloud.datacatalog.v1.TagTemplate.is_publicly_readable] // in the search results. By default, they are included only if you have // explicit permissions on them to view them. For example, if you are the // owner. // // Other scope fields, for example, ``include_org_ids``, // still restrict the returned public tag templates and at least one of // them is required. bool include_public_tag_templates = 19 [(google.api.field_behavior) = OPTIONAL]; } // Required. The scope of this search request. // // The `scope` is invalid if `include_org_ids`, `include_project_ids` are // empty AND `include_gcp_public_datasets` is set to `false`. In this case, // the request returns an error. Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; // Optional. The query string with a minimum of 3 characters and specific syntax. // For more information, see // [Data Catalog search syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference). // // An empty query string returns all data assets (in the specified scope) // that you have access to. // // A query string can be a simple `xyz` or qualified by predicates: // // * `name:x` // * `column:y` // * `description:z` string query = 1 [(google.api.field_behavior) = OPTIONAL]; // Number of results to return in a single search page. // // Can't be negative or 0, defaults to 10 in this case. // The maximum number is 1000. If exceeded, throws an "invalid argument" // exception. int32 page_size = 2; // Optional. Pagination token that, if specified, returns the next page of search // results. If empty, returns the first page. // // This token is returned in the [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token] // field of the response to a previous // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] // call. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // Specifies the order of results. // // Currently supported case-sensitive values are: // // * `relevance` that can only be descending // * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default // // If this parameter is omitted, it defaults to the descending `relevance`. string order_by = 5; } // Response message for // [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. message SearchCatalogResponse { // Search results. repeated SearchCatalogResult results = 1; // Pagination token that can be used in subsequent calls to retrieve the next // page of results. string next_page_token = 3; // Unreachable locations. Search results don't include data from those // locations. // // To get additional information on an error, repeat the search request and // restrict it to specific locations by setting the // `SearchCatalogRequest.scope.restricted_locations` parameter. repeated string unreachable = 6; } // Request message for // [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. message CreateEntryGroupRequest { // Required. The names of the project and location that the new entry group belongs to. // // Note: The entry group itself and its child resources might not be // stored in the location specified in its name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { child_type: "datacatalog.googleapis.com/EntryGroup" } ]; // Required. The ID of the entry group to create. // // The ID must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), and must start with a letter or underscore. // The maximum size is 64 bytes when encoded in UTF-8. string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; // The entry group to create. Defaults to empty. EntryGroup entry_group = 2; } // Request message for // [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. message UpdateEntryGroupRequest { // Required. Updates for the entry group. The `name` field must be set. EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; // Names of fields whose values to overwrite on an entry group. // // If this parameter is absent or empty, all modifiable fields // are overwritten. If such fields are non-required and omitted in the // request body, their values are emptied. google.protobuf.FieldMask update_mask = 2; } // Request message for // [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. message GetEntryGroupRequest { // Required. The name of the entry group to get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/EntryGroup" } ]; // The fields to return. If empty or omitted, all fields are returned. google.protobuf.FieldMask read_mask = 2; } // Request message for // [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. message DeleteEntryGroupRequest { // Required. The name of the entry group to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/EntryGroup" } ]; // Optional. If true, deletes all entries in the entry group. bool force = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for // [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. message ListEntryGroupsRequest { // Required. The name of the location that contains the entry groups to list. // // Can be provided as a URL. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/EntryGroup" } ]; // Optional. The maximum number of items to return. // // Default is 10. Maximum limit is 1000. // Throws an invalid argument if `page_size` is greater than 1000. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Pagination token that specifies the next page to return. // If empty, returns the first page. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; } // Response message for // [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. message ListEntryGroupsResponse { // Entry group details. repeated EntryGroup entry_groups = 1; // Pagination token to specify in the next call to retrieve the next page of // results. Empty if there are no more items. string next_page_token = 2; } // Request message for // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. message CreateEntryRequest { // Required. The name of the entry group this entry belongs to. // // Note: The entry itself and its child resources might not be stored in // the location specified in its name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/EntryGroup" } ]; // Required. The ID of the entry to create. // // The ID must contain only letters (a-z, A-Z), numbers (0-9), // and underscores (_). // The maximum size is 64 bytes when encoded in UTF-8. string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The entry to create. Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. message UpdateEntryRequest { // Required. Updates for the entry. The `name` field must be set. Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; // Names of fields whose values to overwrite on an entry. // // If this parameter is absent or empty, all modifiable fields // are overwritten. If such fields are non-required and omitted in the // request body, their values are emptied. // // You can modify only the fields listed below. // // For entries with type `DATA_STREAM`: // // * `schema` // // For entries with type `FILESET`: // // * `schema` // * `display_name` // * `description` // * `gcs_fileset_spec` // * `gcs_fileset_spec.file_patterns` // // For entries with `user_specified_type`: // // * `schema` // * `display_name` // * `description` // * `user_specified_type` // * `user_specified_system` // * `linked_resource` // * `source_system_timestamps` google.protobuf.FieldMask update_mask = 2; } // Request message for // [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. message DeleteEntryRequest { // Required. The name of the entry to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Entry" } ]; } // Request message for // [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. message GetEntryRequest { // Required. The name of the entry to get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Entry" } ]; } // Request message for // [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. message LookupEntryRequest { // Required. A full name, SQL name, or a fully qualified name of a // Google Cloud Platform resource. oneof target_name { // The full name of the Google Cloud Platform resource the Data Catalog // entry represents. For more information, see [Full Resource Name] // (https://cloud.google.com/apis/design/resource_names#full_resource_name). // // Full names are case-sensitive. For example: // // * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` // * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}` string linked_resource = 1; // The SQL name of the entry. SQL names are case-sensitive. // // Examples: // // * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}` // * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\` // * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}` // * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}` // * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}` // // Identifiers (`*_ID`) should comply with the // [Lexical structure in Standard SQL] // (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical). string sql_resource = 3; // Fully qualified name (FQN) of the resource. // // FQNs take two forms: // // * For non-regionalized resources: // // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` // // * For regionalized resources: // // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` // // Example for a DPMS table: // // `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` string fully_qualified_name = 5; } } // Entry metadata. // A Data Catalog entry represents another resource in Google // Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or // outside of it. You can use the `linked_resource` field // in the entry resource to refer to the original resource ID of the source // system. // // An entry resource contains resource details, for example, its schema. // Additionally, you can attach flexible metadata to an entry in the form of a // [Tag][google.cloud.datacatalog.v1.Tag]. message Entry { option (google.api.resource) = { type: "datacatalog.googleapis.com/Entry" pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" }; // Output only. The resource name of an entry in URL format. // // Note: The entry itself and its child resources might not be // stored in the location specified in its name. string name = 1 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/EntryGroup" } ]; // The resource this metadata entry refers to. // // For Google Cloud Platform resources, `linked_resource` is the // [Full Resource Name] // (https://cloud.google.com/apis/design/resource_names#full_resource_name). // For example, the `linked_resource` for a table resource from BigQuery is: // // `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}` // // Output only when the entry is one of the types in the `EntryType` enum. // // For entries with a `user_specified_type`, this field is optional and // defaults to an empty string. // // The resource string must contain only letters (a-z, A-Z), numbers (0-9), // underscores (_), periods (.), colons (:), slashes (/), dashes (-), // and hashes (#). // The maximum size is 200 bytes when encoded in UTF-8. string linked_resource = 9; // Fully qualified name (FQN) of the resource. Set automatically for entries // representing resources from synced systems. Settable only during creation // and read-only afterwards. Can be used for search and lookup of the entries. // // // FQNs take two forms: // // * For non-regionalized resources: // // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` // // * For regionalized resources: // // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}` // // Example for a DPMS table: // // `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}` string fully_qualified_name = 29; // Required. Entry type. oneof entry_type { // The type of the entry. // Only used for entries with types listed in the `EntryType` enum. // // Currently, only `FILESET` enum value is allowed. All other entries // created in Data Catalog must use the `user_specified_type`. EntryType type = 2; // Custom entry type that doesn't match any of the values allowed for input // and listed in the `EntryType` enum. // // When creating an entry, first check the type values in the enum. // If there are no appropriate types for the new entry, // provide a custom value, for example, `my_special_type`. // // The `user_specified_type` string has the following limitations: // // * Is case insensitive. // * Must begin with a letter or underscore. // * Can only contain letters, numbers, and underscores. // * Must be at least 1 character and at most 64 characters long. string user_specified_type = 16; } // The source system of the entry. oneof system { // Output only. Indicates the entry's source system that Data Catalog // integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore. IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // Indicates the entry's source system that Data Catalog doesn't // automatically integrate with. // // The `user_specified_system` string has the following limitations: // // * Is case insensitive. // * Must begin with a letter or underscore. // * Can only contain letters, numbers, and underscores. // * Must be at least 1 character and at most 64 characters long. string user_specified_system = 18; } // Type specification. oneof type_spec { // Specification that applies to a Cloud Storage fileset. Valid only // for entries with the `FILESET` type. GcsFilesetSpec gcs_fileset_spec = 6; // Specification that applies to a BigQuery table. Valid only for // entries with the `TABLE` type. BigQueryTableSpec bigquery_table_spec = 12; // Specification for a group of BigQuery tables with the `[prefix]YYYYMMDD` // name pattern. // // For more information, see [Introduction to partitioned tables] // (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding). BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; } // Type- and system-specific information. Specifications for types contain // fields common to all entries of a given type, and sub-specifications with // fields specific to a given source system. // // When extending the API with new types and systems, use this field instead // of the legacy `type_spec`. oneof spec { // Specification that applies to a table resource. Valid only // for entries with the `TABLE` type. DatabaseTableSpec database_table_spec = 24; // Specification that applies to a data source connection. Valid only // for entries with the `DATA_SOURCE_CONNECTION` type. DataSourceConnectionSpec data_source_connection_spec = 27; // Specification that applies to a user-defined function or procedure. Valid // only for entries with the `ROUTINE` type. RoutineSpec routine_spec = 28; } // Display name of an entry. // // The name must contain only Unicode letters, numbers (0-9), underscores (_), // dashes (-), spaces ( ), and can't start or end with spaces. // The maximum size is 200 bytes when encoded in UTF-8. // Default value is an empty string. string display_name = 3; // Entry description that can consist of several sentences or paragraphs // that describe entry contents. // // The description must not contain Unicode non-characters as well as C0 // and C1 control codes except tabs (HT), new lines (LF), carriage returns // (CR), and page breaks (FF). // The maximum size is 2000 bytes when encoded in UTF-8. // Default value is an empty string. string description = 4; // Schema of the entry. An entry might not have any schema attached to it. Schema schema = 5; // Timestamps from the underlying resource, not from the Data Catalog // entry. // // Output only when the entry has a type listed in the `EntryType` enum. // For entries with `user_specified_type`, this field is optional and defaults // to an empty timestamp. SystemTimestamps source_system_timestamps = 7; // Output only. Resource usage statistics. UsageSignal usage_signal = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Cloud labels attached to the entry. // // In Data Catalog, you can create and modify labels attached only to custom // entries. Synced entries have unmodifiable labels that come from the source // system. map labels = 14; // Output only. Physical location of the entry. DataSource data_source = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specification that applies to a table resource. Valid only // for entries with the `TABLE` type. message DatabaseTableSpec { // Type of the table. enum TableType { // Default unknown table type. TABLE_TYPE_UNSPECIFIED = 0; // Native table. NATIVE = 1; // External table. EXTERNAL = 2; } // Type of this table. TableType type = 1; } // Specification that applies to a data source connection. Valid only for // entries with the `DATA_SOURCE_CONNECTION` type. message DataSourceConnectionSpec { // Fields specific to BigQuery connections. BigQueryConnectionSpec bigquery_connection_spec = 1; } // Specification that applies to a routine. Valid only for // entries with the `ROUTINE` type. message RoutineSpec { // Input or output argument of a function or stored procedure. message Argument { // The input or output mode of the argument. enum Mode { // Unspecified mode. MODE_UNSPECIFIED = 0; // The argument is input-only. IN = 1; // The argument is output-only. OUT = 2; // The argument is both an input and an output. INOUT = 3; } // The name of the argument. A return argument of a function might not have // a name. string name = 1; // Specifies whether the argument is input or output. Mode mode = 2; // Type of the argument. The exact value depends on the source system and // the language. string type = 3; } // The fine-grained type of the routine. enum RoutineType { // Unspecified type. ROUTINE_TYPE_UNSPECIFIED = 0; // Non-builtin permanent scalar function. SCALAR_FUNCTION = 1; // Stored procedure. PROCEDURE = 2; } // The type of the routine. RoutineType routine_type = 1; // The language the routine is written in. The exact value depends on the // source system. For BigQuery routines, possible values are: // // * `SQL` // * `JAVASCRIPT` string language = 2; // Arguments of the routine. repeated Argument routine_arguments = 3; // Return type of the argument. The exact value depends on the source system // and the language. string return_type = 4; // The body of the routine. string definition_body = 5; // Contains fields specific to the source system. oneof system_spec { // Fields specific for BigQuery routines. BigQueryRoutineSpec bigquery_routine_spec = 6; } } // Entry group metadata. // // An `EntryGroup` resource represents a logical grouping of zero or more // Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources. message EntryGroup { option (google.api.resource) = { type: "datacatalog.googleapis.com/EntryGroup" pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" }; // The resource name of the entry group in URL format. // // Note: The entry group itself and its child resources might not be // stored in the location specified in its name. string name = 1; // A short name to identify the entry group, for example, // "analytics data - jan 2011". Default value is an empty string. string display_name = 2; // Entry group description. Can consist of several sentences or // paragraphs that describe the entry group contents. // Default value is an empty string. string description = 3; // Output only. Timestamps of the entry group. Default value is empty. SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request message for // [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. message CreateTagTemplateRequest { // Required. The name of the project and the template location // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { child_type: "datacatalog.googleapis.com/TagTemplate" } ]; // Required. The ID of the tag template to create. // // The ID must contain only lowercase letters (a-z), numbers (0-9), // or underscores (_), and must start with a letter or underscore. // The maximum size is 64 bytes when encoded in UTF-8. string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template to create. TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. message GetTagTemplateRequest { // Required. The name of the tag template to get. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplate" } ]; } // Request message for // [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. message UpdateTagTemplateRequest { // Required. The template to update. The `name` field must be set. TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; // Names of fields whose values to overwrite on a tag template. Currently, // only `display_name` can be overwritten. // // If this parameter is absent or empty, all modifiable fields // are overwritten. If such fields are non-required and omitted in the // request body, their values are emptied. google.protobuf.FieldMask update_mask = 2; } // Request message for // [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. message DeleteTagTemplateRequest { // Required. The name of the tag template to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplate" } ]; // Required. If true, deletes all tags that use this template. // // Currently, `true` is the only supported value. bool force = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. message CreateTagRequest { // Required. The name of the resource to attach this tag to. // // Tags can be attached to entries or entry groups. An entry can have up to // 1000 attached tags. // // Note: The tag and its child resources might not be stored in // the location specified in its name. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Tag" } ]; // Required. The tag to create. Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. message UpdateTagRequest { // Required. The updated tag. The "name" field must be set. Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; // Names of fields whose values to overwrite on a tag. Currently, a tag has // the only modifiable field with the name `fields`. // // In general, if this parameter is absent or empty, all modifiable fields // are overwritten. If such fields are non-required and omitted in the // request body, their values are emptied. google.protobuf.FieldMask update_mask = 2; } // Request message for // [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. message DeleteTagRequest { // Required. The name of the tag to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { child_type: "datacatalog.googleapis.com/Tag" } ]; } // Request message for // [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. message CreateTagTemplateFieldRequest { // Required. The name of the project and the template location // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplate" } ]; // Required. The ID of the tag template field to create. // // Note: Adding a required field to an existing template is *not* allowed. // // Field IDs can contain letters (both uppercase and lowercase), numbers // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 // character long and at most 128 characters long. Field IDs must also be // unique within their template. string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; // Required. The tag template field to create. TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. message UpdateTagTemplateFieldRequest { // Required. The name of the tag template field. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplateField" } ]; // Required. The template to update. TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; // Optional. Names of fields whose values to overwrite on an individual field of a tag // template. The following fields are modifiable: // // * `display_name` // * `type.enum_type` // * `is_required` // // If this parameter is absent or empty, all modifiable fields // are overwritten. If such fields are non-required and omitted in the request // body, their values are emptied with one exception: when updating an enum // type, the provided values are merged with the existing values. Therefore, // enum values can only be added, existing enum values cannot be deleted or // renamed. // // Additionally, updating a template field from optional to required is // *not* allowed. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for // [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. message RenameTagTemplateFieldRequest { // Required. The name of the tag template. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplateField" } ]; // Required. The new ID of this tag template field. For example, `my_new_field`. string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue]. message RenameTagTemplateFieldEnumValueRequest { // Required. The name of the enum field value. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue" } ]; // Required. The new display name of the enum value. For example, `my_new_enum_value`. string new_enum_value_display_name = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. message DeleteTagTemplateFieldRequest { // Required. The name of the tag template field to delete. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/TagTemplateField" } ]; // Required. If true, deletes this field from any tags that use it. // // Currently, `true` is the only supported value. bool force = 2 [(google.api.field_behavior) = REQUIRED]; } // Request message for // [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. message ListTagsRequest { // Required. The name of the Data Catalog resource to list the tags of. // // The resource can be an [Entry][google.cloud.datacatalog.v1.Entry] // or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup] // (without `/entries/{entries}` at the end). string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { child_type: "datacatalog.googleapis.com/Tag" } ]; // The maximum number of tags to return. Default is 10. Maximum limit is 1000. int32 page_size = 2; // Pagination token that specifies the next page to return. If empty, the // first page is returned. string page_token = 3; } // Response message for // [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. message ListTagsResponse { // [Tag][google.cloud.datacatalog.v1.Tag] details. repeated Tag tags = 1; // Pagination token of the next results page. Empty if there are // no more items in results. string next_page_token = 2; } // Request message for // [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. message ListEntriesRequest { // Required. The name of the entry group that contains the entries to list. // // Can be provided in URL format. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "datacatalog.googleapis.com/EntryGroup" } ]; // The maximum number of items to return. Default is 10. Maximum limit is // 1000. Throws an invalid argument if `page_size` is more than 1000. int32 page_size = 2; // Pagination token that specifies the next page to return. If empty, the // first page is returned. string page_token = 3; // The fields to return for each entry. If empty or omitted, all // fields are returned. // // For example, to return a list of entries with only the `name` field, // set `read_mask` to only one path with the `name` value. google.protobuf.FieldMask read_mask = 4; } // Response message for // [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. message ListEntriesResponse { // Entry details. repeated Entry entries = 1; // Pagination token of the next results page. Empty if there are no more items // in results. string next_page_token = 2; } // The enum field that lists all the types of entry resources in Data // Catalog. For example, a BigQuery table entry has the `TABLE` type. enum EntryType { // Default unknown type. ENTRY_TYPE_UNSPECIFIED = 0; // Output only. The entry type that has a GoogleSQL schema, including // logical views. TABLE = 2; // Output only. The type of models. // // For more information, see [Supported models in BigQuery ML] // (https://cloud.google.com/bigquery-ml/docs/introduction#supported_models_in). MODEL = 5; // An entry type for streaming entries. For example, a Pub/Sub topic. DATA_STREAM = 3; // An entry type for a set of files or objects. For example, a // Cloud Storage fileset. FILESET = 4; // A group of servers that work together. For example, a Kafka cluster. CLUSTER = 6; // A database. DATABASE = 7; // Output only. Connection to a data source. For example, a BigQuery // connection. DATA_SOURCE_CONNECTION = 8; // Output only. Routine, for example, a BigQuery routine. ROUTINE = 9; // A service, for example, a Dataproc Metastore service. SERVICE = 14; }