google-cloud-redis-v1 0.2.3 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/redis/v1/cloud_redis/client.rb +81 -0
- data/lib/google/cloud/redis/v1/cloud_redis_pb.rb +5 -0
- data/lib/google/cloud/redis/v1/cloud_redis_services_pb.rb +3 -0
- data/lib/google/cloud/redis/v1/version.rb +1 -1
- data/proto_docs/google/cloud/redis/v1/cloud_redis.rb +20 -6
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '038047e49edefcce2484119ac42a3cc8460cbcf51b523b3be3cf18af6d1e30fe'
|
4
|
+
data.tar.gz: acee195bb64a89f09fe23db95d020e50cbd5c8557e3cce84fd41b960187651ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e61bf5e0b7c505c1ba54112d5f7c48148e411080033833d323bc30b772cf7029d0414f302277f96447be6a659589666f862402197a9079b53fbdb8c237453564
|
7
|
+
data.tar.gz: b5dc1146c7a5b5388fc81cabb69e3b5d769d022e4c426b731e1d03788dd41308d7b4b109b342d375d8b046c225e109d1d0f7314a732b7b31c41cd590de559d64
|
@@ -87,6 +87,8 @@ module Google
|
|
87
87
|
|
88
88
|
default_config.rpcs.update_instance.timeout = 600.0
|
89
89
|
|
90
|
+
default_config.rpcs.upgrade_instance.timeout = 600.0
|
91
|
+
|
90
92
|
default_config.rpcs.import_instance.timeout = 600.0
|
91
93
|
|
92
94
|
default_config.rpcs.export_instance.timeout = 600.0
|
@@ -514,6 +516,78 @@ module Google
|
|
514
516
|
raise ::Google::Cloud::Error.from_error(e)
|
515
517
|
end
|
516
518
|
|
519
|
+
##
|
520
|
+
# Upgrades Redis instance to the newer Redis version specified in the
|
521
|
+
# request.
|
522
|
+
#
|
523
|
+
# @overload upgrade_instance(request, options = nil)
|
524
|
+
# Pass arguments to `upgrade_instance` via a request object, either of type
|
525
|
+
# {::Google::Cloud::Redis::V1::UpgradeInstanceRequest} or an equivalent Hash.
|
526
|
+
#
|
527
|
+
# @param request [::Google::Cloud::Redis::V1::UpgradeInstanceRequest, ::Hash]
|
528
|
+
# A request object representing the call parameters. Required. To specify no
|
529
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
530
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
531
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
532
|
+
#
|
533
|
+
# @overload upgrade_instance(name: nil, redis_version: nil)
|
534
|
+
# Pass arguments to `upgrade_instance` via keyword arguments. Note that at
|
535
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
536
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
537
|
+
#
|
538
|
+
# @param name [::String]
|
539
|
+
# Required. Redis instance resource name using the form:
|
540
|
+
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
541
|
+
# where `location_id` refers to a GCP region.
|
542
|
+
# @param redis_version [::String]
|
543
|
+
# Required. Specifies the target version of Redis software to upgrade to.
|
544
|
+
#
|
545
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
546
|
+
# @yieldparam response [::Gapic::Operation]
|
547
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
548
|
+
#
|
549
|
+
# @return [::Gapic::Operation]
|
550
|
+
#
|
551
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
552
|
+
#
|
553
|
+
def upgrade_instance request, options = nil
|
554
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
555
|
+
|
556
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::UpgradeInstanceRequest
|
557
|
+
|
558
|
+
# Converts hash and nil to an options object
|
559
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
560
|
+
|
561
|
+
# Customize the options with defaults
|
562
|
+
metadata = @config.rpcs.upgrade_instance.metadata.to_h
|
563
|
+
|
564
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
565
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
566
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
567
|
+
gapic_version: ::Google::Cloud::Redis::V1::VERSION
|
568
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
569
|
+
|
570
|
+
header_params = {
|
571
|
+
"name" => request.name
|
572
|
+
}
|
573
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
574
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
575
|
+
|
576
|
+
options.apply_defaults timeout: @config.rpcs.upgrade_instance.timeout,
|
577
|
+
metadata: metadata,
|
578
|
+
retry_policy: @config.rpcs.upgrade_instance.retry_policy
|
579
|
+
options.apply_defaults metadata: @config.metadata,
|
580
|
+
retry_policy: @config.retry_policy
|
581
|
+
|
582
|
+
@cloud_redis_stub.call_rpc :upgrade_instance, request, options: options do |response, operation|
|
583
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
584
|
+
yield response, operation if block_given?
|
585
|
+
return response
|
586
|
+
end
|
587
|
+
rescue ::GRPC::BadStatus => e
|
588
|
+
raise ::Google::Cloud::Error.from_error(e)
|
589
|
+
end
|
590
|
+
|
517
591
|
##
|
518
592
|
# Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
|
519
593
|
#
|
@@ -968,6 +1042,11 @@ module Google
|
|
968
1042
|
#
|
969
1043
|
attr_reader :update_instance
|
970
1044
|
##
|
1045
|
+
# RPC-specific configuration for `upgrade_instance`
|
1046
|
+
# @return [::Gapic::Config::Method]
|
1047
|
+
#
|
1048
|
+
attr_reader :upgrade_instance
|
1049
|
+
##
|
971
1050
|
# RPC-specific configuration for `import_instance`
|
972
1051
|
# @return [::Gapic::Config::Method]
|
973
1052
|
#
|
@@ -998,6 +1077,8 @@ module Google
|
|
998
1077
|
@create_instance = ::Gapic::Config::Method.new create_instance_config
|
999
1078
|
update_instance_config = parent_rpcs&.update_instance if parent_rpcs&.respond_to? :update_instance
|
1000
1079
|
@update_instance = ::Gapic::Config::Method.new update_instance_config
|
1080
|
+
upgrade_instance_config = parent_rpcs&.upgrade_instance if parent_rpcs&.respond_to? :upgrade_instance
|
1081
|
+
@upgrade_instance = ::Gapic::Config::Method.new upgrade_instance_config
|
1001
1082
|
import_instance_config = parent_rpcs&.import_instance if parent_rpcs&.respond_to? :import_instance
|
1002
1083
|
@import_instance = ::Gapic::Config::Method.new import_instance_config
|
1003
1084
|
export_instance_config = parent_rpcs&.export_instance if parent_rpcs&.respond_to? :export_instance
|
@@ -76,6 +76,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
76
76
|
optional :update_mask, :message, 1, "google.protobuf.FieldMask"
|
77
77
|
optional :instance, :message, 2, "google.cloud.redis.v1.Instance"
|
78
78
|
end
|
79
|
+
add_message "google.cloud.redis.v1.UpgradeInstanceRequest" do
|
80
|
+
optional :name, :string, 1
|
81
|
+
optional :redis_version, :string, 2
|
82
|
+
end
|
79
83
|
add_message "google.cloud.redis.v1.DeleteInstanceRequest" do
|
80
84
|
optional :name, :string, 1
|
81
85
|
end
|
@@ -142,6 +146,7 @@ module Google
|
|
142
146
|
GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.GetInstanceRequest").msgclass
|
143
147
|
CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.CreateInstanceRequest").msgclass
|
144
148
|
UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.UpdateInstanceRequest").msgclass
|
149
|
+
UpgradeInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.UpgradeInstanceRequest").msgclass
|
145
150
|
DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.DeleteInstanceRequest").msgclass
|
146
151
|
GcsSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.GcsSource").msgclass
|
147
152
|
InputConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.InputConfig").msgclass
|
@@ -78,6 +78,9 @@ module Google
|
|
78
78
|
# in the response field. The returned operation is automatically deleted
|
79
79
|
# after a few hours, so there is no need to call DeleteOperation.
|
80
80
|
rpc :UpdateInstance, UpdateInstanceRequest, Google::Longrunning::Operation
|
81
|
+
# Upgrades Redis instance to the newer Redis version specified in the
|
82
|
+
# request.
|
83
|
+
rpc :UpgradeInstance, UpgradeInstanceRequest, Google::Longrunning::Operation
|
81
84
|
# Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
|
82
85
|
#
|
83
86
|
# Redis may stop serving during this operation. Instance state will be
|
@@ -133,9 +133,8 @@ module Google
|
|
133
133
|
# operation.
|
134
134
|
# @!attribute [rw] connect_mode
|
135
135
|
# @return [::Google::Cloud::Redis::V1::Instance::ConnectMode]
|
136
|
-
# Optional. The connect mode of Redis instance.
|
137
|
-
# If not provided,
|
138
|
-
# Current default: DIRECT_PEERING.
|
136
|
+
# Optional. The network connect mode of the Redis instance.
|
137
|
+
# If not provided, the connect mode defaults to DIRECT_PEERING.
|
139
138
|
class Instance
|
140
139
|
include ::Google::Protobuf::MessageExts
|
141
140
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -207,11 +206,12 @@ module Google
|
|
207
206
|
# Not set.
|
208
207
|
CONNECT_MODE_UNSPECIFIED = 0
|
209
208
|
|
210
|
-
# Connect via
|
209
|
+
# Connect via direct peering to the Memorystore for Redis hosted service.
|
211
210
|
DIRECT_PEERING = 1
|
212
211
|
|
213
|
-
# Connect
|
214
|
-
#
|
212
|
+
# Connect your Memorystore for Redis instance using Private Service
|
213
|
+
# Access. Private services access provides an IP address range for multiple
|
214
|
+
# Google Cloud services, including Memorystore.
|
215
215
|
PRIVATE_SERVICE_ACCESS = 2
|
216
216
|
end
|
217
217
|
end
|
@@ -320,6 +320,20 @@ module Google
|
|
320
320
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
321
321
|
end
|
322
322
|
|
323
|
+
# Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#upgrade_instance UpgradeInstance}.
|
324
|
+
# @!attribute [rw] name
|
325
|
+
# @return [::String]
|
326
|
+
# Required. Redis instance resource name using the form:
|
327
|
+
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
328
|
+
# where `location_id` refers to a GCP region.
|
329
|
+
# @!attribute [rw] redis_version
|
330
|
+
# @return [::String]
|
331
|
+
# Required. Specifies the target version of Redis software to upgrade to.
|
332
|
+
class UpgradeInstanceRequest
|
333
|
+
include ::Google::Protobuf::MessageExts
|
334
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
335
|
+
end
|
336
|
+
|
323
337
|
# Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#delete_instance DeleteInstance}.
|
324
338
|
# @!attribute [rw] name
|
325
339
|
# @return [::String]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-redis-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: google-cloud-errors
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|