google-cloud-redis-v1 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ab0e3dfa9a192bc452dd083b29a6a80a931b7d6c74d66910c6fe09ec8ae4c2d
4
- data.tar.gz: 9312119ec04c082cb4f2893431f55874d67ff38ffb50d4de19ab34ce6d47a9e9
3
+ metadata.gz: 595fd860e4b4ce42b1f1b6026a8fde7eca130a34f2f6957962a2f276ccb832bf
4
+ data.tar.gz: 4777b3e84b558879f989c60225ceb86e281bc1e18fa71ab6f5c223b960e4b959
5
5
  SHA512:
6
- metadata.gz: 20a35e9b40ffd6c8d703c3ea27e4535e1595fd6d0da7fac5c31c78b7ada54b9566314408d0f3a4a64c54faac2bc37802d794b2bd3ec007c31ae150dece777a02
7
- data.tar.gz: e21202e3c61adedcfe526350c822d90fb54004a68a0874eadd8d120c116f81b37c5ce667235b7ce0fbc99484801e6619eb4261fe0b91b147856a1f4113af35f8
6
+ metadata.gz: 9528438d9f79e3295b15a308a0c0f884211271ba6f80cfd577ad12f8c727b39427bf593e69c674d73b84ddb4234716420c173dca9db1e70c5da06574155d1a3e
7
+ data.tar.gz: 859fdf7ac313ac590e33175419ae5baf5d2c7cfb09141b3f9968ed9fa6775fc381fd11765373cfe962e2ad6e1157a9fd3897eba0c65620138856c07f2cdd5e64
@@ -238,6 +238,27 @@ module Google
238
238
  #
239
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
240
240
  #
241
+ # @example Basic example
242
+ # require "google/cloud/redis/v1"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Cloud::Redis::V1::ListInstancesRequest.new
249
+ #
250
+ # # Call the list_instances method.
251
+ # result = client.list_instances request
252
+ #
253
+ # # The returned object is of type Gapic::PagedEnumerable. You can
254
+ # # iterate over all elements by calling #each, and the enumerable
255
+ # # will lazily make API calls to fetch subsequent pages. Other
256
+ # # methods are also available for managing paging directly.
257
+ # result.each do |response|
258
+ # # Each element is of type ::Google::Cloud::Redis::V1::Instance.
259
+ # p response
260
+ # end
261
+ #
241
262
  def list_instances request, options = nil
242
263
  raise ::ArgumentError, "request must be provided" if request.nil?
243
264
 
@@ -255,9 +276,11 @@ module Google
255
276
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
256
277
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
257
278
 
258
- header_params = {
259
- "parent" => request.parent
260
- }
279
+ header_params = {}
280
+ if request.parent
281
+ header_params["parent"] = request.parent
282
+ end
283
+
261
284
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
262
285
  metadata[:"x-goog-request-params"] ||= request_params_header
263
286
 
@@ -309,6 +332,21 @@ module Google
309
332
  #
310
333
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
311
334
  #
335
+ # @example Basic example
336
+ # require "google/cloud/redis/v1"
337
+ #
338
+ # # Create a client object. The client can be reused for multiple calls.
339
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
340
+ #
341
+ # # Create a request. To set request fields, pass in keyword arguments.
342
+ # request = Google::Cloud::Redis::V1::GetInstanceRequest.new
343
+ #
344
+ # # Call the get_instance method.
345
+ # result = client.get_instance request
346
+ #
347
+ # # The returned object is of type Google::Cloud::Redis::V1::Instance.
348
+ # p result
349
+ #
312
350
  def get_instance request, options = nil
313
351
  raise ::ArgumentError, "request must be provided" if request.nil?
314
352
 
@@ -326,9 +364,11 @@ module Google
326
364
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
327
365
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
328
366
 
329
- header_params = {
330
- "name" => request.name
331
- }
367
+ header_params = {}
368
+ if request.name
369
+ header_params["name"] = request.name
370
+ end
371
+
332
372
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
333
373
  metadata[:"x-goog-request-params"] ||= request_params_header
