metastore.proto 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875
  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.metastore.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/longrunning/operations.proto";
  21. import "google/protobuf/field_mask.proto";
  22. import "google/protobuf/timestamp.proto";
  23. import "google/protobuf/wrappers.proto";
  24. import "google/type/dayofweek.proto";
  25. option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1;metastore";
  26. option java_multiple_files = true;
  27. option java_outer_classname = "MetastoreProto";
  28. option java_package = "com.google.cloud.metastore.v1";
  29. option (google.api.resource_definition) = {
  30. type: "compute.googleapis.com/Network"
  31. pattern: "projects/{project}/global/networks/{network}"
  32. };
  33. // Configures and manages metastore services.
  34. // Metastore services are fully managed, highly available, auto-scaled,
  35. // auto-healing, OSS-native deployments of technical metadata management
  36. // software. Each metastore service exposes a network endpoint through which
  37. // metadata queries are served. Metadata queries can originate from a variety
  38. // of sources, including Apache Hive, Apache Presto, and Apache Spark.
  39. //
  40. // The Dataproc Metastore API defines the following resource model:
  41. //
  42. // * The service works with a collection of Google Cloud projects, named:
  43. // `/projects/*`
  44. // * Each project has a collection of available locations, named: `/locations/*`
  45. // (a location must refer to a Google Cloud `region`)
  46. // * Each location has a collection of services, named: `/services/*`
  47. // * Dataproc Metastore services are resources with names of the form:
  48. //
  49. // `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
  50. service DataprocMetastore {
  51. option (google.api.default_host) = "metastore.googleapis.com";
  52. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  53. // Lists services in a project and location.
  54. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
  55. option (google.api.http) = {
  56. get: "/v1/{parent=projects/*/locations/*}/services"
  57. };
  58. option (google.api.method_signature) = "parent";
  59. }
  60. // Gets the details of a single service.
  61. rpc GetService(GetServiceRequest) returns (Service) {
  62. option (google.api.http) = {
  63. get: "/v1/{name=projects/*/locations/*/services/*}"
  64. };
  65. option (google.api.method_signature) = "name";
  66. }
  67. // Creates a metastore service in a project and location.
  68. rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) {
  69. option (google.api.http) = {
  70. post: "/v1/{parent=projects/*/locations/*}/services"
  71. body: "service"
  72. };
  73. option (google.api.method_signature) = "parent,service,service_id";
  74. option (google.longrunning.operation_info) = {
  75. response_type: "Service"
  76. metadata_type: "OperationMetadata"
  77. };
  78. }
  79. // Updates the parameters of a single service.
  80. rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) {
  81. option (google.api.http) = {
  82. patch: "/v1/{service.name=projects/*/locations/*/services/*}"
  83. body: "service"
  84. };
  85. option (google.api.method_signature) = "service,update_mask";
  86. option (google.longrunning.operation_info) = {
  87. response_type: "Service"
  88. metadata_type: "OperationMetadata"
  89. };
  90. }
  91. // Deletes a single service.
  92. rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) {
  93. option (google.api.http) = {
  94. delete: "/v1/{name=projects/*/locations/*/services/*}"
  95. };
  96. option (google.api.method_signature) = "name";
  97. option (google.longrunning.operation_info) = {
  98. response_type: "google.protobuf.Empty"
  99. metadata_type: "OperationMetadata"
  100. };
  101. }
  102. // Lists imports in a service.
  103. rpc ListMetadataImports(ListMetadataImportsRequest) returns (ListMetadataImportsResponse) {
  104. option (google.api.http) = {
  105. get: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports"
  106. };
  107. option (google.api.method_signature) = "parent";
  108. }
  109. // Gets details of a single import.
  110. rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) {
  111. option (google.api.http) = {
  112. get: "/v1/{name=projects/*/locations/*/services/*/metadataImports/*}"
  113. };
  114. option (google.api.method_signature) = "name";
  115. }
  116. // Creates a new MetadataImport in a given project and location.
  117. rpc CreateMetadataImport(CreateMetadataImportRequest) returns (google.longrunning.Operation) {
  118. option (google.api.http) = {
  119. post: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports"
  120. body: "metadata_import"
  121. };
  122. option (google.api.method_signature) = "parent,metadata_import,metadata_import_id";
  123. option (google.longrunning.operation_info) = {
  124. response_type: "MetadataImport"
  125. metadata_type: "OperationMetadata"
  126. };
  127. }
  128. // Updates a single import.
  129. // Only the description field of MetadataImport is supported to be updated.
  130. rpc UpdateMetadataImport(UpdateMetadataImportRequest) returns (google.longrunning.Operation) {
  131. option (google.api.http) = {
  132. patch: "/v1/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}"
  133. body: "metadata_import"
  134. };
  135. option (google.api.method_signature) = "metadata_import,update_mask";
  136. option (google.longrunning.operation_info) = {
  137. response_type: "MetadataImport"
  138. metadata_type: "OperationMetadata"
  139. };
  140. }
  141. // Exports metadata from a service.
  142. rpc ExportMetadata(ExportMetadataRequest) returns (google.longrunning.Operation) {
  143. option (google.api.http) = {
  144. post: "/v1/{service=projects/*/locations/*/services/*}:exportMetadata"
  145. body: "*"
  146. };
  147. option (google.longrunning.operation_info) = {
  148. response_type: "MetadataExport"
  149. metadata_type: "OperationMetadata"
  150. };
  151. }
  152. }
  153. // A managed metastore service that serves metadata queries.
  154. message Service {
  155. option (google.api.resource) = {
  156. type: "metastore.googleapis.com/Service"
  157. pattern: "projects/{project}/locations/{location}/services/{service}"
  158. };
  159. // The current state of the metastore service.
  160. enum State {
  161. // The state of the metastore service is unknown.
  162. STATE_UNSPECIFIED = 0;
  163. // The metastore service is in the process of being created.
  164. CREATING = 1;
  165. // The metastore service is running and ready to serve queries.
  166. ACTIVE = 2;
  167. // The metastore service is entering suspension. Its query-serving
  168. // availability may cease unexpectedly.
  169. SUSPENDING = 3;
  170. // The metastore service is suspended and unable to serve queries.
  171. SUSPENDED = 4;
  172. // The metastore service is being updated. It remains usable but cannot
  173. // accept additional update requests or be deleted at this time.
  174. UPDATING = 5;
  175. // The metastore service is undergoing deletion. It cannot be used.
  176. DELETING = 6;
  177. // The metastore service has encountered an error and cannot be used. The
  178. // metastore service should be deleted.
  179. ERROR = 7;
  180. }
  181. // Available service tiers.
  182. enum Tier {
  183. // The tier is not set.
  184. TIER_UNSPECIFIED = 0;
  185. // The developer tier provides limited scalability and no fault tolerance.
  186. // Good for low-cost proof-of-concept.
  187. DEVELOPER = 1;
  188. // The enterprise tier provides multi-zone high availability, and sufficient
  189. // scalability for enterprise-level Dataproc Metastore workloads.
  190. ENTERPRISE = 3;
  191. }
  192. // Release channels bundle features of varying levels of stability. Newer
  193. // features may be introduced initially into less stable release channels and
  194. // can be automatically promoted into more stable release channels.
  195. enum ReleaseChannel {
  196. // Release channel is not specified.
  197. RELEASE_CHANNEL_UNSPECIFIED = 0;
  198. // The `CANARY` release channel contains the newest features, which may be
  199. // unstable and subject to unresolved issues with no known workarounds.
  200. // Services using the `CANARY` release channel are not subject to any SLAs.
  201. CANARY = 1;
  202. // The `STABLE` release channel contains features that are considered stable
  203. // and have been validated for production use.
  204. STABLE = 2;
  205. }
  206. // Configuration properties specific to the underlying metastore service
  207. // technology (the software that serves metastore queries).
  208. oneof metastore_config {
  209. // Configuration information specific to running Hive metastore
  210. // software as the metastore service.
  211. HiveMetastoreConfig hive_metastore_config = 5;
  212. }
  213. // Immutable. The relative resource name of the metastore service, of the form:
  214. //
  215. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  216. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  217. // Output only. The time when the metastore service was created.
  218. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  219. // Output only. The time when the metastore service was last updated.
  220. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  221. // User-defined labels for the metastore service.
  222. map<string, string> labels = 4;
  223. // Immutable. The relative resource name of the VPC network on which the instance can be
  224. // accessed. It is specified in the following form:
  225. //
  226. // `projects/{project_number}/global/networks/{network_id}`.
  227. string network = 7 [
  228. (google.api.field_behavior) = IMMUTABLE,
  229. (google.api.resource_reference) = {
  230. type: "compute.googleapis.com/Network"
  231. }
  232. ];
  233. // Output only. The URI of the endpoint used to access the metastore service.
  234. string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  235. // The TCP port at which the metastore service is reached. Default: 9083.
  236. int32 port = 9;
  237. // Output only. The current state of the metastore service.
  238. State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  239. // Output only. Additional information about the current state of the metastore service, if
  240. // available.
  241. string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  242. // Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
  243. // related to the metastore service are stored.
  244. string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  245. // The tier of the service.
  246. Tier tier = 13;
  247. // The one hour maintenance window of the metastore service. This specifies
  248. // when the service can be restarted for maintenance purposes in UTC time.
  249. MaintenanceWindow maintenance_window = 15;
  250. // Output only. The globally unique resource identifier of the metastore service.
  251. string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  252. // Output only. The metadata management activities of the metastore service.
  253. MetadataManagementActivity metadata_management_activity = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  254. // Immutable. The release channel of the service.
  255. // If unspecified, defaults to `STABLE`.
  256. ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE];
  257. }
  258. // Maintenance window. This specifies when Dataproc Metastore
  259. // may perform system maintenance operation to the service.
  260. message MaintenanceWindow {
  261. // The hour of day (0-23) when the window starts.
  262. google.protobuf.Int32Value hour_of_day = 1;
  263. // The day of week, when the window starts.
  264. google.type.DayOfWeek day_of_week = 2;
  265. }
  266. // Specifies configuration information specific to running Hive metastore
  267. // software as the metastore service.
  268. message HiveMetastoreConfig {
  269. // Immutable. The Hive metastore schema version.
  270. string version = 1 [(google.api.field_behavior) = IMMUTABLE];
  271. // A mapping of Hive metastore configuration key-value pairs to apply to the
  272. // Hive metastore (configured in `hive-site.xml`). The mappings
  273. // override system defaults (some keys cannot be overridden).
  274. map<string, string> config_overrides = 2;
  275. // Information used to configure the Hive metastore service as a service
  276. // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
  277. // method and specify this field's path
  278. // (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
  279. // while omitting this field from the request's `service`.
  280. KerberosConfig kerberos_config = 3;
  281. }
  282. // Configuration information for a Kerberos principal.
  283. message KerberosConfig {
  284. // A Kerberos keytab file that can be used to authenticate a service principal
  285. // with a Kerberos Key Distribution Center (KDC).
  286. Secret keytab = 1;
  287. // A Kerberos principal that exists in the both the keytab the KDC
  288. // to authenticate as. A typical principal is of the form
  289. // `primary/instance@REALM`, but there is no exact format.
  290. string principal = 2;
  291. // A Cloud Storage URI that specifies the path to a
  292. // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
  293. // although the file does not need to be named krb5.conf explicitly.
  294. string krb5_config_gcs_uri = 3;
  295. }
  296. // A securely stored value.
  297. message Secret {
  298. oneof value {
  299. // The relative resource name of a Secret Manager secret version, in the
  300. // following form:
  301. //
  302. // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
  303. string cloud_secret = 2;
  304. }
  305. }
  306. // The metadata management activities of the metastore service.
  307. message MetadataManagementActivity {
  308. // Output only. The latest metadata exports of the metastore service.
  309. repeated MetadataExport metadata_exports = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  310. }
  311. // A metastore resource that imports metadata.
  312. message MetadataImport {
  313. option (google.api.resource) = {
  314. type: "metastore.googleapis.com/MetadataImport"
  315. pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}"
  316. };
  317. // A specification of the location of and metadata about a database dump from
  318. // a relational database management system.
  319. message DatabaseDump {
  320. // The type of the database.
  321. enum DatabaseType {
  322. // The type of the source database is unknown.
  323. DATABASE_TYPE_UNSPECIFIED = 0;
  324. // The type of the source database is MySQL.
  325. MYSQL = 1;
  326. }
  327. // The type of the database.
  328. DatabaseType database_type = 1 [deprecated = true];
  329. // A Cloud Storage object or folder URI that specifies the source from which
  330. // to import metadata. It must begin with `gs://`.
  331. string gcs_uri = 2;
  332. // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
  333. DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL];
  334. }
  335. // The current state of the metadata import.
  336. enum State {
  337. // The state of the metadata import is unknown.
  338. STATE_UNSPECIFIED = 0;
  339. // The metadata import is running.
  340. RUNNING = 1;
  341. // The metadata import completed successfully.
  342. SUCCEEDED = 2;
  343. // The metadata import is being updated.
  344. UPDATING = 3;
  345. // The metadata import failed, and attempted metadata changes were rolled
  346. // back.
  347. FAILED = 4;
  348. }
  349. // The metadata to be imported.
  350. oneof metadata {
  351. // Immutable. A database dump from a pre-existing metastore's database.
  352. DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE];
  353. }
  354. // Immutable. The relative resource name of the metadata import, of the form:
  355. //
  356. // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
  357. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  358. // The description of the metadata import.
  359. string description = 2;
  360. // Output only. The time when the metadata import was created.
  361. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  362. // Output only. The time when the metadata import was last updated.
  363. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  364. // Output only. The current state of the metadata import.
  365. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  366. }
  367. // The details of a metadata export operation.
  368. message MetadataExport {
  369. // The current state of the metadata export.
  370. enum State {
  371. // The state of the metadata export is unknown.
  372. STATE_UNSPECIFIED = 0;
  373. // The metadata export is running.
  374. RUNNING = 1;
  375. // The metadata export completed successfully.
  376. SUCCEEDED = 2;
  377. // The metadata export failed.
  378. FAILED = 3;
  379. // The metadata export is cancelled.
  380. CANCELLED = 4;
  381. }
  382. oneof destination {
  383. // Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
  384. // form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
  385. // `<export_folder>` is automatically generated.
  386. string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  387. }
  388. // Output only. The time when the export started.
  389. google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  390. // Output only. The time when the export ended.
  391. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  392. // Output only. The current state of the export.
  393. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  394. // Output only. The type of the database dump.
  395. DatabaseDumpSpec.Type database_dump_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  396. }
  397. // Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
  398. message ListServicesRequest {
  399. // Required. The relative resource name of the location of metastore services to
  400. // list, in the following form:
  401. //
  402. // `projects/{project_number}/locations/{location_id}`.
  403. string parent = 1 [
  404. (google.api.field_behavior) = REQUIRED,
  405. (google.api.resource_reference) = {
  406. type: "locations.googleapis.com/Location"
  407. }
  408. ];
  409. // Optional. The maximum number of services to return. The response may contain less
  410. // than the maximum number. If unspecified, no more than 500 services are
  411. // returned. The maximum value is 1000; values above 1000 are changed to 1000.
  412. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  413. // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
  414. // call. Provide this token to retrieve the subsequent page.
  415. //
  416. // To retrieve the first page, supply an empty page token.
  417. //
  418. // When paginating, other parameters provided to
  419. // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
  420. // page token.
  421. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  422. // Optional. The filter to apply to list results.
  423. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  424. // Optional. Specify the ordering of results as described in [Sorting
  425. // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
  426. // If not specified, the results will be sorted in the default order.
  427. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  428. }
  429. // Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
  430. message ListServicesResponse {
  431. // The services in the specified location.
  432. repeated Service services = 1;
  433. // A token that can be sent as `page_token` to retrieve the next page. If this
  434. // field is omitted, there are no subsequent pages.
  435. string next_page_token = 2;
  436. // Locations that could not be reached.
  437. repeated string unreachable = 3;
  438. }
  439. // Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService].
  440. message GetServiceRequest {
  441. // Required. The relative resource name of the metastore service to retrieve, in the
  442. // following form:
  443. //
  444. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  445. string name = 1 [
  446. (google.api.field_behavior) = REQUIRED,
  447. (google.api.resource_reference) = {
  448. type: "metastore.googleapis.com/Service"
  449. }
  450. ];
  451. }
  452. // Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService].
  453. message CreateServiceRequest {
  454. // Required. The relative resource name of the location in which to create a metastore
  455. // service, in the following form:
  456. //
  457. // `projects/{project_number}/locations/{location_id}`.
  458. string parent = 1 [
  459. (google.api.field_behavior) = REQUIRED,
  460. (google.api.resource_reference) = {
  461. type: "locations.googleapis.com/Location"
  462. }
  463. ];
  464. // Required. The ID of the metastore service, which is used as the final
  465. // component of the metastore service's name.
  466. //
  467. // This value must be between 2 and 63 characters long inclusive, begin with a
  468. // letter, end with a letter or number, and consist of alpha-numeric
  469. // ASCII characters or hyphens.
  470. string service_id = 2 [(google.api.field_behavior) = REQUIRED];
  471. // Required. The Metastore service to create. The `name` field is
  472. // ignored. The ID of the created metastore service must be provided in
  473. // the request's `service_id` field.
  474. Service service = 3 [(google.api.field_behavior) = REQUIRED];
  475. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  476. // request if it has completed. The server will ignore subsequent requests
  477. // that provide a duplicate request ID for at least 60 minutes after the first
  478. // request.
  479. //
  480. // For example, if an initial request times out, followed by another request
  481. // with the same request ID, the server ignores the second request to prevent
  482. // the creation of duplicate commitments.
  483. //
  484. // The request ID must be a valid
  485. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  486. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  487. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  488. }
  489. // Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService].
  490. message UpdateServiceRequest {
  491. // Required. A field mask used to specify the fields to be overwritten in the
  492. // metastore service resource by the update.
  493. // Fields specified in the `update_mask` are relative to the resource (not
  494. // to the full request). A field is overwritten if it is in the mask.
  495. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  496. // Required. The metastore service to update. The server only merges fields
  497. // in the service if they are specified in `update_mask`.
  498. //
  499. // The metastore service's `name` field is used to identify the metastore
  500. // service to be updated.
  501. Service service = 2 [(google.api.field_behavior) = REQUIRED];
  502. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  503. // request if it has completed. The server will ignore subsequent requests
  504. // that provide a duplicate request ID for at least 60 minutes after the first
  505. // request.
  506. //
  507. // For example, if an initial request times out, followed by another request
  508. // with the same request ID, the server ignores the second request to prevent
  509. // the creation of duplicate commitments.
  510. //
  511. // The request ID must be a valid
  512. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  513. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  514. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  515. }
  516. // Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService].
  517. message DeleteServiceRequest {
  518. // Required. The relative resource name of the metastore service to delete, in the
  519. // following form:
  520. //
  521. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  522. string name = 1 [
  523. (google.api.field_behavior) = REQUIRED,
  524. (google.api.resource_reference) = {
  525. type: "metastore.googleapis.com/Service"
  526. }
  527. ];
  528. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  529. // request if it has completed. The server will ignore subsequent requests
  530. // that provide a duplicate request ID for at least 60 minutes after the first
  531. // request.
  532. //
  533. // For example, if an initial request times out, followed by another request
  534. // with the same request ID, the server ignores the second request to prevent
  535. // the creation of duplicate commitments.
  536. //
  537. // The request ID must be a valid
  538. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  539. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  540. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  541. }
  542. // Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
  543. message ListMetadataImportsRequest {
  544. // Required. The relative resource name of the service whose metadata imports to
  545. // list, in the following form:
  546. //
  547. // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
  548. string parent = 1 [
  549. (google.api.field_behavior) = REQUIRED,
  550. (google.api.resource_reference) = {
  551. type: "metastore.googleapis.com/Service"
  552. }
  553. ];
  554. // Optional. The maximum number of imports to return. The response may contain less
  555. // than the maximum number. If unspecified, no more than 500 imports are
  556. // returned. The maximum value is 1000; values above 1000 are changed to 1000.
  557. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  558. // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
  559. // call. Provide this token to retrieve the subsequent page.
  560. //
  561. // To retrieve the first page, supply an empty page token.
  562. //
  563. // When paginating, other parameters provided to
  564. // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
  565. // page token.
  566. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  567. // Optional. The filter to apply to list results.
  568. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  569. // Optional. Specify the ordering of results as described in [Sorting
  570. // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
  571. // If not specified, the results will be sorted in the default order.
  572. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  573. }
  574. // Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
  575. message ListMetadataImportsResponse {
  576. // The imports in the specified service.
  577. repeated MetadataImport metadata_imports = 1;
  578. // A token that can be sent as `page_token` to retrieve the next page. If this
  579. // field is omitted, there are no subsequent pages.
  580. string next_page_token = 2;
  581. // Locations that could not be reached.
  582. repeated string unreachable = 3;
  583. }
  584. // Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport].
  585. message GetMetadataImportRequest {
  586. // Required. The relative resource name of the metadata import to retrieve, in the
  587. // following form:
  588. //
  589. // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
  590. string name = 1 [
  591. (google.api.field_behavior) = REQUIRED,
  592. (google.api.resource_reference) = {
  593. type: "metastore.googleapis.com/MetadataImport"
  594. }
  595. ];
  596. }
  597. // Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport].
  598. message CreateMetadataImportRequest {
  599. // Required. The relative resource name of the service in which to create a metastore
  600. // import, in the following form:
  601. //
  602. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  603. string parent = 1 [
  604. (google.api.field_behavior) = REQUIRED,
  605. (google.api.resource_reference) = {
  606. type: "metastore.googleapis.com/Service"
  607. }
  608. ];
  609. // Required. The ID of the metadata import, which is used as the final component of the
  610. // metadata import's name.
  611. //
  612. // This value must be between 1 and 64 characters long, begin with a letter,
  613. // end with a letter or number, and consist of alpha-numeric ASCII characters
  614. // or hyphens.
  615. string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED];
  616. // Required. The metadata import to create. The `name` field is ignored. The ID of the
  617. // created metadata import must be provided in the request's
  618. // `metadata_import_id` field.
  619. MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED];
  620. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  621. // request if it has completed. The server will ignore subsequent requests
  622. // that provide a duplicate request ID for at least 60 minutes after the first
  623. // request.
  624. //
  625. // For example, if an initial request times out, followed by another request
  626. // with the same request ID, the server ignores the second request to prevent
  627. // the creation of duplicate commitments.
  628. //
  629. // The request ID must be a valid
  630. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  631. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  632. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  633. }
  634. // Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport].
  635. message UpdateMetadataImportRequest {
  636. // Required. A field mask used to specify the fields to be overwritten in the
  637. // metadata import resource by the update.
  638. // Fields specified in the `update_mask` are relative to the resource (not
  639. // to the full request). A field is overwritten if it is in the mask.
  640. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  641. // Required. The metadata import to update. The server only merges fields
  642. // in the import if they are specified in `update_mask`.
  643. //
  644. // The metadata import's `name` field is used to identify the metastore
  645. // import to be updated.
  646. MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED];
  647. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  648. // request if it has completed. The server will ignore subsequent requests
  649. // that provide a duplicate request ID for at least 60 minutes after the first
  650. // request.
  651. //
  652. // For example, if an initial request times out, followed by another request
  653. // with the same request ID, the server ignores the second request to prevent
  654. // the creation of duplicate commitments.
  655. //
  656. // The request ID must be a valid
  657. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  658. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  659. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  660. }
  661. // Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
  662. message ExportMetadataRequest {
  663. // Required. Destination that metadata is exported to.
  664. oneof destination {
  665. // A Cloud Storage URI of a folder, in the format
  666. // `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
  667. // `<export_folder>` containing exported files will be created below it.
  668. string destination_gcs_folder = 2;
  669. }
  670. // Required. The relative resource name of the metastore service to run export, in the
  671. // following form:
  672. //
  673. // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
  674. string service = 1 [
  675. (google.api.field_behavior) = REQUIRED,
  676. (google.api.resource_reference) = {
  677. type: "metastore.googleapis.com/Service"
  678. }
  679. ];
  680. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  681. // request if it has completed. The server will ignore subsequent requests
  682. // that provide a duplicate request ID for at least 60 minutes after the first
  683. // request.
  684. //
  685. // For example, if an initial request times out, followed by another request
  686. // with the same request ID, the server ignores the second request to prevent
  687. // the creation of duplicate commitments.
  688. //
  689. // The request ID must be a valid
  690. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
  691. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  692. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  693. // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
  694. DatabaseDumpSpec.Type database_dump_type = 4 [(google.api.field_behavior) = OPTIONAL];
  695. }
  696. // Represents the metadata of a long-running operation.
  697. message OperationMetadata {
  698. // Output only. The time the operation was created.
  699. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  700. // Output only. The time the operation finished running.
  701. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  702. // Output only. Server-defined resource path for the target of the operation.
  703. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  704. // Output only. Name of the verb executed by the operation.
  705. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  706. // Output only. Human-readable status of the operation, if any.
  707. string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  708. // Output only. Identifies whether the caller has requested cancellation
  709. // of the operation. Operations that have successfully been cancelled
  710. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  711. // corresponding to `Code.CANCELLED`.
  712. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  713. // Output only. API version used to start the operation.
  714. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  715. }
  716. // Metadata about the service in a location.
  717. message LocationMetadata {
  718. // A specification of a supported version of the Hive Metastore software.
  719. message HiveMetastoreVersion {
  720. // The semantic version of the Hive Metastore software.
  721. string version = 1;
  722. // Whether `version` will be chosen by the server if a metastore service is
  723. // created with a `HiveMetastoreConfig` that omits the `version`.
  724. bool is_default = 2;
  725. }
  726. // The versions of Hive Metastore that can be used when creating a new
  727. // metastore service in this location. The server guarantees that exactly one
  728. // `HiveMetastoreVersion` in the list will set `is_default`.
  729. repeated HiveMetastoreVersion supported_hive_metastore_versions = 1;
  730. }
  731. // The specification of database dump to import from or export to.
  732. message DatabaseDumpSpec {
  733. // The type of the database dump.
  734. enum Type {
  735. // The type of the database dump is unknown.
  736. TYPE_UNSPECIFIED = 0;
  737. // Database dump is a MySQL dump file.
  738. MYSQL = 1;
  739. }
  740. }