google-cloud-redis-cluster-v1 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/redis/cluster/v1/bindings_override.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/client.rb +1953 -339
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/credentials.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/operations.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/paths.rb +85 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/client.rb +1842 -333
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/operations.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest/service_stub.rb +942 -23
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster/rest.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster_pb.rb +32 -1
- data/lib/google/cloud/redis/cluster/v1/cloud_redis_cluster_services_pb.rb +52 -1
- data/lib/google/cloud/redis/cluster/v1/rest.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1/version.rb +1 -1
- data/lib/google/cloud/redis/cluster/v1.rb +1 -1
- data/lib/google-cloud-redis-cluster-v1.rb +1 -1
- data/proto_docs/google/api/client.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +1 -1
- data/proto_docs/google/api/field_info.rb +1 -1
- data/proto_docs/google/api/launch_stage.rb +1 -1
- data/proto_docs/google/api/resource.rb +1 -1
- data/proto_docs/google/cloud/redis/cluster/v1/cloud_redis_cluster.rb +596 -1
- data/proto_docs/google/longrunning/operations.rb +1 -1
- data/proto_docs/google/protobuf/any.rb +1 -1
- data/proto_docs/google/protobuf/duration.rb +1 -1
- data/proto_docs/google/protobuf/empty.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +1 -1
- data/proto_docs/google/protobuf/timestamp.rb +8 -7
- data/proto_docs/google/rpc/status.rb +1 -1
- data/proto_docs/google/type/dayofweek.rb +1 -1
- data/proto_docs/google/type/timeofday.rb +1 -1
- metadata +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Copyright
|
|
3
|
+
# Copyright 2026 Google LLC
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -88,14 +88,24 @@ module Google
|
|
|
88
88
|
|
|
89
89
|
default_config.rpcs.list_clusters.timeout = 600.0
|
|
90
90
|
|
|
91
|
+
default_config.rpcs.list_acl_policies.timeout = 600.0
|
|
92
|
+
|
|
91
93
|
default_config.rpcs.get_cluster.timeout = 600.0
|
|
92
94
|
|
|
95
|
+
default_config.rpcs.get_acl_policy.timeout = 600.0
|
|
96
|
+
|
|
93
97
|
default_config.rpcs.update_cluster.timeout = 600.0
|
|
94
98
|
|
|
99
|
+
default_config.rpcs.update_acl_policy.timeout = 600.0
|
|
100
|
+
|
|
95
101
|
default_config.rpcs.delete_cluster.timeout = 600.0
|
|
96
102
|
|
|
103
|
+
default_config.rpcs.delete_acl_policy.timeout = 600.0
|
|
104
|
+
|
|
97
105
|
default_config.rpcs.create_cluster.timeout = 600.0
|
|
98
106
|
|
|
107
|
+
default_config.rpcs.create_acl_policy.timeout = 600.0
|
|
108
|
+
|
|
99
109
|
default_config.rpcs.get_cluster_certificate_authority.timeout = 600.0
|
|
100
110
|
|
|
101
111
|
default_config.rpcs.reschedule_cluster_maintenance.timeout = 600.0
|
|
@@ -368,6 +378,120 @@ module Google
|
|
|
368
378
|
raise ::Google::Cloud::Error.from_error(e)
|
|
369
379
|
end
|
|
370
380
|
|
|
381
|
+
##
|
|
382
|
+
# Lists all ACL policies owned by a project in either the specified
|
|
383
|
+
# location (region) or all locations.
|
|
384
|
+
#
|
|
385
|
+
# The location should have the following format:
|
|
386
|
+
#
|
|
387
|
+
# * `projects/{project_id}/locations/{location_id}`
|
|
388
|
+
#
|
|
389
|
+
# If `location_id` is specified as `-` (wildcard), then all regions
|
|
390
|
+
# available to the project are queried, and the results are aggregated.
|
|
391
|
+
#
|
|
392
|
+
# @overload list_acl_policies(request, options = nil)
|
|
393
|
+
# Pass arguments to `list_acl_policies` via a request object, either of type
|
|
394
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListAclPoliciesRequest} or an equivalent Hash.
|
|
395
|
+
#
|
|
396
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ListAclPoliciesRequest, ::Hash]
|
|
397
|
+
# A request object representing the call parameters. Required. To specify no
|
|
398
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
399
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
400
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
401
|
+
#
|
|
402
|
+
# @overload list_acl_policies(parent: nil, page_size: nil, page_token: nil)
|
|
403
|
+
# Pass arguments to `list_acl_policies` via keyword arguments. Note that at
|
|
404
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
405
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
406
|
+
#
|
|
407
|
+
# @param parent [::String]
|
|
408
|
+
# Required. The resource name of the ACL policy location using the form:
|
|
409
|
+
# `projects/{project_id}/locations/{location_id}`
|
|
410
|
+
# where `location_id` refers to a Google Cloud region.
|
|
411
|
+
# @param page_size [::Integer]
|
|
412
|
+
# Optional. The maximum number of items to return.
|
|
413
|
+
#
|
|
414
|
+
# If not specified, a default value of 1000 will be used by the service.
|
|
415
|
+
# Regardless of the page_size value, the response may include a partial list
|
|
416
|
+
# and a caller should only rely on response's
|
|
417
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListAclPoliciesResponse#next_page_token `next_page_token`}
|
|
418
|
+
# to determine if there are more ACL policies left to be queried.
|
|
419
|
+
#
|
|
420
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
421
|
+
# @param page_token [::String]
|
|
422
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
423
|
+
# `ListAclPolicies` request, if any.
|
|
424
|
+
#
|
|
425
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
426
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>]
|
|
427
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
428
|
+
#
|
|
429
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicy>]
|
|
430
|
+
#
|
|
431
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
432
|
+
#
|
|
433
|
+
# @example Basic example
|
|
434
|
+
# require "google/cloud/redis/cluster/v1"
|
|
435
|
+
#
|
|
436
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
437
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
438
|
+
#
|
|
439
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
440
|
+
# request = Google::Cloud::Redis::Cluster::V1::ListAclPoliciesRequest.new
|
|
441
|
+
#
|
|
442
|
+
# # Call the list_acl_policies method.
|
|
443
|
+
# result = client.list_acl_policies request
|
|
444
|
+
#
|
|
445
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
446
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
447
|
+
# result.each do |item|
|
|
448
|
+
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::AclPolicy.
|
|
449
|
+
# p item
|
|
450
|
+
# end
|
|
451
|
+
#
|
|
452
|
+
def list_acl_policies request, options = nil
|
|
453
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
454
|
+
|
|
455
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ListAclPoliciesRequest
|
|
456
|
+
|
|
457
|
+
# Converts hash and nil to an options object
|
|
458
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
459
|
+
|
|
460
|
+
# Customize the options with defaults
|
|
461
|
+
metadata = @config.rpcs.list_acl_policies.metadata.to_h
|
|
462
|
+
|
|
463
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
464
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
465
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
466
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
467
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
468
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
469
|
+
|
|
470
|
+
header_params = {}
|
|
471
|
+
if request.parent
|
|
472
|
+
header_params["parent"] = request.parent
|
|
473
|
+
end
|
|
474
|
+
|
|
475
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
476
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
477
|
+
|
|
478
|
+
options.apply_defaults timeout: @config.rpcs.list_acl_policies.timeout,
|
|
479
|
+
metadata: metadata,
|
|
480
|
+
retry_policy: @config.rpcs.list_acl_policies.retry_policy
|
|
481
|
+
|
|
482
|
+
options.apply_defaults timeout: @config.timeout,
|
|
483
|
+
metadata: @config.metadata,
|
|
484
|
+
retry_policy: @config.retry_policy
|
|
485
|
+
|
|
486
|
+
@cloud_redis_cluster_stub.call_rpc :list_acl_policies, request, options: options do |response, operation|
|
|
487
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_acl_policies, request, response, operation, options
|
|
488
|
+
yield response, operation if block_given?
|
|
489
|
+
throw :response, response
|
|
490
|
+
end
|
|
491
|
+
rescue ::GRPC::BadStatus => e
|
|
492
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
493
|
+
end
|
|
494
|
+
|
|
371
495
|
##
|
|
372
496
|
# Gets the details of a specific Redis cluster.
|
|
373
497
|
#
|
|
@@ -455,6 +579,93 @@ module Google
|
|
|
455
579
|
raise ::Google::Cloud::Error.from_error(e)
|
|
456
580
|
end
|
|
457
581
|
|
|
582
|
+
##
|
|
583
|
+
# Gets the details of a specific Redis Cluster ACL policy.
|
|
584
|
+
#
|
|
585
|
+
# @overload get_acl_policy(request, options = nil)
|
|
586
|
+
# Pass arguments to `get_acl_policy` via a request object, either of type
|
|
587
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRequest} or an equivalent Hash.
|
|
588
|
+
#
|
|
589
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRequest, ::Hash]
|
|
590
|
+
# A request object representing the call parameters. Required. To specify no
|
|
591
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
592
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
593
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
594
|
+
#
|
|
595
|
+
# @overload get_acl_policy(name: nil)
|
|
596
|
+
# Pass arguments to `get_acl_policy` via keyword arguments. Note that at
|
|
597
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
598
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
599
|
+
#
|
|
600
|
+
# @param name [::String]
|
|
601
|
+
# Required. Redis ACL policy resource name using the form:
|
|
602
|
+
# `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}`
|
|
603
|
+
# where `location_id` refers to a Google Cloud region.
|
|
604
|
+
#
|
|
605
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
606
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::AclPolicy]
|
|
607
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
608
|
+
#
|
|
609
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::AclPolicy]
|
|
610
|
+
#
|
|
611
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
612
|
+
#
|
|
613
|
+
# @example Basic example
|
|
614
|
+
# require "google/cloud/redis/cluster/v1"
|
|
615
|
+
#
|
|
616
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
617
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
618
|
+
#
|
|
619
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
620
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetAclPolicyRequest.new
|
|
621
|
+
#
|
|
622
|
+
# # Call the get_acl_policy method.
|
|
623
|
+
# result = client.get_acl_policy request
|
|
624
|
+
#
|
|
625
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::AclPolicy.
|
|
626
|
+
# p result
|
|
627
|
+
#
|
|
628
|
+
def get_acl_policy request, options = nil
|
|
629
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
630
|
+
|
|
631
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRequest
|
|
632
|
+
|
|
633
|
+
# Converts hash and nil to an options object
|
|
634
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
635
|
+
|
|
636
|
+
# Customize the options with defaults
|
|
637
|
+
metadata = @config.rpcs.get_acl_policy.metadata.to_h
|
|
638
|
+
|
|
639
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
640
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
641
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
642
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
643
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
644
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
645
|
+
|
|
646
|
+
header_params = {}
|
|
647
|
+
if request.name
|
|
648
|
+
header_params["name"] = request.name
|
|
649
|
+
end
|
|
650
|
+
|
|
651
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
652
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
653
|
+
|
|
654
|
+
options.apply_defaults timeout: @config.rpcs.get_acl_policy.timeout,
|
|
655
|
+
metadata: metadata,
|
|
656
|
+
retry_policy: @config.rpcs.get_acl_policy.retry_policy
|
|
657
|
+
|
|
658
|
+
options.apply_defaults timeout: @config.timeout,
|
|
659
|
+
metadata: @config.metadata,
|
|
660
|
+
retry_policy: @config.retry_policy
|
|
661
|
+
|
|
662
|
+
@cloud_redis_cluster_stub.call_rpc :get_acl_policy, request, options: options do |response, operation|
|
|
663
|
+
yield response, operation if block_given?
|
|
664
|
+
end
|
|
665
|
+
rescue ::GRPC::BadStatus => e
|
|
666
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
667
|
+
end
|
|
668
|
+
|
|
458
669
|
##
|
|
459
670
|
# Updates the metadata and configuration of a specific Redis cluster.
|
|
460
671
|
#
|
|
@@ -564,30 +775,42 @@ module Google
|
|
|
564
775
|
end
|
|
565
776
|
|
|
566
777
|
##
|
|
567
|
-
#
|
|
568
|
-
# deleted.
|
|
778
|
+
# Updates the ACL policy.
|
|
569
779
|
#
|
|
570
|
-
#
|
|
571
|
-
#
|
|
572
|
-
#
|
|
780
|
+
# The operation applies the updated ACL policy to all of the linked clusters.
|
|
781
|
+
# If Memorystore can apply the policy to all clusters, then the operation
|
|
782
|
+
# returns a SUCCESS status. If Memorystore can't apply the policy to all
|
|
783
|
+
# clusters, then to ensure eventual consistency, Memorystore uses
|
|
784
|
+
# reconciliation to apply the policy to the failed clusters.
|
|
573
785
|
#
|
|
574
|
-
#
|
|
786
|
+
# Completed longrunning.Operation will contain the new ACL policy object in
|
|
787
|
+
# the response field.
|
|
788
|
+
#
|
|
789
|
+
# @overload update_acl_policy(request, options = nil)
|
|
790
|
+
# Pass arguments to `update_acl_policy` via a request object, either of type
|
|
791
|
+
# {::Google::Cloud::Redis::Cluster::V1::UpdateAclPolicyRequest} or an equivalent Hash.
|
|
792
|
+
#
|
|
793
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::UpdateAclPolicyRequest, ::Hash]
|
|
575
794
|
# A request object representing the call parameters. Required. To specify no
|
|
576
795
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
577
796
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
578
797
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
579
798
|
#
|
|
580
|
-
# @overload
|
|
581
|
-
# Pass arguments to `
|
|
799
|
+
# @overload update_acl_policy(acl_policy: nil, update_mask: nil, request_id: nil)
|
|
800
|
+
# Pass arguments to `update_acl_policy` via keyword arguments. Note that at
|
|
582
801
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
583
802
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
584
803
|
#
|
|
585
|
-
# @param
|
|
586
|
-
# Required.
|
|
587
|
-
#
|
|
588
|
-
#
|
|
804
|
+
# @param acl_policy [::Google::Cloud::Redis::Cluster::V1::AclPolicy, ::Hash]
|
|
805
|
+
# Required. The ACL policy to be updated.
|
|
806
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
807
|
+
# Optional. Mask of fields to be updated. At least one path must be supplied
|
|
808
|
+
# in this field. The elements of the repeated paths field may only include
|
|
809
|
+
# these fields from `AclPolicy`:
|
|
810
|
+
#
|
|
811
|
+
# * `rules`
|
|
589
812
|
# @param request_id [::String]
|
|
590
|
-
# Idempotent request UUID.
|
|
813
|
+
# Optional. Idempotent request UUID.
|
|
591
814
|
#
|
|
592
815
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
593
816
|
# @yieldparam response [::Gapic::Operation]
|
|
@@ -604,10 +827,10 @@ module Google
|
|
|
604
827
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
605
828
|
#
|
|
606
829
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
607
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
830
|
+
# request = Google::Cloud::Redis::Cluster::V1::UpdateAclPolicyRequest.new
|
|
608
831
|
#
|
|
609
|
-
# # Call the
|
|
610
|
-
# result = client.
|
|
832
|
+
# # Call the update_acl_policy method.
|
|
833
|
+
# result = client.update_acl_policy request
|
|
611
834
|
#
|
|
612
835
|
# # The returned object is of type Gapic::Operation. You can use it to
|
|
613
836
|
# # check the status of an operation, cancel it, or wait for results.
|
|
@@ -619,16 +842,16 @@ module Google
|
|
|
619
842
|
# puts "No response received."
|
|
620
843
|
# end
|
|
621
844
|
#
|
|
622
|
-
def
|
|
845
|
+
def update_acl_policy request, options = nil
|
|
623
846
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
624
847
|
|
|
625
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
848
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::UpdateAclPolicyRequest
|
|
626
849
|
|
|
627
850
|
# Converts hash and nil to an options object
|
|
628
851
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
629
852
|
|
|
630
853
|
# Customize the options with defaults
|
|
631
|
-
metadata = @config.rpcs.
|
|
854
|
+
metadata = @config.rpcs.update_acl_policy.metadata.to_h
|
|
632
855
|
|
|
633
856
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
634
857
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -638,22 +861,22 @@ module Google
|
|
|
638
861
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
639
862
|
|
|
640
863
|
header_params = {}
|
|
641
|
-
if request.name
|
|
642
|
-
header_params["name"] = request.name
|
|
864
|
+
if request.acl_policy&.name
|
|
865
|
+
header_params["acl_policy.name"] = request.acl_policy.name
|
|
643
866
|
end
|
|
644
867
|
|
|
645
868
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
646
869
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
647
870
|
|
|
648
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
871
|
+
options.apply_defaults timeout: @config.rpcs.update_acl_policy.timeout,
|
|
649
872
|
metadata: metadata,
|
|
650
|
-
retry_policy: @config.rpcs.
|
|
873
|
+
retry_policy: @config.rpcs.update_acl_policy.retry_policy
|
|
651
874
|
|
|
652
875
|
options.apply_defaults timeout: @config.timeout,
|
|
653
876
|
metadata: @config.metadata,
|
|
654
877
|
retry_policy: @config.retry_policy
|
|
655
878
|
|
|
656
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
879
|
+
@cloud_redis_cluster_stub.call_rpc :update_acl_policy, request, options: options do |response, operation|
|
|
657
880
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
658
881
|
yield response, operation if block_given?
|
|
659
882
|
throw :response, response
|
|
@@ -663,45 +886,28 @@ module Google
|
|
|
663
886
|
end
|
|
664
887
|
|
|
665
888
|
##
|
|
666
|
-
#
|
|
667
|
-
#
|
|
668
|
-
# operation to track its progress. Once the operation is completed the Redis
|
|
669
|
-
# cluster will be fully functional. The completed longrunning.Operation will
|
|
670
|
-
# contain the new cluster object in the response field.
|
|
671
|
-
#
|
|
672
|
-
# The returned operation is automatically deleted after a few hours, so there
|
|
673
|
-
# is no need to call DeleteOperation.
|
|
889
|
+
# Deletes a specific Redis cluster. Cluster stops serving and data is
|
|
890
|
+
# deleted.
|
|
674
891
|
#
|
|
675
|
-
# @overload
|
|
676
|
-
# Pass arguments to `
|
|
677
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
892
|
+
# @overload delete_cluster(request, options = nil)
|
|
893
|
+
# Pass arguments to `delete_cluster` via a request object, either of type
|
|
894
|
+
# {::Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest} or an equivalent Hash.
|
|
678
895
|
#
|
|
679
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
896
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest, ::Hash]
|
|
680
897
|
# A request object representing the call parameters. Required. To specify no
|
|
681
898
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
682
899
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
683
900
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
684
901
|
#
|
|
685
|
-
# @overload
|
|
686
|
-
# Pass arguments to `
|
|
902
|
+
# @overload delete_cluster(name: nil, request_id: nil)
|
|
903
|
+
# Pass arguments to `delete_cluster` via keyword arguments. Note that at
|
|
687
904
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
688
905
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
689
906
|
#
|
|
690
|
-
# @param
|
|
691
|
-
# Required.
|
|
692
|
-
# `projects/{project_id}/locations/{location_id}`
|
|
907
|
+
# @param name [::String]
|
|
908
|
+
# Required. Redis cluster resource name using the form:
|
|
909
|
+
# `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
|
|
693
910
|
# where `location_id` refers to a GCP region.
|
|
694
|
-
# @param cluster_id [::String]
|
|
695
|
-
# Required. The logical name of the Redis cluster in the customer project
|
|
696
|
-
# with the following restrictions:
|
|
697
|
-
#
|
|
698
|
-
# * Must contain only lowercase letters, numbers, and hyphens.
|
|
699
|
-
# * Must start with a letter.
|
|
700
|
-
# * Must be between 1-63 characters.
|
|
701
|
-
# * Must end with a number or a letter.
|
|
702
|
-
# * Must be unique within the customer project / location
|
|
703
|
-
# @param cluster [::Google::Cloud::Redis::Cluster::V1::Cluster, ::Hash]
|
|
704
|
-
# Required. The cluster that is to be created.
|
|
705
911
|
# @param request_id [::String]
|
|
706
912
|
# Idempotent request UUID.
|
|
707
913
|
#
|
|
@@ -720,10 +926,10 @@ module Google
|
|
|
720
926
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
721
927
|
#
|
|
722
928
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
723
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
929
|
+
# request = Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest.new
|
|
724
930
|
#
|
|
725
|
-
# # Call the
|
|
726
|
-
# result = client.
|
|
931
|
+
# # Call the delete_cluster method.
|
|
932
|
+
# result = client.delete_cluster request
|
|
727
933
|
#
|
|
728
934
|
# # The returned object is of type Gapic::Operation. You can use it to
|
|
729
935
|
# # check the status of an operation, cancel it, or wait for results.
|
|
@@ -735,16 +941,16 @@ module Google
|
|
|
735
941
|
# puts "No response received."
|
|
736
942
|
# end
|
|
737
943
|
#
|
|
738
|
-
def
|
|
944
|
+
def delete_cluster request, options = nil
|
|
739
945
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
740
946
|
|
|
741
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
947
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::DeleteClusterRequest
|
|
742
948
|
|
|
743
949
|
# Converts hash and nil to an options object
|
|
744
950
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
745
951
|
|
|
746
952
|
# Customize the options with defaults
|
|
747
|
-
metadata = @config.rpcs.
|
|
953
|
+
metadata = @config.rpcs.delete_cluster.metadata.to_h
|
|
748
954
|
|
|
749
955
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
750
956
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -754,22 +960,22 @@ module Google
|
|
|
754
960
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
755
961
|
|
|
756
962
|
header_params = {}
|
|
757
|
-
if request.
|
|
758
|
-
header_params["
|
|
963
|
+
if request.name
|
|
964
|
+
header_params["name"] = request.name
|
|
759
965
|
end
|
|
760
966
|
|
|
761
967
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
762
968
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
763
969
|
|
|
764
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
970
|
+
options.apply_defaults timeout: @config.rpcs.delete_cluster.timeout,
|
|
765
971
|
metadata: metadata,
|
|
766
|
-
retry_policy: @config.rpcs.
|
|
972
|
+
retry_policy: @config.rpcs.delete_cluster.retry_policy
|
|
767
973
|
|
|
768
974
|
options.apply_defaults timeout: @config.timeout,
|
|
769
975
|
metadata: @config.metadata,
|
|
770
976
|
retry_policy: @config.retry_policy
|
|
771
977
|
|
|
772
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
978
|
+
@cloud_redis_cluster_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
|
|
773
979
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
774
980
|
yield response, operation if block_given?
|
|
775
981
|
throw :response, response
|
|
@@ -779,33 +985,1204 @@ module Google
|
|
|
779
985
|
end
|
|
780
986
|
|
|
781
987
|
##
|
|
782
|
-
#
|
|
988
|
+
# Deletes a specific ACL policy. This action will delete the ACL policy and
|
|
989
|
+
# all the rules associated with it. An ACL policy cannot be deleted if it is
|
|
990
|
+
# attached to a cluster.
|
|
783
991
|
#
|
|
784
|
-
# @overload
|
|
785
|
-
# Pass arguments to `
|
|
786
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
992
|
+
# @overload delete_acl_policy(request, options = nil)
|
|
993
|
+
# Pass arguments to `delete_acl_policy` via a request object, either of type
|
|
994
|
+
# {::Google::Cloud::Redis::Cluster::V1::DeleteAclPolicyRequest} or an equivalent Hash.
|
|
787
995
|
#
|
|
788
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
996
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::DeleteAclPolicyRequest, ::Hash]
|
|
789
997
|
# A request object representing the call parameters. Required. To specify no
|
|
790
998
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
791
999
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
792
1000
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
793
1001
|
#
|
|
794
|
-
# @overload
|
|
1002
|
+
# @overload delete_acl_policy(name: nil, request_id: nil, etag: nil)
|
|
1003
|
+
# Pass arguments to `delete_acl_policy` via keyword arguments. Note that at
|
|
1004
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1005
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1006
|
+
#
|
|
1007
|
+
# @param name [::String]
|
|
1008
|
+
# Required. Redis ACL policy resource name using the form:
|
|
1009
|
+
# `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}`
|
|
1010
|
+
# where `location_id` refers to a Google Cloud region.
|
|
1011
|
+
# @param request_id [::String]
|
|
1012
|
+
# Optional. Idempotent request UUID.
|
|
1013
|
+
# @param etag [::String]
|
|
1014
|
+
# Optional. Etag of the ACL policy. If this is different from the server's
|
|
1015
|
+
# etag, the request will fail with an ABORTED error.
|
|
1016
|
+
#
|
|
1017
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1018
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1019
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1020
|
+
#
|
|
1021
|
+
# @return [::Gapic::Operation]
|
|
1022
|
+
#
|
|
1023
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1024
|
+
#
|
|
1025
|
+
# @example Basic example
|
|
1026
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1027
|
+
#
|
|
1028
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1029
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1030
|
+
#
|
|
1031
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1032
|
+
# request = Google::Cloud::Redis::Cluster::V1::DeleteAclPolicyRequest.new
|
|
1033
|
+
#
|
|
1034
|
+
# # Call the delete_acl_policy method.
|
|
1035
|
+
# result = client.delete_acl_policy request
|
|
1036
|
+
#
|
|
1037
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1038
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1039
|
+
# # Here is how to wait for a response.
|
|
1040
|
+
# result.wait_until_done! timeout: 60
|
|
1041
|
+
# if result.response?
|
|
1042
|
+
# p result.response
|
|
1043
|
+
# else
|
|
1044
|
+
# puts "No response received."
|
|
1045
|
+
# end
|
|
1046
|
+
#
|
|
1047
|
+
def delete_acl_policy request, options = nil
|
|
1048
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1049
|
+
|
|
1050
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::DeleteAclPolicyRequest
|
|
1051
|
+
|
|
1052
|
+
# Converts hash and nil to an options object
|
|
1053
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1054
|
+
|
|
1055
|
+
# Customize the options with defaults
|
|
1056
|
+
metadata = @config.rpcs.delete_acl_policy.metadata.to_h
|
|
1057
|
+
|
|
1058
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1059
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1060
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1061
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1062
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1063
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1064
|
+
|
|
1065
|
+
header_params = {}
|
|
1066
|
+
if request.name
|
|
1067
|
+
header_params["name"] = request.name
|
|
1068
|
+
end
|
|
1069
|
+
|
|
1070
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1071
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1072
|
+
|
|
1073
|
+
options.apply_defaults timeout: @config.rpcs.delete_acl_policy.timeout,
|
|
1074
|
+
metadata: metadata,
|
|
1075
|
+
retry_policy: @config.rpcs.delete_acl_policy.retry_policy
|
|
1076
|
+
|
|
1077
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1078
|
+
metadata: @config.metadata,
|
|
1079
|
+
retry_policy: @config.retry_policy
|
|
1080
|
+
|
|
1081
|
+
@cloud_redis_cluster_stub.call_rpc :delete_acl_policy, request, options: options do |response, operation|
|
|
1082
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1083
|
+
yield response, operation if block_given?
|
|
1084
|
+
throw :response, response
|
|
1085
|
+
end
|
|
1086
|
+
rescue ::GRPC::BadStatus => e
|
|
1087
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1088
|
+
end
|
|
1089
|
+
|
|
1090
|
+
##
|
|
1091
|
+
# Gets details of a specific ACL policy revision.
|
|
1092
|
+
#
|
|
1093
|
+
# @overload get_acl_policy_revision(request, options = nil)
|
|
1094
|
+
# Pass arguments to `get_acl_policy_revision` via a request object, either of type
|
|
1095
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRevisionRequest} or an equivalent Hash.
|
|
1096
|
+
#
|
|
1097
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRevisionRequest, ::Hash]
|
|
1098
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1099
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1100
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1101
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1102
|
+
#
|
|
1103
|
+
# @overload get_acl_policy_revision(name: nil)
|
|
1104
|
+
# Pass arguments to `get_acl_policy_revision` via keyword arguments. Note that at
|
|
1105
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1106
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1107
|
+
#
|
|
1108
|
+
# @param name [::String]
|
|
1109
|
+
# Required. Redis ACL policy revision resource name using the form:
|
|
1110
|
+
# `projects/{project_id}/locations/{location_id}/aclPolicies/{acl_policy_id}/revisions/{revision_id}`
|
|
1111
|
+
# where `location_id` refers to a Google Cloud region.
|
|
1112
|
+
#
|
|
1113
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1114
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision]
|
|
1115
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1116
|
+
#
|
|
1117
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision]
|
|
1118
|
+
#
|
|
1119
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1120
|
+
#
|
|
1121
|
+
# @example Basic example
|
|
1122
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1123
|
+
#
|
|
1124
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1125
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1126
|
+
#
|
|
1127
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1128
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetAclPolicyRevisionRequest.new
|
|
1129
|
+
#
|
|
1130
|
+
# # Call the get_acl_policy_revision method.
|
|
1131
|
+
# result = client.get_acl_policy_revision request
|
|
1132
|
+
#
|
|
1133
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::AclPolicyRevision.
|
|
1134
|
+
# p result
|
|
1135
|
+
#
|
|
1136
|
+
def get_acl_policy_revision request, options = nil
|
|
1137
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1138
|
+
|
|
1139
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetAclPolicyRevisionRequest
|
|
1140
|
+
|
|
1141
|
+
# Converts hash and nil to an options object
|
|
1142
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1143
|
+
|
|
1144
|
+
# Customize the options with defaults
|
|
1145
|
+
metadata = @config.rpcs.get_acl_policy_revision.metadata.to_h
|
|
1146
|
+
|
|
1147
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1148
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1149
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1150
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1151
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1152
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1153
|
+
|
|
1154
|
+
header_params = {}
|
|
1155
|
+
if request.name
|
|
1156
|
+
header_params["name"] = request.name
|
|
1157
|
+
end
|
|
1158
|
+
|
|
1159
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1160
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1161
|
+
|
|
1162
|
+
options.apply_defaults timeout: @config.rpcs.get_acl_policy_revision.timeout,
|
|
1163
|
+
metadata: metadata,
|
|
1164
|
+
retry_policy: @config.rpcs.get_acl_policy_revision.retry_policy
|
|
1165
|
+
|
|
1166
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1167
|
+
metadata: @config.metadata,
|
|
1168
|
+
retry_policy: @config.retry_policy
|
|
1169
|
+
|
|
1170
|
+
@cloud_redis_cluster_stub.call_rpc :get_acl_policy_revision, request, options: options do |response, operation|
|
|
1171
|
+
yield response, operation if block_given?
|
|
1172
|
+
end
|
|
1173
|
+
rescue ::GRPC::BadStatus => e
|
|
1174
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1175
|
+
end
|
|
1176
|
+
|
|
1177
|
+
##
|
|
1178
|
+
# Lists all ACL policy revisions in a given ACL policy.
|
|
1179
|
+
#
|
|
1180
|
+
# @overload list_acl_policy_revisions(request, options = nil)
|
|
1181
|
+
# Pass arguments to `list_acl_policy_revisions` via a request object, either of type
|
|
1182
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListAclPolicyRevisionsRequest} or an equivalent Hash.
|
|
1183
|
+
#
|
|
1184
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ListAclPolicyRevisionsRequest, ::Hash]
|
|
1185
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1186
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1187
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1188
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1189
|
+
#
|
|
1190
|
+
# @overload list_acl_policy_revisions(parent: nil, page_size: nil, page_token: nil)
|
|
1191
|
+
# Pass arguments to `list_acl_policy_revisions` via keyword arguments. Note that at
|
|
1192
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1193
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1194
|
+
#
|
|
1195
|
+
# @param parent [::String]
|
|
1196
|
+
# Required. The name of the ACL policy to list revisions for.
|
|
1197
|
+
# Format:
|
|
1198
|
+
# "projects/\\{project_id}/locations/\\{location_id}/aclPolicies/\\{acl_policy_id}"
|
|
1199
|
+
# @param page_size [::Integer]
|
|
1200
|
+
# Optional. The maximum number of items to return.
|
|
1201
|
+
# @param page_token [::String]
|
|
1202
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
1203
|
+
# `ListAclPolicyRevisions` request, if any.
|
|
1204
|
+
#
|
|
1205
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1206
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>]
|
|
1207
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1208
|
+
#
|
|
1209
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision>]
|
|
1210
|
+
#
|
|
1211
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1212
|
+
#
|
|
1213
|
+
# @example Basic example
|
|
1214
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1215
|
+
#
|
|
1216
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1217
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1218
|
+
#
|
|
1219
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1220
|
+
# request = Google::Cloud::Redis::Cluster::V1::ListAclPolicyRevisionsRequest.new
|
|
1221
|
+
#
|
|
1222
|
+
# # Call the list_acl_policy_revisions method.
|
|
1223
|
+
# result = client.list_acl_policy_revisions request
|
|
1224
|
+
#
|
|
1225
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1226
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1227
|
+
# result.each do |item|
|
|
1228
|
+
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::AclPolicyRevision.
|
|
1229
|
+
# p item
|
|
1230
|
+
# end
|
|
1231
|
+
#
|
|
1232
|
+
def list_acl_policy_revisions request, options = nil
|
|
1233
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1234
|
+
|
|
1235
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ListAclPolicyRevisionsRequest
|
|
1236
|
+
|
|
1237
|
+
# Converts hash and nil to an options object
|
|
1238
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1239
|
+
|
|
1240
|
+
# Customize the options with defaults
|
|
1241
|
+
metadata = @config.rpcs.list_acl_policy_revisions.metadata.to_h
|
|
1242
|
+
|
|
1243
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1244
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1245
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1246
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1247
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1248
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1249
|
+
|
|
1250
|
+
header_params = {}
|
|
1251
|
+
if request.parent
|
|
1252
|
+
header_params["parent"] = request.parent
|
|
1253
|
+
end
|
|
1254
|
+
|
|
1255
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1256
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1257
|
+
|
|
1258
|
+
options.apply_defaults timeout: @config.rpcs.list_acl_policy_revisions.timeout,
|
|
1259
|
+
metadata: metadata,
|
|
1260
|
+
retry_policy: @config.rpcs.list_acl_policy_revisions.retry_policy
|
|
1261
|
+
|
|
1262
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1263
|
+
metadata: @config.metadata,
|
|
1264
|
+
retry_policy: @config.retry_policy
|
|
1265
|
+
|
|
1266
|
+
@cloud_redis_cluster_stub.call_rpc :list_acl_policy_revisions, request, options: options do |response, operation|
|
|
1267
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_acl_policy_revisions, request, response, operation, options
|
|
1268
|
+
yield response, operation if block_given?
|
|
1269
|
+
throw :response, response
|
|
1270
|
+
end
|
|
1271
|
+
rescue ::GRPC::BadStatus => e
|
|
1272
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1273
|
+
end
|
|
1274
|
+
|
|
1275
|
+
##
|
|
1276
|
+
# Creates a Redis cluster based on the specified properties.
|
|
1277
|
+
# The creation is executed asynchronously and callers may check the returned
|
|
1278
|
+
# operation to track its progress. Once the operation is completed the Redis
|
|
1279
|
+
# cluster will be fully functional. The completed longrunning.Operation will
|
|
1280
|
+
# contain the new cluster object in the response field.
|
|
1281
|
+
#
|
|
1282
|
+
# The returned operation is automatically deleted after a few hours, so there
|
|
1283
|
+
# is no need to call DeleteOperation.
|
|
1284
|
+
#
|
|
1285
|
+
# @overload create_cluster(request, options = nil)
|
|
1286
|
+
# Pass arguments to `create_cluster` via a request object, either of type
|
|
1287
|
+
# {::Google::Cloud::Redis::Cluster::V1::CreateClusterRequest} or an equivalent Hash.
|
|
1288
|
+
#
|
|
1289
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::CreateClusterRequest, ::Hash]
|
|
1290
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1291
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1292
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1293
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1294
|
+
#
|
|
1295
|
+
# @overload create_cluster(parent: nil, cluster_id: nil, cluster: nil, request_id: nil)
|
|
1296
|
+
# Pass arguments to `create_cluster` via keyword arguments. Note that at
|
|
1297
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1298
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1299
|
+
#
|
|
1300
|
+
# @param parent [::String]
|
|
1301
|
+
# Required. The resource name of the cluster location using the form:
|
|
1302
|
+
# `projects/{project_id}/locations/{location_id}`
|
|
1303
|
+
# where `location_id` refers to a GCP region.
|
|
1304
|
+
# @param cluster_id [::String]
|
|
1305
|
+
# Required. The logical name of the Redis cluster in the customer project
|
|
1306
|
+
# with the following restrictions:
|
|
1307
|
+
#
|
|
1308
|
+
# * Must contain only lowercase letters, numbers, and hyphens.
|
|
1309
|
+
# * Must start with a letter.
|
|
1310
|
+
# * Must be between 1-63 characters.
|
|
1311
|
+
# * Must end with a number or a letter.
|
|
1312
|
+
# * Must be unique within the customer project / location
|
|
1313
|
+
# @param cluster [::Google::Cloud::Redis::Cluster::V1::Cluster, ::Hash]
|
|
1314
|
+
# Required. The cluster that is to be created.
|
|
1315
|
+
# @param request_id [::String]
|
|
1316
|
+
# Idempotent request UUID.
|
|
1317
|
+
#
|
|
1318
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1319
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1320
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1321
|
+
#
|
|
1322
|
+
# @return [::Gapic::Operation]
|
|
1323
|
+
#
|
|
1324
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1325
|
+
#
|
|
1326
|
+
# @example Basic example
|
|
1327
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1328
|
+
#
|
|
1329
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1330
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1331
|
+
#
|
|
1332
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1333
|
+
# request = Google::Cloud::Redis::Cluster::V1::CreateClusterRequest.new
|
|
1334
|
+
#
|
|
1335
|
+
# # Call the create_cluster method.
|
|
1336
|
+
# result = client.create_cluster request
|
|
1337
|
+
#
|
|
1338
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1339
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1340
|
+
# # Here is how to wait for a response.
|
|
1341
|
+
# result.wait_until_done! timeout: 60
|
|
1342
|
+
# if result.response?
|
|
1343
|
+
# p result.response
|
|
1344
|
+
# else
|
|
1345
|
+
# puts "No response received."
|
|
1346
|
+
# end
|
|
1347
|
+
#
|
|
1348
|
+
def create_cluster request, options = nil
|
|
1349
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1350
|
+
|
|
1351
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::CreateClusterRequest
|
|
1352
|
+
|
|
1353
|
+
# Converts hash and nil to an options object
|
|
1354
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1355
|
+
|
|
1356
|
+
# Customize the options with defaults
|
|
1357
|
+
metadata = @config.rpcs.create_cluster.metadata.to_h
|
|
1358
|
+
|
|
1359
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1360
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1361
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1362
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1363
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1364
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1365
|
+
|
|
1366
|
+
header_params = {}
|
|
1367
|
+
if request.parent
|
|
1368
|
+
header_params["parent"] = request.parent
|
|
1369
|
+
end
|
|
1370
|
+
|
|
1371
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1372
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1373
|
+
|
|
1374
|
+
options.apply_defaults timeout: @config.rpcs.create_cluster.timeout,
|
|
1375
|
+
metadata: metadata,
|
|
1376
|
+
retry_policy: @config.rpcs.create_cluster.retry_policy
|
|
1377
|
+
|
|
1378
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1379
|
+
metadata: @config.metadata,
|
|
1380
|
+
retry_policy: @config.retry_policy
|
|
1381
|
+
|
|
1382
|
+
@cloud_redis_cluster_stub.call_rpc :create_cluster, request, options: options do |response, operation|
|
|
1383
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1384
|
+
yield response, operation if block_given?
|
|
1385
|
+
throw :response, response
|
|
1386
|
+
end
|
|
1387
|
+
rescue ::GRPC::BadStatus => e
|
|
1388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1389
|
+
end
|
|
1390
|
+
|
|
1391
|
+
##
|
|
1392
|
+
# Creates an ACL policy.
|
|
1393
|
+
# The creation is executed synchronously and the policy is available for use
|
|
1394
|
+
# immediately after the RPC returns.
|
|
1395
|
+
#
|
|
1396
|
+
# @overload create_acl_policy(request, options = nil)
|
|
1397
|
+
# Pass arguments to `create_acl_policy` via a request object, either of type
|
|
1398
|
+
# {::Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest} or an equivalent Hash.
|
|
1399
|
+
#
|
|
1400
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest, ::Hash]
|
|
1401
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1402
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1403
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1404
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1405
|
+
#
|
|
1406
|
+
# @overload create_acl_policy(parent: nil, acl_policy_id: nil, acl_policy: nil, request_id: nil)
|
|
1407
|
+
# Pass arguments to `create_acl_policy` via keyword arguments. Note that at
|
|
1408
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1409
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1410
|
+
#
|
|
1411
|
+
# @param parent [::String]
|
|
1412
|
+
# Required. The resource name of the cluster location using the form:
|
|
1413
|
+
# `projects/{project_id}/locations/{location_id}`
|
|
1414
|
+
# where `location_id` refers to a Google Cloud region.
|
|
1415
|
+
# @param acl_policy_id [::String]
|
|
1416
|
+
# Required. The logical name of the ACL policy in the customer project
|
|
1417
|
+
# with the following restrictions:
|
|
1418
|
+
#
|
|
1419
|
+
# * Must contain only lowercase letters, numbers, and hyphens.
|
|
1420
|
+
# * Must start with a letter.
|
|
1421
|
+
# * Must be between 1-63 characters.
|
|
1422
|
+
# * Must end with a number or a letter.
|
|
1423
|
+
# * Must be unique within the customer project / location
|
|
1424
|
+
# @param acl_policy [::Google::Cloud::Redis::Cluster::V1::AclPolicy, ::Hash]
|
|
1425
|
+
# Required. The ACL policy that is to be created.
|
|
1426
|
+
# @param request_id [::String]
|
|
1427
|
+
# Optional. Idempotent request UUID.
|
|
1428
|
+
# .
|
|
1429
|
+
#
|
|
1430
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1431
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::AclPolicy]
|
|
1432
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1433
|
+
#
|
|
1434
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::AclPolicy]
|
|
1435
|
+
#
|
|
1436
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1437
|
+
#
|
|
1438
|
+
# @example Basic example
|
|
1439
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1440
|
+
#
|
|
1441
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1442
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1443
|
+
#
|
|
1444
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1445
|
+
# request = Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest.new
|
|
1446
|
+
#
|
|
1447
|
+
# # Call the create_acl_policy method.
|
|
1448
|
+
# result = client.create_acl_policy request
|
|
1449
|
+
#
|
|
1450
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::AclPolicy.
|
|
1451
|
+
# p result
|
|
1452
|
+
#
|
|
1453
|
+
def create_acl_policy request, options = nil
|
|
1454
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1455
|
+
|
|
1456
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::CreateAclPolicyRequest
|
|
1457
|
+
|
|
1458
|
+
# Converts hash and nil to an options object
|
|
1459
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1460
|
+
|
|
1461
|
+
# Customize the options with defaults
|
|
1462
|
+
metadata = @config.rpcs.create_acl_policy.metadata.to_h
|
|
1463
|
+
|
|
1464
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1465
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1466
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1467
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1468
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1469
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1470
|
+
|
|
1471
|
+
header_params = {}
|
|
1472
|
+
if request.parent
|
|
1473
|
+
header_params["parent"] = request.parent
|
|
1474
|
+
end
|
|
1475
|
+
|
|
1476
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1477
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1478
|
+
|
|
1479
|
+
options.apply_defaults timeout: @config.rpcs.create_acl_policy.timeout,
|
|
1480
|
+
metadata: metadata,
|
|
1481
|
+
retry_policy: @config.rpcs.create_acl_policy.retry_policy
|
|
1482
|
+
|
|
1483
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1484
|
+
metadata: @config.metadata,
|
|
1485
|
+
retry_policy: @config.retry_policy
|
|
1486
|
+
|
|
1487
|
+
@cloud_redis_cluster_stub.call_rpc :create_acl_policy, request, options: options do |response, operation|
|
|
1488
|
+
yield response, operation if block_given?
|
|
1489
|
+
end
|
|
1490
|
+
rescue ::GRPC::BadStatus => e
|
|
1491
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1492
|
+
end
|
|
1493
|
+
|
|
1494
|
+
##
|
|
1495
|
+
# Gets the details of certificate authority information for Redis cluster.
|
|
1496
|
+
#
|
|
1497
|
+
# @overload get_cluster_certificate_authority(request, options = nil)
|
|
1498
|
+
# Pass arguments to `get_cluster_certificate_authority` via a request object, either of type
|
|
1499
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetClusterCertificateAuthorityRequest} or an equivalent Hash.
|
|
1500
|
+
#
|
|
1501
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetClusterCertificateAuthorityRequest, ::Hash]
|
|
1502
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1503
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1504
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1505
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1506
|
+
#
|
|
1507
|
+
# @overload get_cluster_certificate_authority(name: nil)
|
|
795
1508
|
# Pass arguments to `get_cluster_certificate_authority` via keyword arguments. Note that at
|
|
796
1509
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
797
1510
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
798
1511
|
#
|
|
799
1512
|
# @param name [::String]
|
|
800
|
-
# Required. Redis cluster certificate authority resource name using the form:
|
|
801
|
-
# `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
|
|
802
|
-
# where `location_id` refers to a GCP region.
|
|
1513
|
+
# Required. Redis cluster certificate authority resource name using the form:
|
|
1514
|
+
# `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority`
|
|
1515
|
+
# where `location_id` refers to a GCP region.
|
|
1516
|
+
#
|
|
1517
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1518
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::CertificateAuthority]
|
|
1519
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1520
|
+
#
|
|
1521
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::CertificateAuthority]
|
|
1522
|
+
#
|
|
1523
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1524
|
+
#
|
|
1525
|
+
# @example Basic example
|
|
1526
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1527
|
+
#
|
|
1528
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1529
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1530
|
+
#
|
|
1531
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1532
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetClusterCertificateAuthorityRequest.new
|
|
1533
|
+
#
|
|
1534
|
+
# # Call the get_cluster_certificate_authority method.
|
|
1535
|
+
# result = client.get_cluster_certificate_authority request
|
|
1536
|
+
#
|
|
1537
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::CertificateAuthority.
|
|
1538
|
+
# p result
|
|
1539
|
+
#
|
|
1540
|
+
def get_cluster_certificate_authority request, options = nil
|
|
1541
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1542
|
+
|
|
1543
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetClusterCertificateAuthorityRequest
|
|
1544
|
+
|
|
1545
|
+
# Converts hash and nil to an options object
|
|
1546
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1547
|
+
|
|
1548
|
+
# Customize the options with defaults
|
|
1549
|
+
metadata = @config.rpcs.get_cluster_certificate_authority.metadata.to_h
|
|
1550
|
+
|
|
1551
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1552
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1553
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1554
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1555
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1556
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1557
|
+
|
|
1558
|
+
header_params = {}
|
|
1559
|
+
if request.name
|
|
1560
|
+
header_params["name"] = request.name
|
|
1561
|
+
end
|
|
1562
|
+
|
|
1563
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1564
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1565
|
+
|
|
1566
|
+
options.apply_defaults timeout: @config.rpcs.get_cluster_certificate_authority.timeout,
|
|
1567
|
+
metadata: metadata,
|
|
1568
|
+
retry_policy: @config.rpcs.get_cluster_certificate_authority.retry_policy
|
|
1569
|
+
|
|
1570
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1571
|
+
metadata: @config.metadata,
|
|
1572
|
+
retry_policy: @config.retry_policy
|
|
1573
|
+
|
|
1574
|
+
@cloud_redis_cluster_stub.call_rpc :get_cluster_certificate_authority, request, options: options do |response, operation|
|
|
1575
|
+
yield response, operation if block_given?
|
|
1576
|
+
end
|
|
1577
|
+
rescue ::GRPC::BadStatus => e
|
|
1578
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1579
|
+
end
|
|
1580
|
+
|
|
1581
|
+
##
|
|
1582
|
+
# Gets the details of regional certificate authority information for Redis
|
|
1583
|
+
# cluster.
|
|
1584
|
+
#
|
|
1585
|
+
# @overload get_shared_regional_certificate_authority(request, options = nil)
|
|
1586
|
+
# Pass arguments to `get_shared_regional_certificate_authority` via a request object, either of type
|
|
1587
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetSharedRegionalCertificateAuthorityRequest} or an equivalent Hash.
|
|
1588
|
+
#
|
|
1589
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetSharedRegionalCertificateAuthorityRequest, ::Hash]
|
|
1590
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1591
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1592
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1593
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1594
|
+
#
|
|
1595
|
+
# @overload get_shared_regional_certificate_authority(name: nil)
|
|
1596
|
+
# Pass arguments to `get_shared_regional_certificate_authority` via keyword arguments. Note that at
|
|
1597
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1598
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1599
|
+
#
|
|
1600
|
+
# @param name [::String]
|
|
1601
|
+
# Required. Regional certificate authority resource name using the form:
|
|
1602
|
+
# `projects/{project_id}/locations/{location_id}/sharedRegionalCertificateAuthority`
|
|
1603
|
+
# where `location_id` refers to a Google Cloud region.
|
|
1604
|
+
#
|
|
1605
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1606
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthority]
|
|
1607
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1608
|
+
#
|
|
1609
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthority]
|
|
1610
|
+
#
|
|
1611
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1612
|
+
#
|
|
1613
|
+
# @example Basic example
|
|
1614
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1615
|
+
#
|
|
1616
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1617
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1618
|
+
#
|
|
1619
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1620
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetSharedRegionalCertificateAuthorityRequest.new
|
|
1621
|
+
#
|
|
1622
|
+
# # Call the get_shared_regional_certificate_authority method.
|
|
1623
|
+
# result = client.get_shared_regional_certificate_authority request
|
|
1624
|
+
#
|
|
1625
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::SharedRegionalCertificateAuthority.
|
|
1626
|
+
# p result
|
|
1627
|
+
#
|
|
1628
|
+
def get_shared_regional_certificate_authority request, options = nil
|
|
1629
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1630
|
+
|
|
1631
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetSharedRegionalCertificateAuthorityRequest
|
|
1632
|
+
|
|
1633
|
+
# Converts hash and nil to an options object
|
|
1634
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1635
|
+
|
|
1636
|
+
# Customize the options with defaults
|
|
1637
|
+
metadata = @config.rpcs.get_shared_regional_certificate_authority.metadata.to_h
|
|
1638
|
+
|
|
1639
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1640
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1641
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1642
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1643
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1644
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1645
|
+
|
|
1646
|
+
header_params = {}
|
|
1647
|
+
if request.name
|
|
1648
|
+
header_params["name"] = request.name
|
|
1649
|
+
end
|
|
1650
|
+
|
|
1651
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1652
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1653
|
+
|
|
1654
|
+
options.apply_defaults timeout: @config.rpcs.get_shared_regional_certificate_authority.timeout,
|
|
1655
|
+
metadata: metadata,
|
|
1656
|
+
retry_policy: @config.rpcs.get_shared_regional_certificate_authority.retry_policy
|
|
1657
|
+
|
|
1658
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1659
|
+
metadata: @config.metadata,
|
|
1660
|
+
retry_policy: @config.retry_policy
|
|
1661
|
+
|
|
1662
|
+
@cloud_redis_cluster_stub.call_rpc :get_shared_regional_certificate_authority, request, options: options do |response, operation|
|
|
1663
|
+
yield response, operation if block_given?
|
|
1664
|
+
end
|
|
1665
|
+
rescue ::GRPC::BadStatus => e
|
|
1666
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1667
|
+
end
|
|
1668
|
+
|
|
1669
|
+
##
|
|
1670
|
+
# Reschedules upcoming maintenance event.
|
|
1671
|
+
#
|
|
1672
|
+
# @overload reschedule_cluster_maintenance(request, options = nil)
|
|
1673
|
+
# Pass arguments to `reschedule_cluster_maintenance` via a request object, either of type
|
|
1674
|
+
# {::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest} or an equivalent Hash.
|
|
1675
|
+
#
|
|
1676
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest, ::Hash]
|
|
1677
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1678
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1679
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1680
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1681
|
+
#
|
|
1682
|
+
# @overload reschedule_cluster_maintenance(name: nil, reschedule_type: nil, schedule_time: nil)
|
|
1683
|
+
# Pass arguments to `reschedule_cluster_maintenance` via keyword arguments. Note that at
|
|
1684
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1685
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1686
|
+
#
|
|
1687
|
+
# @param name [::String]
|
|
1688
|
+
# Required. Redis Cluster instance resource name using the form:
|
|
1689
|
+
# `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
|
|
1690
|
+
# where `location_id` refers to a GCP region.
|
|
1691
|
+
# @param reschedule_type [::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest::RescheduleType]
|
|
1692
|
+
# Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as
|
|
1693
|
+
# well.
|
|
1694
|
+
# @param schedule_time [::Google::Protobuf::Timestamp, ::Hash]
|
|
1695
|
+
# Optional. Timestamp when the maintenance shall be rescheduled to if
|
|
1696
|
+
# reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
|
|
1697
|
+
# example `2012-11-15T16:19:00.094Z`.
|
|
1698
|
+
#
|
|
1699
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1700
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1701
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1702
|
+
#
|
|
1703
|
+
# @return [::Gapic::Operation]
|
|
1704
|
+
#
|
|
1705
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1706
|
+
#
|
|
1707
|
+
# @example Basic example
|
|
1708
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1709
|
+
#
|
|
1710
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1711
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1712
|
+
#
|
|
1713
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1714
|
+
# request = Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest.new
|
|
1715
|
+
#
|
|
1716
|
+
# # Call the reschedule_cluster_maintenance method.
|
|
1717
|
+
# result = client.reschedule_cluster_maintenance request
|
|
1718
|
+
#
|
|
1719
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1720
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
1721
|
+
# # Here is how to wait for a response.
|
|
1722
|
+
# result.wait_until_done! timeout: 60
|
|
1723
|
+
# if result.response?
|
|
1724
|
+
# p result.response
|
|
1725
|
+
# else
|
|
1726
|
+
# puts "No response received."
|
|
1727
|
+
# end
|
|
1728
|
+
#
|
|
1729
|
+
def reschedule_cluster_maintenance request, options = nil
|
|
1730
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1731
|
+
|
|
1732
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::RescheduleClusterMaintenanceRequest
|
|
1733
|
+
|
|
1734
|
+
# Converts hash and nil to an options object
|
|
1735
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1736
|
+
|
|
1737
|
+
# Customize the options with defaults
|
|
1738
|
+
metadata = @config.rpcs.reschedule_cluster_maintenance.metadata.to_h
|
|
1739
|
+
|
|
1740
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1741
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1742
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1743
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1744
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1745
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1746
|
+
|
|
1747
|
+
header_params = {}
|
|
1748
|
+
if request.name
|
|
1749
|
+
header_params["name"] = request.name
|
|
1750
|
+
end
|
|
1751
|
+
|
|
1752
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1753
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1754
|
+
|
|
1755
|
+
options.apply_defaults timeout: @config.rpcs.reschedule_cluster_maintenance.timeout,
|
|
1756
|
+
metadata: metadata,
|
|
1757
|
+
retry_policy: @config.rpcs.reschedule_cluster_maintenance.retry_policy
|
|
1758
|
+
|
|
1759
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1760
|
+
metadata: @config.metadata,
|
|
1761
|
+
retry_policy: @config.retry_policy
|
|
1762
|
+
|
|
1763
|
+
@cloud_redis_cluster_stub.call_rpc :reschedule_cluster_maintenance, request, options: options do |response, operation|
|
|
1764
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1765
|
+
yield response, operation if block_given?
|
|
1766
|
+
throw :response, response
|
|
1767
|
+
end
|
|
1768
|
+
rescue ::GRPC::BadStatus => e
|
|
1769
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1770
|
+
end
|
|
1771
|
+
|
|
1772
|
+
##
|
|
1773
|
+
# Lists all backup collections owned by a consumer project in either the
|
|
1774
|
+
# specified location (region) or all locations.
|
|
1775
|
+
#
|
|
1776
|
+
# If `location_id` is specified as `-` (wildcard), then all regions
|
|
1777
|
+
# available to the project are queried, and the results are aggregated.
|
|
1778
|
+
#
|
|
1779
|
+
# @overload list_backup_collections(request, options = nil)
|
|
1780
|
+
# Pass arguments to `list_backup_collections` via a request object, either of type
|
|
1781
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest} or an equivalent Hash.
|
|
1782
|
+
#
|
|
1783
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest, ::Hash]
|
|
1784
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1785
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1786
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1787
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1788
|
+
#
|
|
1789
|
+
# @overload list_backup_collections(parent: nil, page_size: nil, page_token: nil)
|
|
1790
|
+
# Pass arguments to `list_backup_collections` via keyword arguments. Note that at
|
|
1791
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1792
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1793
|
+
#
|
|
1794
|
+
# @param parent [::String]
|
|
1795
|
+
# Required. The resource name of the backupCollection location using the
|
|
1796
|
+
# form:
|
|
1797
|
+
# `projects/{project_id}/locations/{location_id}`
|
|
1798
|
+
# where `location_id` refers to a GCP region.
|
|
1799
|
+
# @param page_size [::Integer]
|
|
1800
|
+
# Optional. The maximum number of items to return.
|
|
1801
|
+
#
|
|
1802
|
+
# If not specified, a default value of 1000 will be used by the service.
|
|
1803
|
+
# Regardless of the page_size value, the response may include a partial list
|
|
1804
|
+
# and a caller should only rely on response's
|
|
1805
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsResponse#next_page_token `next_page_token`}
|
|
1806
|
+
# to determine if there are more clusters left to be queried.
|
|
1807
|
+
# @param page_token [::String]
|
|
1808
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
1809
|
+
# [ListBackupCollections] request, if any.
|
|
1810
|
+
#
|
|
1811
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1812
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>]
|
|
1813
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1814
|
+
#
|
|
1815
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::BackupCollection>]
|
|
1816
|
+
#
|
|
1817
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1818
|
+
#
|
|
1819
|
+
# @example Basic example
|
|
1820
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1821
|
+
#
|
|
1822
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1823
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1824
|
+
#
|
|
1825
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1826
|
+
# request = Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest.new
|
|
1827
|
+
#
|
|
1828
|
+
# # Call the list_backup_collections method.
|
|
1829
|
+
# result = client.list_backup_collections request
|
|
1830
|
+
#
|
|
1831
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1832
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1833
|
+
# result.each do |item|
|
|
1834
|
+
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::BackupCollection.
|
|
1835
|
+
# p item
|
|
1836
|
+
# end
|
|
1837
|
+
#
|
|
1838
|
+
def list_backup_collections request, options = nil
|
|
1839
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1840
|
+
|
|
1841
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ListBackupCollectionsRequest
|
|
1842
|
+
|
|
1843
|
+
# Converts hash and nil to an options object
|
|
1844
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1845
|
+
|
|
1846
|
+
# Customize the options with defaults
|
|
1847
|
+
metadata = @config.rpcs.list_backup_collections.metadata.to_h
|
|
1848
|
+
|
|
1849
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1850
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1851
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1852
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1853
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1854
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1855
|
+
|
|
1856
|
+
header_params = {}
|
|
1857
|
+
if request.parent
|
|
1858
|
+
header_params["parent"] = request.parent
|
|
1859
|
+
end
|
|
1860
|
+
|
|
1861
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1862
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1863
|
+
|
|
1864
|
+
options.apply_defaults timeout: @config.rpcs.list_backup_collections.timeout,
|
|
1865
|
+
metadata: metadata,
|
|
1866
|
+
retry_policy: @config.rpcs.list_backup_collections.retry_policy
|
|
1867
|
+
|
|
1868
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1869
|
+
metadata: @config.metadata,
|
|
1870
|
+
retry_policy: @config.retry_policy
|
|
1871
|
+
|
|
1872
|
+
@cloud_redis_cluster_stub.call_rpc :list_backup_collections, request, options: options do |response, operation|
|
|
1873
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_backup_collections, request, response, operation, options
|
|
1874
|
+
yield response, operation if block_given?
|
|
1875
|
+
throw :response, response
|
|
1876
|
+
end
|
|
1877
|
+
rescue ::GRPC::BadStatus => e
|
|
1878
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1879
|
+
end
|
|
1880
|
+
|
|
1881
|
+
##
|
|
1882
|
+
# Get a backup collection.
|
|
1883
|
+
#
|
|
1884
|
+
# @overload get_backup_collection(request, options = nil)
|
|
1885
|
+
# Pass arguments to `get_backup_collection` via a request object, either of type
|
|
1886
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest} or an equivalent Hash.
|
|
1887
|
+
#
|
|
1888
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest, ::Hash]
|
|
1889
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1890
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1891
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1892
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1893
|
+
#
|
|
1894
|
+
# @overload get_backup_collection(name: nil)
|
|
1895
|
+
# Pass arguments to `get_backup_collection` via keyword arguments. Note that at
|
|
1896
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1897
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1898
|
+
#
|
|
1899
|
+
# @param name [::String]
|
|
1900
|
+
# Required. Redis backupCollection resource name using the form:
|
|
1901
|
+
# `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
|
|
1902
|
+
# where `location_id` refers to a GCP region.
|
|
1903
|
+
#
|
|
1904
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1905
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::BackupCollection]
|
|
1906
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1907
|
+
#
|
|
1908
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::BackupCollection]
|
|
1909
|
+
#
|
|
1910
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1911
|
+
#
|
|
1912
|
+
# @example Basic example
|
|
1913
|
+
# require "google/cloud/redis/cluster/v1"
|
|
1914
|
+
#
|
|
1915
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1916
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1917
|
+
#
|
|
1918
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1919
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest.new
|
|
1920
|
+
#
|
|
1921
|
+
# # Call the get_backup_collection method.
|
|
1922
|
+
# result = client.get_backup_collection request
|
|
1923
|
+
#
|
|
1924
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::BackupCollection.
|
|
1925
|
+
# p result
|
|
1926
|
+
#
|
|
1927
|
+
def get_backup_collection request, options = nil
|
|
1928
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1929
|
+
|
|
1930
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetBackupCollectionRequest
|
|
1931
|
+
|
|
1932
|
+
# Converts hash and nil to an options object
|
|
1933
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1934
|
+
|
|
1935
|
+
# Customize the options with defaults
|
|
1936
|
+
metadata = @config.rpcs.get_backup_collection.metadata.to_h
|
|
1937
|
+
|
|
1938
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1939
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1940
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1941
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
1942
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1943
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1944
|
+
|
|
1945
|
+
header_params = {}
|
|
1946
|
+
if request.name
|
|
1947
|
+
header_params["name"] = request.name
|
|
1948
|
+
end
|
|
1949
|
+
|
|
1950
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1951
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1952
|
+
|
|
1953
|
+
options.apply_defaults timeout: @config.rpcs.get_backup_collection.timeout,
|
|
1954
|
+
metadata: metadata,
|
|
1955
|
+
retry_policy: @config.rpcs.get_backup_collection.retry_policy
|
|
1956
|
+
|
|
1957
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1958
|
+
metadata: @config.metadata,
|
|
1959
|
+
retry_policy: @config.retry_policy
|
|
1960
|
+
|
|
1961
|
+
@cloud_redis_cluster_stub.call_rpc :get_backup_collection, request, options: options do |response, operation|
|
|
1962
|
+
yield response, operation if block_given?
|
|
1963
|
+
end
|
|
1964
|
+
rescue ::GRPC::BadStatus => e
|
|
1965
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1966
|
+
end
|
|
1967
|
+
|
|
1968
|
+
##
|
|
1969
|
+
# Lists all backups owned by a backup collection.
|
|
1970
|
+
#
|
|
1971
|
+
# @overload list_backups(request, options = nil)
|
|
1972
|
+
# Pass arguments to `list_backups` via a request object, either of type
|
|
1973
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListBackupsRequest} or an equivalent Hash.
|
|
1974
|
+
#
|
|
1975
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ListBackupsRequest, ::Hash]
|
|
1976
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1977
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1978
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1979
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1980
|
+
#
|
|
1981
|
+
# @overload list_backups(parent: nil, page_size: nil, page_token: nil)
|
|
1982
|
+
# Pass arguments to `list_backups` via keyword arguments. Note that at
|
|
1983
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1984
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1985
|
+
#
|
|
1986
|
+
# @param parent [::String]
|
|
1987
|
+
# Required. The resource name of the backupCollection using the form:
|
|
1988
|
+
# `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}`
|
|
1989
|
+
# @param page_size [::Integer]
|
|
1990
|
+
# Optional. The maximum number of items to return.
|
|
1991
|
+
#
|
|
1992
|
+
# If not specified, a default value of 1000 will be used by the service.
|
|
1993
|
+
# Regardless of the page_size value, the response may include a partial list
|
|
1994
|
+
# and a caller should only rely on response's
|
|
1995
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListBackupsResponse#next_page_token `next_page_token`}
|
|
1996
|
+
# to determine if there are more clusters left to be queried.
|
|
1997
|
+
# @param page_token [::String]
|
|
1998
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
1999
|
+
# [ListBackupCollections] request, if any.
|
|
2000
|
+
#
|
|
2001
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
2002
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>]
|
|
2003
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
2004
|
+
#
|
|
2005
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::Backup>]
|
|
2006
|
+
#
|
|
2007
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
2008
|
+
#
|
|
2009
|
+
# @example Basic example
|
|
2010
|
+
# require "google/cloud/redis/cluster/v1"
|
|
2011
|
+
#
|
|
2012
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
2013
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
2014
|
+
#
|
|
2015
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
2016
|
+
# request = Google::Cloud::Redis::Cluster::V1::ListBackupsRequest.new
|
|
2017
|
+
#
|
|
2018
|
+
# # Call the list_backups method.
|
|
2019
|
+
# result = client.list_backups request
|
|
2020
|
+
#
|
|
2021
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
2022
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
2023
|
+
# result.each do |item|
|
|
2024
|
+
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::Backup.
|
|
2025
|
+
# p item
|
|
2026
|
+
# end
|
|
2027
|
+
#
|
|
2028
|
+
def list_backups request, options = nil
|
|
2029
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
2030
|
+
|
|
2031
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ListBackupsRequest
|
|
2032
|
+
|
|
2033
|
+
# Converts hash and nil to an options object
|
|
2034
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
2035
|
+
|
|
2036
|
+
# Customize the options with defaults
|
|
2037
|
+
metadata = @config.rpcs.list_backups.metadata.to_h
|
|
2038
|
+
|
|
2039
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2040
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2041
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2042
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
2043
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2044
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2045
|
+
|
|
2046
|
+
header_params = {}
|
|
2047
|
+
if request.parent
|
|
2048
|
+
header_params["parent"] = request.parent
|
|
2049
|
+
end
|
|
2050
|
+
|
|
2051
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
2052
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
2053
|
+
|
|
2054
|
+
options.apply_defaults timeout: @config.rpcs.list_backups.timeout,
|
|
2055
|
+
metadata: metadata,
|
|
2056
|
+
retry_policy: @config.rpcs.list_backups.retry_policy
|
|
2057
|
+
|
|
2058
|
+
options.apply_defaults timeout: @config.timeout,
|
|
2059
|
+
metadata: @config.metadata,
|
|
2060
|
+
retry_policy: @config.retry_policy
|
|
2061
|
+
|
|
2062
|
+
@cloud_redis_cluster_stub.call_rpc :list_backups, request, options: options do |response, operation|
|
|
2063
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_backups, request, response, operation, options
|
|
2064
|
+
yield response, operation if block_given?
|
|
2065
|
+
throw :response, response
|
|
2066
|
+
end
|
|
2067
|
+
rescue ::GRPC::BadStatus => e
|
|
2068
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
2069
|
+
end
|
|
2070
|
+
|
|
2071
|
+
##
|
|
2072
|
+
# Gets the details of a specific backup.
|
|
2073
|
+
#
|
|
2074
|
+
# @overload get_backup(request, options = nil)
|
|
2075
|
+
# Pass arguments to `get_backup` via a request object, either of type
|
|
2076
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetBackupRequest} or an equivalent Hash.
|
|
2077
|
+
#
|
|
2078
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetBackupRequest, ::Hash]
|
|
2079
|
+
# A request object representing the call parameters. Required. To specify no
|
|
2080
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
2081
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2082
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
2083
|
+
#
|
|
2084
|
+
# @overload get_backup(name: nil)
|
|
2085
|
+
# Pass arguments to `get_backup` via keyword arguments. Note that at
|
|
2086
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2087
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2088
|
+
#
|
|
2089
|
+
# @param name [::String]
|
|
2090
|
+
# Required. Redis backup resource name using the form:
|
|
2091
|
+
# `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
|
|
2092
|
+
#
|
|
2093
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
2094
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::Backup]
|
|
2095
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
2096
|
+
#
|
|
2097
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::Backup]
|
|
2098
|
+
#
|
|
2099
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
2100
|
+
#
|
|
2101
|
+
# @example Basic example
|
|
2102
|
+
# require "google/cloud/redis/cluster/v1"
|
|
2103
|
+
#
|
|
2104
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
2105
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
2106
|
+
#
|
|
2107
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
2108
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetBackupRequest.new
|
|
2109
|
+
#
|
|
2110
|
+
# # Call the get_backup method.
|
|
2111
|
+
# result = client.get_backup request
|
|
2112
|
+
#
|
|
2113
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::Backup.
|
|
2114
|
+
# p result
|
|
2115
|
+
#
|
|
2116
|
+
def get_backup request, options = nil
|
|
2117
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
2118
|
+
|
|
2119
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetBackupRequest
|
|
2120
|
+
|
|
2121
|
+
# Converts hash and nil to an options object
|
|
2122
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
2123
|
+
|
|
2124
|
+
# Customize the options with defaults
|
|
2125
|
+
metadata = @config.rpcs.get_backup.metadata.to_h
|
|
2126
|
+
|
|
2127
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2128
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2129
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2130
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
2131
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2132
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2133
|
+
|
|
2134
|
+
header_params = {}
|
|
2135
|
+
if request.name
|
|
2136
|
+
header_params["name"] = request.name
|
|
2137
|
+
end
|
|
2138
|
+
|
|
2139
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
2140
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
2141
|
+
|
|
2142
|
+
options.apply_defaults timeout: @config.rpcs.get_backup.timeout,
|
|
2143
|
+
metadata: metadata,
|
|
2144
|
+
retry_policy: @config.rpcs.get_backup.retry_policy
|
|
2145
|
+
|
|
2146
|
+
options.apply_defaults timeout: @config.timeout,
|
|
2147
|
+
metadata: @config.metadata,
|
|
2148
|
+
retry_policy: @config.retry_policy
|
|
2149
|
+
|
|
2150
|
+
@cloud_redis_cluster_stub.call_rpc :get_backup, request, options: options do |response, operation|
|
|
2151
|
+
yield response, operation if block_given?
|
|
2152
|
+
end
|
|
2153
|
+
rescue ::GRPC::BadStatus => e
|
|
2154
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
2155
|
+
end
|
|
2156
|
+
|
|
2157
|
+
##
|
|
2158
|
+
# Deletes a specific backup.
|
|
2159
|
+
#
|
|
2160
|
+
# @overload delete_backup(request, options = nil)
|
|
2161
|
+
# Pass arguments to `delete_backup` via a request object, either of type
|
|
2162
|
+
# {::Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest} or an equivalent Hash.
|
|
2163
|
+
#
|
|
2164
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest, ::Hash]
|
|
2165
|
+
# A request object representing the call parameters. Required. To specify no
|
|
2166
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
2167
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2168
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
2169
|
+
#
|
|
2170
|
+
# @overload delete_backup(name: nil, request_id: nil)
|
|
2171
|
+
# Pass arguments to `delete_backup` via keyword arguments. Note that at
|
|
2172
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2173
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2174
|
+
#
|
|
2175
|
+
# @param name [::String]
|
|
2176
|
+
# Required. Redis backup resource name using the form:
|
|
2177
|
+
# `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
|
|
2178
|
+
# @param request_id [::String]
|
|
2179
|
+
# Optional. Idempotent request UUID.
|
|
803
2180
|
#
|
|
804
2181
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
805
|
-
# @yieldparam response [::
|
|
2182
|
+
# @yieldparam response [::Gapic::Operation]
|
|
806
2183
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
807
2184
|
#
|
|
808
|
-
# @return [::
|
|
2185
|
+
# @return [::Gapic::Operation]
|
|
809
2186
|
#
|
|
810
2187
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
811
2188
|
#
|
|
@@ -816,24 +2193,31 @@ module Google
|
|
|
816
2193
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
817
2194
|
#
|
|
818
2195
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
819
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2196
|
+
# request = Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest.new
|
|
820
2197
|
#
|
|
821
|
-
# # Call the
|
|
822
|
-
# result = client.
|
|
2198
|
+
# # Call the delete_backup method.
|
|
2199
|
+
# result = client.delete_backup request
|
|
823
2200
|
#
|
|
824
|
-
# # The returned object is of type
|
|
825
|
-
#
|
|
2201
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
2202
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
2203
|
+
# # Here is how to wait for a response.
|
|
2204
|
+
# result.wait_until_done! timeout: 60
|
|
2205
|
+
# if result.response?
|
|
2206
|
+
# p result.response
|
|
2207
|
+
# else
|
|
2208
|
+
# puts "No response received."
|
|
2209
|
+
# end
|
|
826
2210
|
#
|
|
827
|
-
def
|
|
2211
|
+
def delete_backup request, options = nil
|
|
828
2212
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
829
2213
|
|
|
830
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2214
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::DeleteBackupRequest
|
|
831
2215
|
|
|
832
2216
|
# Converts hash and nil to an options object
|
|
833
2217
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
834
2218
|
|
|
835
2219
|
# Customize the options with defaults
|
|
836
|
-
metadata = @config.rpcs.
|
|
2220
|
+
metadata = @config.rpcs.delete_backup.metadata.to_h
|
|
837
2221
|
|
|
838
2222
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
839
2223
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -850,50 +2234,52 @@ module Google
|
|
|
850
2234
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
851
2235
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
852
2236
|
|
|
853
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2237
|
+
options.apply_defaults timeout: @config.rpcs.delete_backup.timeout,
|
|
854
2238
|
metadata: metadata,
|
|
855
|
-
retry_policy: @config.rpcs.
|
|
2239
|
+
retry_policy: @config.rpcs.delete_backup.retry_policy
|
|
856
2240
|
|
|
857
2241
|
options.apply_defaults timeout: @config.timeout,
|
|
858
2242
|
metadata: @config.metadata,
|
|
859
2243
|
retry_policy: @config.retry_policy
|
|
860
2244
|
|
|
861
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
2245
|
+
@cloud_redis_cluster_stub.call_rpc :delete_backup, request, options: options do |response, operation|
|
|
2246
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
862
2247
|
yield response, operation if block_given?
|
|
2248
|
+
throw :response, response
|
|
863
2249
|
end
|
|
864
2250
|
rescue ::GRPC::BadStatus => e
|
|
865
2251
|
raise ::Google::Cloud::Error.from_error(e)
|
|
866
2252
|
end
|
|
867
2253
|
|
|
868
2254
|
##
|
|
869
|
-
#
|
|
870
|
-
# cluster.
|
|
2255
|
+
# Exports a specific backup to a customer target Cloud Storage URI.
|
|
871
2256
|
#
|
|
872
|
-
# @overload
|
|
873
|
-
# Pass arguments to `
|
|
874
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2257
|
+
# @overload export_backup(request, options = nil)
|
|
2258
|
+
# Pass arguments to `export_backup` via a request object, either of type
|
|
2259
|
+
# {::Google::Cloud::Redis::Cluster::V1::ExportBackupRequest} or an equivalent Hash.
|
|
875
2260
|
#
|
|
876
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2261
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ExportBackupRequest, ::Hash]
|
|
877
2262
|
# A request object representing the call parameters. Required. To specify no
|
|
878
2263
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
879
2264
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
880
2265
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
881
2266
|
#
|
|
882
|
-
# @overload
|
|
883
|
-
# Pass arguments to `
|
|
2267
|
+
# @overload export_backup(gcs_bucket: nil, name: nil)
|
|
2268
|
+
# Pass arguments to `export_backup` via keyword arguments. Note that at
|
|
884
2269
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
885
2270
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
886
2271
|
#
|
|
2272
|
+
# @param gcs_bucket [::String]
|
|
2273
|
+
# Google Cloud Storage bucket, like "my-bucket".
|
|
887
2274
|
# @param name [::String]
|
|
888
|
-
# Required.
|
|
889
|
-
#
|
|
890
|
-
# where `location_id` refers to a Google Cloud region.
|
|
2275
|
+
# Required. Redis backup resource name using the form:
|
|
2276
|
+
# `projects/{project_id}/locations/{location_id}/backupCollections/{backup_collection_id}/backups/{backup_id}`
|
|
891
2277
|
#
|
|
892
2278
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
893
|
-
# @yieldparam response [::
|
|
2279
|
+
# @yieldparam response [::Gapic::Operation]
|
|
894
2280
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
895
2281
|
#
|
|
896
|
-
# @return [::
|
|
2282
|
+
# @return [::Gapic::Operation]
|
|
897
2283
|
#
|
|
898
2284
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
899
2285
|
#
|
|
@@ -904,24 +2290,31 @@ module Google
|
|
|
904
2290
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
905
2291
|
#
|
|
906
2292
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
907
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2293
|
+
# request = Google::Cloud::Redis::Cluster::V1::ExportBackupRequest.new
|
|
908
2294
|
#
|
|
909
|
-
# # Call the
|
|
910
|
-
# result = client.
|
|
2295
|
+
# # Call the export_backup method.
|
|
2296
|
+
# result = client.export_backup request
|
|
911
2297
|
#
|
|
912
|
-
# # The returned object is of type
|
|
913
|
-
#
|
|
2298
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
2299
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
2300
|
+
# # Here is how to wait for a response.
|
|
2301
|
+
# result.wait_until_done! timeout: 60
|
|
2302
|
+
# if result.response?
|
|
2303
|
+
# p result.response
|
|
2304
|
+
# else
|
|
2305
|
+
# puts "No response received."
|
|
2306
|
+
# end
|
|
914
2307
|
#
|
|
915
|
-
def
|
|
2308
|
+
def export_backup request, options = nil
|
|
916
2309
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
917
2310
|
|
|
918
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2311
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ExportBackupRequest
|
|
919
2312
|
|
|
920
2313
|
# Converts hash and nil to an options object
|
|
921
2314
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
922
2315
|
|
|
923
2316
|
# Customize the options with defaults
|
|
924
|
-
metadata = @config.rpcs.
|
|
2317
|
+
metadata = @config.rpcs.export_backup.metadata.to_h
|
|
925
2318
|
|
|
926
2319
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
927
2320
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -938,50 +2331,62 @@ module Google
|
|
|
938
2331
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
939
2332
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
940
2333
|
|
|
941
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2334
|
+
options.apply_defaults timeout: @config.rpcs.export_backup.timeout,
|
|
942
2335
|
metadata: metadata,
|
|
943
|
-
retry_policy: @config.rpcs.
|
|
2336
|
+
retry_policy: @config.rpcs.export_backup.retry_policy
|
|
944
2337
|
|
|
945
2338
|
options.apply_defaults timeout: @config.timeout,
|
|
946
2339
|
metadata: @config.metadata,
|
|
947
2340
|
retry_policy: @config.retry_policy
|
|
948
2341
|
|
|
949
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
2342
|
+
@cloud_redis_cluster_stub.call_rpc :export_backup, request, options: options do |response, operation|
|
|
2343
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
950
2344
|
yield response, operation if block_given?
|
|
2345
|
+
throw :response, response
|
|
951
2346
|
end
|
|
952
2347
|
rescue ::GRPC::BadStatus => e
|
|
953
2348
|
raise ::Google::Cloud::Error.from_error(e)
|
|
954
2349
|
end
|
|
955
2350
|
|
|
956
2351
|
##
|
|
957
|
-
#
|
|
2352
|
+
# Backup Redis Cluster.
|
|
2353
|
+
# If this is the first time a backup is being created, a backup collection
|
|
2354
|
+
# will be created at the backend, and this backup belongs to this collection.
|
|
2355
|
+
# Both collection and backup will have a resource name. Backup will be
|
|
2356
|
+
# executed for each shard. A replica (primary if nonHA) will be selected to
|
|
2357
|
+
# perform the execution. Backup call will be rejected if there is an ongoing
|
|
2358
|
+
# backup or update operation. Be aware that during preview, if the cluster's
|
|
2359
|
+
# internal software version is too old, critical update will be performed
|
|
2360
|
+
# before actual backup. Once the internal software version is updated to the
|
|
2361
|
+
# minimum version required by the backup feature, subsequent backups will not
|
|
2362
|
+
# require critical update. After preview, there will be no critical update
|
|
2363
|
+
# needed for backup.
|
|
958
2364
|
#
|
|
959
|
-
# @overload
|
|
960
|
-
# Pass arguments to `
|
|
961
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2365
|
+
# @overload backup_cluster(request, options = nil)
|
|
2366
|
+
# Pass arguments to `backup_cluster` via a request object, either of type
|
|
2367
|
+
# {::Google::Cloud::Redis::Cluster::V1::BackupClusterRequest} or an equivalent Hash.
|
|
962
2368
|
#
|
|
963
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2369
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::BackupClusterRequest, ::Hash]
|
|
964
2370
|
# A request object representing the call parameters. Required. To specify no
|
|
965
2371
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
966
2372
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
967
2373
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
968
2374
|
#
|
|
969
|
-
# @overload
|
|
970
|
-
# Pass arguments to `
|
|
2375
|
+
# @overload backup_cluster(name: nil, ttl: nil, backup_id: nil)
|
|
2376
|
+
# Pass arguments to `backup_cluster` via keyword arguments. Note that at
|
|
971
2377
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
972
2378
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
973
2379
|
#
|
|
974
2380
|
# @param name [::String]
|
|
975
|
-
# Required. Redis
|
|
976
|
-
#
|
|
2381
|
+
# Required. Redis cluster resource name using the form:
|
|
2382
|
+
# `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`
|
|
977
2383
|
# where `location_id` refers to a GCP region.
|
|
978
|
-
# @param
|
|
979
|
-
#
|
|
980
|
-
#
|
|
981
|
-
# @param
|
|
982
|
-
# Optional.
|
|
983
|
-
#
|
|
984
|
-
# example `2012-11-15T16:19:00.094Z`.
|
|
2384
|
+
# @param ttl [::Google::Protobuf::Duration, ::Hash]
|
|
2385
|
+
# Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
|
|
2386
|
+
# If not specified, the default value is 100 years.
|
|
2387
|
+
# @param backup_id [::String]
|
|
2388
|
+
# Optional. The id of the backup to be created. If not specified, the
|
|
2389
|
+
# default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used.
|
|
985
2390
|
#
|
|
986
2391
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
987
2392
|
# @yieldparam response [::Gapic::Operation]
|
|
@@ -998,10 +2403,10 @@ module Google
|
|
|
998
2403
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
999
2404
|
#
|
|
1000
2405
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1001
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2406
|
+
# request = Google::Cloud::Redis::Cluster::V1::BackupClusterRequest.new
|
|
1002
2407
|
#
|
|
1003
|
-
# # Call the
|
|
1004
|
-
# result = client.
|
|
2408
|
+
# # Call the backup_cluster method.
|
|
2409
|
+
# result = client.backup_cluster request
|
|
1005
2410
|
#
|
|
1006
2411
|
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1007
2412
|
# # check the status of an operation, cancel it, or wait for results.
|
|
@@ -1013,16 +2418,16 @@ module Google
|
|
|
1013
2418
|
# puts "No response received."
|
|
1014
2419
|
# end
|
|
1015
2420
|
#
|
|
1016
|
-
def
|
|
2421
|
+
def backup_cluster request, options = nil
|
|
1017
2422
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1018
2423
|
|
|
1019
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2424
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::BackupClusterRequest
|
|
1020
2425
|
|
|
1021
2426
|
# Converts hash and nil to an options object
|
|
1022
2427
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1023
2428
|
|
|
1024
2429
|
# Customize the options with defaults
|
|
1025
|
-
metadata = @config.rpcs.
|
|
2430
|
+
metadata = @config.rpcs.backup_cluster.metadata.to_h
|
|
1026
2431
|
|
|
1027
2432
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1028
2433
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1039,15 +2444,15 @@ module Google
|
|
|
1039
2444
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1040
2445
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1041
2446
|
|
|
1042
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2447
|
+
options.apply_defaults timeout: @config.rpcs.backup_cluster.timeout,
|
|
1043
2448
|
metadata: metadata,
|
|
1044
|
-
retry_policy: @config.rpcs.
|
|
2449
|
+
retry_policy: @config.rpcs.backup_cluster.retry_policy
|
|
1045
2450
|
|
|
1046
2451
|
options.apply_defaults timeout: @config.timeout,
|
|
1047
2452
|
metadata: @config.metadata,
|
|
1048
2453
|
retry_policy: @config.retry_policy
|
|
1049
2454
|
|
|
1050
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
2455
|
+
@cloud_redis_cluster_stub.call_rpc :backup_cluster, request, options: options do |response, operation|
|
|
1051
2456
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1052
2457
|
yield response, operation if block_given?
|
|
1053
2458
|
throw :response, response
|
|
@@ -1057,49 +2462,49 @@ module Google
|
|
|
1057
2462
|
end
|
|
1058
2463
|
|
|
1059
2464
|
##
|
|
1060
|
-
# Lists all
|
|
1061
|
-
# specified location (region) or all locations.
|
|
1062
|
-
#
|
|
1063
|
-
# If `location_id` is specified as `-` (wildcard), then all regions
|
|
1064
|
-
# available to the project are queried, and the results are aggregated.
|
|
2465
|
+
# Lists all the token auth users for a token based auth enabled cluster.
|
|
1065
2466
|
#
|
|
1066
|
-
# @overload
|
|
1067
|
-
# Pass arguments to `
|
|
1068
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2467
|
+
# @overload list_token_auth_users(request, options = nil)
|
|
2468
|
+
# Pass arguments to `list_token_auth_users` via a request object, either of type
|
|
2469
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersRequest} or an equivalent Hash.
|
|
1069
2470
|
#
|
|
1070
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2471
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersRequest, ::Hash]
|
|
1071
2472
|
# A request object representing the call parameters. Required. To specify no
|
|
1072
2473
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1073
2474
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1074
2475
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1075
2476
|
#
|
|
1076
|
-
# @overload
|
|
1077
|
-
# Pass arguments to `
|
|
2477
|
+
# @overload list_token_auth_users(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
|
2478
|
+
# Pass arguments to `list_token_auth_users` via keyword arguments. Note that at
|
|
1078
2479
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1079
2480
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1080
2481
|
#
|
|
1081
2482
|
# @param parent [::String]
|
|
1082
|
-
# Required. The resource
|
|
1083
|
-
#
|
|
1084
|
-
#
|
|
1085
|
-
# where `location_id` refers to a GCP region.
|
|
2483
|
+
# Required. The parent resource that this token based auth user will be
|
|
2484
|
+
# listed for. Format:
|
|
2485
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}
|
|
1086
2486
|
# @param page_size [::Integer]
|
|
1087
2487
|
# Optional. The maximum number of items to return.
|
|
1088
2488
|
#
|
|
1089
2489
|
# If not specified, a default value of 1000 will be used by the service.
|
|
1090
2490
|
# Regardless of the page_size value, the response may include a partial list
|
|
1091
2491
|
# and a caller should only rely on response's
|
|
1092
|
-
#
|
|
2492
|
+
# The maximum value is 1000; values above 1000 will be coerced to 1000.
|
|
2493
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersResponse#next_page_token `next_page_token`}
|
|
1093
2494
|
# to determine if there are more clusters left to be queried.
|
|
1094
2495
|
# @param page_token [::String]
|
|
1095
2496
|
# Optional. The `next_page_token` value returned from a previous
|
|
1096
|
-
# [
|
|
2497
|
+
# [ListTokenAuthUsers] request, if any.
|
|
2498
|
+
# @param filter [::String]
|
|
2499
|
+
# Optional. Expression for filtering results.
|
|
2500
|
+
# @param order_by [::String]
|
|
2501
|
+
# Optional. Sort results by a defined order.
|
|
1097
2502
|
#
|
|
1098
2503
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1099
|
-
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::
|
|
2504
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>]
|
|
1100
2505
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1101
2506
|
#
|
|
1102
|
-
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::
|
|
2507
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::TokenAuthUser>]
|
|
1103
2508
|
#
|
|
1104
2509
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1105
2510
|
#
|
|
@@ -1110,28 +2515,117 @@ module Google
|
|
|
1110
2515
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1111
2516
|
#
|
|
1112
2517
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1113
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2518
|
+
# request = Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersRequest.new
|
|
1114
2519
|
#
|
|
1115
|
-
# # Call the
|
|
1116
|
-
# result = client.
|
|
2520
|
+
# # Call the list_token_auth_users method.
|
|
2521
|
+
# result = client.list_token_auth_users request
|
|
1117
2522
|
#
|
|
1118
2523
|
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
1119
2524
|
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
1120
2525
|
# result.each do |item|
|
|
1121
|
-
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::
|
|
2526
|
+
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::TokenAuthUser.
|
|
1122
2527
|
# p item
|
|
1123
2528
|
# end
|
|
1124
2529
|
#
|
|
1125
|
-
def
|
|
2530
|
+
def list_token_auth_users request, options = nil
|
|
1126
2531
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1127
2532
|
|
|
1128
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2533
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersRequest
|
|
2534
|
+
|
|
2535
|
+
# Converts hash and nil to an options object
|
|
2536
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
2537
|
+
|
|
2538
|
+
# Customize the options with defaults
|
|
2539
|
+
metadata = @config.rpcs.list_token_auth_users.metadata.to_h
|
|
2540
|
+
|
|
2541
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
2542
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
2543
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
2544
|
+
gapic_version: ::Google::Cloud::Redis::Cluster::V1::VERSION
|
|
2545
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
2546
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
2547
|
+
|
|
2548
|
+
header_params = {}
|
|
2549
|
+
if request.parent
|
|
2550
|
+
header_params["parent"] = request.parent
|
|
2551
|
+
end
|
|
2552
|
+
|
|
2553
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
2554
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
2555
|
+
|
|
2556
|
+
options.apply_defaults timeout: @config.rpcs.list_token_auth_users.timeout,
|
|
2557
|
+
metadata: metadata,
|
|
2558
|
+
retry_policy: @config.rpcs.list_token_auth_users.retry_policy
|
|
2559
|
+
|
|
2560
|
+
options.apply_defaults timeout: @config.timeout,
|
|
2561
|
+
metadata: @config.metadata,
|
|
2562
|
+
retry_policy: @config.retry_policy
|
|
2563
|
+
|
|
2564
|
+
@cloud_redis_cluster_stub.call_rpc :list_token_auth_users, request, options: options do |response, operation|
|
|
2565
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_token_auth_users, request, response, operation, options
|
|
2566
|
+
yield response, operation if block_given?
|
|
2567
|
+
throw :response, response
|
|
2568
|
+
end
|
|
2569
|
+
rescue ::GRPC::BadStatus => e
|
|
2570
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
2571
|
+
end
|
|
2572
|
+
|
|
2573
|
+
##
|
|
2574
|
+
# Gets a specific token auth user for a basic auth enabled cluster.
|
|
2575
|
+
#
|
|
2576
|
+
# @overload get_token_auth_user(request, options = nil)
|
|
2577
|
+
# Pass arguments to `get_token_auth_user` via a request object, either of type
|
|
2578
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetTokenAuthUserRequest} or an equivalent Hash.
|
|
2579
|
+
#
|
|
2580
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetTokenAuthUserRequest, ::Hash]
|
|
2581
|
+
# A request object representing the call parameters. Required. To specify no
|
|
2582
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
2583
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
2584
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
2585
|
+
#
|
|
2586
|
+
# @overload get_token_auth_user(name: nil)
|
|
2587
|
+
# Pass arguments to `get_token_auth_user` via keyword arguments. Note that at
|
|
2588
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
2589
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
2590
|
+
#
|
|
2591
|
+
# @param name [::String]
|
|
2592
|
+
# Required. The name of token auth user for a token based auth enabled
|
|
2593
|
+
# cluster. Format:
|
|
2594
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/tokenAuthUsers/\\{token_auth_user}
|
|
2595
|
+
#
|
|
2596
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
2597
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::TokenAuthUser]
|
|
2598
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
2599
|
+
#
|
|
2600
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::TokenAuthUser]
|
|
2601
|
+
#
|
|
2602
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
2603
|
+
#
|
|
2604
|
+
# @example Basic example
|
|
2605
|
+
# require "google/cloud/redis/cluster/v1"
|
|
2606
|
+
#
|
|
2607
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
2608
|
+
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
2609
|
+
#
|
|
2610
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
2611
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetTokenAuthUserRequest.new
|
|
2612
|
+
#
|
|
2613
|
+
# # Call the get_token_auth_user method.
|
|
2614
|
+
# result = client.get_token_auth_user request
|
|
2615
|
+
#
|
|
2616
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::TokenAuthUser.
|
|
2617
|
+
# p result
|
|
2618
|
+
#
|
|
2619
|
+
def get_token_auth_user request, options = nil
|
|
2620
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
2621
|
+
|
|
2622
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetTokenAuthUserRequest
|
|
1129
2623
|
|
|
1130
2624
|
# Converts hash and nil to an options object
|
|
1131
2625
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1132
2626
|
|
|
1133
2627
|
# Customize the options with defaults
|
|
1134
|
-
metadata = @config.rpcs.
|
|
2628
|
+
metadata = @config.rpcs.get_token_auth_user.metadata.to_h
|
|
1135
2629
|
|
|
1136
2630
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1137
2631
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1141,58 +2635,71 @@ module Google
|
|
|
1141
2635
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1142
2636
|
|
|
1143
2637
|
header_params = {}
|
|
1144
|
-
if request.
|
|
1145
|
-
header_params["
|
|
2638
|
+
if request.name
|
|
2639
|
+
header_params["name"] = request.name
|
|
1146
2640
|
end
|
|
1147
2641
|
|
|
1148
2642
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1149
2643
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1150
2644
|
|
|
1151
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2645
|
+
options.apply_defaults timeout: @config.rpcs.get_token_auth_user.timeout,
|
|
1152
2646
|
metadata: metadata,
|
|
1153
|
-
retry_policy: @config.rpcs.
|
|
2647
|
+
retry_policy: @config.rpcs.get_token_auth_user.retry_policy
|
|
1154
2648
|
|
|
1155
2649
|
options.apply_defaults timeout: @config.timeout,
|
|
1156
2650
|
metadata: @config.metadata,
|
|
1157
2651
|
retry_policy: @config.retry_policy
|
|
1158
2652
|
|
|
1159
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
1160
|
-
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_backup_collections, request, response, operation, options
|
|
2653
|
+
@cloud_redis_cluster_stub.call_rpc :get_token_auth_user, request, options: options do |response, operation|
|
|
1161
2654
|
yield response, operation if block_given?
|
|
1162
|
-
throw :response, response
|
|
1163
2655
|
end
|
|
1164
2656
|
rescue ::GRPC::BadStatus => e
|
|
1165
2657
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1166
2658
|
end
|
|
1167
2659
|
|
|
1168
2660
|
##
|
|
1169
|
-
#
|
|
2661
|
+
# Lists all the auth tokens for a specific token auth user.
|
|
1170
2662
|
#
|
|
1171
|
-
# @overload
|
|
1172
|
-
# Pass arguments to `
|
|
1173
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2663
|
+
# @overload list_auth_tokens(request, options = nil)
|
|
2664
|
+
# Pass arguments to `list_auth_tokens` via a request object, either of type
|
|
2665
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListAuthTokensRequest} or an equivalent Hash.
|
|
1174
2666
|
#
|
|
1175
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2667
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::ListAuthTokensRequest, ::Hash]
|
|
1176
2668
|
# A request object representing the call parameters. Required. To specify no
|
|
1177
2669
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1178
2670
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1179
2671
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1180
2672
|
#
|
|
1181
|
-
# @overload
|
|
1182
|
-
# Pass arguments to `
|
|
2673
|
+
# @overload list_auth_tokens(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
|
|
2674
|
+
# Pass arguments to `list_auth_tokens` via keyword arguments. Note that at
|
|
1183
2675
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1184
2676
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1185
2677
|
#
|
|
1186
|
-
# @param
|
|
1187
|
-
# Required.
|
|
1188
|
-
#
|
|
1189
|
-
#
|
|
2678
|
+
# @param parent [::String]
|
|
2679
|
+
# Required. The parent resource that this auth token will be listed for.
|
|
2680
|
+
# Format:
|
|
2681
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/tokenAuthUsers/\\{token_auth_user}
|
|
2682
|
+
# @param page_size [::Integer]
|
|
2683
|
+
# Optional. The maximum number of items to return. The maximum value is 1000;
|
|
2684
|
+
# values above 1000 will be coerced to 1000. If not specified, a default
|
|
2685
|
+
# value of 1000 will be used by the service. Regardless of the page_size
|
|
2686
|
+
# value, the response may include a partial list and a caller should only
|
|
2687
|
+
# rely on response's
|
|
2688
|
+
# {::Google::Cloud::Redis::Cluster::V1::ListTokenAuthUsersResponse#next_page_token `next_page_token`}
|
|
2689
|
+
# to determine if there are more clusters left to be queried.
|
|
2690
|
+
# @param page_token [::String]
|
|
2691
|
+
# Optional. The `next_page_token` value returned from a previous
|
|
2692
|
+
# [ListTokenAuthUsers] request, if any.
|
|
2693
|
+
# @param filter [::String]
|
|
2694
|
+
# Optional. Expression for filtering results.
|
|
2695
|
+
# @param order_by [::String]
|
|
2696
|
+
# Optional. Sort results by a defined order.
|
|
1190
2697
|
#
|
|
1191
2698
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1192
|
-
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::
|
|
2699
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>]
|
|
1193
2700
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1194
2701
|
#
|
|
1195
|
-
# @return [::Google::Cloud::Redis::Cluster::V1::
|
|
2702
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::Redis::Cluster::V1::AuthToken>]
|
|
1196
2703
|
#
|
|
1197
2704
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1198
2705
|
#
|
|
@@ -1203,24 +2710,28 @@ module Google
|
|
|
1203
2710
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1204
2711
|
#
|
|
1205
2712
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1206
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2713
|
+
# request = Google::Cloud::Redis::Cluster::V1::ListAuthTokensRequest.new
|
|
1207
2714
|
#
|
|
1208
|
-
# # Call the
|
|
1209
|
-
# result = client.
|
|
2715
|
+
# # Call the list_auth_tokens method.
|
|
2716
|
+
# result = client.list_auth_tokens request
|
|
1210
2717
|
#
|
|
1211
|
-
# # The returned object is of type
|
|
1212
|
-
#
|
|
2718
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can iterate
|
|
2719
|
+
# # over elements, and API calls will be issued to fetch pages as needed.
|
|
2720
|
+
# result.each do |item|
|
|
2721
|
+
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::AuthToken.
|
|
2722
|
+
# p item
|
|
2723
|
+
# end
|
|
1213
2724
|
#
|
|
1214
|
-
def
|
|
2725
|
+
def list_auth_tokens request, options = nil
|
|
1215
2726
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1216
2727
|
|
|
1217
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2728
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::ListAuthTokensRequest
|
|
1218
2729
|
|
|
1219
2730
|
# Converts hash and nil to an options object
|
|
1220
2731
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1221
2732
|
|
|
1222
2733
|
# Customize the options with defaults
|
|
1223
|
-
metadata = @config.rpcs.
|
|
2734
|
+
metadata = @config.rpcs.list_auth_tokens.metadata.to_h
|
|
1224
2735
|
|
|
1225
2736
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1226
2737
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1230,66 +2741,58 @@ module Google
|
|
|
1230
2741
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1231
2742
|
|
|
1232
2743
|
header_params = {}
|
|
1233
|
-
if request.
|
|
1234
|
-
header_params["
|
|
2744
|
+
if request.parent
|
|
2745
|
+
header_params["parent"] = request.parent
|
|
1235
2746
|
end
|
|
1236
2747
|
|
|
1237
2748
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1238
2749
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1239
2750
|
|
|
1240
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2751
|
+
options.apply_defaults timeout: @config.rpcs.list_auth_tokens.timeout,
|
|
1241
2752
|
metadata: metadata,
|
|
1242
|
-
retry_policy: @config.rpcs.
|
|
2753
|
+
retry_policy: @config.rpcs.list_auth_tokens.retry_policy
|
|
1243
2754
|
|
|
1244
2755
|
options.apply_defaults timeout: @config.timeout,
|
|
1245
2756
|
metadata: @config.metadata,
|
|
1246
2757
|
retry_policy: @config.retry_policy
|
|
1247
2758
|
|
|
1248
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
2759
|
+
@cloud_redis_cluster_stub.call_rpc :list_auth_tokens, request, options: options do |response, operation|
|
|
2760
|
+
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_auth_tokens, request, response, operation, options
|
|
1249
2761
|
yield response, operation if block_given?
|
|
2762
|
+
throw :response, response
|
|
1250
2763
|
end
|
|
1251
2764
|
rescue ::GRPC::BadStatus => e
|
|
1252
2765
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1253
2766
|
end
|
|
1254
2767
|
|
|
1255
2768
|
##
|
|
1256
|
-
#
|
|
2769
|
+
# Gets a specific auth token for a specific token auth user.
|
|
1257
2770
|
#
|
|
1258
|
-
# @overload
|
|
1259
|
-
# Pass arguments to `
|
|
1260
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2771
|
+
# @overload get_auth_token(request, options = nil)
|
|
2772
|
+
# Pass arguments to `get_auth_token` via a request object, either of type
|
|
2773
|
+
# {::Google::Cloud::Redis::Cluster::V1::GetAuthTokenRequest} or an equivalent Hash.
|
|
1261
2774
|
#
|
|
1262
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2775
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::GetAuthTokenRequest, ::Hash]
|
|
1263
2776
|
# A request object representing the call parameters. Required. To specify no
|
|
1264
2777
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1265
2778
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1266
2779
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1267
2780
|
#
|
|
1268
|
-
# @overload
|
|
1269
|
-
# Pass arguments to `
|
|
2781
|
+
# @overload get_auth_token(name: nil)
|
|
2782
|
+
# Pass arguments to `get_auth_token` via keyword arguments. Note that at
|
|
1270
2783
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1271
2784
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1272
2785
|
#
|
|
1273
|
-
# @param
|
|
1274
|
-
# Required. The
|
|
1275
|
-
#
|
|
1276
|
-
#
|
|
1277
|
-
# Optional. The maximum number of items to return.
|
|
1278
|
-
#
|
|
1279
|
-
# If not specified, a default value of 1000 will be used by the service.
|
|
1280
|
-
# Regardless of the page_size value, the response may include a partial list
|
|
1281
|
-
# and a caller should only rely on response's
|
|
1282
|
-
# {::Google::Cloud::Redis::Cluster::V1::ListBackupsResponse#next_page_token `next_page_token`}
|
|
1283
|
-
# to determine if there are more clusters left to be queried.
|
|
1284
|
-
# @param page_token [::String]
|
|
1285
|
-
# Optional. The `next_page_token` value returned from a previous
|
|
1286
|
-
# [ListBackupCollections] request, if any.
|
|
2786
|
+
# @param name [::String]
|
|
2787
|
+
# Required. The name of auth token for a token based auth enabled cluster.
|
|
2788
|
+
# Format:
|
|
2789
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/tokenAuthUsers/\\{token_auth_user}/authTokens/\\{auth_token}
|
|
1287
2790
|
#
|
|
1288
2791
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1289
|
-
# @yieldparam response [::
|
|
2792
|
+
# @yieldparam response [::Google::Cloud::Redis::Cluster::V1::AuthToken]
|
|
1290
2793
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1291
2794
|
#
|
|
1292
|
-
# @return [::
|
|
2795
|
+
# @return [::Google::Cloud::Redis::Cluster::V1::AuthToken]
|
|
1293
2796
|
#
|
|
1294
2797
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1295
2798
|
#
|
|
@@ -1300,28 +2803,24 @@ module Google
|
|
|
1300
2803
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1301
2804
|
#
|
|
1302
2805
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1303
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2806
|
+
# request = Google::Cloud::Redis::Cluster::V1::GetAuthTokenRequest.new
|
|
1304
2807
|
#
|
|
1305
|
-
# # Call the
|
|
1306
|
-
# result = client.
|
|
2808
|
+
# # Call the get_auth_token method.
|
|
2809
|
+
# result = client.get_auth_token request
|
|
1307
2810
|
#
|
|
1308
|
-
# # The returned object is of type
|
|
1309
|
-
#
|
|
1310
|
-
# result.each do |item|
|
|
1311
|
-
# # Each element is of type ::Google::Cloud::Redis::Cluster::V1::Backup.
|
|
1312
|
-
# p item
|
|
1313
|
-
# end
|
|
2811
|
+
# # The returned object is of type Google::Cloud::Redis::Cluster::V1::AuthToken.
|
|
2812
|
+
# p result
|
|
1314
2813
|
#
|
|
1315
|
-
def
|
|
2814
|
+
def get_auth_token request, options = nil
|
|
1316
2815
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1317
2816
|
|
|
1318
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2817
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::GetAuthTokenRequest
|
|
1319
2818
|
|
|
1320
2819
|
# Converts hash and nil to an options object
|
|
1321
2820
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1322
2821
|
|
|
1323
2822
|
# Customize the options with defaults
|
|
1324
|
-
metadata = @config.rpcs.
|
|
2823
|
+
metadata = @config.rpcs.get_auth_token.metadata.to_h
|
|
1325
2824
|
|
|
1326
2825
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1327
2826
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1331,57 +2830,57 @@ module Google
|
|
|
1331
2830
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1332
2831
|
|
|
1333
2832
|
header_params = {}
|
|
1334
|
-
if request.
|
|
1335
|
-
header_params["
|
|
2833
|
+
if request.name
|
|
2834
|
+
header_params["name"] = request.name
|
|
1336
2835
|
end
|
|
1337
2836
|
|
|
1338
2837
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1339
2838
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1340
2839
|
|
|
1341
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2840
|
+
options.apply_defaults timeout: @config.rpcs.get_auth_token.timeout,
|
|
1342
2841
|
metadata: metadata,
|
|
1343
|
-
retry_policy: @config.rpcs.
|
|
2842
|
+
retry_policy: @config.rpcs.get_auth_token.retry_policy
|
|
1344
2843
|
|
|
1345
2844
|
options.apply_defaults timeout: @config.timeout,
|
|
1346
2845
|
metadata: @config.metadata,
|
|
1347
2846
|
retry_policy: @config.retry_policy
|
|
1348
2847
|
|
|
1349
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
1350
|
-
response = ::Gapic::PagedEnumerable.new @cloud_redis_cluster_stub, :list_backups, request, response, operation, options
|
|
2848
|
+
@cloud_redis_cluster_stub.call_rpc :get_auth_token, request, options: options do |response, operation|
|
|
1351
2849
|
yield response, operation if block_given?
|
|
1352
|
-
throw :response, response
|
|
1353
2850
|
end
|
|
1354
2851
|
rescue ::GRPC::BadStatus => e
|
|
1355
2852
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1356
2853
|
end
|
|
1357
2854
|
|
|
1358
2855
|
##
|
|
1359
|
-
#
|
|
2856
|
+
# Adds a token auth user for a token based auth enabled cluster.
|
|
1360
2857
|
#
|
|
1361
|
-
# @overload
|
|
1362
|
-
# Pass arguments to `
|
|
1363
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2858
|
+
# @overload add_token_auth_user(request, options = nil)
|
|
2859
|
+
# Pass arguments to `add_token_auth_user` via a request object, either of type
|
|
2860
|
+
# {::Google::Cloud::Redis::Cluster::V1::AddTokenAuthUserRequest} or an equivalent Hash.
|
|
1364
2861
|
#
|
|
1365
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2862
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::AddTokenAuthUserRequest, ::Hash]
|
|
1366
2863
|
# A request object representing the call parameters. Required. To specify no
|
|
1367
2864
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1368
2865
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1369
2866
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1370
2867
|
#
|
|
1371
|
-
# @overload
|
|
1372
|
-
# Pass arguments to `
|
|
2868
|
+
# @overload add_token_auth_user(cluster: nil, token_auth_user: nil)
|
|
2869
|
+
# Pass arguments to `add_token_auth_user` via keyword arguments. Note that at
|
|
1373
2870
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1374
2871
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1375
2872
|
#
|
|
1376
|
-
# @param
|
|
1377
|
-
# Required.
|
|
1378
|
-
#
|
|
2873
|
+
# @param cluster [::String]
|
|
2874
|
+
# Required. The cluster resource that this token auth user will be added for.
|
|
2875
|
+
# Format: projects/\\{project}/locations/\\{location}/clusters/\\{cluster}
|
|
2876
|
+
# @param token_auth_user [::String]
|
|
2877
|
+
# Required. The id of the token auth user to add.
|
|
1379
2878
|
#
|
|
1380
2879
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1381
|
-
# @yieldparam response [::
|
|
2880
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1382
2881
|
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1383
2882
|
#
|
|
1384
|
-
# @return [::
|
|
2883
|
+
# @return [::Gapic::Operation]
|
|
1385
2884
|
#
|
|
1386
2885
|
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1387
2886
|
#
|
|
@@ -1392,24 +2891,31 @@ module Google
|
|
|
1392
2891
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1393
2892
|
#
|
|
1394
2893
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1395
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
2894
|
+
# request = Google::Cloud::Redis::Cluster::V1::AddTokenAuthUserRequest.new
|
|
1396
2895
|
#
|
|
1397
|
-
# # Call the
|
|
1398
|
-
# result = client.
|
|
2896
|
+
# # Call the add_token_auth_user method.
|
|
2897
|
+
# result = client.add_token_auth_user request
|
|
1399
2898
|
#
|
|
1400
|
-
# # The returned object is of type
|
|
1401
|
-
#
|
|
2899
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
|
2900
|
+
# # check the status of an operation, cancel it, or wait for results.
|
|
2901
|
+
# # Here is how to wait for a response.
|
|
2902
|
+
# result.wait_until_done! timeout: 60
|
|
2903
|
+
# if result.response?
|
|
2904
|
+
# p result.response
|
|
2905
|
+
# else
|
|
2906
|
+
# puts "No response received."
|
|
2907
|
+
# end
|
|
1402
2908
|
#
|
|
1403
|
-
def
|
|
2909
|
+
def add_token_auth_user request, options = nil
|
|
1404
2910
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1405
2911
|
|
|
1406
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
2912
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::AddTokenAuthUserRequest
|
|
1407
2913
|
|
|
1408
2914
|
# Converts hash and nil to an options object
|
|
1409
2915
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1410
2916
|
|
|
1411
2917
|
# Customize the options with defaults
|
|
1412
|
-
metadata = @config.rpcs.
|
|
2918
|
+
metadata = @config.rpcs.add_token_auth_user.metadata.to_h
|
|
1413
2919
|
|
|
1414
2920
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1415
2921
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1419,51 +2925,70 @@ module Google
|
|
|
1419
2925
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1420
2926
|
|
|
1421
2927
|
header_params = {}
|
|
1422
|
-
if request.
|
|
1423
|
-
header_params["
|
|
2928
|
+
if request.cluster
|
|
2929
|
+
header_params["cluster"] = request.cluster
|
|
1424
2930
|
end
|
|
1425
2931
|
|
|
1426
2932
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1427
2933
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1428
2934
|
|
|
1429
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
2935
|
+
options.apply_defaults timeout: @config.rpcs.add_token_auth_user.timeout,
|
|
1430
2936
|
metadata: metadata,
|
|
1431
|
-
retry_policy: @config.rpcs.
|
|
2937
|
+
retry_policy: @config.rpcs.add_token_auth_user.retry_policy
|
|
1432
2938
|
|
|
1433
2939
|
options.apply_defaults timeout: @config.timeout,
|
|
1434
2940
|
metadata: @config.metadata,
|
|
1435
2941
|
retry_policy: @config.retry_policy
|
|
1436
2942
|
|
|
1437
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
2943
|
+
@cloud_redis_cluster_stub.call_rpc :add_token_auth_user, request, options: options do |response, operation|
|
|
2944
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1438
2945
|
yield response, operation if block_given?
|
|
2946
|
+
throw :response, response
|
|
1439
2947
|
end
|
|
1440
2948
|
rescue ::GRPC::BadStatus => e
|
|
1441
2949
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1442
2950
|
end
|
|
1443
2951
|
|
|
1444
2952
|
##
|
|
1445
|
-
# Deletes a
|
|
2953
|
+
# Deletes a token auth user for a token based auth enabled cluster.
|
|
1446
2954
|
#
|
|
1447
|
-
# @overload
|
|
1448
|
-
# Pass arguments to `
|
|
1449
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
2955
|
+
# @overload delete_token_auth_user(request, options = nil)
|
|
2956
|
+
# Pass arguments to `delete_token_auth_user` via a request object, either of type
|
|
2957
|
+
# {::Google::Cloud::Redis::Cluster::V1::DeleteTokenAuthUserRequest} or an equivalent Hash.
|
|
1450
2958
|
#
|
|
1451
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
2959
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::DeleteTokenAuthUserRequest, ::Hash]
|
|
1452
2960
|
# A request object representing the call parameters. Required. To specify no
|
|
1453
2961
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1454
2962
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1455
2963
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1456
2964
|
#
|
|
1457
|
-
# @overload
|
|
1458
|
-
# Pass arguments to `
|
|
2965
|
+
# @overload delete_token_auth_user(name: nil, request_id: nil, force: nil)
|
|
2966
|
+
# Pass arguments to `delete_token_auth_user` via keyword arguments. Note that at
|
|
1459
2967
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1460
2968
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1461
2969
|
#
|
|
1462
2970
|
# @param name [::String]
|
|
1463
|
-
# Required.
|
|
1464
|
-
#
|
|
2971
|
+
# Required. The name of the token auth user to delete.
|
|
2972
|
+
# Format:
|
|
2973
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/tokenAuthUsers/\\{token_auth_user}
|
|
1465
2974
|
# @param request_id [::String]
|
|
1466
|
-
# Optional.
|
|
2975
|
+
# Optional. An optional request ID to identify requests. Specify a unique
|
|
2976
|
+
# request ID so that if you must retry your request, the server will know to
|
|
2977
|
+
# ignore the request if it has already been completed. The server will
|
|
2978
|
+
# guarantee that for at least 60 minutes after the first request.
|
|
2979
|
+
#
|
|
2980
|
+
# For example, consider a situation where you make an initial request and the
|
|
2981
|
+
# request times out. If you make the request again with the same request
|
|
2982
|
+
# ID, the server can check if original operation with the same request ID
|
|
2983
|
+
# was received, and if so, will ignore the second request. This prevents
|
|
2984
|
+
# clients from accidentally creating duplicate commitments.
|
|
2985
|
+
#
|
|
2986
|
+
# The request ID must be a valid UUID with the exception that zero UUID is
|
|
2987
|
+
# not supported (00000000-0000-0000-0000-000000000000).
|
|
2988
|
+
# @param force [::Boolean]
|
|
2989
|
+
# Optional. If set to true, any child auth tokens of this user will also be
|
|
2990
|
+
# deleted. Otherwise, the request will only work if the user has no auth
|
|
2991
|
+
# tokens.
|
|
1467
2992
|
#
|
|
1468
2993
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1469
2994
|
# @yieldparam response [::Gapic::Operation]
|
|
@@ -1480,10 +3005,10 @@ module Google
|
|
|
1480
3005
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1481
3006
|
#
|
|
1482
3007
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1483
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
3008
|
+
# request = Google::Cloud::Redis::Cluster::V1::DeleteTokenAuthUserRequest.new
|
|
1484
3009
|
#
|
|
1485
|
-
# # Call the
|
|
1486
|
-
# result = client.
|
|
3010
|
+
# # Call the delete_token_auth_user method.
|
|
3011
|
+
# result = client.delete_token_auth_user request
|
|
1487
3012
|
#
|
|
1488
3013
|
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1489
3014
|
# # check the status of an operation, cancel it, or wait for results.
|
|
@@ -1495,16 +3020,16 @@ module Google
|
|
|
1495
3020
|
# puts "No response received."
|
|
1496
3021
|
# end
|
|
1497
3022
|
#
|
|
1498
|
-
def
|
|
3023
|
+
def delete_token_auth_user request, options = nil
|
|
1499
3024
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1500
3025
|
|
|
1501
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
3026
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::DeleteTokenAuthUserRequest
|
|
1502
3027
|
|
|
1503
3028
|
# Converts hash and nil to an options object
|
|
1504
3029
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1505
3030
|
|
|
1506
3031
|
# Customize the options with defaults
|
|
1507
|
-
metadata = @config.rpcs.
|
|
3032
|
+
metadata = @config.rpcs.delete_token_auth_user.metadata.to_h
|
|
1508
3033
|
|
|
1509
3034
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1510
3035
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1521,15 +3046,15 @@ module Google
|
|
|
1521
3046
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1522
3047
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1523
3048
|
|
|
1524
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
3049
|
+
options.apply_defaults timeout: @config.rpcs.delete_token_auth_user.timeout,
|
|
1525
3050
|
metadata: metadata,
|
|
1526
|
-
retry_policy: @config.rpcs.
|
|
3051
|
+
retry_policy: @config.rpcs.delete_token_auth_user.retry_policy
|
|
1527
3052
|
|
|
1528
3053
|
options.apply_defaults timeout: @config.timeout,
|
|
1529
3054
|
metadata: @config.metadata,
|
|
1530
3055
|
retry_policy: @config.retry_policy
|
|
1531
3056
|
|
|
1532
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
3057
|
+
@cloud_redis_cluster_stub.call_rpc :delete_token_auth_user, request, options: options do |response, operation|
|
|
1533
3058
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1534
3059
|
yield response, operation if block_given?
|
|
1535
3060
|
throw :response, response
|
|
@@ -1539,28 +3064,29 @@ module Google
|
|
|
1539
3064
|
end
|
|
1540
3065
|
|
|
1541
3066
|
##
|
|
1542
|
-
#
|
|
3067
|
+
# Adds a auth token for a user of a token based auth enabled cluster.
|
|
1543
3068
|
#
|
|
1544
|
-
# @overload
|
|
1545
|
-
# Pass arguments to `
|
|
1546
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
3069
|
+
# @overload add_auth_token(request, options = nil)
|
|
3070
|
+
# Pass arguments to `add_auth_token` via a request object, either of type
|
|
3071
|
+
# {::Google::Cloud::Redis::Cluster::V1::AddAuthTokenRequest} or an equivalent Hash.
|
|
1547
3072
|
#
|
|
1548
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
3073
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::AddAuthTokenRequest, ::Hash]
|
|
1549
3074
|
# A request object representing the call parameters. Required. To specify no
|
|
1550
3075
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1551
3076
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1552
3077
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1553
3078
|
#
|
|
1554
|
-
# @overload
|
|
1555
|
-
# Pass arguments to `
|
|
3079
|
+
# @overload add_auth_token(token_auth_user: nil, auth_token: nil)
|
|
3080
|
+
# Pass arguments to `add_auth_token` via keyword arguments. Note that at
|
|
1556
3081
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1557
3082
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1558
3083
|
#
|
|
1559
|
-
# @param
|
|
1560
|
-
#
|
|
1561
|
-
#
|
|
1562
|
-
#
|
|
1563
|
-
#
|
|
3084
|
+
# @param token_auth_user [::String]
|
|
3085
|
+
# Required. The name of the token auth user resource that this auth token
|
|
3086
|
+
# will be added for. Format:
|
|
3087
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/tokenAuthUsers/\\{token_auth_user}
|
|
3088
|
+
# @param auth_token [::Google::Cloud::Redis::Cluster::V1::AuthToken, ::Hash]
|
|
3089
|
+
# Required. The auth token to add.
|
|
1564
3090
|
#
|
|
1565
3091
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1566
3092
|
# @yieldparam response [::Gapic::Operation]
|
|
@@ -1577,10 +3103,10 @@ module Google
|
|
|
1577
3103
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1578
3104
|
#
|
|
1579
3105
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1580
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
3106
|
+
# request = Google::Cloud::Redis::Cluster::V1::AddAuthTokenRequest.new
|
|
1581
3107
|
#
|
|
1582
|
-
# # Call the
|
|
1583
|
-
# result = client.
|
|
3108
|
+
# # Call the add_auth_token method.
|
|
3109
|
+
# result = client.add_auth_token request
|
|
1584
3110
|
#
|
|
1585
3111
|
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1586
3112
|
# # check the status of an operation, cancel it, or wait for results.
|
|
@@ -1592,16 +3118,16 @@ module Google
|
|
|
1592
3118
|
# puts "No response received."
|
|
1593
3119
|
# end
|
|
1594
3120
|
#
|
|
1595
|
-
def
|
|
3121
|
+
def add_auth_token request, options = nil
|
|
1596
3122
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1597
3123
|
|
|
1598
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
3124
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::AddAuthTokenRequest
|
|
1599
3125
|
|
|
1600
3126
|
# Converts hash and nil to an options object
|
|
1601
3127
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1602
3128
|
|
|
1603
3129
|
# Customize the options with defaults
|
|
1604
|
-
metadata = @config.rpcs.
|
|
3130
|
+
metadata = @config.rpcs.add_auth_token.metadata.to_h
|
|
1605
3131
|
|
|
1606
3132
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1607
3133
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1611,22 +3137,22 @@ module Google
|
|
|
1611
3137
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1612
3138
|
|
|
1613
3139
|
header_params = {}
|
|
1614
|
-
if request.
|
|
1615
|
-
header_params["
|
|
3140
|
+
if request.token_auth_user
|
|
3141
|
+
header_params["token_auth_user"] = request.token_auth_user
|
|
1616
3142
|
end
|
|
1617
3143
|
|
|
1618
3144
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1619
3145
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1620
3146
|
|
|
1621
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
3147
|
+
options.apply_defaults timeout: @config.rpcs.add_auth_token.timeout,
|
|
1622
3148
|
metadata: metadata,
|
|
1623
|
-
retry_policy: @config.rpcs.
|
|
3149
|
+
retry_policy: @config.rpcs.add_auth_token.retry_policy
|
|
1624
3150
|
|
|
1625
3151
|
options.apply_defaults timeout: @config.timeout,
|
|
1626
3152
|
metadata: @config.metadata,
|
|
1627
3153
|
retry_policy: @config.retry_policy
|
|
1628
3154
|
|
|
1629
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
3155
|
+
@cloud_redis_cluster_stub.call_rpc :add_auth_token, request, options: options do |response, operation|
|
|
1630
3156
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1631
3157
|
yield response, operation if block_given?
|
|
1632
3158
|
throw :response, response
|
|
@@ -1636,44 +3162,27 @@ module Google
|
|
|
1636
3162
|
end
|
|
1637
3163
|
|
|
1638
3164
|
##
|
|
1639
|
-
#
|
|
1640
|
-
# If this is the first time a backup is being created, a backup collection
|
|
1641
|
-
# will be created at the backend, and this backup belongs to this collection.
|
|
1642
|
-
# Both collection and backup will have a resource name. Backup will be
|
|
1643
|
-
# executed for each shard. A replica (primary if nonHA) will be selected to
|
|
1644
|
-
# perform the execution. Backup call will be rejected if there is an ongoing
|
|
1645
|
-
# backup or update operation. Be aware that during preview, if the cluster's
|
|
1646
|
-
# internal software version is too old, critical update will be performed
|
|
1647
|
-
# before actual backup. Once the internal software version is updated to the
|
|
1648
|
-
# minimum version required by the backup feature, subsequent backups will not
|
|
1649
|
-
# require critical update. After preview, there will be no critical update
|
|
1650
|
-
# needed for backup.
|
|
3165
|
+
# Removes a auth token for a user of a token based auth enabled instance.
|
|
1651
3166
|
#
|
|
1652
|
-
# @overload
|
|
1653
|
-
# Pass arguments to `
|
|
1654
|
-
# {::Google::Cloud::Redis::Cluster::V1::
|
|
3167
|
+
# @overload delete_auth_token(request, options = nil)
|
|
3168
|
+
# Pass arguments to `delete_auth_token` via a request object, either of type
|
|
3169
|
+
# {::Google::Cloud::Redis::Cluster::V1::DeleteAuthTokenRequest} or an equivalent Hash.
|
|
1655
3170
|
#
|
|
1656
|
-
# @param request [::Google::Cloud::Redis::Cluster::V1::
|
|
3171
|
+
# @param request [::Google::Cloud::Redis::Cluster::V1::DeleteAuthTokenRequest, ::Hash]
|
|
1657
3172
|
# A request object representing the call parameters. Required. To specify no
|
|
1658
3173
|
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1659
3174
|
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1660
3175
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1661
3176
|
#
|
|
1662
|
-
# @overload
|
|
1663
|
-
# Pass arguments to `
|
|
3177
|
+
# @overload delete_auth_token(name: nil)
|
|
3178
|
+
# Pass arguments to `delete_auth_token` via keyword arguments. Note that at
|
|
1664
3179
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1665
3180
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1666
3181
|
#
|
|
1667
3182
|
# @param name [::String]
|
|
1668
|
-
# Required.
|
|
1669
|
-
#
|
|
1670
|
-
#
|
|
1671
|
-
# @param ttl [::Google::Protobuf::Duration, ::Hash]
|
|
1672
|
-
# Optional. TTL for the backup to expire. Value range is 1 day to 100 years.
|
|
1673
|
-
# If not specified, the default value is 100 years.
|
|
1674
|
-
# @param backup_id [::String]
|
|
1675
|
-
# Optional. The id of the backup to be created. If not specified, the
|
|
1676
|
-
# default value ([YYYYMMDDHHMMSS]_[Shortened Cluster UID] is used.
|
|
3183
|
+
# Required. The name of the token auth user resource that this auth token
|
|
3184
|
+
# will be deleted from. Format:
|
|
3185
|
+
# projects/\\{project}/locations/\\{location}/clusters/\\{cluster}/tokenAuthUsers/\\{token_auth_user}/authTokens/\\{auth_token}
|
|
1677
3186
|
#
|
|
1678
3187
|
# @yield [response, operation] Access the result along with the RPC operation
|
|
1679
3188
|
# @yieldparam response [::Gapic::Operation]
|
|
@@ -1690,10 +3199,10 @@ module Google
|
|
|
1690
3199
|
# client = Google::Cloud::Redis::Cluster::V1::CloudRedisCluster::Client.new
|
|
1691
3200
|
#
|
|
1692
3201
|
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1693
|
-
# request = Google::Cloud::Redis::Cluster::V1::
|
|
3202
|
+
# request = Google::Cloud::Redis::Cluster::V1::DeleteAuthTokenRequest.new
|
|
1694
3203
|
#
|
|
1695
|
-
# # Call the
|
|
1696
|
-
# result = client.
|
|
3204
|
+
# # Call the delete_auth_token method.
|
|
3205
|
+
# result = client.delete_auth_token request
|
|
1697
3206
|
#
|
|
1698
3207
|
# # The returned object is of type Gapic::Operation. You can use it to
|
|
1699
3208
|
# # check the status of an operation, cancel it, or wait for results.
|
|
@@ -1705,16 +3214,16 @@ module Google
|
|
|
1705
3214
|
# puts "No response received."
|
|
1706
3215
|
# end
|
|
1707
3216
|
#
|
|
1708
|
-
def
|
|
3217
|
+
def delete_auth_token request, options = nil
|
|
1709
3218
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1710
3219
|
|
|
1711
|
-
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::
|
|
3220
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::Cluster::V1::DeleteAuthTokenRequest
|
|
1712
3221
|
|
|
1713
3222
|
# Converts hash and nil to an options object
|
|
1714
3223
|
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1715
3224
|
|
|
1716
3225
|
# Customize the options with defaults
|
|
1717
|
-
metadata = @config.rpcs.
|
|
3226
|
+
metadata = @config.rpcs.delete_auth_token.metadata.to_h
|
|
1718
3227
|
|
|
1719
3228
|
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1720
3229
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
@@ -1731,15 +3240,15 @@ module Google
|
|
|
1731
3240
|
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1732
3241
|
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1733
3242
|
|
|
1734
|
-
options.apply_defaults timeout: @config.rpcs.
|
|
3243
|
+
options.apply_defaults timeout: @config.rpcs.delete_auth_token.timeout,
|
|
1735
3244
|
metadata: metadata,
|
|
1736
|
-
retry_policy: @config.rpcs.
|
|
3245
|
+
retry_policy: @config.rpcs.delete_auth_token.retry_policy
|
|
1737
3246
|
|
|
1738
3247
|
options.apply_defaults timeout: @config.timeout,
|
|
1739
3248
|
metadata: @config.metadata,
|
|
1740
3249
|
retry_policy: @config.retry_policy
|
|
1741
3250
|
|
|
1742
|
-
@cloud_redis_cluster_stub.call_rpc :
|
|
3251
|
+
@cloud_redis_cluster_stub.call_rpc :delete_auth_token, request, options: options do |response, operation|
|
|
1743
3252
|
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1744
3253
|
yield response, operation if block_given?
|
|
1745
3254
|
throw :response, response
|
|
@@ -1939,26 +3448,61 @@ module Google
|
|
|
1939
3448
|
#
|
|
1940
3449
|
attr_reader :list_clusters
|
|
1941
3450
|
##
|
|
3451
|
+
# RPC-specific configuration for `list_acl_policies`
|
|
3452
|
+
# @return [::Gapic::Config::Method]
|
|
3453
|
+
#
|
|
3454
|
+
attr_reader :list_acl_policies
|
|
3455
|
+
##
|
|
1942
3456
|
# RPC-specific configuration for `get_cluster`
|
|
1943
3457
|
# @return [::Gapic::Config::Method]
|
|
1944
3458
|
#
|
|
1945
3459
|
attr_reader :get_cluster
|
|
1946
3460
|
##
|
|
3461
|
+
# RPC-specific configuration for `get_acl_policy`
|
|
3462
|
+
# @return [::Gapic::Config::Method]
|
|
3463
|
+
#
|
|
3464
|
+
attr_reader :get_acl_policy
|
|
3465
|
+
##
|
|
1947
3466
|
# RPC-specific configuration for `update_cluster`
|
|
1948
3467
|
# @return [::Gapic::Config::Method]
|
|
1949
3468
|
#
|
|
1950
3469
|
attr_reader :update_cluster
|
|
1951
3470
|
##
|
|
3471
|
+
# RPC-specific configuration for `update_acl_policy`
|
|
3472
|
+
# @return [::Gapic::Config::Method]
|
|
3473
|
+
#
|
|
3474
|
+
attr_reader :update_acl_policy
|
|
3475
|
+
##
|
|
1952
3476
|
# RPC-specific configuration for `delete_cluster`
|
|
1953
3477
|
# @return [::Gapic::Config::Method]
|
|
1954
3478
|
#
|
|
1955
3479
|
attr_reader :delete_cluster
|
|
1956
3480
|
##
|
|
3481
|
+
# RPC-specific configuration for `delete_acl_policy`
|
|
3482
|
+
# @return [::Gapic::Config::Method]
|
|
3483
|
+
#
|
|
3484
|
+
attr_reader :delete_acl_policy
|
|
3485
|
+
##
|
|
3486
|
+
# RPC-specific configuration for `get_acl_policy_revision`
|
|
3487
|
+
# @return [::Gapic::Config::Method]
|
|
3488
|
+
#
|
|
3489
|
+
attr_reader :get_acl_policy_revision
|
|
3490
|
+
##
|
|
3491
|
+
# RPC-specific configuration for `list_acl_policy_revisions`
|
|
3492
|
+
# @return [::Gapic::Config::Method]
|
|
3493
|
+
#
|
|
3494
|
+
attr_reader :list_acl_policy_revisions
|
|
3495
|
+
##
|
|
1957
3496
|
# RPC-specific configuration for `create_cluster`
|
|
1958
3497
|
# @return [::Gapic::Config::Method]
|
|
1959
3498
|
#
|
|
1960
3499
|
attr_reader :create_cluster
|
|
1961
3500
|
##
|
|
3501
|
+
# RPC-specific configuration for `create_acl_policy`
|
|
3502
|
+
# @return [::Gapic::Config::Method]
|
|
3503
|
+
#
|
|
3504
|
+
attr_reader :create_acl_policy
|
|
3505
|
+
##
|
|
1962
3506
|
# RPC-specific configuration for `get_cluster_certificate_authority`
|
|
1963
3507
|
# @return [::Gapic::Config::Method]
|
|
1964
3508
|
#
|
|
@@ -2008,19 +3552,73 @@ module Google
|
|
|
2008
3552
|
# @return [::Gapic::Config::Method]
|
|
2009
3553
|
#
|
|
2010
3554
|
attr_reader :backup_cluster
|
|
3555
|
+
##
|
|
3556
|
+
# RPC-specific configuration for `list_token_auth_users`
|
|
3557
|
+
# @return [::Gapic::Config::Method]
|
|
3558
|
+
#
|
|
3559
|
+
attr_reader :list_token_auth_users
|
|
3560
|
+
##
|
|
3561
|
+
# RPC-specific configuration for `get_token_auth_user`
|
|
3562
|
+
# @return [::Gapic::Config::Method]
|
|
3563
|
+
#
|
|
3564
|
+
attr_reader :get_token_auth_user
|
|
3565
|
+
##
|
|
3566
|
+
# RPC-specific configuration for `list_auth_tokens`
|
|
3567
|
+
# @return [::Gapic::Config::Method]
|
|
3568
|
+
#
|
|
3569
|
+
attr_reader :list_auth_tokens
|
|
3570
|
+
##
|
|
3571
|
+
# RPC-specific configuration for `get_auth_token`
|
|
3572
|
+
# @return [::Gapic::Config::Method]
|
|
3573
|
+
#
|
|
3574
|
+
attr_reader :get_auth_token
|
|
3575
|
+
##
|
|
3576
|
+
# RPC-specific configuration for `add_token_auth_user`
|
|
3577
|
+
# @return [::Gapic::Config::Method]
|
|
3578
|
+
#
|
|
3579
|
+
attr_reader :add_token_auth_user
|
|
3580
|
+
##
|
|
3581
|
+
# RPC-specific configuration for `delete_token_auth_user`
|
|
3582
|
+
# @return [::Gapic::Config::Method]
|
|
3583
|
+
#
|
|
3584
|
+
attr_reader :delete_token_auth_user
|
|
3585
|
+
##
|
|
3586
|
+
# RPC-specific configuration for `add_auth_token`
|
|
3587
|
+
# @return [::Gapic::Config::Method]
|
|
3588
|
+
#
|
|
3589
|
+
attr_reader :add_auth_token
|
|
3590
|
+
##
|
|
3591
|
+
# RPC-specific configuration for `delete_auth_token`
|
|
3592
|
+
# @return [::Gapic::Config::Method]
|
|
3593
|
+
#
|
|
3594
|
+
attr_reader :delete_auth_token
|
|
2011
3595
|
|
|
2012
3596
|
# @private
|
|
2013
3597
|
def initialize parent_rpcs = nil
|
|
2014
3598
|
list_clusters_config = parent_rpcs.list_clusters if parent_rpcs.respond_to? :list_clusters
|
|
2015
3599
|
@list_clusters = ::Gapic::Config::Method.new list_clusters_config
|
|
3600
|
+
list_acl_policies_config = parent_rpcs.list_acl_policies if parent_rpcs.respond_to? :list_acl_policies
|
|
3601
|
+
@list_acl_policies = ::Gapic::Config::Method.new list_acl_policies_config
|
|
2016
3602
|
get_cluster_config = parent_rpcs.get_cluster if parent_rpcs.respond_to? :get_cluster
|
|
2017
3603
|
@get_cluster = ::Gapic::Config::Method.new get_cluster_config
|
|
3604
|
+
get_acl_policy_config = parent_rpcs.get_acl_policy if parent_rpcs.respond_to? :get_acl_policy
|
|
3605
|
+
@get_acl_policy = ::Gapic::Config::Method.new get_acl_policy_config
|
|
2018
3606
|
update_cluster_config = parent_rpcs.update_cluster if parent_rpcs.respond_to? :update_cluster
|
|
2019
3607
|
@update_cluster = ::Gapic::Config::Method.new update_cluster_config
|
|
3608
|
+
update_acl_policy_config = parent_rpcs.update_acl_policy if parent_rpcs.respond_to? :update_acl_policy
|
|
3609
|
+
@update_acl_policy = ::Gapic::Config::Method.new update_acl_policy_config
|
|
2020
3610
|
delete_cluster_config = parent_rpcs.delete_cluster if parent_rpcs.respond_to? :delete_cluster
|
|
2021
3611
|
@delete_cluster = ::Gapic::Config::Method.new delete_cluster_config
|
|
3612
|
+
delete_acl_policy_config = parent_rpcs.delete_acl_policy if parent_rpcs.respond_to? :delete_acl_policy
|
|
3613
|
+
@delete_acl_policy = ::Gapic::Config::Method.new delete_acl_policy_config
|
|
3614
|
+
get_acl_policy_revision_config = parent_rpcs.get_acl_policy_revision if parent_rpcs.respond_to? :get_acl_policy_revision
|
|
3615
|
+
@get_acl_policy_revision = ::Gapic::Config::Method.new get_acl_policy_revision_config
|
|
3616
|
+
list_acl_policy_revisions_config = parent_rpcs.list_acl_policy_revisions if parent_rpcs.respond_to? :list_acl_policy_revisions
|
|
3617
|
+
@list_acl_policy_revisions = ::Gapic::Config::Method.new list_acl_policy_revisions_config
|
|
2022
3618
|
create_cluster_config = parent_rpcs.create_cluster if parent_rpcs.respond_to? :create_cluster
|
|
2023
3619
|
@create_cluster = ::Gapic::Config::Method.new create_cluster_config
|
|
3620
|
+
create_acl_policy_config = parent_rpcs.create_acl_policy if parent_rpcs.respond_to? :create_acl_policy
|
|
3621
|
+
@create_acl_policy = ::Gapic::Config::Method.new create_acl_policy_config
|
|
2024
3622
|
get_cluster_certificate_authority_config = parent_rpcs.get_cluster_certificate_authority if parent_rpcs.respond_to? :get_cluster_certificate_authority
|
|
2025
3623
|
@get_cluster_certificate_authority = ::Gapic::Config::Method.new get_cluster_certificate_authority_config
|
|
2026
3624
|
get_shared_regional_certificate_authority_config = parent_rpcs.get_shared_regional_certificate_authority if parent_rpcs.respond_to? :get_shared_regional_certificate_authority
|
|
@@ -2041,6 +3639,22 @@ module Google
|
|
|
2041
3639
|
@export_backup = ::Gapic::Config::Method.new export_backup_config
|
|
2042
3640
|
backup_cluster_config = parent_rpcs.backup_cluster if parent_rpcs.respond_to? :backup_cluster
|
|
2043
3641
|
@backup_cluster = ::Gapic::Config::Method.new backup_cluster_config
|
|
3642
|
+
list_token_auth_users_config = parent_rpcs.list_token_auth_users if parent_rpcs.respond_to? :list_token_auth_users
|
|
3643
|
+
@list_token_auth_users = ::Gapic::Config::Method.new list_token_auth_users_config
|
|
3644
|
+
get_token_auth_user_config = parent_rpcs.get_token_auth_user if parent_rpcs.respond_to? :get_token_auth_user
|
|
3645
|
+
@get_token_auth_user = ::Gapic::Config::Method.new get_token_auth_user_config
|
|
3646
|
+
list_auth_tokens_config = parent_rpcs.list_auth_tokens if parent_rpcs.respond_to? :list_auth_tokens
|
|
3647
|
+
@list_auth_tokens = ::Gapic::Config::Method.new list_auth_tokens_config
|
|
3648
|
+
get_auth_token_config = parent_rpcs.get_auth_token if parent_rpcs.respond_to? :get_auth_token
|
|
3649
|
+
@get_auth_token = ::Gapic::Config::Method.new get_auth_token_config
|
|
3650
|
+
add_token_auth_user_config = parent_rpcs.add_token_auth_user if parent_rpcs.respond_to? :add_token_auth_user
|
|
3651
|
+
@add_token_auth_user = ::Gapic::Config::Method.new add_token_auth_user_config
|
|
3652
|
+
delete_token_auth_user_config = parent_rpcs.delete_token_auth_user if parent_rpcs.respond_to? :delete_token_auth_user
|
|
3653
|
+
@delete_token_auth_user = ::Gapic::Config::Method.new delete_token_auth_user_config
|
|
3654
|
+
add_auth_token_config = parent_rpcs.add_auth_token if parent_rpcs.respond_to? :add_auth_token
|
|
3655
|
+
@add_auth_token = ::Gapic::Config::Method.new add_auth_token_config
|
|
3656
|
+
delete_auth_token_config = parent_rpcs.delete_auth_token if parent_rpcs.respond_to? :delete_auth_token
|
|
3657
|
+
@delete_auth_token = ::Gapic::Config::Method.new delete_auth_token_config
|
|
2044
3658
|
|
|
2045
3659
|
yield self if block_given?
|
|
2046
3660
|
end
|