334
374
 
@@ -401,6 +441,28 @@ module Google
401
441
  #
402
442
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
403
443
  #
444
+ # @example Basic example
445
+ # require "google/cloud/redis/v1"
446
+ #
447
+ # # Create a client object. The client can be reused for multiple calls.
448
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
449
+ #
450
+ # # Create a request. To set request fields, pass in keyword arguments.
451
+ # request = Google::Cloud::Redis::V1::CreateInstanceRequest.new
452
+ #
453
+ # # Call the create_instance method.
454
+ # result = client.create_instance request
455
+ #
456
+ # # The returned object is of type Gapic::Operation. You can use this
457
+ # # object to check the status of an operation, cancel it, or wait
458
+ # # for results. Here is how to block until completion:
459
+ # result.wait_until_done! timeout: 60
460
+ # if result.response?
461
+ # p result.response
462
+ # else
463
+ # puts "Error!"
464
+ # end
465
+ #
404
466
  def create_instance request, options = nil
405
467
  raise ::ArgumentError, "request must be provided" if request.nil?
406
468
 
@@ -418,9 +480,11 @@ module Google
418
480
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
419
481
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
420
482
 
421
- header_params = {
422
- "parent" => request.parent
423
- }
483
+ header_params = {}
484
+ if request.parent
485
+ header_params["parent"] = request.parent
486
+ end
487
+
424
488
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
425
489
  metadata[:"x-goog-request-params"] ||= request_params_header
426
490
 
@@ -472,6 +536,7 @@ module Google
472
536
  # * `labels`
473
537
  # * `memorySizeGb`
474
538
  # * `redisConfig`
539
+ # * `replica_count`
475
540
  # @param instance [::Google::Cloud::Redis::V1::Instance, ::Hash]
476
541
  # Required. Update description.
477
542
  # Only fields specified in update_mask are updated.
@@ -484,6 +549,28 @@ module Google
484
549
  #
485
550
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
486
551
  #
552
+ # @example Basic example
553
+ # require "google/cloud/redis/v1"
554
+ #
555
+ # # Create a client object. The client can be reused for multiple calls.
556
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
557
+ #
558
+ # # Create a request. To set request fields, pass in keyword arguments.
559
+ # request = Google::Cloud::Redis::V1::UpdateInstanceRequest.new
560
+ #
561
+ # # Call the update_instance method.
562
+ # result = client.update_instance request
563
+ #
564
+ # # The returned object is of type Gapic::Operation. You can use this
565
+ # # object to check the status of an operation, cancel it, or wait
566
+ # # for results. Here is how to block until completion:
567
+ # result.wait_until_done! timeout: 60
568
+ # if result.response?
569
+ # p result.response
570
+ # else
571
+ # puts "Error!"
572
+ # end
573
+ #
487
574
  def update_instance request, options = nil
488
575
  raise ::ArgumentError, "request must be provided" if request.nil?
489
576
 
@@ -501,9 +588,11 @@ module Google
501
588
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
502
589
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
503
590
 
504
- header_params = {
505
- "instance.name" => request.instance.name
506
- }
591
+ header_params = {}
592
+ if request.instance&.name
593
+ header_params["instance.name"] = request.instance.name
594
+ end
595
+
507
596
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
508
597
  metadata[:"x-goog-request-params"] ||= request_params_header
509
598
 
@@ -558,6 +647,28 @@ module Google
558
647
  #
559
648
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
560
649
  #
650
+ # @example Basic example
651
+ # require "google/cloud/redis/v1"
652
+ #
653
+ # # Create a client object. The client can be reused for multiple calls.
654
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
655
+ #
656
+ # # Create a request. To set request fields, pass in keyword arguments.
657
+ # request = Google::Cloud::Redis::V1::UpgradeInstanceRequest.new
658
+ #
659
+ # # Call the upgrade_instance method.
660
+ # result = client.upgrade_instance request
661
+ #
662
+ # # The returned object is of type Gapic::Operation. You can use this
663
+ # # object to check the status of an operation, cancel it, or wait
664
+ # # for results. Here is how to block until completion:
665
+ # result.wait_until_done! timeout: 60
666
+ # if result.response?
667
+ # p result.response
668
+ # else
669
+ # puts "Error!"
670
+ # end
671
+ #
561
672
  def upgrade_instance request, options = nil
