Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"snippets/database_center/aggregate_fleet.rb",
"snippets/database_center/aggregate_issue_stats.rb",
"snippets/database_center/query_database_resource_groups.rb",
"snippets/database_center/query_issues.rb",
"snippets/database_center/query_products.rb",
"snippets/snippet_metadata_google.cloud.databasecenter.v1beta.json",
"test/google/cloud/database_center/v1beta/database_center_rest_test.rb",
Expand Down
2 changes: 1 addition & 1 deletion google-cloud-database_center-v1beta/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ruby Client for the Database Center V1BETA API

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.
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.

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.

Expand Down
5 changes: 5 additions & 0 deletions google-cloud-database_center-v1beta/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
"methods": [
"aggregate_issue_stats"
]
},
"QueryIssues": {
"methods": [
"query_issues"
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
gem.authors = ["Google LLC"]
gem.email = "googleapis-packages@google.com"
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."
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."
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."
gem.homepage = "https://github.com/googleapis/google-cloud-ruby"
gem.license = "Apache-2.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,10 @@ def query_products request, options = nil
# expression, parentheses must be appropriately used to group the
# combinations.
#
# Example: location="us-east1"
# Example: container="projects/123" OR container="projects/456"
# Example: (container="projects/123" OR
# container="projects/456") AND location="us-east1"
# Example: `location="us-east1"`
# Example: `container="projects/123" OR container="projects/456"`
# Example: `(container="projects/123" OR
# container="projects/456") AND location="us-east1"`
# @param group_by [::String]
# Optional. A field that statistics are grouped by.
# Valid values are any combination of the following:
Expand Down Expand Up @@ -364,9 +364,10 @@ def query_products request, options = nil
# descending order. Add "ASC" after the field name to indicate ascending
# order. It supports ordering using multiple fields.
# For example:
# order_by = "resource_groups_count" sorts response in ascending order
# order_by = "resource_groups_count DESC" sorts response in descending order
# order_by = "product.type, product.version DESC, location" orders by type
# `order_by = "resource_groups_count"` sorts response in ascending order
# `order_by = "resource_groups_count DESC"` sorts response in descending
# order
# `order_by = "product.type, product.version DESC, location"` orders by type
# in ascending order, version in descending order and location in ascending
# order
# @param page_size [::Integer]
Expand Down Expand Up @@ -498,12 +499,12 @@ def aggregate_fleet request, options = nil
# expression, parentheses must be appropriately used to group the
# combinations.
#
# Example: location="us-east1"
# Example: container="projects/123" OR container="projects/456"
# Example: (container="projects/123" OR
# container="projects/456") AND location="us-east1"
# Example: full_resource_name=~"test"
# Example: full_resource_name=~"test.*master"
# Example: `location="us-east1"`
# Example: `container="projects/123" OR container="projects/456"`
# Example: `(container="projects/123" OR
# container="projects/456") AND location="us-east1"`
# Example: `full_resource_name=~"test"`
# Example: `full_resource_name=~"test.*master"`
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
# Optional. Groups of signal types that are requested.
# @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>]
Expand Down Expand Up @@ -544,12 +545,13 @@ def aggregate_fleet request, options = nil
# order. It only supports a single field at a time.
#
# For example:
# order_by = "full_resource_name" sorts response in ascending order
# order_by = "full_resource_name DESC" sorts response in descending order
# order_by = "issue_count DESC" sorts response in descending order of
# `order_by = "full_resource_name"` sorts response in ascending order
# `order_by = "full_resource_name DESC"` sorts response in descending order
# `order_by = "issue_count DESC"` sorts response in descending order of
# count of all issues associated with a resource.
#
# More explicitly, order_by = "full_resource_name, product" is not supported.
# More explicitly, `order_by = "full_resource_name, product"` is not
# supported.
# @param page_size [::Integer]
# Optional. If unspecified, at most 50 resource groups will be returned.
# The maximum value is 1000; values above 1000 will be coerced to 1000.
Expand Down Expand Up @@ -662,10 +664,10 @@ def query_database_resource_groups request, options = nil
# expression, parentheses must be appropriately used to group the
# combinations.
#
# Example: location="us-east1"
# Example: container="projects/123" OR container="projects/456"
# Example: (container="projects/123" OR
# container="projects/456") AND location="us-east1"
# Example: `location="us-east1"`
# Example: `container="projects/123" OR container="projects/456"`
# Example: `(container="projects/123" OR
# container="projects/456") AND location="us-east1"`
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
# Optional. Lists of signal types that are issues.
# @param baseline_date [::Google::Type::Date, ::Hash]
Expand Down Expand Up @@ -729,6 +731,128 @@ def aggregate_issue_stats request, options = nil
raise ::Google::Cloud::Error.from_error(e)
end

##
# QueryIssues provides a list of issues and recommendations
# that a user has access to and that are within the requested scope.
#
# @overload query_issues(request, options = nil)
# Pass arguments to `query_issues` via a request object, either of type
# {::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest} or an equivalent Hash.
#
# @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, ::Hash]
# A request object representing the call parameters. Required. To specify no
# parameters, or to keep all the default parameter values, pass an empty Hash.
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
# @overload query_issues(parent: nil, filter: nil, signal_products_filters: nil, order_by: nil, page_size: nil, page_token: nil)
# Pass arguments to `query_issues` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
# @param parent [::String]
# Required. Parent can be a project, a folder, or an organization. The list
# is limited to the one attached to resources within the `scope` that a user
# has access to.
#
# The allowed values are:
#
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
# @param filter [::String]
# Optional.
# Supported fields are:
# 'product',
# `location`,
# `issue_severity`,
# 'tags',
# 'labels',
# @param signal_products_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters, ::Hash>]
# Optional. Filters based on signal and product. The filter list will be ORed
# across pairs and ANDed within a signal and products pair.
# @param order_by [::String]
# Optional. Following fields are sortable:
# SignalType
# Product
# Location
# IssueSeverity
#
# The default order is ascending. Add "DESC" after the field name to indicate
# descending order. Add "ASC" after the field name to indicate ascending
# order. It only supports a single field at a time.
# @param page_size [::Integer]
# Optional. If unspecified, at most 50 issues will be returned.
# The maximum value is 1000; values above 1000 will be coerced to 1000.
# @param page_token [::String]
# Optional. A page token, received from a previous `QueryIssues` call.
# Provide this to retrieve the subsequent page.
# All parameters except page size should match the parameters used in the
# call that provided the page token.
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
# @return [::Gapic::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
# @example Basic example
# require "google/cloud/database_center/v1beta"
#
# # Create a client object. The client can be reused for multiple calls.
# client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client.new
#
# # Create a request. To set request fields, pass in keyword arguments.
# request = Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new
#
# # Call the query_issues method.
# result = client.query_issues request
#
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
# # over elements, and API calls will be issued to fetch pages as needed.
# result.each do |item|
# # Each element is of type ::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue.
# p item
# end
#
def query_issues request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?

request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest

# Converts hash and nil to an options object
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

# Customize the options with defaults
metadata = @config.rpcs.query_issues.metadata.to_h

# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

options.apply_defaults timeout: @config.rpcs.query_issues.timeout,
metadata: metadata,
retry_policy: @config.rpcs.query_issues.retry_policy

options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy

@database_center_stub.call_rpc :query_issues, request, options: options do |response, operation|
response = ::Gapic::PagedEnumerable.new @database_center_stub, :query_issues, request, response, operation, options
yield response, operation if block_given?
throw :response, response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end

##
# Configuration class for the DatabaseCenter API.
#
Expand Down Expand Up @@ -932,6 +1056,11 @@ class Rpcs
# @return [::Gapic::Config::Method]
#
attr_reader :aggregate_issue_stats
##
# RPC-specific configuration for `query_issues`
# @return [::Gapic::Config::Method]
#
attr_reader :query_issues

# @private
def initialize parent_rpcs = nil
Expand All @@ -943,6 +1072,8 @@ def initialize parent_rpcs = nil
@query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config
aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats
@aggregate_issue_stats = ::Gapic::Config::Method.new aggregate_issue_stats_config
query_issues_config = parent_rpcs.query_issues if parent_rpcs.respond_to? :query_issues
@query_issues = ::Gapic::Config::Method.new query_issues_config

yield self if block_given?
end
Expand Down
Loading
Loading