google-cloud-redis 0.2.3 → 0.3.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/.yardopts +2 -0
- data/AUTHENTICATION.md +199 -0
- data/README.md +1 -2
- data/lib/google/cloud/redis.rb +3 -4
- data/lib/google/cloud/redis/v1.rb +3 -4
- data/lib/google/cloud/redis/v1/cloud_redis_client.rb +117 -23
- data/lib/google/cloud/redis/v1/cloud_redis_client_config.json +5 -0
- data/lib/google/cloud/redis/v1/cloud_redis_pb.rb +14 -0
- data/lib/google/cloud/redis/v1/cloud_redis_services_pb.rb +6 -2
- data/lib/google/cloud/redis/v1/credentials.rb +1 -1
- data/lib/google/cloud/redis/v1/doc/google/cloud/redis/v1/cloud_redis.rb +33 -3
- data/lib/google/cloud/redis/v1/doc/google/longrunning/operations.rb +2 -44
- data/lib/google/cloud/redis/v1/doc/google/protobuf/any.rb +3 -2
- data/lib/google/cloud/redis/v1/doc/google/protobuf/field_mask.rb +19 -27
- data/lib/google/cloud/redis/v1/doc/google/protobuf/timestamp.rb +16 -14
- data/lib/google/cloud/redis/v1/doc/google/rpc/status.rb +18 -15
- data/lib/google/cloud/redis/v1beta1.rb +2 -3
- data/lib/google/cloud/redis/v1beta1/cloud_redis_client.rb +123 -28
- data/lib/google/cloud/redis/v1beta1/cloud_redis_client_config.json +5 -0
- data/lib/google/cloud/redis/v1beta1/cloud_redis_pb.rb +15 -0
- data/lib/google/cloud/redis/v1beta1/cloud_redis_services_pb.rb +6 -2
- data/lib/google/cloud/redis/v1beta1/credentials.rb +1 -1
- data/lib/google/cloud/redis/v1beta1/doc/google/cloud/redis/v1beta1/cloud_redis.rb +79 -25
- data/lib/google/cloud/redis/v1beta1/doc/google/longrunning/operations.rb +2 -44
- data/lib/google/cloud/redis/v1beta1/doc/google/protobuf/any.rb +3 -2
- data/lib/google/cloud/redis/v1beta1/doc/google/protobuf/field_mask.rb +19 -27
- data/lib/google/cloud/redis/v1beta1/doc/google/protobuf/timestamp.rb +16 -14
- data/lib/google/cloud/redis/v1beta1/doc/google/rpc/status.rb +18 -15
- metadata +26 -6
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -88,28 +88,17 @@ module Google
|
|
88
88
|
self::GRPC_INTERCEPTORS = CloudRedisClient::GRPC_INTERCEPTORS
|
89
89
|
end
|
90
90
|
|
91
|
-
LOCATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
92
|
-
"projects/{project}/locations/{location}"
|
93
|
-
)
|
94
|
-
|
95
|
-
private_constant :LOCATION_PATH_TEMPLATE
|
96
|
-
|
97
91
|
INSTANCE_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
98
92
|
"projects/{project}/locations/{location}/instances/{instance}"
|
99
93
|
)
|
100
94
|
|
101
95
|
private_constant :INSTANCE_PATH_TEMPLATE
|
102
96
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
LOCATION_PATH_TEMPLATE.render(
|
109
|
-
:"project" => project,
|
110
|
-
:"location" => location
|
111
|
-
)
|
112
|
-
end
|
97
|
+
LOCATION_PATH_TEMPLATE = Google::Gax::PathTemplate.new(
|
98
|
+
"projects/{project}/locations/{location}"
|
99
|
+
)
|
100
|
+
|
101
|
+
private_constant :LOCATION_PATH_TEMPLATE
|
113
102
|
|
114
103
|
# Returns a fully-qualified instance resource name string.
|
115
104
|
# @param project [String]
|
@@ -124,6 +113,17 @@ module Google
|
|
124
113
|
)
|
125
114
|
end
|
126
115
|
|
116
|
+
# Returns a fully-qualified location resource name string.
|
117
|
+
# @param project [String]
|
118
|
+
# @param location [String]
|
119
|
+
# @return [String]
|
120
|
+
def self.location_path project, location
|
121
|
+
LOCATION_PATH_TEMPLATE.render(
|
122
|
+
:"project" => project,
|
123
|
+
:"location" => location
|
124
|
+
)
|
125
|
+
end
|
126
|
+
|
127
127
|
# @param credentials [Google::Auth::Credentials, String, Hash, GRPC::Core::Channel, GRPC::Core::ChannelCredentials, Proc]
|
128
128
|
# Provides the means for authenticating requests made by the client. This parameter can
|
129
129
|
# be many types.
|
@@ -239,27 +239,50 @@ module Google
|
|
239
239
|
@list_instances = Google::Gax.create_api_call(
|
240
240
|
@cloud_redis_stub.method(:list_instances),
|
241
241
|
defaults["list_instances"],
|
242
|
-
exception_transformer: exception_transformer
|
242
|
+
exception_transformer: exception_transformer,
|
243
|
+
params_extractor: proc do |request|
|
244
|
+
{'parent' => request.parent}
|
245
|
+
end
|
243
246
|
)
|
244
247
|
@get_instance = Google::Gax.create_api_call(
|
245
248
|
@cloud_redis_stub.method(:get_instance),
|
246
249
|
defaults["get_instance"],
|
247
|
-
exception_transformer: exception_transformer
|
250
|
+
exception_transformer: exception_transformer,
|
251
|
+
params_extractor: proc do |request|
|
252
|
+
{'name' => request.name}
|
253
|
+
end
|
248
254
|
)
|
249
255
|
@create_instance = Google::Gax.create_api_call(
|
250
256
|
@cloud_redis_stub.method(:create_instance),
|
251
257
|
defaults["create_instance"],
|
252
|
-
exception_transformer: exception_transformer
|
258
|
+
exception_transformer: exception_transformer,
|
259
|
+
params_extractor: proc do |request|
|
260
|
+
{'parent' => request.parent}
|
261
|
+
end
|
253
262
|
)
|
254
263
|
@update_instance = Google::Gax.create_api_call(
|
255
264
|
@cloud_redis_stub.method(:update_instance),
|
256
265
|
defaults["update_instance"],
|
257
|
-
exception_transformer: exception_transformer
|
266
|
+
exception_transformer: exception_transformer,
|
267
|
+
params_extractor: proc do |request|
|
268
|
+
{'instance.name' => request.instance.name}
|
269
|
+
end
|
258
270
|
)
|
259
271
|
@delete_instance = Google::Gax.create_api_call(
|
260
272
|
@cloud_redis_stub.method(:delete_instance),
|
261
273
|
defaults["delete_instance"],
|
262
|
-
exception_transformer: exception_transformer
|
274
|
+
exception_transformer: exception_transformer,
|
275
|
+
params_extractor: proc do |request|
|
276
|
+
{'name' => request.name}
|
277
|
+
end
|
278
|
+
)
|
279
|
+
@failover_instance = Google::Gax.create_api_call(
|
280
|
+
@cloud_redis_stub.method(:failover_instance),
|
281
|
+
defaults["failover_instance"],
|
282
|
+
exception_transformer: exception_transformer,
|
283
|
+
params_extractor: proc do |request|
|
284
|
+
{'name' => request.name}
|
285
|
+
end
|
263
286
|
)
|
264
287
|
end
|
265
288
|
|
@@ -362,7 +385,7 @@ module Google
|
|
362
385
|
|
363
386
|
# Creates a Redis instance based on the specified tier and memory size.
|
364
387
|
#
|
365
|
-
# By default, the instance is
|
388
|
+
# By default, the instance is accessible from the project's
|
366
389
|
# [default network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks).
|
367
390
|
#
|
368
391
|
# The creation is executed asynchronously and callers may check the returned
|
@@ -463,11 +486,12 @@ module Google
|
|
463
486
|
# @param update_mask [Google::Protobuf::FieldMask | Hash]
|
464
487
|
# Required. Mask of fields to update. At least one path must be supplied in
|
465
488
|
# this field. The elements of the repeated paths field may only include these
|
466
|
-
# fields from {
|
467
|
-
#
|
468
|
-
# * `
|
469
|
-
#
|
470
|
-
# * `
|
489
|
+
# fields from {Google::Cloud::Redis::V1beta1::Instance Instance}:
|
490
|
+
#
|
491
|
+
# * `displayName`
|
492
|
+
# * `labels`
|
493
|
+
# * `memorySizeGb`
|
494
|
+
# * `redisConfig`
|
471
495
|
# A hash of the same form as `Google::Protobuf::FieldMask`
|
472
496
|
# can also be provided.
|
473
497
|
# @param instance [Google::Cloud::Redis::V1beta1::Instance | Hash]
|
@@ -601,6 +625,77 @@ module Google
|
|
601
625
|
operation.on_done { |operation| yield(operation) } if block_given?
|
602
626
|
operation
|
603
627
|
end
|
628
|
+
|
629
|
+
# Failover the master role to current replica node against a specific
|
630
|
+
# STANDARD tier redis instance.
|
631
|
+
#
|
632
|
+
# @param name [String]
|
633
|
+
# Required. Redis instance resource name using the form:
|
634
|
+
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
635
|
+
# where `location_id` refers to a GCP region
|
636
|
+
# @param data_protection_mode [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
|
637
|
+
# Optional. Available data protection modes that the user can choose. If it's
|
638
|
+
# unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
|
639
|
+
# @param options [Google::Gax::CallOptions]
|
640
|
+
# Overrides the default settings for this call, e.g, timeout,
|
641
|
+
# retries, etc.
|
642
|
+
# @return [Google::Gax::Operation]
|
643
|
+
# @raise [Google::Gax::GaxError] if the RPC is aborted.
|
644
|
+
# @example
|
645
|
+
# require "google/cloud/redis"
|
646
|
+
#
|
647
|
+
# cloud_redis_client = Google::Cloud::Redis.new(version: :v1beta1)
|
648
|
+
# formatted_name = Google::Cloud::Redis::V1beta1::CloudRedisClient.instance_path("[PROJECT]", "[LOCATION]", "[INSTANCE]")
|
649
|
+
#
|
650
|
+
# # TODO: Initialize `data_protection_mode`:
|
651
|
+
# data_protection_mode = :DATA_PROTECTION_MODE_UNSPECIFIED
|
652
|
+
#
|
653
|
+
# # Register a callback during the method call.
|
654
|
+
# operation = cloud_redis_client.failover_instance(formatted_name, data_protection_mode) do |op|
|
655
|
+
# raise op.results.message if op.error?
|
656
|
+
# op_results = op.results
|
657
|
+
# # Process the results.
|
658
|
+
#
|
659
|
+
# metadata = op.metadata
|
660
|
+
# # Process the metadata.
|
661
|
+
# end
|
662
|
+
#
|
663
|
+
# # Or use the return value to register a callback.
|
664
|
+
# operation.on_done do |op|
|
665
|
+
# raise op.results.message if op.error?
|
666
|
+
# op_results = op.results
|
667
|
+
# # Process the results.
|
668
|
+
#
|
669
|
+
# metadata = op.metadata
|
670
|
+
# # Process the metadata.
|
671
|
+
# end
|
672
|
+
#
|
673
|
+
# # Manually reload the operation.
|
674
|
+
# operation.reload!
|
675
|
+
#
|
676
|
+
# # Or block until the operation completes, triggering callbacks on
|
677
|
+
# # completion.
|
678
|
+
# operation.wait_until_done!
|
679
|
+
|
680
|
+
def failover_instance \
|
681
|
+
name,
|
682
|
+
data_protection_mode,
|
683
|
+
options: nil
|
684
|
+
req = {
|
685
|
+
name: name,
|
686
|
+
data_protection_mode: data_protection_mode
|
687
|
+
}.delete_if { |_, v| v.nil? }
|
688
|
+
req = Google::Gax::to_proto(req, Google::Cloud::Redis::V1beta1::FailoverInstanceRequest)
|
689
|
+
operation = Google::Gax::Operation.new(
|
690
|
+
@failover_instance.call(req, options),
|
691
|
+
@operations_client,
|
692
|
+
Google::Cloud::Redis::V1beta1::Instance,
|
693
|
+
Google::Protobuf::Any,
|
694
|
+
call_options: options
|
695
|
+
)
|
696
|
+
operation.on_done { |operation| yield(operation) } if block_given?
|
697
|
+
operation
|
698
|
+
end
|
604
699
|
end
|
605
700
|
end
|
606
701
|
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'google/protobuf'
|
6
6
|
|
7
7
|
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/resource_pb'
|
8
9
|
require 'google/longrunning/operations_pb'
|
9
10
|
require 'google/protobuf/field_mask_pb'
|
10
11
|
require 'google/protobuf/timestamp_pb'
|
@@ -36,6 +37,8 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
36
37
|
value :DELETING, 4
|
37
38
|
value :REPAIRING, 5
|
38
39
|
value :MAINTENANCE, 6
|
40
|
+
value :IMPORTING, 8
|
41
|
+
value :FAILING_OVER, 10
|
39
42
|
end
|
40
43
|
add_enum "google.cloud.redis.v1beta1.Instance.Tier" do
|
41
44
|
value :TIER_UNSPECIFIED, 0
|
@@ -50,6 +53,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
50
53
|
add_message "google.cloud.redis.v1beta1.ListInstancesResponse" do
|
51
54
|
repeated :instances, :message, 1, "google.cloud.redis.v1beta1.Instance"
|
52
55
|
optional :next_page_token, :string, 2
|
56
|
+
repeated :unreachable, :string, 3
|
53
57
|
end
|
54
58
|
add_message "google.cloud.redis.v1beta1.GetInstanceRequest" do
|
55
59
|
optional :name, :string, 1
|
@@ -66,6 +70,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
66
70
|
add_message "google.cloud.redis.v1beta1.DeleteInstanceRequest" do
|
67
71
|
optional :name, :string, 1
|
68
72
|
end
|
73
|
+
add_message "google.cloud.redis.v1beta1.FailoverInstanceRequest" do
|
74
|
+
optional :name, :string, 1
|
75
|
+
optional :data_protection_mode, :enum, 2, "google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode"
|
76
|
+
end
|
77
|
+
add_enum "google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode" do
|
78
|
+
value :DATA_PROTECTION_MODE_UNSPECIFIED, 0
|
79
|
+
value :LIMITED_DATA_LOSS, 1
|
80
|
+
value :FORCE_DATA_LOSS, 2
|
81
|
+
end
|
69
82
|
add_message "google.cloud.redis.v1beta1.LocationMetadata" do
|
70
83
|
map :available_zones, :string, :message, 1, "google.cloud.redis.v1beta1.ZoneMetadata"
|
71
84
|
end
|
@@ -86,6 +99,8 @@ module Google
|
|
86
99
|
CreateInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.CreateInstanceRequest").msgclass
|
87
100
|
UpdateInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.UpdateInstanceRequest").msgclass
|
88
101
|
DeleteInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.DeleteInstanceRequest").msgclass
|
102
|
+
FailoverInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.FailoverInstanceRequest").msgclass
|
103
|
+
FailoverInstanceRequest::DataProtectionMode = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode").enummodule
|
89
104
|
LocationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.LocationMetadata").msgclass
|
90
105
|
ZoneMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.ZoneMetadata").msgclass
|
91
106
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# Source: google/cloud/redis/v1beta1/cloud_redis.proto for package 'google.cloud.redis.v1beta1'
|
3
3
|
# Original file comments:
|
4
|
-
# Copyright
|
4
|
+
# Copyright 2019 Google LLC.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -15,6 +15,7 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
|
+
#
|
18
19
|
|
19
20
|
|
20
21
|
require 'grpc'
|
@@ -61,7 +62,7 @@ module Google
|
|
61
62
|
rpc :GetInstance, GetInstanceRequest, Instance
|
62
63
|
# Creates a Redis instance based on the specified tier and memory size.
|
63
64
|
#
|
64
|
-
# By default, the instance is
|
65
|
+
# By default, the instance is accessible from the project's
|
65
66
|
# [default network](/compute/docs/networks-and-firewalls#networks).
|
66
67
|
#
|
67
68
|
# The creation is executed asynchronously and callers may check the returned
|
@@ -78,6 +79,9 @@ module Google
|
|
78
79
|
# in the response field. The returned operation is automatically deleted
|
79
80
|
# after a few hours, so there is no need to call DeleteOperation.
|
80
81
|
rpc :UpdateInstance, UpdateInstanceRequest, Google::Longrunning::Operation
|
82
|
+
# Failover the master role to current replica node against a specific
|
83
|
+
# STANDARD tier redis instance.
|
84
|
+
rpc :FailoverInstance, FailoverInstanceRequest, Google::Longrunning::Operation
|
81
85
|
# Deletes a specific Redis instance. Instance stops serving and data is
|
82
86
|
# deleted.
|
83
87
|
rpc :DeleteInstance, DeleteInstanceRequest, Google::Longrunning::Operation
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright
|
1
|
+
# Copyright 2019 Google LLC
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
26
26
|
#
|
27
27
|
# Note: Redis instances are managed and addressed at regional level so
|
28
|
-
# location_id here refers to a GCP region; however, users
|
28
|
+
# location_id here refers to a GCP region; however, users may choose which
|
29
29
|
# specific zone (or collection of zones for cross-zone instances) an instance
|
30
30
|
# should be provisioned in. Refer to [location_id] and
|
31
31
|
# [alternative_location_id] fields for more details.
|
@@ -40,7 +40,7 @@ module Google
|
|
40
40
|
# Optional. The zone where the instance will be provisioned. If not provided,
|
41
41
|
# the service will choose a zone for the instance. For STANDARD_HA tier,
|
42
42
|
# instances will be created across two zones for protection against zonal
|
43
|
-
# failures.
|
43
|
+
# failures. If [alternative_location_id] is also provided, it must be
|
44
44
|
# different from [location_id].
|
45
45
|
# @!attribute [rw] alternative_location_id
|
46
46
|
# @return [String]
|
@@ -50,27 +50,32 @@ module Google
|
|
50
50
|
# @!attribute [rw] redis_version
|
51
51
|
# @return [String]
|
52
52
|
# Optional. The version of Redis software.
|
53
|
-
# If not provided, latest supported version will be used.
|
53
|
+
# If not provided, latest supported version will be used. Updating the
|
54
|
+
# version will perform an upgrade/downgrade to the new version. Currently,
|
55
|
+
# the supported values are:
|
56
|
+
#
|
57
|
+
# * `REDIS_4_0` for Redis 4.0 compatibility
|
58
|
+
# * `REDIS_3_2` for Redis 3.2 compatibility (default)
|
54
59
|
# @!attribute [rw] reserved_ip_range
|
55
60
|
# @return [String]
|
56
61
|
# Optional. The CIDR range of internal addresses that are reserved for this
|
57
62
|
# instance. If not provided, the service will choose an unused /29 block,
|
58
63
|
# for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
|
59
|
-
# and non-overlapping with existing subnets in
|
64
|
+
# and non-overlapping with existing subnets in an authorized network.
|
60
65
|
# @!attribute [rw] host
|
61
66
|
# @return [String]
|
62
|
-
# Output only. Hostname or IP address of the exposed
|
67
|
+
# Output only. Hostname or IP address of the exposed Redis endpoint used by
|
63
68
|
# clients to connect to the service.
|
64
69
|
# @!attribute [rw] port
|
65
70
|
# @return [Integer]
|
66
|
-
# Output only. The port number of the exposed
|
71
|
+
# Output only. The port number of the exposed Redis endpoint.
|
67
72
|
# @!attribute [rw] current_location_id
|
68
73
|
# @return [String]
|
69
|
-
# Output only. The current zone where the Redis endpoint is placed.
|
70
|
-
#
|
71
|
-
# provided by the user at creation time.
|
72
|
-
#
|
73
|
-
#
|
74
|
+
# Output only. The current zone where the Redis endpoint is placed. For Basic
|
75
|
+
# Tier instances, this will always be the same as the [location_id]
|
76
|
+
# provided by the user at creation time. For Standard Tier instances,
|
77
|
+
# this can be either [location_id] or [alternative_location_id] and can
|
78
|
+
# change after a failover event.
|
74
79
|
# @!attribute [rw] create_time
|
75
80
|
# @return [Google::Protobuf::Timestamp]
|
76
81
|
# Output only. The time the instance was created.
|
@@ -86,14 +91,23 @@ module Google
|
|
86
91
|
# Optional. Redis configuration parameters, according to
|
87
92
|
# http://redis.io/topics/config. Currently, the only supported parameters
|
88
93
|
# are:
|
94
|
+
#
|
95
|
+
# Redis 3.2 and above:
|
96
|
+
#
|
89
97
|
# * maxmemory-policy
|
90
98
|
# * notify-keyspace-events
|
99
|
+
#
|
100
|
+
# Redis 4.0 and above:
|
101
|
+
#
|
102
|
+
# * activedefrag
|
103
|
+
# * lfu-log-factor
|
104
|
+
# * lfu-decay-time
|
91
105
|
# @!attribute [rw] tier
|
92
106
|
# @return [Google::Cloud::Redis::V1beta1::Instance::Tier]
|
93
107
|
# Required. The service tier of the instance.
|
94
108
|
# @!attribute [rw] memory_size_gb
|
95
109
|
# @return [Integer]
|
96
|
-
# Required. Redis memory size in
|
110
|
+
# Required. Redis memory size in GiB.
|
97
111
|
# @!attribute [rw] authorized_network
|
98
112
|
# @return [String]
|
99
113
|
# Optional. The full name of the Google Compute Engine
|
@@ -120,12 +134,17 @@ module Google
|
|
120
134
|
# Redis instance is being deleted.
|
121
135
|
DELETING = 4
|
122
136
|
|
123
|
-
# Redis instance is being repaired and may be unusable.
|
124
|
-
# found in the `status_message` field.
|
137
|
+
# Redis instance is being repaired and may be unusable.
|
125
138
|
REPAIRING = 5
|
126
139
|
|
127
140
|
# Maintenance is being performed on this Redis instance.
|
128
141
|
MAINTENANCE = 6
|
142
|
+
|
143
|
+
# Redis instance is importing data (availability may be affected).
|
144
|
+
IMPORTING = 8
|
145
|
+
|
146
|
+
# Redis instance is failing over (availability may be affected).
|
147
|
+
FAILING_OVER = 10
|
129
148
|
end
|
130
149
|
|
131
150
|
# Available service tiers to choose from
|
@@ -141,7 +160,8 @@ module Google
|
|
141
160
|
end
|
142
161
|
end
|
143
162
|
|
144
|
-
# Request for
|
163
|
+
# Request for
|
164
|
+
# {Google::Cloud::Redis::V1beta1::CloudRedis::ListInstances ListInstances}.
|
145
165
|
# @!attribute [rw] parent
|
146
166
|
# @return [String]
|
147
167
|
# Required. The resource name of the instance location using the form:
|
@@ -162,7 +182,8 @@ module Google
|
|
162
182
|
# if any.
|
163
183
|
class ListInstancesRequest; end
|
164
184
|
|
165
|
-
# Response for
|
185
|
+
# Response for
|
186
|
+
# {Google::Cloud::Redis::V1beta1::CloudRedis::ListInstances ListInstances}.
|
166
187
|
# @!attribute [rw] instances
|
167
188
|
# @return [Array<Google::Cloud::Redis::V1beta1::Instance>]
|
168
189
|
# A list of Redis instances in the project in the specified location,
|
@@ -179,6 +200,9 @@ module Google
|
|
179
200
|
# @return [String]
|
180
201
|
# Token to retrieve the next page of results, or empty if there are no more
|
181
202
|
# results in the list.
|
203
|
+
# @!attribute [rw] unreachable
|
204
|
+
# @return [Array<String>]
|
205
|
+
# Locations that could not be reached.
|
182
206
|
class ListInstancesResponse; end
|
183
207
|
|
184
208
|
# Request for {Google::Cloud::Redis::V1beta1::CloudRedis::GetInstance GetInstance}.
|
@@ -189,7 +213,8 @@ module Google
|
|
189
213
|
# where `location_id` refers to a GCP region
|
190
214
|
class GetInstanceRequest; end
|
191
215
|
|
192
|
-
# Request for
|
216
|
+
# Request for
|
217
|
+
# {Google::Cloud::Redis::V1beta1::CloudRedis::CreateInstance CreateInstance}.
|
193
218
|
# @!attribute [rw] parent
|
194
219
|
# @return [String]
|
195
220
|
# Required. The resource name of the instance location using the form:
|
@@ -210,23 +235,26 @@ module Google
|
|
210
235
|
# Required. A Redis [Instance] resource
|
211
236
|
class CreateInstanceRequest; end
|
212
237
|
|
213
|
-
# Request for
|
238
|
+
# Request for
|
239
|
+
# {Google::Cloud::Redis::V1beta1::CloudRedis::UpdateInstance UpdateInstance}.
|
214
240
|
# @!attribute [rw] update_mask
|
215
241
|
# @return [Google::Protobuf::FieldMask]
|
216
242
|
# Required. Mask of fields to update. At least one path must be supplied in
|
217
243
|
# this field. The elements of the repeated paths field may only include these
|
218
|
-
# fields from {
|
219
|
-
#
|
220
|
-
# * `
|
221
|
-
#
|
222
|
-
# * `
|
244
|
+
# fields from {Google::Cloud::Redis::V1beta1::Instance Instance}:
|
245
|
+
#
|
246
|
+
# * `displayName`
|
247
|
+
# * `labels`
|
248
|
+
# * `memorySizeGb`
|
249
|
+
# * `redisConfig`
|
223
250
|
# @!attribute [rw] instance
|
224
251
|
# @return [Google::Cloud::Redis::V1beta1::Instance]
|
225
252
|
# Required. Update description.
|
226
253
|
# Only fields specified in update_mask are updated.
|
227
254
|
class UpdateInstanceRequest; end
|
228
255
|
|
229
|
-
# Request for
|
256
|
+
# Request for
|
257
|
+
# {Google::Cloud::Redis::V1beta1::CloudRedis::DeleteInstance DeleteInstance}.
|
230
258
|
# @!attribute [rw] name
|
231
259
|
# @return [String]
|
232
260
|
# Required. Redis instance resource name using the form:
|
@@ -234,6 +262,32 @@ module Google
|
|
234
262
|
# where `location_id` refers to a GCP region
|
235
263
|
class DeleteInstanceRequest; end
|
236
264
|
|
265
|
+
# Request for
|
266
|
+
# {Google::Cloud::Redis::V1beta1::CloudRedis::FailoverInstance Failover}.
|
267
|
+
# @!attribute [rw] name
|
268
|
+
# @return [String]
|
269
|
+
# Required. Redis instance resource name using the form:
|
270
|
+
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
271
|
+
# where `location_id` refers to a GCP region
|
272
|
+
# @!attribute [rw] data_protection_mode
|
273
|
+
# @return [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
|
274
|
+
# Optional. Available data protection modes that the user can choose. If it's
|
275
|
+
# unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
|
276
|
+
class FailoverInstanceRequest
|
277
|
+
module DataProtectionMode
|
278
|
+
DATA_PROTECTION_MODE_UNSPECIFIED = 0
|
279
|
+
|
280
|
+
# Instance failover will be protected with data loss control. More
|
281
|
+
# specifically, the failover will only be performed if the current
|
282
|
+
# replication offset diff between master and replica is under a certain
|
283
|
+
# threshold.
|
284
|
+
LIMITED_DATA_LOSS = 1
|
285
|
+
|
286
|
+
# Instance failover will be performed without data loss control.
|
287
|
+
FORCE_DATA_LOSS = 2
|
288
|
+
end
|
289
|
+
end
|
290
|
+
|
237
291
|
# This location metadata represents additional configuration options for a
|
238
292
|
# given location where a Redis instance may be created. All fields are output
|
239
293
|
# only. It is returned as content of the
|