Skip to content

Commit 6303bad

Browse files
docs: Replace "GCP" with "Google Cloud" in API comments (#32445)
feat: Adding Method QueryIssues of Database Center API v1beta docs: A comment for field `maintenance_version` in message `.google.cloud.databasecenter.v1beta.MaintenanceInfo` is changed docs: A comment for field `filter` in message `.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest` is changed docs: A comment for field `order_by` in message `.google.cloud.databasecenter.v1beta.QueryDatabaseResourceGroupsRequest` is changed docs: A comment for field `filter` in message `.google.cloud.databasecenter.v1beta.AggregateIssueStatsRequest` is changed docs: A comment for field `filter` in message `.google.cloud.databasecenter.v1beta.AggregateFleetRequest` is changed docs: A comment for field `order_by` in message `.google.cloud.databasecenter.v1beta.AggregateFleetRequest` is changed docs: A comment for message `AggregateFleetResponse` is changed PiperOrigin-RevId: 868397264 Source-Link: googleapis/googleapis@9eea40c Source-Link: googleapis/googleapis-gen@8aba431 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFiYXNlX2NlbnRlci12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjhhYmE0MzE2OTM3NDAxMGMwMDcyYmFiNDhkY2ZkNzk3ODFmNTMzODYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: Replace "GCP" with "Google Cloud" in API comments docs: Remove single quotes from DatabaseCenter summary. PiperOrigin-RevId: 871778449 Source-Link: googleapis/googleapis@4ed62e4 Source-Link: googleapis/googleapis-gen@1a89516 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWRhdGFiYXNlX2NlbnRlci12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6IjFhODk1MTYxOGZkZWI5ZGQxZmYyZDgyMDk5ZjRkOWQ4NmIxZGM3MDgifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent c8610f0 commit 6303bad

18 files changed

Lines changed: 751 additions & 95 deletions

File tree

google-cloud-database_center-v1beta/.owlbot-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"snippets/database_center/aggregate_fleet.rb",
5656
"snippets/database_center/aggregate_issue_stats.rb",
5757
"snippets/database_center/query_database_resource_groups.rb",
58+
"snippets/database_center/query_issues.rb",
5859
"snippets/database_center/query_products.rb",
5960
"snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json",
6061
"test/google/cloud/database_center/v1beta/database_center_rest_test.rb",

google-cloud-database_center-v1beta/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ruby Client for the Database Center V1BETA API
22

3-
Database Center provides an organization-wide, cross-product fleet health platform to eliminate the overhead, complexity, and risk associated with aggregating and summarizing health signals through custom dashboards. Through Database Center’s fleet health dashboard and API, database platform teams that are responsible for reliability, compliance, security, cost, and administration of database fleets will now have a single pane of glass that pinpoints issues relevant to each team.
3+
Database Center offers a comprehensive, organization-wide platform for monitoring database fleet health across various products. It simplifies management and reduces risk by automatically aggregating and summarizing key health signals, removing the need for custom dashboards. The platform provides a unified view through its dashboard and API, enabling teams focused on reliability, compliance, security, cost, and administration to quickly identify and address relevant issues within their database fleets.
44

55
The Database Center API provides access to an organization-wide, cross-product database fleet health platform. It aggregates health, security, and compliance signals from various Google Cloud databases, offering a single pane of glass to identify and manage issues.
66

google-cloud-database_center-v1beta/gapic_metadata.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
"methods": [
3030
"aggregate_issue_stats"
3131
]
32+
},
33+
"QueryIssues": {
34+
"methods": [
35+
"query_issues"
36+
]
3237
}
3338
}
3439
}

google-cloud-database_center-v1beta/google-cloud-database_center-v1beta.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
1010
gem.authors = ["Google LLC"]
1111
gem.email = "googleapis-packages@google.com"
1212
gem.description = "The Database Center API provides access to an organization-wide, cross-product database fleet health platform. It aggregates health, security, and compliance signals from various Google Cloud databases, offering a single pane of glass to identify and manage issues. Note that google-cloud-database_center-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-database_center instead. See the readme for more details."
13-
gem.summary = "Database Center provides an organization-wide, cross-product fleet health platform to eliminate the overhead, complexity, and risk associated with aggregating and summarizing health signals through custom dashboards. Through Database Center’s fleet health dashboard and API, database platform teams that are responsible for reliability, compliance, security, cost, and administration of database fleets will now have a single pane of glass that pinpoints issues relevant to each team."
13+
gem.summary = "Database Center offers a comprehensive, organization-wide platform for monitoring database fleet health across various products. It simplifies management and reduces risk by automatically aggregating and summarizing key health signals, removing the need for custom dashboards. The platform provides a unified view through its dashboard and API, enabling teams focused on reliability, compliance, security, cost, and administration to quickly identify and address relevant issues within their database fleets."
1414
gem.homepage = "https://github.com/googleapis/google-cloud-ruby"
1515
gem.license = "Apache-2.0"
1616

