google-cloud-redis-v1 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4b4364f7303292cd51c0a92fb3a73cb115e079430c884def7b22b79239fac2e
4
- data.tar.gz: e581b2b3be5b10c455836e64ae737b7914e211d3d590c7579ee9131a59907db5
3
+ metadata.gz: dd9294a6b15838687a0d805248a0a5325db71981f1385ea2cfe7cb75df307ac1
4
+ data.tar.gz: 673933222f1bc1ab0010441732f387a104e16c26586385f062288421f7ebf347
5
5
  SHA512:
6
- metadata.gz: 62857fa503a3835d23ce25c00b97e0aab73312249dd00a3e897f8b952a97032888190d6552e53924289ee2077634ed97bb7a7c63713ddf8b48d2606dda8e5b3d
7
- data.tar.gz: 18bc02413c91aaf72c547b37f3feb1ec7b685562563d3ead38e18028736fca6f396231a1777450c8e8ca45542697fdcc3ed83e952921687f7d6b9d079bd3b45f
6
+ metadata.gz: 2b8966c4848f4f56ceda65f0ba3df4f630e6f252ba55f4798409f2b7d0cac640a9932811a87fa9a98e8347c3028707a3d4bb7acbbcf5f8d7484917b092b208e9
7
+ data.tar.gz: 57f151fd170d39edd1f26cad0a5ea02577a9c014280c396a829682973e155b4583b2831747f9aff093b689a7dbea2e5a5d3a0358dd20d3b16247110e1dc22139
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::Redis::V1::ListInstancesRequest.new # (request fields
37
37
  response = client.list_instances request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-redis-v1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-redis-v1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/memorystore/docs/redis)
@@ -82,6 +82,8 @@ module Google
82
82
 
83
83
  default_config.rpcs.get_instance.timeout = 600.0
84
84
 
85
+ default_config.rpcs.get_instance_auth_string.timeout = 600.0
86
+
85
87
  default_config.rpcs.create_instance.timeout = 600.0
86
88
 
87
89
  default_config.rpcs.update_instance.timeout = 600.0
@@ -96,6 +98,8 @@ module Google
96
98
 
97
99
  default_config.rpcs.delete_instance.timeout = 600.0
98
100
 
101
+ default_config.rpcs.reschedule_maintenance.timeout = 600.0
102
+
99
103
  default_config
100
104
  end
101
105
  yield @configure if block_given?
@@ -389,6 +393,95 @@ module Google
389
393
  raise ::Google::Cloud::Error.from_error(e)
390
394
  end
391
395
 
396
+ ##
397
+ # Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
398
+ # instance the response will be empty. This information is not included in
399
+ # the details returned to GetInstance.
400
+ #
401
+ # @overload get_instance_auth_string(request, options = nil)
402
+ # Pass arguments to `get_instance_auth_string` via a request object, either of type
403
+ # {::Google::Cloud::Redis::V1::GetInstanceAuthStringRequest} or an equivalent Hash.
404
+ #
405
+ # @param request [::Google::Cloud::Redis::V1::GetInstanceAuthStringRequest, ::Hash]
406
+ # A request object representing the call parameters. Required. To specify no
407
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
408
+ # @param options [::Gapic::CallOptions, ::Hash]
409
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
410
+ #
411
+ # @overload get_instance_auth_string(name: nil)
412
+ # Pass arguments to `get_instance_auth_string` via keyword arguments. Note that at
413
+ # least one keyword argument is required. To specify no parameters, or to keep all
414
+ # the default parameter values, pass an empty Hash as a request object (see above).
415
+ #
416
+ # @param name [::String]
417
+ # Required. Redis instance resource name using the form:
418
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
419
+ # where `location_id` refers to a GCP region.
420
+ #
421
+ # @yield [response, operation] Access the result along with the RPC operation
422
+ # @yieldparam response [::Google::Cloud::Redis::V1::InstanceAuthString]
423
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
424
+ #
425
+ # @return [::Google::Cloud::Redis::V1::InstanceAuthString]
426
+ #
427
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
428
+ #
429
+ # @example Basic example
430
+ # require "google/cloud/redis/v1"
431
+ #
432
+ # # Create a client object. The client can be reused for multiple calls.
433
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
434
+ #
435
+ # # Create a request. To set request fields, pass in keyword arguments.
436
+ # request = Google::Cloud::Redis::V1::GetInstanceAuthStringRequest.new
437
+ #
438
+ # # Call the get_instance_auth_string method.
439
+ # result = client.get_instance_auth_string request
440
+ #
441
+ # # The returned object is of type Google::Cloud::Redis::V1::InstanceAuthString.
442
+ # p result
443
+ #
444
+ def get_instance_auth_string request, options = nil
445
+ raise ::ArgumentError, "request must be provided" if request.nil?
446
+
447
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::GetInstanceAuthStringRequest
448
+
449
+ # Converts hash and nil to an options object
450
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
451
+
452
+ # Customize the options with defaults
453
+ metadata = @config.rpcs.get_instance_auth_string.metadata.to_h
454
+
455
+ # Set x-goog-api-client and x-goog-user-project headers
456
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
457
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
458
+ gapic_version: ::Google::Cloud::Redis::V1::VERSION
459
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
460
+
461
+ header_params = {}
462
+ if request.name
463
+ header_params["name"] = request.name
464
+ end
465
+
466
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
467
+ metadata[:"x-goog-request-params"] ||= request_params_header
468
+
469
+ options.apply_defaults timeout: @config.rpcs.get_instance_auth_string.timeout,
470
+ metadata: metadata,
471
+ retry_policy: @config.rpcs.get_instance_auth_string.retry_policy
472
+
473
+ options.apply_defaults timeout: @config.timeout,
474
+ metadata: @config.metadata,
475
+ retry_policy: @config.retry_policy
476
+
477
+ @cloud_redis_stub.call_rpc :get_instance_auth_string, request, options: options do |response, operation|
478
+ yield response, operation if block_given?
479
+ return response
480
+ end
481
+ rescue ::GRPC::BadStatus => e
482
+ raise ::Google::Cloud::Error.from_error(e)
483
+ end
484
+
392
485
  ##
