metastore.proto 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316
  1. // Copyright 2022 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 php_namespace = "Google\\Cloud\\Metastore\\V1";
  30. option (google.api.resource_definition) = {
  31. type: "compute.googleapis.com/Network"
  32. pattern: "projects/{project}/global/networks/{network}"
  33. };
  34. option (google.api.resource_definition) = {
  35. type: "compute.googleapis.com/Subnetwork"
  36. pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}"
  37. };
  38. // Configures and manages metastore services.
  39. // Metastore services are fully managed, highly available, autoscaled,
  40. // autohealing, OSS-native deployments of technical metadata management
  41. // software. Each metastore service exposes a network endpoint through which
  42. // metadata queries are served. Metadata queries can originate from a variety
  43. // of sources, including Apache Hive, Apache Presto, and Apache Spark.
  44. //
  45. // The Dataproc Metastore API defines the following resource model:
  46. //
  47. // * The service works with a collection of Google Cloud projects, named:
  48. // `/projects/*`
  49. // * Each project has a collection of available locations, named: `/locations/*`
  50. // (a location must refer to a Google Cloud `region`)
  51. // * Each location has a collection of services, named: `/services/*`
  52. // * Dataproc Metastore services are resources with names of the form:
  53. //
  54. // `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
  55. service DataprocMetastore {
  56. option (google.api.default_host) = "metastore.googleapis.com";
  57. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  58. // Lists services in a project and location.
  59. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
  60. option (google.api.http) = {
  61. get: "/v1/{parent=projects/*/locations/*}/services"
  62. };
  63. option (google.api.method_signature) = "parent";
  64. }
  65. // Gets the details of a single service.
  66. rpc GetService(GetServiceRequest) returns (Service) {
  67. option (google.api.http) = {
  68. get: "/v1/{name=projects/*/locations/*/services/*}"
  69. };
  70. option (google.api.method_signature) = "name";
  71. }
  72. // Creates a metastore service in a project and location.
  73. rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) {
  74. option (google.api.http) = {
  75. post: "/v1/{parent=projects/*/locations/*}/services"
  76. body: "service"
  77. };
  78. option (google.api.method_signature) = "parent,service,service_id";
  79. option (google.longrunning.operation_info) = {
  80. response_type: "Service"
  81. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  82. };
  83. }
  84. // Updates the parameters of a single service.
  85. rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) {
  86. option (google.api.http) = {
  87. patch: "/v1/{service.name=projects/*/locations/*/services/*}"
  88. body: "service"
  89. };
  90. option (google.api.method_signature) = "service,update_mask";
  91. option (google.longrunning.operation_info) = {
  92. response_type: "Service"
  93. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  94. };
  95. }
  96. // Deletes a single service.
  97. rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) {
  98. option (google.api.http) = {
  99. delete: "/v1/{name=projects/*/locations/*/services/*}"
  100. };
  101. option (google.api.method_signature) = "name";
  102. option (google.longrunning.operation_info) = {
  103. response_type: "google.protobuf.Empty"
  104. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  105. };
  106. }
  107. // Lists imports in a service.
  108. rpc ListMetadataImports(ListMetadataImportsRequest) returns (ListMetadataImportsResponse) {
  109. option (google.api.http) = {
  110. get: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports"
  111. };
  112. option (google.api.method_signature) = "parent";
  113. }
  114. // Gets details of a single import.
  115. rpc GetMetadataImport(GetMetadataImportRequest) returns (MetadataImport) {
  116. option (google.api.http) = {
  117. get: "/v1/{name=projects/*/locations/*/services/*/metadataImports/*}"
  118. };
  119. option (google.api.method_signature) = "name";
  120. }
  121. // Creates a new MetadataImport in a given project and location.
  122. rpc CreateMetadataImport(CreateMetadataImportRequest) returns (google.longrunning.Operation) {
  123. option (google.api.http) = {
  124. post: "/v1/{parent=projects/*/locations/*/services/*}/metadataImports"
  125. body: "metadata_import"
  126. };
  127. option (google.api.method_signature) = "parent,metadata_import,metadata_import_id";
  128. option (google.longrunning.operation_info) = {
  129. response_type: "MetadataImport"
  130. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  131. };
  132. }
  133. // Updates a single import.
  134. // Only the description field of MetadataImport is supported to be updated.
  135. rpc UpdateMetadataImport(UpdateMetadataImportRequest) returns (google.longrunning.Operation) {
  136. option (google.api.http) = {
  137. patch: "/v1/{metadata_import.name=projects/*/locations/*/services/*/metadataImports/*}"
  138. body: "metadata_import"
  139. };
  140. option (google.api.method_signature) = "metadata_import,update_mask";
  141. option (google.longrunning.operation_info) = {
  142. response_type: "MetadataImport"
  143. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  144. };
  145. }
  146. // Exports metadata from a service.
  147. rpc ExportMetadata(ExportMetadataRequest) returns (google.longrunning.Operation) {
  148. option (google.api.http) = {
  149. post: "/v1/{service=projects/*/locations/*/services/*}:exportMetadata"
  150. body: "*"
  151. };
  152. option (google.longrunning.operation_info) = {
  153. response_type: "MetadataExport"
  154. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  155. };
  156. }
  157. // Restores a service from a backup.
  158. rpc RestoreService(RestoreServiceRequest) returns (google.longrunning.Operation) {
  159. option (google.api.http) = {
  160. post: "/v1/{service=projects/*/locations/*/services/*}:restore"
  161. body: "*"
  162. };
  163. option (google.api.method_signature) = "service,backup";
  164. option (google.longrunning.operation_info) = {
  165. response_type: "Restore"
  166. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  167. };
  168. }
  169. // Lists backups in a service.
  170. rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
  171. option (google.api.http) = {
  172. get: "/v1/{parent=projects/*/locations/*/services/*}/backups"
  173. };
  174. option (google.api.method_signature) = "parent";
  175. }
  176. // Gets details of a single backup.
  177. rpc GetBackup(GetBackupRequest) returns (Backup) {
  178. option (google.api.http) = {
  179. get: "/v1/{name=projects/*/locations/*/services/*/backups/*}"
  180. };
  181. option (google.api.method_signature) = "name";
  182. }
  183. // Creates a new backup in a given project and location.
  184. rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
  185. option (google.api.http) = {
  186. post: "/v1/{parent=projects/*/locations/*/services/*}/backups"
  187. body: "backup"
  188. };
  189. option (google.api.method_signature) = "parent,backup,backup_id";
  190. option (google.longrunning.operation_info) = {
  191. response_type: "Backup"
  192. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  193. };
  194. }
  195. // Deletes a single backup.
  196. rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) {
  197. option (google.api.http) = {
  198. delete: "/v1/{name=projects/*/locations/*/services/*/backups/*}"
  199. };
  200. option (google.api.method_signature) = "name";
  201. option (google.longrunning.operation_info) = {
  202. response_type: "google.protobuf.Empty"
  203. metadata_type: "google.cloud.metastore.v1.OperationMetadata"
  204. };
  205. }
  206. }
  207. // A managed metastore service that serves metadata queries.
  208. message Service {
  209. option (google.api.resource) = {
  210. type: "metastore.googleapis.com/Service"
  211. pattern: "projects/{project}/locations/{location}/services/{service}"
  212. };
  213. // The current state of the metastore service.
  214. enum State {
  215. // The state of the metastore service is unknown.
  216. STATE_UNSPECIFIED = 0;
  217. // The metastore service is in the process of being created.
  218. CREATING = 1;
  219. // The metastore service is running and ready to serve queries.
  220. ACTIVE = 2;
  221. // The metastore service is entering suspension. Its query-serving
  222. // availability may cease unexpectedly.
  223. SUSPENDING = 3;
  224. // The metastore service is suspended and unable to serve queries.
  225. SUSPENDED = 4;
  226. // The metastore service is being updated. It remains usable but cannot
  227. // accept additional update requests or be deleted at this time.
  228. UPDATING = 5;
  229. // The metastore service is undergoing deletion. It cannot be used.
  230. DELETING = 6;
  231. // The metastore service has encountered an error and cannot be used. The
  232. // metastore service should be deleted.
  233. ERROR = 7;
  234. }
  235. // Available service tiers.
  236. enum Tier {
  237. // The tier is not set.
  238. TIER_UNSPECIFIED = 0;
  239. // The developer tier provides limited scalability and no fault tolerance.
  240. // Good for low-cost proof-of-concept.
  241. DEVELOPER = 1;
  242. // The enterprise tier provides multi-zone high availability, and sufficient
  243. // scalability for enterprise-level Dataproc Metastore workloads.
  244. ENTERPRISE = 3;
  245. }
  246. // Release channels bundle features of varying levels of stability. Newer
  247. // features may be introduced initially into less stable release channels and
  248. // can be automatically promoted into more stable release channels.
  249. enum ReleaseChannel {
  250. // Release channel is not specified.
  251. RELEASE_CHANNEL_UNSPECIFIED = 0;
  252. // The `CANARY` release channel contains the newest features, which may be
  253. // unstable and subject to unresolved issues with no known workarounds.
  254. // Services using the `CANARY` release channel are not subject to any SLAs.
  255. CANARY = 1;
  256. // The `STABLE` release channel contains features that are considered stable
  257. // and have been validated for production use.
  258. STABLE = 2;
  259. }
  260. // The backend database type for the metastore service.
  261. enum DatabaseType {
  262. // The DATABASE_TYPE is not set.
  263. DATABASE_TYPE_UNSPECIFIED = 0;
  264. // MySQL is used to persist the metastore data.
  265. MYSQL = 1;
  266. // Spanner is used to persist the metastore data.
  267. SPANNER = 2;
  268. }
  269. // Configuration properties specific to the underlying metastore service
  270. // technology (the software that serves metastore queries).
  271. oneof metastore_config {
  272. // Configuration information specific to running Hive metastore
  273. // software as the metastore service.
  274. HiveMetastoreConfig hive_metastore_config = 5;
  275. }
  276. // Immutable. The relative resource name of the metastore service, in the following
  277. // format:
  278. //
  279. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  280. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  281. // Output only. The time when the metastore service was created.
  282. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  283. // Output only. The time when the metastore service was last updated.
  284. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  285. // User-defined labels for the metastore service.
  286. map<string, string> labels = 4;
  287. // Immutable. The relative resource name of the VPC network on which the instance can be
  288. // accessed. It is specified in the following form:
  289. //
  290. // `projects/{project_number}/global/networks/{network_id}`.
  291. string network = 7 [
  292. (google.api.field_behavior) = IMMUTABLE,
  293. (google.api.resource_reference) = {
  294. type: "compute.googleapis.com/Network"
  295. }
  296. ];
  297. // Output only. The URI of the endpoint used to access the metastore service.
  298. string endpoint_uri = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  299. // The TCP port at which the metastore service is reached. Default: 9083.
  300. int32 port = 9;
  301. // Output only. The current state of the metastore service.
  302. State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  303. // Output only. Additional information about the current state of the metastore service, if
  304. // available.
  305. string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  306. // Output only. A Cloud Storage URI (starting with `gs://`) that specifies where artifacts
  307. // related to the metastore service are stored.
  308. string artifact_gcs_uri = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  309. // The tier of the service.
  310. Tier tier = 13;
  311. // The one hour maintenance window of the metastore service. This specifies
  312. // when the service can be restarted for maintenance purposes in UTC time.
  313. // Maintenance window is not needed for services with the SPANNER
  314. // database type.
  315. MaintenanceWindow maintenance_window = 15;
  316. // Output only. The globally unique resource identifier of the metastore service.
  317. string uid = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
  318. // Output only. The metadata management activities of the metastore service.
  319. MetadataManagementActivity metadata_management_activity = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
  320. // Immutable. The release channel of the service.
  321. // If unspecified, defaults to `STABLE`.
  322. ReleaseChannel release_channel = 19 [(google.api.field_behavior) = IMMUTABLE];
  323. // Immutable. Information used to configure the Dataproc Metastore service to encrypt
  324. // customer data at rest. Cannot be updated.
  325. EncryptionConfig encryption_config = 20 [(google.api.field_behavior) = IMMUTABLE];
  326. // The configuration specifying the network settings for the
  327. // Dataproc Metastore service.
  328. NetworkConfig network_config = 21;
  329. // Immutable. The database type that the Metastore service stores its data.
  330. DatabaseType database_type = 22 [(google.api.field_behavior) = IMMUTABLE];
  331. // The configuration specifying telemetry settings for the Dataproc Metastore
  332. // service. If unspecified defaults to `JSON`.
  333. TelemetryConfig telemetry_config = 23;
  334. }
  335. // Maintenance window. This specifies when Dataproc Metastore
  336. // may perform system maintenance operation to the service.
  337. message MaintenanceWindow {
  338. // The hour of day (0-23) when the window starts.
  339. google.protobuf.Int32Value hour_of_day = 1;
  340. // The day of week, when the window starts.
  341. google.type.DayOfWeek day_of_week = 2;
  342. }
  343. // Specifies configuration information specific to running Hive metastore
  344. // software as the metastore service.
  345. message HiveMetastoreConfig {
  346. // Immutable. The Hive metastore schema version.
  347. string version = 1 [(google.api.field_behavior) = IMMUTABLE];
  348. // A mapping of Hive metastore configuration key-value pairs to apply to the
  349. // Hive metastore (configured in `hive-site.xml`). The mappings
  350. // override system defaults (some keys cannot be overridden). These
  351. // overrides are also applied to auxiliary versions and can be further
  352. // customized in the auxiliary version's `AuxiliaryVersionConfig`.
  353. map<string, string> config_overrides = 2;
  354. // Information used to configure the Hive metastore service as a service
  355. // principal in a Kerberos realm. To disable Kerberos, use the `UpdateService`
  356. // method and specify this field's path
  357. // (`hive_metastore_config.kerberos_config`) in the request's `update_mask`
  358. // while omitting this field from the request's `service`.
  359. KerberosConfig kerberos_config = 3;
  360. }
  361. // Configuration information for a Kerberos principal.
  362. message KerberosConfig {
  363. // A Kerberos keytab file that can be used to authenticate a service principal
  364. // with a Kerberos Key Distribution Center (KDC).
  365. Secret keytab = 1;
  366. // A Kerberos principal that exists in the both the keytab the KDC
  367. // to authenticate as. A typical principal is of the form
  368. // `primary/instance@REALM`, but there is no exact format.
  369. string principal = 2;
  370. // A Cloud Storage URI that specifies the path to a
  371. // krb5.conf file. It is of the form `gs://{bucket_name}/path/to/krb5.conf`,
  372. // although the file does not need to be named krb5.conf explicitly.
  373. string krb5_config_gcs_uri = 3;
  374. }
  375. // A securely stored value.
  376. message Secret {
  377. oneof value {
  378. // The relative resource name of a Secret Manager secret version, in the
  379. // following form:
  380. //
  381. // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
  382. string cloud_secret = 2;
  383. }
  384. }
  385. // Encryption settings for the service.
  386. message EncryptionConfig {
  387. // The fully qualified customer provided Cloud KMS key name to use for
  388. // customer data encryption, in the following form:
  389. //
  390. // `projects/{project_number}/locations/{location_id}/keyRings/{key_ring_id}/cryptoKeys/{crypto_key_id}`.
  391. string kms_key = 1;
  392. }
  393. // Network configuration for the Dataproc Metastore service.
  394. message NetworkConfig {
  395. // Contains information of the customer's network configurations.
  396. message Consumer {
  397. oneof vpc_resource {
  398. // Immutable. The subnetwork of the customer project from which an IP address is
  399. // reserved and used as the Dataproc Metastore service's
  400. // endpoint. It is accessible to hosts in the subnet and to all
  401. // hosts in a subnet in the same region and same network. There must
  402. // be at least one IP address available in the subnet's primary range. The
  403. // subnet is specified in the following form:
  404. //
  405. // `projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id}
  406. string subnetwork = 1 [
  407. (google.api.field_behavior) = IMMUTABLE,
  408. (google.api.resource_reference) = {
  409. type: "compute.googleapis.com/Subnetwork"
  410. }
  411. ];
  412. }
  413. // Output only. The URI of the endpoint used to access the metastore service.
  414. string endpoint_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  415. }
  416. // Immutable. The consumer-side network configuration for the Dataproc Metastore
  417. // instance.
  418. repeated Consumer consumers = 1 [(google.api.field_behavior) = IMMUTABLE];
  419. }
  420. // Telemetry Configuration for the Dataproc Metastore service.
  421. message TelemetryConfig {
  422. enum LogFormat {
  423. // The LOG_FORMAT is not set.
  424. LOG_FORMAT_UNSPECIFIED = 0;
  425. // Logging output uses the legacy `textPayload` format.
  426. LEGACY = 1;
  427. // Logging output uses the `jsonPayload` format.
  428. JSON = 2;
  429. }
  430. // The output format of the Dataproc Metastore service's logs.
  431. LogFormat log_format = 1;
  432. }
  433. // The metadata management activities of the metastore service.
  434. message MetadataManagementActivity {
  435. // Output only. The latest metadata exports of the metastore service.
  436. repeated MetadataExport metadata_exports = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  437. // Output only. The latest restores of the metastore service.
  438. repeated Restore restores = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  439. }
  440. // A metastore resource that imports metadata.
  441. message MetadataImport {
  442. option (google.api.resource) = {
  443. type: "metastore.googleapis.com/MetadataImport"
  444. pattern: "projects/{project}/locations/{location}/services/{service}/metadataImports/{metadata_import}"
  445. };
  446. // A specification of the location of and metadata about a database dump from
  447. // a relational database management system.
  448. message DatabaseDump {
  449. // The type of the database.
  450. enum DatabaseType {
  451. // The type of the source database is unknown.
  452. DATABASE_TYPE_UNSPECIFIED = 0;
  453. // The type of the source database is MySQL.
  454. MYSQL = 1;
  455. }
  456. // The type of the database.
  457. DatabaseType database_type = 1 [deprecated = true];
  458. // A Cloud Storage object or folder URI that specifies the source from which
  459. // to import metadata. It must begin with `gs://`.
  460. string gcs_uri = 2;
  461. // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
  462. DatabaseDumpSpec.Type type = 4 [(google.api.field_behavior) = OPTIONAL];
  463. }
  464. // The current state of the metadata import.
  465. enum State {
  466. // The state of the metadata import is unknown.
  467. STATE_UNSPECIFIED = 0;
  468. // The metadata import is running.
  469. RUNNING = 1;
  470. // The metadata import completed successfully.
  471. SUCCEEDED = 2;
  472. // The metadata import is being updated.
  473. UPDATING = 3;
  474. // The metadata import failed, and attempted metadata changes were rolled
  475. // back.
  476. FAILED = 4;
  477. }
  478. // The metadata to be imported.
  479. oneof metadata {
  480. // Immutable. A database dump from a pre-existing metastore's database.
  481. DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE];
  482. }
  483. // Immutable. The relative resource name of the metadata import, of the form:
  484. //
  485. // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
  486. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  487. // The description of the metadata import.
  488. string description = 2;
  489. // Output only. The time when the metadata import was started.
  490. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  491. // Output only. The time when the metadata import was last updated.
  492. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  493. // Output only. The time when the metadata import finished.
  494. google.protobuf.Timestamp end_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  495. // Output only. The current state of the metadata import.
  496. State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  497. }
  498. // The details of a metadata export operation.
  499. message MetadataExport {
  500. // The current state of the metadata export.
  501. enum State {
  502. // The state of the metadata export is unknown.
  503. STATE_UNSPECIFIED = 0;
  504. // The metadata export is running.
  505. RUNNING = 1;
  506. // The metadata export completed successfully.
  507. SUCCEEDED = 2;
  508. // The metadata export failed.
  509. FAILED = 3;
  510. // The metadata export is cancelled.
  511. CANCELLED = 4;
  512. }
  513. oneof destination {
  514. // Output only. A Cloud Storage URI of a folder that metadata are exported to, in the
  515. // form of `gs://<bucket_name>/<path_inside_bucket>/<export_folder>`, where
  516. // `<export_folder>` is automatically generated.
  517. string destination_gcs_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  518. }
  519. // Output only. The time when the export started.
  520. google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  521. // Output only. The time when the export ended.
  522. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  523. // Output only. The current state of the export.
  524. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  525. // Output only. The type of the database dump.
  526. DatabaseDumpSpec.Type database_dump_type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  527. }
  528. // The details of a backup resource.
  529. message Backup {
  530. option (google.api.resource) = {
  531. type: "metastore.googleapis.com/Backup"
  532. pattern: "projects/{project}/locations/{location}/services/{service}/backups/{backup}"
  533. };
  534. // The current state of the backup.
  535. enum State {
  536. // The state of the backup is unknown.
  537. STATE_UNSPECIFIED = 0;
  538. // The backup is being created.
  539. CREATING = 1;
  540. // The backup is being deleted.
  541. DELETING = 2;
  542. // The backup is active and ready to use.
  543. ACTIVE = 3;
  544. // The backup failed.
  545. FAILED = 4;
  546. // The backup is being restored.
  547. RESTORING = 5;
  548. }
  549. // Immutable. The relative resource name of the backup, in the following form:
  550. //
  551. // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`
  552. string name = 1 [(google.api.field_behavior) = IMMUTABLE];
  553. // Output only. The time when the backup was started.
  554. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  555. // Output only. The time when the backup finished creating.
  556. google.protobuf.Timestamp end_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  557. // Output only. The current state of the backup.
  558. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  559. // Output only. The revision of the service at the time of backup.
  560. Service service_revision = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  561. // The description of the backup.
  562. string description = 6;
  563. // Output only. Services that are restoring from the backup.
  564. repeated string restoring_services = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  565. }
  566. // The details of a metadata restore operation.
  567. message Restore {
  568. // The current state of the restore.
  569. enum State {
  570. // The state of the metadata restore is unknown.
  571. STATE_UNSPECIFIED = 0;
  572. // The metadata restore is running.
  573. RUNNING = 1;
  574. // The metadata restore completed successfully.
  575. SUCCEEDED = 2;
  576. // The metadata restore failed.
  577. FAILED = 3;
  578. // The metadata restore is cancelled.
  579. CANCELLED = 4;
  580. }
  581. // The type of restore. If unspecified, defaults to `METADATA_ONLY`.
  582. enum RestoreType {
  583. // The restore type is unknown.
  584. RESTORE_TYPE_UNSPECIFIED = 0;
  585. // The service's metadata and configuration are restored.
  586. FULL = 1;
  587. // Only the service's metadata is restored.
  588. METADATA_ONLY = 2;
  589. }
  590. // Output only. The time when the restore started.
  591. google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  592. // Output only. The time when the restore ended.
  593. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  594. // Output only. The current state of the restore.
  595. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  596. // Output only. The relative resource name of the metastore service backup to restore
  597. // from, in the following form:
  598. //
  599. // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
  600. string backup = 4 [
  601. (google.api.field_behavior) = OUTPUT_ONLY,
  602. (google.api.resource_reference) = {
  603. type: "metastore.googleapis.com/Backup"
  604. }
  605. ];
  606. // Output only. The type of restore.
  607. RestoreType type = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  608. // Output only. The restore details containing the revision of the service to be restored
  609. // to, in format of JSON.
  610. string details = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  611. }
  612. // Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
  613. message ListServicesRequest {
  614. // Required. The relative resource name of the location of metastore services to
  615. // list, in the following form:
  616. //
  617. // `projects/{project_number}/locations/{location_id}`.
  618. string parent = 1 [
  619. (google.api.field_behavior) = REQUIRED,
  620. (google.api.resource_reference) = {
  621. child_type: "metastore.googleapis.com/Service"
  622. }
  623. ];
  624. // Optional. The maximum number of services to return. The response may contain less
  625. // than the maximum number. If unspecified, no more than 500 services are
  626. // returned. The maximum value is 1000; values above 1000 are changed to 1000.
  627. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  628. // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
  629. // call. Provide this token to retrieve the subsequent page.
  630. //
  631. // To retrieve the first page, supply an empty page token.
  632. //
  633. // When paginating, other parameters provided to
  634. // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
  635. // page token.
  636. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  637. // Optional. The filter to apply to list results.
  638. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  639. // Optional. Specify the ordering of results as described in [Sorting
  640. // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
  641. // If not specified, the results will be sorted in the default order.
  642. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  643. }
  644. // Response message for [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices].
  645. message ListServicesResponse {
  646. // The services in the specified location.
  647. repeated Service services = 1;
  648. // A token that can be sent as `page_token` to retrieve the next page. If this
  649. // field is omitted, there are no subsequent pages.
  650. string next_page_token = 2;
  651. // Locations that could not be reached.
  652. repeated string unreachable = 3;
  653. }
  654. // Request message for [DataprocMetastore.GetService][google.cloud.metastore.v1.DataprocMetastore.GetService].
  655. message GetServiceRequest {
  656. // Required. The relative resource name of the metastore service to retrieve, in the
  657. // following form:
  658. //
  659. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  660. string name = 1 [
  661. (google.api.field_behavior) = REQUIRED,
  662. (google.api.resource_reference) = {
  663. type: "metastore.googleapis.com/Service"
  664. }
  665. ];
  666. }
  667. // Request message for [DataprocMetastore.CreateService][google.cloud.metastore.v1.DataprocMetastore.CreateService].
  668. message CreateServiceRequest {
  669. // Required. The relative resource name of the location in which to create a metastore
  670. // service, in the following form:
  671. //
  672. // `projects/{project_number}/locations/{location_id}`.
  673. string parent = 1 [
  674. (google.api.field_behavior) = REQUIRED,
  675. (google.api.resource_reference) = {
  676. child_type: "metastore.googleapis.com/Service"
  677. }
  678. ];
  679. // Required. The ID of the metastore service, which is used as the final
  680. // component of the metastore service's name.
  681. //
  682. // This value must be between 2 and 63 characters long inclusive, begin with a
  683. // letter, end with a letter or number, and consist of alpha-numeric
  684. // ASCII characters or hyphens.
  685. string service_id = 2 [(google.api.field_behavior) = REQUIRED];
  686. // Required. The Metastore service to create. The `name` field is
  687. // ignored. The ID of the created metastore service must be provided in
  688. // the request's `service_id` field.
  689. Service service = 3 [(google.api.field_behavior) = REQUIRED];
  690. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  691. // request if it has completed. The server will ignore subsequent requests
  692. // that provide a duplicate request ID for at least 60 minutes after the first
  693. // request.
  694. //
  695. // For example, if an initial request times out, followed by another request
  696. // with the same request ID, the server ignores the second request to prevent
  697. // the creation of duplicate commitments.
  698. //
  699. // The request ID must be a valid
  700. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  701. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  702. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  703. }
  704. // Request message for [DataprocMetastore.UpdateService][google.cloud.metastore.v1.DataprocMetastore.UpdateService].
  705. message UpdateServiceRequest {
  706. // Required. A field mask used to specify the fields to be overwritten in the
  707. // metastore service resource by the update.
  708. // Fields specified in the `update_mask` are relative to the resource (not
  709. // to the full request). A field is overwritten if it is in the mask.
  710. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  711. // Required. The metastore service to update. The server only merges fields
  712. // in the service if they are specified in `update_mask`.
  713. //
  714. // The metastore service's `name` field is used to identify the metastore
  715. // service to be updated.
  716. Service service = 2 [(google.api.field_behavior) = REQUIRED];
  717. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  718. // request if it has completed. The server will ignore subsequent requests
  719. // that provide a duplicate request ID for at least 60 minutes after the first
  720. // request.
  721. //
  722. // For example, if an initial request times out, followed by another request
  723. // with the same request ID, the server ignores the second request to prevent
  724. // the creation of duplicate commitments.
  725. //
  726. // The request ID must be a valid
  727. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  728. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  729. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  730. }
  731. // Request message for [DataprocMetastore.DeleteService][google.cloud.metastore.v1.DataprocMetastore.DeleteService].
  732. message DeleteServiceRequest {
  733. // Required. The relative resource name of the metastore service to delete, in the
  734. // following form:
  735. //
  736. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  737. string name = 1 [
  738. (google.api.field_behavior) = REQUIRED,
  739. (google.api.resource_reference) = {
  740. type: "metastore.googleapis.com/Service"
  741. }
  742. ];
  743. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  744. // request if it has completed. The server will ignore subsequent requests
  745. // that provide a duplicate request ID for at least 60 minutes after the first
  746. // request.
  747. //
  748. // For example, if an initial request times out, followed by another request
  749. // with the same request ID, the server ignores the second request to prevent
  750. // the creation of duplicate commitments.
  751. //
  752. // The request ID must be a valid
  753. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  754. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  755. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  756. }
  757. // Request message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
  758. message ListMetadataImportsRequest {
  759. // Required. The relative resource name of the service whose metadata imports to
  760. // list, in the following form:
  761. //
  762. // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
  763. string parent = 1 [
  764. (google.api.field_behavior) = REQUIRED,
  765. (google.api.resource_reference) = {
  766. child_type: "metastore.googleapis.com/MetadataImport"
  767. }
  768. ];
  769. // Optional. The maximum number of imports to return. The response may contain less
  770. // than the maximum number. If unspecified, no more than 500 imports are
  771. // returned. The maximum value is 1000; values above 1000 are changed to 1000.
  772. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  773. // Optional. A page token, received from a previous [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices]
  774. // call. Provide this token to retrieve the subsequent page.
  775. //
  776. // To retrieve the first page, supply an empty page token.
  777. //
  778. // When paginating, other parameters provided to
  779. // [DataprocMetastore.ListServices][google.cloud.metastore.v1.DataprocMetastore.ListServices] must match the call that provided the
  780. // page token.
  781. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  782. // Optional. The filter to apply to list results.
  783. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  784. // Optional. Specify the ordering of results as described in [Sorting
  785. // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
  786. // If not specified, the results will be sorted in the default order.
  787. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  788. }
  789. // Response message for [DataprocMetastore.ListMetadataImports][google.cloud.metastore.v1.DataprocMetastore.ListMetadataImports].
  790. message ListMetadataImportsResponse {
  791. // The imports in the specified service.
  792. repeated MetadataImport metadata_imports = 1;
  793. // A token that can be sent as `page_token` to retrieve the next page. If this
  794. // field is omitted, there are no subsequent pages.
  795. string next_page_token = 2;
  796. // Locations that could not be reached.
  797. repeated string unreachable = 3;
  798. }
  799. // Request message for [DataprocMetastore.GetMetadataImport][google.cloud.metastore.v1.DataprocMetastore.GetMetadataImport].
  800. message GetMetadataImportRequest {
  801. // Required. The relative resource name of the metadata import to retrieve, in the
  802. // following form:
  803. //
  804. // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
  805. string name = 1 [
  806. (google.api.field_behavior) = REQUIRED,
  807. (google.api.resource_reference) = {
  808. type: "metastore.googleapis.com/MetadataImport"
  809. }
  810. ];
  811. }
  812. // Request message for [DataprocMetastore.CreateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.CreateMetadataImport].
  813. message CreateMetadataImportRequest {
  814. // Required. The relative resource name of the service in which to create a metastore
  815. // import, in the following form:
  816. //
  817. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  818. string parent = 1 [
  819. (google.api.field_behavior) = REQUIRED,
  820. (google.api.resource_reference) = {
  821. child_type: "metastore.googleapis.com/MetadataImport"
  822. }
  823. ];
  824. // Required. The ID of the metadata import, which is used as the final component of the
  825. // metadata import's name.
  826. //
  827. // This value must be between 1 and 64 characters long, begin with a letter,
  828. // end with a letter or number, and consist of alpha-numeric ASCII characters
  829. // or hyphens.
  830. string metadata_import_id = 2 [(google.api.field_behavior) = REQUIRED];
  831. // Required. The metadata import to create. The `name` field is ignored. The ID of the
  832. // created metadata import must be provided in the request's
  833. // `metadata_import_id` field.
  834. MetadataImport metadata_import = 3 [(google.api.field_behavior) = REQUIRED];
  835. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  836. // request if it has completed. The server will ignore subsequent requests
  837. // that provide a duplicate request ID for at least 60 minutes after the first
  838. // request.
  839. //
  840. // For example, if an initial request times out, followed by another request
  841. // with the same request ID, the server ignores the second request to prevent
  842. // the creation of duplicate commitments.
  843. //
  844. // The request ID must be a valid
  845. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  846. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  847. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  848. }
  849. // Request message for [DataprocMetastore.UpdateMetadataImport][google.cloud.metastore.v1.DataprocMetastore.UpdateMetadataImport].
  850. message UpdateMetadataImportRequest {
  851. // Required. A field mask used to specify the fields to be overwritten in the
  852. // metadata import resource by the update.
  853. // Fields specified in the `update_mask` are relative to the resource (not
  854. // to the full request). A field is overwritten if it is in the mask.
  855. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = REQUIRED];
  856. // Required. The metadata import to update. The server only merges fields
  857. // in the import if they are specified in `update_mask`.
  858. //
  859. // The metadata import's `name` field is used to identify the metastore
  860. // import to be updated.
  861. MetadataImport metadata_import = 2 [(google.api.field_behavior) = REQUIRED];
  862. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  863. // request if it has completed. The server will ignore subsequent requests
  864. // that provide a duplicate request ID for at least 60 minutes after the first
  865. // request.
  866. //
  867. // For example, if an initial request times out, followed by another request
  868. // with the same request ID, the server ignores the second request to prevent
  869. // the creation of duplicate commitments.
  870. //
  871. // The request ID must be a valid
  872. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  873. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  874. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  875. }
  876. // Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
  877. message ListBackupsRequest {
  878. // Required. The relative resource name of the service whose backups to
  879. // list, in the following form:
  880. //
  881. // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
  882. string parent = 1 [
  883. (google.api.field_behavior) = REQUIRED,
  884. (google.api.resource_reference) = {
  885. child_type: "metastore.googleapis.com/Backup"
  886. }
  887. ];
  888. // Optional. The maximum number of backups to return. The response may contain less
  889. // than the maximum number. If unspecified, no more than 500 backups are
  890. // returned. The maximum value is 1000; values above 1000 are changed to 1000.
  891. int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
  892. // Optional. A page token, received from a previous [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups]
  893. // call. Provide this token to retrieve the subsequent page.
  894. //
  895. // To retrieve the first page, supply an empty page token.
  896. //
  897. // When paginating, other parameters provided to
  898. // [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups] must match the call that provided the
  899. // page token.
  900. string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
  901. // Optional. The filter to apply to list results.
  902. string filter = 4 [(google.api.field_behavior) = OPTIONAL];
  903. // Optional. Specify the ordering of results as described in [Sorting
  904. // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
  905. // If not specified, the results will be sorted in the default order.
  906. string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
  907. }
  908. // Response message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1.DataprocMetastore.ListBackups].
  909. message ListBackupsResponse {
  910. // The backups of the specified service.
  911. repeated Backup backups = 1;
  912. // A token that can be sent as `page_token` to retrieve the next page. If this
  913. // field is omitted, there are no subsequent pages.
  914. string next_page_token = 2;
  915. // Locations that could not be reached.
  916. repeated string unreachable = 3;
  917. }
  918. // Request message for [DataprocMetastore.GetBackup][google.cloud.metastore.v1.DataprocMetastore.GetBackup].
  919. message GetBackupRequest {
  920. // Required. The relative resource name of the backup to retrieve, in the
  921. // following form:
  922. //
  923. // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
  924. string name = 1 [
  925. (google.api.field_behavior) = REQUIRED,
  926. (google.api.resource_reference) = {
  927. type: "metastore.googleapis.com/Backup"
  928. }
  929. ];
  930. }
  931. // Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1.DataprocMetastore.CreateBackup].
  932. message CreateBackupRequest {
  933. // Required. The relative resource name of the service in which to create a backup
  934. // of the following form:
  935. //
  936. // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
  937. string parent = 1 [
  938. (google.api.field_behavior) = REQUIRED,
  939. (google.api.resource_reference) = {
  940. child_type: "metastore.googleapis.com/Backup"
  941. }
  942. ];
  943. // Required. The ID of the backup, which is used as the final component of the
  944. // backup's name.
  945. //
  946. // This value must be between 1 and 64 characters long, begin with a letter,
  947. // end with a letter or number, and consist of alpha-numeric ASCII characters
  948. // or hyphens.
  949. string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
  950. // Required. The backup to create. The `name` field is ignored. The ID of the created
  951. // backup must be provided in the request's `backup_id` field.
  952. Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
  953. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  954. // request if it has completed. The server will ignore subsequent requests
  955. // that provide a duplicate request ID for at least 60 minutes after the first
  956. // request.
  957. //
  958. // For example, if an initial request times out, followed by another request
  959. // with the same request ID, the server ignores the second request to prevent
  960. // the creation of duplicate commitments.
  961. //
  962. // The request ID must be a valid
  963. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  964. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  965. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  966. }
  967. // Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1.DataprocMetastore.DeleteBackup].
  968. message DeleteBackupRequest {
  969. // Required. The relative resource name of the backup to delete, in the
  970. // following form:
  971. //
  972. // `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
  973. string name = 1 [
  974. (google.api.field_behavior) = REQUIRED,
  975. (google.api.resource_reference) = {
  976. type: "metastore.googleapis.com/Backup"
  977. }
  978. ];
  979. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  980. // request if it has completed. The server will ignore subsequent requests
  981. // that provide a duplicate request ID for at least 60 minutes after the first
  982. // request.
  983. //
  984. // For example, if an initial request times out, followed by another request
  985. // with the same request ID, the server ignores the second request to prevent
  986. // the creation of duplicate commitments.
  987. //
  988. // The request ID must be a valid
  989. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
  990. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  991. string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
  992. }
  993. // Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1.DataprocMetastore.ExportMetadata].
  994. message ExportMetadataRequest {
  995. // Required. Destination that metadata is exported to.
  996. oneof destination {
  997. // A Cloud Storage URI of a folder, in the format
  998. // `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
  999. // `<export_folder>` containing exported files will be created below it.
  1000. string destination_gcs_folder = 2;
  1001. }
  1002. // Required. The relative resource name of the metastore service to run export, in the
  1003. // following form:
  1004. //
  1005. // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
  1006. string service = 1 [
  1007. (google.api.field_behavior) = REQUIRED,
  1008. (google.api.resource_reference) = {
  1009. type: "metastore.googleapis.com/Service"
  1010. }
  1011. ];
  1012. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  1013. // request if it has completed. The server will ignore subsequent requests
  1014. // that provide a duplicate request ID for at least 60 minutes after the first
  1015. // request.
  1016. //
  1017. // For example, if an initial request times out, followed by another request
  1018. // with the same request ID, the server ignores the second request to prevent
  1019. // the creation of duplicate commitments.
  1020. //
  1021. // The request ID must be a valid
  1022. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
  1023. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  1024. string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
  1025. // Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
  1026. DatabaseDumpSpec.Type database_dump_type = 4 [(google.api.field_behavior) = OPTIONAL];
  1027. }
  1028. // Request message for [DataprocMetastore.Restore][].
  1029. message RestoreServiceRequest {
  1030. // Required. The relative resource name of the metastore service to run restore, in the
  1031. // following form:
  1032. //
  1033. // `projects/{project_id}/locations/{location_id}/services/{service_id}`.
  1034. string service = 1 [
  1035. (google.api.field_behavior) = REQUIRED,
  1036. (google.api.resource_reference) = {
  1037. type: "metastore.googleapis.com/Service"
  1038. }
  1039. ];
  1040. // Required. The relative resource name of the metastore service backup to restore
  1041. // from, in the following form:
  1042. //
  1043. // `projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
  1044. string backup = 2 [
  1045. (google.api.field_behavior) = REQUIRED,
  1046. (google.api.resource_reference) = {
  1047. type: "metastore.googleapis.com/Backup"
  1048. }
  1049. ];
  1050. // Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
  1051. Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL];
  1052. // Optional. A request ID. Specify a unique request ID to allow the server to ignore the
  1053. // request if it has completed. The server will ignore subsequent requests
  1054. // that provide a duplicate request ID for at least 60 minutes after the first
  1055. // request.
  1056. //
  1057. // For example, if an initial request times out, followed by another request
  1058. // with the same request ID, the server ignores the second request to prevent
  1059. // the creation of duplicate commitments.
  1060. //
  1061. // The request ID must be a valid
  1062. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
  1063. // A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
  1064. string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
  1065. }
  1066. // Represents the metadata of a long-running operation.
  1067. message OperationMetadata {
  1068. // Output only. The time the operation was created.
  1069. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  1070. // Output only. The time the operation finished running.
  1071. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  1072. // Output only. Server-defined resource path for the target of the operation.
  1073. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  1074. // Output only. Name of the verb executed by the operation.
  1075. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  1076. // Output only. Human-readable status of the operation, if any.
  1077. string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  1078. // Output only. Identifies whether the caller has requested cancellation
  1079. // of the operation. Operations that have successfully been cancelled
  1080. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  1081. // corresponding to `Code.CANCELLED`.
  1082. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  1083. // Output only. API version used to start the operation.
  1084. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  1085. }
  1086. // Metadata about the service in a location.
  1087. message LocationMetadata {
  1088. // A specification of a supported version of the Hive Metastore software.
  1089. message HiveMetastoreVersion {
  1090. // The semantic version of the Hive Metastore software.
  1091. string version = 1;
  1092. // Whether `version` will be chosen by the server if a metastore service is
  1093. // created with a `HiveMetastoreConfig` that omits the `version`.
  1094. bool is_default = 2;
  1095. }
  1096. // The versions of Hive Metastore that can be used when creating a new
  1097. // metastore service in this location. The server guarantees that exactly one
  1098. // `HiveMetastoreVersion` in the list will set `is_default`.
  1099. repeated HiveMetastoreVersion supported_hive_metastore_versions = 1;
  1100. }
  1101. // The specification of database dump to import from or export to.
  1102. message DatabaseDumpSpec {
  1103. // The type of the database dump.
  1104. enum Type {
  1105. // The type of the database dump is unknown.
  1106. TYPE_UNSPECIFIED = 0;
  1107. // Database dump is a MySQL dump file.
  1108. MYSQL = 1;
  1109. // Database dump contains Avro files.
  1110. AVRO = 2;
  1111. }
  1112. }