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