aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/mdb/clickhouse/v1/cluster.proto
blob: 4c30e1cdfbbd92845c72d396a5ea3ffdcd080615 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
syntax = "proto3";

package yandex.cloud.mdb.clickhouse.v1;

import "google/protobuf/timestamp.proto";
import "google/protobuf/wrappers.proto";
import "google/type/timeofday.proto";
import "yandex/cloud/mdb/clickhouse/v1/config/clickhouse.proto";
import "yandex/cloud/mdb/clickhouse/v1/maintenance.proto";
import "yandex/cloud/validation.proto";

option go_package = "github.com/yandex-cloud/go-genproto/yandex/cloud/mdb/clickhouse/v1;clickhouse";
option java_package = "yandex.cloud.api.mdb.clickhouse.v1";

// A ClickHouse Cluster resource. For more information, see the
// [Cluster](/docs/managed-clickhouse/concepts) section in the Developer's Guide.
message Cluster {
  enum Environment {
    ENVIRONMENT_UNSPECIFIED = 0;

    // Stable environment with a conservative update policy:
    // only hotfixes are applied during regular maintenance.
    PRODUCTION = 1;

    // Environment with more aggressive update policy: new versions
    // are rolled out irrespective of backward compatibility.
    PRESTABLE = 2;
  }

  enum Health {

    // State of the cluster is unknown ([Host.health] for every host in the cluster is UNKNOWN).
    HEALTH_UNKNOWN = 0;

    // Cluster is alive and well ([Host.health] for every host in the cluster is ALIVE).
    ALIVE = 1;

    // Cluster is inoperable ([Host.health] for every host in the cluster is DEAD).
    DEAD = 2;

    // Cluster is working below capacity ([Host.health] for at least one host in the cluster is not ALIVE).
    DEGRADED = 3;
  }

  enum Status {

    // Cluster state is unknown.
    STATUS_UNKNOWN = 0;

    // Cluster is being created.
    CREATING = 1;

    // Cluster is running normally.
    RUNNING = 2;

    // Cluster encountered a problem and cannot operate.
    ERROR = 3;

    // Cluster is being updated.
    UPDATING = 4;

    // Cluster is stopping.
    STOPPING = 5;

    // Cluster stopped.
    STOPPED = 6;

    // Cluster is starting.
    STARTING = 7;
  }

  // ID of the ClickHouse cluster.
  // This ID is assigned by MDB at creation time.
  string id = 1;

  // ID of the folder that the ClickHouse cluster belongs to.
  string folder_id = 2;

  // Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
  google.protobuf.Timestamp created_at = 3;

  // Name of the ClickHouse cluster.
  // The name is unique within the folder. 1-63 characters long.
  string name = 4;

  // Description of the ClickHouse cluster. 0-256 characters long.
  string description = 5;

  // Custom labels for the ClickHouse cluster as `key:value` pairs. Maximum 64 per resource.
  map<string, string> labels = 6;

  // Deployment environment of the ClickHouse cluster.
  Environment environment = 7;

  // Description of monitoring systems relevant to the ClickHouse cluster.
  repeated Monitoring monitoring = 8;

  // Configuration of the ClickHouse cluster.
  ClusterConfig config = 9;

  // ID of the network that the cluster belongs to.
  string network_id = 10;

  // Aggregated cluster health.
  Health health = 11;

  // Current state of the cluster.
  Status status = 12;

  // ID of the service account used for access to Object Storage.
  string service_account_id = 13;

  // Maintenance window for the cluster.
  MaintenanceWindow maintenance_window = 14;

  // Planned maintenance operation to be started for the cluster within the nearest [maintenance_window].
  MaintenanceOperation planned_operation = 15;

  // User security groups
  repeated string security_group_ids = 16;

  // Deletion Protection inhibits deletion of the cluster
  bool deletion_protection = 17;
}

// Monitoring system metadata.
message Monitoring {
  // Name of the monitoring system.
  string name = 1;

  // Description of the monitoring system.
  string description = 2;

  // Link to the monitoring system charts for the ClickHouse cluster.
  string link = 3;
}

message ClusterConfig {
  message Clickhouse {
    // Configuration settings of a ClickHouse server.
    config.ClickhouseConfigSet config = 1;

    // Resources allocated to ClickHouse hosts.
    Resources resources = 2;
  }

  message Zookeeper {
    // Resources allocated to ZooKeeper hosts.
    Resources resources = 1;
  }

  // Version of the ClickHouse server software.
  string version = 1;

  // Configuration and resource allocation for ClickHouse hosts.
  Clickhouse clickhouse = 2;

  // Configuration and resource allocation for ZooKeeper hosts.
  Zookeeper zookeeper = 3;

  // Time to start the daily backup, in the UTC timezone.
  google.type.TimeOfDay backup_window_start = 4;

  // Access policy for external services.
  Access access = 5;

  CloudStorage cloud_storage = 6;

  // Whether database management through SQL commands is enabled.
  google.protobuf.BoolValue sql_database_management = 7;

  // Whether user management through SQL commands is enabled.
  google.protobuf.BoolValue sql_user_management = 8;

  // Whether cluster should use embedded Keeper instead of Zookeeper.
  google.protobuf.BoolValue embedded_keeper = 9;
}

