google-cloud-redis 0.8.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +2 -1
  3. data/AUTHENTICATION.md +51 -59
  4. data/LICENSE.md +203 -0
  5. data/MIGRATING.md +318 -0
  6. data/README.md +35 -23
  7. data/lib/google-cloud-redis.rb +19 -0
  8. data/lib/google/cloud/redis.rb +88 -117
  9. data/lib/google/cloud/redis/version.rb +6 -2
  10. metadata +70 -63
  11. data/LICENSE +0 -201
  12. data/lib/google/cloud/redis/v1.rb +0 -160
  13. data/lib/google/cloud/redis/v1/cloud_redis_client.rb +0 -893
  14. data/lib/google/cloud/redis/v1/cloud_redis_client_config.json +0 -66
  15. data/lib/google/cloud/redis/v1/cloud_redis_pb.rb +0 -159
  16. data/lib/google/cloud/redis/v1/cloud_redis_services_pb.rb +0 -112
  17. data/lib/google/cloud/redis/v1/credentials.rb +0 -41
  18. data/lib/google/cloud/redis/v1/doc/google/cloud/redis/v1/cloud_redis.rb +0 -401
  19. data/lib/google/cloud/redis/v1/doc/google/longrunning/operations.rb +0 -51
  20. data/lib/google/cloud/redis/v1/doc/google/protobuf/any.rb +0 -131
  21. data/lib/google/cloud/redis/v1/doc/google/protobuf/field_mask.rb +0 -222
  22. data/lib/google/cloud/redis/v1/doc/google/protobuf/timestamp.rb +0 -113
  23. data/lib/google/cloud/redis/v1/doc/google/rpc/status.rb +0 -39
  24. data/lib/google/cloud/redis/v1beta1.rb +0 -160
  25. data/lib/google/cloud/redis/v1beta1/cloud_redis_client.rb +0 -971
  26. data/lib/google/cloud/redis/v1beta1/cloud_redis_client_config.json +0 -71
  27. data/lib/google/cloud/redis/v1beta1/cloud_redis_pb.rb +0 -154
  28. data/lib/google/cloud/redis/v1beta1/cloud_redis_services_pb.rb +0 -115
  29. data/lib/google/cloud/redis/v1beta1/credentials.rb +0 -41
  30. data/lib/google/cloud/redis/v1beta1/doc/google/cloud/redis/v1beta1/cloud_redis.rb +0 -388
  31. data/lib/google/cloud/redis/v1beta1/doc/google/longrunning/operations.rb +0 -51
  32. data/lib/google/cloud/redis/v1beta1/doc/google/protobuf/any.rb +0 -131
  33. data/lib/google/cloud/redis/v1beta1/doc/google/protobuf/field_mask.rb +0 -222
  34. data/lib/google/cloud/redis/v1beta1/doc/google/protobuf/timestamp.rb +0 -113
  35. data/lib/google/cloud/redis/v1beta1/doc/google/rpc/status.rb +0 -39
