feat: Adding Method QueryIssues of Database Center API v1beta · googleapis/googleapis@9eea40c
@@ -73,6 +73,16 @@ service DatabaseCenter {
7373body: "*"
7474 };
7575 }
76+77+// QueryIssues provides a list of issues and recommendations
78+// that a user has access to and that are within the requested scope.
79+rpc QueryIssues(QueryIssuesRequest) returns (QueryIssuesResponse) {
80+option (google.api.http) = {
81+post: "/v1beta:queryIssues"
82+body: "*"
83+ };
84+option (google.api.method_signature) = "parent";
85+ }
7686}
77877888// The enum value corresponds to 'type' suffix in the resource_type field.
@@ -224,12 +234,12 @@ message QueryDatabaseResourceGroupsRequest {
224234// expression, parentheses must be appropriately used to group the
225235// combinations.
226236//
227-// Example: location="us-east1"
228-// Example: container="projects/123" OR container="projects/456"
229-// Example: (container="projects/123" OR
230-// container="projects/456") AND location="us-east1"
231-// Example: full_resource_name=~"test"
232-// Example: full_resource_name=~"test.*master"
237+// Example: `location="us-east1"`
238+// Example: `container="projects/123" OR container="projects/456"`
239+// Example: `(container="projects/123" OR
240+// container="projects/456") AND location="us-east1"`
241+// Example: `full_resource_name=~"test"`
242+// Example: `full_resource_name=~"test.*master"`
233243string filter = 2 [(google.api.field_behavior) = OPTIONAL];
234244235245// Optional. Groups of signal types that are requested.
@@ -275,12 +285,13 @@ message QueryDatabaseResourceGroupsRequest {
275285// order. It only supports a single field at a time.
276286//
277287// For example:
278-// order_by = "full_resource_name" sorts response in ascending order
279-// order_by = "full_resource_name DESC" sorts response in descending order
280-// order_by = "issue_count DESC" sorts response in descending order of
288+// `order_by = "full_resource_name"` sorts response in ascending order
289+// `order_by = "full_resource_name DESC"` sorts response in descending order
290+// `order_by = "issue_count DESC"` sorts response in descending order of
281291// count of all issues associated with a resource.
282292//
283-// More explicitly, order_by = "full_resource_name, product" is not supported.
293+// More explicitly, `order_by = "full_resource_name, product"` is not
294+// supported.
284295string order_by = 5 [(google.api.field_behavior) = OPTIONAL];
285296286297// Optional. If unspecified, at most 50 resource groups will be returned.
@@ -440,10 +451,10 @@ message AggregateIssueStatsRequest {
440451// expression, parentheses must be appropriately used to group the
441452// combinations.
442453//
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"
454+// Example: `location="us-east1"`
455+// Example: `container="projects/123" OR container="projects/456"`
456+// Example: `(container="projects/123" OR
457+// container="projects/456") AND location="us-east1"`
447458string filter = 2 [(google.api.field_behavior) = OPTIONAL];
448459449460// Optional. Lists of signal types that are issues.
@@ -562,10 +573,10 @@ message AggregateFleetRequest {
562573// expression, parentheses must be appropriately used to group the
563574// combinations.
564575//
565-// Example: location="us-east1"
566-// Example: container="projects/123" OR container="projects/456"
567-// Example: (container="projects/123" OR
568-// container="projects/456") AND location="us-east1"
576+// Example: `location="us-east1"`
577+// Example: `container="projects/123" OR container="projects/456"`
578+// Example: `(container="projects/123" OR
579+// container="projects/456") AND location="us-east1"`
569580string filter = 2 [(google.api.field_behavior) = OPTIONAL];
570581571582// Optional. A field that statistics are grouped by.
@@ -597,9 +608,10 @@ message AggregateFleetRequest {
597608// descending order. Add "ASC" after the field name to indicate ascending
598609// order. It supports ordering using multiple fields.
599610// For example:
600-// order_by = "resource_groups_count" sorts response in ascending order
601-// order_by = "resource_groups_count DESC" sorts response in descending order
602-// order_by = "product.type, product.version DESC, location" orders by type
611+// `order_by = "resource_groups_count"` sorts response in ascending order
612+// `order_by = "resource_groups_count DESC"` sorts response in descending
613+// order
614+// `order_by = "product.type, product.version DESC, location"` orders by type
603615// in ascending order, version in descending order and location in ascending
604616// order
605617string order_by = 4 [(google.api.field_behavior) = OPTIONAL];
@@ -621,7 +633,8 @@ message AggregateFleetRequest {
621633 [(google.api.field_behavior) = OPTIONAL];
622634}
623635624-// The response message to aggregate a fleet by some group by fields.
636+// The response message to aggregate a fleet by some group by
637+// fields.
625638message AggregateFleetResponse {
626639// Represents a row grouped by the fields in the input.
627640repeated AggregateFleetRow rows = 1;
@@ -737,6 +750,90 @@ message BackupDRConfig {
737750optional bool backupdr_managed = 1;
738751}
739752753+// QueryIssuesRequest is the request to get a list of issues.
754+message QueryIssuesRequest {
755+// Required. Parent can be a project, a folder, or an organization. The list
756+// is limited to the one attached to resources within the `scope` that a user
757+// has access to.
758+//
759+// The allowed values are:
760+//
761+// * projects/{PROJECT_ID} (e.g., "projects/foo-bar")
762+// * projects/{PROJECT_NUMBER} (e.g., "projects/12345678")
763+// * folders/{FOLDER_NUMBER} (e.g., "folders/1234567")
764+// * organizations/{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
765+string parent = 1 [(google.api.field_behavior) = REQUIRED];
766+767+// Optional.
768+// Supported fields are:
769+// 'product',
770+// `location`,
771+// `issue_severity`,
772+// 'tags',
773+// 'labels',
774+string filter = 2 [(google.api.field_behavior) = OPTIONAL];
775+776+// Optional. Filters based on signal and product. The filter list will be ORed
777+// across pairs and ANDed within a signal and products pair.
778+repeated SignalProductsFilters signal_products_filters = 3
779+ [(google.api.field_behavior) = OPTIONAL];
780+781+// Optional. Following fields are sortable:
782+// SignalType
783+// Product
784+// Location
785+// IssueSeverity
786+//
787+// The default order is ascending. Add "DESC" after the field name to indicate
788+// descending order. Add "ASC" after the field name to indicate ascending
789+// order. It only supports a single field at a time.
790+string order_by = 4 [(google.api.field_behavior) = OPTIONAL];
791+792+// Optional. If unspecified, at most 50 issues will be returned.
793+// The maximum value is 1000; values above 1000 will be coerced to 1000.
794+int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];
795+796+// Optional. A page token, received from a previous `QueryIssues` call.
797+// Provide this to retrieve the subsequent page.
798+// All parameters except page size should match the parameters used in the
799+// call that provided the page token.
800+string page_token = 6 [(google.api.field_behavior) = OPTIONAL];
801+}
802+803+// SignalProductsFilters represents a signal and list of supported products.
804+message SignalProductsFilters {
805+// Optional. The type of signal.
806+SignalType signal_type = 1 [(google.api.field_behavior) = OPTIONAL];
807+808+// Optional. Product type of the resource. The version of the product will be
809+// ignored in filtering.
810+repeated Product products = 2 [(google.api.field_behavior) = OPTIONAL];
811+}
812+813+// QueryIssuesResponse is the response containing a list of issues.
814+message QueryIssuesResponse {
815+// List of issues and resource details.
816+repeated DatabaseResourceIssue resource_issues = 1;
817+818+// A token that can be sent as `page_token` to retrieve the next page.
819+// If this field is omitted, there are no subsequent pages.
820+string next_page_token = 2;
821+822+// Unordered list. List of unreachable regions from where data could not be
823+// retrieved.
824+repeated string unreachable = 3
825+ [(google.api.field_behavior) = UNORDERED_LIST];
826+}
827+828+// DatabaseResource and Issue associated with it.
829+message DatabaseResourceIssue {
830+// Signal associated with the issue.
831+Signal signal = 1;
832+833+// Resource associated with the issue.
834+DatabaseResource resource = 2;
835+}
836+740837// Tag is a key value pair attached to a resource.
741838message Tag {
742839string key = 1;