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