aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/yandex-cloud-api-protos/yandex/cloud/apploadbalancer/v1/load_balancer.proto
blob: 96fed2ff386ebfe099412631f0200a1b6bca41ba (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
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
syntax = "proto3";

package yandex.cloud.apploadbalancer.v1;

import "google/protobuf/timestamp.proto";
import "yandex/cloud/validation.proto";
import "yandex/cloud/apploadbalancer/v1/logging.proto";
import "yandex/cloud/apploadbalancer/v1/target_group.proto";

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

// An application load balancer resource.
// For details about the concept, see [documentation](/docs/application-load-balancer/concepts/application-load-balancer).
message LoadBalancer {
  enum Status {
    STATUS_UNSPECIFIED = 0;

    // The application load balancer is being created.
    CREATING = 1;

    // The application load balancer is being started.
    STARTING = 2;

    // The application load balancer is active and sends traffic to the targets.
    ACTIVE = 3;

    // The application load balancer is being stopped.
    STOPPING = 4;

    // The application load balancer is stopped and doesn't send traffic to the targets.
    STOPPED = 5;

    // The application load balancer is being deleted.
    DELETING = 6;
  }

  // ID of the application load balancer. Generated at creation time.
  string id = 1;

  // Name of the application load balancer. The name is unique within the folder.
  string name = 2;

  // Description of the application load balancer.
  string description = 3;

  // ID of the folder that the application load balancer belongs to.
  string folder_id = 4;

  // Application load balancer labels as `key:value` pairs.
  // For details about the concept, see [documentation](/docs/overview/concepts/services#labels).
  map<string, string> labels = 5;

  // Status of the application load balancer.
  Status status = 6;

  // ID of the region that the application load balancer is located at.
  string region_id = 7;

  // ID of the network that the application load balancer belongs to.
  string network_id = 8;

  // Listeners that belong to the application load balancer.
  //
  // For details about the concept, see [documentation](/docs/application-load-balancer/concepts/application-load-balancer#listener).
  repeated Listener listeners = 9;

  // Locality settings of the application load balancer.
  //
  // For details about the concept, see [documentation](/docs/application-load-balancer/concepts/application-load-balancer#lb-location).
  AllocationPolicy allocation_policy = 10;

  // ID of the log group that stores access logs of the application load balancer.
  //
  // The logs can be accessed using a Cloud Functions [trigger for Cloud Logs](/docs/functions/operations/trigger/cloudlogs-trigger-create).
  string log_group_id = 11;

  // ID's of the security groups attributed to the application load balancer.
  //
  // For details about the concept,
  // see [documentation](/docs/application-load-balancer/concepts/application-load-balancer#security-groups).
  repeated string security_group_ids = 12;

  // Creation timestamp.
  google.protobuf.Timestamp created_at = 13;

  // Scaling settings of the application load balancer.
  //
  // The scaling settings relate to a special internal instance group which facilitates the balancer's work.
  // Instances in this group are called _resource units_. The group is scaled automatically based on incoming load
  // and within limitations specified in these settings.
  //
  // For details about the concept,
  // see [documentation](/docs/application-load-balancer/concepts/application-load-balancer#lcu-scaling).
  AutoScalePolicy auto_scale_policy = 14;

  // Cloud logging settings of the application load balancer.
  LogOptions log_options = 15;
}

// An endpoint address resource.
message Address {
  // Endpoint address of one of the types: public (external) IPv4 address, internal IPv4 address, public IPv6 address.
  oneof address {
    option (exactly_one) = true;

    // Public IPv4 endpoint address.
    ExternalIpv4Address external_ipv4_address = 1;

    // Internal IPv4 endpoint address.
    //
    // To enable the use of listeners with internal addresses, [contact support](/docs/support/overview#response-time).
    InternalIpv4Address internal_ipv4_address = 2;

    // Public IPv6 endpoint address.
    ExternalIpv6Address external_ipv6_address = 3;
  }
}

// A public (external) IPv4 endpoint address resource.
message ExternalIpv4Address {
  // IPv4 address.
  string address = 1;
}

// An internal IPv4 endpoint address resource.
message InternalIpv4Address {
  // IPv4 address.
  string address = 1;

  // ID of the subnet that the address belongs to.
  string subnet_id = 2;
}

// A public (external) IPv4 endpoint address resource.
message ExternalIpv6Address {
  // IPv6 address.
  string address = 1;
}

// An application load balancer location resource.
//
// For details about the concept, see [documentation](/docs/application-load-balancer/concepts/application-load-balancer#lb-location).
message Location {
  // ID of the availability zone where the application load balancer resides.
  //
  // Each availability zone can only be specified once.
  string zone_id = 1 [(required) = true];

  // ID of the subnet that the application load balancer belongs to.
  string subnet_id = 2;

  // Disables the load balancer node in the specified availability zone.
  //
  // Backends in the availability zone are not directly affected by this setting.
  // They still may receive traffic from the load balancer nodes in other availability zones,
  // subject to [LoadBalancingConfig.locality_aware_routing_percent] and [LoadBalancingConfig.strict_locality] settings.
  bool disable_traffic = 3;
}

// A locality settings (allocation policy) resource.
message AllocationPolicy {
  // Availability zones and subnets that the application load balancer resides.
  repeated Location locations = 1 [(size) = ">=1", (unique) = true];
}

// A listener resource.
//
// For details about the concept, see [documentation](/docs/application-load-balancer/concepts/application-load-balancer#listener).
message Listener {
  // Name of the listener. The name is unique within the application load balancer.
  // The string length in characters is 3-63.
  string name = 1 [(required) = true];

  // Endpoints of the listener.
  //
  // Endpoints are defined by their IP addresses and ports.
  repeated Endpoint endpoints = 2;

  // Listener type and settings.
  oneof listener {
    option (exactly_one) = true;

    // Unencrypted HTTP listener settings.
    HttpListener http = 3;

    // TLS-encrypted HTTP or TCP stream listener settings.
    //
    // All handlers within a listener ([TlsListener.default_handler] and [TlsListener.sni_handlers]) must be of one
    // type, [HttpHandler] or [StreamHandler]. Mixing HTTP and TCP stream traffic in a TLS-encrypted listener is not
    // supported.
    TlsListener tls = 4;

    // Unencrypted stream (TCP) listener settings.
    StreamListener stream = 5;
  }
}

// An endpoint resource.
message Endpoint {
  // Endpoint public (external) and internal addresses.
  repeated Address addresses = 1 [(size) = ">0"];

  // Endpoint ports.
  repeated int64 ports = 2 [(size) = ">0", (value) = "1-65535"];
}

// An HTTP listener resource.
message HttpListener {
  // Settings for handling HTTP requests.
  //
  // Only one of `handler` and [redirects] can be specified.
  HttpHandler handler = 1;

  // Redirects settings.
  //
  // Only one of `redirects` and [handler] can be specified.
  Redirects redirects = 2;
}

// TLS-encrypted (HTTP or TCP stream) listener resource.
message TlsListener {
  // Settings for handling requests by default, with Server Name
  // Indication (SNI) not matching any of the [sni_handlers].
  TlsHandler default_handler = 1 [(required) = true];

  // Settings for handling requests with Server Name Indication (SNI)
  // matching one of [SniMatch.server_names] values.
  repeated SniMatch sni_handlers = 2;
}

// A stream (TCP) listener resource.
message StreamListener {
  // Settings for handling stream (TCP) requests.
  StreamHandler handler = 1 [(required) = true];
}

// An HTTP/2 options resource.
message Http2Options {
  // Maximum number of concurrent HTTP/2 streams in a connection.
  int64 max_concurrent_streams = 1;
}

// A stream (TCP) handler resource.
message StreamHandler {
  // ID of the backend group processing requests. For details about the concept, see
  // [documentation](/docs/application-load-balancer/concepts/backend-group).
  //
  // The backend group type, specified via [BackendGroup.backend], must be `stream`.
  //
  // To get the list of all available backend groups, make a [BackendGroupService.List] request.
  string backend_group_id = 1 [(required) = true];
}

// An HTTP handler resource.
message HttpHandler {
  // ID of the HTTP router processing requests. For details about the concept, see
  // [documentation](/docs/application-load-balancer/concepts/http-router).
  //
  // To get the list of all available HTTP routers, make a [HttpRouterService.List] request.
  string http_router_id = 1;

  // Protocol settings.
  //
  // For HTTPS (HTTP over TLS) connections, settings are applied to the protocol
  // negotiated using TLS [ALPN](https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation) extension.
  oneof protocol_settings {
    // HTTP/2 settings.
    //
    // If specified, incoming HTTP/2 requests are supported by the listener.
    Http2Options http2_options = 2;

    // Enables support for incoming HTTP/1.0 and HTTP/1.1 requests and disables it for HTTP/2 requests.
    bool allow_http10 = 3;
  }

  // When unset, will preserve the incoming x-request-id header, otherwise would rewrite it with a new value.
  bool rewrite_request_id = 4;
}

// A listener redirects resource.
message Redirects {
  // Redirects all unencrypted HTTP requests to the same URI with scheme changed to `https`.
  //
  // The setting has the same effect as a single, catch-all [HttpRoute]
  // with [RedirectAction.replace_scheme] set to `https`.
  bool http_to_https = 1;
}

// A SNI handler resource.
message SniMatch {
  // Name of the SNI handler.
  string name = 1 [(required) = true];

  // Server names that are matched by the SNI handler.
  repeated string server_names = 2 [(size) = ">0"];

  // Settings for handling requests with Server Name Indication (SNI) matching one of [server_names] values.
  TlsHandler handler = 3 [(required) = true];
}

// A TLS-encrypted (HTTP or TCP stream) handler resource.
message TlsHandler {
  // Settings for handling requests.
  oneof handler {
    option (exactly_one) = true;
    // HTTP handler.
    HttpHandler http_handler = 2;

    // Stream (TCP) handler.
    StreamHandler stream_handler = 4;
  }

  // ID's of the TLS server certificates from [Certificate Manager](/docs/certificate-manager/).
  //
  // RSA and ECDSA certificates are supported, and only the first certificate of each type is used.
  repeated string certificate_ids = 3 [(size) = ">0"];
}

// A target state resource.
message TargetState {
  // Supported target statuses.
  enum Status {
    STATUS_UNSPECIFIED = 0;

    // All of the health checks specified in [HttpBackend.healthchecks] or [GrpcBackend.healthchecks] are passed
    // (the number depends on the [HealthCheck.healthy_threshold] setting) and the target is ready to receive traffic.
    HEALTHY = 1;

    // Some of the health checks specified in [HttpBackend.healthchecks] or [GrpcBackend.healthchecks] failed
    // (the number depends on the [HealthCheck.unhealthy_threshold] setting).
    // The target is ready to receive traffic from the load balancer nodes which, based on their health checks,
    // consider the target healthy.
    PARTIALLY_HEALTHY = 2;

    // All of the health checks specified in [HttpBackend.healthchecks] or [GrpcBackend.healthchecks] failed
    // (the number depends on the [HealthCheck.unhealthy_threshold] setting) and the target is not receiving traffic.
    UNHEALTHY = 3;

    // Target is being deleted and the application load balancer is no longer sending traffic to this target.
    DRAINING = 4;

    TIMEOUT = 5;
  }

  // Health of the target.
  message HealthcheckStatus {
    // Statuses of the target in its availability zones.
    repeated ZoneHealthcheckStatus zone_statuses = 1;
  }

  // Health of the target in the availability zone.
  message ZoneHealthcheckStatus {
    // ID of the availability zone.
    string zone_id = 1 [(required) = true];

    // Status of the target in the availability zone.
    Status status = 2;

    // Indicates whether the target has been marked `UNHEALTHY` due to failing active health checks,
    // which determine target statuses as configured in [HttpBackend.healthchecks] or [GrpcBackend.healthchecks].
    //
    // Currently the only type of health checks is active, as described above.
    // Passive health checks, which determine the health of a target based on its responses to production requests
    // (HTTP 5xx status codes, connection errors etc.), are not implemented yet.
    bool failed_active_hc = 3;
  }

  // Health of the target, i.e. its statuses in all availability zones.
  HealthcheckStatus status = 1;

  // Target.
  Target target = 2 [(required) = true];
}

// A resource for scaling settings of an application load balancer.
message AutoScalePolicy {
  // Lower limit for the number of resource units in each availability zone.
  //
  // If not specified previously (using other instruments such as management console), the default value is 2.
  // To revert to it, specify it explicitly.
  //
  // The minimum value is 2.
  int64 min_zone_size = 1 [(value) = "0-1000"];

  // Upper limit for the total number of resource units across all availability zones.
  //
  // If a positive value is specified, it must be at least [min_zone_size] multiplied by the size of
  // [AllocationPolicy.locations].
  //
  // If the value is 0, there is no upper limit.
  int64 max_size = 2 [(value) = "0-1000"];
}