Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / cloud / redis / v1 / cloud_redis.proto
1 // Copyright 2019 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 //     http://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 syntax = "proto3";
17
18 package google.cloud.redis.v1;
19
20 import "google/api/annotations.proto";
21 import "google/api/resource.proto";
22 import "google/longrunning/operations.proto";
23 import "google/protobuf/field_mask.proto";
24 import "google/protobuf/timestamp.proto";
25
26 option go_package = "google.golang.org/genproto/googleapis/cloud/redis/v1;redis";
27 option java_multiple_files = true;
28 option java_outer_classname = "CloudRedisServiceV1Proto";
29 option java_package = "com.google.cloud.redis.v1";
30
31
32 // Configures and manages Cloud Memorystore for Redis instances
33 //
34 // Google Cloud Memorystore for Redis v1
35 //
36 // The `redis.googleapis.com` service implements the Google Cloud Memorystore
37 // for Redis API and defines the following resource model for managing Redis
38 // instances:
39 // * The service works with a collection of cloud projects, named: `/projects/*`
40 // * Each project has a collection of available locations, named: `/locations/*`
41 // * Each location has a collection of Redis instances, named: `/instances/*`
42 // * As such, Redis instances are resources of the form:
43 //   `/projects/{project_id}/locations/{location_id}/instances/{instance_id}`
44 //
45 // Note that location_id must be referring to a GCP `region`; for example:
46 // * `projects/redpepper-1290/locations/us-central1/instances/my-redis`
47 service CloudRedis {
48   // Lists all Redis instances owned by a project in either the specified
49   // location (region) or all locations.
50   //
51   // The location should have the following format:
52   // * `projects/{project_id}/locations/{location_id}`
53   //
54   // If `location_id` is specified as `-` (wildcard), then all regions
55   // available to the project are queried, and the results are aggregated.
56   rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
57     option (google.api.http) = {
58       get: "/v1/{parent=projects/*/locations/*}/instances"
59     };
60   }
61
62   // Gets the details of a specific Redis instance.
63   rpc GetInstance(GetInstanceRequest) returns (Instance) {
64     option (google.api.http) = {
65       get: "/v1/{name=projects/*/locations/*/instances/*}"
66     };
67   }
68
69   // Creates a Redis instance based on the specified tier and memory size.
70   //
71   // By default, the instance is accessible from the project's
72   // [default network](/compute/docs/networks-and-firewalls#networks).
73   //
74   // The creation is executed asynchronously and callers may check the returned
75   // operation to track its progress. Once the operation is completed the Redis
76   // instance will be fully functional. Completed longrunning.Operation will
77   // contain the new instance object in the response field.
78   //
79   // The returned operation is automatically deleted after a few hours, so there
80   // is no need to call DeleteOperation.
81   rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) {
82     option (google.api.http) = {
83       post: "/v1/{parent=projects/*/locations/*}/instances"
84       body: "instance"
85     };
86   }
87
88   // Updates the metadata and configuration of a specific Redis instance.
89   //
90   // Completed longrunning.Operation will contain the new instance object
91   // in the response field. The returned operation is automatically deleted
92   // after a few hours, so there is no need to call DeleteOperation.
93   rpc UpdateInstance(UpdateInstanceRequest) returns (google.longrunning.Operation) {
94     option (google.api.http) = {
95       patch: "/v1/{instance.name=projects/*/locations/*/instances/*}"
96       body: "instance"
97     };
98   }
99
100   // Failover the master role to current replica node against a specific
101   // STANDARD tier redis instance.
102   rpc FailoverInstance(FailoverInstanceRequest) returns (google.longrunning.Operation) {
103     option (google.api.http) = {
104       post: "/v1/{name=projects/*/locations/*/instances/*}:failover"
105       body: "*"
106     };
107   }
108
109   // Deletes a specific Redis instance.  Instance stops serving and data is
110   // deleted.
111   rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
112     option (google.api.http) = {
113       delete: "/v1/{name=projects/*/locations/*/instances/*}"
114     };
115   }
116 }
117
118 // A Google Cloud Redis instance.
119 message Instance {
120   // Represents the different states of a Redis instance.
121   enum State {
122     // Not set.
123     STATE_UNSPECIFIED = 0;
124
125     // Redis instance is being created.
126     CREATING = 1;
127
128     // Redis instance has been created and is fully usable.
129     READY = 2;
130
131     // Redis instance configuration is being updated. Certain kinds of updates
132     // may cause the instance to become unusable while the update is in
133     // progress.
134     UPDATING = 3;
135
136     // Redis instance is being deleted.
137     DELETING = 4;
138
139     // Redis instance is being repaired and may be unusable.
140     REPAIRING = 5;
141
142     // Maintenance is being performed on this Redis instance.
143     MAINTENANCE = 6;
144
145     // Redis instance is failing over (availability may be affected).
146     FAILING_OVER = 9;
147   }
148
149   // Available service tiers to choose from
150   enum Tier {
151     // Not set.
152     TIER_UNSPECIFIED = 0;
153
154     // BASIC tier: standalone instance
155     BASIC = 1;
156
157     // STANDARD_HA tier: highly available primary/replica instances
158     STANDARD_HA = 3;
159   }
160
161   // Required. Unique name of the resource in this scope including project and
162   // location using the form:
163   //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
164   //
165   // Note: Redis instances are managed and addressed at regional level so
166   // location_id here refers to a GCP region; however, users may choose which
167   // specific zone (or collection of zones for cross-zone instances) an instance
168   // should be provisioned in. Refer to [location_id] and
169   // [alternative_location_id] fields for more details.
170   string name = 1;
171
172   // An arbitrary and optional user-provided name for the instance.
173   string display_name = 2;
174
175   // Resource labels to represent user provided metadata
176   map<string, string> labels = 3;
177
178   // Optional. The zone where the instance will be provisioned. If not provided,
179   // the service will choose a zone for the instance. For STANDARD_HA tier,
180   // instances will be created across two zones for protection against zonal
181   // failures. If [alternative_location_id] is also provided, it must be
182   // different from [location_id].
183   string location_id = 4;
184
185   // Optional. Only applicable to STANDARD_HA tier which protects the instance
186   // against zonal failures by provisioning it across two zones. If provided, it
187   // must be a different zone from the one provided in [location_id].
188   string alternative_location_id = 5;
189
190   // Optional. The version of Redis software.
191   // If not provided, latest supported version will be used. Updating the
192   // version will perform an upgrade/downgrade to the new version. Currently,
193   // the supported values are `REDIS_3_2` for Redis 3.2.
194   string redis_version = 7;
195
196   // Optional. The CIDR range of internal addresses that are reserved for this
197   // instance. If not provided, the service will choose an unused /29 block,
198   // for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique
199   // and non-overlapping with existing subnets in an authorized network.
200   string reserved_ip_range = 9;
201
202   // Output only. Hostname or IP address of the exposed Redis endpoint used by
203   // clients to connect to the service.
204   string host = 10;
205
206   // Output only. The port number of the exposed Redis endpoint.
207   int32 port = 11;
208
209   // Output only. The current zone where the Redis endpoint is placed. For Basic
210   // Tier instances, this will always be the same as the [location_id]
211   // provided by the user at creation time. For Standard Tier instances,
212   // this can be either [location_id] or [alternative_location_id] and can
213   // change after a failover event.
214   string current_location_id = 12;
215
216   // Output only. The time the instance was created.
217   google.protobuf.Timestamp create_time = 13;
218
219   // Output only. The current state of this instance.
220   State state = 14;
221
222   // Output only. Additional information about the current status of this
223   // instance, if available.
224   string status_message = 15;
225
226   // Optional. Redis configuration parameters, according to
227   // http://redis.io/topics/config. Currently, the only supported parameters
228   // are:
229   //
230   //  *   maxmemory-policy
231   //  *   notify-keyspace-events
232   map<string, string> redis_configs = 16;
233
234   // Required. The service tier of the instance.
235   Tier tier = 17;
236
237   // Required. Redis memory size in GiB.
238   int32 memory_size_gb = 18;
239
240   // Optional. The full name of the Google Compute Engine
241   // [network](/compute/docs/networks-and-firewalls#networks) to which the
242   // instance is connected. If left unspecified, the `default` network
243   // will be used.
244   string authorized_network = 20;
245 }
246
247 // Request for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
248 message ListInstancesRequest {
249   // Required. The resource name of the instance location using the form:
250   //     `projects/{project_id}/locations/{location_id}`
251   // where `location_id` refers to a GCP region
252   string parent = 1;
253
254   // The maximum number of items to return.
255   //
256   // If not specified, a default value of 1000 will be used by the service.
257   // Regardless of the page_size value, the response may include a partial list
258   // and a caller should only rely on response's
259   // [next_page_token][CloudRedis.ListInstancesResponse.next_page_token]
260   // to determine if there are more instances left to be queried.
261   int32 page_size = 2;
262
263   // The next_page_token value returned from a previous List request,
264   // if any.
265   string page_token = 3;
266 }
267
268 // Response for [ListInstances][google.cloud.redis.v1.CloudRedis.ListInstances].
269 message ListInstancesResponse {
270   // A list of Redis instances in the project in the specified location,
271   // or across all locations.
272   //
273   // If the `location_id` in the parent field of the request is "-", all regions
274   // available to the project are queried, and the results aggregated.
275   // If in such an aggregated query a location is unavailable, a dummy Redis
276   // entry is included in the response with the "name" field set to a value of
277   // the form projects/{project_id}/locations/{location_id}/instances/- and the
278   // "status" field set to ERROR and "status_message" field set to "location not
279   // available for ListInstances".
280   repeated Instance instances = 1;
281
282   // Token to retrieve the next page of results, or empty if there are no more
283   // results in the list.
284   string next_page_token = 2;
285
286   // Locations that could not be reached.
287   repeated string unreachable = 3;
288 }
289
290 // Request for [GetInstance][google.cloud.redis.v1.CloudRedis.GetInstance].
291 message GetInstanceRequest {
292   // Required. Redis instance resource name using the form:
293   //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
294   // where `location_id` refers to a GCP region
295   string name = 1;
296 }
297
298 // Request for [CreateInstance][google.cloud.redis.v1.CloudRedis.CreateInstance].
299 message CreateInstanceRequest {
300   // Required. The resource name of the instance location using the form:
301   //     `projects/{project_id}/locations/{location_id}`
302   // where `location_id` refers to a GCP region
303   string parent = 1;
304
305   // Required. The logical name of the Redis instance in the customer project
306   // with the following restrictions:
307   //
308   // * Must contain only lowercase letters, numbers, and hyphens.
309   // * Must start with a letter.
310   // * Must be between 1-40 characters.
311   // * Must end with a number or a letter.
312   // * Must be unique within the customer project / location
313   string instance_id = 2;
314
315   // Required. A Redis [Instance] resource
316   Instance instance = 3;
317 }
318
319 // Request for [UpdateInstance][google.cloud.redis.v1.CloudRedis.UpdateInstance].
320 message UpdateInstanceRequest {
321   // Required. Mask of fields to update. At least one path must be supplied in
322   // this field. The elements of the repeated paths field may only include these
323   // fields from [Instance][CloudRedis.Instance]:
324   //
325   //  *   `displayName`
326   //  *   `labels`
327   //  *   `memorySizeGb`
328   //  *   `redisConfig`
329   google.protobuf.FieldMask update_mask = 1;
330
331   // Required. Update description.
332   // Only fields specified in update_mask are updated.
333   Instance instance = 2;
334 }
335
336 // Request for [DeleteInstance][google.cloud.redis.v1.CloudRedis.DeleteInstance].
337 message DeleteInstanceRequest {
338   // Required. Redis instance resource name using the form:
339   //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
340   // where `location_id` refers to a GCP region
341   string name = 1;
342 }
343
344 // Request for [Failover][google.cloud.redis.v1.CloudRedis.FailoverInstance].
345 message FailoverInstanceRequest {
346   enum DataProtectionMode {
347     DATA_PROTECTION_MODE_UNSPECIFIED = 0;
348
349     // Instance failover will be protected with data loss control. More
350     // specifically, the failover will only be performed if the current
351     // replication offset diff between master and replica is under a certain
352     // threshold.
353     LIMITED_DATA_LOSS = 1;
354
355     // Instance failover will be performed without data loss control.
356     FORCE_DATA_LOSS = 2;
357   }
358
359   // Required. Redis instance resource name using the form:
360   //     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
361   // where `location_id` refers to a GCP region
362   string name = 1;
363
364   // Optional. Available data protection modes that the user can choose. If it's
365   // unspecified, data protection mode will be LIMITED_DATA_LOSS by default.
366   DataProtectionMode data_protection_mode = 2;
367 }
368
369 // Represents the v1 metadata of the long-running operation.
370 message OperationMetadata {
371   // Creation timestamp.
372   google.protobuf.Timestamp create_time = 1;
373
374   // End timestamp.
375   google.protobuf.Timestamp end_time = 2;
376
377   // Operation target.
378   string target = 3;
379
380   // Operation verb.
381   string verb = 4;
382
383   // Operation status details.
384   string status_detail = 5;
385
386   // Specifies if cancellation was requested for the operation.
387   bool cancel_requested = 6;
388
389   // API version.
390   string api_version = 7;
391 }
392
393 // This location metadata represents additional configuration options for a
394 // given location where a Redis instance may be created. All fields are output
395 // only. It is returned as content of the
396 // `google.cloud.location.Location.metadata` field.
397 message LocationMetadata {
398   // Output only. The set of available zones in the location. The map is keyed
399   // by the lowercase ID of each zone, as defined by GCE. These keys can be
400   // specified in `location_id` or `alternative_location_id` fields when
401   // creating a Redis instance.
402   map<string, ZoneMetadata> available_zones = 1;
403 }
404
405 // Defines specific information for a particular zone. Currently empty and
406 // reserved for future use only.
407 message ZoneMetadata {
408
409 }