562
673
  raise ::ArgumentError, "request must be provided" if request.nil?
563
674
 
@@ -575,9 +686,11 @@ module Google
575
686
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
576
687
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
577
688
 
578
- header_params = {
579
- "name" => request.name
580
- }
689
+ header_params = {}
690
+ if request.name
691
+ header_params["name"] = request.name
692
+ end
693
+
581
694
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
582
695
  metadata[:"x-goog-request-params"] ||= request_params_header
583
696
 
@@ -638,6 +751,28 @@ module Google
638
751
  #
639
752
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
640
753
  #
754
+ # @example Basic example
755
+ # require "google/cloud/redis/v1"
756
+ #
757
+ # # Create a client object. The client can be reused for multiple calls.
758
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
759
+ #
760
+ # # Create a request. To set request fields, pass in keyword arguments.
761
+ # request = Google::Cloud::Redis::V1::ImportInstanceRequest.new
762
+ #
763
+ # # Call the import_instance method.
764
+ # result = client.import_instance request
765
+ #
766
+ # # The returned object is of type Gapic::Operation. You can use this
767
+ # # object to check the status of an operation, cancel it, or wait
768
+ # # for results. Here is how to block until completion:
769
+ # result.wait_until_done! timeout: 60
770
+ # if result.response?
771
+ # p result.response
772
+ # else
773
+ # puts "Error!"
774
+ # end
775
+ #
641
776
  def import_instance request, options = nil
642
777
  raise ::ArgumentError, "request must be provided" if request.nil?
643
778
 
@@ -655,9 +790,11 @@ module Google
655
790
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
656
791
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
657
792
 
658
- header_params = {
659
- "name" => request.name
660
- }
793
+ header_params = {}
794
+ if request.name
795
+ header_params["name"] = request.name
796
+ end
797
+
661
798
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
662
799
  metadata[:"x-goog-request-params"] ||= request_params_header
663
800
 
@@ -716,6 +853,28 @@ module Google
716
853
  #
717
854
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
718
855
  #
856
+ # @example Basic example
857
+ # require "google/cloud/redis/v1"
858
+ #
859
+ # # Create a client object. The client can be reused for multiple calls.
860
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
861
+ #
862
+ # # Create a request. To set request fields, pass in keyword arguments.
863
+ # request = Google::Cloud::Redis::V1::ExportInstanceRequest.new
864
+ #
865
+ # # Call the export_instance method.
866
+ # result = client.export_instance request
867
+ #
868
+ # # The returned object is of type Gapic::Operation. You can use this
869
+ # # object to check the status of an operation, cancel it, or wait
870
+ # # for results. Here is how to block until completion:
871
+ # result.wait_until_done! timeout: 60
872
+ # if result.response?
873
+ # p result.response
874
+ # else
875
+ # puts "Error!"
876
+ # end
877
+ #
719
878
  def export_instance request, options = nil
720
879
  raise ::ArgumentError, "request must be provided" if request.nil?
721
880
 
@@ -733,9 +892,11 @@ module Google
733
892
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
734
893
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
735
894
 
736
- header_params = {
737
- "name" => request.name
738
- }
895
+ header_params = {}
896
+ if request.name
897
+ header_params["name"] = request.name
898
+ end
899
+
739
900
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
740
901
  metadata[:"x-goog-request-params"] ||= request_params_header
741
902
 
@@ -757,7 +918,7 @@ module Google
757
918
  end
758
919
 
759
920
  ##
760
- # Initiates a failover of the master node to current replica node for a
921
+ # Initiates a failover of the primary node to current replica node for a
761
922
  # specific STANDARD tier Cloud Memorystore for Redis instance.
