feat: Publish Dataproc Metastore v1alpha API

PiperOrigin-RevId: 361084441
pull/644/head
Google APIs 4 years ago committed by Copybara-Service
parent 83f48fa4ea
commit 8f117308d5
  1. 19
      google/cloud/metastore/v1alpha/BUILD.bazel
  2. 581
      google/cloud/metastore/v1alpha/metastore.proto
  3. 8
      google/cloud/metastore/v1alpha/metastore_gapic.yaml
  4. 16
      google/cloud/metastore/v1alpha/metastore_grpc_service_config.json
  5. 59
      google/cloud/metastore/v1alpha/metastore_v1alpha.yaml

@ -1,5 +1,5 @@
# This file was automatically generated by BuildFileGenerator # This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel # https://github.com/googleapis/rules_gapic/tree/master/bazel
# Most of the manual changes to this file will be overwritten. # Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values: # It's **only** allowed to change the following rule attribute values:
@ -29,8 +29,10 @@ proto_library(
"//google/api:field_behavior_proto", "//google/api:field_behavior_proto",
"//google/api:resource_proto", "//google/api:resource_proto",
"//google/longrunning:operations_proto", "//google/longrunning:operations_proto",
"//google/type:dayofweek_proto",
"@com_google_protobuf//:field_mask_proto", "@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto", "@com_google_protobuf//:timestamp_proto",
"@com_google_protobuf//:wrappers_proto",
], ],
) )
@ -115,6 +117,7 @@ go_proto_library(
deps = [ deps = [
"//google/api:annotations_go_proto", "//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto", "//google/longrunning:longrunning_go_proto",
"//google/type:dayofweek_go_proto",
], ],
) )
@ -123,6 +126,7 @@ go_gapic_library(
srcs = [":metastore_proto_with_info"], srcs = [":metastore_proto_with_info"],
grpc_service_config = "metastore_grpc_service_config.json", grpc_service_config = "metastore_grpc_service_config.json",
importpath = "cloud.google.com/go/metastore/apiv1alpha;metastore", importpath = "cloud.google.com/go/metastore/apiv1alpha;metastore",
metadata = True,
service_yaml = "metastore_v1alpha.yaml", service_yaml = "metastore_v1alpha.yaml",
deps = [ deps = [
":metastore_go_proto", ":metastore_go_proto",
@ -144,6 +148,7 @@ go_gapic_assembly_pkg(
name = "gapi-cloud-metastore-v1alpha-go", name = "gapi-cloud-metastore-v1alpha-go",
deps = [ deps = [
":metastore_go_gapic", ":metastore_go_gapic",
":metastore_go_gapic_srcjar-metadata.srcjar",
":metastore_go_gapic_srcjar-test.srcjar", ":metastore_go_gapic_srcjar-test.srcjar",
":metastore_go_proto", ":metastore_go_proto",
], ],
@ -250,8 +255,8 @@ nodejs_gapic_assembly_pkg(
############################################################################## ##############################################################################
load( load(
"@com_google_googleapis_imports//:imports.bzl", "@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg", "ruby_gapic_assembly_pkg",
"ruby_gapic_library",
"ruby_grpc_library", "ruby_grpc_library",
"ruby_proto_library", "ruby_proto_library",
) )
@ -267,13 +272,13 @@ ruby_grpc_library(
deps = [":metastore_ruby_proto"], deps = [":metastore_ruby_proto"],
) )
ruby_gapic_library( ruby_cloud_gapic_library(
name = "metastore_ruby_gapic", name = "metastore_ruby_gapic",
src = ":metastore_proto_with_info", srcs = [":metastore_proto_with_info"],
gapic_yaml = "metastore_gapic.yaml", extra_protoc_parameters = [
"ruby-cloud-gem-name=google-cloud-metastore-v1alpha",
],
grpc_service_config = "metastore_grpc_service_config.json", grpc_service_config = "metastore_grpc_service_config.json",
package = "google.cloud.metastore.v1alpha",
service_yaml = "metastore_v1alpha.yaml",
deps = [ deps = [
":metastore_ruby_grpc", ":metastore_ruby_grpc",
":metastore_ruby_proto", ":metastore_ruby_proto",

@ -1,4 +1,4 @@
// Copyright 2020 Google LLC // Copyright 2021 Google LLC
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License. // you may not use this file except in compliance with the License.
@ -23,6 +23,8 @@ import "google/api/resource.proto";
import "google/longrunning/operations.proto"; import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto"; import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto"; import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/type/dayofweek.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1alpha;metastore"; option go_package = "google.golang.org/genproto/googleapis/cloud/metastore/v1alpha;metastore";
option java_multiple_files = true; option java_multiple_files = true;
@ -49,7 +51,7 @@ option (google.api.resource_definition) = {
// * Each location has a collection of services, named: `/services/*` // * Each location has a collection of services, named: `/services/*`
// * Dataproc Metastore services are resources with names of the form: // * Dataproc Metastore services are resources with names of the form:
// //
// `/projects/{project_id}/locations/{location_id}/services/{service_id}`. // `/projects/{project_number}/locations/{location_id}/services/{service_id}`.
service DataprocMetastore { service DataprocMetastore {
option (google.api.default_host) = "metastore.googleapis.com"; option (google.api.default_host) = "metastore.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
@ -150,6 +152,72 @@ service DataprocMetastore {
metadata_type: "OperationMetadata" metadata_type: "OperationMetadata"
}; };
} }
// Exports metadata from a service.
rpc ExportMetadata(ExportMetadataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1alpha/{service=projects/*/locations/*/services/*}:exportMetadata"
body: "*"
};
option (google.longrunning.operation_info) = {
response_type: "MetadataExport"
metadata_type: "OperationMetadata"
};
}
// Restores a service from a backup.
rpc RestoreService(RestoreServiceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1alpha/{service=projects/*/locations/*/services/*}:restore"
body: "*"
};
option (google.api.method_signature) = "service,backup";
option (google.longrunning.operation_info) = {
response_type: "Restore"
metadata_type: "OperationMetadata"
};
}
// Lists backups in a service.
rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
option (google.api.http) = {
get: "/v1alpha/{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: "/v1alpha/{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: "/v1alpha/{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: "OperationMetadata"
};
}
// Deletes a single backup.
rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1alpha/{name=projects/*/locations/*/services/*/backups/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "OperationMetadata"
};
}
} }
// A managed metastore service that serves metadata queries. // A managed metastore service that serves metadata queries.
@ -194,14 +262,26 @@ message Service {
// The tier is not set. // The tier is not set.
TIER_UNSPECIFIED = 0; TIER_UNSPECIFIED = 0;
// The enterprise tier combines a powerful metastore serving layer with a // The developer tier provides limited scalability and no fault tolerance.
// highly scalable data storage layer. // 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; ENTERPRISE = 3;
} }
// 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, of the form: // Immutable. The relative resource name of the metastore service, of the form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}". // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
string name = 1 [(google.api.field_behavior) = IMMUTABLE]; string name = 1 [(google.api.field_behavior) = IMMUTABLE];
// Output only. The time when the metastore service was created. // Output only. The time when the metastore service was created.
@ -213,19 +293,10 @@ message Service {
// User-defined labels for the metastore service. // User-defined labels for the metastore service.
map<string, string> labels = 4; map<string, string> labels = 4;
// 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 VPC network on which the instance can be // Immutable. The relative resource name of the VPC network on which the instance can be
// accessed. The network must belong to the same project as the metastore // accessed. It is specified in the following form:
// instance. It is specified in the following form:
// //
// "projects/{project_id}/global/networks/{network_id}". // `projects/{project_number}/global/networks/{network_id}`.
string network = 7 [ string network = 7 [
(google.api.field_behavior) = IMMUTABLE, (google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -252,6 +323,44 @@ message Service {
// The tier of the service. // The tier of the service.
Tier tier = 13; Tier tier = 13;
// The setting that defines how metastore metadata should be integrated with
// external services and systems.
MetadataIntegration metadata_integration = 14;
// The one hour maintenance window of the metastore service. This specifies
// when the service can be restarted for maintenance purposes in UTC time.
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];
}
// Specifies how metastore metadata should be integrated with external services.
message MetadataIntegration {
// The integration config for the Data Catalog service.
DataCatalogConfig data_catalog_config = 1;
}
// Specifies how metastore metadata should be integrated with the Data Catalog
// service.
message DataCatalogConfig {
// Defines whether the metastore metadata should be synced to Data Catalog.
// The default value is to disable syncing metastore metadata to Data Catalog.
bool enabled = 1;
}
// 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 // Specifies configuration information specific to running Hive metastore
@ -266,7 +375,10 @@ message HiveMetastoreConfig {
map<string, string> config_overrides = 2; map<string, string> config_overrides = 2;
// Information used to configure the Hive metastore service as a service // Information used to configure the Hive metastore service as a service
// principal in a Kerberos realm. // 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; KerberosConfig kerberos_config = 3;
} }
@ -278,7 +390,7 @@ message KerberosConfig {
// A Kerberos principal that exists in the both the keytab the KDC // A Kerberos principal that exists in the both the keytab the KDC
// to authenticate as. A typical principal is of the form // to authenticate as. A typical principal is of the form
// "primary/instance@REALM", but there is no exact format. // `primary/instance@REALM`, but there is no exact format.
string principal = 2; string principal = 2;
// A Cloud Storage URI that specifies the path to a // A Cloud Storage URI that specifies the path to a
@ -293,11 +405,20 @@ message Secret {
// The relative resource name of a Secret Manager secret version, in the // The relative resource name of a Secret Manager secret version, in the
// following form: // following form:
// //
// "projects/{project_id}/secrets/{secret_id}/versions/{version_id}". // `projects/{project_number}/secrets/{secret_id}/versions/{version_id}`.
string cloud_secret = 2; string cloud_secret = 2;
} }
} }
// 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. // A metastore resource that imports metadata.
message MetadataImport { message MetadataImport {
option (google.api.resource) = { option (google.api.resource) = {
@ -318,14 +439,17 @@ message MetadataImport {
} }
// The type of the database. // The type of the database.
DatabaseType database_type = 1; DatabaseType database_type = 1 [deprecated = true];
// A Cloud Storage object URI that specifies the source from which to // A Cloud Storage object or folder URI that specifies the source from which
// import metadata. It must begin with `gs://`. // to import metadata. It must begin with `gs://`.
string gcs_uri = 2; string gcs_uri = 2;
// The name of the source database. // The name of the source database.
string source_database = 3; 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. // The current state of the metadata import.
@ -347,9 +471,15 @@ message MetadataImport {
FAILED = 4; 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: // Immutable. The relative resource name of the metadata import, of the form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}". // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{metadata_import_id}`.
string name = 1 [(google.api.field_behavior) = IMMUTABLE]; string name = 1 [(google.api.field_behavior) = IMMUTABLE];
// The description of the metadata import. // The description of the metadata import.
@ -363,12 +493,152 @@ message MetadataImport {
// Output only. The current state of the metadata import. // Output only. The current state of the metadata import.
State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// The metadata to be imported. // The details of a metadata export operation.
oneof metadata { message MetadataExport {
// Immutable. A database dump from a pre-existing metastore's database. // The current state of the metadata export.
DatabaseDump database_dump = 6 [(google.api.field_behavior) = IMMUTABLE]; 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;
}
// 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;
}
// 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.
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];
} }
// Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices]. // Request message for [DataprocMetastore.ListServices][google.cloud.metastore.v1alpha.DataprocMetastore.ListServices].
@ -376,7 +646,7 @@ message ListServicesRequest {
// Required. The relative resource name of the location of metastore services to // Required. The relative resource name of the location of metastore services to
// list, in the following form: // list, in the following form:
// //
// "projects/{project_id}/locations/{location_id}". // `projects/{project_number}/locations/{location_id}`.
string parent = 1 [ string parent = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -402,9 +672,9 @@ message ListServicesRequest {
// Optional. The filter to apply to list results. // Optional. The filter to apply to list results.
string filter = 4 [(google.api.field_behavior) = OPTIONAL]; string filter = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Specify the ordering of results as described in // Optional. Specify the ordering of results as described in [Sorting
// [Sorting Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). If not // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
// specified, the results will be sorted in the default order. // If not specified, the results will be sorted in the default order.
string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
} }
@ -426,7 +696,7 @@ message GetServiceRequest {
// Required. The relative resource name of the metastore service to retrieve, in the // Required. The relative resource name of the metastore service to retrieve, in the
// following form: // following form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}". // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
string name = 1 [ string name = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -440,7 +710,7 @@ message CreateServiceRequest {
// Required. The relative resource name of the location in which to create a metastore // Required. The relative resource name of the location in which to create a metastore
// service, in the following form: // service, in the following form:
// //
// "projects/{project_id}/locations/{location_id}". // `projects/{project_number}/locations/{location_id}`.
string parent = 1 [ string parent = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -451,7 +721,7 @@ message CreateServiceRequest {
// Required. The ID of the metastore service, which is used as the final // Required. The ID of the metastore service, which is used as the final
// component of the metastore service's name. // component of the metastore service's name.
// //
// This value must be between 1 and 64 characters long, begin with a // 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 // letter, end with a letter or number, and consist of alpha-numeric
// ASCII characters or hyphens. // ASCII characters or hyphens.
string service_id = 2 [(google.api.field_behavior) = REQUIRED]; string service_id = 2 [(google.api.field_behavior) = REQUIRED];
@ -511,7 +781,7 @@ message DeleteServiceRequest {
// Required. The relative resource name of the metastore service to delete, in the // Required. The relative resource name of the metastore service to delete, in the
// following form: // following form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}". // `projects/{project_number}/locations/{location_id}/services/{service_id}`.
string name = 1 [ string name = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -539,7 +809,7 @@ message ListMetadataImportsRequest {
// Required. The relative resource name of the service whose metadata imports to // Required. The relative resource name of the service whose metadata imports to
// list, in the following form: // list, in the following form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}/metadataImports". // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports`.
string parent = 1 [ string parent = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -565,9 +835,9 @@ message ListMetadataImportsRequest {
// Optional. The filter to apply to list results. // Optional. The filter to apply to list results.
string filter = 4 [(google.api.field_behavior) = OPTIONAL]; string filter = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Specify the ordering of results as described in // Optional. Specify the ordering of results as described in [Sorting
// [Sorting Order](https://cloud.google.com/apis/design/design_patterns#sorting_order). If not // Order](https://cloud.google.com/apis/design/design_patterns#sorting_order).
// specified, the results will be sorted in the default order. // If not specified, the results will be sorted in the default order.
string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
} }
@ -589,7 +859,7 @@ message GetMetadataImportRequest {
// Required. The relative resource name of the metadata import to retrieve, in the // Required. The relative resource name of the metadata import to retrieve, in the
// following form: // following form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}". // `projects/{project_number}/locations/{location_id}/services/{service_id}/metadataImports/{import_id}`.
string name = 1 [ string name = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -603,7 +873,7 @@ message CreateMetadataImportRequest {
// Required. The relative resource name of the service in which to create a metastore // Required. The relative resource name of the service in which to create a metastore
// import, in the following form: // import, in the following form:
// //
// "projects/{project_id}/locations/{location_id}/services/{service_id}" // `projects/{project_number}/locations/{location_id}/services/{service_id}`
string parent = 1 [ string parent = 1 [
(google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = { (google.api.resource_reference) = {
@ -669,6 +939,219 @@ message UpdateMetadataImportRequest {
string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
} }
// Request message for [DataprocMetastore.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
message ListBackupsRequest {
// Required. The relative resource name of the service whose backups to
// list, in the following form:
//
// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Service"
}
];
// Optional. The maximum number of backups to return. The response may contain less
// than the maximum number. If unspecified, no more than 500 backups 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.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups]
// 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.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups] 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.ListBackups][google.cloud.metastore.v1alpha.DataprocMetastore.ListBackups].
message ListBackupsResponse {
// The backups of the specified service.
repeated Backup backups = 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.GetBackup][google.cloud.metastore.v1alpha.DataprocMetastore.GetBackup].
message GetBackupRequest {
// Required. The relative resource name of the backup to retrieve, in the
// following form:
//
// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Backup"
}
];
}
// Request message for [DataprocMetastore.CreateBackup][google.cloud.metastore.v1alpha.DataprocMetastore.CreateBackup].
message CreateBackupRequest {
// Required. The relative resource name of the service in which to create a backup
// of the following form:
//
// `projects/{project_number}/locations/{location_id}/services/{service_id}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Service"
}
];
// Required. The ID of the backup, which is used as the final component of the
// backup's name.
//
// This value must be between 1 and 64 characters long, begin with a letter,
// end with a letter or number, and consist of alpha-numeric ASCII characters
// or hyphens.
string backup_id = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The backup to create. The `name` field is ignored. The ID of the created
// backup must be provided in the request's `backup_id` field.
Backup backup = 3 [(google.api.field_behavior) = REQUIRED];
// Optional. A request ID. Specify a unique request ID to allow the server to ignore the
// request if it has completed. The server will ignore subsequent requests
// that provide a duplicate request ID for at least 60 minutes after the first
// request.
//
// For example, if an initial request times out, followed by another request
// with the same request ID, the server ignores the second request to prevent
// the creation of duplicate commitments.
//
// The request ID must be a valid
// [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for [DataprocMetastore.DeleteBackup][google.cloud.metastore.v1alpha.DataprocMetastore.DeleteBackup].
message DeleteBackupRequest {
// Required. The relative resource name of the backup to delete, in the
// following form:
//
// `projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Backup"
}
];
// Optional. A request ID. Specify a unique request ID to allow the server to ignore the
// request if it has completed. The server will ignore subsequent requests
// that provide a duplicate request ID for at least 60 minutes after the first
// request.
//
// For example, if an initial request times out, followed by another request
// with the same request ID, the server ignores the second request to prevent
// the creation of duplicate commitments.
//
// The request ID must be a valid
// [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format)
// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for [DataprocMetastore.ExportMetadata][google.cloud.metastore.v1alpha.DataprocMetastore.ExportMetadata].
message ExportMetadataRequest {
// Required. Destination that metadata is exported to.
oneof destination {
// A Cloud Storage URI of a folder, in the format
// `gs://<bucket_name>/<path_inside_bucket>`. A sub-folder
// `<export_folder>` containing exported files will be created below it.
string destination_gcs_folder = 2;
}
// Required. The relative resource name of the metastore service to run export, in the
// following form:
//
// `projects/{project_id}/locations/{location_id}/services/{service_id}`
string service = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Service"
}
];
// Optional. A request ID. Specify a unique request ID to allow the server to ignore the
// request if it has completed. The server will ignore subsequent requests
// that provide a duplicate request ID for at least 60 minutes after the first
// request.
//
// For example, if an initial request times out, followed by another request
// with the same request ID, the server ignores the second request to prevent
// the creation of duplicate commitments.
//
// The request ID must be a valid
// [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
string request_id = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The type of the database dump. If unspecified, defaults to `MYSQL`.
DatabaseDumpSpec.Type database_dump_type = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Request message for [DataprocMetastore.Restore][].
message RestoreServiceRequest {
// Required. The relative resource name of the metastore service to run restore, in the
// following form:
//
// `projects/{project_id}/locations/{location_id}/services/{service_id}`
string service = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Service"
}
];
// Required. 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 = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "metastore.googleapis.com/Backup"
}
];
// Optional. The type of restore. If unspecified, defaults to `METADATA_ONLY`.
Restore.RestoreType restore_type = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. A request ID. Specify a unique request ID to allow the server to ignore the
// request if it has completed. The server will ignore subsequent requests
// that provide a duplicate request ID for at least 60 minutes after the first
// request.
//
// For example, if an initial request times out, followed by another request
// with the same request ID, the server ignores the second request to prevent
// the creation of duplicate commitments.
//
// The request ID must be a valid
// [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format).
// A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.
string request_id = 4 [(google.api.field_behavior) = OPTIONAL];
}
// Represents the metadata of a long-running operation. // Represents the metadata of a long-running operation.
message OperationMetadata { message OperationMetadata {
// Output only. The time the operation was created. // Output only. The time the operation was created.
@ -713,3 +1196,17 @@ message LocationMetadata {
// `HiveMetastoreVersion` in the list will set `is_default`. // `HiveMetastoreVersion` in the list will set `is_default`.
repeated HiveMetastoreVersion supported_hive_metastore_versions = 1; repeated HiveMetastoreVersion supported_hive_metastore_versions = 1;
} }
// The specification of database dump to import from or export to.
message DatabaseDumpSpec {
// The type of the database dump.
enum Type {
// The type of the database dump is unknown.
TYPE_UNSPECIFIED = 0;
// Database dump is a MySQL dump file.
MYSQL = 1;
}
}

@ -1,16 +1,18 @@
type: com.google.api.codegen.ConfigProto type: com.google.api.codegen.ConfigProto
config_schema_version: 2.0.0 config_schema_version: 2.0.0
language_settings: language_settings:
java:
package_name: com.google.cloud.metastore.v1alpha
python: python:
package_name: google.cloud.metastore_v1alph.gapic package_name: google.cloud.metastore_v1alpha.gapic
go: go:
package_name: cloud.google.com/go/metastore/apiv1alpha package_name: cloud.google.com/go/metastore/apiv1alpha
csharp: csharp:
package_name: Google.Cloud.Metastore.V1Alpha package_name: Google.Cloud.Metastore.V1Alpha
ruby: ruby:
package_name: Google::Cloud::Metastore::V1alpha package_name: Google::Cloud::Metastore::V1Alpha
php: php:
package_name: Google\Cloud\Metastore\V1alpha package_name: Google\Cloud\Metastore\V1Alpha
nodejs: nodejs:
package_name: metastore.v1alpha package_name: metastore.v1alpha
domain_layer_location: google-cloud domain_layer_location: google-cloud

@ -31,6 +31,22 @@
{ {
"service": "google.cloud.metastore.v1alpha.DataprocMetastore", "service": "google.cloud.metastore.v1alpha.DataprocMetastore",
"method": "UpdateMetadataImport" "method": "UpdateMetadataImport"
},
{
"service": "google.cloud.metastore.v1alpha.DataprocMetastore",
"method": "ExportMetadata"
},
{
"service": "google.cloud.metastore.v1alpha.DataprocMetastore",
"method": "RestoreService"
},
{
"service": "google.cloud.metastore.v1alpha.DataprocMetastore",
"method": "CreateBackup"
},
{
"service": "google.cloud.metastore.v1alpha.DataprocMetastore",
"method": "DeleteBackup"
} }
], ],
"timeout": "60s" "timeout": "60s"

@ -14,16 +14,63 @@ documentation:
summary: |- summary: |-
The Dataproc Metastore API is used to manage the lifecycle and The Dataproc Metastore API is used to manage the lifecycle and
configuration of metastore services. configuration of metastore services.
rules:
- selector: google.cloud.location.Locations.GetLocation
description: Gets information about a location.
- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
description: |-
Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
description: |-
Sets the access control policy on the specified resource. Replaces
any existing policy.
Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`
errors.
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
description: |-
Returns permissions that a caller has on the specified resource. If the
resource does not exist, this will return an empty set of
permissions, not a `NOT_FOUND` error.
Note: This operation is designed to be used for building
permission-aware UIs and command-line tools, not for authorization
checking. This operation may "fail open" without warning.
backend: backend:
rules: rules:
- selector: google.cloud.location.Locations.GetLocation
deadline: 60.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 60.0
- selector: 'google.cloud.metastore.v1alpha.DataprocMetastore.*' - selector: 'google.cloud.metastore.v1alpha.DataprocMetastore.*'
deadline: 60.0 deadline: 60.0
- selector: 'google.iam.v1.IAMPolicy.*'
deadline: 60.0
- selector: 'google.longrunning.Operations.*' - selector: 'google.longrunning.Operations.*'
deadline: 60.0 deadline: 60.0
http: http:
rules: rules:
- selector: google.cloud.location.Locations.GetLocation
get: '/v1alpha/{name=projects/*/locations/*}'
- selector: google.cloud.location.Locations.ListLocations
get: '/v1alpha/{name=projects/*}/locations'
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
get: '/v1alpha/{resource=projects/*/locations/*/services/*}:getIamPolicy'
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
post: '/v1alpha/{resource=projects/*/locations/*/services/*}:setIamPolicy'
body: '*'
- selector: google.iam.v1.IAMPolicy.TestIamPermissions
post: '/v1alpha/{resource=projects/*/locations/*/services/*}:testIamPermissions'
body: '*'
- selector: google.longrunning.Operations.DeleteOperation - selector: google.longrunning.Operations.DeleteOperation
delete: '/v1alpha/{name=projects/*/locations/*/operations/*}' delete: '/v1alpha/{name=projects/*/locations/*/operations/*}'
- selector: google.longrunning.Operations.GetOperation - selector: google.longrunning.Operations.GetOperation
@ -33,10 +80,22 @@ http:
authentication: authentication:
rules: rules:
- selector: google.cloud.location.Locations.GetLocation
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.location.Locations.ListLocations
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.metastore.v1alpha.DataprocMetastore.*' - selector: 'google.cloud.metastore.v1alpha.DataprocMetastore.*'
oauth: oauth:
canonical_scopes: |- canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/cloud-platform
- selector: 'google.iam.v1.IAMPolicy.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.longrunning.Operations.*' - selector: 'google.longrunning.Operations.*'
oauth: oauth:
canonical_scopes: |- canonical_scopes: |-

Loading…
Cancel
Save