message Shard {
  // Name of the shard.
  string name = 1;

  // ID of the cluster that the shard belongs to.
  string cluster_id = 2;

  // Configuration of the shard.
  ShardConfig config = 3;
}

message ShardGroup {
  // Name of the shard group.
  string name = 1;

  // ID of the ClickHouse cluster that the shard group belongs to.
  string cluster_id = 2;

  // Description of the shard group. 0-256 characters long.
  string description = 3;

  // List of shard names contained in the shard group.
  repeated string shard_names = 4;
}

message ShardConfig {
  message Clickhouse {
    // ClickHouse settings for a shard.
    config.ClickhouseConfigSet config = 1;

    // Computational resources for a shard.
    Resources resources = 2;

    // Relative weight of a shard considered when writing data to the cluster.
    // For details, see [ClickHouse documentation](https://clickhouse.com/docs/en/operations/table_engines/distributed/).
    google.protobuf.Int64Value weight = 3;
  }

  // ClickHouse configuration for a shard.
  Clickhouse clickhouse = 1;
}

message Host {
  enum Type {
    // Host type is unspecified. Default value.
    TYPE_UNSPECIFIED = 0;

    // ClickHouse host.
    CLICKHOUSE = 1;

    // ZooKeeper host.
    ZOOKEEPER = 2;
  }

  enum Health {

    // Health of the host is unknown.
    UNKNOWN = 0;

    // The host is performing all its functions normally.
    ALIVE = 1;

    // The host is inoperable, and cannot perform any of its essential functions.
    DEAD = 2;

    // The host is degraded, and can perform only some of its essential functions.
    DEGRADED = 3;
  }

  // Name of the ClickHouse host. The host name is assigned by MDB at creation time, and cannot be changed.
  // 1-63 characters long.
  //
  // The name is unique across all MDB hosts that exist on the platform, as it defines the FQDN of the host.
  string name = 1;

  // ID of the ClickHouse host. The ID is assigned by MDB at creation time.
  string cluster_id = 2;

  // ID of the availability zone where the ClickHouse host resides.
  string zone_id = 3;

  // Type of the host. If the field has default value, it is not returned in the response.
  Type type = 4;

  // Resources allocated to the ClickHouse host.
  Resources resources = 5;

  // Aggregated health of the host. If the field has default value, it is not returned in the response.
  Health health = 6;

  // Services provided by the host.
  repeated Service services = 7;

  // ID of the subnet that the host belongs to.
  string subnet_id = 8;

  // Flag showing public IP assignment status to this host.
  bool assign_public_ip = 9;

  string shard_name = 10;
}

message Service {
  enum Type {
    // Service type of the host is unspecified. Default value.
    TYPE_UNSPECIFIED = 0;

    // The host is a ClickHouse server.
    CLICKHOUSE = 1;

    // The host is a ZooKeeper server.
    ZOOKEEPER = 2;
  }

  enum Health {

    // Health of the server is unknown. Default value.
    UNKNOWN = 0;

    // The server is working normally.
    ALIVE = 1;

    // The server is dead or unresponsive.
    DEAD = 2;
  }

  // Type of the service provided by the host. If the field has default value, it is not returned in the response.
  Type type = 1;

  // Aggregated health of the service. If the field has default value, it is not returned in the response.
  Health health = 2;
}

message Resources {
  // ID of the preset for computational resources available to a host (CPU, memory etc.).
  // All available presets are listed in the [documentation](/docs/managed-clickhouse/concepts/instance-types)
  string resource_preset_id = 1;

  // Volume of the storage available to a host, in bytes.
  int64 disk_size = 2;

  // Type of the storage environment for the host.
  // Possible values:
  // * network-hdd - network HDD drive,
  // * network-ssd - network SSD drive,
  // * local-ssd - local SSD storage.
  string disk_type_id = 3;
}

message Access {
  // Allow to export data from the cluster to DataLens.
  bool data_lens = 1;

  // Allow SQL queries to the cluster databases from the management console.
  //
  // See [SQL queries in the management console](/docs/managed-clickhouse/operations/web-sql-query) for more details.
  bool web_sql = 2;

  // Allow to import data from Yandex Metrica and AppMetrica to the cluster.
  //
  // See [AppMetrica documentation](https://appmetrica.yandex.com/docs/cloud/index.html) for more details.
  bool metrika = 3;

  // Allow access to cluster for Serverless.
  bool serverless = 4;

  // Allow access for DataTransfer
  bool data_transfer = 5;

  // Allow access for Query
  bool yandex_query = 6;
}

message CloudStorage {
  // Whether to use Object Storage for storing ClickHouse data.
  bool enabled = 1;

  google.protobuf.DoubleValue move_factor = 2 [(value) = "0-1"];

  google.protobuf.BoolValue data_cache_enabled = 3;

  google.protobuf.Int64Value data_cache_max_size = 4;

  google.protobuf.BoolValue prefer_not_to_merge = 5;
}