google-cloud-database_center-v1beta/lib/google/cloud/database_center/v1beta/database_center/client.rb

Lines changed: 152 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -331,10 +331,10 @@ def query_products request, options = nil
331331
# expression, parentheses must be appropriately used to group the
332332
# combinations.
333333
#
334-
# Example: location="us-east1"
335-
# Example: container="projects/123" OR container="projects/456"
336-
# Example: (container="projects/123" OR
337-
# container="projects/456") AND location="us-east1"
334+
# Example: `location="us-east1"`
335+
# Example: `container="projects/123" OR container="projects/456"`
336+
# Example: `(container="projects/123" OR
337+
# container="projects/456") AND location="us-east1"`
338338
# @param group_by [::String]
339339
# Optional. A field that statistics are grouped by.
340340
# Valid values are any combination of the following:
@@ -364,9 +364,10 @@ def query_products request, options = nil
364364
# descending order. Add "ASC" after the field name to indicate ascending
365365
# order. It supports ordering using multiple fields.
366366
# For example:
367-
# order_by = "resource_groups_count" sorts response in ascending order
368-
# order_by = "resource_groups_count DESC" sorts response in descending order
369-
# order_by = "product.type, product.version DESC, location" orders by type
367+
# `order_by = "resource_groups_count"` sorts response in ascending order
368+
# `order_by = "resource_groups_count DESC"` sorts response in descending
369+
# order
370+
# `order_by = "product.type, product.version DESC, location"` orders by type
370371
# in ascending order, version in descending order and location in ascending
371372
# order
372373
# @param page_size [::Integer]
@@ -498,12 +499,12 @@ def aggregate_fleet request, options = nil
498499
# expression, parentheses must be appropriately used to group the
499500
# combinations.
500501
#
501-
# Example: location="us-east1"
502-
# Example: container="projects/123" OR container="projects/456"
503-
# Example: (container="projects/123" OR
504-
# container="projects/456") AND location="us-east1"
505-
# Example: full_resource_name=~"test"
506-
# Example: full_resource_name=~"test.*master"
502+
# Example: `location="us-east1"`
503+
# Example: `container="projects/123" OR container="projects/456"`
504+
# Example: `(container="projects/123" OR
505+
# container="projects/456") AND location="us-east1"`
506+
# Example: `full_resource_name=~"test"`
507+
# Example: `full_resource_name=~"test.*master"`
507508
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
508509
# Optional. Groups of signal types that are requested.
509510
# @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>]
@@ -544,12 +545,13 @@ def aggregate_fleet request, options = nil
544545
# order. It only supports a single field at a time.
545546
#
546547
# For example:
547-
# order_by = "full_resource_name" sorts response in ascending order
548-
# order_by = "full_resource_name DESC" sorts response in descending order
549-
# order_by = "issue_count DESC" sorts response in descending order of
548+
# `order_by = "full_resource_name"` sorts response in ascending order
549+
# `order_by = "full_resource_name DESC"` sorts response in descending order
550+
# `order_by = "issue_count DESC"` sorts response in descending order of
550551
# count of all issues associated with a resource.
551552
#
552-
# More explicitly, order_by = "full_resource_name, product" is not supported.
553+
# More explicitly, `order_by = "full_resource_name, product"` is not
554+
# supported.
553555
# @param page_size [::Integer]
554556
# Optional. If unspecified, at most 50 resource groups will be returned.
555557
# The maximum value is 1000; values above 1000 will be coerced to 1000.
@@ -662,10 +664,10 @@ def query_database_resource_groups request, options = nil
662664
# expression, parentheses must be appropriately used to group the
663665
# combinations.
664666
#
665-
# Example: location="us-east1"
666-
# Example: container="projects/123" OR container="projects/456"
667-
# Example: (container="projects/123" OR
668-
# container="projects/456") AND location="us-east1"
667+
# Example: `location="us-east1"`
668+
# Example: `container="projects/123" OR container="projects/456"`
669+
# Example: `(container="projects/123" OR
670+
# container="projects/456") AND location="us-east1"`
669671
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
670672
# Optional. Lists of signal types that are issues.
671673
# @param baseline_date [::Google::Type::Date, ::Hash]
@@ -729,6 +731,128 @@ def aggregate_issue_stats request, options = nil
729731
raise ::Google::Cloud::Error.from_error(e)
730732
end
731733

