Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / bigtable / admin / v2 / instance.proto
1 // Copyright 2018 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.bigtable.admin.v2;
19
20 import "google/api/annotations.proto";
21 import "google/bigtable/admin/v2/common.proto";
22
23 option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2";
24 option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin";
25 option java_multiple_files = true;
26 option java_outer_classname = "InstanceProto";
27 option java_package = "com.google.bigtable.admin.v2";
28 option php_namespace = "Google\\Cloud\\Bigtable\\Admin\\V2";
29
30 // A collection of Bigtable [Tables][google.bigtable.admin.v2.Table] and
31 // the resources that serve them.
32 // All tables in an instance are served from a single
33 // [Cluster][google.bigtable.admin.v2.Cluster].
34 message Instance {
35   // Possible states of an instance.
36   enum State {
37     // The state of the instance could not be determined.
38     STATE_NOT_KNOWN = 0;
39
40     // The instance has been successfully created and can serve requests
41     // to its tables.
42     READY = 1;
43
44     // The instance is currently being created, and may be destroyed
45     // if the creation process encounters an error.
46     CREATING = 2;
47   }
48
49   // The type of the instance.
50   enum Type {
51     // The type of the instance is unspecified. If set when creating an
52     // instance, a `PRODUCTION` instance will be created. If set when updating
53     // an instance, the type will be left unchanged.
54     TYPE_UNSPECIFIED = 0;
55
56     // An instance meant for production use. `serve_nodes` must be set
57     // on the cluster.
58     PRODUCTION = 1;
59
60     // The instance is meant for development and testing purposes only; it has
61     // no performance or uptime guarantees and is not covered by SLA.
62     // After a development instance is created, it can be upgraded by
63     // updating the instance to type `PRODUCTION`. An instance created
64     // as a production instance cannot be changed to a development instance.
65     // When creating a development instance, `serve_nodes` on the cluster must
66     // not be set.
67     DEVELOPMENT = 2;
68   }
69
70   // (`OutputOnly`)
71   // The unique name of the instance. Values are of the form
72   // `projects/<project>/instances/[a-z][a-z0-9\\-]+[a-z0-9]`.
73   string name = 1;
74
75   // The descriptive name for this instance as it appears in UIs.
76   // Can be changed at any time, but should be kept globally unique
77   // to avoid confusion.
78   string display_name = 2;
79
80   // (`OutputOnly`)
81   // The current state of the instance.
82   State state = 3;
83
84   // The type of the instance. Defaults to `PRODUCTION`.
85   Type type = 4;
86
87   // Labels are a flexible and lightweight mechanism for organizing cloud
88   // resources into groups that reflect a customer's organizational needs and
89   // deployment strategies. They can be used to filter resources and aggregate
90   // metrics.
91   //
92   // * Label keys must be between 1 and 63 characters long and must conform to
93   //   the regular expression: `[\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62}`.
94   // * Label values must be between 0 and 63 characters long and must conform to
95   //   the regular expression: `[\p{Ll}\p{Lo}\p{N}_-]{0,63}`.
96   // * No more than 64 labels can be associated with a given resource.
97   // * Keys and values must both be under 128 bytes.
98   map<string, string> labels = 5;
99 }
100
101 // A resizable group of nodes in a particular cloud location, capable
102 // of serving all [Tables][google.bigtable.admin.v2.Table] in the parent
103 // [Instance][google.bigtable.admin.v2.Instance].
104 message Cluster {
105   // Possible states of a cluster.
106   enum State {
107     // The state of the cluster could not be determined.
108     STATE_NOT_KNOWN = 0;
109
110     // The cluster has been successfully created and is ready to serve requests.
111     READY = 1;
112
113     // The cluster is currently being created, and may be destroyed
114     // if the creation process encounters an error.
115     // A cluster may not be able to serve requests while being created.
116     CREATING = 2;
117
118     // The cluster is currently being resized, and may revert to its previous
119     // node count if the process encounters an error.
120     // A cluster is still capable of serving requests while being resized,
121     // but may exhibit performance as if its number of allocated nodes is
122     // between the starting and requested states.
123     RESIZING = 3;
124
125     // The cluster has no backing nodes. The data (tables) still
126     // exist, but no operations can be performed on the cluster.
127     DISABLED = 4;
128   }
129
130   // (`OutputOnly`)
131   // The unique name of the cluster. Values are of the form
132   // `projects/<project>/instances/<instance>/clusters/[a-z][-a-z0-9]*`.
133   string name = 1;
134
135   // (`CreationOnly`)
136   // The location where this cluster's nodes and storage reside. For best
137   // performance, clients should be located as close as possible to this
138   // cluster. Currently only zones are supported, so values should be of the
139   // form `projects/<project>/locations/<zone>`.
140   string location = 2;
141
142   // (`OutputOnly`)
143   // The current state of the cluster.
144   State state = 3;
145
146   // The number of nodes allocated to this cluster. More nodes enable higher
147   // throughput and more consistent performance.
148   int32 serve_nodes = 4;
149
150   // (`CreationOnly`)
151   // The type of storage used by this cluster to serve its
152   // parent instance's tables, unless explicitly overridden.
153   StorageType default_storage_type = 5;
154 }
155
156 // A configuration object describing how Cloud Bigtable should treat traffic
157 // from a particular end user application.
158 message AppProfile {
159   // Read/write requests may be routed to any cluster in the instance, and will
160   // fail over to another cluster in the event of transient errors or delays.
161   // Choosing this option sacrifices read-your-writes consistency to improve
162   // availability.
163   message MultiClusterRoutingUseAny {}
164
165   // Unconditionally routes all read/write requests to a specific cluster.
166   // This option preserves read-your-writes consistency, but does not improve
167   // availability.
168   message SingleClusterRouting {
169     // The cluster to which read/write requests should be routed.
170     string cluster_id = 1;
171
172     // Whether or not `CheckAndMutateRow` and `ReadModifyWriteRow` requests are
173     // allowed by this app profile. It is unsafe to send these requests to
174     // the same table/row/column in multiple clusters.
175     bool allow_transactional_writes = 2;
176   }
177
178   // (`OutputOnly`)
179   // The unique name of the app profile. Values are of the form
180   // `projects/<project>/instances/<instance>/appProfiles/[_a-zA-Z0-9][-_.a-zA-Z0-9]*`.
181   string name = 1;
182
183   // Strongly validated etag for optimistic concurrency control. Preserve the
184   // value returned from `GetAppProfile` when calling `UpdateAppProfile` to
185   // fail the request if there has been a modification in the mean time. The
186   // `update_mask` of the request need not include `etag` for this protection
187   // to apply.
188   // See [Wikipedia](https://en.wikipedia.org/wiki/HTTP_ETag) and
189   // [RFC 7232](https://tools.ietf.org/html/rfc7232#section-2.3) for more
190   // details.
191   string etag = 2;
192
193   // Optional long form description of the use case for this AppProfile.
194   string description = 3;
195
196   // The routing policy for all read/write requests which use this app profile.
197   // A value must be explicitly set.
198   oneof routing_policy {
199     // Use a multi-cluster routing policy that may pick any cluster.
200     MultiClusterRoutingUseAny multi_cluster_routing_use_any = 5;
201
202     // Use a single-cluster routing policy.
203     SingleClusterRouting single_cluster_routing = 6;
204   }
205 }