google-cloud-database_center-v1beta 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/database_center/v1beta/database_center/client.rb +152 -21
- data/lib/google/cloud/database_center/v1beta/database_center/rest/client.rb +153 -21
- data/lib/google/cloud/database_center/v1beta/database_center/rest/service_stub.rb +60 -0
- data/lib/google/cloud/database_center/v1beta/version.rb +1 -1
- data/lib/google/cloud/databasecenter/v1beta/machine_config_pb.rb +2 -23
- data/lib/google/cloud/databasecenter/v1beta/maintenance_pb.rb +3 -26
- data/lib/google/cloud/databasecenter/v1beta/metric_data_pb.rb +2 -24
- data/lib/google/cloud/databasecenter/v1beta/operation_error_type_pb.rb +2 -23
- data/lib/google/cloud/databasecenter/v1beta/product_pb.rb +2 -23
- data/lib/google/cloud/databasecenter/v1beta/service_pb.rb +7 -30
- data/lib/google/cloud/databasecenter/v1beta/service_services_pb.rb +3 -0
- data/lib/google/cloud/databasecenter/v1beta/signals_pb.rb +2 -28
- data/lib/google/cloud/databasecenter/v1beta/suspension_reason_pb.rb +2 -23
- data/proto_docs/google/cloud/databasecenter/v1beta/maintenance.rb +2 -2
- data/proto_docs/google/cloud/databasecenter/v1beta/product.rb +8 -8
- data/proto_docs/google/cloud/databasecenter/v1beta/service.rb +129 -32
- data/proto_docs/google/cloud/databasecenter/v1beta/signals.rb +7 -7
- data/proto_docs/google/protobuf/wrappers.rb +27 -0
- metadata +9 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 667459ed11674a9873c1640b99d0db670e08acf1801114167f07332d2e9f0e96
|
|
4
|
+
data.tar.gz: 802adc85e25ced3d7a4eb9c08ce576658d7e0b332024e38c40385700bc62e7ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2205c17dfb09fa72900e3987e5a13fdebd4a32e165366d2a33534e927d31b207100dc36e40de257428eb0789a9ec2e33fc9e01b077e91241086fde26aabdcd9a
|
|
7
|
+
data.tar.gz: f33d6e695ef1368a60cf0b32a01e456a8a54acfe35d07a203b5b8c65280b0f58732e0d5cd97def603089de042d207af7a85fd11be0b77bae0b8595bcba9bac28
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Ruby Client for the Database Center V1BETA API
|
|
2
2
|
|
|
3
|
-
Database Center
|
|
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.
|
|
4
4
|
|
|
5
5
|
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.
|
|
6
6
|
|
|
@@ -331,10 +331,10 @@ module Google
|
|
|
331
331
|
# expression, parentheses must be appropriately used to group the
|
|
332
332
|
# combinations.
|
|
333
333
|
#
|
|
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"`
|
|
338
338
|
# @param group_by [::String]
|
|
339
339
|
# Optional. A field that statistics are grouped by.
|
|
340
340
|
# Valid values are any combination of the following:
|
|
@@ -364,9 +364,10 @@ module Google
|
|
|
364
364
|
# descending order. Add "ASC" after the field name to indicate ascending
|
|
365
365
|
# order. It supports ordering using multiple fields.
|
|
366
366
|
# For example:
|
|
367
|
-
# order_by = "resource_groups_count" sorts response in ascending order
|
|
368
|
-
# order_by = "resource_groups_count DESC" sorts response in descending
|
|
369
|
-
#
|
|
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
|
|
370
371
|
# in ascending order, version in descending order and location in ascending
|
|
371
372
|
# order
|
|
372
373
|
# @param page_size [::Integer]
|
|
@@ -498,12 +499,12 @@ module Google
|
|
|
498
499
|
# expression, parentheses must be appropriately used to group the
|
|
499
500
|
# combinations.
|
|
500
501
|
#
|
|
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"`
|
|
507
508
|
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
|
|
508
509
|
# Optional. Groups of signal types that are requested.
|
|
509
510
|
# @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>]
|
|
@@ -544,12 +545,13 @@ module Google
|
|
|
544
545
|
# order. It only supports a single field at a time.
|
|
545
546
|
#
|
|
546
547
|
# 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
|
|
550
551
|
# count of all issues associated with a resource.
|
|
551
552
|
#
|
|
552
|
-
# More explicitly, order_by = "full_resource_name, product" is not
|
|
553
|
+
# More explicitly, `order_by = "full_resource_name, product"` is not
|
|
554
|
+
# supported.
|
|
553
555
|
# @param page_size [::Integer]
|
|
554
556
|
# Optional. If unspecified, at most 50 resource groups will be returned.
|
|
555
557
|
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
@@ -662,10 +664,10 @@ module Google
|
|
|
662
664
|
# expression, parentheses must be appropriately used to group the
|
|
663
665
|
# combinations.
|
|
664
666
|
#
|
|
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"`
|
|
669
671
|
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
|
|
670
672
|
# Optional. Lists of signal types that are issues.
|
|
671
673
|
# @param baseline_date [::Google::Type::Date, ::Hash]
|
|
@@ -729,6 +731,128 @@ module Google
|
|
|
729
731
|
raise ::Google::Cloud::Error.from_error(e)
|
|
730
732
|
end
|
|
731
733
|
|
|
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
|
+
|
|
732
856
|
##
|
|
733
857
|
# Configuration class for the DatabaseCenter API.
|
|
734
858
|
#
|
|
@@ -932,6 +1056,11 @@ module Google
|
|
|
932
1056
|
# @return [::Gapic::Config::Method]
|
|
933
1057
|
#
|
|
934
1058
|
attr_reader :aggregate_issue_stats
|
|
1059
|
+
##
|
|
1060
|
+
# RPC-specific configuration for `query_issues`
|
|
1061
|
+
# @return [::Gapic::Config::Method]
|
|
1062
|
+
#
|
|
1063
|
+
attr_reader :query_issues
|
|
935
1064
|
|
|
936
1065
|
# @private
|
|
937
1066
|
def initialize parent_rpcs = nil
|
|
@@ -943,6 +1072,8 @@ module Google
|
|
|
943
1072
|
@query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config
|
|
944
1073
|
aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats
|
|
945
1074
|
@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
|
|
946
1077
|
|
|
947
1078
|
yield self if block_given?
|
|
948
1079
|
end
|
|
@@ -325,10 +325,10 @@ module Google
|
|
|
325
325
|
# expression, parentheses must be appropriately used to group the
|
|
326
326
|
# combinations.
|
|
327
327
|
#
|
|
328
|
-
# Example: location="us-east1"
|
|
329
|
-
# Example: container="projects/123" OR container="projects/456"
|
|
330
|
-
# Example: (container="projects/123" OR
|
|
331
|
-
# container="projects/456") AND location="us-east1"
|
|
328
|
+
# Example: `location="us-east1"`
|
|
329
|
+
# Example: `container="projects/123" OR container="projects/456"`
|
|
330
|
+
# Example: `(container="projects/123" OR
|
|
331
|
+
# container="projects/456") AND location="us-east1"`
|
|
332
332
|
# @param group_by [::String]
|
|
333
333
|
# Optional. A field that statistics are grouped by.
|
|
334
334
|
# Valid values are any combination of the following:
|
|
@@ -358,9 +358,10 @@ module Google
|
|
|
358
358
|
# descending order. Add "ASC" after the field name to indicate ascending
|
|
359
359
|
# order. It supports ordering using multiple fields.
|
|
360
360
|
# For example:
|
|
361
|
-
# order_by = "resource_groups_count" sorts response in ascending order
|
|
362
|
-
# order_by = "resource_groups_count DESC" sorts response in descending
|
|
363
|
-
#
|
|
361
|
+
# `order_by = "resource_groups_count"` sorts response in ascending order
|
|
362
|
+
# `order_by = "resource_groups_count DESC"` sorts response in descending
|
|
363
|
+
# order
|
|
364
|
+
# `order_by = "product.type, product.version DESC, location"` orders by type
|
|
364
365
|
# in ascending order, version in descending order and location in ascending
|
|
365
366
|
# order
|
|
366
367
|
# @param page_size [::Integer]
|
|
@@ -493,12 +494,12 @@ module Google
|
|
|
493
494
|
# expression, parentheses must be appropriately used to group the
|
|
494
495
|
# combinations.
|
|
495
496
|
#
|
|
496
|
-
# Example: location="us-east1"
|
|
497
|
-
# Example: container="projects/123" OR container="projects/456"
|
|
498
|
-
# Example: (container="projects/123" OR
|
|
499
|
-
# container="projects/456") AND location="us-east1"
|
|
500
|
-
# Example: full_resource_name=~"test"
|
|
501
|
-
# Example: full_resource_name=~"test.*master"
|
|
497
|
+
# Example: `location="us-east1"`
|
|
498
|
+
# Example: `container="projects/123" OR container="projects/456"`
|
|
499
|
+
# Example: `(container="projects/123" OR
|
|
500
|
+
# container="projects/456") AND location="us-east1"`
|
|
501
|
+
# Example: `full_resource_name=~"test"`
|
|
502
|
+
# Example: `full_resource_name=~"test.*master"`
|
|
502
503
|
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
|
|
503
504
|
# Optional. Groups of signal types that are requested.
|
|
504
505
|
# @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>]
|
|
@@ -539,12 +540,13 @@ module Google
|
|
|
539
540
|
# order. It only supports a single field at a time.
|
|
540
541
|
#
|
|
541
542
|
# For example:
|
|
542
|
-
# order_by = "full_resource_name" sorts response in ascending order
|
|
543
|
-
# order_by = "full_resource_name DESC" sorts response in descending order
|
|
544
|
-
# order_by = "issue_count DESC" sorts response in descending order of
|
|
543
|
+
# `order_by = "full_resource_name"` sorts response in ascending order
|
|
544
|
+
# `order_by = "full_resource_name DESC"` sorts response in descending order
|
|
545
|
+
# `order_by = "issue_count DESC"` sorts response in descending order of
|
|
545
546
|
# count of all issues associated with a resource.
|
|
546
547
|
#
|
|
547
|
-
# More explicitly, order_by = "full_resource_name, product" is not
|
|
548
|
+
# More explicitly, `order_by = "full_resource_name, product"` is not
|
|
549
|
+
# supported.
|
|
548
550
|
# @param page_size [::Integer]
|
|
549
551
|
# Optional. If unspecified, at most 50 resource groups will be returned.
|
|
550
552
|
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
@@ -658,10 +660,10 @@ module Google
|
|
|
658
660
|
# expression, parentheses must be appropriately used to group the
|
|
659
661
|
# combinations.
|
|
660
662
|
#
|
|
661
|
-
# Example: location="us-east1"
|
|
662
|
-
# Example: container="projects/123" OR container="projects/456"
|
|
663
|
-
# Example: (container="projects/123" OR
|
|
664
|
-
# container="projects/456") AND location="us-east1"
|
|
663
|
+
# Example: `location="us-east1"`
|
|
664
|
+
# Example: `container="projects/123" OR container="projects/456"`
|
|
665
|
+
# Example: `(container="projects/123" OR
|
|
666
|
+
# container="projects/456") AND location="us-east1"`
|
|
665
667
|
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
|
|
666
668
|
# Optional. Lists of signal types that are issues.
|
|
667
669
|
# @param baseline_date [::Google::Type::Date, ::Hash]
|
|
@@ -726,6 +728,129 @@ module Google
|
|
|
726
728
|
raise ::Google::Cloud::Error.from_error(e)
|
|
727
729
|
end
|
|
728
730
|
|
|
731
|
+
##
|
|
732
|
+
# QueryIssues provides a list of issues and recommendations
|
|
733
|
+
# that a user has access to and that are within the requested scope.
|
|
734
|
+
#
|
|
735
|
+
# @overload query_issues(request, options = nil)
|
|
736
|
+
# Pass arguments to `query_issues` via a request object, either of type
|
|
737
|
+
# {::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest} or an equivalent Hash.
|
|
738
|
+
#
|
|
739
|
+
# @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest, ::Hash]
|
|
740
|
+
# A request object representing the call parameters. Required. To specify no
|
|
741
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
742
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
743
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
744
|
+
#
|
|
745
|
+
# @overload query_issues(parent: nil, filter: nil, signal_products_filters: nil, order_by: nil, page_size: nil, page_token: nil)
|
|
746
|
+
# Pass arguments to `query_issues` via keyword arguments. Note that at
|
|
747
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
748
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
749
|
+
#
|
|
750
|
+
# @param parent [::String]
|
|
751
|
+
# Required. Parent can be a project, a folder, or an organization. The list
|
|
752
|
+
# is limited to the one attached to resources within the `scope` that a user
|
|
753
|
+
# has access to.
|
|
754
|
+
#
|
|
755
|
+
# The allowed values are:
|
|
756
|
+
#
|
|
757
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
|
758
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
|
759
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
|
760
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
|
761
|
+
# @param filter [::String]
|
|
762
|
+
# Optional.
|
|
763
|
+
# Supported fields are:
|
|
764
|
+
# 'product',
|
|
765
|
+
# `location`,
|
|
766
|
+
# `issue_severity`,
|
|
767
|
+
# 'tags',
|
|
768
|
+
# 'labels',
|
|
769
|
+
# @param signal_products_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalProductsFilters, ::Hash>]
|
|
770
|
+
# Optional. Filters based on signal and product. The filter list will be ORed
|
|
771
|
+
# across pairs and ANDed within a signal and products pair.
|
|
772
|
+
# @param order_by [::String]
|
|
773
|
+
# Optional. Following fields are sortable:
|
|
774
|
+
# SignalType
|
|
775
|
+
# Product
|
|
776
|
+
# Location
|
|
777
|
+
# IssueSeverity
|
|
778
|
+
#
|
|
779
|
+
# The default order is ascending. Add "DESC" after the field name to indicate
|
|
780
|
+
# descending order. Add "ASC" after the field name to indicate ascending
|
|
781
|
+
# order. It only supports a single field at a time.
|
|
782
|
+
# @param page_size [::Integer]
|
|
783
|
+
# Optional. If unspecified, at most 50 issues will be returned.
|
|
784
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
785
|
+
# @param page_token [::String]
|
|
786
|
+
# Optional. A page token, received from a previous `QueryIssues` call.
|
|
787
|
+
# Provide this to retrieve the subsequent page.
|
|
788
|
+
# All parameters except page size should match the parameters used in the
|
|
789
|
+
# call that provided the page token.
|
|
790
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
791
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>]
|
|
792
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
793
|
+
#
|
|
794
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue>]
|
|
795
|
+
#
|
|
796
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
797
|
+
#
|
|
798
|
+
# @example Basic example
|
|
799
|
+
# require "google/cloud/database_center/v1beta"
|
|
800
|
+
#
|
|
801
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
802
|
+
# client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new
|
|
803
|
+
#
|
|
804
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
805
|
+
# request = Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest.new
|
|
806
|
+
#
|
|
807
|
+
# # Call the query_issues method.
|
|
808
|
+
# result = client.query_issues request
|
|
809
|
+
#
|
|
810
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
811
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
812
|
+
# result.each do |item|
|
|
813
|
+
# # Each element is of type ::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceIssue.
|
|
814
|
+
# p item
|
|
815
|
+
# end
|
|
816
|
+
#
|
|
817
|
+
def query_issues request, options = nil
|
|
818
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
819
|
+
|
|
820
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest
|
|
821
|
+
|
|
822
|
+
# Converts hash and nil to an options object
|
|
823
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
824
|
+
|
|
825
|
+
# Customize the options with defaults
|
|
826
|
+
call_metadata = @config.rpcs.query_issues.metadata.to_h
|
|
827
|
+
|
|
828
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
829
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
830
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
831
|
+
gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION,
|
|
832
|
+
transports_version_send: [:rest]
|
|
833
|
+
|
|
834
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
835
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
836
|
+
|
|
837
|
+
options.apply_defaults timeout: @config.rpcs.query_issues.timeout,
|
|
838
|
+
metadata: call_metadata,
|
|
839
|
+
retry_policy: @config.rpcs.query_issues.retry_policy
|
|
840
|
+
|
|
841
|
+
options.apply_defaults timeout: @config.timeout,
|
|
842
|
+
metadata: @config.metadata,
|
|
843
|
+
retry_policy: @config.retry_policy
|
|
844
|
+
|
|
845
|
+
@database_center_stub.query_issues request, options do |result, operation|
|
|
846
|
+
result = ::Gapic::Rest::PagedEnumerable.new @database_center_stub, :query_issues, "resource_issues", request, result, options
|
|
847
|
+
yield result, operation if block_given?
|
|
848
|
+
throw :response, result
|
|
849
|
+
end
|
|
850
|
+
rescue ::Gapic::Rest::Error => e
|
|
851
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
852
|
+
end
|
|
853
|
+
|
|
729
854
|
##
|
|
730
855
|
# Configuration class for the DatabaseCenter REST API.
|
|
731
856
|
#
|
|
@@ -892,6 +1017,11 @@ module Google
|
|
|
892
1017
|
# @return [::Gapic::Config::Method]
|
|
893
1018
|
#
|
|
894
1019
|
attr_reader :aggregate_issue_stats
|
|
1020
|
+
##
|
|
1021
|
+
# RPC-specific configuration for `query_issues`
|
|
1022
|
+
# @return [::Gapic::Config::Method]
|
|
1023
|
+
#
|
|
1024
|
+
attr_reader :query_issues
|
|
895
1025
|
|
|
896
1026
|
# @private
|
|
897
1027
|
def initialize parent_rpcs = nil
|
|
@@ -903,6 +1033,8 @@ module Google
|
|
|
903
1033
|
@query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config
|
|
904
1034
|
aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats
|
|
905
1035
|
@aggregate_issue_stats = ::Gapic::Config::Method.new aggregate_issue_stats_config
|
|
1036
|
+
query_issues_config = parent_rpcs.query_issues if parent_rpcs.respond_to? :query_issues
|
|
1037
|
+
@query_issues = ::Gapic::Config::Method.new query_issues_config
|
|
906
1038
|
|
|
907
1039
|
yield self if block_given?
|
|
908
1040
|
end
|
|
@@ -233,6 +233,46 @@ module Google
|
|
|
233
233
|
end
|
|
234
234
|
end
|
|
235
235
|
|
|
236
|
+
##
|
|
237
|
+
# Baseline implementation for the query_issues REST call
|
|
238
|
+
#
|
|
239
|
+
# @param request_pb [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest]
|
|
240
|
+
# A request object representing the call parameters. Required.
|
|
241
|
+
# @param options [::Gapic::CallOptions]
|
|
242
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
243
|
+
#
|
|
244
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
245
|
+
# @yieldparam result [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse]
|
|
246
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
247
|
+
#
|
|
248
|
+
# @return [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse]
|
|
249
|
+
# A result object deserialized from the server's reply
|
|
250
|
+
def query_issues request_pb, options = nil
|
|
251
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
|
252
|
+
|
|
253
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_query_issues_request request_pb
|
|
254
|
+
query_string_params = if query_string_params.any?
|
|
255
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
|
256
|
+
else
|
|
257
|
+
{}
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
response = @client_stub.make_http_request(
|
|
261
|
+
verb,
|
|
262
|
+
uri: uri,
|
|
263
|
+
body: body || "",
|
|
264
|
+
params: query_string_params,
|
|
265
|
+
method_name: "query_issues",
|
|
266
|
+
options: options
|
|
267
|
+
)
|
|
268
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
|
269
|
+
result = ::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesResponse.decode_json response.body, ignore_unknown_fields: true
|
|
270
|
+
catch :response do
|
|
271
|
+
yield result, operation if block_given?
|
|
272
|
+
result
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
|
|
236
276
|
##
|
|
237
277
|
# @private
|
|
238
278
|
#
|
|
@@ -310,6 +350,26 @@ module Google
|
|
|
310
350
|
)
|
|
311
351
|
transcoder.transcode request_pb
|
|
312
352
|
end
|
|
353
|
+
|
|
354
|
+
##
|
|
355
|
+
# @private
|
|
356
|
+
#
|
|
357
|
+
# GRPC transcoding helper method for the query_issues REST call
|
|
358
|
+
#
|
|
359
|
+
# @param request_pb [::Google::Cloud::DatabaseCenter::V1beta::QueryIssuesRequest]
|
|
360
|
+
# A request object representing the call parameters. Required.
|
|
361
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
|
362
|
+
# Uri, Body, Query string parameters
|
|
363
|
+
def self.transcode_query_issues_request request_pb
|
|
364
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
|
365
|
+
.with_bindings(
|
|
366
|
+
uri_method: :post,
|
|
367
|
+
uri_template: "/v1beta:queryIssues",
|
|
368
|
+
body: "*",
|
|
369
|
+
matches: []
|
|
370
|
+
)
|
|
371
|
+
transcoder.transcode request_pb
|
|
372
|
+
end
|
|
313
373
|
end
|
|
314
374
|
end
|
|
315
375
|
end
|
|
@@ -9,29 +9,8 @@ require 'google/api/field_behavior_pb'
|
|
|
9
9
|
|
|
10
10
|
descriptor_data = "\n7google/cloud/databasecenter/v1beta/machine_config.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x01\n\rMachineConfig\x12\x19\n\x11memory_size_bytes\x18\x02 \x01(\x03\x12\x1d\n\x0bshard_count\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01H\x00\x88\x01\x01\x12\x1c\n\nvcpu_count\x18\x04 \x01(\x01\x42\x03\xe0\x41\x01H\x01\x88\x01\x01\x42\x0e\n\x0c_shard_countB\r\n\x0b_vcpu_countB\x80\x02\n&com.google.cloud.databasecenter.v1betaB\x12MachineConfigProtoP\x01ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\xaa\x02\"Google.Cloud.DatabaseCenter.V1Beta\xca\x02\"Google\\Cloud\\DatabaseCenter\\V1beta\xea\x02%Google::Cloud::DatabaseCenter::V1betab\x06proto3"
|
|
11
11
|
|
|
12
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
-
|
|
14
|
-
begin
|
|
15
|
-
pool.add_serialized_file(descriptor_data)
|
|
16
|
-
rescue TypeError
|
|
17
|
-
# Compatibility code: will be removed in the next major version.
|
|
18
|
-
require 'google/protobuf/descriptor_pb'
|
|
19
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
20
|
-
parsed.clear_dependency
|
|
21
|
-
serialized = parsed.class.encode(parsed)
|
|
22
|
-
file = pool.add_serialized_file(serialized)
|
|
23
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
24
|
-
imports = [
|
|
25
|
-
]
|
|
26
|
-
imports.each do |type_name, expected_filename|
|
|
27
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
28
|
-
if import_file.name != expected_filename
|
|
29
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
33
|
-
warn "This will become an error in the next major version."
|
|
34
|
-
end
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
35
14
|
|
|
36
15
|
module Google
|
|
37
16
|
module Cloud
|
|
@@ -10,33 +10,10 @@ require 'google/type/dayofweek_pb'
|
|
|
10
10
|
require 'google/type/timeofday_pb'
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
descriptor_data = "\n4google/cloud/databasecenter/v1beta/maintenance.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xb7\x01\n\x1bResourceMaintenanceSchedule\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12(\n\x03\x64\x61y\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12=\n\x05phase\x18\x03 \x01(\x0e\x32).google.cloud.databasecenter.v1beta.PhaseB\x03\xe0\x41\x01\"\xa2\x01\n\x1fResourceMaintenanceDenySchedule\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12)\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\"\x85\x02\n\x0fMaintenanceInfo\x12\x62\n\x14maintenance_schedule\x18\x01 \x01(\x0b\x32?.google.cloud.databasecenter.v1beta.ResourceMaintenanceScheduleB\x03\xe0\x41\x01\x12l\n\x1a\x64\x65ny_maintenance_schedules\x18\x02 \x03(\x0b\x32\x43.google.cloud.databasecenter.v1beta.ResourceMaintenanceDenyScheduleB\x03\xe0\x41\x01\x12 \n\x13maintenance_version\x18\x03 \x01(\tB\x03\xe0\x41\
|
|
13
|
+
descriptor_data = "\n4google/cloud/databasecenter/v1beta/maintenance.proto\x12\"google.cloud.databasecenter.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xb7\x01\n\x1bResourceMaintenanceSchedule\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\x12(\n\x03\x64\x61y\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x12=\n\x05phase\x18\x03 \x01(\x0e\x32).google.cloud.databasecenter.v1beta.PhaseB\x03\xe0\x41\x01\"\xa2\x01\n\x1fResourceMaintenanceDenySchedule\x12*\n\nstart_date\x18\x01 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12(\n\x08\x65nd_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12)\n\x04time\x18\x03 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x01\"\x85\x02\n\x0fMaintenanceInfo\x12\x62\n\x14maintenance_schedule\x18\x01 \x01(\x0b\x32?.google.cloud.databasecenter.v1beta.ResourceMaintenanceScheduleB\x03\xe0\x41\x01\x12l\n\x1a\x64\x65ny_maintenance_schedules\x18\x02 \x03(\x0b\x32\x43.google.cloud.databasecenter.v1beta.ResourceMaintenanceDenyScheduleB\x03\xe0\x41\x01\x12 \n\x13maintenance_version\x18\x03 \x01(\tB\x03\xe0\x41\x03*`\n\x05Phase\x12\x15\n\x11PHASE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bPHASE_WEEK1\x10\x01\x12\x0f\n\x0bPHASE_WEEK2\x10\x02\x12\x0f\n\x0bPHASE_WEEK5\x10\x03\x12\r\n\tPHASE_ANY\x10\x04\x42\xfe\x01\n&com.google.cloud.databasecenter.v1betaB\x10MaintenanceProtoP\x01ZNcloud.google.com/go/databasecenter/apiv1beta/databasecenterpb;databasecenterpb\xaa\x02\"Google.Cloud.DatabaseCenter.V1Beta\xca\x02\"Google\\Cloud\\DatabaseCenter\\V1beta\xea\x02%Google::Cloud::DatabaseCenter::V1betab\x06proto3"
|
|
14
14
|
|
|
15
|
-
pool = Google::Protobuf::DescriptorPool.generated_pool
|
|
16
|
-
|
|
17
|
-
begin
|
|
18
|
-
pool.add_serialized_file(descriptor_data)
|
|
19
|
-
rescue TypeError
|
|
20
|
-
# Compatibility code: will be removed in the next major version.
|
|
21
|
-
require 'google/protobuf/descriptor_pb'
|
|
22
|
-
parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
|
|
23
|
-
parsed.clear_dependency
|
|
24
|
-
serialized = parsed.class.encode(parsed)
|
|
25
|
-
file = pool.add_serialized_file(serialized)
|
|
26
|
-
warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
|
|
27
|
-
imports = [
|
|
28
|
-
["google.type.TimeOfDay", "google/type/timeofday.proto"],
|
|
29
|
-
["google.type.Date", "google/type/date.proto"],
|
|
30
|
-
]
|
|
31
|
-
imports.each do |type_name, expected_filename|
|
|
32
|
-
import_file = pool.lookup(type_name).file_descriptor
|
|
33
|
-
if import_file.name != expected_filename
|
|
34
|
-
warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
warn "Each proto file must use a consistent fully-qualified name."
|
|
38
|
-
warn "This will become an error in the next major version."
|
|
39
|
-
end
|
|
15
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
16
|
+
pool.add_serialized_file(descriptor_data)
|
|
40
17
|
|
|
41
18
|
module Google
|
|
42
19
|
module Cloud
|