734+
##
735+
# QueryIssues provides a list of issues and recommendations
736+
# that a user has access to and that are within the requested scope.
737+
#
738+
# @overload query_issues(request, options = nil)
739+
# Pass arguments to `query_issues` via a request object, either of type
740+
# {::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest} or an equivalent Hash.
741+
#
742+
# @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, ::Hash]
743+
# A request object representing the call parameters. Required. To specify no
744+
# parameters, or to keep all the default parameter values, pass an empty Hash.
745+
# @param options [::Gapic::CallOptions, ::Hash]
746+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
747+
#
748+
# @overload query_issues(parent: nil, filter: nil, signal_products_filters: nil, order_by: nil, page_size: nil, page_token: nil)
749+
# Pass arguments to `query_issues` via keyword arguments. Note that at
750+
# least one keyword argument is required. To specify no parameters, or to keep all
751+
# the default parameter values, pass an empty Hash as a request object (see above).
752+
#
753+
# @param parent [::String]
754+
# Required. Parent can be a project, a folder, or an organization. The list
755+
# is limited to the one attached to resources within the `scope` that a user
756+
# has access to.
757+
#
758+
# The allowed values are:
759+
#
760+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
761+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
762+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
763+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
764+
# @param filter [::String]
765+
# Optional.
766+
# Supported fields are:
767+
# 'product',
768+
# `location`,
769+
# `issue_severity`,
770+
# 'tags',
771+
# 'labels',
772+
# @param signal_products_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters, ::Hash>]
773+
# Optional. Filters based on signal and product. The filter list will be ORed
774+
# across pairs and ANDed within a signal and products pair.
775+
# @param order_by [::String]
776+
# Optional. Following fields are sortable:
777+
# SignalType
778+
# Product
779+
# Location
780+
# IssueSeverity
781+
#
782+
# The default order is ascending. Add "DESC" after the field name to indicate
783+
# descending order. Add "ASC" after the field name to indicate ascending
784+
# order. It only supports a single field at a time.
785+
# @param page_size [::Integer]
786+
# Optional. If unspecified, at most 50 issues will be returned.
787+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
788+
# @param page_token [::String]
789+
# Optional. A page token, received from a previous `QueryIssues` call.
790+
# Provide this to retrieve the subsequent page.
791+
# All parameters except page size should match the parameters used in the
792+
# call that provided the page token.
793+
#
794+
# @yield [response, operation] Access the result along with the RPC operation
795+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>]
796+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
797+
#
798+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>]
799+
#
800+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
801+
#
802+
# @example Basic example
803+
# require "google/cloud/database_center/v1beta"
804+
#
805+
# # Create a client object. The client can be reused for multiple calls.
806+
# client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client.new
807+
#
808+
# # Create a request. To set request fields, pass in keyword arguments.
809+
# request = Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new
810+
#
811+
# # Call the query_issues method.
812+
# result = client.query_issues request
813+
#
814+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
815+
# # over elements, and API calls will be issued to fetch pages as needed.
816+
# result.each do |item|
817+
# # Each element is of type ::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue.
818+
# p item
819+
# end
820+
#
821+
def query_issues request, options = nil
822+
raise ::ArgumentError, "request must be provided" if request.nil?
823+
824+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest
825+
826+
# Converts hash and nil to an options object
827+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
828+
829+
# Customize the options with defaults
830+
metadata = @config.rpcs.query_issues.metadata.to_h
831+
832+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
833+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
834+
lib_name: @config.lib_name, lib_version: @config.lib_version,
835+
gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION
836+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
837+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
838+
839+
options.apply_defaults timeout: @config.rpcs.query_issues.timeout,
840+
metadata: metadata,
841+
retry_policy: @config.rpcs.query_issues.retry_policy
842+
843+
options.apply_defaults timeout: @config.timeout,
844+
metadata: @config.metadata,
845+
retry_policy: @config.retry_policy
846+
847+
@database_center_stub.call_rpc :query_issues, request, options: options do |response, operation|
848+
response = ::Gapic::PagedEnumerable.new @database_center_stub, :query_issues, request, response, operation, options
849+
yield response, operation if block_given?
850+
throw :response, response
851+
end
852+
rescue ::GRPC::BadStatus => e
853+
raise ::Google::Cloud::Error.from_error(e)
854+
end
855+
732856
##
733857
# Configuration class for the DatabaseCenter API.
734858
#
@@ -932,6 +1056,11 @@ class Rpcs
9321056
# @return [::Gapic::Config::Method]
9331057
#
9341058
attr_reader :aggregate_issue_stats
1059+
##
1060+
# RPC-specific configuration for `query_issues`
1061+
# @return [::Gapic::Config::Method]
1062+
#
1063+
attr_reader :query_issues
9351064

9361065
# @private
9371066
def initialize parent_rpcs = nil
@@ -943,6 +1072,8 @@ def initialize parent_rpcs = nil
9431072
@query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config
9441073
aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats
9451074
@aggregate_issue_stats = ::Gapic::Config::Method.new aggregate_issue_stats_config
1075+
query_issues_config = parent_rpcs.query_issues if parent_rpcs.respond_to? :query_issues
1076+
@query_issues = ::Gapic::Config::Method.new query_issues_config
9461077

9471078
yield self if block_given?
9481079
end

0 commit comments

Comments
 (0)