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