762
923
  #
763
924
  # @overload failover_instance(request, options = nil)
@@ -791,6 +952,28 @@ module Google
791
952
  #
792
953
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
793
954
  #
955
+ # @example Basic example
956
+ # require "google/cloud/redis/v1"
957
+ #
958
+ # # Create a client object. The client can be reused for multiple calls.
959
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
960
+ #
961
+ # # Create a request. To set request fields, pass in keyword arguments.
962
+ # request = Google::Cloud::Redis::V1::FailoverInstanceRequest.new
963
+ #
964
+ # # Call the failover_instance method.
965
+ # result = client.failover_instance request
966
+ #
967
+ # # The returned object is of type Gapic::Operation. You can use this
968
+ # # object to check the status of an operation, cancel it, or wait
969
+ # # for results. Here is how to block until completion:
970
+ # result.wait_until_done! timeout: 60
971
+ # if result.response?
972
+ # p result.response
973
+ # else
974
+ # puts "Error!"
975
+ # end
976
+ #
794
977
  def failover_instance request, options = nil
795
978
  raise ::ArgumentError, "request must be provided" if request.nil?
796
979
 
@@ -808,9 +991,11 @@ module Google
808
991
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
809
992
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
810
993
 
811
- header_params = {
812
- "name" => request.name
813
- }
994
+ header_params = {}
995
+ if request.name
996
+ header_params["name"] = request.name
997
+ end
998
+
814
999
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
815
1000
  metadata[:"x-goog-request-params"] ||= request_params_header
816
1001
 
@@ -863,6 +1048,28 @@ module Google
863
1048
  #
864
1049
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
865
1050
  #
1051
+ # @example Basic example
1052
+ # require "google/cloud/redis/v1"
1053
+ #
1054
+ # # Create a client object. The client can be reused for multiple calls.
1055
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
1056
+ #
1057
+ # # Create a request. To set request fields, pass in keyword arguments.
1058
+ # request = Google::Cloud::Redis::V1::DeleteInstanceRequest.new
1059
+ #
1060
+ # # Call the delete_instance method.
1061
+ # result = client.delete_instance request
1062
+ #
1063
+ # # The returned object is of type Gapic::Operation. You can use this
1064
+ # # object to check the status of an operation, cancel it, or wait
1065
+ # # for results. Here is how to block until completion:
1066
+ # result.wait_until_done! timeout: 60
1067
+ # if result.response?
1068
+ # p result.response
1069
+ # else
1070
+ # puts "Error!"
1071
+ # end
1072
+ #
866
1073
  def delete_instance request, options = nil
867
1074
  raise ::ArgumentError, "request must be provided" if request.nil?
868
1075
 
@@ -880,9 +1087,11 @@ module Google
880
1087
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
881
1088
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
882
1089
 
883
- header_params = {
884
- "name" => request.name
885
- }
1090
+ header_params = {}
1091
+ if request.name
1092
+ header_params["name"] = request.name
1093
+ end
1094
+
886
1095
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
887
1096
  metadata[:"x-goog-request-params"] ||= request_params_header
888
1097
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::Redis::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/redis/v1/cloud_redis.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'
@@ -10,8 +8,14 @@ require 'google/api/resource_pb'
10
8
  require 'google/longrunning/operations_pb'
11
9
  require 'google/protobuf/field_mask_pb'
12
10
  require 'google/protobuf/timestamp_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/redis/v1/cloud_redis.proto", :syntax => :proto3) do
15
+ add_message "google.cloud.redis.v1.NodeInfo" do
16
+ optional :id, :string, 1
17
+ optional :zone, :string, 2
18
+ end
15
19
  add_message "google.cloud.redis.v1.Instance" do
16
20
  optional :name, :string, 1
17
21
  optional :display_name, :string, 2
@@ -32,6 +36,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
32
36
  optional :authorized_network, :string, 20
33
37
  optional :persistence_iam_identity, :string, 21
