google-cloud-redis 0.8.2 → 1.0.0
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 -54
- data/LICENSE.md +203 -0
- data/MIGRATING.md +272 -0
- data/README.md +35 -23
- data/lib/google-cloud-redis.rb +19 -0
- data/lib/google/cloud/redis.rb +82 -117
- data/lib/google/cloud/redis/version.rb +6 -2
- metadata +97 -62
- 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,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,114 +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 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/v1beta1/cloud_redis_pb'
|
22
|
-
|
23
|
-
module Google
|
24
|
-
module Cloud
|
25
|
-
module Redis
|
26
|
-
module V1beta1
|
27
|
-
module CloudRedis
|
28
|
-
# Configures and manages Cloud Memorystore for Redis instances
|
29
|
-
#
|
30
|
-
# Google Cloud Memorystore for Redis v1beta1
|
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 refering 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.v1beta1.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
|
-
# Upgrades Redis instance to the newer Redis version specified in the
|
83
|
-
# request.
|
84
|
-
rpc :UpgradeInstance, UpgradeInstanceRequest, Google::Longrunning::Operation
|
85
|
-
# Import a Redis RDB snapshot file from Cloud Storage into a Redis instance.
|
86
|
-
#
|
87
|
-
# Redis may stop serving during this operation. Instance state will be
|
88
|
-
# IMPORTING for entire operation. When complete, the instance will contain
|
89
|
-
# only data from the imported file.
|
90
|
-
#
|
91
|
-
# The returned operation is automatically deleted after a few hours, so
|
92
|
-
# there is no need to call DeleteOperation.
|
93
|
-
rpc :ImportInstance, ImportInstanceRequest, Google::Longrunning::Operation
|
94
|
-
# Export Redis instance data into a Redis RDB format file in Cloud Storage.
|
95
|
-
#
|
96
|
-
# Redis will continue serving during this operation.
|
97
|
-
#
|
98
|
-
# The returned operation is automatically deleted after a few hours, so
|
99
|
-
# there is no need to call DeleteOperation.
|
100
|
-
rpc :ExportInstance, ExportInstanceRequest, Google::Longrunning::Operation
|
101
|
-
# Initiates a failover of the master node to current replica node for a
|
102
|
-
# specific STANDARD tier Cloud Memorystore for Redis instance.
|
103
|
-
rpc :FailoverInstance, FailoverInstanceRequest, Google::Longrunning::Operation
|
104
|
-
# Deletes a specific Redis instance. Instance stops serving and data is
|
105
|
-
# deleted.
|
106
|
-
rpc :DeleteInstance, DeleteInstanceRequest, Google::Longrunning::Operation
|
107
|
-
end
|
108
|
-
|
109
|
-
Stub = Service.rpc_stub_class
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
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,395 +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_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::V1beta1::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::V1beta1::Instance#location_id location_id} or {Google::Cloud::Redis::V1beta1::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::V1beta1::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
|
-
# https://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::V1beta1::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::V1beta1::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 = 10
|
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::V1beta1::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::V1beta1::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::V1beta1::CloudRedis::ListInstances ListInstances} request, if any.
|
213
|
-
class ListInstancesRequest; end
|
214
|
-
|
215
|
-
# Response for {Google::Cloud::Redis::V1beta1::CloudRedis::ListInstances ListInstances}.
|
216
|
-
# @!attribute [rw] instances
|
217
|
-
# @return [Array<Google::Cloud::Redis::V1beta1::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::V1beta1::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::V1beta1::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::V1beta1::Instance]
|
263
|
-
# Required. A Redis [Instance] resource
|
264
|
-
class CreateInstanceRequest; end
|
265
|
-
|
266
|
-
# Request for {Google::Cloud::Redis::V1beta1::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::V1beta1::Instance Instance}:
|
272
|
-
#
|
273
|
-
# * `displayName`
|
274
|
-
# * `labels`
|
275
|
-
# * `memorySizeGb`
|
276
|
-
# * `redisConfig`
|
277
|
-
# @!attribute [rw] instance
|
278
|
-
# @return [Google::Cloud::Redis::V1beta1::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::V1beta1::CloudRedis::UpgradeInstance UpgradeInstance}.
|
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
|
-
# @!attribute [rw] redis_version
|
290
|
-
# @return [String]
|
291
|
-
# Required. Specifies the target version of Redis software to upgrade to.
|
292
|
-
class UpgradeInstanceRequest; end
|
293
|
-
|
294
|
-
# Request for {Google::Cloud::Redis::V1beta1::CloudRedis::DeleteInstance DeleteInstance}.
|
295
|
-
# @!attribute [rw] name
|
296
|
-
# @return [String]
|
297
|
-
# Required. Redis instance resource name using the form:
|
298
|
-
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
299
|
-
# where `location_id` refers to a GCP region.
|
300
|
-
class DeleteInstanceRequest; end
|
301
|
-
|
302
|
-
# The Cloud Storage location for the input content
|
303
|
-
# @!attribute [rw] uri
|
304
|
-
# @return [String]
|
305
|
-
# Required. Source data URI. (e.g. 'gs://my_bucket/my_object').
|
306
|
-
class GcsSource; end
|
307
|
-
|
308
|
-
# The input content
|
309
|
-
# @!attribute [rw] gcs_source
|
310
|
-
# @return [Google::Cloud::Redis::V1beta1::GcsSource]
|
311
|
-
# Google Cloud Storage location where input content is located.
|
312
|
-
class InputConfig; end
|
313
|
-
|
314
|
-
# Request for {Google::Cloud::Redis::V1beta1::CloudRedis::ImportInstance Import}.
|
315
|
-
# @!attribute [rw] name
|
316
|
-
# @return [String]
|
317
|
-
# Required. Redis instance resource name using the form:
|
318
|
-
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
319
|
-
# where `location_id` refers to a GCP region.
|
320
|
-
# @!attribute [rw] input_config
|
321
|
-
# @return [Google::Cloud::Redis::V1beta1::InputConfig]
|
322
|
-
# Required. Specify data to be imported.
|
323
|
-
class ImportInstanceRequest; end
|
324
|
-
|
325
|
-
# The Cloud Storage location for the output content
|
326
|
-
# @!attribute [rw] uri
|
327
|
-
# @return [String]
|
328
|
-
# Required. Data destination URI (e.g.
|
329
|
-
# 'gs://my_bucket/my_object'). Existing files will be overwritten.
|
330
|
-
class GcsDestination; end
|
331
|
-
|
332
|
-
# The output content
|
333
|
-
# @!attribute [rw] gcs_destination
|
334
|
-
# @return [Google::Cloud::Redis::V1beta1::GcsDestination]
|
335
|
-
# Google Cloud Storage destination for output content.
|
336
|
-
class OutputConfig; end
|
337
|
-
|
338
|
-
# Request for {Google::Cloud::Redis::V1beta1::CloudRedis::ExportInstance Export}.
|
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] output_config
|
345
|
-
# @return [Google::Cloud::Redis::V1beta1::OutputConfig]
|
346
|
-
# Required. Specify data to be exported.
|
347
|
-
class ExportInstanceRequest; end
|
348
|
-
|
349
|
-
# Request for {Google::Cloud::Redis::V1beta1::CloudRedis::FailoverInstance Failover}.
|
350
|
-
# @!attribute [rw] name
|
351
|
-
# @return [String]
|
352
|
-
# Required. Redis instance resource name using the form:
|
353
|
-
# `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
|
354
|
-
# where `location_id` refers to a GCP region.
|
355
|
-
# @!attribute [rw] data_protection_mode
|
356
|
-
# @return [Google::Cloud::Redis::V1beta1::FailoverInstanceRequest::DataProtectionMode]
|
357
|
-
# Optional. Available data protection modes that the user can choose. If it's
|
358
|
-
# unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
|
359
|
-
class FailoverInstanceRequest
|
360
|
-
# Specifies different modes of operation in relation to the data retention.
|
361
|
-
module DataProtectionMode
|
362
|
-
# Defaults to LIMITED_DATA_LOSS if a data protection mode is not
|
363
|
-
# specified.
|
364
|
-
DATA_PROTECTION_MODE_UNSPECIFIED = 0
|
365
|
-
|
366
|
-
# Instance failover will be protected with data loss control. More
|
367
|
-
# specifically, the failover will only be performed if the current
|
368
|
-
# replication offset diff between master and replica is under a certain
|
369
|
-
# threshold.
|
370
|
-
LIMITED_DATA_LOSS = 1
|
371
|
-
|
372
|
-
# Instance failover will be performed without data loss control.
|
373
|
-
FORCE_DATA_LOSS = 2
|
374
|
-
end
|
375
|
-
end
|
376
|
-
|
377
|
-
# This location metadata represents additional configuration options for a
|
378
|
-
# given location where a Redis instance may be created. All fields are output
|
379
|
-
# only. It is returned as content of the
|
380
|
-
# `google.cloud.location.Location.metadata` field.
|
381
|
-
# @!attribute [rw] available_zones
|
382
|
-
# @return [Hash{String => Google::Cloud::Redis::V1beta1::ZoneMetadata}]
|
383
|
-
# Output only. The set of available zones in the location. The map is keyed
|
384
|
-
# by the lowercase ID of each zone, as defined by GCE. These keys can be
|
385
|
-
# specified in `location_id` or `alternative_location_id` fields when
|
386
|
-
# creating a Redis instance.
|
387
|
-
class LocationMetadata; end
|
388
|
-
|
389
|
-
# Defines specific information for a particular zone. Currently empty and
|
390
|
-
# reserved for future use only.
|
391
|
-
class ZoneMetadata; end
|
392
|
-
end
|
393
|
-
end
|
394
|
-
end
|
395
|
-
end
|