google-cloud-database_center-v1beta 0.1.0 → 0.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: de3233f2224ddfb6281731bb9fe51f3734e6da10ec55f0cb96d6bf498273da9c
4
- data.tar.gz: bf0d1fbea51105299ed8e5264f00438f4ff8c5a1a31e6da1870d8d2a8d061f8c
3
+ metadata.gz: 9bd386b0b22bfcd792bb13f5e18cd8399dd3beac7a9b16f3a1c90d5b5ecd3ccd
4
+ data.tar.gz: e0fb7dfa58c50173e4e4c61a7b937dec02e1b31e7be632ddbeac0934832246ee
5
5
  SHA512:
6
- metadata.gz: b257026eb166fa429e0342a156c7c3873e247f33ee0abbf1a97dd3fdca1dc35b200e8f2cfdc13e6e7bb9699a7255c000d8a3e65c87432b9196509bd4dda8b588
7
- data.tar.gz: 525718dd3dae724326aa0f49c39f77cf90f7de4cfebde611409943ad675b13cb2cf441ea860c7e8f2ac5843561a300a6d54244442a4270ead4d447613df3bfcc
6
+ metadata.gz: 1686ed75b7f6503ef10e550aaed2d86b5c0e52173ac089862797071fdba62d8302f1d739856809f2c55d517a78ee1477cd2bdf2ab6e0b752aaf6090297e55039
7
+ data.tar.gz: 9cd379f8397c445f95814398101fe0742a1b1b141ccaf9a68a35c5e1ba736220f00de0f373fbd5afe6b0b49f7f9ad931e92d46f8cd717438c29bb53a9d18fe25
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Client for the Database Center V1BETA API
2
2
 
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.
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 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
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 supported.
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.
@@ -621,6 +623,236 @@ module Google
621
623
  raise ::Google::Cloud::Error.from_error(e)
622
624
  end
623
625
 
626
+ ##
627
+ # AggregateIssueStats provides database resource issues statistics.
628
+ #
629
+ # @overload aggregate_issue_stats(request, options = nil)
630
+ # Pass arguments to `aggregate_issue_stats` via a request object, either of type
631
+ # {::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsRequest} or an equivalent Hash.
632
+ #
633
+ # @param request [::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsRequest, ::Hash]
634
+ # A request object representing the call parameters. Required. To specify no
635
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
636
+ # @param options [::Gapic::CallOptions, ::Hash]
637
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
638
+ #
639
+ # @overload aggregate_issue_stats(parent: nil, filter: nil, signal_type_groups: nil, baseline_date: nil)
640
+ # Pass arguments to `aggregate_issue_stats` via keyword arguments. Note that at
641
+ # least one keyword argument is required. To specify no parameters, or to keep all
642
+ # the default parameter values, pass an empty Hash as a request object (see above).
643
+ #
644
+ # @param parent [::String]
645
+ # Required. Parent can be a project, a folder, or an organization. The search
646
+ # is limited to the resources within the `scope`.
647
+ #
648
+ # The allowed values are:
649
+ #
650
+ # * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
651
+ # * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
652
+ # * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
653
+ # * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
654
+ # @param filter [::String]
655
+ # Optional. The expression to filter resources.
656
+ #
657
+ # Supported fields are: `full_resource_name`, `resource_type`, `container`,
658
+ # `product.type`, `product.engine`, `product.version`, `location`,
659
+ # `labels`, `issues`, fields of availability_info,
660
+ # data_protection_info,'resource_name', etc.
661
+ #
662
+ # The expression is a list of zero or more restrictions combined via logical
663
+ # operators `AND` and `OR`. When `AND` and `OR` are both used in the
664
+ # expression, parentheses must be appropriately used to group the
665
+ # combinations.
666
+ #
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"`
671
+ # @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
672
+ # Optional. Lists of signal types that are issues.
673
+ # @param baseline_date [::Google::Type::Date, ::Hash]
674
+ # Optional. The baseline date w.r.t. which the delta counts are calculated.
675
+ # If not set, delta counts are not included in the response and the response
676
+ # indicates the current state of the fleet.
677
+ #
678
+ # @yield [response, operation] Access the result along with the RPC operation
679
+ # @yieldparam response [::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsResponse]
680
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
681
+ #
682
+ # @return [::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsResponse]
683
+ #
684
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
685
+ #
686
+ # @example Basic example
687
+ # require "google/cloud/database_center/v1beta"
688
+ #
689
+ # # Create a client object. The client can be reused for multiple calls.
690
+ # client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Client.new
691
+ #
692
+ # # Create a request. To set request fields, pass in keyword arguments.
693
+ # request = Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsRequest.new
694
+ #
695
+ # # Call the aggregate_issue_stats method.
696
+ # result = client.aggregate_issue_stats request
697
+ #
698
+ # # The returned object is of type Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsResponse.
699
+ # p result
700
+ #
701
+ def aggregate_issue_stats request, options = nil
702
+ raise ::ArgumentError, "request must be provided" if request.nil?
703
+
704
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::AggregateIssueStatsRequest
705
+
706
+ # Converts hash and nil to an options object
707
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
708
+
709
+ # Customize the options with defaults
710
+ metadata = @config.rpcs.aggregate_issue_stats.metadata.to_h
711
+
712
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
713
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
714
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
715
+ gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION
716
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
717
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
718
+
719
+ options.apply_defaults timeout: @config.rpcs.aggregate_issue_stats.timeout,
720
+ metadata: metadata,
721
+ retry_policy: @config.rpcs.aggregate_issue_stats.retry_policy
722
+
723
+ options.apply_defaults timeout: @config.timeout,
724
+ metadata: @config.metadata,
725
+ retry_policy: @config.retry_policy
726
+
727
+ @database_center_stub.call_rpc :aggregate_issue_stats, request, options: options do |response, operation|
728
+ yield response, operation if block_given?
729
+ end
730
+ rescue ::GRPC::BadStatus => e
731
+ raise ::Google::Cloud::Error.from_error(e)
732
+ end
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
+
624
856
  ##
625
857
  # Configuration class for the DatabaseCenter API.
626
858
  #
@@ -819,6 +1051,16 @@ module Google
819
1051
  # @return [::Gapic::Config::Method]
820
1052
  #
821
1053
  attr_reader :query_database_resource_groups
1054
+ ##
1055
+ # RPC-specific configuration for `aggregate_issue_stats`
1056
+ # @return [::Gapic::Config::Method]
1057
+ #
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
822
1064
 
823
1065
  # @private
824
1066
  def initialize parent_rpcs = nil
@@ -828,6 +1070,10 @@ module Google
828
1070
  @aggregate_fleet = ::Gapic::Config::Method.new aggregate_fleet_config
829
1071
  query_database_resource_groups_config = parent_rpcs.query_database_resource_groups if parent_rpcs.respond_to? :query_database_resource_groups
830
1072
  @query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config
1073
+ aggregate_issue_stats_config = parent_rpcs.aggregate_issue_stats if parent_rpcs.respond_to? :aggregate_issue_stats
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
831
1077
 
832
1078
  yield self if block_given?
833
1079
  end