34
38
  optional :connect_mode, :enum, 22, "google.cloud.redis.v1.Instance.ConnectMode"
39
+ optional :replica_count, :int32, 31
40
+ repeated :nodes, :message, 32, "google.cloud.redis.v1.NodeInfo"
41
+ optional :read_endpoint, :string, 33
42
+ optional :read_endpoint_port, :int32, 34
43
+ optional :read_replicas_mode, :enum, 35, "google.cloud.redis.v1.Instance.ReadReplicasMode"
35
44
  end
36
45
  add_enum "google.cloud.redis.v1.Instance.State" do
37
46
  value :STATE_UNSPECIFIED, 0
@@ -54,6 +63,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
54
63
  value :DIRECT_PEERING, 1
55
64
  value :PRIVATE_SERVICE_ACCESS, 2
56
65
  end
66
+ add_enum "google.cloud.redis.v1.Instance.ReadReplicasMode" do
67
+ value :READ_REPLICAS_MODE_UNSPECIFIED, 0
68
+ value :READ_REPLICAS_DISABLED, 1
69
+ value :READ_REPLICAS_ENABLED, 2
70
+ end
57
71
  add_message "google.cloud.redis.v1.ListInstancesRequest" do
58
72
  optional :parent, :string, 1
59
73
  optional :page_size, :int32, 2
@@ -137,10 +151,12 @@ module Google
137
151
  module Cloud
138
152
  module Redis
139
153
  module V1
154
+ NodeInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.NodeInfo").msgclass
140
155
  Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance").msgclass
141
156
  Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.State").enummodule
142
157
  Instance::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.Tier").enummodule
143
158
  Instance::ConnectMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.ConnectMode").enummodule
159
+ Instance::ReadReplicasMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.ReadReplicasMode").enummodule
144
160
  ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.ListInstancesRequest").msgclass
145
161
  ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.ListInstancesResponse").msgclass
146
162
  GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.GetInstanceRequest").msgclass
@@ -41,7 +41,7 @@ module Google
41
41
  # * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
42
42
  class Service
43
43
 
44
- include GRPC::GenericService
44
+ include ::GRPC::GenericService
45
45
 
46
46
  self.marshal_class_method = :encode
47
47
  self.unmarshal_class_method = :decode
@@ -97,7 +97,7 @@ module Google
97
97
  # The returned operation is automatically deleted after a few hours, so
98
98
  # there is no need to call DeleteOperation.
99
99
  rpc :ExportInstance, ::Google::Cloud::Redis::V1::ExportInstanceRequest, ::Google::Longrunning::Operation
100
- # Initiates a failover of the master node to current replica node for a
100
+ # Initiates a failover of the primary node to current replica node for a
101
101
  # specific STANDARD tier Cloud Memorystore for Redis instance.
102
102
  rpc :FailoverInstance, ::Google::Cloud::Redis::V1::FailoverInstanceRequest, ::Google::Longrunning::Operation
103
103
  # Deletes a specific Redis instance. Instance stops serving and data is
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Redis
23
23
  module V1
24
- VERSION = "0.5.3"
24
+ VERSION = "0.6.0"
25
25
  end
26
26
  end
27
27
  end
@@ -21,6 +21,18 @@ module Google
21
21
  module Cloud
22
22
  module Redis
23
23
  module V1
24
+ # Node specific properties.
25
+ # @!attribute [r] id
26
+ # @return [::String]
27
+ # Output only. Node identifying string. e.g. 'node-0', 'node-1'
28
+ # @!attribute [r] zone
29
+ # @return [::String]
30
+ # Output only. Location of the node.
31
+ class NodeInfo
32
+ include ::Google::Protobuf::MessageExts
33
+ extend ::Google::Protobuf::MessageExts::ClassMethods
34
+ end
35
+
24
36
  # A Google Cloud Redis instance.
25
37
  # @!attribute [rw] name
26
38
  # @return [::String]
@@ -42,15 +54,17 @@ module Google
42
54
  # @!attribute [rw] location_id
