Skip to content

Commit 615bb9a

Browse files
Google APIscopybara-github
authored andcommitted
feat: Adding Method AggregateIssueStats of Database Center API v1beta
This release includes: - `DatabaseCenter` service with `AggregateIssueStats` method. - All related enums. PiperOrigin-RevId: 856484579
1 parent 415914b commit 615bb9a

File tree

10 files changed

+129
-10
lines changed

10 files changed

+129
-10
lines changed

google/cloud/databasecenter/v1beta/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,6 @@ load(
338338

339339
csharp_proto_library(
340340
name = "databasecenter_csharp_proto",
341-
extra_opts = [],
342341
deps = [":databasecenter_proto"],
343342
)
344343

google/cloud/databasecenter/v1beta/databasecenter_v1beta_grpc_service_config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
},
1010
{ "service": "google.cloud.databasecenter.v1beta.DatabaseCenterService",
1111
"method": "AggregateFleet"
12+
},
13+
{ "service": "google.cloud.databasecenter.v1beta.DatabaseCenterService",
14+
"method": "AggregateIssueStats"
1215
}
1316
],
1417
"timeout": "60s",

google/cloud/databasecenter/v1beta/machine_config.proto

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ option ruby_package = "Google::Cloud::DatabaseCenter::V1beta";
2828

2929
// MachineConfig describes the configuration of a machine specific to a Database
3030
// Resource.
31-
// NextID: 5
3231
message MachineConfig {
3332
// Memory size in bytes.
3433
int64 memory_size_bytes = 2;

google/cloud/databasecenter/v1beta/maintenance.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/databasecenter/v1beta/metric_data.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/databasecenter/v1beta/operation_error_type.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/databasecenter/v1beta/product.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/databasecenter/v1beta/service.proto

Lines changed: 119 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -64,6 +64,15 @@ service DatabaseCenter {
6464
body: "*"
6565
};
6666
}
67+
68+
// AggregateIssueStats provides database resource issues statistics.
69+
rpc AggregateIssueStats(AggregateIssueStatsRequest)
70+
returns (AggregateIssueStatsResponse) {
71+
option (google.api.http) = {
72+
post: "/v1beta:aggregateIssueStats"
73+
body: "*"
74+
};
75+
}
6776
}
6877

6978
// The enum value corresponds to 'type' suffix in the resource_type field.
@@ -405,6 +414,115 @@ message DatabaseResource {
405414
[(google.api.field_behavior) = OPTIONAL];
406415
}
407416

417+
// AggregateIssueStatsRequest represents the input to the AggregateIssueStats
418+
// method.
419+
message AggregateIssueStatsRequest {
420+
// Required. Parent can be a project, a folder, or an organization. The search
421+
// is limited to the resources within the `scope`.
422+
//
423+
// The allowed values are:
424+
//
425+
// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
426+
// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
427+
// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
428+
// * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
429+
string parent = 1 [(google.api.field_behavior) = REQUIRED];
430+
431+
// Optional. The expression to filter resources.
432+
//
433+
// Supported fields are: `full_resource_name`, `resource_type`, `container`,
434+
// `product.type`, `product.engine`, `product.version`, `location`,
435+
// `labels`, `issues`, fields of availability_info,
436+
// data_protection_info,'resource_name', etc.
437+
//
438+
// The expression is a list of zero or more restrictions combined via logical
439+
// operators `AND` and `OR`. When `AND` and `OR` are both used in the
440+
// expression, parentheses must be appropriately used to group the
441+
// combinations.
442+
//
443+
// Example: location="us-east1"
444+
// Example: container="projects/123" OR container="projects/456"
445+
// Example: (container="projects/123" OR
446+
// container="projects/456") AND location="us-east1"
447+
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
448+
449+
// Optional. Lists of signal types that are issues.
450+
repeated SignalTypeGroup signal_type_groups = 3
451+
[(google.api.field_behavior) = OPTIONAL];
452+
453+
// Optional. The baseline date w.r.t. which the delta counts are calculated.
454+
// If not set, delta counts are not included in the response and the response
455+
// indicates the current state of the fleet.
456+
optional google.type.Date baseline_date = 4
457+
[(google.api.field_behavior) = OPTIONAL];
458+
}
459+
460+
// The response message containing one of more group of relevant health issues
461+
// for database resources.
462+
message AggregateIssueStatsResponse {
463+
// List of issue group stats where each group contains stats for resources
464+
// having a particular combination of relevant issues.
465+
repeated IssueGroupStats issue_group_stats = 1;
466+
467+
// Total count of the resources filtered in based on the user given filter.
468+
int32 total_resources_count = 2;
469+
470+
// Total count of the resource filtered in based on the user given filter.
471+
int32 total_resource_groups_count = 3;
472+
473+
// Unordered list. List of unreachable regions from where data could not be
474+
// retrieved.
475+
repeated string unreachable = 4
476+
[(google.api.field_behavior) = UNORDERED_LIST];
477+
}
478+
479+
// IssueGroupStats refers to stats for a particulare combination of relevant
480+
// health issues of database resources.
481+
message IssueGroupStats {
482+
// Database resource level health card name. This will corresponds to one of
483+
// the requested input group names.
484+
string display_name = 1;
485+
486+
// Total count of the groups of resources returned by the filter that
487+
// also have one or more resources for which any of the specified issues
488+
// are applicable.
489+
int32 resource_groups_count = 2;
490+
491+
// Total count of resources returned by the filter for which any of the
492+
// specified issues are applicable.
493+
int32 resources_count = 3;
494+
495+
// The number of resource groups from the total groups as defined above
496+
// that are healthy with respect to all of the specified issues.
497+
int32 healthy_resource_groups_count = 4;
498+
499+
// The number of resources from the total defined above in field
500+
// total_resources_count that are healthy with respect to all of the specified
501+
// issues.
502+
int32 healthy_resources_count = 5;
503+
504+
// List of issues stats containing count of resources having particular issue
505+
// category.
506+
repeated IssueStats issue_stats = 6;
507+
}
508+
509+
// IssueStats holds stats for a particular signal category.
510+
message IssueStats {
511+
// Type of signal which is an issue.
512+
SignalType signal_type = 1;
513+
514+
// Number of resources having issues of a given type.
515+
int32 resource_count = 2;
516+
517+
// Optional. Delta counts and details of resources for which issue was raised
518+
// or fixed.
519+
optional DeltaDetails delta_details = 3
520+
[(google.api.field_behavior) = OPTIONAL];
521+
522+
// Severity of the issue.
523+
optional IssueSeverity issue_severity = 4;
524+
}
525+
408526
// Label is a key value pair applied to a resource.
409527
message Label {
410528
// The key part of the label.

google/cloud/databasecenter/v1beta/signals.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

google/cloud/databasecenter/v1beta/suspension_reason.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2025 Google LLC
1+
// Copyright 2026 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)