@@ -1,71 +0,0 @@
1
- {
2
- "interfaces": {
3
- "google.cloud.redis.v1beta1.CloudRedis": {
4
- "retry_codes": {
5
- "idempotent": [
6
- "DEADLINE_EXCEEDED",
7
- "UNAVAILABLE"
8
- ],
9
- "non_idempotent": []
10
- },
11
- "retry_params": {
12
- "default": {
13
- "initial_retry_delay_millis": 100,
14
- "retry_delay_multiplier": 1.3,
15
- "max_retry_delay_millis": 60000,
16
- "initial_rpc_timeout_millis": 20000,
17
- "rpc_timeout_multiplier": 1.0,
18
- "max_rpc_timeout_millis": 20000,
19
- "total_timeout_millis": 600000
20
- }
21
- },
22
- "methods": {
23
- "ListInstances": {
24
- "timeout_millis": 60000,
25
- "retry_codes_name": "non_idempotent",
26
- "retry_params_name": "default"
27
- },
28
- "GetInstance": {
29
- "timeout_millis": 60000,
30
- "retry_codes_name": "non_idempotent",
31
- "retry_params_name": "default"
32
- },
33
- "CreateInstance": {
34
- "timeout_millis": 60000,
35
- "retry_codes_name": "non_idempotent",
36
- "retry_params_name": "default"
37
- },
38
- "UpdateInstance": {
39
- "timeout_millis": 60000,
40
- "retry_codes_name": "non_idempotent",
41
- "retry_params_name": "default"
42
- },
43
- "ImportInstance": {
44
- "timeout_millis": 60000,
45
- "retry_codes_name": "non_idempotent",
46
- "retry_params_name": "default"
47
- },
48
- "ExportInstance": {
49
- "timeout_millis": 60000,
50
- "retry_codes_name": "non_idempotent",
51
- "retry_params_name": "default"
52
- },
53
- "FailoverInstance": {
54
- "timeout_millis": 60000,
55
- "retry_codes_name": "non_idempotent",
56
- "retry_params_name": "default"
57
- },
58
- "DeleteInstance": {
59
- "timeout_millis": 60000,
60
- "retry_codes_name": "non_idempotent",
61
- "retry_params_name": "default"
62
- },
63
- "UpgradeInstance": {
64
- "timeout_millis": 60000,
65
- "retry_codes_name": "non_idempotent",
66
- "retry_params_name": "default"
67
- }
68
- }
69
- }
70
- }
71
- }
@@ -1,154 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: google/cloud/redis/v1beta1/cloud_redis.proto
3
-
4
-
5
- require 'google/protobuf'
6
-
7
- require 'google/api/annotations_pb'
8
- require 'google/api/client_pb'
9
- require 'google/api/field_behavior_pb'
10
- require 'google/api/resource_pb'
11
- require 'google/longrunning/operations_pb'
12
- require 'google/protobuf/field_mask_pb'
13
- require 'google/protobuf/timestamp_pb'
14
- Google::Protobuf::DescriptorPool.generated_pool.build do
15
- add_message "google.cloud.redis.v1beta1.Instance" do
16
- optional :name, :string, 1
17
- optional :display_name, :string, 2
18
- map :labels, :string, :string, 3
19
- optional :location_id, :string, 4
20
- optional :alternative_location_id, :string, 5
21
- optional :redis_version, :string, 7
22
- optional :reserved_ip_range, :string, 9
23
- optional :host, :string, 10
24
- optional :port, :int32, 11
25
- optional :current_location_id, :string, 12
26
- optional :create_time, :message, 13, "google.protobuf.Timestamp"
27
- optional :state, :enum, 14, "google.cloud.redis.v1beta1.Instance.State"
28
- optional :status_message, :string, 15
29
- map :redis_configs, :string, :string, 16
30
- optional :tier, :enum, 17, "google.cloud.redis.v1beta1.Instance.Tier"
31
- optional :memory_size_gb, :int32, 18
32
- optional :authorized_network, :string, 20
33
- optional :persistence_iam_identity, :string, 21
34
- optional :connect_mode, :enum, 22, "google.cloud.redis.v1beta1.Instance.ConnectMode"
35
- end
36
- add_enum "google.cloud.redis.v1beta1.Instance.State" do
37
- value :STATE_UNSPECIFIED, 0
38
- value :CREATING, 1
39
- value :READY, 2
40
- value :UPDATING, 3
41
- value :DELETING, 4
42
- value :REPAIRING, 5
43
- value :MAINTENANCE, 6
44
- value :IMPORTING, 8
45
- value :FAILING_OVER, 10
46
- end
47
- add_enum "google.cloud.redis.v1beta1.Instance.Tier" do
48
- value :TIER_UNSPECIFIED, 0
49
- value :BASIC, 1
50
- value :STANDARD_HA, 3
51
- end
52
- add_enum "google.cloud.redis.v1beta1.Instance.ConnectMode" do
53
- value :CONNECT_MODE_UNSPECIFIED, 0
54
- value :DIRECT_PEERING, 1
55
- value :PRIVATE_SERVICE_ACCESS, 2
56
- end
57
- add_message "google.cloud.redis.v1beta1.ListInstancesRequest" do
58
- optional :parent, :string, 1
59
- optional :page_size, :int32, 2
60
- optional :page_token, :string, 3
61
- end
62
- add_message "google.cloud.redis.v1beta1.ListInstancesResponse" do
63
- repeated :instances, :message, 1, "google.cloud.redis.v1beta1.Instance"
64
- optional :next_page_token, :string, 2
65
- repeated :unreachable, :string, 3
66
- end
67
- add_message "google.cloud.redis.v1beta1.GetInstanceRequest" do
68
- optional :name, :string, 1
69
- end
70
- add_message "google.cloud.redis.v1beta1.CreateInstanceRequest" do
71
- optional :parent, :string, 1
72
- optional :instance_id, :string, 2
73
- optional :instance, :message, 3, "google.cloud.redis.v1beta1.Instance"
74
- end
75
- add_message "google.cloud.redis.v1beta1.UpdateInstanceRequest" do
76
- optional :update_mask, :message, 1, "google.protobuf.FieldMask"
77
- optional :instance, :message, 2, "google.cloud.redis.v1beta1.Instance"
78
- end
79
- add_message "google.cloud.redis.v1beta1.UpgradeInstanceRequest" do
80
- optional :name, :string, 1
81
- optional :redis_version, :string, 2
82
- end
83
- add_message "google.cloud.redis.v1beta1.DeleteInstanceRequest" do
84
- optional :name, :string, 1
85
- end
86
- add_message "google.cloud.redis.v1beta1.GcsSource" do
87
- optional :uri, :string, 1
88
- end
89
- add_message "google.cloud.redis.v1beta1.InputConfig" do
90
- oneof :source do
91
- optional :gcs_source, :message, 1, "google.cloud.redis.v1beta1.GcsSource"
92
- end
93
- end
94
- add_message "google.cloud.redis.v1beta1.ImportInstanceRequest" do
95
- optional :name, :string, 1
96
- optional :input_config, :message, 3, "google.cloud.redis.v1beta1.InputConfig"
97
- end
98
- add_message "google.cloud.redis.v1beta1.GcsDestination" do
99
- optional :uri, :string, 1
100
- end
101
- add_message "google.cloud.redis.v1beta1.OutputConfig" do
102
- oneof :destination do
103
- optional :gcs_destination, :message, 1, "google.cloud.redis.v1beta1.GcsDestination"
104
- end
105
- end
106
- add_message "google.cloud.redis.v1beta1.ExportInstanceRequest" do
107
- optional :name, :string, 1
108
- optional :output_config, :message, 3, "google.cloud.redis.v1beta1.OutputConfig"
109
- end
110
- add_message "google.cloud.redis.v1beta1.FailoverInstanceRequest" do
111
- optional :name, :string, 1
112
- optional :data_protection_mode, :enum, 2, "google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode"
113
- end
114
- add_enum "google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode" do
115
- value :DATA_PROTECTION_MODE_UNSPECIFIED, 0
116
- value :LIMITED_DATA_LOSS, 1
117
- value :FORCE_DATA_LOSS, 2
118
- end
119
- add_message "google.cloud.redis.v1beta1.LocationMetadata" do
120
- map :available_zones, :string, :message, 1, "google.cloud.redis.v1beta1.ZoneMetadata"
121
- end
122
- add_message "google.cloud.redis.v1beta1.ZoneMetadata" do
123
- end
124
- end
125
-
126
- module Google
127
- module Cloud
128
- module Redis
129
- module V1beta1
130
- Instance = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.Instance").msgclass
131
- Instance::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.Instance.State").enummodule
132
- Instance::Tier = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.Instance.Tier").enummodule
133
- Instance::ConnectMode = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.Instance.ConnectMode").enummodule
134
- ListInstancesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.ListInstancesRequest").msgclass
135
- ListInstancesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.ListInstancesResponse").msgclass
136
- GetInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.GetInstanceRequest").msgclass
137
- CreateInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.CreateInstanceRequest").msgclass
138
- UpdateInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.UpdateInstanceRequest").msgclass
139
- UpgradeInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.UpgradeInstanceRequest").msgclass
140
- DeleteInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.DeleteInstanceRequest").msgclass
141
- GcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.GcsSource").msgclass
142
- InputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.InputConfig").msgclass
143
- ImportInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.ImportInstanceRequest").msgclass
144
- GcsDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.GcsDestination").msgclass
145
- OutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.OutputConfig").msgclass
146
- ExportInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.ExportInstanceRequest").msgclass
147
- FailoverInstanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.FailoverInstanceRequest").msgclass
148
- FailoverInstanceRequest::DataProtectionMode = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.FailoverInstanceRequest.DataProtectionMode").enummodule
149
- LocationMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.LocationMetadata").msgclass
150
- ZoneMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.redis.v1beta1.ZoneMetadata").msgclass
151
- end
152
- end
153
- end
154
- end
@@ -1,115 +0,0 @@
1
- # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # Source: google/cloud/redis/v1beta1/cloud_redis.proto for package 'google.cloud.redis.v1beta1'
3
- # Original file comments:
4
- # Copyright 2019 Google LLC.
5
- #
6
- # Licensed under the Apache License, Version 2.0 (the "License");
7
- # you may not use this file except in compliance with the License.
8
- # You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing, software
13
- # distributed under the License is distributed on an "AS IS" BASIS,
14
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
- # See the License for the specific language governing permissions and
16
- # limitations under the License.
17
- #
18
- #
19
-
20
-
21
- require 'grpc'
22
- require 'google/cloud/redis/v1beta1/cloud_redis_pb'
23
-
24
- module Google
25
- module Cloud
26
- module Redis
27
- module V1beta1
28
- module CloudRedis
29
- # Configures and manages Cloud Memorystore for Redis instances
30
- #
31
- # Google Cloud Memorystore for Redis v1beta1
32
- #
33
- # The `redis.googleapis.com` service implements the Google Cloud Memorystore
34
- # for Redis API and defines the following resource model for managing Redis
35
- # instances:
36
- # * The service works with a collection of cloud projects, named: `/projects/*`
37
- # * Each project has a collection of available locations, named: `/locations/*`
38
- # * Each location has a collection of Redis instances, named: `/instances/*`
39
- # * As such, Redis instances are resources of the form:
40
- # `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
41
- #
42
- # Note that location_id must be refering to a GCP `region`; for example:
43
- # * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
44
- class Service
45
-
46
- include GRPC::GenericService
47
-
48
- self.marshal_class_method = :encode
49
- self.unmarshal_class_method = :decode
50
- self.service_name = 'google.cloud.redis.v1beta1.CloudRedis'
51
-
52
- # Lists all Redis instances owned by a project in either the specified
53
- # location (region) or all locations.
54
- #
55
- # The location should have the following format:
56
- #
57
- # * `projects/{project_id}/locations/{location_id}`
58
- #
59
- # If `location_id` is specified as `-` (wildcard), then all regions
60
- # available to the project are queried, and the results are aggregated.
61
- rpc :ListInstances, ListInstancesRequest, ListInstancesResponse
62
- # Gets the details of a specific Redis instance.
63
- rpc :GetInstance, GetInstanceRequest, Instance
64
- # Creates a Redis instance based on the specified tier and memory size.
65
- #
66
- # By default, the instance is accessible from the project's
67
- # [default network](/compute/docs/networks-and-firewalls#networks).
68
- #
69
- # The creation is executed asynchronously and callers may check the returned
70
- # operation to track its progress. Once the operation is completed the Redis
71
- # instance will be fully functional. Completed longrunning.Operation will
72
- # contain the new instance object in the response field.
73
- #
74
- # The returned operation is automatically deleted after a few hours, so there
75
- # is no need to call DeleteOperation.
76
- rpc :CreateInstance, CreateInstanceRequest, Google::Longrunning::Operation
77
- # Updates the metadata and configuration of a specific Redis instance.
78
- #
79
- # Completed longrunning.Operation will contain the new instance object
80
- # in the response field. The returned operation is automatically deleted
81
- # after a few hours, so there is no need to call DeleteOperation.
82
- rpc :UpdateInstance, UpdateInstanceRequest, Google::Longrunning::Operation
83
- # Upgrades Redis instance to the newer Redis version specified in the
84
- # request.
85
- rpc :UpgradeInstance, UpgradeInstanceRequest, Google::Longrunning::Operation
86
- # Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
87
- #
88
- # Redis may stop serving during this operation. Instance state will be
89
- # IMPORTING for entire operation. When complete, the instance will contain
90
- # only data from the imported file.
91
- #
92
- # The returned operation is automatically deleted after a few hours, so
93
- # there is no need to call DeleteOperation.
94
- rpc :ImportInstance, ImportInstanceRequest, Google::Longrunning::Operation
95
- # Export Redis instance data into a Redis RDB format file in Cloud Storage.
96
- #
97
- # Redis will continue serving during this operation.
98
- #
99
- # The returned operation is automatically deleted after a few hours, so
100
- # there is no need to call DeleteOperation.
101
- rpc :ExportInstance, ExportInstanceRequest, Google::Longrunning::Operation
102
- # Initiates a failover of the master node to current replica node for a
103
- # specific STANDARD tier Cloud Memorystore for Redis instance.
104
- rpc :FailoverInstance, FailoverInstanceRequest, Google::Longrunning::Operation
105
- # Deletes a specific Redis instance. Instance stops serving and data is
106
- # deleted.
107
- rpc :DeleteInstance, DeleteInstanceRequest, Google::Longrunning::Operation
108
- end
109
-
110
- Stub = Service.rpc_stub_class
111
- end
112
- end
113
- end
114
- end
115
- end
@@ -1,41 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- require "googleauth"
17
-
18
- module Google
19
- module Cloud
20
- module Redis
21
- module V1beta1
22
- class Credentials < Google::Auth::Credentials
23
- SCOPE = [
24
- "https://www.googleapis.com/auth/cloud-platform"
25
- ].freeze
26
- PATH_ENV_VARS = %w(REDIS_CREDENTIALS
27
- REDIS_KEYFILE
28
- GOOGLE_CLOUD_CREDENTIALS
29
- GOOGLE_CLOUD_KEYFILE
30
- GCLOUD_KEYFILE)
31
- JSON_ENV_VARS = %w(REDIS_CREDENTIALS_JSON
32
- REDIS_KEYFILE_JSON
33
- GOOGLE_CLOUD_CREDENTIALS_JSON
34
- GOOGLE_CLOUD_KEYFILE_JSON
35
- GCLOUD_KEYFILE_JSON)
36
- DEFAULT_PATHS = ["~/.config/gcloud/application_default_credentials.json"]
37
- end
38
- end
39
- end
40
- end
41
- end
@@ -1,388 +0,0 @@
1
- # Copyright 2020 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # https://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
-
16
- module Google
17
- module Cloud
18
- module Redis
19
- module V1beta1
20
- # A Google Cloud Redis instance.
21
- # @!attribute [rw] name
22
- # @return [String]
23
- # Required. Unique name of the resource in this scope including project and
24
- # location using the form:
25
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
26
- #
27
- # Note: Redis instances are managed and addressed at regional level so
28
- # location_id here refers to a GCP region; however, users may choose which
29
- # specific zone (or collection of zones for cross-zone instances) an instance
30
- # should be provisioned in. Refer to {Google::Cloud::Redis::V1beta1::Instance#location_id location_id} and
31
- # {Google::Cloud::Redis::V1beta1::Instance#alternative_location_id alternative_location_id} fields for more details.
32
- # @!attribute [rw] display_name
33
- # @return [String]
34
- # An arbitrary and optional user-provided name for the instance.
35
- # @!attribute [rw] labels
36
- # @return [Hash{String => String}]
37
- # Resource labels to represent user provided metadata
38
- # @!attribute [rw] location_id
39
- # @return [String]
40
- # Optional. The zone where the instance will be provisioned. If not provided,
41
- # the service will choose a zone for the instance. For STANDARD_HA tier,
42
- # instances will be created across two zones for protection against zonal
43
- # failures. If {Google::Cloud::Redis::V1beta1::Instance#alternative_location_id alternative_location_id} is also provided, it must be
44
- # different from {Google::Cloud::Redis::V1beta1::Instance#location_id location_id}.
45
- # @!attribute [rw] alternative_location_id
46
- # @return [String]
47
- # Optional. Only applicable to STANDARD_HA tier which protects the instance
48
- # against zonal failures by provisioning it across two zones. If provided, it
49
- # must be a different zone from the one provided in {Google::Cloud::Redis::V1beta1::Instance#location_id location_id}.
50
- # @!attribute [rw] redis_version
51
- # @return [String]
52
- # Optional. The version of Redis software.
53
- # If not provided, latest supported version will be used. Currently, the
54
- # supported values are:
55
- #
56
- # * `REDIS_4_0` for Redis 4.0 compatibility (default)
57
- # * `REDIS_3_2` for Redis 3.2 compatibility
58
- # @!attribute [rw] reserved_ip_range
59
- # @return [String]
60
- # Optional. The CIDR range of internal addresses that are reserved for this
61
- # instance. If not provided, the service will choose an unused /29 block,
62
- # for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
63
- # and non-overlapping with existing subnets in an authorized network.
64
- # @!attribute [rw] host
65
- # @return [String]
66
- # Output only. Hostname or IP address of the exposed Redis endpoint used by
67
- # clients to connect to the service.
68
- # @!attribute [rw] port
69
- # @return [Integer]
70
- # Output only. The port number of the exposed Redis endpoint.
71
- # @!attribute [rw] current_location_id
72
- # @return [String]
73
- # Output only. The current zone where the Redis endpoint is placed. For Basic
74
- # Tier instances, this will always be the same as the {Google::Cloud::Redis::V1beta1::Instance#location_id location_id}
75
- # provided by the user at creation time. For Standard Tier instances,
76
- # 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
77
- # change after a failover event.
78
- # @!attribute [rw] create_time
79
- # @return [Google::Protobuf::Timestamp]
80
- # Output only. The time the instance was created.
81
- # @!attribute [rw] state
82
- # @return [Google::Cloud::Redis::V1beta1::Instance::State]
83
- # Output only. The current state of this instance.
84
- # @!attribute [rw] status_message
85
- # @return [String]
86
- # Output only. Additional information about the current status of this
87
- # instance, if available.
88
- # @!attribute [rw] redis_configs
89
- # @return [Hash{String => String}]
90
- # Optional. Redis configuration parameters, according to
91
- # http://redis.io/topics/config. Currently, the only supported parameters
92
- # are:
93
- #
94
- # Redis 3.2 and above:
95
- #
96
- # * maxmemory-policy
97
- # * notify-keyspace-events
98
- #
99
- # Redis 4.0 and above:
100
- #
101
- # * activedefrag
102
- # * lfu-log-factor
103
- # * lfu-decay-time
104
- # @!attribute [rw] tier
105
- # @return [Google::Cloud::Redis::V1beta1::Instance::Tier]
106
- # Required. The service tier of the instance.
107
- # @!attribute [rw] memory_size_gb
108
- # @return [Integer]
109
- # Required. Redis memory size in GiB.
110
- # @!attribute [rw] authorized_network
111
- # @return [String]
112
- # Optional. The full name of the Google Compute Engine
113
- # [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the
114
- # instance is connected. If left unspecified, the `default` network
115
- # will be used.
116
- # @!attribute [rw] persistence_iam_identity
117
- # @return [String]
118
- # Output only. Cloud IAM identity used by import / export operations to
119
- # transfer data to/from Cloud Storage. Format is
120
- # "serviceAccount:<service_account_email>". The value may change over time
121
- # for a given instance so should be checked before each import/export
122
- # operation.
123
- # @!attribute [rw] connect_mode
124
- # @return [Google::Cloud::Redis::V1beta1::Instance::ConnectMode]
125
- # Optional. The connect mode of Redis instance.
126
- # If not provided, default one will be used.
127
- # Current default: DIRECT_PEERING.
128
- class Instance
129
- # Available connection modes.
130
- module ConnectMode
131
- # Not set.
132
- CONNECT_MODE_UNSPECIFIED = 0
133
-
134
- # Connect via directly peering with memorystore redis hosted service.
135
- DIRECT_PEERING = 1
136
-
137
- # Connect with google via private service access and share connection
138
- # across google managed services.
139
- PRIVATE_SERVICE_ACCESS = 2
140
- end
141
-
142
- # Represents the different states of a Redis instance.
143
- module State
144
- # Not set.
145
- STATE_UNSPECIFIED = 0
146
-
147
- # Redis instance is being created.
148
- CREATING = 1
149
-
150
- # Redis instance has been created and is fully usable.
151
- READY = 2
152
-
153
- # Redis instance configuration is being updated. Certain kinds of updates
154
- # may cause the instance to become unusable while the update is in
155
- # progress.
156
- UPDATING = 3
157
-
158
- # Redis instance is being deleted.
159
- DELETING = 4
160
-
161
- # Redis instance is being repaired and may be unusable.
162
- REPAIRING = 5
163
-
164
- # Maintenance is being performed on this Redis instance.
165
- MAINTENANCE = 6
166
-
167
- # Redis instance is importing data (availability may be affected).
168
- IMPORTING = 8
169
-
170
- # Redis instance is failing over (availability may be affected).
171
- FAILING_OVER = 10
172
- end
173
-
174
- # Available service tiers to choose from
175
- module Tier
176
- # Not set.
177
- TIER_UNSPECIFIED = 0
178
-
179
- # BASIC tier: standalone instance
180
- BASIC = 1
181
-
182
- # STANDARD_HA tier: highly available primary/replica instances
183
- STANDARD_HA = 3
184
- end
185
- end
186
-
187
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::ListInstances ListInstances}.
188
- # @!attribute [rw] parent
189
- # @return [String]
190
- # Required. The resource name of the instance location using the form:
191
- # `projects/{project_id}/locations/{location_id}`
192
- # where `location_id` refers to a GCP region.
193
- # @!attribute [rw] page_size
194
- # @return [Integer]
195
- # The maximum number of items to return.
196
- #
197
- # If not specified, a default value of 1000 will be used by the service.
198
- # Regardless of the page_size value, the response may include a partial list
199
- # and a caller should only rely on response's
200
- # {Google::Cloud::Redis::V1beta1::ListInstancesResponse#next_page_token `next_page_token`}
201
- # to determine if there are more instances left to be queried.
202
- # @!attribute [rw] page_token
203
- # @return [String]
204
- # The `next_page_token` value returned from a previous
205
- # {Google::Cloud::Redis::V1beta1::CloudRedis::ListInstances ListInstances} request, if any.
206
- class ListInstancesRequest; end
207
-
208
- # Response for {Google::Cloud::Redis::V1beta1::CloudRedis::ListInstances ListInstances}.
209
- # @!attribute [rw] instances
210
- # @return [Array<Google::Cloud::Redis::V1beta1::Instance>]
211
- # A list of Redis instances in the project in the specified location,
212
- # or across all locations.
213
- #
214
- # If the `location_id` in the parent field of the request is "-", all regions
215
- # available to the project are queried, and the results aggregated.
216
- # If in such an aggregated query a location is unavailable, a dummy Redis
217
- # entry is included in the response with the `name` field set to a value of
218
- # the form `projects/{project_id}/locations/{location_id}/instances/`- and
219
- # the `status` field set to ERROR and `status_message` field set to "location
220
- # not available for ListInstances".
221
- # @!attribute [rw] next_page_token
222
- # @return [String]
223
- # Token to retrieve the next page of results, or empty if there are no more
224
- # results in the list.
225
- # @!attribute [rw] unreachable
226
- # @return [Array<String>]
227
- # Locations that could not be reached.
228
- class ListInstancesResponse; end
229
-
230
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::GetInstance GetInstance}.
231
- # @!attribute [rw] name
232
- # @return [String]
233
- # Required. Redis instance resource name using the form:
234
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
235
- # where `location_id` refers to a GCP region.
236
- class GetInstanceRequest; end
237
-
238
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::CreateInstance CreateInstance}.
239
- # @!attribute [rw] parent
240
- # @return [String]
241
- # Required. The resource name of the instance location using the form:
242
- # `projects/{project_id}/locations/{location_id}`
243
- # where `location_id` refers to a GCP region.
244
- # @!attribute [rw] instance_id
245
- # @return [String]
246
- # Required. The logical name of the Redis instance in the customer project
247
- # with the following restrictions:
248
- #
249
- # * Must contain only lowercase letters, numbers, and hyphens.
250
- # * Must start with a letter.
251
- # * Must be between 1-40 characters.
252
- # * Must end with a number or a letter.
253
- # * Must be unique within the customer project / location
254
- # @!attribute [rw] instance
255
- # @return [Google::Cloud::Redis::V1beta1::Instance]
256
- # Required. A Redis [Instance] resource
257
- class CreateInstanceRequest; end
258
-
259
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::UpdateInstance UpdateInstance}.
260
- # @!attribute [rw] update_mask
261
- # @return [Google::Protobuf::FieldMask]
262
- # Required. Mask of fields to update. At least one path must be supplied in
263
- # this field. The elements of the repeated paths field may only include these
264
- # fields from {Google::Cloud::Redis::V1beta1::Instance Instance}:
265
- #
266
- # * `displayName`
267
- # * `labels`
268
- # * `memorySizeGb`
269
- # * `redisConfig`
270
- # @!attribute [rw] instance
271
- # @return [Google::Cloud::Redis::V1beta1::Instance]
272
- # Required. Update description.
273
- # Only fields specified in update_mask are updated.
274
- class UpdateInstanceRequest; end
275
-
276
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::UpgradeInstance UpgradeInstance}.
277
- # @!attribute [rw] name
278
- # @return [String]
279
- # Required. Redis instance resource name using the form:
280
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
281
- # where `location_id` refers to a GCP region.
282
- # @!attribute [rw] redis_version
283
- # @return [String]
284
- # Required. Specifies the target version of Redis software to upgrade to.
285
- class UpgradeInstanceRequest; end
286
-
287
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::DeleteInstance DeleteInstance}.
288
- # @!attribute [rw] name
289
- # @return [String]
290
- # Required. Redis instance resource name using the form:
291
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
292
- # where `location_id` refers to a GCP region.
293
- class DeleteInstanceRequest; end
294
-
295
- # The Cloud Storage location for the input content
296
- # @!attribute [rw] uri
297
- # @return [String]
298
- # Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
299
- class GcsSource; end
300
-
301
- # The input content
302
- # @!attribute [rw] gcs_source
303
- # @return [Google::Cloud::Redis::V1beta1::GcsSource]
304
- # Google Cloud Storage location where input content is located.
305
- class InputConfig; end
306
-
307
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::ImportInstance Import}.
308
- # @!attribute [rw] name
309
- # @return [String]
310
- # Required. Redis instance resource name using the form:
311
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
312
- # where `location_id` refers to a GCP region.
313
- # @!attribute [rw] input_config
314
- # @return [Google::Cloud::Redis::V1beta1::InputConfig]
315
- # Required. Specify data to be imported.
316
- class ImportInstanceRequest; end
317
-
318
- # The Cloud Storage location for the output content
319
- # @!attribute [rw] uri
320
- # @return [String]
321
- # Required. Data destination URI (e.g.
322
- # 'gs://my_bucket/my_object'). Existing files will be overwritten.
323
- class GcsDestination; end
324
-
325
- # The output content
326
- # @!attribute [rw] gcs_destination
327
- # @return [Google::Cloud::Redis::V1beta1::GcsDestination]
328
- # Google Cloud Storage destination for output content.
329
- class OutputConfig; end
330
-
331
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::ExportInstance Export}.
332
- # @!attribute [rw] name
333
- # @return [String]
334
- # Required. Redis instance resource name using the form:
335
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
336
- # where `location_id` refers to a GCP region.
337
- # @!attribute [rw] output_config
338
- # @return [Google::Cloud::Redis::V1beta1::OutputConfig]
339
- # Required. Specify data to be exported.
340
- class ExportInstanceRequest; end
341
-
342
- # Request for {Google::Cloud::Redis::V1beta1::CloudRedis::FailoverInstance Failover}.
343
- # @!attribute [rw] name
344
- # @return [String]
345
- # Required. Redis instance resource name using the form:
346
- # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
347
- # where `location_id` refers to a GCP region.
348
- # @!attribute [rw] data_protection_mode
349
- # @return [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
350
- # Optional. Available data protection modes that the user can choose. If it's
351
- # unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
352
- class FailoverInstanceRequest
353
- # Specifies different modes of operation in relation to the data retention.
354
- module DataProtectionMode
355
- # Defaults to LIMITED_DATA_LOSS if a data protection mode is not
356
- # specified.
357
- DATA_PROTECTION_MODE_UNSPECIFIED = 0
358
-
359
- # Instance failover will be protected with data loss control. More
360
- # specifically, the failover will only be performed if the current
361
- # replication offset diff between master and replica is under a certain
362
- # threshold.
363
- LIMITED_DATA_LOSS = 1
364
-
365
- # Instance failover will be performed without data loss control.
366
- FORCE_DATA_LOSS = 2
367
- end
368
- end
369
-
370
- # This location metadata represents additional configuration options for a
371
- # given location where a Redis instance may be created. All fields are output
372
- # only. It is returned as content of the
373
- # `google.cloud.location.Location.metadata` field.
374
- # @!attribute [rw] available_zones
375
- # @return [Hash{String => Google::Cloud::Redis::V1beta1::ZoneMetadata}]
376
- # Output only. The set of available zones in the location. The map is keyed
377
- # by the lowercase ID of each zone, as defined by GCE. These keys can be
378
- # specified in `location_id` or `alternative_location_id` fields when
379
- # creating a Redis instance.
380
- class LocationMetadata; end
381
-
382
- # Defines specific information for a particular zone. Currently empty and
383
- # reserved for future use only.
384
- class ZoneMetadata; end
385
- end
386
- end
387
- end
388
- end