GeezerVison is showing github.com — feat: Adding Method QueryDatabaseResourceGroups of Database Center AP… · googleapis/googleapis@b607ece
File treeExpand file treeCollapse file tree Open diff view settings google/cloud/databasecenter/v1beta
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: google/cloud/databasecenter/v1beta/BUILD.bazel +21-9Lines changed: 21 additions & 9 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -24,14 +24,25 @@ load("@rules_proto//proto:defs.bzl", "proto_library") | 24 | 24 | proto_library( | 25 | 25 | name = "databasecenter_proto", | 26 | 26 | srcs = [ | | 27 | + "machine_config.proto", | | 28 | + "maintenance.proto", | | 29 | + "metric_data.proto", | | 30 | + "operation_error_type.proto", | 27 | 31 | "product.proto", | 28 | 32 | "service.proto", | | 33 | + "signals.proto", | | 34 | + "suspension_reason.proto", | 29 | 35 | ], | 30 | 36 | deps = [ | 31 | 37 | "//google/api:annotations_proto", | 32 | 38 | "//google/api:client_proto", | 33 | 39 | "//google/api:field_behavior_proto", | 34 | | - "//google/api:resource_proto", | | 40 | + "//google/type:date_proto", | | 41 | + "//google/type:dayofweek_proto", | | 42 | + "//google/type:timeofday_proto", | | 43 | + "@com_google_protobuf//:duration_proto", | | 44 | + "@com_google_protobuf//:timestamp_proto", | | 45 | + "@com_google_protobuf//:wrappers_proto", | 35 | 46 | ], | 36 | 47 | ) | 37 | 48 |
| @@ -96,14 +107,14 @@ java_gapic_test( | 96 | 107 | # Open Source Packages | 97 | 108 | java_gapic_assembly_gradle_pkg( | 98 | 109 | name = "google-cloud-databasecenter-v1beta-java", | | 110 | + include_samples = True, | 99 | 111 | transport = "grpc+rest", | 100 | 112 | deps = [ | 101 | 113 | ":databasecenter_java_gapic", | 102 | 114 | ":databasecenter_java_grpc", | 103 | 115 | ":databasecenter_java_proto", | 104 | 116 | ":databasecenter_proto", | 105 | 117 | ], | 106 | | - include_samples = True, | 107 | 118 | ) | 108 | 119 |
| 109 | 120 | ############################################################################## | @@ -123,6 +134,9 @@ go_grpc_library( | 123 | 134 | protos = [":databasecenter_proto"], | 124 | 135 | deps = [ | 125 | 136 | "//google/api:annotations_go_proto", | | 137 | + "//google/type:date_go_proto", | | 138 | + "//google/type:dayofweek_go_proto", | | 139 | + "//google/type:timeofday_go_proto", | 126 | 140 | ], | 127 | 141 | ) | 128 | 142 |
| @@ -138,6 +152,7 @@ go_gapic_library( | 138 | 152 | transport = "grpc+rest", | 139 | 153 | deps = [ | 140 | 154 | ":databasecenter_go_proto", | | 155 | + "@io_bazel_rules_go//proto/wkt:duration_go_proto", | 141 | 156 | ], | 142 | 157 | ) | 143 | 158 |
| @@ -146,9 +161,9 @@ go_gapic_assembly_pkg( | 146 | 161 | name = "gapi-cloud-databasecenter-v1beta-go", | 147 | 162 | deps = [ | 148 | 163 | ":databasecenter_go_gapic", | 149 | | - ":databasecenter_go_gapic_srcjar-test.srcjar", | 150 | 164 | ":databasecenter_go_gapic_srcjar-metadata.srcjar", | 151 | 165 | ":databasecenter_go_gapic_srcjar-snippets.srcjar", | | 166 | + ":databasecenter_go_gapic_srcjar-test.srcjar", | 152 | 167 | ":databasecenter_go_proto", | 153 | 168 | ], | 154 | 169 | ) | @@ -213,8 +228,8 @@ php_gapic_library( | 213 | 228 | name = "databasecenter_php_gapic", | 214 | 229 | srcs = [":databasecenter_proto_with_info"], | 215 | 230 | grpc_service_config = "databasecenter_v1beta_grpc_service_config.json", | 216 | | - rest_numeric_enums = True, | 217 | 231 | migration_mode = "NEW_SURFACE_ONLY", | | 232 | + rest_numeric_enums = True, | 218 | 233 | service_yaml = "databasecenter_v1beta.yaml", | 219 | 234 | transport = "grpc+rest", | 220 | 235 | deps = [ | @@ -268,8 +283,8 @@ nodejs_gapic_assembly_pkg( | 268 | 283 | # buildifier: disable=same-origin-load | 269 | 284 | load( | 270 | 285 | "@com_google_googleapis_imports//:imports.bzl", | 271 | | - "ruby_gapic_assembly_pkg", | 272 | 286 | "ruby_cloud_gapic_library", | | 287 | + "ruby_gapic_assembly_pkg", | 273 | 288 | "ruby_grpc_library", | 274 | 289 | "ruby_proto_library", | 275 | 290 | ) | @@ -288,9 +303,7 @@ ruby_grpc_library( | 288 | 303 | ruby_cloud_gapic_library( | 289 | 304 | name = "databasecenter_ruby_gapic", | 290 | 305 | srcs = [":databasecenter_proto_with_info"], | 291 | | - extra_protoc_parameters = [ | 292 | | - "ruby-cloud-gem-name=google-cloud-database_center-v1beta", | 293 | | - ], | | 306 | + extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-database_center-v1beta"], | 294 | 307 | grpc_service_config = "databasecenter_v1beta_grpc_service_config.json", | 295 | 308 | rest_numeric_enums = True, | 296 | 309 | service_yaml = "databasecenter_v1beta.yaml", | @@ -325,7 +338,6 @@ load( | 325 | 338 |
| 326 | 339 | csharp_proto_library( | 327 | 340 | name = "databasecenter_csharp_proto", | 328 | | - extra_opts = [], | 329 | 341 | deps = [":databasecenter_proto"], | 330 | 342 | ) | 331 | 343 |
| |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/databasecenter/v1beta/databasecenter_v1beta.yaml +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,6 +23,10 @@ documentation: | 23 | 23 |
| 24 | 24 | authentication: | 25 | 25 | rules: | | 26 | + - selector: google.cloud.databasecenter.v1beta.DatabaseCenter.QueryDatabaseResourceGroups | | 27 | + oauth: | | 28 | + canonical_scopes: |- | | 29 | + https://www.googleapis.com/auth/cloud-platform | 26 | 30 | - selector: google.cloud.databasecenter.v1beta.DatabaseCenter.QueryProducts | 27 | 31 | oauth: | 28 | 32 | canonical_scopes: |- | |
Collapse file Copy file name to clipboardExpand all lines: google/cloud/databasecenter/v1beta/databasecenter_v1beta_grpc_service_config.json +6-1Lines changed: 6 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | { | 2 | 2 | "methodConfig": [{ | 3 | 3 | "name": [ | 4 | | - { "service": "google.cloud.databasecenter.v1beta.DatabaseCenterService", "method": "QueryProducts" } | | 4 | + { "service": "google.cloud.databasecenter.v1beta.DatabaseCenterService", | | 5 | + "method": "QueryProducts" | | 6 | + }, | | 7 | + { "service": "google.cloud.databasecenter.v1beta.DatabaseCenterService", | | 8 | + "method": "QueryDatabaseResourceGroups" | | 9 | + } | 5 | 10 | ], | 6 | 11 | "timeout": "60s", | 7 | 12 | "retryPolicy": { | |
Collapse file Copy file name to clipboard +41Lines changed: 41 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +// Copyright 2025 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 | + | | 15 | +syntax = "proto3"; | | 16 | + | | 17 | +package google.cloud.databasecenter.v1beta; | | 18 | + | | 19 | +import "google/api/field_behavior.proto"; | | 20 | + | | 21 | +option csharp_namespace = "Google.Cloud.DatabaseCenter.V1Beta"; | | 22 | +option go_package = "cloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb"; | | 23 | +option java_multiple_files = true; | | 24 | +option java_outer_classname = "MachineConfigProto"; | | 25 | +option java_package = "com.google.cloud.databasecenter.v1beta"; | | 26 | +option php_namespace = "Google\\Cloud\\DatabaseCenter\\V1beta"; | | 27 | +option ruby_package = "Google::Cloud::DatabaseCenter::V1beta"; | | 28 | + | | 29 | +// MachineConfig describes the configuration of a machine specific to a Database | | 30 | +// Resource. | | 31 | +// NextID: 5 | | 32 | +message MachineConfig { | | 33 | + // Memory size in bytes. | | 34 | + int64 memory_size_bytes = 2; | | 35 | + | | 36 | + // Optional. The number of Shards (if applicable). | | 37 | + optional int32 shard_count = 3 [(google.api.field_behavior) = OPTIONAL]; | | 38 | + | | 39 | + // Optional. The number of vCPUs (if applicable). | | 40 | + optional double vcpu_count = 4 [(google.api.field_behavior) = OPTIONAL]; | | 41 | +} |
Collapse file Copy file name to clipboard +102Lines changed: 102 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +// Copyright 2025 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 | + | | 15 | +syntax = "proto3"; | | 16 | + | | 17 | +package google.cloud.databasecenter.v1beta; | | 18 | + | | 19 | +import "google/api/field_behavior.proto"; | | 20 | +import "google/type/date.proto"; | | 21 | +import "google/type/dayofweek.proto"; | | 22 | +import "google/type/timeofday.proto"; | | 23 | + | | 24 | +option csharp_namespace = "Google.Cloud.DatabaseCenter.V1Beta"; | | 25 | +option go_package = "cloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb"; | | 26 | +option java_multiple_files = true; | | 27 | +option java_outer_classname = "MaintenanceProto"; | | 28 | +option java_package = "com.google.cloud.databasecenter.v1beta"; | | 29 | +option php_namespace = "Google\\Cloud\\DatabaseCenter\\V1beta"; | | 30 | +option ruby_package = "Google::Cloud::DatabaseCenter::V1beta"; | | 31 | + | | 32 | +// Phase/Week of the maintenance window. This is to capture order of | | 33 | +// maintenance. For example, for Cloud SQL resources - | | 34 | +// https://cloud.google.com/sql/docs/mysql/maintenance. | | 35 | +// This enum can be extended to support DB Center specific phases for | | 36 | +// recommendation plan generation. | | 37 | +enum Phase { | | 38 | + // Phase is unspecified. | | 39 | + PHASE_UNSPECIFIED = 0; | | 40 | + | | 41 | + // Week 1. | | 42 | + PHASE_WEEK1 = 1; | | 43 | + | | 44 | + // Week 2. | | 45 | + PHASE_WEEK2 = 2; | | 46 | + | | 47 | + // Week 5. | | 48 | + PHASE_WEEK5 = 3; | | 49 | + | | 50 | + // Any phase. | | 51 | + PHASE_ANY = 4; | | 52 | +} | | 53 | + | | 54 | +// Maintenance window for the database resource. It specifies preferred time | | 55 | +// and day of the week and phase in some cases, when the maintenance can start. | | 56 | +message ResourceMaintenanceSchedule { | | 57 | + // Optional. Preferred time to start the maintenance operation on the | | 58 | + // specified day. | | 59 | + google.type.TimeOfDay start_time = 1 [(google.api.field_behavior) = OPTIONAL]; | | 60 | + | | 61 | + // Optional. Preferred day of the week for maintenance, e.g. MONDAY, TUESDAY, | | 62 | + // etc. | | 63 | + google.type.DayOfWeek day = 2 [(google.api.field_behavior) = OPTIONAL]; | | 64 | + | | 65 | + // Optional. Phase of the maintenance window. This is to capture order of | | 66 | + // maintenance. For example, for Cloud SQL resources, this can be used to | | 67 | + // capture if the maintenance window is in Week1, Week2, Week5, etc. Non | | 68 | + // production resources are usually part of early phase. | | 69 | + // For more details, refer to Cloud SQL resources - | | 70 | + // https://cloud.google.com/sql/docs/mysql/maintenance | | 71 | + Phase phase = 3 [(google.api.field_behavior) = OPTIONAL]; | | 72 | +} | | 73 | + | | 74 | +// Deny maintenance period for the database resource. It specifies the time | | 75 | +// range during which the maintenance cannot start. This is configured by the | | 76 | +// customer. | | 77 | +message ResourceMaintenanceDenySchedule { | | 78 | + // Optional. The start date of the deny maintenance period. | | 79 | + google.type.Date start_date = 1 [(google.api.field_behavior) = OPTIONAL]; | | 80 | + | | 81 | + // Optional. Deny period end date. | | 82 | + google.type.Date end_date = 2 [(google.api.field_behavior) = OPTIONAL]; | | 83 | + | | 84 | + // Optional. Time in UTC when the deny period starts on start_date and ends on | | 85 | + // end_date. | | 86 | + google.type.TimeOfDay time = 3 [(google.api.field_behavior) = OPTIONAL]; | | 87 | +} | | 88 | + | | 89 | +// MaintenanceInfo to capture the maintenance details of database resource. | | 90 | +message MaintenanceInfo { | | 91 | + // Optional. Maintenance window for the database resource. | | 92 | + ResourceMaintenanceSchedule maintenance_schedule = 1 | | 93 | + [(google.api.field_behavior) = OPTIONAL]; | | 94 | + | | 95 | + // Optional. List of Deny maintenance period for the database resource. | | 96 | + repeated ResourceMaintenanceDenySchedule deny_maintenance_schedules = 2 | | 97 | + [(google.api.field_behavior) = OPTIONAL]; | | 98 | + | | 99 | + // Optional. Current Maintenance version of the database resource. Example: | | 100 | + // "MYSQL_8_0_41.R20250531.01_15" | | 101 | + string maintenance_version = 3 [(google.api.field_behavior) = OPTIONAL]; | | 102 | +} |
Collapse file Copy file name to clipboard +83Lines changed: 83 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +// Copyright 2025 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 | + | | 15 | +syntax = "proto3"; | | 16 | + | | 17 | +package google.cloud.databasecenter.v1beta; | | 18 | + | | 19 | +import "google/protobuf/timestamp.proto"; | | 20 | + | | 21 | +option csharp_namespace = "Google.Cloud.DatabaseCenter.V1Beta"; | | 22 | +option go_package = "cloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb"; | | 23 | +option java_multiple_files = true; | | 24 | +option java_outer_classname = "MetricDataProto"; | | 25 | +option java_package = "com.google.cloud.databasecenter.v1beta"; | | 26 | +option php_namespace = "Google\\Cloud\\DatabaseCenter\\V1beta"; | | 27 | +option ruby_package = "Google::Cloud::DatabaseCenter::V1beta"; | | 28 | + | | 29 | +// Metrics represents the metrics for a database resource. | | 30 | +message Metrics { | | 31 | + // P99 CPU utilization observed for the resource. The value is a | | 32 | + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). | | 33 | + optional MetricData p99_cpu_utilization = 1; | | 34 | + | | 35 | + // P95 CPU utilization observed for the resource. The value is a | | 36 | + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). | | 37 | + optional MetricData p95_cpu_utilization = 2; | | 38 | + | | 39 | + // Current storage used by the resource in bytes. | | 40 | + optional MetricData current_storage_used_bytes = 3; | | 41 | + | | 42 | + // Peak storage utilization observed for the resource. The value is a | | 43 | + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). | | 44 | + optional MetricData peak_storage_utilization = 4; | | 45 | + | | 46 | + // Peak memory utilization observed for the resource. The value is a | | 47 | + // fraction between 0.0 and 1.0 (may momentarily exceed 1.0 in some cases). | | 48 | + optional MetricData peak_memory_utilization = 5; | | 49 | + | | 50 | + // Peak number of connections observed for the resource. The value is a | | 51 | + // positive integer. | | 52 | + optional MetricData peak_number_connections = 6; | | 53 | + | | 54 | + // Number of nodes in instance for spanner or bigtable. | | 55 | + optional MetricData node_count = 7; | | 56 | + | | 57 | + // Number of processing units in spanner. | | 58 | + optional MetricData processing_unit_count = 8; | | 59 | + | | 60 | + // Current memory used by the resource in bytes. | | 61 | + optional MetricData current_memory_used_bytes = 9; | | 62 | +} | | 63 | + | | 64 | +// MetricData represents the metric data for a database resource. | | 65 | +message MetricData { | | 66 | + // The value associated with the metric. | | 67 | + TypedValue value = 1; | | 68 | + | | 69 | + // The time the metric was observed in the metric source service. | | 70 | + google.protobuf.Timestamp observation_time = 2; | | 71 | +} | | 72 | + | | 73 | +// TypedValue represents the value of the metric based on data type. | | 74 | +message TypedValue { | | 75 | + // The data type of metric value would be chosen based on the metric type. | | 76 | + oneof value { | | 77 | + // The value of the metric as double. | | 78 | + double double_value = 1; | | 79 | + | | 80 | + // The value of the metric as int. | | 81 | + int64 int64_value = 2; | | 82 | + } | | 83 | +} |
|