393
486
  # Creates a Redis instance based on the specified tier and memory size.
394
487
  #
@@ -1113,6 +1206,108 @@ module Google
1113
1206
  raise ::Google::Cloud::Error.from_error(e)
1114
1207
  end
1115
1208
 
1209
+ ##
1210
+ # Reschedule maintenance for a given instance in a given project and
1211
+ # location.
1212
+ #
1213
+ # @overload reschedule_maintenance(request, options = nil)
1214
+ # Pass arguments to `reschedule_maintenance` via a request object, either of type
1215
+ # {::Google::Cloud::Redis::V1::RescheduleMaintenanceRequest} or an equivalent Hash.
1216
+ #
1217
+ # @param request [::Google::Cloud::Redis::V1::RescheduleMaintenanceRequest, ::Hash]
1218
+ # A request object representing the call parameters. Required. To specify no
1219
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1220
+ # @param options [::Gapic::CallOptions, ::Hash]
1221
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
1222
+ #
1223
+ # @overload reschedule_maintenance(name: nil, reschedule_type: nil, schedule_time: nil)
1224
+ # Pass arguments to `reschedule_maintenance` via keyword arguments. Note that at
1225
+ # least one keyword argument is required. To specify no parameters, or to keep all
1226
+ # the default parameter values, pass an empty Hash as a request object (see above).
1227
+ #
1228
+ # @param name [::String]
1229
+ # Required. Redis instance resource name using the form:
1230
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
1231
+ # where `location_id` refers to a GCP region.
1232
+ # @param reschedule_type [::Google::Cloud::Redis::V1::RescheduleMaintenanceRequest::RescheduleType]
1233
+ # Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
1234
+ # @param schedule_time [::Google::Protobuf::Timestamp, ::Hash]
1235
+ # Optional. Timestamp when the maintenance shall be rescheduled to if
1236
+ # reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
1237
+ # example `2012-11-15T16:19:00.094Z`.
1238
+ #
1239
+ # @yield [response, operation] Access the result along with the RPC operation
1240
+ # @yieldparam response [::Gapic::Operation]
1241
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
1242
+ #
1243
+ # @return [::Gapic::Operation]
1244
+ #
1245
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
1246
+ #
1247
+ # @example Basic example
1248
+ # require "google/cloud/redis/v1"
1249
+ #
1250
+ # # Create a client object. The client can be reused for multiple calls.
1251
+ # client = Google::Cloud::Redis::V1::CloudRedis::Client.new
1252
+ #
1253
+ # # Create a request. To set request fields, pass in keyword arguments.
1254
+ # request = Google::Cloud::Redis::V1::RescheduleMaintenanceRequest.new
1255
+ #
1256
+ # # Call the reschedule_maintenance method.
1257
+ # result = client.reschedule_maintenance request
1258
+ #
1259
+ # # The returned object is of type Gapic::Operation. You can use this
1260
+ # # object to check the status of an operation, cancel it, or wait
1261
+ # # for results. Here is how to block until completion:
1262
+ # result.wait_until_done! timeout: 60
1263
+ # if result.response?
1264
+ # p result.response
1265
+ # else
1266
+ # puts "Error!"
1267
+ # end
1268
+ #
1269
+ def reschedule_maintenance request, options = nil
1270
+ raise ::ArgumentError, "request must be provided" if request.nil?
1271
+
1272
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Redis::V1::RescheduleMaintenanceRequest
1273
+
1274
+ # Converts hash and nil to an options object
1275
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1276
+
1277
+ # Customize the options with defaults
1278
+ metadata = @config.rpcs.reschedule_maintenance.metadata.to_h
1279
+
1280
+ # Set x-goog-api-client and x-goog-user-project headers
1281
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1282
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1283
+ gapic_version: ::Google::Cloud::Redis::V1::VERSION
1284
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1285
+
1286
+ header_params = {}
1287
+ if request.name
1288
+ header_params["name"] = request.name
1289
+ end
1290
+
1291
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1292
+ metadata[:"x-goog-request-params"] ||= request_params_header
1293
+
1294
+ options.apply_defaults timeout: @config.rpcs.reschedule_maintenance.timeout,
1295
+ metadata: metadata,
1296
+ retry_policy: @config.rpcs.reschedule_maintenance.retry_policy
1297
+
1298
+ options.apply_defaults timeout: @config.timeout,
1299
+ metadata: @config.metadata,
1300
+ retry_policy: @config.retry_policy
1301
+
1302
+ @cloud_redis_stub.call_rpc :reschedule_maintenance, request, options: options do |response, operation|
1303
+ response = ::Gapic::Operation.new response, @operations_client, options: options
1304
+ yield response, operation if block_given?
1305
+ return response
1306
+ end
1307
+ rescue ::GRPC::BadStatus => e
1308
+ raise ::Google::Cloud::Error.from_error(e)
1309
+ end
1310
+
1116
1311
  ##