43
55
  # @return [::String]
44
56
  # Optional. The zone where the instance will be provisioned. If not provided,
45
- # the service will choose a zone for the instance. For STANDARD_HA tier,
46
- # instances will be created across two zones for protection against zonal
47
- # failures. If {::Google::Cloud::Redis::V1::Instance#alternative_location_id alternative_location_id} is also provided, it must be
48
- # different from {::Google::Cloud::Redis::V1::Instance#location_id location_id}.
57
+ # the service will choose a zone from the specified region for the instance.
58
+ # For standard tier, additional nodes will be added across multiple zones for
59
+ # protection against zonal failures. If specified, at least one node will be
60
+ # provisioned in this zone.
49
61
  # @!attribute [rw] alternative_location_id
50
62
  # @return [::String]
51
- # Optional. Only applicable to STANDARD_HA tier which protects the instance
52
- # against zonal failures by provisioning it across two zones. If provided, it
53
- # must be a different zone from the one provided in {::Google::Cloud::Redis::V1::Instance#location_id location_id}.
63
+ # Optional. If specified, at least one node will be provisioned in this zone
64
+ # in addition to the zone specified in location_id. Only applicable to
65
+ # standard tier. If provided, it must be a different zone from the one
66
+ # provided in [location_id]. Additional nodes beyond the first 2 will be
67
+ # placed in zones selected by the service.
54
68
  # @!attribute [rw] redis_version
55
69
  # @return [::String]
56
70
  # Optional. The version of Redis software.
@@ -60,12 +74,17 @@ module Google
60
74
  # * `REDIS_3_2` for Redis 3.2 compatibility
61
75
  # * `REDIS_4_0` for Redis 4.0 compatibility (default)
62
76
  # * `REDIS_5_0` for Redis 5.0 compatibility
77
+ # * `REDIS_6_X` for Redis 6.x compatibility
63
78
  # @!attribute [rw] reserved_ip_range
64
79
  # @return [::String]
65
- # Optional. The CIDR range of internal addresses that are reserved for this
66
- # instance. If not provided, the service will choose an unused /29 block,
67
- # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
68
- # and non-overlapping with existing subnets in an authorized network.
80
+ # Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
81
+ # that are reserved for this instance. Range must
82
+ # be unique and non-overlapping with existing subnets in an authorized
83
+ # network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
84
+ # address ranges associated with this private service access connection.
85
+ # If not provided, the service will choose an unused /29 block, for
86
+ # example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
87
+ # the default block size is /28.
69
88
  # @!attribute [r] host
70
89
  # @return [::String]
71
90
  # Output only. Hostname or IP address of the exposed Redis endpoint used by
@@ -75,11 +94,9 @@ module Google
75
94
  # Output only. The port number of the exposed Redis endpoint.
76
95
  # @!attribute [r] current_location_id
77
96
  # @return [::String]
78
- # Output only. The current zone where the Redis endpoint is placed. For Basic
79
- # Tier instances, this will always be the same as the {::Google::Cloud::Redis::V1::Instance#location_id location_id}
80
- # provided by the user at creation time. For Standard Tier instances,
81
- # this can be either {::Google::Cloud::Redis::V1::Instance#location_id location_id} or {::Google::Cloud::Redis::V1::Instance#alternative_location_id alternative_location_id} and can
82
- # change after a failover event.
97
+ # Output only. The current zone where the Redis primary node is located. In
98
+ # basic tier, this will always be the same as [location_id]. In
99
+ # standard tier, this can be the zone of any node in the instance.
83
100
  # @!attribute [r] create_time
84
101
  # @return [::Google::Protobuf::Timestamp]
85
102
  # Output only. The time the instance was created.
@@ -135,6 +152,27 @@ module Google
135
152
  # @return [::Google::Cloud::Redis::V1::Instance::ConnectMode]
136
153
  # Optional. The network connect mode of the Redis instance.
137
154
  # If not provided, the connect mode defaults to DIRECT_PEERING.
