google-cloud-alloy_db-v1 0.a → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/README.md +144 -8
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/client.rb +2693 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/credentials.rb +47 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/operations.rb +768 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/paths.rb +149 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/client.rb +2111 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/operations.rb +793 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub.rb +1238 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin/rest.rb +54 -0
- data/lib/google/cloud/alloy_db/v1/alloy_db_admin.rb +56 -0
- data/lib/google/cloud/alloy_db/v1/bindings_override.rb +102 -0
- data/lib/google/cloud/alloy_db/v1/rest.rb +38 -0
- data/lib/google/cloud/alloy_db/v1/version.rb +8 -3
- data/lib/google/cloud/alloy_db/v1.rb +45 -0
- data/lib/google/cloud/alloydb/v1/resources_pb.rb +312 -0
- data/lib/google/cloud/alloydb/v1/service_pb.rb +237 -0
- data/lib/google/cloud/alloydb/v1/service_services_pb.rb +97 -0
- data/lib/google-cloud-alloy_db-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/client.rb +324 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/launch_stage.rb +71 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/alloydb/v1/resources.rb +985 -0
- data/proto_docs/google/cloud/alloydb/v1/service.rb +815 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +34 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +48 -0
- data/proto_docs/google/type/dayofweek.rb +49 -0
- data/proto_docs/google/type/expr.rb +75 -0
- data/proto_docs/google/type/timeofday.rb +45 -0
- metadata +250 -12
@@ -0,0 +1,2111 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2023 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/alloydb/v1/service_pb"
|
21
|
+
require "google/cloud/alloy_db/v1/alloy_db_admin/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
23
|
+
require "google/iam/v1/rest"
|
24
|
+
|
25
|
+
module Google
|
26
|
+
module Cloud
|
27
|
+
module AlloyDB
|
28
|
+
module V1
|
29
|
+
module AlloyDBAdmin
|
30
|
+
module Rest
|
31
|
+
##
|
32
|
+
# REST client for the AlloyDBAdmin service.
|
33
|
+
#
|
34
|
+
# Service describing handlers for resources
|
35
|
+
#
|
36
|
+
class Client
|
37
|
+
include Paths
|
38
|
+
|
39
|
+
# @private
|
40
|
+
attr_reader :alloy_db_admin_stub
|
41
|
+
|
42
|
+
##
|
43
|
+
# Configure the AlloyDBAdmin Client class.
|
44
|
+
#
|
45
|
+
# See {::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client::Configuration}
|
46
|
+
# for a description of the configuration fields.
|
47
|
+
#
|
48
|
+
# @example
|
49
|
+
#
|
50
|
+
# # Modify the configuration for all AlloyDBAdmin clients
|
51
|
+
# ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.configure do |config|
|
52
|
+
# config.timeout = 10.0
|
53
|
+
# end
|
54
|
+
#
|
55
|
+
# @yield [config] Configure the Client client.
|
56
|
+
# @yieldparam config [Client::Configuration]
|
57
|
+
#
|
58
|
+
# @return [Client::Configuration]
|
59
|
+
#
|
60
|
+
def self.configure
|
61
|
+
@configure ||= begin
|
62
|
+
namespace = ["Google", "Cloud", "AlloyDB", "V1"]
|
63
|
+
parent_config = while namespace.any?
|
64
|
+
parent_name = namespace.join "::"
|
65
|
+
parent_const = const_get parent_name
|
66
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
67
|
+
namespace.pop
|
68
|
+
end
|
69
|
+
default_config = Client::Configuration.new parent_config
|
70
|
+
|
71
|
+
default_config.timeout = 60.0
|
72
|
+
|
73
|
+
default_config.rpcs.list_clusters.timeout = 60.0
|
74
|
+
default_config.rpcs.list_clusters.retry_policy = {
|
75
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
76
|
+
}
|
77
|
+
|
78
|
+
default_config.rpcs.get_cluster.timeout = 60.0
|
79
|
+
default_config.rpcs.get_cluster.retry_policy = {
|
80
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
81
|
+
}
|
82
|
+
|
83
|
+
default_config.rpcs.list_instances.timeout = 60.0
|
84
|
+
default_config.rpcs.list_instances.retry_policy = {
|
85
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
86
|
+
}
|
87
|
+
|
88
|
+
default_config.rpcs.get_instance.timeout = 60.0
|
89
|
+
default_config.rpcs.get_instance.retry_policy = {
|
90
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
91
|
+
}
|
92
|
+
|
93
|
+
default_config.rpcs.list_backups.timeout = 60.0
|
94
|
+
default_config.rpcs.list_backups.retry_policy = {
|
95
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
96
|
+
}
|
97
|
+
|
98
|
+
default_config.rpcs.get_backup.timeout = 60.0
|
99
|
+
default_config.rpcs.get_backup.retry_policy = {
|
100
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
101
|
+
}
|
102
|
+
|
103
|
+
default_config.rpcs.list_supported_database_flags.timeout = 60.0
|
104
|
+
default_config.rpcs.list_supported_database_flags.retry_policy = {
|
105
|
+
initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
|
106
|
+
}
|
107
|
+
|
108
|
+
default_config
|
109
|
+
end
|
110
|
+
yield @configure if block_given?
|
111
|
+
@configure
|
112
|
+
end
|
113
|
+
|
114
|
+
##
|
115
|
+
# Configure the AlloyDBAdmin Client instance.
|
116
|
+
#
|
117
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
118
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
119
|
+
# should be made on {Client.configure}.
|
120
|
+
#
|
121
|
+
# See {::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client::Configuration}
|
122
|
+
# for a description of the configuration fields.
|
123
|
+
#
|
124
|
+
# @yield [config] Configure the Client client.
|
125
|
+
# @yieldparam config [Client::Configuration]
|
126
|
+
#
|
127
|
+
# @return [Client::Configuration]
|
128
|
+
#
|
129
|
+
def configure
|
130
|
+
yield @config if block_given?
|
131
|
+
@config
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Create a new AlloyDBAdmin REST client object.
|
136
|
+
#
|
137
|
+
# @example
|
138
|
+
#
|
139
|
+
# # Create a client using the default configuration
|
140
|
+
# client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new
|
141
|
+
#
|
142
|
+
# # Create a client using a custom configuration
|
143
|
+
# client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new do |config|
|
144
|
+
# config.timeout = 10.0
|
145
|
+
# end
|
146
|
+
#
|
147
|
+
# @yield [config] Configure the AlloyDBAdmin client.
|
148
|
+
# @yieldparam config [Client::Configuration]
|
149
|
+
#
|
150
|
+
def initialize
|
151
|
+
# Create the configuration object
|
152
|
+
@config = Configuration.new Client.configure
|
153
|
+
|
154
|
+
# Yield the configuration if needed
|
155
|
+
yield @config if block_given?
|
156
|
+
|
157
|
+
# Create credentials
|
158
|
+
credentials = @config.credentials
|
159
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
160
|
+
# but only if the default endpoint does not have a region prefix.
|
161
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
162
|
+
!@config.endpoint.split(".").first.include?("-")
|
163
|
+
credentials ||= Credentials.default scope: @config.scope,
|
164
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
165
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
166
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
167
|
+
end
|
168
|
+
|
169
|
+
@quota_project_id = @config.quota_project
|
170
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
171
|
+
|
172
|
+
@operations_client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Operations.new do |config|
|
173
|
+
config.credentials = credentials
|
174
|
+
config.quota_project = @quota_project_id
|
175
|
+
config.endpoint = @config.endpoint
|
176
|
+
end
|
177
|
+
|
178
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
179
|
+
config.credentials = credentials
|
180
|
+
config.quota_project = @quota_project_id
|
181
|
+
config.endpoint = @config.endpoint
|
182
|
+
config.bindings_override = @config.bindings_override
|
183
|
+
end
|
184
|
+
|
185
|
+
@iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
|
186
|
+
config.credentials = credentials
|
187
|
+
config.quota_project = @quota_project_id
|
188
|
+
config.endpoint = @config.endpoint
|
189
|
+
end
|
190
|
+
|
191
|
+
@alloy_db_admin_stub = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
192
|
+
end
|
193
|
+
|
194
|
+
##
|
195
|
+
# Get the associated client for long-running operations.
|
196
|
+
#
|
197
|
+
# @return [::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Operations]
|
198
|
+
#
|
199
|
+
attr_reader :operations_client
|
200
|
+
|
201
|
+
##
|
202
|
+
# Get the associated client for mix-in of the Locations.
|
203
|
+
#
|
204
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
205
|
+
#
|
206
|
+
attr_reader :location_client
|
207
|
+
|
208
|
+
##
|
209
|
+
# Get the associated client for mix-in of the IAMPolicy.
|
210
|
+
#
|
211
|
+
# @return [Google::Iam::V1::IAMPolicy::Rest::Client]
|
212
|
+
#
|
213
|
+
attr_reader :iam_policy_client
|
214
|
+
|
215
|
+
# Service calls
|
216
|
+
|
217
|
+
##
|
218
|
+
# Lists Clusters in a given project and location.
|
219
|
+
#
|
220
|
+
# @overload list_clusters(request, options = nil)
|
221
|
+
# Pass arguments to `list_clusters` via a request object, either of type
|
222
|
+
# {::Google::Cloud::AlloyDB::V1::ListClustersRequest} or an equivalent Hash.
|
223
|
+
#
|
224
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListClustersRequest, ::Hash]
|
225
|
+
# A request object representing the call parameters. Required. To specify no
|
226
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
227
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
228
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
229
|
+
#
|
230
|
+
# @overload list_clusters(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
231
|
+
# Pass arguments to `list_clusters` via keyword arguments. Note that at
|
232
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
233
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
234
|
+
#
|
235
|
+
# @param parent [::String]
|
236
|
+
# Required. The name of the parent resource. For the required format, see the
|
237
|
+
# comment on the Cluster.name field. Additionally, you can perform an
|
238
|
+
# aggregated list operation by specifying a value with the following format:
|
239
|
+
# * projects/\\{project}/locations/-
|
240
|
+
# @param page_size [::Integer]
|
241
|
+
# Optional. Requested page size. Server may return fewer items than
|
242
|
+
# requested. If unspecified, server will pick an appropriate default.
|
243
|
+
# @param page_token [::String]
|
244
|
+
# A token identifying a page of results the server should return.
|
245
|
+
# @param filter [::String]
|
246
|
+
# Optional. Filtering results
|
247
|
+
# @param order_by [::String]
|
248
|
+
# Optional. Hint for how to order the results
|
249
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
250
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ListClustersResponse]
|
251
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
252
|
+
#
|
253
|
+
# @return [::Google::Cloud::AlloyDB::V1::ListClustersResponse]
|
254
|
+
#
|
255
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
256
|
+
def list_clusters request, options = nil
|
257
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
258
|
+
|
259
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListClustersRequest
|
260
|
+
|
261
|
+
# Converts hash and nil to an options object
|
262
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
263
|
+
|
264
|
+
# Customize the options with defaults
|
265
|
+
call_metadata = @config.rpcs.list_clusters.metadata.to_h
|
266
|
+
|
267
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
268
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
269
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
270
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
271
|
+
transports_version_send: [:rest]
|
272
|
+
|
273
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
274
|
+
|
275
|
+
options.apply_defaults timeout: @config.rpcs.list_clusters.timeout,
|
276
|
+
metadata: call_metadata,
|
277
|
+
retry_policy: @config.rpcs.list_clusters.retry_policy
|
278
|
+
|
279
|
+
options.apply_defaults timeout: @config.timeout,
|
280
|
+
metadata: @config.metadata,
|
281
|
+
retry_policy: @config.retry_policy
|
282
|
+
|
283
|
+
@alloy_db_admin_stub.list_clusters request, options do |result, operation|
|
284
|
+
yield result, operation if block_given?
|
285
|
+
return result
|
286
|
+
end
|
287
|
+
rescue ::Gapic::Rest::Error => e
|
288
|
+
raise ::Google::Cloud::Error.from_error(e)
|
289
|
+
end
|
290
|
+
|
291
|
+
##
|
292
|
+
# Gets details of a single Cluster.
|
293
|
+
#
|
294
|
+
# @overload get_cluster(request, options = nil)
|
295
|
+
# Pass arguments to `get_cluster` via a request object, either of type
|
296
|
+
# {::Google::Cloud::AlloyDB::V1::GetClusterRequest} or an equivalent Hash.
|
297
|
+
#
|
298
|
+
# @param request [::Google::Cloud::AlloyDB::V1::GetClusterRequest, ::Hash]
|
299
|
+
# A request object representing the call parameters. Required. To specify no
|
300
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
301
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
302
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
303
|
+
#
|
304
|
+
# @overload get_cluster(name: nil)
|
305
|
+
# Pass arguments to `get_cluster` via keyword arguments. Note that at
|
306
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
307
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
308
|
+
#
|
309
|
+
# @param name [::String]
|
310
|
+
# Required. The name of the resource. For the required format, see the
|
311
|
+
# comment on the Cluster.name field.
|
312
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
313
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::Cluster]
|
314
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
315
|
+
#
|
316
|
+
# @return [::Google::Cloud::AlloyDB::V1::Cluster]
|
317
|
+
#
|
318
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
319
|
+
def get_cluster request, options = nil
|
320
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
321
|
+
|
322
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetClusterRequest
|
323
|
+
|
324
|
+
# Converts hash and nil to an options object
|
325
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
326
|
+
|
327
|
+
# Customize the options with defaults
|
328
|
+
call_metadata = @config.rpcs.get_cluster.metadata.to_h
|
329
|
+
|
330
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
331
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
332
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
333
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
334
|
+
transports_version_send: [:rest]
|
335
|
+
|
336
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
337
|
+
|
338
|
+
options.apply_defaults timeout: @config.rpcs.get_cluster.timeout,
|
339
|
+
metadata: call_metadata,
|
340
|
+
retry_policy: @config.rpcs.get_cluster.retry_policy
|
341
|
+
|
342
|
+
options.apply_defaults timeout: @config.timeout,
|
343
|
+
metadata: @config.metadata,
|
344
|
+
retry_policy: @config.retry_policy
|
345
|
+
|
346
|
+
@alloy_db_admin_stub.get_cluster request, options do |result, operation|
|
347
|
+
yield result, operation if block_given?
|
348
|
+
return result
|
349
|
+
end
|
350
|
+
rescue ::Gapic::Rest::Error => e
|
351
|
+
raise ::Google::Cloud::Error.from_error(e)
|
352
|
+
end
|
353
|
+
|
354
|
+
##
|
355
|
+
# Creates a new Cluster in a given project and location.
|
356
|
+
#
|
357
|
+
# @overload create_cluster(request, options = nil)
|
358
|
+
# Pass arguments to `create_cluster` via a request object, either of type
|
359
|
+
# {::Google::Cloud::AlloyDB::V1::CreateClusterRequest} or an equivalent Hash.
|
360
|
+
#
|
361
|
+
# @param request [::Google::Cloud::AlloyDB::V1::CreateClusterRequest, ::Hash]
|
362
|
+
# A request object representing the call parameters. Required. To specify no
|
363
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
364
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
365
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
366
|
+
#
|
367
|
+
# @overload create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
|
368
|
+
# Pass arguments to `create_cluster` via keyword arguments. Note that at
|
369
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
370
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
371
|
+
#
|
372
|
+
# @param parent [::String]
|
373
|
+
# Required. The name of the parent resource. For the required format, see the
|
374
|
+
# comment on the Cluster.name field.
|
375
|
+
# @param cluster_id [::String]
|
376
|
+
# Required. ID of the requesting object.
|
377
|
+
# @param cluster [::Google::Cloud::AlloyDB::V1::Cluster, ::Hash]
|
378
|
+
# Required. The resource being created
|
379
|
+
# @param request_id [::String]
|
380
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
381
|
+
# request ID so that if you must retry your request, the server will know to
|
382
|
+
# ignore the request if it has already been completed. The server will
|
383
|
+
# guarantee that for at least 60 minutes since the first request.
|
384
|
+
#
|
385
|
+
# For example, consider a situation where you make an initial request and
|
386
|
+
# the request times out. If you make the request again with the same request
|
387
|
+
# ID, the server can check if original operation with the same request ID
|
388
|
+
# was received, and if so, will ignore the second request. This prevents
|
389
|
+
# clients from accidentally creating duplicate commitments.
|
390
|
+
#
|
391
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
392
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
393
|
+
# @param validate_only [::Boolean]
|
394
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
395
|
+
# any other type of validation), but do not actually execute the create
|
396
|
+
# request.
|
397
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
398
|
+
# @yieldparam result [::Gapic::Operation]
|
399
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
400
|
+
#
|
401
|
+
# @return [::Gapic::Operation]
|
402
|
+
#
|
403
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
404
|
+
def create_cluster request, options = nil
|
405
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
406
|
+
|
407
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateClusterRequest
|
408
|
+
|
409
|
+
# Converts hash and nil to an options object
|
410
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
411
|
+
|
412
|
+
# Customize the options with defaults
|
413
|
+
call_metadata = @config.rpcs.create_cluster.metadata.to_h
|
414
|
+
|
415
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
416
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
417
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
418
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
419
|
+
transports_version_send: [:rest]
|
420
|
+
|
421
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
422
|
+
|
423
|
+
options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
|
424
|
+
metadata: call_metadata,
|
425
|
+
retry_policy: @config.rpcs.create_cluster.retry_policy
|
426
|
+
|
427
|
+
options.apply_defaults timeout: @config.timeout,
|
428
|
+
metadata: @config.metadata,
|
429
|
+
retry_policy: @config.retry_policy
|
430
|
+
|
431
|
+
@alloy_db_admin_stub.create_cluster request, options do |result, operation|
|
432
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
433
|
+
yield result, operation if block_given?
|
434
|
+
return result
|
435
|
+
end
|
436
|
+
rescue ::Gapic::Rest::Error => e
|
437
|
+
raise ::Google::Cloud::Error.from_error(e)
|
438
|
+
end
|
439
|
+
|
440
|
+
##
|
441
|
+
# Updates the parameters of a single Cluster.
|
442
|
+
#
|
443
|
+
# @overload update_cluster(request, options = nil)
|
444
|
+
# Pass arguments to `update_cluster` via a request object, either of type
|
445
|
+
# {::Google::Cloud::AlloyDB::V1::UpdateClusterRequest} or an equivalent Hash.
|
446
|
+
#
|
447
|
+
# @param request [::Google::Cloud::AlloyDB::V1::UpdateClusterRequest, ::Hash]
|
448
|
+
# A request object representing the call parameters. Required. To specify no
|
449
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
450
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
451
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
452
|
+
#
|
453
|
+
# @overload update_cluster(update_mask: nil, cluster: nil, request_id: nil, validate_only: nil, allow_missing: nil)
|
454
|
+
# Pass arguments to `update_cluster` via keyword arguments. Note that at
|
455
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
456
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
457
|
+
#
|
458
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
459
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
460
|
+
# Cluster resource by the update.
|
461
|
+
# The fields specified in the update_mask are relative to the resource, not
|
462
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
463
|
+
# user does not provide a mask then all fields will be overwritten.
|
464
|
+
# @param cluster [::Google::Cloud::AlloyDB::V1::Cluster, ::Hash]
|
465
|
+
# Required. The resource being updated
|
466
|
+
# @param request_id [::String]
|
467
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
468
|
+
# request ID so that if you must retry your request, the server will know to
|
469
|
+
# ignore the request if it has already been completed. The server will
|
470
|
+
# guarantee that for at least 60 minutes since the first request.
|
471
|
+
#
|
472
|
+
# For example, consider a situation where you make an initial request and
|
473
|
+
# the request times out. If you make the request again with the same request
|
474
|
+
# ID, the server can check if original operation with the same request ID
|
475
|
+
# was received, and if so, will ignore the second request. This prevents
|
476
|
+
# clients from accidentally creating duplicate commitments.
|
477
|
+
#
|
478
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
479
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
480
|
+
# @param validate_only [::Boolean]
|
481
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
482
|
+
# any other type of validation), but do not actually execute the update
|
483
|
+
# request.
|
484
|
+
# @param allow_missing [::Boolean]
|
485
|
+
# Optional. If set to true, update succeeds even if cluster is not found. In
|
486
|
+
# that case, a new cluster is created and `update_mask` is ignored.
|
487
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
488
|
+
# @yieldparam result [::Gapic::Operation]
|
489
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
490
|
+
#
|
491
|
+
# @return [::Gapic::Operation]
|
492
|
+
#
|
493
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
494
|
+
def update_cluster request, options = nil
|
495
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
496
|
+
|
497
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateClusterRequest
|
498
|
+
|
499
|
+
# Converts hash and nil to an options object
|
500
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
501
|
+
|
502
|
+
# Customize the options with defaults
|
503
|
+
call_metadata = @config.rpcs.update_cluster.metadata.to_h
|
504
|
+
|
505
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
506
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
507
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
508
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
509
|
+
transports_version_send: [:rest]
|
510
|
+
|
511
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
512
|
+
|
513
|
+
options.apply_defaults timeout: @config.rpcs.update_cluster.timeout,
|
514
|
+
metadata: call_metadata,
|
515
|
+
retry_policy: @config.rpcs.update_cluster.retry_policy
|
516
|
+
|
517
|
+
options.apply_defaults timeout: @config.timeout,
|
518
|
+
metadata: @config.metadata,
|
519
|
+
retry_policy: @config.retry_policy
|
520
|
+
|
521
|
+
@alloy_db_admin_stub.update_cluster request, options do |result, operation|
|
522
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
523
|
+
yield result, operation if block_given?
|
524
|
+
return result
|
525
|
+
end
|
526
|
+
rescue ::Gapic::Rest::Error => e
|
527
|
+
raise ::Google::Cloud::Error.from_error(e)
|
528
|
+
end
|
529
|
+
|
530
|
+
##
|
531
|
+
# Deletes a single Cluster.
|
532
|
+
#
|
533
|
+
# @overload delete_cluster(request, options = nil)
|
534
|
+
# Pass arguments to `delete_cluster` via a request object, either of type
|
535
|
+
# {::Google::Cloud::AlloyDB::V1::DeleteClusterRequest} or an equivalent Hash.
|
536
|
+
#
|
537
|
+
# @param request [::Google::Cloud::AlloyDB::V1::DeleteClusterRequest, ::Hash]
|
538
|
+
# A request object representing the call parameters. Required. To specify no
|
539
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
540
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
541
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
542
|
+
#
|
543
|
+
# @overload delete_cluster(name: nil, request_id: nil, etag: nil, validate_only: nil, force: nil)
|
544
|
+
# Pass arguments to `delete_cluster` via keyword arguments. Note that at
|
545
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
546
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
547
|
+
#
|
548
|
+
# @param name [::String]
|
549
|
+
# Required. The name of the resource. For the required format, see the
|
550
|
+
# comment on the Cluster.name field.
|
551
|
+
# @param request_id [::String]
|
552
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
553
|
+
# request ID so that if you must retry your request, the server will know to
|
554
|
+
# ignore the request if it has already been completed. The server will
|
555
|
+
# guarantee that for at least 60 minutes after the first request.
|
556
|
+
#
|
557
|
+
# For example, consider a situation where you make an initial request and
|
558
|
+
# the request times out. If you make the request again with the same request
|
559
|
+
# ID, the server can check if original operation with the same request ID
|
560
|
+
# was received, and if so, will ignore the second request. This prevents
|
561
|
+
# clients from accidentally creating duplicate commitments.
|
562
|
+
#
|
563
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
564
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
565
|
+
# @param etag [::String]
|
566
|
+
# Optional. The current etag of the Cluster.
|
567
|
+
# If an etag is provided and does not match the current etag of the Cluster,
|
568
|
+
# deletion will be blocked and an ABORTED error will be returned.
|
569
|
+
# @param validate_only [::Boolean]
|
570
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
571
|
+
# any other type of validation), but do not actually execute the delete.
|
572
|
+
# @param force [::Boolean]
|
573
|
+
# Optional. Whether to cascade delete child instances for given cluster.
|
574
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
575
|
+
# @yieldparam result [::Gapic::Operation]
|
576
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
577
|
+
#
|
578
|
+
# @return [::Gapic::Operation]
|
579
|
+
#
|
580
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
581
|
+
def delete_cluster request, options = nil
|
582
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
583
|
+
|
584
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteClusterRequest
|
585
|
+
|
586
|
+
# Converts hash and nil to an options object
|
587
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
588
|
+
|
589
|
+
# Customize the options with defaults
|
590
|
+
call_metadata = @config.rpcs.delete_cluster.metadata.to_h
|
591
|
+
|
592
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
593
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
594
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
595
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
596
|
+
transports_version_send: [:rest]
|
597
|
+
|
598
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
599
|
+
|
600
|
+
options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
|
601
|
+
metadata: call_metadata,
|
602
|
+
retry_policy: @config.rpcs.delete_cluster.retry_policy
|
603
|
+
|
604
|
+
options.apply_defaults timeout: @config.timeout,
|
605
|
+
metadata: @config.metadata,
|
606
|
+
retry_policy: @config.retry_policy
|
607
|
+
|
608
|
+
@alloy_db_admin_stub.delete_cluster request, options do |result, operation|
|
609
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
610
|
+
yield result, operation if block_given?
|
611
|
+
return result
|
612
|
+
end
|
613
|
+
rescue ::Gapic::Rest::Error => e
|
614
|
+
raise ::Google::Cloud::Error.from_error(e)
|
615
|
+
end
|
616
|
+
|
617
|
+
##
|
618
|
+
# Creates a new Cluster in a given project and location, with a volume
|
619
|
+
# restored from the provided source, either a backup ID or a point-in-time
|
620
|
+
# and a source cluster.
|
621
|
+
#
|
622
|
+
# @overload restore_cluster(request, options = nil)
|
623
|
+
# Pass arguments to `restore_cluster` via a request object, either of type
|
624
|
+
# {::Google::Cloud::AlloyDB::V1::RestoreClusterRequest} or an equivalent Hash.
|
625
|
+
#
|
626
|
+
# @param request [::Google::Cloud::AlloyDB::V1::RestoreClusterRequest, ::Hash]
|
627
|
+
# A request object representing the call parameters. Required. To specify no
|
628
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
629
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
630
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
631
|
+
#
|
632
|
+
# @overload restore_cluster(backup_source: nil, parent: nil, cluster_id: nil, cluster: nil, request_id: nil, validate_only: nil)
|
633
|
+
# Pass arguments to `restore_cluster` via keyword arguments. Note that at
|
634
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
635
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
636
|
+
#
|
637
|
+
# @param backup_source [::Google::Cloud::AlloyDB::V1::BackupSource, ::Hash]
|
638
|
+
# Backup source.
|
639
|
+
# @param parent [::String]
|
640
|
+
# Required. The name of the parent resource. For the required format, see the
|
641
|
+
# comment on the Cluster.name field.
|
642
|
+
# @param cluster_id [::String]
|
643
|
+
# Required. ID of the requesting object.
|
644
|
+
# @param cluster [::Google::Cloud::AlloyDB::V1::Cluster, ::Hash]
|
645
|
+
# Required. The resource being created
|
646
|
+
# @param request_id [::String]
|
647
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
648
|
+
# request ID so that if you must retry your request, the server will know to
|
649
|
+
# ignore the request if it has already been completed. The server will
|
650
|
+
# guarantee that for at least 60 minutes since the first request.
|
651
|
+
#
|
652
|
+
# For example, consider a situation where you make an initial request and
|
653
|
+
# the request times out. If you make the request again with the same request
|
654
|
+
# ID, the server can check if original operation with the same request ID
|
655
|
+
# was received, and if so, will ignore the second request. This prevents
|
656
|
+
# clients from accidentally creating duplicate commitments.
|
657
|
+
#
|
658
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
659
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
660
|
+
# @param validate_only [::Boolean]
|
661
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
662
|
+
# any other type of validation), but do not actually execute the import
|
663
|
+
# request.
|
664
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
665
|
+
# @yieldparam result [::Gapic::Operation]
|
666
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
667
|
+
#
|
668
|
+
# @return [::Gapic::Operation]
|
669
|
+
#
|
670
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
671
|
+
def restore_cluster request, options = nil
|
672
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
673
|
+
|
674
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::RestoreClusterRequest
|
675
|
+
|
676
|
+
# Converts hash and nil to an options object
|
677
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
678
|
+
|
679
|
+
# Customize the options with defaults
|
680
|
+
call_metadata = @config.rpcs.restore_cluster.metadata.to_h
|
681
|
+
|
682
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
683
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
684
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
685
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
686
|
+
transports_version_send: [:rest]
|
687
|
+
|
688
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
689
|
+
|
690
|
+
options.apply_defaults timeout: @config.rpcs.restore_cluster.timeout,
|
691
|
+
metadata: call_metadata,
|
692
|
+
retry_policy: @config.rpcs.restore_cluster.retry_policy
|
693
|
+
|
694
|
+
options.apply_defaults timeout: @config.timeout,
|
695
|
+
metadata: @config.metadata,
|
696
|
+
retry_policy: @config.retry_policy
|
697
|
+
|
698
|
+
@alloy_db_admin_stub.restore_cluster request, options do |result, operation|
|
699
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
700
|
+
yield result, operation if block_given?
|
701
|
+
return result
|
702
|
+
end
|
703
|
+
rescue ::Gapic::Rest::Error => e
|
704
|
+
raise ::Google::Cloud::Error.from_error(e)
|
705
|
+
end
|
706
|
+
|
707
|
+
##
|
708
|
+
# Lists Instances in a given project and location.
|
709
|
+
#
|
710
|
+
# @overload list_instances(request, options = nil)
|
711
|
+
# Pass arguments to `list_instances` via a request object, either of type
|
712
|
+
# {::Google::Cloud::AlloyDB::V1::ListInstancesRequest} or an equivalent Hash.
|
713
|
+
#
|
714
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListInstancesRequest, ::Hash]
|
715
|
+
# A request object representing the call parameters. Required. To specify no
|
716
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
717
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
718
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
719
|
+
#
|
720
|
+
# @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
721
|
+
# Pass arguments to `list_instances` via keyword arguments. Note that at
|
722
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
723
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
724
|
+
#
|
725
|
+
# @param parent [::String]
|
726
|
+
# Required. The name of the parent resource. For the required format, see the
|
727
|
+
# comment on the Instance.name field. Additionally, you can perform an
|
728
|
+
# aggregated list operation by specifying a value with one of the following
|
729
|
+
# formats:
|
730
|
+
# * projects/\\{project}/locations/-/clusters/-
|
731
|
+
# * projects/\\{project}/locations/\\{region}/clusters/-
|
732
|
+
# @param page_size [::Integer]
|
733
|
+
# Optional. Requested page size. Server may return fewer items than
|
734
|
+
# requested. If unspecified, server will pick an appropriate default.
|
735
|
+
# @param page_token [::String]
|
736
|
+
# A token identifying a page of results the server should return.
|
737
|
+
# @param filter [::String]
|
738
|
+
# Optional. Filtering results
|
739
|
+
# @param order_by [::String]
|
740
|
+
# Optional. Hint for how to order the results
|
741
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
742
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ListInstancesResponse]
|
743
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
744
|
+
#
|
745
|
+
# @return [::Google::Cloud::AlloyDB::V1::ListInstancesResponse]
|
746
|
+
#
|
747
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
748
|
+
def list_instances request, options = nil
|
749
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
750
|
+
|
751
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListInstancesRequest
|
752
|
+
|
753
|
+
# Converts hash and nil to an options object
|
754
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
755
|
+
|
756
|
+
# Customize the options with defaults
|
757
|
+
call_metadata = @config.rpcs.list_instances.metadata.to_h
|
758
|
+
|
759
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
760
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
761
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
762
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
763
|
+
transports_version_send: [:rest]
|
764
|
+
|
765
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
766
|
+
|
767
|
+
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
768
|
+
metadata: call_metadata,
|
769
|
+
retry_policy: @config.rpcs.list_instances.retry_policy
|
770
|
+
|
771
|
+
options.apply_defaults timeout: @config.timeout,
|
772
|
+
metadata: @config.metadata,
|
773
|
+
retry_policy: @config.retry_policy
|
774
|
+
|
775
|
+
@alloy_db_admin_stub.list_instances request, options do |result, operation|
|
776
|
+
yield result, operation if block_given?
|
777
|
+
return result
|
778
|
+
end
|
779
|
+
rescue ::Gapic::Rest::Error => e
|
780
|
+
raise ::Google::Cloud::Error.from_error(e)
|
781
|
+
end
|
782
|
+
|
783
|
+
##
|
784
|
+
# Gets details of a single Instance.
|
785
|
+
#
|
786
|
+
# @overload get_instance(request, options = nil)
|
787
|
+
# Pass arguments to `get_instance` via a request object, either of type
|
788
|
+
# {::Google::Cloud::AlloyDB::V1::GetInstanceRequest} or an equivalent Hash.
|
789
|
+
#
|
790
|
+
# @param request [::Google::Cloud::AlloyDB::V1::GetInstanceRequest, ::Hash]
|
791
|
+
# A request object representing the call parameters. Required. To specify no
|
792
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
793
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
794
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
795
|
+
#
|
796
|
+
# @overload get_instance(name: nil, view: nil)
|
797
|
+
# Pass arguments to `get_instance` via keyword arguments. Note that at
|
798
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
799
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
800
|
+
#
|
801
|
+
# @param name [::String]
|
802
|
+
# Required. The name of the resource. For the required format, see the
|
803
|
+
# comment on the Instance.name field.
|
804
|
+
# @param view [::Google::Cloud::AlloyDB::V1::InstanceView]
|
805
|
+
# The view of the instance to return.
|
806
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
807
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::Instance]
|
808
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
809
|
+
#
|
810
|
+
# @return [::Google::Cloud::AlloyDB::V1::Instance]
|
811
|
+
#
|
812
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
813
|
+
def get_instance request, options = nil
|
814
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
815
|
+
|
816
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetInstanceRequest
|
817
|
+
|
818
|
+
# Converts hash and nil to an options object
|
819
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
820
|
+
|
821
|
+
# Customize the options with defaults
|
822
|
+
call_metadata = @config.rpcs.get_instance.metadata.to_h
|
823
|
+
|
824
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
825
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
826
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
827
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
828
|
+
transports_version_send: [:rest]
|
829
|
+
|
830
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
831
|
+
|
832
|
+
options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
|
833
|
+
metadata: call_metadata,
|
834
|
+
retry_policy: @config.rpcs.get_instance.retry_policy
|
835
|
+
|
836
|
+
options.apply_defaults timeout: @config.timeout,
|
837
|
+
metadata: @config.metadata,
|
838
|
+
retry_policy: @config.retry_policy
|
839
|
+
|
840
|
+
@alloy_db_admin_stub.get_instance request, options do |result, operation|
|
841
|
+
yield result, operation if block_given?
|
842
|
+
return result
|
843
|
+
end
|
844
|
+
rescue ::Gapic::Rest::Error => e
|
845
|
+
raise ::Google::Cloud::Error.from_error(e)
|
846
|
+
end
|
847
|
+
|
848
|
+
##
|
849
|
+
# Creates a new Instance in a given project and location.
|
850
|
+
#
|
851
|
+
# @overload create_instance(request, options = nil)
|
852
|
+
# Pass arguments to `create_instance` via a request object, either of type
|
853
|
+
# {::Google::Cloud::AlloyDB::V1::CreateInstanceRequest} or an equivalent Hash.
|
854
|
+
#
|
855
|
+
# @param request [::Google::Cloud::AlloyDB::V1::CreateInstanceRequest, ::Hash]
|
856
|
+
# A request object representing the call parameters. Required. To specify no
|
857
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
858
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
859
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
860
|
+
#
|
861
|
+
# @overload create_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil, validate_only: nil)
|
862
|
+
# Pass arguments to `create_instance` via keyword arguments. Note that at
|
863
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
864
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
865
|
+
#
|
866
|
+
# @param parent [::String]
|
867
|
+
# Required. The name of the parent resource. For the required format, see the
|
868
|
+
# comment on the Instance.name field.
|
869
|
+
# @param instance_id [::String]
|
870
|
+
# Required. ID of the requesting object.
|
871
|
+
# @param instance [::Google::Cloud::AlloyDB::V1::Instance, ::Hash]
|
872
|
+
# Required. The resource being created
|
873
|
+
# @param request_id [::String]
|
874
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
875
|
+
# request ID so that if you must retry your request, the server will know to
|
876
|
+
# ignore the request if it has already been completed. The server will
|
877
|
+
# guarantee that for at least 60 minutes since the first request.
|
878
|
+
#
|
879
|
+
# For example, consider a situation where you make an initial request and
|
880
|
+
# the request times out. If you make the request again with the same request
|
881
|
+
# ID, the server can check if original operation with the same request ID
|
882
|
+
# was received, and if so, will ignore the second request. This prevents
|
883
|
+
# clients from accidentally creating duplicate commitments.
|
884
|
+
#
|
885
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
886
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
887
|
+
# @param validate_only [::Boolean]
|
888
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
889
|
+
# any other type of validation), but do not actually execute the create
|
890
|
+
# request.
|
891
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
892
|
+
# @yieldparam result [::Gapic::Operation]
|
893
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
894
|
+
#
|
895
|
+
# @return [::Gapic::Operation]
|
896
|
+
#
|
897
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
898
|
+
def create_instance request, options = nil
|
899
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
900
|
+
|
901
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateInstanceRequest
|
902
|
+
|
903
|
+
# Converts hash and nil to an options object
|
904
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
905
|
+
|
906
|
+
# Customize the options with defaults
|
907
|
+
call_metadata = @config.rpcs.create_instance.metadata.to_h
|
908
|
+
|
909
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
910
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
911
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
912
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
913
|
+
transports_version_send: [:rest]
|
914
|
+
|
915
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
916
|
+
|
917
|
+
options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
|
918
|
+
metadata: call_metadata,
|
919
|
+
retry_policy: @config.rpcs.create_instance.retry_policy
|
920
|
+
|
921
|
+
options.apply_defaults timeout: @config.timeout,
|
922
|
+
metadata: @config.metadata,
|
923
|
+
retry_policy: @config.retry_policy
|
924
|
+
|
925
|
+
@alloy_db_admin_stub.create_instance request, options do |result, operation|
|
926
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
927
|
+
yield result, operation if block_given?
|
928
|
+
return result
|
929
|
+
end
|
930
|
+
rescue ::Gapic::Rest::Error => e
|
931
|
+
raise ::Google::Cloud::Error.from_error(e)
|
932
|
+
end
|
933
|
+
|
934
|
+
##
|
935
|
+
# Creates new instances under the given project, location and cluster.
|
936
|
+
# There can be only one primary instance in a cluster. If the primary
|
937
|
+
# instance exists in the cluster as well as this request, then API will
|
938
|
+
# throw an error.
|
939
|
+
# The primary instance should exist before any read pool instance is
|
940
|
+
# created. If the primary instance is a part of the request payload, then
|
941
|
+
# the API will take care of creating instances in the correct order.
|
942
|
+
# This method is here to support Google-internal use cases, and is not meant
|
943
|
+
# for external customers to consume. Please do not start relying on it; its
|
944
|
+
# behavior is subject to change without notice.
|
945
|
+
#
|
946
|
+
# @overload batch_create_instances(request, options = nil)
|
947
|
+
# Pass arguments to `batch_create_instances` via a request object, either of type
|
948
|
+
# {::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest} or an equivalent Hash.
|
949
|
+
#
|
950
|
+
# @param request [::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest, ::Hash]
|
951
|
+
# A request object representing the call parameters. Required. To specify no
|
952
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
953
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
954
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
955
|
+
#
|
956
|
+
# @overload batch_create_instances(parent: nil, requests: nil, request_id: nil)
|
957
|
+
# Pass arguments to `batch_create_instances` via keyword arguments. Note that at
|
958
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
959
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
960
|
+
#
|
961
|
+
# @param parent [::String]
|
962
|
+
# Required. The name of the parent resource.
|
963
|
+
# @param requests [::Google::Cloud::AlloyDB::V1::CreateInstanceRequests, ::Hash]
|
964
|
+
# Required. Resources being created.
|
965
|
+
# @param request_id [::String]
|
966
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
967
|
+
# request ID so that if you must retry your request, the server will know to
|
968
|
+
# ignore the request if it has already been completed. The server will
|
969
|
+
# guarantee that for at least 60 minutes since the first request.
|
970
|
+
#
|
971
|
+
# For example, consider a situation where you make an initial request and
|
972
|
+
# the request times out. If you make the request again with the same request
|
973
|
+
# ID, the server can check if original operation with the same request ID
|
974
|
+
# was received, and if so, will ignore the second request. This prevents
|
975
|
+
# clients from accidentally creating duplicate commitments.
|
976
|
+
#
|
977
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
978
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
979
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
980
|
+
# @yieldparam result [::Gapic::Operation]
|
981
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
982
|
+
#
|
983
|
+
# @return [::Gapic::Operation]
|
984
|
+
#
|
985
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
986
|
+
def batch_create_instances request, options = nil
|
987
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
988
|
+
|
989
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::BatchCreateInstancesRequest
|
990
|
+
|
991
|
+
# Converts hash and nil to an options object
|
992
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
993
|
+
|
994
|
+
# Customize the options with defaults
|
995
|
+
call_metadata = @config.rpcs.batch_create_instances.metadata.to_h
|
996
|
+
|
997
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
998
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
999
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1000
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1001
|
+
transports_version_send: [:rest]
|
1002
|
+
|
1003
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1004
|
+
|
1005
|
+
options.apply_defaults timeout: @config.rpcs.batch_create_instances.timeout,
|
1006
|
+
metadata: call_metadata,
|
1007
|
+
retry_policy: @config.rpcs.batch_create_instances.retry_policy
|
1008
|
+
|
1009
|
+
options.apply_defaults timeout: @config.timeout,
|
1010
|
+
metadata: @config.metadata,
|
1011
|
+
retry_policy: @config.retry_policy
|
1012
|
+
|
1013
|
+
@alloy_db_admin_stub.batch_create_instances request, options do |result, operation|
|
1014
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1015
|
+
yield result, operation if block_given?
|
1016
|
+
return result
|
1017
|
+
end
|
1018
|
+
rescue ::Gapic::Rest::Error => e
|
1019
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
##
|
1023
|
+
# Updates the parameters of a single Instance.
|
1024
|
+
#
|
1025
|
+
# @overload update_instance(request, options = nil)
|
1026
|
+
# Pass arguments to `update_instance` via a request object, either of type
|
1027
|
+
# {::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest} or an equivalent Hash.
|
1028
|
+
#
|
1029
|
+
# @param request [::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest, ::Hash]
|
1030
|
+
# A request object representing the call parameters. Required. To specify no
|
1031
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1032
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1033
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1034
|
+
#
|
1035
|
+
# @overload update_instance(update_mask: nil, instance: nil, request_id: nil, validate_only: nil, allow_missing: nil)
|
1036
|
+
# Pass arguments to `update_instance` via keyword arguments. Note that at
|
1037
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1038
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1039
|
+
#
|
1040
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1041
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
1042
|
+
# Instance resource by the update.
|
1043
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1044
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1045
|
+
# user does not provide a mask then all fields will be overwritten.
|
1046
|
+
# @param instance [::Google::Cloud::AlloyDB::V1::Instance, ::Hash]
|
1047
|
+
# Required. The resource being updated
|
1048
|
+
# @param request_id [::String]
|
1049
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1050
|
+
# request ID so that if you must retry your request, the server will know to
|
1051
|
+
# ignore the request if it has already been completed. The server will
|
1052
|
+
# guarantee that for at least 60 minutes since the first request.
|
1053
|
+
#
|
1054
|
+
# For example, consider a situation where you make an initial request and
|
1055
|
+
# the request times out. If you make the request again with the same request
|
1056
|
+
# ID, the server can check if original operation with the same request ID
|
1057
|
+
# was received, and if so, will ignore the second request. This prevents
|
1058
|
+
# clients from accidentally creating duplicate commitments.
|
1059
|
+
#
|
1060
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1061
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1062
|
+
# @param validate_only [::Boolean]
|
1063
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1064
|
+
# any other type of validation), but do not actually execute the update
|
1065
|
+
# request.
|
1066
|
+
# @param allow_missing [::Boolean]
|
1067
|
+
# Optional. If set to true, update succeeds even if instance is not found. In
|
1068
|
+
# that case, a new instance is created and `update_mask` is ignored.
|
1069
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1070
|
+
# @yieldparam result [::Gapic::Operation]
|
1071
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1072
|
+
#
|
1073
|
+
# @return [::Gapic::Operation]
|
1074
|
+
#
|
1075
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1076
|
+
def update_instance request, options = nil
|
1077
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1078
|
+
|
1079
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateInstanceRequest
|
1080
|
+
|
1081
|
+
# Converts hash and nil to an options object
|
1082
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1083
|
+
|
1084
|
+
# Customize the options with defaults
|
1085
|
+
call_metadata = @config.rpcs.update_instance.metadata.to_h
|
1086
|
+
|
1087
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1088
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1089
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1090
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1091
|
+
transports_version_send: [:rest]
|
1092
|
+
|
1093
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1094
|
+
|
1095
|
+
options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
|
1096
|
+
metadata: call_metadata,
|
1097
|
+
retry_policy: @config.rpcs.update_instance.retry_policy
|
1098
|
+
|
1099
|
+
options.apply_defaults timeout: @config.timeout,
|
1100
|
+
metadata: @config.metadata,
|
1101
|
+
retry_policy: @config.retry_policy
|
1102
|
+
|
1103
|
+
@alloy_db_admin_stub.update_instance request, options do |result, operation|
|
1104
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1105
|
+
yield result, operation if block_given?
|
1106
|
+
return result
|
1107
|
+
end
|
1108
|
+
rescue ::Gapic::Rest::Error => e
|
1109
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
##
|
1113
|
+
# Deletes a single Instance.
|
1114
|
+
#
|
1115
|
+
# @overload delete_instance(request, options = nil)
|
1116
|
+
# Pass arguments to `delete_instance` via a request object, either of type
|
1117
|
+
# {::Google::Cloud::AlloyDB::V1::DeleteInstanceRequest} or an equivalent Hash.
|
1118
|
+
#
|
1119
|
+
# @param request [::Google::Cloud::AlloyDB::V1::DeleteInstanceRequest, ::Hash]
|
1120
|
+
# A request object representing the call parameters. Required. To specify no
|
1121
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1122
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1123
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1124
|
+
#
|
1125
|
+
# @overload delete_instance(name: nil, request_id: nil, etag: nil, validate_only: nil)
|
1126
|
+
# Pass arguments to `delete_instance` via keyword arguments. Note that at
|
1127
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1128
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1129
|
+
#
|
1130
|
+
# @param name [::String]
|
1131
|
+
# Required. The name of the resource. For the required format, see the
|
1132
|
+
# comment on the Instance.name field.
|
1133
|
+
# @param request_id [::String]
|
1134
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1135
|
+
# request ID so that if you must retry your request, the server will know to
|
1136
|
+
# ignore the request if it has already been completed. The server will
|
1137
|
+
# guarantee that for at least 60 minutes after the first request.
|
1138
|
+
#
|
1139
|
+
# For example, consider a situation where you make an initial request and
|
1140
|
+
# the request times out. If you make the request again with the same request
|
1141
|
+
# ID, the server can check if original operation with the same request ID
|
1142
|
+
# was received, and if so, will ignore the second request. This prevents
|
1143
|
+
# clients from accidentally creating duplicate commitments.
|
1144
|
+
#
|
1145
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1146
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1147
|
+
# @param etag [::String]
|
1148
|
+
# Optional. The current etag of the Instance.
|
1149
|
+
# If an etag is provided and does not match the current etag of the Instance,
|
1150
|
+
# deletion will be blocked and an ABORTED error will be returned.
|
1151
|
+
# @param validate_only [::Boolean]
|
1152
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1153
|
+
# any other type of validation), but do not actually execute the delete.
|
1154
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1155
|
+
# @yieldparam result [::Gapic::Operation]
|
1156
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1157
|
+
#
|
1158
|
+
# @return [::Gapic::Operation]
|
1159
|
+
#
|
1160
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1161
|
+
def delete_instance request, options = nil
|
1162
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1163
|
+
|
1164
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteInstanceRequest
|
1165
|
+
|
1166
|
+
# Converts hash and nil to an options object
|
1167
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1168
|
+
|
1169
|
+
# Customize the options with defaults
|
1170
|
+
call_metadata = @config.rpcs.delete_instance.metadata.to_h
|
1171
|
+
|
1172
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1173
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1174
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1175
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1176
|
+
transports_version_send: [:rest]
|
1177
|
+
|
1178
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1179
|
+
|
1180
|
+
options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
|
1181
|
+
metadata: call_metadata,
|
1182
|
+
retry_policy: @config.rpcs.delete_instance.retry_policy
|
1183
|
+
|
1184
|
+
options.apply_defaults timeout: @config.timeout,
|
1185
|
+
metadata: @config.metadata,
|
1186
|
+
retry_policy: @config.retry_policy
|
1187
|
+
|
1188
|
+
@alloy_db_admin_stub.delete_instance request, options do |result, operation|
|
1189
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1190
|
+
yield result, operation if block_given?
|
1191
|
+
return result
|
1192
|
+
end
|
1193
|
+
rescue ::Gapic::Rest::Error => e
|
1194
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1195
|
+
end
|
1196
|
+
|
1197
|
+
##
|
1198
|
+
# Forces a Failover for a highly available instance.
|
1199
|
+
# Failover promotes the HA standby instance as the new primary.
|
1200
|
+
# Imperative only.
|
1201
|
+
#
|
1202
|
+
# @overload failover_instance(request, options = nil)
|
1203
|
+
# Pass arguments to `failover_instance` via a request object, either of type
|
1204
|
+
# {::Google::Cloud::AlloyDB::V1::FailoverInstanceRequest} or an equivalent Hash.
|
1205
|
+
#
|
1206
|
+
# @param request [::Google::Cloud::AlloyDB::V1::FailoverInstanceRequest, ::Hash]
|
1207
|
+
# A request object representing the call parameters. Required. To specify no
|
1208
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1209
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1210
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1211
|
+
#
|
1212
|
+
# @overload failover_instance(name: nil, request_id: nil, validate_only: nil)
|
1213
|
+
# Pass arguments to `failover_instance` via keyword arguments. Note that at
|
1214
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1215
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1216
|
+
#
|
1217
|
+
# @param name [::String]
|
1218
|
+
# Required. The name of the resource. For the required format, see the
|
1219
|
+
# comment on the Instance.name field.
|
1220
|
+
# @param request_id [::String]
|
1221
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1222
|
+
# request ID so that if you must retry your request, the server will know to
|
1223
|
+
# ignore the request if it has already been completed. The server will
|
1224
|
+
# guarantee that for at least 60 minutes after the first request.
|
1225
|
+
#
|
1226
|
+
# For example, consider a situation where you make an initial request and
|
1227
|
+
# the request times out. If you make the request again with the same request
|
1228
|
+
# ID, the server can check if original operation with the same request ID
|
1229
|
+
# was received, and if so, will ignore the second request. This prevents
|
1230
|
+
# clients from accidentally creating duplicate commitments.
|
1231
|
+
#
|
1232
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1233
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1234
|
+
# @param validate_only [::Boolean]
|
1235
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1236
|
+
# any other type of validation), but do not actually execute the failover.
|
1237
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1238
|
+
# @yieldparam result [::Gapic::Operation]
|
1239
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1240
|
+
#
|
1241
|
+
# @return [::Gapic::Operation]
|
1242
|
+
#
|
1243
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1244
|
+
def failover_instance request, options = nil
|
1245
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1246
|
+
|
1247
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::FailoverInstanceRequest
|
1248
|
+
|
1249
|
+
# Converts hash and nil to an options object
|
1250
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1251
|
+
|
1252
|
+
# Customize the options with defaults
|
1253
|
+
call_metadata = @config.rpcs.failover_instance.metadata.to_h
|
1254
|
+
|
1255
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1256
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1257
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1258
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1259
|
+
transports_version_send: [:rest]
|
1260
|
+
|
1261
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1262
|
+
|
1263
|
+
options.apply_defaults timeout: @config.rpcs.failover_instance.timeout,
|
1264
|
+
metadata: call_metadata,
|
1265
|
+
retry_policy: @config.rpcs.failover_instance.retry_policy
|
1266
|
+
|
1267
|
+
options.apply_defaults timeout: @config.timeout,
|
1268
|
+
metadata: @config.metadata,
|
1269
|
+
retry_policy: @config.retry_policy
|
1270
|
+
|
1271
|
+
@alloy_db_admin_stub.failover_instance request, options do |result, operation|
|
1272
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1273
|
+
yield result, operation if block_given?
|
1274
|
+
return result
|
1275
|
+
end
|
1276
|
+
rescue ::Gapic::Rest::Error => e
|
1277
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1278
|
+
end
|
1279
|
+
|
1280
|
+
##
|
1281
|
+
# Restart an Instance in a cluster.
|
1282
|
+
# Imperative only.
|
1283
|
+
#
|
1284
|
+
# @overload restart_instance(request, options = nil)
|
1285
|
+
# Pass arguments to `restart_instance` via a request object, either of type
|
1286
|
+
# {::Google::Cloud::AlloyDB::V1::RestartInstanceRequest} or an equivalent Hash.
|
1287
|
+
#
|
1288
|
+
# @param request [::Google::Cloud::AlloyDB::V1::RestartInstanceRequest, ::Hash]
|
1289
|
+
# A request object representing the call parameters. Required. To specify no
|
1290
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1291
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1292
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1293
|
+
#
|
1294
|
+
# @overload restart_instance(name: nil, request_id: nil, validate_only: nil)
|
1295
|
+
# Pass arguments to `restart_instance` via keyword arguments. Note that at
|
1296
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1297
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1298
|
+
#
|
1299
|
+
# @param name [::String]
|
1300
|
+
# Required. The name of the resource. For the required format, see the
|
1301
|
+
# comment on the Instance.name field.
|
1302
|
+
# @param request_id [::String]
|
1303
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1304
|
+
# request ID so that if you must retry your request, the server will know to
|
1305
|
+
# ignore the request if it has already been completed. The server will
|
1306
|
+
# guarantee that for at least 60 minutes after the first request.
|
1307
|
+
#
|
1308
|
+
# For example, consider a situation where you make an initial request and
|
1309
|
+
# the request times out. If you make the request again with the same request
|
1310
|
+
# ID, the server can check if original operation with the same request ID
|
1311
|
+
# was received, and if so, will ignore the second request. This prevents
|
1312
|
+
# clients from accidentally creating duplicate commitments.
|
1313
|
+
#
|
1314
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1315
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1316
|
+
# @param validate_only [::Boolean]
|
1317
|
+
# Optional. If set, performs request validation (e.g. permission checks and
|
1318
|
+
# any other type of validation), but do not actually execute the restart.
|
1319
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1320
|
+
# @yieldparam result [::Gapic::Operation]
|
1321
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1322
|
+
#
|
1323
|
+
# @return [::Gapic::Operation]
|
1324
|
+
#
|
1325
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1326
|
+
def restart_instance request, options = nil
|
1327
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1328
|
+
|
1329
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::RestartInstanceRequest
|
1330
|
+
|
1331
|
+
# Converts hash and nil to an options object
|
1332
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1333
|
+
|
1334
|
+
# Customize the options with defaults
|
1335
|
+
call_metadata = @config.rpcs.restart_instance.metadata.to_h
|
1336
|
+
|
1337
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1338
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1339
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1340
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1341
|
+
transports_version_send: [:rest]
|
1342
|
+
|
1343
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1344
|
+
|
1345
|
+
options.apply_defaults timeout: @config.rpcs.restart_instance.timeout,
|
1346
|
+
metadata: call_metadata,
|
1347
|
+
retry_policy: @config.rpcs.restart_instance.retry_policy
|
1348
|
+
|
1349
|
+
options.apply_defaults timeout: @config.timeout,
|
1350
|
+
metadata: @config.metadata,
|
1351
|
+
retry_policy: @config.retry_policy
|
1352
|
+
|
1353
|
+
@alloy_db_admin_stub.restart_instance request, options do |result, operation|
|
1354
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1355
|
+
yield result, operation if block_given?
|
1356
|
+
return result
|
1357
|
+
end
|
1358
|
+
rescue ::Gapic::Rest::Error => e
|
1359
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1360
|
+
end
|
1361
|
+
|
1362
|
+
##
|
1363
|
+
# Lists Backups in a given project and location.
|
1364
|
+
#
|
1365
|
+
# @overload list_backups(request, options = nil)
|
1366
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
1367
|
+
# {::Google::Cloud::AlloyDB::V1::ListBackupsRequest} or an equivalent Hash.
|
1368
|
+
#
|
1369
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListBackupsRequest, ::Hash]
|
1370
|
+
# A request object representing the call parameters. Required. To specify no
|
1371
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1372
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1373
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1374
|
+
#
|
1375
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
1376
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
1377
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1378
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1379
|
+
#
|
1380
|
+
# @param parent [::String]
|
1381
|
+
# Required. Parent value for ListBackupsRequest
|
1382
|
+
# @param page_size [::Integer]
|
1383
|
+
# Requested page size. Server may return fewer items than requested.
|
1384
|
+
# If unspecified, server will pick an appropriate default.
|
1385
|
+
# @param page_token [::String]
|
1386
|
+
# A token identifying a page of results the server should return.
|
1387
|
+
# @param filter [::String]
|
1388
|
+
# Filtering results
|
1389
|
+
# @param order_by [::String]
|
1390
|
+
# Hint for how to order the results
|
1391
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1392
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::ListBackupsResponse]
|
1393
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1394
|
+
#
|
1395
|
+
# @return [::Google::Cloud::AlloyDB::V1::ListBackupsResponse]
|
1396
|
+
#
|
1397
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1398
|
+
def list_backups request, options = nil
|
1399
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1400
|
+
|
1401
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListBackupsRequest
|
1402
|
+
|
1403
|
+
# Converts hash and nil to an options object
|
1404
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1405
|
+
|
1406
|
+
# Customize the options with defaults
|
1407
|
+
call_metadata = @config.rpcs.list_backups.metadata.to_h
|
1408
|
+
|
1409
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1410
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1411
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1412
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1413
|
+
transports_version_send: [:rest]
|
1414
|
+
|
1415
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1416
|
+
|
1417
|
+
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
1418
|
+
metadata: call_metadata,
|
1419
|
+
retry_policy: @config.rpcs.list_backups.retry_policy
|
1420
|
+
|
1421
|
+
options.apply_defaults timeout: @config.timeout,
|
1422
|
+
metadata: @config.metadata,
|
1423
|
+
retry_policy: @config.retry_policy
|
1424
|
+
|
1425
|
+
@alloy_db_admin_stub.list_backups request, options do |result, operation|
|
1426
|
+
yield result, operation if block_given?
|
1427
|
+
return result
|
1428
|
+
end
|
1429
|
+
rescue ::Gapic::Rest::Error => e
|
1430
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1431
|
+
end
|
1432
|
+
|
1433
|
+
##
|
1434
|
+
# Gets details of a single Backup.
|
1435
|
+
#
|
1436
|
+
# @overload get_backup(request, options = nil)
|
1437
|
+
# Pass arguments to `get_backup` via a request object, either of type
|
1438
|
+
# {::Google::Cloud::AlloyDB::V1::GetBackupRequest} or an equivalent Hash.
|
1439
|
+
#
|
1440
|
+
# @param request [::Google::Cloud::AlloyDB::V1::GetBackupRequest, ::Hash]
|
1441
|
+
# A request object representing the call parameters. Required. To specify no
|
1442
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1443
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1444
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1445
|
+
#
|
1446
|
+
# @overload get_backup(name: nil)
|
1447
|
+
# Pass arguments to `get_backup` via keyword arguments. Note that at
|
1448
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1449
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1450
|
+
#
|
1451
|
+
# @param name [::String]
|
1452
|
+
# Required. Name of the resource
|
1453
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1454
|
+
# @yieldparam result [::Google::Cloud::AlloyDB::V1::Backup]
|
1455
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1456
|
+
#
|
1457
|
+
# @return [::Google::Cloud::AlloyDB::V1::Backup]
|
1458
|
+
#
|
1459
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1460
|
+
def get_backup request, options = nil
|
1461
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1462
|
+
|
1463
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::GetBackupRequest
|
1464
|
+
|
1465
|
+
# Converts hash and nil to an options object
|
1466
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1467
|
+
|
1468
|
+
# Customize the options with defaults
|
1469
|
+
call_metadata = @config.rpcs.get_backup.metadata.to_h
|
1470
|
+
|
1471
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1472
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1473
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1474
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1475
|
+
transports_version_send: [:rest]
|
1476
|
+
|
1477
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1478
|
+
|
1479
|
+
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
1480
|
+
metadata: call_metadata,
|
1481
|
+
retry_policy: @config.rpcs.get_backup.retry_policy
|
1482
|
+
|
1483
|
+
options.apply_defaults timeout: @config.timeout,
|
1484
|
+
metadata: @config.metadata,
|
1485
|
+
retry_policy: @config.retry_policy
|
1486
|
+
|
1487
|
+
@alloy_db_admin_stub.get_backup request, options do |result, operation|
|
1488
|
+
yield result, operation if block_given?
|
1489
|
+
return result
|
1490
|
+
end
|
1491
|
+
rescue ::Gapic::Rest::Error => e
|
1492
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1493
|
+
end
|
1494
|
+
|
1495
|
+
##
|
1496
|
+
# Creates a new Backup in a given project and location.
|
1497
|
+
#
|
1498
|
+
# @overload create_backup(request, options = nil)
|
1499
|
+
# Pass arguments to `create_backup` via a request object, either of type
|
1500
|
+
# {::Google::Cloud::AlloyDB::V1::CreateBackupRequest} or an equivalent Hash.
|
1501
|
+
#
|
1502
|
+
# @param request [::Google::Cloud::AlloyDB::V1::CreateBackupRequest, ::Hash]
|
1503
|
+
# A request object representing the call parameters. Required. To specify no
|
1504
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1505
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1506
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1507
|
+
#
|
1508
|
+
# @overload create_backup(parent: nil, backup_id: nil, backup: nil, request_id: nil, validate_only: nil)
|
1509
|
+
# Pass arguments to `create_backup` via keyword arguments. Note that at
|
1510
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1511
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1512
|
+
#
|
1513
|
+
# @param parent [::String]
|
1514
|
+
# Required. Value for parent.
|
1515
|
+
# @param backup_id [::String]
|
1516
|
+
# Required. ID of the requesting object.
|
1517
|
+
# @param backup [::Google::Cloud::AlloyDB::V1::Backup, ::Hash]
|
1518
|
+
# Required. The resource being created
|
1519
|
+
# @param request_id [::String]
|
1520
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1521
|
+
# request ID so that if you must retry your request, the server will know to
|
1522
|
+
# ignore the request if it has already been completed. The server will
|
1523
|
+
# guarantee that for at least 60 minutes since the first request.
|
1524
|
+
#
|
1525
|
+
# For example, consider a situation where you make an initial request and
|
1526
|
+
# the request times out. If you make the request again with the same request
|
1527
|
+
# ID, the server can check if original operation with the same request ID
|
1528
|
+
# was received, and if so, will ignore the second request. This prevents
|
1529
|
+
# clients from accidentally creating duplicate commitments.
|
1530
|
+
#
|
1531
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1532
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1533
|
+
# @param validate_only [::Boolean]
|
1534
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
1535
|
+
# execute it.
|
1536
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1537
|
+
# @yieldparam result [::Gapic::Operation]
|
1538
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1539
|
+
#
|
1540
|
+
# @return [::Gapic::Operation]
|
1541
|
+
#
|
1542
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1543
|
+
def create_backup request, options = nil
|
1544
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1545
|
+
|
1546
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::CreateBackupRequest
|
1547
|
+
|
1548
|
+
# Converts hash and nil to an options object
|
1549
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1550
|
+
|
1551
|
+
# Customize the options with defaults
|
1552
|
+
call_metadata = @config.rpcs.create_backup.metadata.to_h
|
1553
|
+
|
1554
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1555
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1556
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1557
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1558
|
+
transports_version_send: [:rest]
|
1559
|
+
|
1560
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1561
|
+
|
1562
|
+
options.apply_defaults timeout: @config.rpcs.create_backup.timeout,
|
1563
|
+
metadata: call_metadata,
|
1564
|
+
retry_policy: @config.rpcs.create_backup.retry_policy
|
1565
|
+
|
1566
|
+
options.apply_defaults timeout: @config.timeout,
|
1567
|
+
metadata: @config.metadata,
|
1568
|
+
retry_policy: @config.retry_policy
|
1569
|
+
|
1570
|
+
@alloy_db_admin_stub.create_backup request, options do |result, operation|
|
1571
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1572
|
+
yield result, operation if block_given?
|
1573
|
+
return result
|
1574
|
+
end
|
1575
|
+
rescue ::Gapic::Rest::Error => e
|
1576
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1577
|
+
end
|
1578
|
+
|
1579
|
+
##
|
1580
|
+
# Updates the parameters of a single Backup.
|
1581
|
+
#
|
1582
|
+
# @overload update_backup(request, options = nil)
|
1583
|
+
# Pass arguments to `update_backup` via a request object, either of type
|
1584
|
+
# {::Google::Cloud::AlloyDB::V1::UpdateBackupRequest} or an equivalent Hash.
|
1585
|
+
#
|
1586
|
+
# @param request [::Google::Cloud::AlloyDB::V1::UpdateBackupRequest, ::Hash]
|
1587
|
+
# A request object representing the call parameters. Required. To specify no
|
1588
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1589
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1590
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1591
|
+
#
|
1592
|
+
# @overload update_backup(update_mask: nil, backup: nil, request_id: nil, validate_only: nil, allow_missing: nil)
|
1593
|
+
# Pass arguments to `update_backup` via keyword arguments. Note that at
|
1594
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1595
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1596
|
+
#
|
1597
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
1598
|
+
# Optional. Field mask is used to specify the fields to be overwritten in the
|
1599
|
+
# Backup resource by the update.
|
1600
|
+
# The fields specified in the update_mask are relative to the resource, not
|
1601
|
+
# the full request. A field will be overwritten if it is in the mask. If the
|
1602
|
+
# user does not provide a mask then all fields will be overwritten.
|
1603
|
+
# @param backup [::Google::Cloud::AlloyDB::V1::Backup, ::Hash]
|
1604
|
+
# Required. The resource being updated
|
1605
|
+
# @param request_id [::String]
|
1606
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1607
|
+
# request ID so that if you must retry your request, the server will know to
|
1608
|
+
# ignore the request if it has already been completed. The server will
|
1609
|
+
# guarantee that for at least 60 minutes since the first request.
|
1610
|
+
#
|
1611
|
+
# For example, consider a situation where you make an initial request and
|
1612
|
+
# the request times out. If you make the request again with the same request
|
1613
|
+
# ID, the server can check if original operation with the same request ID
|
1614
|
+
# was received, and if so, will ignore the second request. This prevents
|
1615
|
+
# clients from accidentally creating duplicate commitments.
|
1616
|
+
#
|
1617
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1618
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1619
|
+
# @param validate_only [::Boolean]
|
1620
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
1621
|
+
# execute it.
|
1622
|
+
# @param allow_missing [::Boolean]
|
1623
|
+
# Optional. If set to true, update succeeds even if instance is not found. In
|
1624
|
+
# that case, a new backup is created and `update_mask` is ignored.
|
1625
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1626
|
+
# @yieldparam result [::Gapic::Operation]
|
1627
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1628
|
+
#
|
1629
|
+
# @return [::Gapic::Operation]
|
1630
|
+
#
|
1631
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1632
|
+
def update_backup request, options = nil
|
1633
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1634
|
+
|
1635
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::UpdateBackupRequest
|
1636
|
+
|
1637
|
+
# Converts hash and nil to an options object
|
1638
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1639
|
+
|
1640
|
+
# Customize the options with defaults
|
1641
|
+
call_metadata = @config.rpcs.update_backup.metadata.to_h
|
1642
|
+
|
1643
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1644
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1645
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1646
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1647
|
+
transports_version_send: [:rest]
|
1648
|
+
|
1649
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1650
|
+
|
1651
|
+
options.apply_defaults timeout: @config.rpcs.update_backup.timeout,
|
1652
|
+
metadata: call_metadata,
|
1653
|
+
retry_policy: @config.rpcs.update_backup.retry_policy
|
1654
|
+
|
1655
|
+
options.apply_defaults timeout: @config.timeout,
|
1656
|
+
metadata: @config.metadata,
|
1657
|
+
retry_policy: @config.retry_policy
|
1658
|
+
|
1659
|
+
@alloy_db_admin_stub.update_backup request, options do |result, operation|
|
1660
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1661
|
+
yield result, operation if block_given?
|
1662
|
+
return result
|
1663
|
+
end
|
1664
|
+
rescue ::Gapic::Rest::Error => e
|
1665
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1666
|
+
end
|
1667
|
+
|
1668
|
+
##
|
1669
|
+
# Deletes a single Backup.
|
1670
|
+
#
|
1671
|
+
# @overload delete_backup(request, options = nil)
|
1672
|
+
# Pass arguments to `delete_backup` via a request object, either of type
|
1673
|
+
# {::Google::Cloud::AlloyDB::V1::DeleteBackupRequest} or an equivalent Hash.
|
1674
|
+
#
|
1675
|
+
# @param request [::Google::Cloud::AlloyDB::V1::DeleteBackupRequest, ::Hash]
|
1676
|
+
# A request object representing the call parameters. Required. To specify no
|
1677
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1678
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1679
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1680
|
+
#
|
1681
|
+
# @overload delete_backup(name: nil, request_id: nil, validate_only: nil, etag: nil)
|
1682
|
+
# Pass arguments to `delete_backup` via keyword arguments. Note that at
|
1683
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1684
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1685
|
+
#
|
1686
|
+
# @param name [::String]
|
1687
|
+
# Required. Name of the resource. For the required format, see the comment on
|
1688
|
+
# the Backup.name field.
|
1689
|
+
# @param request_id [::String]
|
1690
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
1691
|
+
# request ID so that if you must retry your request, the server will know to
|
1692
|
+
# ignore the request if it has already been completed. The server will
|
1693
|
+
# guarantee that for at least 60 minutes after the first request.
|
1694
|
+
#
|
1695
|
+
# For example, consider a situation where you make an initial request and
|
1696
|
+
# the request times out. If you make the request again with the same request
|
1697
|
+
# ID, the server can check if original operation with the same request ID
|
1698
|
+
# was received, and if so, will ignore the second request. This prevents
|
1699
|
+
# clients from accidentally creating duplicate commitments.
|
1700
|
+
#
|
1701
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
1702
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
1703
|
+
# @param validate_only [::Boolean]
|
1704
|
+
# Optional. If set, the backend validates the request, but doesn't actually
|
1705
|
+
# execute it.
|
1706
|
+
# @param etag [::String]
|
1707
|
+
# Optional. The current etag of the Backup.
|
1708
|
+
# If an etag is provided and does not match the current etag of the Backup,
|
1709
|
+
# deletion will be blocked and an ABORTED error will be returned.
|
1710
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1711
|
+
# @yieldparam result [::Gapic::Operation]
|
1712
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1713
|
+
#
|
1714
|
+
# @return [::Gapic::Operation]
|
1715
|
+
#
|
1716
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1717
|
+
def delete_backup request, options = nil
|
1718
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1719
|
+
|
1720
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::DeleteBackupRequest
|
1721
|
+
|
1722
|
+
# Converts hash and nil to an options object
|
1723
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1724
|
+
|
1725
|
+
# Customize the options with defaults
|
1726
|
+
call_metadata = @config.rpcs.delete_backup.metadata.to_h
|
1727
|
+
|
1728
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1729
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1730
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1731
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1732
|
+
transports_version_send: [:rest]
|
1733
|
+
|
1734
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1735
|
+
|
1736
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
1737
|
+
metadata: call_metadata,
|
1738
|
+
retry_policy: @config.rpcs.delete_backup.retry_policy
|
1739
|
+
|
1740
|
+
options.apply_defaults timeout: @config.timeout,
|
1741
|
+
metadata: @config.metadata,
|
1742
|
+
retry_policy: @config.retry_policy
|
1743
|
+
|
1744
|
+
@alloy_db_admin_stub.delete_backup request, options do |result, operation|
|
1745
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1746
|
+
yield result, operation if block_given?
|
1747
|
+
return result
|
1748
|
+
end
|
1749
|
+
rescue ::Gapic::Rest::Error => e
|
1750
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1751
|
+
end
|
1752
|
+
|
1753
|
+
##
|
1754
|
+
# Lists SupportedDatabaseFlags for a given project and location.
|
1755
|
+
#
|
1756
|
+
# @overload list_supported_database_flags(request, options = nil)
|
1757
|
+
# Pass arguments to `list_supported_database_flags` via a request object, either of type
|
1758
|
+
# {::Google::Cloud::AlloyDB::V1::ListSupportedDatabaseFlagsRequest} or an equivalent Hash.
|
1759
|
+
#
|
1760
|
+
# @param request [::Google::Cloud::AlloyDB::V1::ListSupportedDatabaseFlagsRequest, ::Hash]
|
1761
|
+
# A request object representing the call parameters. Required. To specify no
|
1762
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1763
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1764
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1765
|
+
#
|
1766
|
+
# @overload list_supported_database_flags(parent: nil, page_size: nil, page_token: nil)
|
1767
|
+
# Pass arguments to `list_supported_database_flags` via keyword arguments. Note that at
|
1768
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1769
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1770
|
+
#
|
1771
|
+
# @param parent [::String]
|
1772
|
+
# Required. The name of the parent resource. The required format is:
|
1773
|
+
# * projects/\\{project}/locations/\\{location}
|
1774
|
+
#
|
1775
|
+
# Regardless of the parent specified here, as long it is contains a valid
|
1776
|
+
# project and location, the service will return a static list of supported
|
1777
|
+
# flags resources. Note that we do not yet support region-specific
|
1778
|
+
# flags.
|
1779
|
+
# @param page_size [::Integer]
|
1780
|
+
# Requested page size. Server may return fewer items than requested.
|
1781
|
+
# If unspecified, server will pick an appropriate default.
|
1782
|
+
# @param page_token [::String]
|
1783
|
+
# A token identifying a page of results the server should return.
|
1784
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1785
|
+
# @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag>]
|
1786
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1787
|
+
#
|
1788
|
+
# @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::AlloyDB::V1::SupportedDatabaseFlag>]
|
1789
|
+
#
|
1790
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1791
|
+
def list_supported_database_flags request, options = nil
|
1792
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1793
|
+
|
1794
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AlloyDB::V1::ListSupportedDatabaseFlagsRequest
|
1795
|
+
|
1796
|
+
# Converts hash and nil to an options object
|
1797
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1798
|
+
|
1799
|
+
# Customize the options with defaults
|
1800
|
+
call_metadata = @config.rpcs.list_supported_database_flags.metadata.to_h
|
1801
|
+
|
1802
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1803
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1804
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1805
|
+
gapic_version: ::Google::Cloud::AlloyDB::V1::VERSION,
|
1806
|
+
transports_version_send: [:rest]
|
1807
|
+
|
1808
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1809
|
+
|
1810
|
+
options.apply_defaults timeout: @config.rpcs.list_supported_database_flags.timeout,
|
1811
|
+
metadata: call_metadata,
|
1812
|
+
retry_policy: @config.rpcs.list_supported_database_flags.retry_policy
|
1813
|
+
|
1814
|
+
options.apply_defaults timeout: @config.timeout,
|
1815
|
+
metadata: @config.metadata,
|
1816
|
+
retry_policy: @config.retry_policy
|
1817
|
+
|
1818
|
+
@alloy_db_admin_stub.list_supported_database_flags request, options do |result, operation|
|
1819
|
+
result = ::Gapic::Rest::PagedEnumerable.new @alloy_db_admin_stub, :list_supported_database_flags, "supported_database_flags", request, result, options
|
1820
|
+
yield result, operation if block_given?
|
1821
|
+
return result
|
1822
|
+
end
|
1823
|
+
rescue ::Gapic::Rest::Error => e
|
1824
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1825
|
+
end
|
1826
|
+
|
1827
|
+
##
|
1828
|
+
# Configuration class for the AlloyDBAdmin REST API.
|
1829
|
+
#
|
1830
|
+
# This class represents the configuration for AlloyDBAdmin REST,
|
1831
|
+
# providing control over timeouts, retry behavior, logging, transport
|
1832
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
1833
|
+
# applied individually to specific RPCs. See
|
1834
|
+
# {::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client::Configuration::Rpcs}
|
1835
|
+
# for a list of RPCs that can be configured independently.
|
1836
|
+
#
|
1837
|
+
# Configuration can be applied globally to all clients, or to a single client
|
1838
|
+
# on construction.
|
1839
|
+
#
|
1840
|
+
# @example
|
1841
|
+
#
|
1842
|
+
# # Modify the global config, setting the timeout for
|
1843
|
+
# # list_clusters to 20 seconds,
|
1844
|
+
# # and all remaining timeouts to 10 seconds.
|
1845
|
+
# ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.configure do |config|
|
1846
|
+
# config.timeout = 10.0
|
1847
|
+
# config.rpcs.list_clusters.timeout = 20.0
|
1848
|
+
# end
|
1849
|
+
#
|
1850
|
+
# # Apply the above configuration only to a new client.
|
1851
|
+
# client = ::Google::Cloud::AlloyDB::V1::AlloyDBAdmin::Rest::Client.new do |config|
|
1852
|
+
# config.timeout = 10.0
|
1853
|
+
# config.rpcs.list_clusters.timeout = 20.0
|
1854
|
+
# end
|
1855
|
+
#
|
1856
|
+
# @!attribute [rw] endpoint
|
1857
|
+
# The hostname or hostname:port of the service endpoint.
|
1858
|
+
# Defaults to `"alloydb.googleapis.com"`.
|
1859
|
+
# @return [::String]
|
1860
|
+
# @!attribute [rw] credentials
|
1861
|
+
# Credentials to send with calls. You may provide any of the following types:
|
1862
|
+
# * (`String`) The path to a service account key file in JSON format
|
1863
|
+
# * (`Hash`) A service account key as a Hash
|
1864
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
1865
|
+
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
1866
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
1867
|
+
# (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
|
1868
|
+
# * (`nil`) indicating no credentials
|
1869
|
+
# @return [::Object]
|
1870
|
+
# @!attribute [rw] scope
|
1871
|
+
# The OAuth scopes
|
1872
|
+
# @return [::Array<::String>]
|
1873
|
+
# @!attribute [rw] lib_name
|
1874
|
+
# The library name as recorded in instrumentation and logging
|
1875
|
+
# @return [::String]
|
1876
|
+
# @!attribute [rw] lib_version
|
1877
|
+
# The library version as recorded in instrumentation and logging
|
1878
|
+
# @return [::String]
|
1879
|
+
# @!attribute [rw] timeout
|
1880
|
+
# The call timeout in seconds.
|
1881
|
+
# @return [::Numeric]
|
1882
|
+
# @!attribute [rw] metadata
|
1883
|
+
# Additional headers to be sent with the call.
|
1884
|
+
# @return [::Hash{::Symbol=>::String}]
|
1885
|
+
# @!attribute [rw] retry_policy
|
1886
|
+
# The retry policy. The value is a hash with the following keys:
|
1887
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1888
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1889
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1890
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1891
|
+
# trigger a retry.
|
1892
|
+
# @return [::Hash]
|
1893
|
+
# @!attribute [rw] quota_project
|
1894
|
+
# A separate project against which to charge quota.
|
1895
|
+
# @return [::String]
|
1896
|
+
#
|
1897
|
+
class Configuration
|
1898
|
+
extend ::Gapic::Config
|
1899
|
+
|
1900
|
+
config_attr :endpoint, "alloydb.googleapis.com", ::String
|
1901
|
+
config_attr :credentials, nil do |value|
|
1902
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
1903
|
+
allowed.any? { |klass| klass === value }
|
1904
|
+
end
|
1905
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
1906
|
+
config_attr :lib_name, nil, ::String, nil
|
1907
|
+
config_attr :lib_version, nil, ::String, nil
|
1908
|
+
config_attr :timeout, nil, ::Numeric, nil
|
1909
|
+
config_attr :metadata, nil, ::Hash, nil
|
1910
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
1911
|
+
config_attr :quota_project, nil, ::String, nil
|
1912
|
+
|
1913
|
+
# @private
|
1914
|
+
# Overrides for http bindings for the RPCs of this service
|
1915
|
+
# are only used when this service is used as mixin, and only
|
1916
|
+
# by the host service.
|
1917
|
+
# @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
|
1918
|
+
config_attr :bindings_override, {}, ::Hash, nil
|
1919
|
+
|
1920
|
+
# @private
|
1921
|
+
def initialize parent_config = nil
|
1922
|
+
@parent_config = parent_config unless parent_config.nil?
|
1923
|
+
|
1924
|
+
yield self if block_given?
|
1925
|
+
end
|
1926
|
+
|
1927
|
+
##
|
1928
|
+
# Configurations for individual RPCs
|
1929
|
+
# @return [Rpcs]
|
1930
|
+
#
|
1931
|
+
def rpcs
|
1932
|
+
@rpcs ||= begin
|
1933
|
+
parent_rpcs = nil
|
1934
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
1935
|
+
Rpcs.new parent_rpcs
|
1936
|
+
end
|
1937
|
+
end
|
1938
|
+
|
1939
|
+
##
|
1940
|
+
# Configuration RPC class for the AlloyDBAdmin API.
|
1941
|
+
#
|
1942
|
+
# Includes fields providing the configuration for each RPC in this service.
|
1943
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
1944
|
+
# the following configuration fields:
|
1945
|
+
#
|
1946
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
1947
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
|
1948
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
1949
|
+
# include the following keys:
|
1950
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
1951
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
1952
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
1953
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
1954
|
+
# trigger a retry.
|
1955
|
+
#
|
1956
|
+
class Rpcs
|
1957
|
+
##
|
1958
|
+
# RPC-specific configuration for `list_clusters`
|
1959
|
+
# @return [::Gapic::Config::Method]
|
1960
|
+
#
|
1961
|
+
attr_reader :list_clusters
|
1962
|
+
##
|
1963
|
+
# RPC-specific configuration for `get_cluster`
|
1964
|
+
# @return [::Gapic::Config::Method]
|
1965
|
+
#
|
1966
|
+
attr_reader :get_cluster
|
1967
|
+
##
|
1968
|
+
# RPC-specific configuration for `create_cluster`
|
1969
|
+
# @return [::Gapic::Config::Method]
|
1970
|
+
#
|
1971
|
+
attr_reader :create_cluster
|
1972
|
+
##
|
1973
|
+
# RPC-specific configuration for `update_cluster`
|
1974
|
+
# @return [::Gapic::Config::Method]
|
1975
|
+
#
|
1976
|
+
attr_reader :update_cluster
|
1977
|
+
##
|
1978
|
+
# RPC-specific configuration for `delete_cluster`
|
1979
|
+
# @return [::Gapic::Config::Method]
|
1980
|
+
#
|
1981
|
+
attr_reader :delete_cluster
|
1982
|
+
##
|
1983
|
+
# RPC-specific configuration for `restore_cluster`
|
1984
|
+
# @return [::Gapic::Config::Method]
|
1985
|
+
#
|
1986
|
+
attr_reader :restore_cluster
|
1987
|
+
##
|
1988
|
+
# RPC-specific configuration for `list_instances`
|
1989
|
+
# @return [::Gapic::Config::Method]
|
1990
|
+
#
|
1991
|
+
attr_reader :list_instances
|
1992
|
+
##
|
1993
|
+
# RPC-specific configuration for `get_instance`
|
1994
|
+
# @return [::Gapic::Config::Method]
|
1995
|
+
#
|
1996
|
+
attr_reader :get_instance
|
1997
|
+
##
|
1998
|
+
# RPC-specific configuration for `create_instance`
|
1999
|
+
# @return [::Gapic::Config::Method]
|
2000
|
+
#
|
2001
|
+
attr_reader :create_instance
|
2002
|
+
##
|
2003
|
+
# RPC-specific configuration for `batch_create_instances`
|
2004
|
+
# @return [::Gapic::Config::Method]
|
2005
|
+
#
|
2006
|
+
attr_reader :batch_create_instances
|
2007
|
+
##
|
2008
|
+
# RPC-specific configuration for `update_instance`
|
2009
|
+
# @return [::Gapic::Config::Method]
|
2010
|
+
#
|
2011
|
+
attr_reader :update_instance
|
2012
|
+
##
|
2013
|
+
# RPC-specific configuration for `delete_instance`
|
2014
|
+
# @return [::Gapic::Config::Method]
|
2015
|
+
#
|
2016
|
+
attr_reader :delete_instance
|
2017
|
+
##
|
2018
|
+
# RPC-specific configuration for `failover_instance`
|
2019
|
+
# @return [::Gapic::Config::Method]
|
2020
|
+
#
|
2021
|
+
attr_reader :failover_instance
|
2022
|
+
##
|
2023
|
+
# RPC-specific configuration for `restart_instance`
|
2024
|
+
# @return [::Gapic::Config::Method]
|
2025
|
+
#
|
2026
|
+
attr_reader :restart_instance
|
2027
|
+
##
|
2028
|
+
# RPC-specific configuration for `list_backups`
|
2029
|
+
# @return [::Gapic::Config::Method]
|
2030
|
+
#
|
2031
|
+
attr_reader :list_backups
|
2032
|
+
##
|
2033
|
+
# RPC-specific configuration for `get_backup`
|
2034
|
+
# @return [::Gapic::Config::Method]
|
2035
|
+
#
|
2036
|
+
attr_reader :get_backup
|
2037
|
+
##
|
2038
|
+
# RPC-specific configuration for `create_backup`
|
2039
|
+
# @return [::Gapic::Config::Method]
|
2040
|
+
#
|
2041
|
+
attr_reader :create_backup
|
2042
|
+
##
|
2043
|
+
# RPC-specific configuration for `update_backup`
|
2044
|
+
# @return [::Gapic::Config::Method]
|
2045
|
+
#
|
2046
|
+
attr_reader :update_backup
|
2047
|
+
##
|
2048
|
+
# RPC-specific configuration for `delete_backup`
|
2049
|
+
# @return [::Gapic::Config::Method]
|
2050
|
+
#
|
2051
|
+
attr_reader :delete_backup
|
2052
|
+
##
|
2053
|
+
# RPC-specific configuration for `list_supported_database_flags`
|
2054
|
+
# @return [::Gapic::Config::Method]
|
2055
|
+
#
|
2056
|
+
attr_reader :list_supported_database_flags
|
2057
|
+
|
2058
|
+
# @private
|
2059
|
+
def initialize parent_rpcs = nil
|
2060
|
+
list_clusters_config = parent_rpcs.list_clusters if parent_rpcs.respond_to? :list_clusters
|
2061
|
+
@list_clusters = ::Gapic::Config::Method.new list_clusters_config
|
2062
|
+
get_cluster_config = parent_rpcs.get_cluster if parent_rpcs.respond_to? :get_cluster
|
2063
|
+
@get_cluster = ::Gapic::Config::Method.new get_cluster_config
|
2064
|
+
create_cluster_config = parent_rpcs.create_cluster if parent_rpcs.respond_to? :create_cluster
|
2065
|
+
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
2066
|
+
update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
|
2067
|
+
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
2068
|
+
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
2069
|
+
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
2070
|
+
restore_cluster_config = parent_rpcs.restore_cluster if parent_rpcs.respond_to? :restore_cluster
|
2071
|
+
@restore_cluster = ::Gapic::Config::Method.new restore_cluster_config
|
2072
|
+
list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances
|
2073
|
+
@list_instances = ::Gapic::Config::Method.new list_instances_config
|
2074
|
+
get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
|
2075
|
+
@get_instance = ::Gapic::Config::Method.new get_instance_config
|
2076
|
+
create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
|
2077
|
+
@create_instance = ::Gapic::Config::Method.new create_instance_config
|
2078
|
+
batch_create_instances_config = parent_rpcs.batch_create_instances if parent_rpcs.respond_to? :batch_create_instances
|
2079
|
+
@batch_create_instances = ::Gapic::Config::Method.new batch_create_instances_config
|
2080
|
+
update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
|
2081
|
+
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
2082
|
+
delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
|
2083
|
+
@delete_instance = ::Gapic::Config::Method.new delete_instance_config
|
2084
|
+
failover_instance_config = parent_rpcs.failover_instance if parent_rpcs.respond_to? :failover_instance
|
2085
|
+
@failover_instance = ::Gapic::Config::Method.new failover_instance_config
|
2086
|
+
restart_instance_config = parent_rpcs.restart_instance if parent_rpcs.respond_to? :restart_instance
|
2087
|
+
@restart_instance = ::Gapic::Config::Method.new restart_instance_config
|
2088
|
+
list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups
|
2089
|
+
@list_backups = ::Gapic::Config::Method.new list_backups_config
|
2090
|
+
get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup
|
2091
|
+
@get_backup = ::Gapic::Config::Method.new get_backup_config
|
2092
|
+
create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup
|
2093
|
+
@create_backup = ::Gapic::Config::Method.new create_backup_config
|
2094
|
+
update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup
|
2095
|
+
@update_backup = ::Gapic::Config::Method.new update_backup_config
|
2096
|
+
delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup
|
2097
|
+
@delete_backup = ::Gapic::Config::Method.new delete_backup_config
|
2098
|
+
list_supported_database_flags_config = parent_rpcs.list_supported_database_flags if parent_rpcs.respond_to? :list_supported_database_flags
|
2099
|
+
@list_supported_database_flags = ::Gapic::Config::Method.new list_supported_database_flags_config
|
2100
|
+
|
2101
|
+
yield self if block_given?
|
2102
|
+
end
|
2103
|
+
end
|
2104
|
+
end
|
2105
|
+
end
|
2106
|
+
end
|
2107
|
+
end
|
2108
|
+
end
|
2109
|
+
end
|
2110
|
+
end
|
2111
|
+
end
|