1117
1312
  # Configuration class for the CloudRedis API.
1118
1313
  #
@@ -1259,6 +1454,11 @@ module Google
1259
1454
  #
1260
1455
  attr_reader :get_instance
1261
1456
  ##
1457
+ # RPC-specific configuration for `get_instance_auth_string`
1458
+ # @return [::Gapic::Config::Method]
1459
+ #
1460
+ attr_reader :get_instance_auth_string
1461
+ ##
1262
1462
  # RPC-specific configuration for `create_instance`
1263
1463
  # @return [::Gapic::Config::Method]
1264
1464
  #
@@ -1293,6 +1493,11 @@ module Google
1293
1493
  # @return [::Gapic::Config::Method]
1294
1494
  #
1295
1495
  attr_reader :delete_instance
1496
+ ##
1497
+ # RPC-specific configuration for `reschedule_maintenance`
1498
+ # @return [::Gapic::Config::Method]
1499
+ #
1500
+ attr_reader :reschedule_maintenance
1296
1501
 
1297
1502
  # @private
1298
1503
  def initialize parent_rpcs = nil
@@ -1300,6 +1505,8 @@ module Google
1300
1505
  @list_instances = ::Gapic::Config::Method.new list_instances_config
1301
1506
  get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance
1302
1507
  @get_instance = ::Gapic::Config::Method.new get_instance_config
1508
+ get_instance_auth_string_config = parent_rpcs.get_instance_auth_string if parent_rpcs.respond_to? :get_instance_auth_string
1509
+ @get_instance_auth_string = ::Gapic::Config::Method.new get_instance_auth_string_config
1303
1510
  create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance
1304
1511
  @create_instance = ::Gapic::Config::Method.new create_instance_config
1305
1512
  update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance
@@ -1314,6 +1521,8 @@ module Google
1314
1521
  @failover_instance = ::Gapic::Config::Method.new failover_instance_config
1315
1522
  delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance
1316
1523
  @delete_instance = ::Gapic::Config::Method.new delete_instance_config
1524
+ reschedule_maintenance_config = parent_rpcs.reschedule_maintenance if parent_rpcs.respond_to? :reschedule_maintenance
1525
+ @reschedule_maintenance = ::Gapic::Config::Method.new reschedule_maintenance_config
1317
1526
 
1318
1527
  yield self if block_given?
1319
1528
  end
@@ -6,8 +6,11 @@ require 'google/api/client_pb'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
8
  require 'google/longrunning/operations_pb'
9
+ require 'google/protobuf/duration_pb'
9
10
  require 'google/protobuf/field_mask_pb'
10
11
  require 'google/protobuf/timestamp_pb'
12
+ require 'google/type/dayofweek_pb'
13
+ require 'google/type/timeofday_pb'
11
14
  require 'google/protobuf'
12
15
 
13
16
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -24,6 +27,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
24
27
  optional :alternative_location_id, :string, 5
25
28
  optional :redis_version, :string, 7
26
29
  optional :reserved_ip_range, :string, 9
30
+ optional :secondary_ip_range, :string, 30
27
31
  optional :host, :string, 10
28
32
  optional :port, :int32, 11
29
33
  optional :current_location_id, :string, 12
