google-cloud-spanner-admin-instance-v1 0.5.1 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +3 -3
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin/client.rb +286 -76
- data/lib/google/cloud/spanner/admin/instance/v1/instance_admin/operations.rb +145 -33
- data/lib/google/cloud/spanner/admin/instance/v1/version.rb +1 -1
- data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_pb.rb +2 -2
- data/lib/google/spanner/admin/instance/v1/spanner_instance_admin_services_pb.rb +1 -1
- data/proto_docs/google/api/resource.rb +10 -71
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b60d4f4d641038b72773b1053ea14d938c68151b475f13f7421f66d8bcceaf2b
|
4
|
+
data.tar.gz: 80b9437067adc0e67419cbb7435360495b0826c84550b3eab3235d6020789b89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8164781fb039bfb71ba971b2d3389e2530b83ac52edba1fdd77cbe441ebabdd7968a2b64559801833eb6a9be485ee0c9ae2c763f26765330d6d35724423df6f
|
7
|
+
data.tar.gz: 7ee66ab6f99eed4cb69e421b093ca408ffaad49d51f75efca2d177587b3629e1762e9d5bd88622d5b6a5483315b540155bb9474a410899e59106c265bff217a0
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ https://github.com/googleapis/google-cloud-ruby
|
|
9
9
|
This gem is a _versioned_ client. It provides basic client classes for a
|
10
10
|
specific version of the Cloud Spanner Instance Admin V1 API. Most users should consider using
|
11
11
|
the main client gem,
|
12
|
-
[google-cloud-spanner
|
12
|
+
[google-cloud-spanner](https://rubygems.org/gems/google-cloud-spanner).
|
13
13
|
See the section below titled *Which client should I use?* for more information.
|
14
14
|
|
15
15
|
## Installation
|
@@ -83,7 +83,7 @@ about the Ruby support schedule.
|
|
83
83
|
## Which client should I use?
|
84
84
|
|
85
85
|
Most modern Ruby client libraries for Google APIs come in two flavors: the main
|
86
|
-
client library with a name such as `google-cloud-spanner
|
86
|
+
client library with a name such as `google-cloud-spanner`,
|
87
87
|
and lower-level _versioned_ client libraries with names such as
|
88
88
|
`google-cloud-spanner-admin-instance-v1`.
|
89
89
|
_In most cases, you should install the main client._
|
@@ -110,7 +110,7 @@ service version.
|
|
110
110
|
|
111
111
|
We recommend that most users install the main client gem for a service. You can
|
112
112
|
identify this gem as the one _without_ a version in its name, e.g.
|
113
|
-
`google-cloud-spanner
|
113
|
+
`google-cloud-spanner`.
|
114
114
|
The main client is recommended because it will embody the best practices for
|
115
115
|
accessing the service, and may also provide more convenient interfaces or
|
116
116
|
tighter integration into frameworks and third-party libraries. In addition, the
|
@@ -63,13 +63,12 @@ module Google
|
|
63
63
|
# See {::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client::Configuration}
|
64
64
|
# for a description of the configuration fields.
|
65
65
|
#
|
66
|
-
#
|
66
|
+
# @example
|
67
67
|
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
# end
|
68
|
+
# # Modify the configuration for all InstanceAdmin clients
|
69
|
+
# ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config|
|
70
|
+
# config.timeout = 10.0
|
71
|
+
# end
|
73
72
|
#
|
74
73
|
# @yield [config] Configure the Client client.
|
75
74
|
# @yieldparam config [Client::Configuration]
|
@@ -154,19 +153,15 @@ module Google
|
|
154
153
|
##
|
155
154
|
# Create a new InstanceAdmin client object.
|
156
155
|
#
|
157
|
-
#
|
158
|
-
#
|
159
|
-
# To create a new InstanceAdmin client with the default
|
160
|
-
# configuration:
|
161
|
-
#
|
162
|
-
# client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
156
|
+
# @example
|
163
157
|
#
|
164
|
-
#
|
165
|
-
#
|
158
|
+
# # Create a client using the default configuration
|
159
|
+
# client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
166
160
|
#
|
167
|
-
#
|
168
|
-
#
|
169
|
-
#
|
161
|
+
# # Create a client using a custom configuration
|
162
|
+
# client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config|
|
163
|
+
# config.timeout = 10.0
|
164
|
+
# end
|
170
165
|
#
|
171
166
|
# @yield [config] Configure the InstanceAdmin client.
|
172
167
|
# @yieldparam config [Client::Configuration]
|
@@ -186,10 +181,9 @@ module Google
|
|
186
181
|
|
187
182
|
# Create credentials
|
188
183
|
credentials = @config.credentials
|
189
|
-
# Use self-signed JWT if the
|
184
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
190
185
|
# but only if the default endpoint does not have a region prefix.
|
191
|
-
enable_self_signed_jwt = @config.
|
192
|
-
@config.endpoint == Client.configure.endpoint &&
|
186
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
193
187
|
!@config.endpoint.split(".").first.include?("-")
|
194
188
|
credentials ||= Credentials.default scope: @config.scope,
|
195
189
|
enable_self_signed_jwt: enable_self_signed_jwt
|
@@ -201,6 +195,7 @@ module Google
|
|
201
195
|
|
202
196
|
@operations_client = Operations.new do |config|
|
203
197
|
config.credentials = credentials
|
198
|
+
config.quota_project = @quota_project_id
|
204
199
|
config.endpoint = @config.endpoint
|
205
200
|
end
|
206
201
|
|
@@ -260,6 +255,27 @@ module Google
|
|
260
255
|
#
|
261
256
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
262
257
|
#
|
258
|
+
# @example Basic example
|
259
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
260
|
+
#
|
261
|
+
# # Create a client object. The client can be reused for multiple calls.
|
262
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
263
|
+
#
|
264
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
265
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstanceConfigsRequest.new
|
266
|
+
#
|
267
|
+
# # Call the list_instance_configs method.
|
268
|
+
# result = client.list_instance_configs request
|
269
|
+
#
|
270
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
271
|
+
# # iterate over all elements by calling #each, and the enumerable
|
272
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
273
|
+
# # methods are also available for managing paging directly.
|
274
|
+
# result.each do |response|
|
275
|
+
# # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.
|
276
|
+
# p response
|
277
|
+
# end
|
278
|
+
#
|
263
279
|
def list_instance_configs request, options = nil
|
264
280
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
265
281
|
|
@@ -277,16 +293,20 @@ module Google
|
|
277
293
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
278
294
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
295
|
|
280
|
-
header_params = {
|
281
|
-
|
282
|
-
|
296
|
+
header_params = {}
|
297
|
+
if request.parent
|
298
|
+
header_params["parent"] = request.parent
|
299
|
+
end
|
300
|
+
|
283
301
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
284
302
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
285
303
|
|
286
304
|
options.apply_defaults timeout: @config.rpcs.list_instance_configs.timeout,
|
287
305
|
metadata: metadata,
|
288
306
|
retry_policy: @config.rpcs.list_instance_configs.retry_policy
|
289
|
-
|
307
|
+
|
308
|
+
options.apply_defaults timeout: @config.timeout,
|
309
|
+
metadata: @config.metadata,
|
290
310
|
retry_policy: @config.retry_policy
|
291
311
|
|
292
312
|
@instance_admin_stub.call_rpc :list_instance_configs, request, options: options do |response, operation|
|
@@ -328,6 +348,21 @@ module Google
|
|
328
348
|
#
|
329
349
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
330
350
|
#
|
351
|
+
# @example Basic example
|
352
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
353
|
+
#
|
354
|
+
# # Create a client object. The client can be reused for multiple calls.
|
355
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
356
|
+
#
|
357
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
358
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceConfigRequest.new
|
359
|
+
#
|
360
|
+
# # Call the get_instance_config method.
|
361
|
+
# result = client.get_instance_config request
|
362
|
+
#
|
363
|
+
# # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::InstanceConfig.
|
364
|
+
# p result
|
365
|
+
#
|
331
366
|
def get_instance_config request, options = nil
|
332
367
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
333
368
|
|
@@ -345,16 +380,20 @@ module Google
|
|
345
380
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
346
381
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
347
382
|
|
348
|
-
header_params = {
|
349
|
-
|
350
|
-
|
383
|
+
header_params = {}
|
384
|
+
if request.name
|
385
|
+
header_params["name"] = request.name
|
386
|
+
end
|
387
|
+
|
351
388
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
352
389
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
353
390
|
|
354
391
|
options.apply_defaults timeout: @config.rpcs.get_instance_config.timeout,
|
355
392
|
metadata: metadata,
|
356
393
|
retry_policy: @config.rpcs.get_instance_config.retry_policy
|
357
|
-
|
394
|
+
|
395
|
+
options.apply_defaults timeout: @config.timeout,
|
396
|
+
metadata: @config.metadata,
|
358
397
|
retry_policy: @config.retry_policy
|
359
398
|
|
360
399
|
@instance_admin_stub.call_rpc :get_instance_config, request, options: options do |response, operation|
|
@@ -422,6 +461,27 @@ module Google
|
|
422
461
|
#
|
423
462
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
424
463
|
#
|
464
|
+
# @example Basic example
|
465
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
466
|
+
#
|
467
|
+
# # Create a client object. The client can be reused for multiple calls.
|
468
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
469
|
+
#
|
470
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
471
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::ListInstancesRequest.new
|
472
|
+
#
|
473
|
+
# # Call the list_instances method.
|
474
|
+
# result = client.list_instances request
|
475
|
+
#
|
476
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
477
|
+
# # iterate over all elements by calling #each, and the enumerable
|
478
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
479
|
+
# # methods are also available for managing paging directly.
|
480
|
+
# result.each do |response|
|
481
|
+
# # Each element is of type ::Google::Cloud::Spanner::Admin::Instance::V1::Instance.
|
482
|
+
# p response
|
483
|
+
# end
|
484
|
+
#
|
425
485
|
def list_instances request, options = nil
|
426
486
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
427
487
|
|
@@ -439,16 +499,20 @@ module Google
|
|
439
499
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
440
500
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
441
501
|
|
442
|
-
header_params = {
|
443
|
-
|
444
|
-
|
502
|
+
header_params = {}
|
503
|
+
if request.parent
|
504
|
+
header_params["parent"] = request.parent
|
505
|
+
end
|
506
|
+
|
445
507
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
446
508
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
447
509
|
|
448
510
|
options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
|
449
511
|
metadata: metadata,
|
450
512
|
retry_policy: @config.rpcs.list_instances.retry_policy
|
451
|
-
|
513
|
+
|
514
|
+
options.apply_defaults timeout: @config.timeout,
|
515
|
+
metadata: @config.metadata,
|
452
516
|
retry_policy: @config.retry_policy
|
453
517
|
|
454
518
|
@instance_admin_stub.call_rpc :list_instances, request, options: options do |response, operation|
|
@@ -494,6 +558,21 @@ module Google
|
|
494
558
|
#
|
495
559
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
496
560
|
#
|
561
|
+
# @example Basic example
|
562
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
563
|
+
#
|
564
|
+
# # Create a client object. The client can be reused for multiple calls.
|
565
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
566
|
+
#
|
567
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
568
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::GetInstanceRequest.new
|
569
|
+
#
|
570
|
+
# # Call the get_instance method.
|
571
|
+
# result = client.get_instance request
|
572
|
+
#
|
573
|
+
# # The returned object is of type Google::Cloud::Spanner::Admin::Instance::V1::Instance.
|
574
|
+
# p result
|
575
|
+
#
|
497
576
|
def get_instance request, options = nil
|
498
577
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
499
578
|
|
@@ -511,16 +590,20 @@ module Google
|
|
511
590
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
512
591
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
513
592
|
|
514
|
-
header_params = {
|
515
|
-
|
516
|
-
|
593
|
+
header_params = {}
|
594
|
+
if request.name
|
595
|
+
header_params["name"] = request.name
|
596
|
+
end
|
597
|
+
|
517
598
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
518
599
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
519
600
|
|
520
601
|
options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
|
521
602
|
metadata: metadata,
|
522
603
|
retry_policy: @config.rpcs.get_instance.retry_policy
|
523
|
-
|
604
|
+
|
605
|
+
options.apply_defaults timeout: @config.timeout,
|
606
|
+
metadata: @config.metadata,
|
524
607
|
retry_policy: @config.retry_policy
|
525
608
|
|
526
609
|
@instance_admin_stub.call_rpc :get_instance, request, options: options do |response, operation|
|
@@ -601,6 +684,28 @@ module Google
|
|
601
684
|
#
|
602
685
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
603
686
|
#
|
687
|
+
# @example Basic example
|
688
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
689
|
+
#
|
690
|
+
# # Create a client object. The client can be reused for multiple calls.
|
691
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
692
|
+
#
|
693
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
694
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::CreateInstanceRequest.new
|
695
|
+
#
|
696
|
+
# # Call the create_instance method.
|
697
|
+
# result = client.create_instance request
|
698
|
+
#
|
699
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
700
|
+
# # object to check the status of an operation, cancel it, or wait
|
701
|
+
# # for results. Here is how to block until completion:
|
702
|
+
# result.wait_until_done! timeout: 60
|
703
|
+
# if result.response?
|
704
|
+
# p result.response
|
705
|
+
# else
|
706
|
+
# puts "Error!"
|
707
|
+
# end
|
708
|
+
#
|
604
709
|
def create_instance request, options = nil
|
605
710
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
606
711
|
|
@@ -618,16 +723,20 @@ module Google
|
|
618
723
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
619
724
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
620
725
|
|
621
|
-
header_params = {
|
622
|
-
|
623
|
-
|
726
|
+
header_params = {}
|
727
|
+
if request.parent
|
728
|
+
header_params["parent"] = request.parent
|
729
|
+
end
|
730
|
+
|
624
731
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
625
732
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
626
733
|
|
627
734
|
options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
|
628
735
|
metadata: metadata,
|
629
736
|
retry_policy: @config.rpcs.create_instance.retry_policy
|
630
|
-
|
737
|
+
|
738
|
+
options.apply_defaults timeout: @config.timeout,
|
739
|
+
metadata: @config.metadata,
|
631
740
|
retry_policy: @config.retry_policy
|
632
741
|
|
633
742
|
@instance_admin_stub.call_rpc :create_instance, request, options: options do |response, operation|
|
@@ -713,6 +822,28 @@ module Google
|
|
713
822
|
#
|
714
823
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
715
824
|
#
|
825
|
+
# @example Basic example
|
826
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
827
|
+
#
|
828
|
+
# # Create a client object. The client can be reused for multiple calls.
|
829
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
830
|
+
#
|
831
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
832
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::UpdateInstanceRequest.new
|
833
|
+
#
|
834
|
+
# # Call the update_instance method.
|
835
|
+
# result = client.update_instance request
|
836
|
+
#
|
837
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
838
|
+
# # object to check the status of an operation, cancel it, or wait
|
839
|
+
# # for results. Here is how to block until completion:
|
840
|
+
# result.wait_until_done! timeout: 60
|
841
|
+
# if result.response?
|
842
|
+
# p result.response
|
843
|
+
# else
|
844
|
+
# puts "Error!"
|
845
|
+
# end
|
846
|
+
#
|
716
847
|
def update_instance request, options = nil
|
717
848
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
718
849
|
|
@@ -730,16 +861,20 @@ module Google
|
|
730
861
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
731
862
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
732
863
|
|
733
|
-
header_params = {
|
734
|
-
|
735
|
-
|
864
|
+
header_params = {}
|
865
|
+
if request.instance&.name
|
866
|
+
header_params["instance.name"] = request.instance.name
|
867
|
+
end
|
868
|
+
|
736
869
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
737
870
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
738
871
|
|
739
872
|
options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
|
740
873
|
metadata: metadata,
|
741
874
|
retry_policy: @config.rpcs.update_instance.retry_policy
|
742
|
-
|
875
|
+
|
876
|
+
options.apply_defaults timeout: @config.timeout,
|
877
|
+
metadata: @config.metadata,
|
743
878
|
retry_policy: @config.retry_policy
|
744
879
|
|
745
880
|
@instance_admin_stub.call_rpc :update_instance, request, options: options do |response, operation|
|
@@ -791,6 +926,21 @@ module Google
|
|
791
926
|
#
|
792
927
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
793
928
|
#
|
929
|
+
# @example Basic example
|
930
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
931
|
+
#
|
932
|
+
# # Create a client object. The client can be reused for multiple calls.
|
933
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
934
|
+
#
|
935
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
936
|
+
# request = Google::Cloud::Spanner::Admin::Instance::V1::DeleteInstanceRequest.new
|
937
|
+
#
|
938
|
+
# # Call the delete_instance method.
|
939
|
+
# result = client.delete_instance request
|
940
|
+
#
|
941
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
942
|
+
# p result
|
943
|
+
#
|
794
944
|
def delete_instance request, options = nil
|
795
945
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
796
946
|
|
@@ -808,16 +958,20 @@ module Google
|
|
808
958
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
809
959
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
810
960
|
|
811
|
-
header_params = {
|
812
|
-
|
813
|
-
|
961
|
+
header_params = {}
|
962
|
+
if request.name
|
963
|
+
header_params["name"] = request.name
|
964
|
+
end
|
965
|
+
|
814
966
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
815
967
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
816
968
|
|
817
969
|
options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
|
818
970
|
metadata: metadata,
|
819
971
|
retry_policy: @config.rpcs.delete_instance.retry_policy
|
820
|
-
|
972
|
+
|
973
|
+
options.apply_defaults timeout: @config.timeout,
|
974
|
+
metadata: @config.metadata,
|
821
975
|
retry_policy: @config.retry_policy
|
822
976
|
|
823
977
|
@instance_admin_stub.call_rpc :delete_instance, request, options: options do |response, operation|
|
@@ -867,6 +1021,21 @@ module Google
|
|
867
1021
|
#
|
868
1022
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
869
1023
|
#
|
1024
|
+
# @example Basic example
|
1025
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
1026
|
+
#
|
1027
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1028
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
1029
|
+
#
|
1030
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1031
|
+
# request = Google::Iam::V1::SetIamPolicyRequest.new
|
1032
|
+
#
|
1033
|
+
# # Call the set_iam_policy method.
|
1034
|
+
# result = client.set_iam_policy request
|
1035
|
+
#
|
1036
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1037
|
+
# p result
|
1038
|
+
#
|
870
1039
|
def set_iam_policy request, options = nil
|
871
1040
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
872
1041
|
|
@@ -884,16 +1053,20 @@ module Google
|
|
884
1053
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
885
1054
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
886
1055
|
|
887
|
-
header_params = {
|
888
|
-
|
889
|
-
|
1056
|
+
header_params = {}
|
1057
|
+
if request.resource
|
1058
|
+
header_params["resource"] = request.resource
|
1059
|
+
end
|
1060
|
+
|
890
1061
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
891
1062
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
892
1063
|
|
893
1064
|
options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
|
894
1065
|
metadata: metadata,
|
895
1066
|
retry_policy: @config.rpcs.set_iam_policy.retry_policy
|
896
|
-
|
1067
|
+
|
1068
|
+
options.apply_defaults timeout: @config.timeout,
|
1069
|
+
metadata: @config.metadata,
|
897
1070
|
retry_policy: @config.retry_policy
|
898
1071
|
|
899
1072
|
@instance_admin_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
|
@@ -941,6 +1114,21 @@ module Google
|
|
941
1114
|
#
|
942
1115
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
943
1116
|
#
|
1117
|
+
# @example Basic example
|
1118
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
1119
|
+
#
|
1120
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1121
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
1122
|
+
#
|
1123
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1124
|
+
# request = Google::Iam::V1::GetIamPolicyRequest.new
|
1125
|
+
#
|
1126
|
+
# # Call the get_iam_policy method.
|
1127
|
+
# result = client.get_iam_policy request
|
1128
|
+
#
|
1129
|
+
# # The returned object is of type Google::Iam::V1::Policy.
|
1130
|
+
# p result
|
1131
|
+
#
|
944
1132
|
def get_iam_policy request, options = nil
|
945
1133
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
946
1134
|
|
@@ -958,16 +1146,20 @@ module Google
|
|
958
1146
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
959
1147
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
960
1148
|
|
961
|
-
header_params = {
|
962
|
-
|
963
|
-
|
1149
|
+
header_params = {}
|
1150
|
+
if request.resource
|
1151
|
+
header_params["resource"] = request.resource
|
1152
|
+
end
|
1153
|
+
|
964
1154
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
965
1155
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
966
1156
|
|
967
1157
|
options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
|
968
1158
|
metadata: metadata,
|
969
1159
|
retry_policy: @config.rpcs.get_iam_policy.retry_policy
|
970
|
-
|
1160
|
+
|
1161
|
+
options.apply_defaults timeout: @config.timeout,
|
1162
|
+
metadata: @config.metadata,
|
971
1163
|
retry_policy: @config.retry_policy
|
972
1164
|
|
973
1165
|
@instance_admin_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
|
@@ -1018,6 +1210,21 @@ module Google
|
|
1018
1210
|
#
|
1019
1211
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1020
1212
|
#
|
1213
|
+
# @example Basic example
|
1214
|
+
# require "google/cloud/spanner/admin/instance/v1"
|
1215
|
+
#
|
1216
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1217
|
+
# client = Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new
|
1218
|
+
#
|
1219
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1220
|
+
# request = Google::Iam::V1::TestIamPermissionsRequest.new
|
1221
|
+
#
|
1222
|
+
# # Call the test_iam_permissions method.
|
1223
|
+
# result = client.test_iam_permissions request
|
1224
|
+
#
|
1225
|
+
# # The returned object is of type Google::Iam::V1::TestIamPermissionsResponse.
|
1226
|
+
# p result
|
1227
|
+
#
|
1021
1228
|
def test_iam_permissions request, options = nil
|
1022
1229
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
1023
1230
|
|
@@ -1035,16 +1242,20 @@ module Google
|
|
1035
1242
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
1036
1243
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1037
1244
|
|
1038
|
-
header_params = {
|
1039
|
-
|
1040
|
-
|
1245
|
+
header_params = {}
|
1246
|
+
if request.resource
|
1247
|
+
header_params["resource"] = request.resource
|
1248
|
+
end
|
1249
|
+
|
1041
1250
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1042
1251
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
1043
1252
|
|
1044
1253
|
options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
|
1045
1254
|
metadata: metadata,
|
1046
1255
|
retry_policy: @config.rpcs.test_iam_permissions.retry_policy
|
1047
|
-
|
1256
|
+
|
1257
|
+
options.apply_defaults timeout: @config.timeout,
|
1258
|
+
metadata: @config.metadata,
|
1048
1259
|
retry_policy: @config.retry_policy
|
1049
1260
|
|
1050
1261
|
@instance_admin_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
|
@@ -1068,22 +1279,21 @@ module Google
|
|
1068
1279
|
# Configuration can be applied globally to all clients, or to a single client
|
1069
1280
|
# on construction.
|
1070
1281
|
#
|
1071
|
-
#
|
1072
|
-
#
|
1073
|
-
#
|
1074
|
-
# to 20 seconds,
|
1075
|
-
#
|
1076
|
-
#
|
1077
|
-
#
|
1078
|
-
#
|
1079
|
-
#
|
1080
|
-
#
|
1081
|
-
#
|
1082
|
-
#
|
1083
|
-
#
|
1084
|
-
#
|
1085
|
-
#
|
1086
|
-
# end
|
1282
|
+
# @example
|
1283
|
+
#
|
1284
|
+
# # Modify the global config, setting the timeout for
|
1285
|
+
# # list_instance_configs to 20 seconds,
|
1286
|
+
# # and all remaining timeouts to 10 seconds.
|
1287
|
+
# ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.configure do |config|
|
1288
|
+
# config.timeout = 10.0
|
1289
|
+
# config.rpcs.list_instance_configs.timeout = 20.0
|
1290
|
+
# end
|
1291
|
+
#
|
1292
|
+
# # Apply the above configuration only to a new client.
|
1293
|
+
# client = ::Google::Cloud::Spanner::Admin::Instance::V1::InstanceAdmin::Client.new do |config|
|
1294
|
+
# config.timeout = 10.0
|
1295
|
+
# config.rpcs.list_instance_configs.timeout = 20.0
|
1296
|
+
# end
|
1087
1297
|
#
|
1088
1298
|
# @!attribute [rw] endpoint
|
1089
1299
|
# The hostname or hostname:port of the service endpoint.
|
@@ -145,6 +145,27 @@ module Google
|
|
145
145
|
#
|
146
146
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
147
147
|
#
|
148
|
+
# @example Basic example
|
149
|
+
# require "google/longrunning"
|
150
|
+
#
|
151
|
+
# # Create a client object. The client can be reused for multiple calls.
|
152
|
+
# client = Google::Longrunning::Operations::Client.new
|
153
|
+
#
|
154
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
155
|
+
# request = Google::Longrunning::ListOperationsRequest.new
|
156
|
+
#
|
157
|
+
# # Call the list_operations method.
|
158
|
+
# result = client.list_operations request
|
159
|
+
#
|
160
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
161
|
+
# # iterate over all elements by calling #each, and the enumerable
|
162
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
163
|
+
# # methods are also available for managing paging directly.
|
164
|
+
# result.each do |response|
|
165
|
+
# # Each element is of type ::Google::Longrunning::Operation.
|
166
|
+
# p response
|
167
|
+
# end
|
168
|
+
#
|
148
169
|
def list_operations request, options = nil
|
149
170
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
150
171
|
|
@@ -162,16 +183,20 @@ module Google
|
|
162
183
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
163
184
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
164
185
|
|
165
|
-
header_params = {
|
166
|
-
|
167
|
-
|
186
|
+
header_params = {}
|
187
|
+
if request.name
|
188
|
+
header_params["name"] = request.name
|
189
|
+
end
|
190
|
+
|
168
191
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
169
192
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
170
193
|
|
171
194
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
172
195
|
metadata: metadata,
|
173
196
|
retry_policy: @config.rpcs.list_operations.retry_policy
|
174
|
-
|
197
|
+
|
198
|
+
options.apply_defaults timeout: @config.timeout,
|
199
|
+
metadata: @config.metadata,
|
175
200
|
retry_policy: @config.retry_policy
|
176
201
|
|
177
202
|
@operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
|
@@ -215,6 +240,28 @@ module Google
|
|
215
240
|
#
|
216
241
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
217
242
|
#
|
243
|
+
# @example Basic example
|
244
|
+
# require "google/longrunning"
|
245
|
+
#
|
246
|
+
# # Create a client object. The client can be reused for multiple calls.
|
247
|
+
# client = Google::Longrunning::Operations::Client.new
|
248
|
+
#
|
249
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
250
|
+
# request = Google::Longrunning::GetOperationRequest.new
|
251
|
+
#
|
252
|
+
# # Call the get_operation method.
|
253
|
+
# result = client.get_operation request
|
254
|
+
#
|
255
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
256
|
+
# # object to check the status of an operation, cancel it, or wait
|
257
|
+
# # for results. Here is how to block until completion:
|
258
|
+
# result.wait_until_done! timeout: 60
|
259
|
+
# if result.response?
|
260
|
+
# p result.response
|
261
|
+
# else
|
262
|
+
# puts "Error!"
|
263
|
+
# end
|
264
|
+
#
|
218
265
|
def get_operation request, options = nil
|
219
266
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
220
267
|
|
@@ -232,16 +279,20 @@ module Google
|
|
232
279
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
233
280
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
234
281
|
|
235
|
-
header_params = {
|
236
|
-
|
237
|
-
|
282
|
+
header_params = {}
|
283
|
+
if request.name
|
284
|
+
header_params["name"] = request.name
|
285
|
+
end
|
286
|
+
|
238
287
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
239
288
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
240
289
|
|
241
290
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
242
291
|
metadata: metadata,
|
243
292
|
retry_policy: @config.rpcs.get_operation.retry_policy
|
244
|
-
|
293
|
+
|
294
|
+
options.apply_defaults timeout: @config.timeout,
|
295
|
+
metadata: @config.metadata,
|
245
296
|
retry_policy: @config.retry_policy
|
246
297
|
|
247
298
|
@operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
|
@@ -285,6 +336,21 @@ module Google
|
|
285
336
|
#
|
286
337
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
287
338
|
#
|
339
|
+
# @example Basic example
|
340
|
+
# require "google/longrunning"
|
341
|
+
#
|
342
|
+
# # Create a client object. The client can be reused for multiple calls.
|
343
|
+
# client = Google::Longrunning::Operations::Client.new
|
344
|
+
#
|
345
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
346
|
+
# request = Google::Longrunning::DeleteOperationRequest.new
|
347
|
+
#
|
348
|
+
# # Call the delete_operation method.
|
349
|
+
# result = client.delete_operation request
|
350
|
+
#
|
351
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
352
|
+
# p result
|
353
|
+
#
|
288
354
|
def delete_operation request, options = nil
|
289
355
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
290
356
|
|
@@ -302,16 +368,20 @@ module Google
|
|
302
368
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
303
369
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
304
370
|
|
305
|
-
header_params = {
|
306
|
-
|
307
|
-
|
371
|
+
header_params = {}
|
372
|
+
if request.name
|
373
|
+
header_params["name"] = request.name
|
374
|
+
end
|
375
|
+
|
308
376
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
309
377
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
310
378
|
|
311
379
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
312
380
|
metadata: metadata,
|
313
381
|
retry_policy: @config.rpcs.delete_operation.retry_policy
|
314
|
-
|
382
|
+
|
383
|
+
options.apply_defaults timeout: @config.timeout,
|
384
|
+
metadata: @config.metadata,
|
315
385
|
retry_policy: @config.retry_policy
|
316
386
|
|
317
387
|
@operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
|
@@ -360,6 +430,21 @@ module Google
|
|
360
430
|
#
|
361
431
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
362
432
|
#
|
433
|
+
# @example Basic example
|
434
|
+
# require "google/longrunning"
|
435
|
+
#
|
436
|
+
# # Create a client object. The client can be reused for multiple calls.
|
437
|
+
# client = Google::Longrunning::Operations::Client.new
|
438
|
+
#
|
439
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
440
|
+
# request = Google::Longrunning::CancelOperationRequest.new
|
441
|
+
#
|
442
|
+
# # Call the cancel_operation method.
|
443
|
+
# result = client.cancel_operation request
|
444
|
+
#
|
445
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
446
|
+
# p result
|
447
|
+
#
|
363
448
|
def cancel_operation request, options = nil
|
364
449
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
365
450
|
|
@@ -377,16 +462,20 @@ module Google
|
|
377
462
|
gapic_version: ::Google::Cloud::Spanner::Admin::Instance::V1::VERSION
|
378
463
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
379
464
|
|
380
|
-
header_params = {
|
381
|
-
|
382
|
-
|
465
|
+
header_params = {}
|
466
|
+
if request.name
|
467
|
+
header_params["name"] = request.name
|
468
|
+
end
|
469
|
+
|
383
470
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
384
471
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
385
472
|
|
386
473
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
387
474
|
metadata: metadata,
|
388
475
|
retry_policy: @config.rpcs.cancel_operation.retry_policy
|
389
|
-
|
476
|
+
|
477
|
+
options.apply_defaults timeout: @config.timeout,
|
478
|
+
metadata: @config.metadata,
|
390
479
|
retry_policy: @config.retry_policy
|
391
480
|
|
392
481
|
@operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
|
@@ -438,6 +527,28 @@ module Google
|
|
438
527
|
#
|
439
528
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
440
529
|
#
|
530
|
+
# @example Basic example
|
531
|
+
# require "google/longrunning"
|
532
|
+
#
|
533
|
+
# # Create a client object. The client can be reused for multiple calls.
|
534
|
+
# client = Google::Longrunning::Operations::Client.new
|
535
|
+
#
|
536
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
537
|
+
# request = Google::Longrunning::WaitOperationRequest.new
|
538
|
+
#
|
539
|
+
# # Call the wait_operation method.
|
540
|
+
# result = client.wait_operation request
|
541
|
+
#
|
542
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
543
|
+
# # object to check the status of an operation, cancel it, or wait
|
544
|
+
# # for results. Here is how to block until completion:
|
545
|
+
# result.wait_until_done! timeout: 60
|
546
|
+
# if result.response?
|
547
|
+
# p result.response
|
548
|
+
# else
|
549
|
+
# puts "Error!"
|
550
|
+
# end
|
551
|
+
#
|
441
552
|
def wait_operation request, options = nil
|
442
553
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
443
554
|
|
@@ -458,7 +569,9 @@ module Google
|
|
458
569
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|
459
570
|
metadata: metadata,
|
460
571
|
retry_policy: @config.rpcs.wait_operation.retry_policy
|
461
|
-
|
572
|
+
|
573
|
+
options.apply_defaults timeout: @config.timeout,
|
574
|
+
metadata: @config.metadata,
|
462
575
|
retry_policy: @config.retry_policy
|
463
576
|
|
464
577
|
@operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
|
@@ -483,22 +596,21 @@ module Google
|
|
483
596
|
# Configuration can be applied globally to all clients, or to a single client
|
484
597
|
# on construction.
|
485
598
|
#
|
486
|
-
#
|
487
|
-
#
|
488
|
-
#
|
489
|
-
# to 20 seconds,
|
490
|
-
#
|
491
|
-
#
|
492
|
-
#
|
493
|
-
#
|
494
|
-
#
|
495
|
-
#
|
496
|
-
#
|
497
|
-
#
|
498
|
-
#
|
499
|
-
#
|
500
|
-
#
|
501
|
-
# end
|
599
|
+
# @example
|
600
|
+
#
|
601
|
+
# # Modify the global config, setting the timeout for
|
602
|
+
# # list_operations to 20 seconds,
|
603
|
+
# # and all remaining timeouts to 10 seconds.
|
604
|
+
# ::Google::Longrunning::Operations::Client.configure do |config|
|
605
|
+
# config.timeout = 10.0
|
606
|
+
# config.rpcs.list_operations.timeout = 20.0
|
607
|
+
# end
|
608
|
+
#
|
609
|
+
# # Apply the above configuration only to a new client.
|
610
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
611
|
+
# config.timeout = 10.0
|
612
|
+
# config.rpcs.list_operations.timeout = 20.0
|
613
|
+
# end
|
502
614
|
#
|
503
615
|
# @!attribute [rw] endpoint
|
504
616
|
# The hostname or hostname:port of the service endpoint.
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/spanner/admin/instance/v1/spanner_instance_admin.proto
|
3
3
|
|
4
|
-
require 'google/protobuf'
|
5
|
-
|
6
4
|
require 'google/api/annotations_pb'
|
7
5
|
require 'google/api/client_pb'
|
8
6
|
require 'google/api/field_behavior_pb'
|
@@ -13,6 +11,8 @@ require 'google/longrunning/operations_pb'
|
|
13
11
|
require 'google/protobuf/empty_pb'
|
14
12
|
require 'google/protobuf/field_mask_pb'
|
15
13
|
require 'google/protobuf/timestamp_pb'
|
14
|
+
require 'google/protobuf'
|
15
|
+
|
16
16
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
17
17
|
add_file("google/spanner/admin/instance/v1/spanner_instance_admin.proto", :syntax => :proto3) do
|
18
18
|
add_message "google.spanner.admin.instance.v1.ReplicaInfo" do
|
@@ -33,11 +33,7 @@ module Google
|
|
33
33
|
# // For Kubernetes resources, the format is {api group}/{kind}.
|
34
34
|
# option (google.api.resource) = {
|
35
35
|
# type: "pubsub.googleapis.com/Topic"
|
36
|
-
#
|
37
|
-
# pattern: "projects/{project}/topics/{topic}"
|
38
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
39
|
-
# parent_name_extractor: "projects/{project}"
|
40
|
-
# }
|
36
|
+
# pattern: "projects/{project}/topics/{topic}"
|
41
37
|
# };
|
42
38
|
# }
|
43
39
|
#
|
@@ -45,10 +41,7 @@ module Google
|
|
45
41
|
#
|
46
42
|
# resources:
|
47
43
|
# - type: "pubsub.googleapis.com/Topic"
|
48
|
-
#
|
49
|
-
# - pattern: "projects/{project}/topics/{topic}"
|
50
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
51
|
-
# parent_name_extractor: "projects/{project}"
|
44
|
+
# pattern: "projects/{project}/topics/{topic}"
|
52
45
|
#
|
53
46
|
# Sometimes, resources have multiple patterns, typically because they can
|
54
47
|
# live under multiple parents.
|
@@ -58,26 +51,10 @@ module Google
|
|
58
51
|
# message LogEntry {
|
59
52
|
# option (google.api.resource) = {
|
60
53
|
# type: "logging.googleapis.com/LogEntry"
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
# }
|
66
|
-
# name_descriptor: {
|
67
|
-
# pattern: "folders/{folder}/logs/{log}"
|
68
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
69
|
-
# parent_name_extractor: "folders/{folder}"
|
70
|
-
# }
|
71
|
-
# name_descriptor: {
|
72
|
-
# pattern: "organizations/{organization}/logs/{log}"
|
73
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
74
|
-
# parent_name_extractor: "organizations/{organization}"
|
75
|
-
# }
|
76
|
-
# name_descriptor: {
|
77
|
-
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
78
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
79
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
80
|
-
# }
|
54
|
+
# pattern: "projects/{project}/logs/{log}"
|
55
|
+
# pattern: "folders/{folder}/logs/{log}"
|
56
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
57
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
81
58
|
# };
|
82
59
|
# }
|
83
60
|
#
|
@@ -85,48 +62,10 @@ module Google
|
|
85
62
|
#
|
86
63
|
# resources:
|
87
64
|
# - type: 'logging.googleapis.com/LogEntry'
|
88
|
-
#
|
89
|
-
#
|
90
|
-
#
|
91
|
-
#
|
92
|
-
# - pattern: "folders/{folder}/logs/{log}"
|
93
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
94
|
-
# parent_name_extractor: "folders/{folder}"
|
95
|
-
# - pattern: "organizations/{organization}/logs/{log}"
|
96
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Organization"
|
97
|
-
# parent_name_extractor: "organizations/{organization}"
|
98
|
-
# - pattern: "billingAccounts/{billing_account}/logs/{log}"
|
99
|
-
# parent_type: "billing.googleapis.com/BillingAccount"
|
100
|
-
# parent_name_extractor: "billingAccounts/{billing_account}"
|
101
|
-
#
|
102
|
-
# For flexible resources, the resource name doesn't contain parent names, but
|
103
|
-
# the resource itself has parents for policy evaluation.
|
104
|
-
#
|
105
|
-
# Example:
|
106
|
-
#
|
107
|
-
# message Shelf {
|
108
|
-
# option (google.api.resource) = {
|
109
|
-
# type: "library.googleapis.com/Shelf"
|
110
|
-
# name_descriptor: {
|
111
|
-
# pattern: "shelves/{shelf}"
|
112
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
113
|
-
# }
|
114
|
-
# name_descriptor: {
|
115
|
-
# pattern: "shelves/{shelf}"
|
116
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
117
|
-
# }
|
118
|
-
# };
|
119
|
-
# }
|
120
|
-
#
|
121
|
-
# The ResourceDescriptor Yaml config will look like:
|
122
|
-
#
|
123
|
-
# resources:
|
124
|
-
# - type: 'library.googleapis.com/Shelf'
|
125
|
-
# name_descriptor:
|
126
|
-
# - pattern: "shelves/{shelf}"
|
127
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Project"
|
128
|
-
# - pattern: "shelves/{shelf}"
|
129
|
-
# parent_type: "cloudresourcemanager.googleapis.com/Folder"
|
65
|
+
# pattern: "projects/{project}/logs/{log}"
|
66
|
+
# pattern: "folders/{folder}/logs/{log}"
|
67
|
+
# pattern: "organizations/{organization}/logs/{log}"
|
68
|
+
# pattern: "billingAccounts/{billing_account}/logs/{log}"
|
130
69
|
# @!attribute [rw] type
|
131
70
|
# @return [::String]
|
132
71
|
# The resource type. It must be in the format of
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-spanner-admin-instance-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.7'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 2.a
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '0.
|
29
|
+
version: '0.7'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 2.a
|
@@ -179,8 +179,7 @@ dependencies:
|
|
179
179
|
description: Cloud Spanner is a managed, mission-critical, globally consistent and
|
180
180
|
scalable relational database service. Note that google-cloud-spanner-admin-instance-v1
|
181
181
|
is a version-specific client library. For most uses, we recommend installing the
|
182
|
-
main client library google-cloud-spanner
|
183
|
-
for more details.
|
182
|
+
main client library google-cloud-spanner instead. See the readme for more details.
|
184
183
|
email: googleapis-packages@google.com
|
185
184
|
executables: []
|
186
185
|
extensions: []
|
@@ -234,7 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
233
|
- !ruby/object:Gem::Version
|
235
234
|
version: '0'
|
236
235
|
requirements: []
|
237
|
-
rubygems_version: 3.
|
236
|
+
rubygems_version: 3.3.4
|
238
237
|
signing_key:
|
239
238
|
specification_version: 4
|
240
239
|
summary: API Client library for the Cloud Spanner Instance Admin V1 API
|