google-cloud-database_center-v1beta 0.a → 0.1.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/.yardopts +12 -0
- data/AUTHENTICATION.md +122 -0
- data/README.md +154 -8
- data/lib/google/cloud/database_center/v1beta/database_center/client.rb +841 -0
- data/lib/google/cloud/database_center/v1beta/database_center/credentials.rb +47 -0
- data/lib/google/cloud/database_center/v1beta/database_center/rest/client.rb +801 -0
- data/lib/google/cloud/database_center/v1beta/database_center/rest/service_stub.rb +259 -0
- data/lib/google/cloud/database_center/v1beta/database_center/rest.rb +51 -0
- data/lib/google/cloud/database_center/v1beta/database_center.rb +54 -0
- data/lib/google/cloud/database_center/v1beta/rest.rb +37 -0
- data/lib/google/cloud/database_center/v1beta/version.rb +8 -3
- data/lib/google/cloud/database_center/v1beta.rb +45 -0
- data/lib/google/cloud/databasecenter/v1beta/machine_config_pb.rb +44 -0
- data/lib/google/cloud/databasecenter/v1beta/maintenance_pb.rb +52 -0
- data/lib/google/cloud/databasecenter/v1beta/metric_data_pb.rb +47 -0
- data/lib/google/cloud/databasecenter/v1beta/operation_error_type_pb.rb +42 -0
- data/lib/google/cloud/databasecenter/v1beta/product_pb.rb +46 -0
- data/lib/google/cloud/databasecenter/v1beta/service_pb.rb +76 -0
- data/lib/google/cloud/databasecenter/v1beta/service_services_pb.rb +51 -0
- data/lib/google/cloud/databasecenter/v1beta/signals_pb.rb +78 -0
- data/lib/google/cloud/databasecenter/v1beta/suspension_reason_pb.rb +42 -0
- data/lib/google-cloud-database_center-v1beta.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +473 -0
- data/proto_docs/google/api/field_behavior.rb +85 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +227 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/machine_config.rb +43 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/maintenance.rb +105 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/metric_data.rb +92 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/operation_error_type.rb +53 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/product.rb +132 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/service.rb +706 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/signals.rb +848 -0
- data/proto_docs/google/cloud/databasecenter/v1beta/suspension_reason.rb +50 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/timestamp.rb +127 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/type/date.rb +53 -0
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/timeofday.rb +45 -0
- metadata +82 -9
|
@@ -0,0 +1,801 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/errors"
|
|
20
|
+
require "google/cloud/databasecenter/v1beta/service_pb"
|
|
21
|
+
require "google/cloud/database_center/v1beta/database_center/rest/service_stub"
|
|
22
|
+
|
|
23
|
+
module Google
|
|
24
|
+
module Cloud
|
|
25
|
+
module DatabaseCenter
|
|
26
|
+
module V1beta
|
|
27
|
+
module DatabaseCenter
|
|
28
|
+
module Rest
|
|
29
|
+
##
|
|
30
|
+
# REST client for the DatabaseCenter service.
|
|
31
|
+
#
|
|
32
|
+
# DatabaseCenter contains methods to query fleet view for database resources.
|
|
33
|
+
#
|
|
34
|
+
class Client
|
|
35
|
+
# @private
|
|
36
|
+
API_VERSION = ""
|
|
37
|
+
|
|
38
|
+
# @private
|
|
39
|
+
DEFAULT_ENDPOINT_TEMPLATE = "databasecenter.$UNIVERSE_DOMAIN$"
|
|
40
|
+
|
|
41
|
+
# @private
|
|
42
|
+
attr_reader :database_center_stub
|
|
43
|
+
|
|
44
|
+
##
|
|
45
|
+
# Configure the DatabaseCenter Client class.
|
|
46
|
+
#
|
|
47
|
+
# See {::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client::Configuration}
|
|
48
|
+
# for a description of the configuration fields.
|
|
49
|
+
#
|
|
50
|
+
# @example
|
|
51
|
+
#
|
|
52
|
+
# # Modify the configuration for all DatabaseCenter clients
|
|
53
|
+
# ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.configure do |config|
|
|
54
|
+
# config.timeout = 10.0
|
|
55
|
+
# end
|
|
56
|
+
#
|
|
57
|
+
# @yield [config] Configure the Client client.
|
|
58
|
+
# @yieldparam config [Client::Configuration]
|
|
59
|
+
#
|
|
60
|
+
# @return [Client::Configuration]
|
|
61
|
+
#
|
|
62
|
+
def self.configure
|
|
63
|
+
@configure ||= begin
|
|
64
|
+
namespace = ["Google", "Cloud", "DatabaseCenter", "V1beta"]
|
|
65
|
+
parent_config = while namespace.any?
|
|
66
|
+
parent_name = namespace.join "::"
|
|
67
|
+
parent_const = const_get parent_name
|
|
68
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
69
|
+
namespace.pop
|
|
70
|
+
end
|
|
71
|
+
default_config = Client::Configuration.new parent_config
|
|
72
|
+
|
|
73
|
+
default_config
|
|
74
|
+
end
|
|
75
|
+
yield @configure if block_given?
|
|
76
|
+
@configure
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
##
|
|
80
|
+
# Configure the DatabaseCenter Client instance.
|
|
81
|
+
#
|
|
82
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
83
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
84
|
+
# should be made on {Client.configure}.
|
|
85
|
+
#
|
|
86
|
+
# See {::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client::Configuration}
|
|
87
|
+
# for a description of the configuration fields.
|
|
88
|
+
#
|
|
89
|
+
# @yield [config] Configure the Client client.
|
|
90
|
+
# @yieldparam config [Client::Configuration]
|
|
91
|
+
#
|
|
92
|
+
# @return [Client::Configuration]
|
|
93
|
+
#
|
|
94
|
+
def configure
|
|
95
|
+
yield @config if block_given?
|
|
96
|
+
@config
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
##
|
|
100
|
+
# The effective universe domain
|
|
101
|
+
#
|
|
102
|
+
# @return [String]
|
|
103
|
+
#
|
|
104
|
+
def universe_domain
|
|
105
|
+
@database_center_stub.universe_domain
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
##
|
|
109
|
+
# Create a new DatabaseCenter REST client object.
|
|
110
|
+
#
|
|
111
|
+
# @example
|
|
112
|
+
#
|
|
113
|
+
# # Create a client using the default configuration
|
|
114
|
+
# client = ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new
|
|
115
|
+
#
|
|
116
|
+
# # Create a client using a custom configuration
|
|
117
|
+
# client = ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new do |config|
|
|
118
|
+
# config.timeout = 10.0
|
|
119
|
+
# end
|
|
120
|
+
#
|
|
121
|
+
# @yield [config] Configure the DatabaseCenter client.
|
|
122
|
+
# @yieldparam config [Client::Configuration]
|
|
123
|
+
#
|
|
124
|
+
def initialize
|
|
125
|
+
# Create the configuration object
|
|
126
|
+
@config = Configuration.new Client.configure
|
|
127
|
+
|
|
128
|
+
# Yield the configuration if needed
|
|
129
|
+
yield @config if block_given?
|
|
130
|
+
|
|
131
|
+
# Create credentials
|
|
132
|
+
credentials = @config.credentials
|
|
133
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
134
|
+
# but only if the default endpoint does not have a region prefix.
|
|
135
|
+
enable_self_signed_jwt = @config.endpoint.nil? ||
|
|
136
|
+
(@config.endpoint == Configuration::DEFAULT_ENDPOINT &&
|
|
137
|
+
!@config.endpoint.split(".").first.include?("-"))
|
|
138
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
139
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
140
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
141
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
@quota_project_id = @config.quota_project
|
|
145
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
146
|
+
|
|
147
|
+
@database_center_stub = ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::ServiceStub.new(
|
|
148
|
+
endpoint: @config.endpoint,
|
|
149
|
+
endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
|
|
150
|
+
universe_domain: @config.universe_domain,
|
|
151
|
+
credentials: credentials,
|
|
152
|
+
logger: @config.logger
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
@database_center_stub.logger(stub: true)&.info do |entry|
|
|
156
|
+
entry.set_system_name
|
|
157
|
+
entry.set_service
|
|
158
|
+
entry.message = "Created client for #{entry.service}"
|
|
159
|
+
entry.set_credentials_fields credentials
|
|
160
|
+
entry.set "customEndpoint", @config.endpoint if @config.endpoint
|
|
161
|
+
entry.set "defaultTimeout", @config.timeout if @config.timeout
|
|
162
|
+
entry.set "quotaProject", @quota_project_id if @quota_project_id
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
##
|
|
167
|
+
# The logger used for request/response debug logging.
|
|
168
|
+
#
|
|
169
|
+
# @return [Logger]
|
|
170
|
+
#
|
|
171
|
+
def logger
|
|
172
|
+
@database_center_stub.logger
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Service calls
|
|
176
|
+
|
|
177
|
+
##
|
|
178
|
+
# QueryProducts provides a list of all possible products which can be used to
|
|
179
|
+
# filter database resources.
|
|
180
|
+
#
|
|
181
|
+
# @overload query_products(request, options = nil)
|
|
182
|
+
# Pass arguments to `query_products` via a request object, either of type
|
|
183
|
+
# {::Google::Cloud::DatabaseCenter::V1beta::QueryProductsRequest} or an equivalent Hash.
|
|
184
|
+
#
|
|
185
|
+
# @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryProductsRequest, ::Hash]
|
|
186
|
+
# A request object representing the call parameters. Required. To specify no
|
|
187
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
188
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
189
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
190
|
+
#
|
|
191
|
+
# @overload query_products(parent: nil, page_size: nil, page_token: nil)
|
|
192
|
+
# Pass arguments to `query_products` via keyword arguments. Note that at
|
|
193
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
194
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
195
|
+
#
|
|
196
|
+
# @param parent [::String]
|
|
197
|
+
# Required. Parent can be a project, a folder, or an organization.
|
|
198
|
+
#
|
|
199
|
+
# The allowed values are:
|
|
200
|
+
#
|
|
201
|
+
# * projects/\\{PROJECT_ID}/locations/\\{LOCATION}
|
|
202
|
+
# (e.g.,"projects/foo-bar/locations/us-central1")
|
|
203
|
+
# * projects/\\{PROJECT_NUMBER}/locations/\\{LOCATION}
|
|
204
|
+
# (e.g.,"projects/12345678/locations/us-central1")
|
|
205
|
+
# * folders/\\{FOLDER_NUMBER}/locations/\\{LOCATION}
|
|
206
|
+
# (e.g.,"folders/1234567/locations/us-central1")
|
|
207
|
+
# * organizations/\\{ORGANIZATION_NUMBER}/locations/\\{LOCATION}
|
|
208
|
+
# (e.g.,"organizations/123456/locations/us-central1")
|
|
209
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
|
210
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
|
211
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
|
212
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
|
213
|
+
# @param page_size [::Integer]
|
|
214
|
+
# Optional. If unspecified, at most 50 products will be returned.
|
|
215
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
216
|
+
# @param page_token [::String]
|
|
217
|
+
# Optional. A page token, received from a previous `ListLocations` call.
|
|
218
|
+
# Provide this to retrieve the subsequent page.
|
|
219
|
+
# All other parameters except page size should match the call that provided
|
|
220
|
+
# the page page token.
|
|
221
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
222
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::Product>]
|
|
223
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
224
|
+
#
|
|
225
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::Product>]
|
|
226
|
+
#
|
|
227
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
228
|
+
#
|
|
229
|
+
# @example Basic example
|
|
230
|
+
# require "google/cloud/database_center/v1beta"
|
|
231
|
+
#
|
|
232
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
233
|
+
# client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new
|
|
234
|
+
#
|
|
235
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
236
|
+
# request = Google::Cloud::DatabaseCenter::V1beta::QueryProductsRequest.new
|
|
237
|
+
#
|
|
238
|
+
# # Call the query_products method.
|
|
239
|
+
# result = client.query_products request
|
|
240
|
+
#
|
|
241
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
242
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
243
|
+
# result.each do |item|
|
|
244
|
+
# # Each element is of type ::Google::Cloud::DatabaseCenter::V1beta::Product.
|
|
245
|
+
# p item
|
|
246
|
+
# end
|
|
247
|
+
#
|
|
248
|
+
def query_products request, options = nil
|
|
249
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
250
|
+
|
|
251
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryProductsRequest
|
|
252
|
+
|
|
253
|
+
# Converts hash and nil to an options object
|
|
254
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
255
|
+
|
|
256
|
+
# Customize the options with defaults
|
|
257
|
+
call_metadata = @config.rpcs.query_products.metadata.to_h
|
|
258
|
+
|
|
259
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
260
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
261
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
262
|
+
gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION,
|
|
263
|
+
transports_version_send: [:rest]
|
|
264
|
+
|
|
265
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
266
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
267
|
+
|
|
268
|
+
options.apply_defaults timeout: @config.rpcs.query_products.timeout,
|
|
269
|
+
metadata: call_metadata,
|
|
270
|
+
retry_policy: @config.rpcs.query_products.retry_policy
|
|
271
|
+
|
|
272
|
+
options.apply_defaults timeout: @config.timeout,
|
|
273
|
+
metadata: @config.metadata,
|
|
274
|
+
retry_policy: @config.retry_policy
|
|
275
|
+
|
|
276
|
+
@database_center_stub.query_products request, options do |result, operation|
|
|
277
|
+
result = ::Gapic::Rest::PagedEnumerable.new @database_center_stub, :query_products, "products", request, result, options
|
|
278
|
+
yield result, operation if block_given?
|
|
279
|
+
throw :response, result
|
|
280
|
+
end
|
|
281
|
+
rescue ::Gapic::Rest::Error => e
|
|
282
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
##
|
|
286
|
+
# AggregateFleet provides statistics about the fleet grouped by various
|
|
287
|
+
# fields.
|
|
288
|
+
#
|
|
289
|
+
# @overload aggregate_fleet(request, options = nil)
|
|
290
|
+
# Pass arguments to `aggregate_fleet` via a request object, either of type
|
|
291
|
+
# {::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRequest} or an equivalent Hash.
|
|
292
|
+
#
|
|
293
|
+
# @param request [::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRequest, ::Hash]
|
|
294
|
+
# A request object representing the call parameters. Required. To specify no
|
|
295
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
296
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
297
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
298
|
+
#
|
|
299
|
+
# @overload aggregate_fleet(parent: nil, filter: nil, group_by: nil, order_by: nil, page_size: nil, page_token: nil, baseline_date: nil)
|
|
300
|
+
# Pass arguments to `aggregate_fleet` via keyword arguments. Note that at
|
|
301
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
302
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
303
|
+
#
|
|
304
|
+
# @param parent [::String]
|
|
305
|
+
# Required. Parent can be a project, a folder, or an organization. The search
|
|
306
|
+
# is limited to the resources within the `scope`.
|
|
307
|
+
#
|
|
308
|
+
# The allowed values are:
|
|
309
|
+
#
|
|
310
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
|
311
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
|
312
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
|
313
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g.,
|
|
314
|
+
# "organizations/123456")
|
|
315
|
+
# @param filter [::String]
|
|
316
|
+
# Optional. The expression to filter resources.
|
|
317
|
+
#
|
|
318
|
+
# Supported fields are: `full_resource_name`, `resource_type`, `container`,
|
|
319
|
+
# `product.type`, `product.engine`, `product.version`, `location`,
|
|
320
|
+
# `labels`, `issues`, fields of availability_info, data_protection_info,
|
|
321
|
+
# 'resource_name', etc.
|
|
322
|
+
#
|
|
323
|
+
# The expression is a list of zero or more restrictions combined via logical
|
|
324
|
+
# operators `AND` and `OR`. When `AND` and `OR` are both used in the
|
|
325
|
+
# expression, parentheses must be appropriately used to group the
|
|
326
|
+
# combinations.
|
|
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"
|
|
332
|
+
# @param group_by [::String]
|
|
333
|
+
# Optional. A field that statistics are grouped by.
|
|
334
|
+
# Valid values are any combination of the following:
|
|
335
|
+
# * container
|
|
336
|
+
# * product.type
|
|
337
|
+
# * product.engine
|
|
338
|
+
# * product.version
|
|
339
|
+
# * location
|
|
340
|
+
# * sub_resource_type
|
|
341
|
+
# * management_type
|
|
342
|
+
# * tag.key
|
|
343
|
+
# * tag.value
|
|
344
|
+
# * tag.source
|
|
345
|
+
# * tag.inherited
|
|
346
|
+
# * label.key
|
|
347
|
+
# * label.value
|
|
348
|
+
# * label.source
|
|
349
|
+
# * has_maintenance_schedule
|
|
350
|
+
# * has_deny_maintenance_schedules
|
|
351
|
+
# Comma separated list.
|
|
352
|
+
# @param order_by [::String]
|
|
353
|
+
# Optional. Valid values to order by are:
|
|
354
|
+
# * resource_groups_count
|
|
355
|
+
# * resources_count
|
|
356
|
+
# * and all fields supported by `group_by`
|
|
357
|
+
# The default order is ascending. Add "DESC" after the field name to indicate
|
|
358
|
+
# descending order. Add "ASC" after the field name to indicate ascending
|
|
359
|
+
# order. It supports ordering using multiple fields.
|
|
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 order
|
|
363
|
+
# order_by = "product.type, product.version DESC, location" orders by type
|
|
364
|
+
# in ascending order, version in descending order and location in ascending
|
|
365
|
+
# order
|
|
366
|
+
# @param page_size [::Integer]
|
|
367
|
+
# Optional. If unspecified, at most 50 items will be returned.
|
|
368
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
369
|
+
# @param page_token [::String]
|
|
370
|
+
# Optional. A page token, received from a previous `AggregateFleet` call.
|
|
371
|
+
# Provide this to retrieve the subsequent page.
|
|
372
|
+
# All other parameters should match the parameters in the call that provided
|
|
373
|
+
# the page token except for page_size which can be different.
|
|
374
|
+
# @param baseline_date [::Google::Type::Date, ::Hash]
|
|
375
|
+
# Optional. The baseline date w.r.t. which the delta counts are calculated.
|
|
376
|
+
# If not set, delta counts are not included in the response and the response
|
|
377
|
+
# indicates the current state of the fleet.
|
|
378
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
379
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRow>]
|
|
380
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
381
|
+
#
|
|
382
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRow>]
|
|
383
|
+
#
|
|
384
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
385
|
+
#
|
|
386
|
+
# @example Basic example
|
|
387
|
+
# require "google/cloud/database_center/v1beta"
|
|
388
|
+
#
|
|
389
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
390
|
+
# client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new
|
|
391
|
+
#
|
|
392
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
393
|
+
# request = Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRequest.new
|
|
394
|
+
#
|
|
395
|
+
# # Call the aggregate_fleet method.
|
|
396
|
+
# result = client.aggregate_fleet request
|
|
397
|
+
#
|
|
398
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
399
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
400
|
+
# result.each do |item|
|
|
401
|
+
# # Each element is of type ::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRow.
|
|
402
|
+
# p item
|
|
403
|
+
# end
|
|
404
|
+
#
|
|
405
|
+
def aggregate_fleet request, options = nil
|
|
406
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
407
|
+
|
|
408
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::AggregateFleetRequest
|
|
409
|
+
|
|
410
|
+
# Converts hash and nil to an options object
|
|
411
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
412
|
+
|
|
413
|
+
# Customize the options with defaults
|
|
414
|
+
call_metadata = @config.rpcs.aggregate_fleet.metadata.to_h
|
|
415
|
+
|
|
416
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
417
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
418
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
419
|
+
gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION,
|
|
420
|
+
transports_version_send: [:rest]
|
|
421
|
+
|
|
422
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
423
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
424
|
+
|
|
425
|
+
options.apply_defaults timeout: @config.rpcs.aggregate_fleet.timeout,
|
|
426
|
+
metadata: call_metadata,
|
|
427
|
+
retry_policy: @config.rpcs.aggregate_fleet.retry_policy
|
|
428
|
+
|
|
429
|
+
options.apply_defaults timeout: @config.timeout,
|
|
430
|
+
metadata: @config.metadata,
|
|
431
|
+
retry_policy: @config.retry_policy
|
|
432
|
+
|
|
433
|
+
@database_center_stub.aggregate_fleet request, options do |result, operation|
|
|
434
|
+
result = ::Gapic::Rest::PagedEnumerable.new @database_center_stub, :aggregate_fleet, "rows", request, result, options
|
|
435
|
+
yield result, operation if block_given?
|
|
436
|
+
throw :response, result
|
|
437
|
+
end
|
|
438
|
+
rescue ::Gapic::Rest::Error => e
|
|
439
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
440
|
+
end
|
|
441
|
+
|
|
442
|
+
##
|
|
443
|
+
# QueryDatabaseResourceGroups returns paginated results of database groups.
|
|
444
|
+
#
|
|
445
|
+
# @overload query_database_resource_groups(request, options = nil)
|
|
446
|
+
# Pass arguments to `query_database_resource_groups` via a request object, either of type
|
|
447
|
+
# {::Google::Cloud::DatabaseCenter::V1beta::QueryDatabaseResourceGroupsRequest} or an equivalent Hash.
|
|
448
|
+
#
|
|
449
|
+
# @param request [::Google::Cloud::DatabaseCenter::V1beta::QueryDatabaseResourceGroupsRequest, ::Hash]
|
|
450
|
+
# A request object representing the call parameters. Required. To specify no
|
|
451
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
452
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
453
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
454
|
+
#
|
|
455
|
+
# @overload query_database_resource_groups(parent: nil, filter: nil, signal_type_groups: nil, signal_filters: nil, order_by: nil, page_size: nil, page_token: nil)
|
|
456
|
+
# Pass arguments to `query_database_resource_groups` via keyword arguments. Note that at
|
|
457
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
458
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
459
|
+
#
|
|
460
|
+
# @param parent [::String]
|
|
461
|
+
# Required. Parent can be a project, a folder, or an organization. The search
|
|
462
|
+
# is limited to the resources within the `scope`.
|
|
463
|
+
#
|
|
464
|
+
# The allowed values are:
|
|
465
|
+
#
|
|
466
|
+
# * projects/\\{PROJECT_ID} (e.g., "projects/foo-bar")
|
|
467
|
+
# * projects/\\{PROJECT_NUMBER} (e.g., "projects/12345678")
|
|
468
|
+
# * folders/\\{FOLDER_NUMBER} (e.g., "folders/1234567")
|
|
469
|
+
# * organizations/\\{ORGANIZATION_NUMBER} (e.g., "organizations/123456")
|
|
470
|
+
# @param filter [::String]
|
|
471
|
+
# Optional. The expression to filter resources.
|
|
472
|
+
#
|
|
473
|
+
# The following fields are filterable:
|
|
474
|
+
# * full_resource_name
|
|
475
|
+
# * resource_type
|
|
476
|
+
# * container
|
|
477
|
+
# * product.type
|
|
478
|
+
# * product.engine
|
|
479
|
+
# * product.version
|
|
480
|
+
# * location
|
|
481
|
+
# * labels
|
|
482
|
+
# * resource_category
|
|
483
|
+
# * machine_config.cpu_count
|
|
484
|
+
# * machine_config.memory_size_bytes
|
|
485
|
+
# * machine_config.shard_count
|
|
486
|
+
# * resource_name
|
|
487
|
+
# * tags
|
|
488
|
+
# * backupdr_config.backupdr_managed
|
|
489
|
+
# * edition
|
|
490
|
+
#
|
|
491
|
+
# The expression is a list of zero or more restrictions combined via logical
|
|
492
|
+
# operators `AND` and `OR`. When `AND` and `OR` are both used in the
|
|
493
|
+
# expression, parentheses must be appropriately used to group the
|
|
494
|
+
# combinations.
|
|
495
|
+
#
|
|
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"
|
|
502
|
+
# @param signal_type_groups [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalTypeGroup, ::Hash>]
|
|
503
|
+
# Optional. Groups of signal types that are requested.
|
|
504
|
+
# @param signal_filters [::Array<::Google::Cloud::DatabaseCenter::V1beta::SignalFilter, ::Hash>]
|
|
505
|
+
# Optional. Filters based on signals. The list will be ORed together and then
|
|
506
|
+
# ANDed with the `filters` field above.
|
|
507
|
+
# @param order_by [::String]
|
|
508
|
+
# Optional. A field that specifies the sort order of the results.
|
|
509
|
+
#
|
|
510
|
+
# The following fields are sortable:
|
|
511
|
+
# * full_resource_name
|
|
512
|
+
# * product.type
|
|
513
|
+
# * product.engine
|
|
514
|
+
# * product.version
|
|
515
|
+
# * container
|
|
516
|
+
# * issue_count
|
|
517
|
+
# * machine_config.vcpu_count
|
|
518
|
+
# * machine_config.memory_size_bytes
|
|
519
|
+
# * machine_config.shard_count
|
|
520
|
+
# * resource_name
|
|
521
|
+
# * issue_severity
|
|
522
|
+
# * signal_type
|
|
523
|
+
# * location
|
|
524
|
+
# * resource_type
|
|
525
|
+
# * instance_type
|
|
526
|
+
# * edition
|
|
527
|
+
# * metrics.p99_cpu_utilization
|
|
528
|
+
# * metrics.p95_cpu_utilization
|
|
529
|
+
# * metrics.current_storage_used_bytes
|
|
530
|
+
# * metrics.node_count
|
|
531
|
+
# * metrics.processing_unit_count
|
|
532
|
+
# * metrics.current_memory_used_bytes
|
|
533
|
+
# * metrics.peak_storage_utilization
|
|
534
|
+
# * metrics.peak_number_connections
|
|
535
|
+
# * metrics.peak_memory_utilization
|
|
536
|
+
#
|
|
537
|
+
# The default order is ascending. Add "DESC" after the field name to indicate
|
|
538
|
+
# descending order. Add "ASC" after the field name to indicate ascending
|
|
539
|
+
# order. It only supports a single field at a time.
|
|
540
|
+
#
|
|
541
|
+
# 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
|
|
545
|
+
# count of all issues associated with a resource.
|
|
546
|
+
#
|
|
547
|
+
# More explicitly, order_by = "full_resource_name, product" is not supported.
|
|
548
|
+
# @param page_size [::Integer]
|
|
549
|
+
# Optional. If unspecified, at most 50 resource groups will be returned.
|
|
550
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
551
|
+
# @param page_token [::String]
|
|
552
|
+
# Optional. A page token, received from a previous
|
|
553
|
+
# `QueryDatabaseResourceGroupsRequest` call. Provide this to retrieve the
|
|
554
|
+
# subsequent page. All parameters except page_token should match the
|
|
555
|
+
# parameters in the call that provided the page page token.
|
|
556
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
557
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceGroup>]
|
|
558
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
559
|
+
#
|
|
560
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceGroup>]
|
|
561
|
+
#
|
|
562
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
563
|
+
#
|
|
564
|
+
# @example Basic example
|
|
565
|
+
# require "google/cloud/database_center/v1beta"
|
|
566
|
+
#
|
|
567
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
568
|
+
# client = Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new
|
|
569
|
+
#
|
|
570
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
571
|
+
# request = Google::Cloud::DatabaseCenter::V1beta::QueryDatabaseResourceGroupsRequest.new
|
|
572
|
+
#
|
|
573
|
+
# # Call the query_database_resource_groups method.
|
|
574
|
+
# result = client.query_database_resource_groups request
|
|
575
|
+
#
|
|
576
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
577
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
578
|
+
# result.each do |item|
|
|
579
|
+
# # Each element is of type ::Google::Cloud::DatabaseCenter::V1beta::DatabaseResourceGroup.
|
|
580
|
+
# p item
|
|
581
|
+
# end
|
|
582
|
+
#
|
|
583
|
+
def query_database_resource_groups request, options = nil
|
|
584
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
585
|
+
|
|
586
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DatabaseCenter::V1beta::QueryDatabaseResourceGroupsRequest
|
|
587
|
+
|
|
588
|
+
# Converts hash and nil to an options object
|
|
589
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
590
|
+
|
|
591
|
+
# Customize the options with defaults
|
|
592
|
+
call_metadata = @config.rpcs.query_database_resource_groups.metadata.to_h
|
|
593
|
+
|
|
594
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
595
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
596
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
597
|
+
gapic_version: ::Google::Cloud::DatabaseCenter::V1beta::VERSION,
|
|
598
|
+
transports_version_send: [:rest]
|
|
599
|
+
|
|
600
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
601
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
602
|
+
|
|
603
|
+
options.apply_defaults timeout: @config.rpcs.query_database_resource_groups.timeout,
|
|
604
|
+
metadata: call_metadata,
|
|
605
|
+
retry_policy: @config.rpcs.query_database_resource_groups.retry_policy
|
|
606
|
+
|
|
607
|
+
options.apply_defaults timeout: @config.timeout,
|
|
608
|
+
metadata: @config.metadata,
|
|
609
|
+
retry_policy: @config.retry_policy
|
|
610
|
+
|
|
611
|
+
@database_center_stub.query_database_resource_groups request, options do |result, operation|
|
|
612
|
+
result = ::Gapic::Rest::PagedEnumerable.new @database_center_stub, :query_database_resource_groups, "resource_groups", request, result, options
|
|
613
|
+
yield result, operation if block_given?
|
|
614
|
+
throw :response, result
|
|
615
|
+
end
|
|
616
|
+
rescue ::Gapic::Rest::Error => e
|
|
617
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
618
|
+
end
|
|
619
|
+
|
|
620
|
+
##
|
|
621
|
+
# Configuration class for the DatabaseCenter REST API.
|
|
622
|
+
#
|
|
623
|
+
# This class represents the configuration for DatabaseCenter REST,
|
|
624
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
625
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
626
|
+
# applied individually to specific RPCs. See
|
|
627
|
+
# {::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client::Configuration::Rpcs}
|
|
628
|
+
# for a list of RPCs that can be configured independently.
|
|
629
|
+
#
|
|
630
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
631
|
+
# on construction.
|
|
632
|
+
#
|
|
633
|
+
# @example
|
|
634
|
+
#
|
|
635
|
+
# # Modify the global config, setting the timeout for
|
|
636
|
+
# # query_products to 20 seconds,
|
|
637
|
+
# # and all remaining timeouts to 10 seconds.
|
|
638
|
+
# ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.configure do |config|
|
|
639
|
+
# config.timeout = 10.0
|
|
640
|
+
# config.rpcs.query_products.timeout = 20.0
|
|
641
|
+
# end
|
|
642
|
+
#
|
|
643
|
+
# # Apply the above configuration only to a new client.
|
|
644
|
+
# client = ::Google::Cloud::DatabaseCenter::V1beta::DatabaseCenter::Rest::Client.new do |config|
|
|
645
|
+
# config.timeout = 10.0
|
|
646
|
+
# config.rpcs.query_products.timeout = 20.0
|
|
647
|
+
# end
|
|
648
|
+
#
|
|
649
|
+
# @!attribute [rw] endpoint
|
|
650
|
+
# A custom service endpoint, as a hostname or hostname:port. The default is
|
|
651
|
+
# nil, indicating to use the default endpoint in the current universe domain.
|
|
652
|
+
# @return [::String,nil]
|
|
653
|
+
# @!attribute [rw] credentials
|
|
654
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
655
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
656
|
+
# * (`Hash`) A service account key as a Hash
|
|
657
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
658
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
659
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
660
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
|
661
|
+
# * (`nil`) indicating no credentials
|
|
662
|
+
#
|
|
663
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
664
|
+
# external source for authentication to Google Cloud, you must validate it before
|
|
665
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
|
666
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
|
667
|
+
# For more information, refer to [Validate credential configurations from external
|
|
668
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
|
669
|
+
# @return [::Object]
|
|
670
|
+
# @!attribute [rw] scope
|
|
671
|
+
# The OAuth scopes
|
|
672
|
+
# @return [::Array<::String>]
|
|
673
|
+
# @!attribute [rw] lib_name
|
|
674
|
+
# The library name as recorded in instrumentation and logging
|
|
675
|
+
# @return [::String]
|
|
676
|
+
# @!attribute [rw] lib_version
|
|
677
|
+
# The library version as recorded in instrumentation and logging
|
|
678
|
+
# @return [::String]
|
|
679
|
+
# @!attribute [rw] timeout
|
|
680
|
+
# The call timeout in seconds.
|
|
681
|
+
# @return [::Numeric]
|
|
682
|
+
# @!attribute [rw] metadata
|
|
683
|
+
# Additional headers to be sent with the call.
|
|
684
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
685
|
+
# @!attribute [rw] retry_policy
|
|
686
|
+
# The retry policy. The value is a hash with the following keys:
|
|
687
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
688
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
689
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
690
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
691
|
+
# trigger a retry.
|
|
692
|
+
# @return [::Hash]
|
|
693
|
+
# @!attribute [rw] quota_project
|
|
694
|
+
# A separate project against which to charge quota.
|
|
695
|
+
# @return [::String]
|
|
696
|
+
# @!attribute [rw] universe_domain
|
|
697
|
+
# The universe domain within which to make requests. This determines the
|
|
698
|
+
# default endpoint URL. The default value of nil uses the environment
|
|
699
|
+
# universe (usually the default "googleapis.com" universe).
|
|
700
|
+
# @return [::String,nil]
|
|
701
|
+
# @!attribute [rw] logger
|
|
702
|
+
# A custom logger to use for request/response debug logging, or the value
|
|
703
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
|
704
|
+
# explicitly disable logging.
|
|
705
|
+
# @return [::Logger,:default,nil]
|
|
706
|
+
#
|
|
707
|
+
class Configuration
|
|
708
|
+
extend ::Gapic::Config
|
|
709
|
+
|
|
710
|
+
# @private
|
|
711
|
+
# The endpoint specific to the default "googleapis.com" universe. Deprecated.
|
|
712
|
+
DEFAULT_ENDPOINT = "databasecenter.googleapis.com"
|
|
713
|
+
|
|
714
|
+
config_attr :endpoint, nil, ::String, nil
|
|
715
|
+
config_attr :credentials, nil do |value|
|
|
716
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil]
|
|
717
|
+
allowed.any? { |klass| klass === value }
|
|
718
|
+
end
|
|
719
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
720
|
+
config_attr :lib_name, nil, ::String, nil
|
|
721
|
+
config_attr :lib_version, nil, ::String, nil
|
|
722
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
723
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
724
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
725
|
+
config_attr :quota_project, nil, ::String, nil
|
|
726
|
+
config_attr :universe_domain, nil, ::String, nil
|
|
727
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
|
728
|
+
|
|
729
|
+
# @private
|
|
730
|
+
def initialize parent_config = nil
|
|
731
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
732
|
+
|
|
733
|
+
yield self if block_given?
|
|
734
|
+
end
|
|
735
|
+
|
|
736
|
+
##
|
|
737
|
+
# Configurations for individual RPCs
|
|
738
|
+
# @return [Rpcs]
|
|
739
|
+
#
|
|
740
|
+
def rpcs
|
|
741
|
+
@rpcs ||= begin
|
|
742
|
+
parent_rpcs = nil
|
|
743
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
744
|
+
Rpcs.new parent_rpcs
|
|
745
|
+
end
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
##
|
|
749
|
+
# Configuration RPC class for the DatabaseCenter API.
|
|
750
|
+
#
|
|
751
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
752
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
753
|
+
# the following configuration fields:
|
|
754
|
+
#
|
|
755
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
756
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
|
757
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
758
|
+
# include the following keys:
|
|
759
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
760
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
761
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
762
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
763
|
+
# trigger a retry.
|
|
764
|
+
#
|
|
765
|
+
class Rpcs
|
|
766
|
+
##
|
|
767
|
+
# RPC-specific configuration for `query_products`
|
|
768
|
+
# @return [::Gapic::Config::Method]
|
|
769
|
+
#
|
|
770
|
+
attr_reader :query_products
|
|
771
|
+
##
|
|
772
|
+
# RPC-specific configuration for `aggregate_fleet`
|
|
773
|
+
# @return [::Gapic::Config::Method]
|
|
774
|
+
#
|
|
775
|
+
attr_reader :aggregate_fleet
|
|
776
|
+
##
|
|
777
|
+
# RPC-specific configuration for `query_database_resource_groups`
|
|
778
|
+
# @return [::Gapic::Config::Method]
|
|
779
|
+
#
|
|
780
|
+
attr_reader :query_database_resource_groups
|
|
781
|
+
|
|
782
|
+
# @private
|
|
783
|
+
def initialize parent_rpcs = nil
|
|
784
|
+
query_products_config = parent_rpcs.query_products if parent_rpcs.respond_to? :query_products
|
|
785
|
+
@query_products = ::Gapic::Config::Method.new query_products_config
|
|
786
|
+
aggregate_fleet_config = parent_rpcs.aggregate_fleet if parent_rpcs.respond_to? :aggregate_fleet
|
|
787
|
+
@aggregate_fleet = ::Gapic::Config::Method.new aggregate_fleet_config
|
|
788
|
+
query_database_resource_groups_config = parent_rpcs.query_database_resource_groups if parent_rpcs.respond_to? :query_database_resource_groups
|
|
789
|
+
@query_database_resource_groups = ::Gapic::Config::Method.new query_database_resource_groups_config
|
|
790
|
+
|
|
791
|
+
yield self if block_given?
|
|
792
|
+
end
|
|
793
|
+
end
|
|
794
|
+
end
|
|
795
|
+
end
|
|
796
|
+
end
|
|
797
|
+
end
|
|
798
|
+
end
|
|
799
|
+
end
|
|
800
|
+
end
|
|
801
|
+
end
|