@@ -36,6 +40,11 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
36
40
  optional :authorized_network, :string, 20
37
41
  optional :persistence_iam_identity, :string, 21
38
42
  optional :connect_mode, :enum, 22, "google.cloud.redis.v1.Instance.ConnectMode"
43
+ optional :auth_enabled, :bool, 23
44
+ repeated :server_ca_certs, :message, 25, "google.cloud.redis.v1.TlsCertificate"
45
+ optional :transit_encryption_mode, :enum, 26, "google.cloud.redis.v1.Instance.TransitEncryptionMode"
46
+ optional :maintenance_policy, :message, 27, "google.cloud.redis.v1.MaintenancePolicy"
47
+ optional :maintenance_schedule, :message, 28, "google.cloud.redis.v1.MaintenanceSchedule"
39
48
  optional :replica_count, :int32, 31
40
49
  repeated :nodes, :message, 32, "google.cloud.redis.v1.NodeInfo"
41
50
  optional :read_endpoint, :string, 33
@@ -63,11 +72,44 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
72
  value :DIRECT_PEERING, 1
64
73
  value :PRIVATE_SERVICE_ACCESS, 2
65
74
  end
75
+ add_enum "google.cloud.redis.v1.Instance.TransitEncryptionMode" do
76
+ value :TRANSIT_ENCRYPTION_MODE_UNSPECIFIED, 0
77
+ value :SERVER_AUTHENTICATION, 1
78
+ value :DISABLED, 2
79
+ end
66
80
  add_enum "google.cloud.redis.v1.Instance.ReadReplicasMode" do
67
81
  value :READ_REPLICAS_MODE_UNSPECIFIED, 0
68
82
  value :READ_REPLICAS_DISABLED, 1
69
83
  value :READ_REPLICAS_ENABLED, 2
70
84
  end
85
+ add_message "google.cloud.redis.v1.RescheduleMaintenanceRequest" do
86
+ optional :name, :string, 1
87
+ optional :reschedule_type, :enum, 2, "google.cloud.redis.v1.RescheduleMaintenanceRequest.RescheduleType"
88
+ optional :schedule_time, :message, 3, "google.protobuf.Timestamp"
89
+ end
90
+ add_enum "google.cloud.redis.v1.RescheduleMaintenanceRequest.RescheduleType" do
91
+ value :RESCHEDULE_TYPE_UNSPECIFIED, 0
92
+ value :IMMEDIATE, 1
93
+ value :NEXT_AVAILABLE_WINDOW, 2
94
+ value :SPECIFIC_TIME, 3
95
+ end
96
+ add_message "google.cloud.redis.v1.MaintenancePolicy" do
97
+ optional :create_time, :message, 1, "google.protobuf.Timestamp"
98
+ optional :update_time, :message, 2, "google.protobuf.Timestamp"
99
+ optional :description, :string, 3
100
+ repeated :weekly_maintenance_window, :message, 4, "google.cloud.redis.v1.WeeklyMaintenanceWindow"
101
+ end
102
+ add_message "google.cloud.redis.v1.WeeklyMaintenanceWindow" do
103
+ optional :day, :enum, 1, "google.type.DayOfWeek"
104
+ optional :start_time, :message, 2, "google.type.TimeOfDay"
105
+ optional :duration, :message, 3, "google.protobuf.Duration"
106
+ end
107
+ add_message "google.cloud.redis.v1.MaintenanceSchedule" do
108
+ optional :start_time, :message, 1, "google.protobuf.Timestamp"
109
+ optional :end_time, :message, 2, "google.protobuf.Timestamp"
110
+ optional :can_reschedule, :bool, 3
111
+ optional :schedule_deadline_time, :message, 5, "google.protobuf.Timestamp"
112
+ end
71
113
  add_message "google.cloud.redis.v1.ListInstancesRequest" do
72
114
  optional :parent, :string, 1
73
115
  optional :page_size, :int32, 2
@@ -81,6 +123,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
81
123
  add_message "google.cloud.redis.v1.GetInstanceRequest" do
82
124
  optional :name, :string, 1
83
125
  end
126
+ add_message "google.cloud.redis.v1.GetInstanceAuthStringRequest" do
127
+ optional :name, :string, 1
128
+ end
129
+ add_message "google.cloud.redis.v1.InstanceAuthString" do
130
+ optional :auth_string, :string, 1
131
+ end
84
132
  add_message "google.cloud.redis.v1.CreateInstanceRequest" do
85
133
  optional :parent, :string, 1
86
134
  optional :instance_id, :string, 2
@@ -144,6 +192,13 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
144
192
  end
145
193
  add_message "google.cloud.redis.v1.ZoneMetadata" do
146
194
  end
