datacatalog.proto 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518
  1. // Copyright 2021 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.cloud.datacatalog.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/datacatalog/v1/bigquery.proto";
  21. import "google/cloud/datacatalog/v1/common.proto";
  22. import "google/cloud/datacatalog/v1/data_source.proto";
  23. import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto";
  24. import "google/cloud/datacatalog/v1/schema.proto";
  25. import "google/cloud/datacatalog/v1/search.proto";
  26. import "google/cloud/datacatalog/v1/table_spec.proto";
  27. import "google/cloud/datacatalog/v1/tags.proto";
  28. import "google/cloud/datacatalog/v1/timestamps.proto";
  29. import "google/cloud/datacatalog/v1/usage.proto";
  30. import "google/iam/v1/iam_policy.proto";
  31. import "google/iam/v1/policy.proto";
  32. import "google/protobuf/empty.proto";
  33. import "google/protobuf/field_mask.proto";
  34. import "google/protobuf/timestamp.proto";
  35. option cc_enable_arenas = true;
  36. option csharp_namespace = "Google.Cloud.DataCatalog.V1";
  37. option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog";
  38. option java_multiple_files = true;
  39. option java_package = "com.google.cloud.datacatalog.v1";
  40. option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
  41. option ruby_package = "Google::Cloud::DataCatalog::V1";
  42. option (google.api.resource_definition) = {
  43. type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue"
  44. pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{tag_template_field_id}/enumValues/{enum_value_display_name}"
  45. };
  46. // Data Catalog API service allows you to discover, understand, and manage
  47. // your data.
  48. service DataCatalog {
  49. option (google.api.default_host) = "datacatalog.googleapis.com";
  50. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  51. // Searches Data Catalog for multiple resources like entries and tags that
  52. // match a query.
  53. //
  54. // This is a [Custom Method]
  55. // (https://cloud.google.com/apis/design/custom_methods) that doesn't return
  56. // all information on a resource, only its ID and high level fields. To get
  57. // more information, you can subsequently call specific get methods.
  58. //
  59. // Note: Data Catalog search queries don't guarantee full recall. Results
  60. // that match your query might not be returned, even in subsequent
  61. // result pages. Additionally, returned (and not returned) results can vary
  62. // if you repeat search queries.
  63. //
  64. // For more information, see [Data Catalog search syntax]
  65. // (https://cloud.google.com/data-catalog/docs/how-to/search-reference).
  66. rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) {
  67. option (google.api.http) = {
  68. post: "/v1/catalog:search"
  69. body: "*"
  70. };
  71. option (google.api.method_signature) = "scope,query";
  72. }
  73. // Creates an entry group.
  74. //
  75. // An entry group contains logically related entries together with [Cloud
  76. // Identity and Access Management](/data-catalog/docs/concepts/iam) policies.
  77. // These policies specify users who can create, edit, and view entries
  78. // within entry groups.
  79. //
  80. // Data Catalog automatically creates entry groups with names that start with
  81. // the `@` symbol for the following resources:
  82. //
  83. // * BigQuery entries (`@bigquery`)
  84. // * Pub/Sub topics (`@pubsub`)
  85. // * Dataproc Metastore services (`@dataproc_metastore_{SERVICE_NAME_HASH}`)
  86. //
  87. // You can create your own entry groups for Cloud Storage fileset entries
  88. // and custom entries together with the corresponding IAM policies.
  89. // User-created entry groups can't contain the `@` symbol, it is reserved
  90. // for automatically created groups.
  91. //
  92. // Entry groups, like entries, can be searched.
  93. //
  94. // A maximum of 10,000 entry groups may be created per organization across all
  95. // locations.
  96. //
  97. // You must enable the Data Catalog API in the project identified by
  98. // the `parent` parameter. For more information, see [Data Catalog resource
  99. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  100. rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) {
  101. option (google.api.http) = {
  102. post: "/v1/{parent=projects/*/locations/*}/entryGroups"
  103. body: "entry_group"
  104. };
  105. option (google.api.method_signature) = "parent,entry_group_id,entry_group";
  106. }
  107. // Gets an entry group.
  108. rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) {
  109. option (google.api.http) = {
  110. get: "/v1/{name=projects/*/locations/*/entryGroups/*}"
  111. };
  112. option (google.api.method_signature) = "name";
  113. option (google.api.method_signature) = "name,read_mask";
  114. }
  115. // Updates an entry group.
  116. //
  117. // You must enable the Data Catalog API in the project identified by
  118. // the `entry_group.name` parameter. For more information, see [Data Catalog
  119. // resource
  120. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  121. rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) {
  122. option (google.api.http) = {
  123. patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}"
  124. body: "entry_group"
  125. };
  126. option (google.api.method_signature) = "entry_group";
  127. option (google.api.method_signature) = "entry_group,update_mask";
  128. }
  129. // Deletes an entry group.
  130. //
  131. // You must enable the Data Catalog API in the project
  132. // identified by the `name` parameter. For more information, see [Data Catalog
  133. // resource
  134. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  135. rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) {
  136. option (google.api.http) = {
  137. delete: "/v1/{name=projects/*/locations/*/entryGroups/*}"
  138. };
  139. option (google.api.method_signature) = "name";
  140. }
  141. // Lists entry groups.
  142. rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) {
  143. option (google.api.http) = {
  144. get: "/v1/{parent=projects/*/locations/*}/entryGroups"
  145. };
  146. option (google.api.method_signature) = "parent";
  147. }
  148. // Creates an entry.
  149. //
  150. // You can create entries only with 'FILESET', 'CLUSTER', 'DATA_STREAM',
  151. // or custom types. Data Catalog automatically creates entries with other
  152. // types during metadata ingestion from integrated systems.
  153. //
  154. // You must enable the Data Catalog API in the project identified by
  155. // the `parent` parameter. For more information, see [Data Catalog resource
  156. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  157. //
  158. // An entry group can have a maximum of 100,000 entries.
  159. rpc CreateEntry(CreateEntryRequest) returns (Entry) {
  160. option (google.api.http) = {
  161. post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries"
  162. body: "entry"
  163. };
  164. option (google.api.method_signature) = "parent,entry_id,entry";
  165. }
  166. // Updates an existing entry.
  167. //
  168. // You must enable the Data Catalog API in the project identified by
  169. // the `entry.name` parameter. For more information, see [Data Catalog
  170. // resource
  171. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  172. rpc UpdateEntry(UpdateEntryRequest) returns (Entry) {
  173. option (google.api.http) = {
  174. patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}"
  175. body: "entry"
  176. };
  177. option (google.api.method_signature) = "entry";
  178. option (google.api.method_signature) = "entry,update_mask";
  179. }
  180. // Deletes an existing entry.
  181. //
  182. // You can delete only the entries created by the
  183. // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]
  184. // method.
  185. //
  186. // You must enable the Data Catalog API in the project identified by
  187. // the `name` parameter. For more information, see [Data Catalog
  188. // resource
  189. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  190. rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) {
  191. option (google.api.http) = {
  192. delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}"
  193. };
  194. option (google.api.method_signature) = "name";
  195. }
  196. // Gets an entry.
  197. rpc GetEntry(GetEntryRequest) returns (Entry) {
  198. option (google.api.http) = {
  199. get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}"
  200. };
  201. option (google.api.method_signature) = "name";
  202. }
  203. // Gets an entry by its target resource name.
  204. //
  205. // The resource name comes from the source Google Cloud Platform service.
  206. rpc LookupEntry(LookupEntryRequest) returns (Entry) {
  207. option (google.api.http) = {
  208. get: "/v1/entries:lookup"
  209. };
  210. }
  211. // Lists entries.
  212. rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) {
  213. option (google.api.http) = {
  214. get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries"
  215. };
  216. option (google.api.method_signature) = "parent";
  217. }
  218. // Creates a tag template.
  219. //
  220. // You must enable the Data Catalog API in the project identified by the
  221. // `parent` parameter.
  222. // For more information, see [Data Catalog resource project]
  223. // (https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  224. rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) {
  225. option (google.api.http) = {
  226. post: "/v1/{parent=projects/*/locations/*}/tagTemplates"
  227. body: "tag_template"
  228. };
  229. option (google.api.method_signature) = "parent,tag_template_id,tag_template";
  230. }
  231. // Gets a tag template.
  232. rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) {
  233. option (google.api.http) = {
  234. get: "/v1/{name=projects/*/locations/*/tagTemplates/*}"
  235. };
  236. option (google.api.method_signature) = "name";
  237. }
  238. // Updates a tag template.
  239. //
  240. // You can't update template fields with this method. These fields are
  241. // separate resources with their own create, update, and delete methods.
  242. //
  243. // You must enable the Data Catalog API in the project identified by
  244. // the `tag_template.name` parameter. For more information, see [Data Catalog
  245. // resource
  246. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  247. rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) {
  248. option (google.api.http) = {
  249. patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}"
  250. body: "tag_template"
  251. };
  252. option (google.api.method_signature) = "tag_template";
  253. option (google.api.method_signature) = "tag_template,update_mask";
  254. }
  255. // Deletes a tag template and all tags that use it.
  256. //
  257. // You must enable the Data Catalog API in the project identified by
  258. // the `name` parameter. For more information, see [Data Catalog resource
  259. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  260. rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) {
  261. option (google.api.http) = {
  262. delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}"
  263. };
  264. option (google.api.method_signature) = "name,force";
  265. }
  266. // Creates a field in a tag template.
  267. //
  268. // You must enable the Data Catalog API in the project identified by
  269. // the `parent` parameter. For more information, see [Data Catalog resource
  270. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  271. rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) {
  272. option (google.api.http) = {
  273. post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields"
  274. body: "tag_template_field"
  275. };
  276. option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field";
  277. }
  278. // Updates a field in a tag template.
  279. //
  280. // You can't update the field type with this method.
  281. //
  282. // You must enable the Data Catalog API in the project
  283. // identified by the `name` parameter. For more information, see [Data Catalog
  284. // resource
  285. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  286. rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) {
  287. option (google.api.http) = {
  288. patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}"
  289. body: "tag_template_field"
  290. };
  291. option (google.api.method_signature) = "name,tag_template_field";
  292. option (google.api.method_signature) = "name,tag_template_field,update_mask";
  293. }
  294. // Renames a field in a tag template.
  295. //
  296. // You must enable the Data Catalog API in the project identified by the
  297. // `name` parameter. For more information, see [Data Catalog resource project]
  298. // (https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  299. rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) {
  300. option (google.api.http) = {
  301. post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename"
  302. body: "*"
  303. };
  304. option (google.api.method_signature) = "name,new_tag_template_field_id";
  305. }
  306. // Renames an enum value in a tag template.
  307. //
  308. // Within a single enum field, enum values must be unique.
  309. rpc RenameTagTemplateFieldEnumValue(RenameTagTemplateFieldEnumValueRequest) returns (TagTemplateField) {
  310. option (google.api.http) = {
  311. post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*/enumValues/*}:rename"
  312. body: "*"
  313. };
  314. option (google.api.method_signature) = "name,new_enum_value_display_name";
  315. }
  316. // Deletes a field in a tag template and all uses of this field from the tags
  317. // based on this template.
  318. //
  319. // You must enable the Data Catalog API in the project identified by
  320. // the `name` parameter. For more information, see [Data Catalog resource
  321. // project](https://cloud.google.com/data-catalog/docs/concepts/resource-project).
  322. rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) {
  323. option (google.api.http) = {
  324. delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}"
  325. };
  326. option (google.api.method_signature) = "name,force";
  327. }
  328. // Creates a tag and assigns it to:
  329. //
  330. // * An [Entry][google.cloud.datacatalog.v1.Entry] if the method name is
  331. // ``projects.locations.entryGroups.entries.tags.create``.
  332. // * Or [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]if the method
  333. // name is ``projects.locations.entryGroups.tags.create``.
  334. //
  335. // Note: The project identified by the `parent` parameter for the [tag]
  336. // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters)
  337. // and the [tag template]
  338. // (https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters)
  339. // used to create the tag must be in the same organization.
  340. rpc CreateTag(CreateTagRequest) returns (Tag) {
  341. option (google.api.http) = {
  342. post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags"
  343. body: "tag"
  344. additional_bindings {
  345. post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags"
  346. body: "tag"
  347. }
  348. };
  349. option (google.api.method_signature) = "parent,tag";
  350. }
  351. // Updates an existing tag.
  352. rpc UpdateTag(UpdateTagRequest) returns (Tag) {
  353. option (google.api.http) = {
  354. patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}"
  355. body: "tag"
  356. additional_bindings {
  357. patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}"
  358. body: "tag"
  359. }
  360. };
  361. option (google.api.method_signature) = "tag";
  362. option (google.api.method_signature) = "tag,update_mask";
  363. }
  364. // Deletes a tag.
  365. rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) {
  366. option (google.api.http) = {
  367. delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}"
  368. additional_bindings {
  369. delete: "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}"
  370. }
  371. };
  372. option (google.api.method_signature) = "name";
  373. }
  374. // Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].
  375. rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
  376. option (google.api.http) = {
  377. get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags"
  378. additional_bindings {
  379. get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags"
  380. }
  381. };
  382. option (google.api.method_signature) = "parent";
  383. }
  384. // Sets an access control policy for a resource. Replaces any existing
  385. // policy.
  386. //
  387. // Supported resources are:
  388. //
  389. // - Tag templates
  390. // - Entry groups
  391. //
  392. // Note: This method sets policies only within Data Catalog and can't be
  393. // used to manage policies in BigQuery, Pub/Sub, Dataproc Metastore, and any
  394. // external Google Cloud Platform resources synced with the Data Catalog.
  395. //
  396. // To call this method, you must have the following Google IAM permissions:
  397. //
  398. // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag
  399. // templates.
  400. // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
  401. rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) {
  402. option (google.api.http) = {
  403. post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy"
  404. body: "*"
  405. additional_bindings {
  406. post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy"
  407. body: "*"
  408. }
  409. };
  410. option (google.api.method_signature) = "resource,policy";
  411. }
  412. // Gets the access control policy for a resource.
  413. //
  414. // May return:
  415. //
  416. // * A`NOT_FOUND` error if the resource doesn't exist or you don't have the
  417. // permission to view it.
  418. // * An empty policy if the resource exists but doesn't have a set policy.
  419. //
  420. // Supported resources are:
  421. //
  422. // - Tag templates
  423. // - Entry groups
  424. //
  425. // Note: This method doesn't get policies from Google Cloud Platform
  426. // resources ingested into Data Catalog.
  427. //
  428. // To call this method, you must have the following Google IAM permissions:
  429. //
  430. // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag
  431. // templates.
  432. // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
  433. rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) {
  434. option (google.api.http) = {
  435. post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy"
  436. body: "*"
  437. additional_bindings {
  438. post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy"
  439. body: "*"
  440. }
  441. additional_bindings {
  442. post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy"
  443. body: "*"
  444. }
  445. };
  446. option (google.api.method_signature) = "resource";
  447. }
  448. // Gets your permissions on a resource.
  449. //
  450. // Returns an empty set of permissions if the resource doesn't exist.
  451. //
  452. // Supported resources are:
  453. //
  454. // - Tag templates
  455. // - Entry groups
  456. //
  457. // Note: This method gets policies only within Data Catalog and can't be
  458. // used to get policies from BigQuery, Pub/Sub, Dataproc Metastore, and any
  459. // external Google Cloud Platform resources ingested into Data Catalog.
  460. //
  461. // No Google IAM permissions are required to call this method.
  462. rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) {
  463. option (google.api.http) = {
  464. post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions"
  465. body: "*"
  466. additional_bindings {
  467. post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions"
  468. body: "*"
  469. }
  470. additional_bindings {
  471. post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions"
  472. body: "*"
  473. }
  474. };
  475. }
  476. }
  477. // Request message for
  478. // [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].
  479. message SearchCatalogRequest {
  480. // The criteria that select the subspace used for query matching.
  481. message Scope {
  482. // The list of organization IDs to search within.
  483. //
  484. // To find your organization ID, follow the steps from
  485. // [Creating and managing organizations]
  486. // (/resource-manager/docs/creating-managing-organization).
  487. repeated string include_org_ids = 2;
  488. // The list of project IDs to search within.
  489. //
  490. // For more information on the distinction between project names, IDs, and
  491. // numbers, see [Projects](/docs/overview/#projects).
  492. repeated string include_project_ids = 3;
  493. // If `true`, include Google Cloud Platform (GCP) public datasets in
  494. // search results. By default, they are excluded.
  495. //
  496. // See [Google Cloud Public Datasets](/public-datasets) for more
  497. // information.
  498. bool include_gcp_public_datasets = 7;
  499. // Optional. The list of locations to search within. If empty, all locations are
  500. // searched.
  501. //
  502. // Returns an error if any location in the list isn't one of the [Supported
  503. // regions](https://cloud.google.com/data-catalog/docs/concepts/regions#supported_regions).
  504. //
  505. // If a location is unreachable, its name is returned in the
  506. // `SearchCatalogResponse.unreachable` field. To get additional information
  507. // on the error, repeat the search request and set the location name as the
  508. // value of this parameter.
  509. repeated string restricted_locations = 16 [(google.api.field_behavior) = OPTIONAL];
  510. // Optional. If `true`, include [public tag
  511. // templates][google.cloud.datacatalog.v1.TagTemplate.is_publicly_readable]
  512. // in the search results. By default, they are included only if you have
  513. // explicit permissions on them to view them. For example, if you are the
  514. // owner.
  515. //
  516. // Other scope fields, for example, ``include_org_ids``,
  517. // still restrict the returned public tag templates and at least one of
  518. // them is required.
  519. bool include_public_tag_templates = 19 [(google.api.field_behavior) = OPTIONAL];
  520. }
  521. // Required. The scope of this search request.
  522. //
  523. // The `scope` is invalid if `include_org_ids`, `include_project_ids` are
  524. // empty AND `include_gcp_public_datasets` is set to `false`. In this case,
  525. // the request returns an error.
  526. Scope scope = 6 [(google.api.field_behavior) = REQUIRED];
  527. // Optional. The query string with a minimum of 3 characters and specific syntax.
  528. // For more information, see
  529. // [Data Catalog search syntax](/data-catalog/docs/how-to/search-reference).
  530. //
  531. // An empty query string returns all data assets (in the specified scope)
  532. // that you have access to.
  533. //
  534. // A query string can be a simple `xyz` or qualified by predicates:
  535. //
  536. // * `name:x`
  537. // * `column:y`
  538. // * `description:z`
  539. string query = 1 [(google.api.field_behavior) = OPTIONAL];
  540. // Number of results to return in a single search page.
  541. //
  542. // Can't be negative or 0, defaults to 10 in this case.
  543. // The maximum number is 1000. If exceeded, throws an "invalid argument"
  544. // exception.
  545. int32 page_size = 2;
  546. // Optional. Pagination token that, if specified, returns the next page of search
  547. // results. If empty, returns the first page.
  548. //
  549. // This token is returned in the [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token]
  550. // field of the response to a previous
  551. // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]
  552. // call.
  553. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  554. // Specifies the order of results.
  555. //
  556. // Currently supported case-sensitive values are:
  557. //
  558. // * `relevance` that can only be descending
  559. // * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default
  560. //
  561. // If this parameter is omitted, it defaults to the descending `relevance`.
  562. string order_by = 5;
  563. }
  564. // Response message for
  565. // [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog].
  566. message SearchCatalogResponse {
  567. // Search results.
  568. repeated SearchCatalogResult results = 1;
  569. // Pagination token that can be used in subsequent calls to retrieve the next
  570. // page of results.
  571. string next_page_token = 3;
  572. // Unreachable locations. Search results don't include data from those
  573. // locations.
  574. //
  575. // To get additional information on an error, repeat the search request and
  576. // restrict it to specific locations by setting the
  577. // `SearchCatalogRequest.scope.restricted_locations` parameter.
  578. repeated string unreachable = 6;
  579. }
  580. // Request message for
  581. // [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup].
  582. message CreateEntryGroupRequest {
  583. // Required. The names of the project and location that the new entry group belongs to.
  584. //
  585. // Note: The entry group itself and its child resources might not be
  586. // stored in the location specified in its name.
  587. string parent = 1 [
  588. (google.api.field_behavior) = REQUIRED,
  589. (google.api.resource_reference) = {
  590. child_type: "datacatalog.googleapis.com/EntryGroup"
  591. }
  592. ];
  593. // Required. The ID of the entry group to create.
  594. //
  595. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  596. // underscores (_), and must start with a letter or underscore.
  597. // The maximum size is 64 bytes when encoded in UTF-8.
  598. string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED];
  599. // The entry group to create. Defaults to empty.
  600. EntryGroup entry_group = 2;
  601. }
  602. // Request message for
  603. // [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup].
  604. message UpdateEntryGroupRequest {
  605. // Required. Updates for the entry group. The `name` field must be set.
  606. EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED];
  607. // Names of fields whose values to overwrite on an entry group.
  608. //
  609. // If this parameter is absent or empty, all modifiable fields
  610. // are overwritten. If such fields are non-required and omitted in the
  611. // request body, their values are emptied.
  612. google.protobuf.FieldMask update_mask = 2;
  613. }
  614. // Request message for
  615. // [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup].
  616. message GetEntryGroupRequest {
  617. // Required. The name of the entry group to get.
  618. string name = 1 [
  619. (google.api.field_behavior) = REQUIRED,
  620. (google.api.resource_reference) = {
  621. type: "datacatalog.googleapis.com/EntryGroup"
  622. }
  623. ];
  624. // The fields to return. If empty or omitted, all fields are returned.
  625. google.protobuf.FieldMask read_mask = 2;
  626. }
  627. // Request message for
  628. // [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup].
  629. message DeleteEntryGroupRequest {
  630. // Required. The name of the entry group to delete.
  631. string name = 1 [
  632. (google.api.field_behavior) = REQUIRED,
  633. (google.api.resource_reference) = {
  634. type: "datacatalog.googleapis.com/EntryGroup"
  635. }
  636. ];
  637. // Optional. If true, deletes all entries in the entry group.
  638. bool force = 2 [(google.api.field_behavior) = OPTIONAL];
  639. }
  640. // Request message for
  641. // [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
  642. message ListEntryGroupsRequest {
  643. // Required. The name of the location that contains the entry groups to list.
  644. //
  645. // Can be provided as a URL.
  646. string parent = 1 [
  647. (google.api.field_behavior) = REQUIRED,
  648. (google.api.resource_reference) = {
  649. type: "datacatalog.googleapis.com/EntryGroup"
  650. }
  651. ];
  652. // Optional. The maximum number of items to return.
  653. //
  654. // Default is 10. Maximum limit is 1000.
  655. // Throws an invalid argument if `page_size` is greater than 1000.
  656. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  657. // Optional. Pagination token that specifies the next page to return.
  658. // If empty, returns the first page.
  659. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  660. }
  661. // Response message for
  662. // [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups].
  663. message ListEntryGroupsResponse {
  664. // Entry group details.
  665. repeated EntryGroup entry_groups = 1;
  666. // Pagination token to specify in the next call to retrieve the next page of
  667. // results. Empty if there are no more items.
  668. string next_page_token = 2;
  669. }
  670. // Request message for
  671. // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry].
  672. message CreateEntryRequest {
  673. // Required. The name of the entry group this entry belongs to.
  674. //
  675. // Note: The entry itself and its child resources might not be stored in
  676. // the location specified in its name.
  677. string parent = 1 [
  678. (google.api.field_behavior) = REQUIRED,
  679. (google.api.resource_reference) = {
  680. type: "datacatalog.googleapis.com/EntryGroup"
  681. }
  682. ];
  683. // Required. The ID of the entry to create.
  684. //
  685. // The ID must contain only letters (a-z, A-Z), numbers (0-9),
  686. // and underscores (_).
  687. // The maximum size is 64 bytes when encoded in UTF-8.
  688. string entry_id = 3 [(google.api.field_behavior) = REQUIRED];
  689. // Required. The entry to create.
  690. Entry entry = 2 [(google.api.field_behavior) = REQUIRED];
  691. }
  692. // Request message for
  693. // [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry].
  694. message UpdateEntryRequest {
  695. // Required. Updates for the entry. The `name` field must be set.
  696. Entry entry = 1 [(google.api.field_behavior) = REQUIRED];
  697. // Names of fields whose values to overwrite on an entry.
  698. //
  699. // If this parameter is absent or empty, all modifiable fields
  700. // are overwritten. If such fields are non-required and omitted in the
  701. // request body, their values are emptied.
  702. //
  703. // You can modify only the fields listed below.
  704. //
  705. // For entries with type `DATA_STREAM`:
  706. //
  707. // * `schema`
  708. //
  709. // For entries with type `FILESET`:
  710. //
  711. // * `schema`
  712. // * `display_name`
  713. // * `description`
  714. // * `gcs_fileset_spec`
  715. // * `gcs_fileset_spec.file_patterns`
  716. //
  717. // For entries with `user_specified_type`:
  718. //
  719. // * `schema`
  720. // * `display_name`
  721. // * `description`
  722. // * `user_specified_type`
  723. // * `user_specified_system`
  724. // * `linked_resource`
  725. // * `source_system_timestamps`
  726. google.protobuf.FieldMask update_mask = 2;
  727. }
  728. // Request message for
  729. // [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry].
  730. message DeleteEntryRequest {
  731. // Required. The name of the entry to delete.
  732. string name = 1 [
  733. (google.api.field_behavior) = REQUIRED,
  734. (google.api.resource_reference) = {
  735. type: "datacatalog.googleapis.com/Entry"
  736. }
  737. ];
  738. }
  739. // Request message for
  740. // [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry].
  741. message GetEntryRequest {
  742. // Required. The name of the entry to get.
  743. string name = 1 [
  744. (google.api.field_behavior) = REQUIRED,
  745. (google.api.resource_reference) = {
  746. type: "datacatalog.googleapis.com/Entry"
  747. }
  748. ];
  749. }
  750. // Request message for
  751. // [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry].
  752. message LookupEntryRequest {
  753. // Required. A full name, SQL name, or a fully qualified name of a
  754. // Google Cloud Platform resource.
  755. oneof target_name {
  756. // The full name of the Google Cloud Platform resource the Data Catalog
  757. // entry represents. For more information, see [Full Resource Name]
  758. // (https://cloud.google.com/apis/design/resource_names#full_resource_name).
  759. //
  760. // Full names are case-sensitive. For example:
  761. //
  762. // * `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}`
  763. // * `//pubsub.googleapis.com/projects/{PROJECT_ID}/topics/{TOPIC_ID}`
  764. string linked_resource = 1;
  765. // The SQL name of the entry. SQL names are case-sensitive.
  766. //
  767. // Examples:
  768. //
  769. // * `pubsub.topic.{PROJECT_ID}.{TOPIC_ID}`
  770. // * `pubsub.topic.{PROJECT_ID}.`\``{TOPIC.ID.SEPARATED.WITH.DOTS}`\`
  771. // * `bigquery.table.{PROJECT_ID}.{DATASET_ID}.{TABLE_ID}`
  772. // * `bigquery.dataset.{PROJECT_ID}.{DATASET_ID}`
  773. // * `datacatalog.entry.{PROJECT_ID}.{LOCATION_ID}.{ENTRY_GROUP_ID}.{ENTRY_ID}`
  774. //
  775. // Identifiers (`*_ID`) should comply with the
  776. // [Lexical structure in Standard SQL]
  777. // (https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical).
  778. string sql_resource = 3;
  779. // Fully qualified name (FQN) of the resource.
  780. //
  781. // FQNs take two forms:
  782. //
  783. // * For non-regionalized resources:
  784. //
  785. // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
  786. //
  787. // * For regionalized resources:
  788. //
  789. // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
  790. //
  791. // Example for a DPMS table:
  792. //
  793. // `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}`
  794. string fully_qualified_name = 5;
  795. }
  796. }
  797. // Entry metadata.
  798. // A Data Catalog entry represents another resource in Google
  799. // Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or
  800. // outside of it. You can use the `linked_resource` field
  801. // in the entry resource to refer to the original resource ID of the source
  802. // system.
  803. //
  804. // An entry resource contains resource details, for example, its schema.
  805. // Additionally, you can attach flexible metadata to an entry in the form of a
  806. // [Tag][google.cloud.datacatalog.v1.Tag].
  807. message Entry {
  808. option (google.api.resource) = {
  809. type: "datacatalog.googleapis.com/Entry"
  810. pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}"
  811. };
  812. // Output only. The resource name of an entry in URL format.
  813. //
  814. // Note: The entry itself and its child resources might not be
  815. // stored in the location specified in its name.
  816. string name = 1 [
  817. (google.api.field_behavior) = OUTPUT_ONLY,
  818. (google.api.resource_reference) = {
  819. type: "datacatalog.googleapis.com/EntryGroup"
  820. }
  821. ];
  822. // The resource this metadata entry refers to.
  823. //
  824. // For Google Cloud Platform resources, `linked_resource` is the
  825. // [Full Resource Name]
  826. // (https://cloud.google.com/apis/design/resource_names#full_resource_name).
  827. // For example, the `linked_resource` for a table resource from BigQuery is:
  828. //
  829. // `//bigquery.googleapis.com/projects/{PROJECT_ID}/datasets/{DATASET_ID}/tables/{TABLE_ID}`
  830. //
  831. // Output only when the entry is one of the types in the `EntryType` enum.
  832. //
  833. // For entries with a `user_specified_type`, this field is optional and
  834. // defaults to an empty string.
  835. //
  836. // The resource string must contain only letters (a-z, A-Z), numbers (0-9),
  837. // underscores (_), periods (.), colons (:), slashes (/), dashes (-),
  838. // and hashes (#).
  839. // The maximum size is 200 bytes when encoded in UTF-8.
  840. string linked_resource = 9;
  841. // Fully qualified name (FQN) of the resource. Set automatically for entries
  842. // representing resources from synced systems. Settable only during creation
  843. // and read-only afterwards. Can be used for search and lookup of the entries.
  844. //
  845. //
  846. // FQNs take two forms:
  847. //
  848. // * For non-regionalized resources:
  849. //
  850. // `{SYSTEM}:{PROJECT}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
  851. //
  852. // * For regionalized resources:
  853. //
  854. // `{SYSTEM}:{PROJECT}.{LOCATION_ID}.{PATH_TO_RESOURCE_SEPARATED_WITH_DOTS}`
  855. //
  856. // Example for a DPMS table:
  857. //
  858. // `dataproc_metastore:{PROJECT_ID}.{LOCATION_ID}.{INSTANCE_ID}.{DATABASE_ID}.{TABLE_ID}`
  859. string fully_qualified_name = 29;
  860. // Required. Entry type.
  861. oneof entry_type {
  862. // The type of the entry.
  863. // Only used for entries with types listed in the `EntryType` enum.
  864. //
  865. // Currently, only `FILESET` enum value is allowed. All other entries
  866. // created in Data Catalog must use the `user_specified_type`.
  867. EntryType type = 2;
  868. // Custom entry type that doesn't match any of the values allowed for input
  869. // and listed in the `EntryType` enum.
  870. //
  871. // When creating an entry, first check the type values in the enum.
  872. // If there are no appropriate types for the new entry,
  873. // provide a custom value, for example, `my_special_type`.
  874. //
  875. // The `user_specified_type` string has the following limitations:
  876. //
  877. // * Is case insensitive.
  878. // * Must begin with a letter or underscore.
  879. // * Can only contain letters, numbers, and underscores.
  880. // * Must be at least 1 character and at most 64 characters long.
  881. string user_specified_type = 16;
  882. }
  883. // The source system of the entry.
  884. oneof system {
  885. // Output only. Indicates the entry's source system that Data Catalog
  886. // integrates with, such as BigQuery, Pub/Sub, or Dataproc Metastore.
  887. IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  888. // Indicates the entry's source system that Data Catalog doesn't
  889. // automatically integrate with.
  890. //
  891. // The `user_specified_system` string has the following limitations:
  892. //
  893. // * Is case insensitive.
  894. // * Must begin with a letter or underscore.
  895. // * Can only contain letters, numbers, and underscores.
  896. // * Must be at least 1 character and at most 64 characters long.
  897. string user_specified_system = 18;
  898. }
  899. // Type specification.
  900. oneof type_spec {
  901. // Specification that applies to a Cloud Storage fileset. Valid only
  902. // for entries with the `FILESET` type.
  903. GcsFilesetSpec gcs_fileset_spec = 6;
  904. // Specification that applies to a BigQuery table. Valid only for
  905. // entries with the `TABLE` type.
  906. BigQueryTableSpec bigquery_table_spec = 12;
  907. // Specification for a group of BigQuery tables with the `[prefix]YYYYMMDD`
  908. // name pattern.
  909. //
  910. // For more information, see [Introduction to partitioned tables]
  911. // (https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding).
  912. BigQueryDateShardedSpec bigquery_date_sharded_spec = 15;
  913. }
  914. // Type- and system-specific information. Specifications for types contain
  915. // fields common to all entries of a given type, and sub-specifications with
  916. // fields specific to a given source system.
  917. //
  918. // When extending the API with new types and systems, use this field instead
  919. // of the legacy `type_spec`.
  920. oneof spec {
  921. // Specification that applies to a table resource. Valid only
  922. // for entries with the `TABLE` type.
  923. DatabaseTableSpec database_table_spec = 24;
  924. // Specification that applies to a data source connection. Valid only
  925. // for entries with the `DATA_SOURCE_CONNECTION` type.
  926. DataSourceConnectionSpec data_source_connection_spec = 27;
  927. // Specification that applies to a user-defined function or procedure. Valid
  928. // only for entries with the `ROUTINE` type.
  929. RoutineSpec routine_spec = 28;
  930. }
  931. // Display name of an entry.
  932. //
  933. // The name must contain only Unicode letters, numbers (0-9), underscores (_),
  934. // dashes (-), spaces ( ), and can't start or end with spaces.
  935. // The maximum size is 200 bytes when encoded in UTF-8.
  936. // Default value is an empty string.
  937. string display_name = 3;
  938. // Entry description that can consist of several sentences or paragraphs
  939. // that describe entry contents.
  940. //
  941. // The description must not contain Unicode non-characters as well as C0
  942. // and C1 control codes except tabs (HT), new lines (LF), carriage returns
  943. // (CR), and page breaks (FF).
  944. // The maximum size is 2000 bytes when encoded in UTF-8.
  945. // Default value is an empty string.
  946. string description = 4;
  947. // Schema of the entry. An entry might not have any schema attached to it.
  948. Schema schema = 5;
  949. // Timestamps from the underlying resource, not from the Data Catalog
  950. // entry.
  951. //
  952. // Output only when the entry has a type listed in the `EntryType` enum.
  953. // For entries with `user_specified_type`, this field is optional and defaults
  954. // to an empty timestamp.
  955. SystemTimestamps source_system_timestamps = 7;
  956. // Output only. Resource usage statistics.
  957. UsageSignal usage_signal = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  958. // Cloud labels attached to the entry.
  959. //
  960. // In Data Catalog, you can create and modify labels attached only to custom
  961. // entries. Synced entries have unmodifiable labels that come from the source
  962. // system.
  963. map<string, string> labels = 14;
  964. // Output only. Physical location of the entry.
  965. DataSource data_source = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
  966. }
  967. // Specification that applies to a table resource. Valid only
  968. // for entries with the `TABLE` type.
  969. message DatabaseTableSpec {
  970. // Type of the table.
  971. enum TableType {
  972. // Default unknown table type.
  973. TABLE_TYPE_UNSPECIFIED = 0;
  974. // Native table.
  975. NATIVE = 1;
  976. // External table.
  977. EXTERNAL = 2;
  978. }
  979. // Type of this table.
  980. TableType type = 1;
  981. }
  982. // Specification that applies to a data source connection. Valid only for
  983. // entries with the `DATA_SOURCE_CONNECTION` type.
  984. message DataSourceConnectionSpec {
  985. // Fields specific to BigQuery connections.
  986. BigQueryConnectionSpec bigquery_connection_spec = 1;
  987. }
  988. // Specification that applies to a routine. Valid only for
  989. // entries with the `ROUTINE` type.
  990. message RoutineSpec {
  991. // Input or output argument of a function or stored procedure.
  992. message Argument {
  993. // The input or output mode of the argument.
  994. enum Mode {
  995. // Unspecified mode.
  996. MODE_UNSPECIFIED = 0;
  997. // The argument is input-only.
  998. IN = 1;
  999. // The argument is output-only.
  1000. OUT = 2;
  1001. // The argument is both an input and an output.
  1002. INOUT = 3;
  1003. }
  1004. // The name of the argument. A return argument of a function might not have
  1005. // a name.
  1006. string name = 1;
  1007. // Specifies whether the argument is input or output.
  1008. Mode mode = 2;
  1009. // Type of the argument. The exact value depends on the source system and
  1010. // the language.
  1011. string type = 3;
  1012. }
  1013. // The fine-grained type of the routine.
  1014. enum RoutineType {
  1015. // Unspecified type.
  1016. ROUTINE_TYPE_UNSPECIFIED = 0;
  1017. // Non-builtin permanent scalar function.
  1018. SCALAR_FUNCTION = 1;
  1019. // Stored procedure.
  1020. PROCEDURE = 2;
  1021. }
  1022. // The type of the routine.
  1023. RoutineType routine_type = 1;
  1024. // The language the routine is written in. The exact value depends on the
  1025. // source system. For BigQuery routines, possible values are:
  1026. //
  1027. // * `SQL`
  1028. // * `JAVASCRIPT`
  1029. string language = 2;
  1030. // Arguments of the routine.
  1031. repeated Argument routine_arguments = 3;
  1032. // Return type of the argument. The exact value depends on the source system
  1033. // and the language.
  1034. string return_type = 4;
  1035. // The body of the routine.
  1036. string definition_body = 5;
  1037. // Contains fields specific to the source system.
  1038. oneof system_spec {
  1039. // Fields specific for BigQuery routines.
  1040. BigQueryRoutineSpec bigquery_routine_spec = 6;
  1041. }
  1042. }
  1043. // Entry group metadata.
  1044. //
  1045. // An `EntryGroup` resource represents a logical grouping of zero or more
  1046. // Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources.
  1047. message EntryGroup {
  1048. option (google.api.resource) = {
  1049. type: "datacatalog.googleapis.com/EntryGroup"
  1050. pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}"
  1051. };
  1052. // The resource name of the entry group in URL format.
  1053. //
  1054. // Note: The entry group itself and its child resources might not be
  1055. // stored in the location specified in its name.
  1056. string name = 1;
  1057. // A short name to identify the entry group, for example,
  1058. // "analytics data - jan 2011". Default value is an empty string.
  1059. string display_name = 2;
  1060. // Entry group description. Can consist of several sentences or
  1061. // paragraphs that describe the entry group contents.
  1062. // Default value is an empty string.
  1063. string description = 3;
  1064. // Output only. Timestamps of the entry group. Default value is empty.
  1065. SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1066. }
  1067. // Request message for
  1068. // [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate].
  1069. message CreateTagTemplateRequest {
  1070. // Required. The name of the project and the template location
  1071. // [region](https://cloud.google.com/data-catalog/docs/concepts/regions).
  1072. string parent = 1 [
  1073. (google.api.field_behavior) = REQUIRED,
  1074. (google.api.resource_reference) = {
  1075. child_type: "datacatalog.googleapis.com/TagTemplate"
  1076. }
  1077. ];
  1078. // Required. The ID of the tag template to create.
  1079. //
  1080. // The ID must contain only lowercase letters (a-z), numbers (0-9),
  1081. // or underscores (_), and must start with a letter or underscore.
  1082. // The maximum size is 64 bytes when encoded in UTF-8.
  1083. string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED];
  1084. // Required. The tag template to create.
  1085. TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED];
  1086. }
  1087. // Request message for
  1088. // [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate].
  1089. message GetTagTemplateRequest {
  1090. // Required. The name of the tag template to get.
  1091. string name = 1 [
  1092. (google.api.field_behavior) = REQUIRED,
  1093. (google.api.resource_reference) = {
  1094. type: "datacatalog.googleapis.com/TagTemplate"
  1095. }
  1096. ];
  1097. }
  1098. // Request message for
  1099. // [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate].
  1100. message UpdateTagTemplateRequest {
  1101. // Required. The template to update. The `name` field must be set.
  1102. TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED];
  1103. // Names of fields whose values to overwrite on a tag template. Currently,
  1104. // only `display_name` can be overwritten.
  1105. //
  1106. // If this parameter is absent or empty, all modifiable fields
  1107. // are overwritten. If such fields are non-required and omitted in the
  1108. // request body, their values are emptied.
  1109. google.protobuf.FieldMask update_mask = 2;
  1110. }
  1111. // Request message for
  1112. // [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate].
  1113. message DeleteTagTemplateRequest {
  1114. // Required. The name of the tag template to delete.
  1115. string name = 1 [
  1116. (google.api.field_behavior) = REQUIRED,
  1117. (google.api.resource_reference) = {
  1118. type: "datacatalog.googleapis.com/TagTemplate"
  1119. }
  1120. ];
  1121. // Required. If true, deletes all tags that use this template.
  1122. //
  1123. // Currently, `true` is the only supported value.
  1124. bool force = 2 [(google.api.field_behavior) = REQUIRED];
  1125. }
  1126. // Request message for
  1127. // [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag].
  1128. message CreateTagRequest {
  1129. // Required. The name of the resource to attach this tag to.
  1130. //
  1131. // Tags can be attached to entries or entry groups. An entry can have up to
  1132. // 1000 attached tags.
  1133. //
  1134. // Note: The tag and its child resources might not be stored in
  1135. // the location specified in its name.
  1136. string parent = 1 [
  1137. (google.api.field_behavior) = REQUIRED,
  1138. (google.api.resource_reference) = {
  1139. type: "datacatalog.googleapis.com/Tag"
  1140. }
  1141. ];
  1142. // Required. The tag to create.
  1143. Tag tag = 2 [(google.api.field_behavior) = REQUIRED];
  1144. }
  1145. // Request message for
  1146. // [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag].
  1147. message UpdateTagRequest {
  1148. // Required. The updated tag. The "name" field must be set.
  1149. Tag tag = 1 [(google.api.field_behavior) = REQUIRED];
  1150. // Names of fields whose values to overwrite on a tag. Currently, a tag has
  1151. // the only modifiable field with the name `fields`.
  1152. //
  1153. // In general, if this parameter is absent or empty, all modifiable fields
  1154. // are overwritten. If such fields are non-required and omitted in the
  1155. // request body, their values are emptied.
  1156. google.protobuf.FieldMask update_mask = 2;
  1157. }
  1158. // Request message for
  1159. // [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag].
  1160. message DeleteTagRequest {
  1161. // Required. The name of the tag to delete.
  1162. string name = 1 [
  1163. (google.api.field_behavior) = REQUIRED,
  1164. (google.api.resource_reference) = {
  1165. child_type: "datacatalog.googleapis.com/Tag"
  1166. }
  1167. ];
  1168. }
  1169. // Request message for
  1170. // [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField].
  1171. message CreateTagTemplateFieldRequest {
  1172. // Required. The name of the project and the template location
  1173. // [region](https://cloud.google.com/data-catalog/docs/concepts/regions).
  1174. string parent = 1 [
  1175. (google.api.field_behavior) = REQUIRED,
  1176. (google.api.resource_reference) = {
  1177. type: "datacatalog.googleapis.com/TagTemplate"
  1178. }
  1179. ];
  1180. // Required. The ID of the tag template field to create.
  1181. //
  1182. // Note: Adding a required field to an existing template is *not* allowed.
  1183. //
  1184. // Field IDs can contain letters (both uppercase and lowercase), numbers
  1185. // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1
  1186. // character long and at most 128 characters long. Field IDs must also be
  1187. // unique within their template.
  1188. string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED];
  1189. // Required. The tag template field to create.
  1190. TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED];
  1191. }
  1192. // Request message for
  1193. // [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField].
  1194. message UpdateTagTemplateFieldRequest {
  1195. // Required. The name of the tag template field.
  1196. string name = 1 [
  1197. (google.api.field_behavior) = REQUIRED,
  1198. (google.api.resource_reference) = {
  1199. type: "datacatalog.googleapis.com/TagTemplateField"
  1200. }
  1201. ];
  1202. // Required. The template to update.
  1203. TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED];
  1204. // Optional. Names of fields whose values to overwrite on an individual field of a tag
  1205. // template. The following fields are modifiable:
  1206. //
  1207. // * `display_name`
  1208. // * `type.enum_type`
  1209. // * `is_required`
  1210. //
  1211. // If this parameter is absent or empty, all modifiable fields
  1212. // are overwritten. If such fields are non-required and omitted in the request
  1213. // body, their values are emptied with one exception: when updating an enum
  1214. // type, the provided values are merged with the existing values. Therefore,
  1215. // enum values can only be added, existing enum values cannot be deleted or
  1216. // renamed.
  1217. //
  1218. // Additionally, updating a template field from optional to required is
  1219. // *not* allowed.
  1220. google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL];
  1221. }
  1222. // Request message for
  1223. // [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField].
  1224. message RenameTagTemplateFieldRequest {
  1225. // Required. The name of the tag template.
  1226. string name = 1 [
  1227. (google.api.field_behavior) = REQUIRED,
  1228. (google.api.resource_reference) = {
  1229. type: "datacatalog.googleapis.com/TagTemplateField"
  1230. }
  1231. ];
  1232. // Required. The new ID of this tag template field. For example, `my_new_field`.
  1233. string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED];
  1234. }
  1235. // Request message for
  1236. // [RenameTagTemplateFieldEnumValue][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateFieldEnumValue].
  1237. message RenameTagTemplateFieldEnumValueRequest {
  1238. // Required. The name of the enum field value.
  1239. string name = 1 [
  1240. (google.api.field_behavior) = REQUIRED,
  1241. (google.api.resource_reference) = {
  1242. type: "datacatalog.googleapis.com/TagTemplateFieldEnumValue"
  1243. }
  1244. ];
  1245. // Required. The new display name of the enum value. For example, `my_new_enum_value`.
  1246. string new_enum_value_display_name = 2 [(google.api.field_behavior) = REQUIRED];
  1247. }
  1248. // Request message for
  1249. // [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField].
  1250. message DeleteTagTemplateFieldRequest {
  1251. // Required. The name of the tag template field to delete.
  1252. string name = 1 [
  1253. (google.api.field_behavior) = REQUIRED,
  1254. (google.api.resource_reference) = {
  1255. type: "datacatalog.googleapis.com/TagTemplateField"
  1256. }
  1257. ];
  1258. // Required. If true, deletes this field from any tags that use it.
  1259. //
  1260. // Currently, `true` is the only supported value.
  1261. bool force = 2 [(google.api.field_behavior) = REQUIRED];
  1262. }
  1263. // Request message for
  1264. // [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
  1265. message ListTagsRequest {
  1266. // Required. The name of the Data Catalog resource to list the tags of.
  1267. //
  1268. // The resource can be an [Entry][google.cloud.datacatalog.v1.Entry]
  1269. // or an [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]
  1270. // (without `/entries/{entries}` at the end).
  1271. string parent = 1 [
  1272. (google.api.field_behavior) = REQUIRED,
  1273. (google.api.resource_reference) = {
  1274. child_type: "datacatalog.googleapis.com/Tag"
  1275. }
  1276. ];
  1277. // The maximum number of tags to return. Default is 10. Maximum limit is 1000.
  1278. int32 page_size = 2;
  1279. // Pagination token that specifies the next page to return. If empty, the
  1280. // first page is returned.
  1281. string page_token = 3;
  1282. }
  1283. // Response message for
  1284. // [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags].
  1285. message ListTagsResponse {
  1286. // [Tag][google.cloud.datacatalog.v1.Tag] details.
  1287. repeated Tag tags = 1;
  1288. // Pagination token of the next results page. Empty if there are
  1289. // no more items in results.
  1290. string next_page_token = 2;
  1291. }
  1292. // Request message for
  1293. // [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].
  1294. message ListEntriesRequest {
  1295. // Required. The name of the entry group that contains the entries to list.
  1296. //
  1297. // Can be provided in URL format.
  1298. string parent = 1 [
  1299. (google.api.field_behavior) = REQUIRED,
  1300. (google.api.resource_reference) = {
  1301. type: "datacatalog.googleapis.com/EntryGroup"
  1302. }
  1303. ];
  1304. // The maximum number of items to return. Default is 10. Maximum limit is
  1305. // 1000. Throws an invalid argument if `page_size` is more than 1000.
  1306. int32 page_size = 2;
  1307. // Pagination token that specifies the next page to return. If empty, the
  1308. // first page is returned.
  1309. string page_token = 3;
  1310. // The fields to return for each entry. If empty or omitted, all
  1311. // fields are returned.
  1312. //
  1313. // For example, to return a list of entries with only the `name` field,
  1314. // set `read_mask` to only one path with the `name` value.
  1315. google.protobuf.FieldMask read_mask = 4;
  1316. }
  1317. // Response message for
  1318. // [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries].
  1319. message ListEntriesResponse {
  1320. // Entry details.
  1321. repeated Entry entries = 1;
  1322. // Pagination token of the next results page. Empty if there are no more items
  1323. // in results.
  1324. string next_page_token = 2;
  1325. }
  1326. // The enum field that lists all the types of entry resources in Data
  1327. // Catalog. For example, a BigQuery table entry has the `TABLE` type.
  1328. enum EntryType {
  1329. // Default unknown type.
  1330. ENTRY_TYPE_UNSPECIFIED = 0;
  1331. // Output only. The entry type that has a GoogleSQL schema, including
  1332. // logical views.
  1333. TABLE = 2;
  1334. // Output only. The type of models.
  1335. //
  1336. // For more information, see [Supported models in BigQuery ML]
  1337. // (https://cloud.google.com/bigquery-ml/docs/introduction#supported_models_in).
  1338. MODEL = 5;
  1339. // An entry type for streaming entries. For example, a Pub/Sub topic.
  1340. DATA_STREAM = 3;
  1341. // An entry type for a set of files or objects. For example, a
  1342. // Cloud Storage fileset.
  1343. FILESET = 4;
  1344. // A group of servers that work together. For example, a Kafka cluster.
  1345. CLUSTER = 6;
  1346. // A database.
  1347. DATABASE = 7;
  1348. // Output only. Connection to a data source. For example, a BigQuery
  1349. // connection.
  1350. DATA_SOURCE_CONNECTION = 8;
  1351. // Output only. Routine, for example, a BigQuery routine.
  1352. ROUTINE = 9;
  1353. // A service, for example, a Dataproc Metastore service.
  1354. SERVICE = 14;
  1355. }