155
+ # @!attribute [rw] replica_count
156
+ # @return [::Integer]
157
+ # Optional. The number of replica nodes. Valid range for standard tier
158
+ # is [1-5] and defaults to 1. Valid value for basic tier is 0 and defaults
159
+ # to 0.
160
+ # @!attribute [r] nodes
161
+ # @return [::Array<::Google::Cloud::Redis::V1::NodeInfo>]
162
+ # Output only. Info per node.
163
+ # @!attribute [r] read_endpoint
164
+ # @return [::String]
165
+ # Output only. Hostname or IP address of the exposed readonly Redis
166
+ # endpoint. Standard tier only. Targets all healthy replica nodes in
167
+ # instance. Replication is asynchronous and replica nodes will exhibit some
168
+ # lag behind the primary. Write requests must target 'host'.
169
+ # @!attribute [r] read_endpoint_port
170
+ # @return [::Integer]
171
+ # Output only. The port number of the exposed readonly redis
172
+ # endpoint. Standard tier only. Write requests should target 'port'.
173
+ # @!attribute [rw] read_replicas_mode
174
+ # @return [::Google::Cloud::Redis::V1::Instance::ReadReplicasMode]
175
+ # Optional. Read replica mode.
138
176
  class Instance
139
177
  include ::Google::Protobuf::MessageExts
140
178
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -214,6 +252,21 @@ module Google
214
252
  # Google Cloud services, including Memorystore.
215
253
  PRIVATE_SERVICE_ACCESS = 2
216
254
  end
255
+
256
+ # Read replicas mode.
257
+ module ReadReplicasMode
258
+ # If not set, Memorystore Redis backend will pick the mode based on other fields in
259
+ # the request.
260
+ READ_REPLICAS_MODE_UNSPECIFIED = 0
261
+
262
+ # If disabled, read endpoint will not be provided and the instance cannot
263
+ # scale up or down the number of replicas.
264
+ READ_REPLICAS_DISABLED = 1
265
+
266
+ # If enabled, read endpoint will be provided and the instance can scale
267
+ # up and down the number of replicas.
268
+ READ_REPLICAS_ENABLED = 2
269
+ end
217
270
  end
218
271
 
219
272
  # Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#list_instances ListInstances}.
@@ -248,11 +301,12 @@ module Google
248
301
  #
249
302
  # If the `location_id` in the parent field of the request is "-", all regions
250
303
  # available to the project are queried, and the results aggregated.
251
- # If in such an aggregated query a location is unavailable, a dummy Redis
252
- # entry is included in the response with the `name` field set to a value of
253
- # the form `projects/{project_id}/locations/{location_id}/instances/`- and
254
- # the `status` field set to ERROR and `status_message` field set to "location
255
- # not available for ListInstances".
304
+ # If in such an aggregated query a location is unavailable, a placeholder
305
+ # Redis entry is included in the response with the `name` field set to a
306
+ # value of the form
307
+ # `projects/{project_id}/locations/{location_id}/instances/`- and the
308
+ # `status` field set to ERROR and `status_message` field set to "location not
309
+ # available for ListInstances".
256
310
  # @!attribute [rw] next_page_token
257
311
  # @return [::String]
258
312
  # Token to retrieve the next page of results, or empty if there are no more
@@ -311,6 +365,7 @@ module Google
311
365
  # * `labels`
312
366
  # * `memorySizeGb`
313
367
  # * `redisConfig`
368
+ # * `replica_count`
314
369
  # @!attribute [rw] instance
315
370
  # @return [::Google::Cloud::Redis::V1::Instance]
316
371
  # Required. Update description.
@@ -432,7 +487,7 @@ module Google
432
487
 
433
488
  # Instance failover will be protected with data loss control. More
434
489
  # specifically, the failover will only be performed if the current
435
- # replication offset diff between master and replica is under a certain
490
+ # replication offset diff between primary and replica is under a certain
436
491
  # threshold.
437
492
  LIMITED_DATA_LOSS = 1
438
493
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-redis-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-11 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common