195
+ add_message "google.cloud.redis.v1.TlsCertificate" do
196
+ optional :serial_number, :string, 1
197
+ optional :cert, :string, 2
198
+ optional :create_time, :message, 3, "google.protobuf.Timestamp"
199
+ optional :expire_time, :message, 4, "google.protobuf.Timestamp"
200
+ optional :sha1_fingerprint, :string, 5
201
+ end
147
202
  end
148
203
  end
149
204
 
@@ -156,10 +211,18 @@ module Google
156
211
  Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.State").enummodule
157
212
  Instance::Tier = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.Tier").enummodule
158
213
  Instance::ConnectMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.ConnectMode").enummodule
214
+ Instance::TransitEncryptionMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.TransitEncryptionMode").enummodule
159
215
  Instance::ReadReplicasMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.Instance.ReadReplicasMode").enummodule
216
+ RescheduleMaintenanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.RescheduleMaintenanceRequest").msgclass
217
+ RescheduleMaintenanceRequest::RescheduleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.RescheduleMaintenanceRequest.RescheduleType").enummodule
218
+ MaintenancePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.MaintenancePolicy").msgclass
219
+ WeeklyMaintenanceWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.WeeklyMaintenanceWindow").msgclass
220
+ MaintenanceSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.MaintenanceSchedule").msgclass
160
221
  ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.ListInstancesRequest").msgclass
161
222
  ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.ListInstancesResponse").msgclass
162
223
  GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.GetInstanceRequest").msgclass
224
+ GetInstanceAuthStringRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.GetInstanceAuthStringRequest").msgclass
225
+ InstanceAuthString = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.InstanceAuthString").msgclass
163
226
  CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.CreateInstanceRequest").msgclass
164
227
  UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.UpdateInstanceRequest").msgclass
165
228
  UpgradeInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.UpgradeInstanceRequest").msgclass
@@ -175,6 +238,7 @@ module Google
175
238
  OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.OperationMetadata").msgclass
176
239
  LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.LocationMetadata").msgclass
177
240
  ZoneMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.ZoneMetadata").msgclass
241
+ TlsCertificate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1.TlsCertificate").msgclass
178
242
  end
179
243
  end
180
244
  end
@@ -59,6 +59,10 @@ module Google
59
59
  rpc :ListInstances, ::Google::Cloud::Redis::V1::ListInstancesRequest, ::Google::Cloud::Redis::V1::ListInstancesResponse
60
60
  # Gets the details of a specific Redis instance.
61
61
  rpc :GetInstance, ::Google::Cloud::Redis::V1::GetInstanceRequest, ::Google::Cloud::Redis::V1::Instance
62
+ # Gets the AUTH string for a Redis instance. If AUTH is not enabled for the
63
+ # instance the response will be empty. This information is not included in
64
+ # the details returned to GetInstance.
65
+ rpc :GetInstanceAuthString, ::Google::Cloud::Redis::V1::GetInstanceAuthStringRequest, ::Google::Cloud::Redis::V1::InstanceAuthString
62
66
  # Creates a Redis instance based on the specified tier and memory size.
63
67
  #
64
68
  # By default, the instance is accessible from the project's
@@ -103,6 +107,9 @@ module Google
103
107
  # Deletes a specific Redis instance. Instance stops serving and data is
104
108
  # deleted.
105
109
  rpc :DeleteInstance, ::Google::Cloud::Redis::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation
110
+ # Reschedule maintenance for a given instance in a given project and
111
+ # location.
112
+ rpc :RescheduleMaintenance, ::Google::Cloud::Redis::V1::RescheduleMaintenanceRequest, ::Google::Longrunning::Operation
106
113
  end
107
114
 
108
115
  Stub = Service.rpc_stub_class
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module Redis
23
23
  module V1
24
- VERSION = "0.6.1"
24
+ VERSION = "0.7.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/redis/v1"
29
31
  # client = ::Google::Cloud::Redis::V1::CloudRedis::Client.new
30
32
  #
@@ -33,7 +33,7 @@ module Google
33
33
  extend ::Google::Protobuf::MessageExts::ClassMethods
34
34
  end
35
35
 
36
- # A Google Cloud Redis instance.
36
+ # A Memorystore for Redis instance.
37
37
  # @!attribute [rw] name
38
38
  # @return [::String]
39
39
  # Required. Unique name of the resource in this scope including project and
@@ -85,6 +85,13 @@ module Google
85
85
  # If not provided, the service will choose an unused /29 block, for
86
86
  # example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
87
87
  # the default block size is /28.
88
+ # @!attribute [rw] secondary_ip_range
89
+ # @return [::String]
90
+ # Optional. Additional IP range for node placement. Required when enabling read
91
+ # replicas on an existing instance. For DIRECT_PEERING mode value must be a
92
+ # CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
93
+ # must be the name of an allocated address range associated with the private
94
+ # service access connection, or "auto".
88
95
  # @!attribute [r] host
