22
22
__protobuf__ = proto .module (
23
23
package = "google.cloud.redis.v1" ,
24
24
manifest = {
25
+ "NodeInfo" ,
25
26
"Instance" ,
26
27
"ListInstancesRequest" ,
27
28
"ListInstancesResponse" ,
44
45
)
45
46
46
47
48
+ class NodeInfo (proto .Message ):
49
+ r"""Node specific properties.
50
+
51
+ Attributes:
52
+ id (str):
53
+ Output only. Node identifying string. e.g.
54
+ 'node-0', 'node-1'
55
+ zone (str):
56
+ Output only. Location of the node.
57
+ """
58
+
59
+ id = proto .Field (proto .STRING , number = 1 ,)
60
+ zone = proto .Field (proto .STRING , number = 2 ,)
61
+
62
+
47
63
class Instance (proto .Message ):
48
64
r"""A Google Cloud Redis instance.
49
65
@@ -69,19 +85,21 @@ class Instance(proto.Message):
69
85
Resource labels to represent user provided
70
86
metadata
71
87
location_id (str):
72
- Optional. The zone where the instance will be provisioned.
73
- If not provided, the service will choose a zone for the
74
- instance. For STANDARD_HA tier, instances will be created
75
- across two zones for protection against zonal failures. If
76
- [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id]
77
- is also provided, it must be different from
78
- [location_id][google.cloud.redis.v1.Instance.location_id].
88
+ Optional. The zone where the instance will be
89
+ provisioned. If not provided, the service will
90
+ choose a zone from the specified region for the
91
+ instance. For standard tier, additional nodes
92
+ will be added across multiple zones for
93
+ protection against zonal failures. If specified,
94
+ at least one node will be provisioned in this
95
+ zone.
79
96
alternative_location_id (str):
80
- Optional. Only applicable to STANDARD_HA tier which protects
81
- the instance against zonal failures by provisioning it
82
- across two zones. If provided, it must be a different zone
83
- from the one provided in
84
- [location_id][google.cloud.redis.v1.Instance.location_id].
97
+ Optional. If specified, at least one node will be
98
+ provisioned in this zone in addition to the zone specified
99
+ in location_id. Only applicable to standard tier. If
100
+ provided, it must be a different zone from the one provided
101
+ in [location_id]. Additional nodes beyond the first 2 will
102
+ be placed in zones selected by the service.
85
103
redis_version (str):
86
104
Optional. The version of Redis software. If not provided,
87
105
latest supported version will be used. Currently, the
@@ -90,14 +108,17 @@ class Instance(proto.Message):
90
108
- ``REDIS_3_2`` for Redis 3.2 compatibility
91
109
- ``REDIS_4_0`` for Redis 4.0 compatibility (default)
92
110
- ``REDIS_5_0`` for Redis 5.0 compatibility
111
+ - ``REDIS_6_X`` for Redis 6.x compatibility
93
112
reserved_ip_range (str):
94
- Optional. The CIDR range of internal
95
- addresses that are reserved for this instance.
96
- If not provided, the service will choose an
97
- unused /29 block, for example, 10.0.0.0/29 or
98
- 192.168.0.0/29. Ranges must be unique and non-
99
- overlapping with existing subnets in an
100
- authorized network.
113
+ Optional. For DIRECT_PEERING mode, the CIDR range of
114
+ internal addresses that are reserved for this instance.
115
+ Range must be unique and non-overlapping with existing
116
+ subnets in an authorized network. For PRIVATE_SERVICE_ACCESS
117
+ mode, the name of one allocated IP address ranges associated
118
+ with this private service access connection. If not
119
+ provided, the service will choose an unused /29 block, for
120
+ example, 10.0.0.0/29 or 192.168.0.0/29. For
121
+ READ_REPLICAS_ENABLED the default block size is /28.
101
122
host (str):
102
123
Output only. Hostname or IP address of the
103
124
exposed Redis endpoint used by clients to
@@ -106,15 +127,10 @@ class Instance(proto.Message):
106
127
Output only. The port number of the exposed
107
128
Redis endpoint.
108
129
current_location_id (str):
109
- Output only. The current zone where the Redis endpoint is
110
- placed. For Basic Tier instances, this will always be the
111
- same as the
112
- [location_id][google.cloud.redis.v1.Instance.location_id]
113
- provided by the user at creation time. For Standard Tier
114
- instances, this can be either
115
- [location_id][google.cloud.redis.v1.Instance.location_id] or
116
- [alternative_location_id][google.cloud.redis.v1.Instance.alternative_location_id]
117
- and can change after a failover event.
130
+ Output only. The current zone where the Redis primary node
131
+ is located. In basic tier, this will always be the same as
132
+ [location_id]. In standard tier, this can be the zone of any
133
+ node in the instance.
118
134
create_time (google.protobuf.timestamp_pb2.Timestamp):
119
135
Output only. The time the instance was
120
136
created.
@@ -163,6 +179,25 @@ class Instance(proto.Message):
163
179
connect_mode (google.cloud.redis_v1.types.Instance.ConnectMode):
164
180
Optional. The network connect mode of the Redis instance. If
165
181
not provided, the connect mode defaults to DIRECT_PEERING.
182
+ replica_count (int):
183
+ Optional. The number of replica nodes. Valid range for
184
+ standard tier is [1-5] and defaults to 1. Valid value for
185
+ basic tier is 0 and defaults to 0.
186
+ nodes (Sequence[google.cloud.redis_v1.types.NodeInfo]):
187
+ Output only. Info per node.
188
+ read_endpoint (str):
189
+ Output only. Hostname or IP address of the
190
+ exposed readonly Redis endpoint. Standard tier
191
+ only. Targets all healthy replica nodes in
192
+ instance. Replication is asynchronous and
193
+ replica nodes will exhibit some lag behind the
194
+ primary. Write requests must target 'host'.
195
+ read_endpoint_port (int):
196
+ Output only. The port number of the exposed
197
+ readonly redis endpoint. Standard tier only.
198
+ Write requests should target 'port'.
199
+ read_replicas_mode (google.cloud.redis_v1.types.Instance.ReadReplicasMode):
200
+ Optional. Read replica mode.
166
201
"""
167
202
168
203
class State (proto .Enum ):
@@ -189,6 +224,12 @@ class ConnectMode(proto.Enum):
189
224
DIRECT_PEERING = 1
190
225
PRIVATE_SERVICE_ACCESS = 2
191
226
227
+ class ReadReplicasMode (proto .Enum ):
228
+ r"""Read replicas mode."""
229
+ READ_REPLICAS_MODE_UNSPECIFIED = 0
230
+ READ_REPLICAS_DISABLED = 1
231
+ READ_REPLICAS_ENABLED = 2
232
+
192
233
name = proto .Field (proto .STRING , number = 1 ,)
193
234
display_name = proto .Field (proto .STRING , number = 2 ,)
194
235
labels = proto .MapField (proto .STRING , proto .STRING , number = 3 ,)
@@ -210,6 +251,11 @@ class ConnectMode(proto.Enum):
210
251
authorized_network = proto .Field (proto .STRING , number = 20 ,)
211
252
persistence_iam_identity = proto .Field (proto .STRING , number = 21 ,)
212
253
connect_mode = proto .Field (proto .ENUM , number = 22 , enum = ConnectMode ,)
254
+ replica_count = proto .Field (proto .INT32 , number = 31 ,)
255
+ nodes = proto .RepeatedField (proto .MESSAGE , number = 32 , message = "NodeInfo" ,)
256
+ read_endpoint = proto .Field (proto .STRING , number = 33 ,)
257
+ read_endpoint_port = proto .Field (proto .INT32 , number = 34 ,)
258
+ read_replicas_mode = proto .Field (proto .ENUM , number = 35 , enum = ReadReplicasMode ,)
213
259
214
260
215
261
class ListInstancesRequest (proto .Message ):
@@ -253,9 +299,9 @@ class ListInstancesResponse(proto.Message):
253
299
If the ``location_id`` in the parent field of the request is
254
300
"-", all regions available to the project are queried, and
255
301
the results aggregated. If in such an aggregated query a
256
- location is unavailable, a dummy Redis entry is included in
257
- the response with the ``name`` field set to a value of the
258
- form
302
+ location is unavailable, a placeholder Redis entry is
303
+ included in the response with the ``name`` field set to a
304
+ value of the form
259
305
``projects/{project_id}/locations/{location_id}/instances/``-
260
306
and the ``status`` field set to ERROR and ``status_message``
261
307
field set to "location not available for ListInstances".
@@ -333,6 +379,7 @@ class UpdateInstanceRequest(proto.Message):
333
379
- ``labels``
334
380
- ``memorySizeGb``
335
381
- ``redisConfig``
382
+ - ``replica_count``
336
383
instance (google.cloud.redis_v1.types.Instance):
337
384
Required. Update description. Only fields specified in
338
385
update_mask are updated.
0 commit comments