google-cloud-redis-v1beta1 0.1.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.
@@ -0,0 +1,477 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 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 Cloud
22
+ module Redis
23
+ module V1beta1
24
+ # A Google Cloud Redis instance.
25
+ # @!attribute [rw] name
26
+ # @return [String]
27
+ # Required. Unique name of the resource in this scope including project and
28
+ # location using the form:
29
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
30
+ #
31
+ # Note: Redis instances are managed and addressed at regional level so
32
+ # location_id here refers to a GCP region; however, users may choose which
33
+ # specific zone (or collection of zones for cross-zone instances) an instance
34
+ # should be provisioned in. Refer to {Google::Cloud::Redis::V1beta1::Instance#location_id location_id} and
35
+ # {Google::Cloud::Redis::V1beta1::Instance#alternative_location_id alternative_location_id} fields for more details.
36
+ # @!attribute [rw] display_name
37
+ # @return [String]
38
+ # An arbitrary and optional user-provided name for the instance.
39
+ # @!attribute [rw] labels
40
+ # @return [Google::Protobuf::Map{String => String}]
41
+ # Resource labels to represent user provided metadata
42
+ # @!attribute [rw] location_id
43
+ # @return [String]
44
+ # Optional. The zone where the instance will be provisioned. If not provided,
45
+ # the service will choose a zone for the instance. For STANDARD_HA tier,
46
+ # instances will be created across two zones for protection against zonal
47
+ # failures. If {Google::Cloud::Redis::V1beta1::Instance#alternative_location_id alternative_location_id} is also provided, it must be
48
+ # different from {Google::Cloud::Redis::V1beta1::Instance#location_id location_id}.
49
+ # @!attribute [rw] alternative_location_id
50
+ # @return [String]
51
+ # Optional. Only applicable to STANDARD_HA tier which protects the instance
52
+ # against zonal failures by provisioning it across two zones. If provided, it
53
+ # must be a different zone from the one provided in {Google::Cloud::Redis::V1beta1::Instance#location_id location_id}.
54
+ # @!attribute [rw] redis_version
55
+ # @return [String]
56
+ # Optional. The version of Redis software.
57
+ # If not provided, latest supported version will be used. Currently, the
58
+ # supported values are:
59
+ #
60
+ # * `REDIS_3_2` for Redis 3.2 compatibility
61
+ # * `REDIS_4_0` for Redis 4.0 compatibility (default)
62
+ # * `REDIS_5_0` for Redis 5.0 compatibility
63
+ # @!attribute [rw] reserved_ip_range
64
+ # @return [String]
65
+ # Optional. The CIDR range of internal addresses that are reserved for this
66
+ # instance. If not provided, the service will choose an unused /29 block,
67
+ # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
68
+ # and non-overlapping with existing subnets in an authorized network.
69
+ # @!attribute [r] host
70
+ # @return [String]
71
+ # Output only. Hostname or IP address of the exposed Redis endpoint used by
72
+ # clients to connect to the service.
73
+ # @!attribute [r] port
74
+ # @return [Integer]
75
+ # Output only. The port number of the exposed Redis endpoint.
76
+ # @!attribute [r] current_location_id
77
+ # @return [String]
78
+ # Output only. The current zone where the Redis endpoint is placed. For Basic
79
+ # Tier instances, this will always be the same as the {Google::Cloud::Redis::V1beta1::Instance#location_id location_id}
80
+ # provided by the user at creation time. For Standard Tier instances,
81
+ # this can be either {Google::Cloud::Redis::V1beta1::Instance#location_id location_id} or {Google::Cloud::Redis::V1beta1::Instance#alternative_location_id alternative_location_id} and can
82
+ # change after a failover event.
83
+ # @!attribute [r] create_time
84
+ # @return [Google::Protobuf::Timestamp]
85
+ # Output only. The time the instance was created.
86
+ # @!attribute [r] state
87
+ # @return [Google::Cloud::Redis::V1beta1::Instance::State]
88
+ # Output only. The current state of this instance.
89
+ # @!attribute [r] status_message
90
+ # @return [String]
91
+ # Output only. Additional information about the current status of this
92
+ # instance, if available.
93
+ # @!attribute [rw] redis_configs
94
+ # @return [Google::Protobuf::Map{String => String}]
95
+ # Optional. Redis configuration parameters, according to
96
+ # http://redis.io/topics/config. Currently, the only supported parameters
97
+ # are:
98
+ #
99
+ # Redis version 3.2 and newer:
100
+ #
101
+ # * maxmemory-policy
102
+ # * notify-keyspace-events
103
+ #
104
+ # Redis version 4.0 and newer:
105
+ #
106
+ # * activedefrag
107
+ # * lfu-decay-time
108
+ # * lfu-log-factor
109
+ # * maxmemory-gb
110
+ #
111
+ # Redis version 5.0 and newer:
112
+ #
113
+ # * stream-node-max-bytes
114
+ # * stream-node-max-entries
115
+ # @!attribute [rw] tier
116
+ # @return [Google::Cloud::Redis::V1beta1::Instance::Tier]
117
+ # Required. The service tier of the instance.
118
+ # @!attribute [rw] memory_size_gb
119
+ # @return [Integer]
120
+ # Required. Redis memory size in GiB.
121
+ # @!attribute [rw] authorized_network
122
+ # @return [String]
123
+ # Optional. The full name of the Google Compute Engine
124
+ # [network](/compute/docs/networks-and-firewalls#networks) to which the
125
+ # instance is connected. If left unspecified, the `default` network
126
+ # will be used.
127
+ # @!attribute [r] persistence_iam_identity
128
+ # @return [String]
129
+ # Output only. Cloud IAM identity used by import / export operations to
130
+ # transfer data to/from Cloud Storage. Format is
131
+ # "serviceAccount:<service_account_email>". The value may change over time
132
+ # for a given instance so should be checked before each import/export
133
+ # operation.
134
+ # @!attribute [rw] connect_mode
135
+ # @return [Google::Cloud::Redis::V1beta1::Instance::ConnectMode]
136
+ # Optional. The connect mode of Redis instance.
137
+ # If not provided, default one will be used.
138
+ # Current default: DIRECT_PEERING.
139
+ class Instance
140
+ include Google::Protobuf::MessageExts
141
+ extend Google::Protobuf::MessageExts::ClassMethods
142
+
143
+ # @!attribute [rw] key
144
+ # @return [String]
145
+ # @!attribute [rw] value
146
+ # @return [String]
147
+ class LabelsEntry
148
+ include Google::Protobuf::MessageExts
149
+ extend Google::Protobuf::MessageExts::ClassMethods
150
+ end
151
+
152
+ # @!attribute [rw] key
153
+ # @return [String]
154
+ # @!attribute [rw] value
155
+ # @return [String]
156
+ class RedisConfigsEntry
157
+ include Google::Protobuf::MessageExts
158
+ extend Google::Protobuf::MessageExts::ClassMethods
159
+ end
160
+
161
+ # Represents the different states of a Redis instance.
162
+ module State
163
+ # Not set.
164
+ STATE_UNSPECIFIED = 0
165
+
166
+ # Redis instance is being created.
167
+ CREATING = 1
168
+
169
+ # Redis instance has been created and is fully usable.
170
+ READY = 2
171
+
172
+ # Redis instance configuration is being updated. Certain kinds of updates
173
+ # may cause the instance to become unusable while the update is in
174
+ # progress.
175
+ UPDATING = 3
176
+
177
+ # Redis instance is being deleted.
178
+ DELETING = 4
179
+
180
+ # Redis instance is being repaired and may be unusable.
181
+ REPAIRING = 5
182
+
183
+ # Maintenance is being performed on this Redis instance.
184
+ MAINTENANCE = 6
185
+
186
+ # Redis instance is importing data (availability may be affected).
187
+ IMPORTING = 8
188
+
189
+ # Redis instance is failing over (availability may be affected).
190
+ FAILING_OVER = 10
191
+ end
192
+
193
+ # Available service tiers to choose from
194
+ module Tier
195
+ # Not set.
196
+ TIER_UNSPECIFIED = 0
197
+
198
+ # BASIC tier: standalone instance
199
+ BASIC = 1
200
+
201
+ # STANDARD_HA tier: highly available primary/replica instances
202
+ STANDARD_HA = 3
203
+ end
204
+
205
+ # Available connection modes.
206
+ module ConnectMode
207
+ # Not set.
208
+ CONNECT_MODE_UNSPECIFIED = 0
209
+
210
+ # Connect via directly peering with memorystore redis hosted service.
211
+ DIRECT_PEERING = 1
212
+
213
+ # Connect with google via private service access and share connection
214
+ # across google managed services.
215
+ PRIVATE_SERVICE_ACCESS = 2
216
+ end
217
+ end
218
+
219
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#list_instances ListInstances}.
220
+ # @!attribute [rw] parent
221
+ # @return [String]
222
+ # Required. The resource name of the instance location using the form:
223
+ # `projects/{project_id}/locations/{location_id}`
224
+ # where `location_id` refers to a GCP region.
225
+ # @!attribute [rw] page_size
226
+ # @return [Integer]
227
+ # The maximum number of items to return.
228
+ #
229
+ # If not specified, a default value of 1000 will be used by the service.
230
+ # Regardless of the page_size value, the response may include a partial list
231
+ # and a caller should only rely on response's
232
+ # {Google::Cloud::Redis::V1beta1::ListInstancesResponse#next_page_token `next_page_token`}
233
+ # to determine if there are more instances left to be queried.
234
+ # @!attribute [rw] page_token
235
+ # @return [String]
236
+ # The `next_page_token` value returned from a previous
237
+ # {Google::Cloud::Redis::V1beta1::CloudRedis::Client#list_instances ListInstances} request, if any.
238
+ class ListInstancesRequest
239
+ include Google::Protobuf::MessageExts
240
+ extend Google::Protobuf::MessageExts::ClassMethods
241
+ end
242
+
243
+ # Response for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#list_instances ListInstances}.
244
+ # @!attribute [rw] instances
245
+ # @return [Array<Google::Cloud::Redis::V1beta1::Instance>]
246
+ # A list of Redis instances in the project in the specified location,
247
+ # or across all locations.
248
+ #
249
+ # If the `location_id` in the parent field of the request is "-", all regions
250
+ # available to the project are queried, and the results aggregated.
251
+ # If in such an aggregated query a location is unavailable, a dummy Redis
252
+ # entry is included in the response with the `name` field set to a value of
253
+ # the form `projects/{project_id}/locations/{location_id}/instances/`- and
254
+ # the `status` field set to ERROR and `status_message` field set to "location
255
+ # not available for ListInstances".
256
+ # @!attribute [rw] next_page_token
257
+ # @return [String]
258
+ # Token to retrieve the next page of results, or empty if there are no more
259
+ # results in the list.
260
+ # @!attribute [rw] unreachable
261
+ # @return [Array<String>]
262
+ # Locations that could not be reached.
263
+ class ListInstancesResponse
264
+ include Google::Protobuf::MessageExts
265
+ extend Google::Protobuf::MessageExts::ClassMethods
266
+ end
267
+
268
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#get_instance GetInstance}.
269
+ # @!attribute [rw] name
270
+ # @return [String]
271
+ # Required. Redis instance resource name using the form:
272
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
273
+ # where `location_id` refers to a GCP region.
274
+ class GetInstanceRequest
275
+ include Google::Protobuf::MessageExts
276
+ extend Google::Protobuf::MessageExts::ClassMethods
277
+ end
278
+
279
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#create_instance CreateInstance}.
280
+ # @!attribute [rw] parent
281
+ # @return [String]
282
+ # Required. The resource name of the instance location using the form:
283
+ # `projects/{project_id}/locations/{location_id}`
284
+ # where `location_id` refers to a GCP region.
285
+ # @!attribute [rw] instance_id
286
+ # @return [String]
287
+ # Required. The logical name of the Redis instance in the customer project
288
+ # with the following restrictions:
289
+ #
290
+ # * Must contain only lowercase letters, numbers, and hyphens.
291
+ # * Must start with a letter.
292
+ # * Must be between 1-40 characters.
293
+ # * Must end with a number or a letter.
294
+ # * Must be unique within the customer project / location
295
+ # @!attribute [rw] instance
296
+ # @return [Google::Cloud::Redis::V1beta1::Instance]
297
+ # Required. A Redis [Instance] resource
298
+ class CreateInstanceRequest
299
+ include Google::Protobuf::MessageExts
300
+ extend Google::Protobuf::MessageExts::ClassMethods
301
+ end
302
+
303
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#update_instance UpdateInstance}.
304
+ # @!attribute [rw] update_mask
305
+ # @return [Google::Protobuf::FieldMask]
306
+ # Required. Mask of fields to update. At least one path must be supplied in
307
+ # this field. The elements of the repeated paths field may only include these
308
+ # fields from {Google::Cloud::Redis::V1beta1::Instance Instance}:
309
+ #
310
+ # * `displayName`
311
+ # * `labels`
312
+ # * `memorySizeGb`
313
+ # * `redisConfig`
314
+ # @!attribute [rw] instance
315
+ # @return [Google::Cloud::Redis::V1beta1::Instance]
316
+ # Required. Update description.
317
+ # Only fields specified in update_mask are updated.
318
+ class UpdateInstanceRequest
319
+ include Google::Protobuf::MessageExts
320
+ extend Google::Protobuf::MessageExts::ClassMethods
321
+ end
322
+
323
+ # Request for {Google::Cloud::Redis::V1beta1::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
+
337
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#delete_instance DeleteInstance}.
338
+ # @!attribute [rw] name
339
+ # @return [String]
340
+ # Required. Redis instance resource name using the form:
341
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
342
+ # where `location_id` refers to a GCP region.
343
+ class DeleteInstanceRequest
344
+ include Google::Protobuf::MessageExts
345
+ extend Google::Protobuf::MessageExts::ClassMethods
346
+ end
347
+
348
+ # The Cloud Storage location for the input content
349
+ # @!attribute [rw] uri
350
+ # @return [String]
351
+ # Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
352
+ class GcsSource
353
+ include Google::Protobuf::MessageExts
354
+ extend Google::Protobuf::MessageExts::ClassMethods
355
+ end
356
+
357
+ # The input content
358
+ # @!attribute [rw] gcs_source
359
+ # @return [Google::Cloud::Redis::V1beta1::GcsSource]
360
+ # Google Cloud Storage location where input content is located.
361
+ class InputConfig
362
+ include Google::Protobuf::MessageExts
363
+ extend Google::Protobuf::MessageExts::ClassMethods
364
+ end
365
+
366
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#import_instance Import}.
367
+ # @!attribute [rw] name
368
+ # @return [String]
369
+ # Required. Redis instance resource name using the form:
370
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
371
+ # where `location_id` refers to a GCP region.
372
+ # @!attribute [rw] input_config
373
+ # @return [Google::Cloud::Redis::V1beta1::InputConfig]
374
+ # Required. Specify data to be imported.
375
+ class ImportInstanceRequest
376
+ include Google::Protobuf::MessageExts
377
+ extend Google::Protobuf::MessageExts::ClassMethods
378
+ end
379
+
380
+ # The Cloud Storage location for the output content
381
+ # @!attribute [rw] uri
382
+ # @return [String]
383
+ # Required. Data destination URI (e.g.
384
+ # 'gs://my_bucket/my_object'). Existing files will be overwritten.
385
+ class GcsDestination
386
+ include Google::Protobuf::MessageExts
387
+ extend Google::Protobuf::MessageExts::ClassMethods
388
+ end
389
+
390
+ # The output content
391
+ # @!attribute [rw] gcs_destination
392
+ # @return [Google::Cloud::Redis::V1beta1::GcsDestination]
393
+ # Google Cloud Storage destination for output content.
394
+ class OutputConfig
395
+ include Google::Protobuf::MessageExts
396
+ extend Google::Protobuf::MessageExts::ClassMethods
397
+ end
398
+
399
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#export_instance Export}.
400
+ # @!attribute [rw] name
401
+ # @return [String]
402
+ # Required. Redis instance resource name using the form:
403
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
404
+ # where `location_id` refers to a GCP region.
405
+ # @!attribute [rw] output_config
406
+ # @return [Google::Cloud::Redis::V1beta1::OutputConfig]
407
+ # Required. Specify data to be exported.
408
+ class ExportInstanceRequest
409
+ include Google::Protobuf::MessageExts
410
+ extend Google::Protobuf::MessageExts::ClassMethods
411
+ end
412
+
413
+ # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::Client#failover_instance Failover}.
414
+ # @!attribute [rw] name
415
+ # @return [String]
416
+ # Required. Redis instance resource name using the form:
417
+ # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
418
+ # where `location_id` refers to a GCP region.
419
+ # @!attribute [rw] data_protection_mode
420
+ # @return [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
421
+ # Optional. Available data protection modes that the user can choose. If it's
422
+ # unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
423
+ class FailoverInstanceRequest
424
+ include Google::Protobuf::MessageExts
425
+ extend Google::Protobuf::MessageExts::ClassMethods
426
+
427
+ # Specifies different modes of operation in relation to the data retention.
428
+ module DataProtectionMode
429
+ # Defaults to LIMITED_DATA_LOSS if a data protection mode is not
430
+ # specified.
431
+ DATA_PROTECTION_MODE_UNSPECIFIED = 0
432
+
433
+ # Instance failover will be protected with data loss control. More
434
+ # specifically, the failover will only be performed if the current
435
+ # replication offset diff between master and replica is under a certain
436
+ # threshold.
437
+ LIMITED_DATA_LOSS = 1
438
+
439
+ # Instance failover will be performed without data loss control.
440
+ FORCE_DATA_LOSS = 2
441
+ end
442
+ end
443
+
444
+ # This location metadata represents additional configuration options for a
445
+ # given location where a Redis instance may be created. All fields are output
446
+ # only. It is returned as content of the
447
+ # `google.cloud.location.Location.metadata` field.
448
+ # @!attribute [r] available_zones
449
+ # @return [Google::Protobuf::Map{String => Google::Cloud::Redis::V1beta1::ZoneMetadata}]
450
+ # Output only. The set of available zones in the location. The map is keyed
451
+ # by the lowercase ID of each zone, as defined by GCE. These keys can be
452
+ # specified in `location_id` or `alternative_location_id` fields when
453
+ # creating a Redis instance.
454
+ class LocationMetadata
455
+ include Google::Protobuf::MessageExts
456
+ extend Google::Protobuf::MessageExts::ClassMethods
457
+
458
+ # @!attribute [rw] key
459
+ # @return [String]
460
+ # @!attribute [rw] value
461
+ # @return [Google::Cloud::Redis::V1beta1::ZoneMetadata]
462
+ class AvailableZonesEntry
463
+ include Google::Protobuf::MessageExts
464
+ extend Google::Protobuf::MessageExts::ClassMethods
465
+ end
466
+ end
467
+
468
+ # Defines specific information for a particular zone. Currently empty and
469
+ # reserved for future use only.
470
+ class ZoneMetadata
471
+ include Google::Protobuf::MessageExts
472
+ extend Google::Protobuf::MessageExts::ClassMethods
473
+ end
474
+ end
475
+ end
476
+ end
477
+ end