89
96
  # @return [::String]
90
97
  # Output only. Hostname or IP address of the exposed Redis endpoint used by
@@ -152,11 +159,33 @@ module Google
152
159
  # @return [::Google::Cloud::Redis::V1::Instance::ConnectMode]
153
160
  # Optional. The network connect mode of the Redis instance.
154
161
  # If not provided, the connect mode defaults to DIRECT_PEERING.
162
+ # @!attribute [rw] auth_enabled
163
+ # @return [::Boolean]
164
+ # Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
165
+ # "true" AUTH is enabled on the instance. Default value is "false" meaning
166
+ # AUTH is disabled.
167
+ # @!attribute [r] server_ca_certs
168
+ # @return [::Array<::Google::Cloud::Redis::V1::TlsCertificate>]
169
+ # Output only. List of server CA certificates for the instance.
170
+ # @!attribute [rw] transit_encryption_mode
171
+ # @return [::Google::Cloud::Redis::V1::Instance::TransitEncryptionMode]
172
+ # Optional. The TLS mode of the Redis instance.
173
+ # If not provided, TLS is disabled for the instance.
174
+ # @!attribute [rw] maintenance_policy
175
+ # @return [::Google::Cloud::Redis::V1::MaintenancePolicy]
176
+ # Optional. The maintenance policy for the instance. If not provided,
177
+ # maintenance events can be performed at any time.
178
+ # @!attribute [r] maintenance_schedule
179
+ # @return [::Google::Cloud::Redis::V1::MaintenanceSchedule]
180
+ # Output only. Date and time of upcoming maintenance events which have been
181
+ # scheduled.
155
182
  # @!attribute [rw] replica_count
156
183
  # @return [::Integer]
157
- # Optional. The number of replica nodes. Valid range for standard tier
158
- # is [1-5] and defaults to 1. Valid value for basic tier is 0 and defaults
159
- # to 0.
184
+ # Optional. The number of replica nodes. The valid range for the Standard Tier with
185
+ # read replicas enabled is [1-5] and defaults to 2. If read replicas are not
186
+ # enabled for a Standard Tier instance, the only valid value is 1 and the
187
+ # default is 1. The valid value for basic tier is 0 and the default is also
188
+ # 0.
160
189
  # @!attribute [r] nodes
161
190
  # @return [::Array<::Google::Cloud::Redis::V1::NodeInfo>]
162
191
  # Output only. Info per node.
@@ -172,7 +201,7 @@ module Google
172
201
  # endpoint. Standard tier only. Write requests should target 'port'.
173
202
  # @!attribute [rw] read_replicas_mode
174
203
  # @return [::Google::Cloud::Redis::V1::Instance::ReadReplicasMode]
175
- # Optional. Read replica mode.
204
+ # Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
176
205
  class Instance
177
206
  include ::Google::Protobuf::MessageExts
178
207
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -253,10 +282,22 @@ module Google
253
282
  PRIVATE_SERVICE_ACCESS = 2
254
283
  end
255
284
 
285
+ # Available TLS modes.
286
+ module TransitEncryptionMode
287
+ # Not set.
288
+ TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0
289
+
290
+ # Client to Server traffic encryption enabled with server authentication.
291
+ SERVER_AUTHENTICATION = 1
292
+
293
+ # TLS is disabled for the instance.
294
+ DISABLED = 2
295
+ end
296
+
256
297
  # Read replicas mode.
257
298
  module ReadReplicasMode
258
- # If not set, Memorystore Redis backend will pick the mode based on other fields in
259
- # the request.
299
+ # If not set, Memorystore Redis backend will default to
300
+ # READ_REPLICAS_DISABLED.
260
301
  READ_REPLICAS_MODE_UNSPECIFIED = 0
261
302
 
262
303
  # If disabled, read endpoint will not be provided and the instance cannot
@@ -264,11 +305,103 @@ module Google
264
305
  READ_REPLICAS_DISABLED = 1
265
306
 
266
307
  # If enabled, read endpoint will be provided and the instance can scale
267
- # up and down the number of replicas.
308
+ # up and down the number of replicas. Not valid for basic tier.
268
309
  READ_REPLICAS_ENABLED = 2
269
310
  end
270
311
  end
271
312
 
313
+ # Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#reschedule_maintenance RescheduleMaintenance}.
314
+ # @!attribute [rw] name
315
+ # @return [::String]
316
+ # Required. Redis instance resource name using the form:
317
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
318
+ # where `location_id` refers to a GCP region.
319
+ # @!attribute [rw] reschedule_type
320
+ # @return [::Google::Cloud::Redis::V1::RescheduleMaintenanceRequest::RescheduleType]
321
+ # Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.
322
+ # @!attribute [rw] schedule_time
323
+ # @return [::Google::Protobuf::Timestamp]
324
+ # Optional. Timestamp when the maintenance shall be rescheduled to if
325
+ # reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for
326
+ # example `2012-11-15T16:19:00.094Z`.
327
+ class RescheduleMaintenanceRequest
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+
331
+ # Reschedule options.
332
+ module RescheduleType
333
+ # Not set.
334
+ RESCHEDULE_TYPE_UNSPECIFIED = 0
335
+
336
+ # If the user wants to schedule the maintenance to happen now.
337
+ IMMEDIATE = 1
338
+
339
+ # If the user wants to use the existing maintenance policy to find the
340
+ # next available window.
341
+ NEXT_AVAILABLE_WINDOW = 2
342
+
343
+ # If the user wants to reschedule the maintenance to a specific time.
344
+ SPECIFIC_TIME = 3
345
+ end
346
+ end
347
+
348
+ # Maintenance policy for an instance.
349
+ # @!attribute [r] create_time
350
+ # @return [::Google::Protobuf::Timestamp]
351
+ # Output only. The time when the policy was created.
352
+ # @!attribute [r] update_time
353
+ # @return [::Google::Protobuf::Timestamp]
354
+ # Output only. The time when the policy was last updated.
355
+ # @!attribute [rw] description
356
+ # @return [::String]
357
+ # Optional. Description of what this policy is for. Create/Update methods
358
+ # return INVALID_ARGUMENT if the length is greater than 512.
359
+ # @!attribute [rw] weekly_maintenance_window
360
+ # @return [::Array<::Google::Cloud::Redis::V1::WeeklyMaintenanceWindow>]
361
+ # Optional. Maintenance window that is applied to resources covered by this
362
+ # policy. Minimum 1. For the current version, the maximum number of
363
+ # weekly_window is expected to be one.
364
+ class MaintenancePolicy
365
+ include ::Google::Protobuf::MessageExts
366
+ extend ::Google::Protobuf::MessageExts::ClassMethods
367
+ end
368
+
369
+ # Time window in which disruptive maintenance updates occur. Non-disruptive
370
+ # updates can occur inside or outside this window.
371
+ # @!attribute [rw] day
372
+ # @return [::Google::Type::DayOfWeek]
373
+ # Required. The day of week that maintenance updates occur.
374
+ # @!attribute [rw] start_time
375
+ # @return [::Google::Type::TimeOfDay]
376
+ # Required. Start time of the window in UTC time.
377
+ # @!attribute [r] duration
378
+ # @return [::Google::Protobuf::Duration]
379
+ # Output only. Duration of the maintenance window. The current window is fixed at 1 hour.
380
+ class WeeklyMaintenanceWindow
381
+ include ::Google::Protobuf::MessageExts
382
+ extend ::Google::Protobuf::MessageExts::ClassMethods
383
+ end
384
+
385
+ # Upcoming maintenance schedule. If no maintenance is scheduled, fields are not
386
+ # populated.
387
+ # @!attribute [r] start_time
388
+ # @return [::Google::Protobuf::Timestamp]
389
+ # Output only. The start time of any upcoming scheduled maintenance for this instance.
390
+ # @!attribute [r] end_time
391
+ # @return [::Google::Protobuf::Timestamp]
392
+ # Output only. The end time of any upcoming scheduled maintenance for this instance.
393
+ # @!attribute [rw] can_reschedule
394
+ # @return [::Boolean]
395
+ # If the scheduled maintenance can be rescheduled, default is true.
396
+ # @!attribute [r] schedule_deadline_time
397
+ # @return [::Google::Protobuf::Timestamp]
398
+ # Output only. The deadline that the maintenance schedule start time can not go beyond,
399
+ # including reschedule.
400
+ class MaintenanceSchedule
401
+ include ::Google::Protobuf::MessageExts
402
+ extend ::Google::Protobuf::MessageExts::ClassMethods
403
+ end
404
+
272
405
  # Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#list_instances ListInstances}.
273
406
  # @!attribute [rw] parent
274
407
  # @return [::String]
@@ -330,6 +463,26 @@ module Google
330
463
  extend ::Google::Protobuf::MessageExts::ClassMethods
331
464
  end
332
465
 
466
+ # Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#get_instance_auth_string GetInstanceAuthString}.
467
+ # @!attribute [rw] name
468
+ # @return [::String]
469
+ # Required. Redis instance resource name using the form:
470
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
471
+ # where `location_id` refers to a GCP region.
472
+ class GetInstanceAuthStringRequest
473
+ include ::Google::Protobuf::MessageExts
474
+ extend ::Google::Protobuf::MessageExts::ClassMethods
475
+ end
476
+
477
+ # Instance AUTH string details.
478
+ # @!attribute [rw] auth_string
479
+ # @return [::String]
480
+ # AUTH string set on the instance.
481
+ class InstanceAuthString
482
+ include ::Google::Protobuf::MessageExts
483
+ extend ::Google::Protobuf::MessageExts::ClassMethods
484
+ end
485
+
333
486
  # Request for {::Google::Cloud::Redis::V1::CloudRedis::Client#create_instance CreateInstance}.
334
487
  # @!attribute [rw] parent
335
488
  # @return [::String]
@@ -553,6 +706,31 @@ module Google
553
706
  include ::Google::Protobuf::MessageExts
554
707
  extend ::Google::Protobuf::MessageExts::ClassMethods
555
708
  end
709
+
710
+ # TlsCertificate Resource
711
+ # @!attribute [rw] serial_number
712
+ # @return [::String]
713
+ # Serial number, as extracted from the certificate.
714
+ # @!attribute [rw] cert
715
+ # @return [::String]
716
+ # PEM representation.
717
+ # @!attribute [r] create_time
718
+ # @return [::Google::Protobuf::Timestamp]
719
+ # Output only. The time when the certificate was created in [RFC
720
+ # 3339](https://tools.ietf.org/html/rfc3339) format, for example
721
+ # `2020-05-18T00:00:00.094Z`.
722
+ # @!attribute [r] expire_time
723
+ # @return [::Google::Protobuf::Timestamp]
724
+ # Output only. The time when the certificate expires in [RFC
725
+ # 3339](https://tools.ietf.org/html/rfc3339) format, for example
726
+ # `2020-05-18T00:00:00.094Z`.
727
+ # @!attribute [rw] sha1_fingerprint
728
+ # @return [::String]
729
+ # Sha1 Fingerprint of the certificate.
730
+ class TlsCertificate
731
+ include ::Google::Protobuf::MessageExts
732
+ extend ::Google::Protobuf::MessageExts::ClassMethods
733
+ end
556
734
  end
557
735
  end
558
736
  end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Type
22
+ # Represents a day of the week.
23
+ module DayOfWeek
24
+ # The day of the week is unspecified.
25
+ DAY_OF_WEEK_UNSPECIFIED = 0
26
+
27
+ # Monday
28
+ MONDAY = 1
29
+
30
+ # Tuesday
31
+ TUESDAY = 2
32
+
33
+ # Wednesday
34
+ WEDNESDAY = 3
35
+
36
+ # Thursday
37
+ THURSDAY = 4
38
+
39
+ # Friday
40
+ FRIDAY = 5
41
+
42
+ # Saturday
43
+ SATURDAY = 6
44
+
45
+ # Sunday
46
+ SUNDAY = 7
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Type
22
+ # Represents a time of day. The date and time zone are either not significant
23
+ # or are specified elsewhere. An API may choose to allow leap seconds. Related
24
+ # types are [google.type.Date][google.type.Date] and
25
+ # `google.protobuf.Timestamp`.
26
+ # @!attribute [rw] hours
27
+ # @return [::Integer]
28
+ # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose
29
+ # to allow the value "24:00:00" for scenarios like business closing time.
30
+ # @!attribute [rw] minutes
31
+ # @return [::Integer]
32
+ # Minutes of hour of day. Must be from 0 to 59.
33
+ # @!attribute [rw] seconds
34
+ # @return [::Integer]
35
+ # Seconds of minutes of the time. Must normally be from 0 to 59. An API may
36
+ # allow the value 60 if it allows leap-seconds.
37
+ # @!attribute [rw] nanos
38
+ # @return [::Integer]
39
+ # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.
40
+ class TimeOfDay
41
+ include ::Google::Protobuf::MessageExts
42
+ extend ::Google::Protobuf::MessageExts::ClassMethods
43
+ end
44
+ end
45
+ end
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.6.1
4
+ version: 0.7.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: 2022-01-11 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -190,6 +190,8 @@ files:
190
190
  - proto_docs/google/protobuf/field_mask.rb
191
191
  - proto_docs/google/protobuf/timestamp.rb
192
192
  - proto_docs/google/rpc/status.rb
193
+ - proto_docs/google/type/dayofweek.rb
194
+ - proto_docs/google/type/timeofday.rb
193
195
  homepage: https://github.com/googleapis/google-cloud-ruby
194
196
  licenses:
195
197
  - Apache-2.0
@@ -209,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
211
  - !ruby/object:Gem::Version
210
212
  version: '0'
211
213
  requirements: []
212
- rubygems_version: 3.3.4
214
+ rubygems_version: 3.3.5
213
215
  signing_key:
214
216
  specification_version: 4
215
217
  summary: API Client library for the Google Cloud Memorystore for Redis V1 API