aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/googleapis/google/appengine/v1/version.proto
blob: b32e1ac5fbb764aad6d7ff925e24427f807b8cb5 (plain)
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
// Copyright 2016 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.appengine.v1;

import "google/api/annotations.proto";
import "google/appengine/v1/app_yaml.proto";
import "google/appengine/v1/deploy.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "VersionProto";
option java_package = "com.google.appengine.v1";


// A Version resource is a specific set of source code and configuration files
// that are deployed into a service.
message Version {
  // Full path to the Version resource in the API.  Example:
  // `apps/myapp/services/default/versions/v1`.
  //
  // @OutputOnly
  string name = 1;

  // Relative name of the version within the service.  Example: `v1`.
  // Version names can contain only lowercase letters, numbers, or hyphens.
  // Reserved names: "default", "latest", and any name with the prefix "ah-".
  string id = 2;

  // Controls how instances are created.
  //
  // Defaults to `AutomaticScaling`.
  oneof scaling {
    // Automatic scaling is based on request rate, response latencies, and other
    // application metrics.
    AutomaticScaling automatic_scaling = 3;

    // A service with basic scaling will create an instance when the application
    // receives a request. The instance will be turned down when the app becomes
    // idle. Basic scaling is ideal for work that is intermittent or driven by
    // user activity.
    BasicScaling basic_scaling = 4;

    // A service with manual scaling runs continuously, allowing you to perform
    // complex initialization and rely on the state of its memory over time.
    ManualScaling manual_scaling = 5;
  }

  // Before an application can receive email or XMPP messages, the application
  // must be configured to enable the service.
  repeated InboundServiceType inbound_services = 6;

  // Instance class that is used to run this version. Valid values are:
  // * AutomaticScaling: `F1`, `F2`, `F4`, `F4_1G`
  // * ManualScaling or BasicScaling: `B1`, `B2`, `B4`, `B8`, `B4_1G`
  //
  // Defaults to `F1` for AutomaticScaling and `B1` for ManualScaling or
  // BasicScaling.
  string instance_class = 7;

  // Extra network settings. Only applicable for VM runtimes.
  Network network = 8;

  // Machine resources for this version. Only applicable for VM runtimes.
  Resources resources = 9;

  // Desired runtime. Example: `python27`.
  string runtime = 10;

  // Whether multiple requests can be dispatched to this version at once.
  bool threadsafe = 11;

  // Whether to deploy this version in a container on a virtual machine.
  bool vm = 12;

  // Metadata settings that are supplied to this version to enable
  // beta runtime features.
  map<string, string> beta_settings = 13;

  // App Engine execution environment for this version.
  //
  // Defaults to `standard`.
  string env = 14;

  // Current serving status of this version. Only the versions with a
  // `SERVING` status create instances and can be billed.
  //
  // `SERVING_STATUS_UNSPECIFIED` is an invalid value. Defaults to `SERVING`.
  ServingStatus serving_status = 15;

  // Email address of the user who created this version.
  //
  // @OutputOnly
  string created_by = 16;

  // Time that this version was created.
  //
  // @OutputOnly
  google.protobuf.Timestamp create_time = 17;

  // Total size in bytes of all the files that are included in this version
  // and curerntly hosted on the App Engine disk.
  //
  // @OutputOnly
  int64 disk_usage_bytes = 18;

  // An ordered list of URL-matching patterns that should be applied to incoming
  // requests. The first matching URL handles the request and other request
  // handlers are not attempted.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  repeated UrlMap handlers = 100;

  // Custom static error pages. Limited to 10KB per page.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  repeated ErrorHandler error_handlers = 101;

  // Configuration for third-party Python runtime libraries that are required
  // by the application.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  repeated Library libraries = 102;

  // Serving configuration for
  // [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/).
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  ApiConfigHandler api_config = 103;

  // Environment variables available to the application.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  map<string, string> env_variables = 104;

  // Duration that static files should be cached by web proxies and browsers.
  // Only applicable if the corresponding
  // [StaticFilesHandler](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#staticfileshandler)
  // does not specify its own expiration time.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  google.protobuf.Duration default_expiration = 105;

  // Configures health checking for VM instances. Unhealthy instances are
  // stopped and replaced with new instances. Only applicable for VM
  // runtimes.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  HealthCheck health_check = 106;

  // Files that match this pattern will not be built into this version.
  // Only applicable for Go runtimes.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  string nobuild_files_regex = 107;

  // Code and application artifacts that make up this version.
  //
  // Only returned in `GET` requests if `view=FULL` is set.
  Deployment deployment = 108;

  // Serving URL for this version. Example:
  // "https://myversion-dot-myservice-dot-myapp.appspot.com"
  //
  // @OutputOnly
  string version_url = 109;
}

// Automatic scaling is based on request rate, response latencies, and other
// application metrics.
message AutomaticScaling {
  // Amount of time that the
  // [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/)
  // should wait between changes to the number of virtual machines.
  // Only applicable for VM runtimes.
  google.protobuf.Duration cool_down_period = 1;

  // Target scaling by CPU usage.
  CpuUtilization cpu_utilization = 2;

  // Number of concurrent requests an automatic scaling instance can accept
  // before the scheduler spawns a new instance.
  //
  // Defaults to a runtime-specific value.
  int32 max_concurrent_requests = 3;

  // Maximum number of idle instances that should be maintained for this
  // version.
  int32 max_idle_instances = 4;

  // Maximum number of instances that should be started to handle requests.
  int32 max_total_instances = 5;

  // Maximum amount of time that a request should wait in the pending queue
  // before starting a new instance to handle it.
  google.protobuf.Duration max_pending_latency = 6;

  // Minimum number of idle instances that should be maintained for
  // this version. Only applicable for the default version of a service.
  int32 min_idle_instances = 7;

  // Minimum number of instances that should be maintained for this version.
  int32 min_total_instances = 8;

  // Minimum amount of time a request should wait in the pending queue before
  // starting a new instance to handle it.
  google.protobuf.Duration min_pending_latency = 9;

  // Target scaling by request utilization.
  RequestUtilization request_utilization = 10;

  // Target scaling by disk usage.
  DiskUtilization disk_utilization = 11;

  // Target scaling by network usage.
  NetworkUtilization network_utilization = 12;
}

// A service with basic scaling will create an instance when the application
// receives a request. The instance will be turned down when the app becomes
// idle. Basic scaling is ideal for work that is intermittent or driven by
// user activity.
message BasicScaling {
  // Duration of time after the last request that an instance must wait before
  // the instance is shut down.
  google.protobuf.Duration idle_timeout = 1;

  // Maximum number of instances to create for this version.
  int32 max_instances = 2;
}

// A service with manual scaling runs continuously, allowing you to perform
// complex initialization and rely on the state of its memory over time.
message ManualScaling {
  // Number of instances to assign to the service at the start. This number
  // can later be altered by using the
  // [Modules API](https://cloud.google.com/appengine/docs/python/modules/functions)
  // `set_num_instances()` function.
  int32 instances = 1;
}

// Target scaling by CPU usage.
message CpuUtilization {
  // Period of time over which CPU utilization is calculated.
  google.protobuf.Duration aggregation_window_length = 1;

  // Target CPU utilization ratio to maintain when scaling. Must be between 0
  // and 1.
  double target_utilization = 2;
}

// Target scaling by request utilization. Only applicable for VM runtimes.
message RequestUtilization {
  // Target requests per second.
  int32 target_request_count_per_second = 1;

  // Target number of concurrent requests.
  int32 target_concurrent_requests = 2;
}

// Target scaling by disk usage. Only applicable for VM runtimes.
message DiskUtilization {
  // Target bytes written per second.
  int32 target_write_bytes_per_second = 14;

  // Target ops written per second.
  int32 target_write_ops_per_second = 15;

  // Target bytes read per second.
  int32 target_read_bytes_per_second = 16;

  // Target ops read per seconds.
  int32 target_read_ops_per_second = 17;
}

// Target scaling by network usage. Only applicable for VM runtimes.
message NetworkUtilization {
  // Target bytes sent per second.
  int32 target_sent_bytes_per_second = 1;

  // Target packets sent per second.
  int32 target_sent_packets_per_second = 11;

  // Target bytes received per second.
  int32 target_received_bytes_per_second = 12;

  // Target packets received per second.
  int32 target_received_packets_per_second = 13;
}

// Extra network settings. Only applicable for VM runtimes.
message Network {
  // List of ports, or port pairs, to forward from the virtual machine to the
  // application container.
  repeated string forwarded_ports = 1;

  // Tag to apply to the VM instance during creation.
  string instance_tag = 2;

  // Google Cloud Platform network where the virtual machines are created.
  // Specify the short name, not the resource path.
  //
  // Defaults to `default`.
  string name = 3;
}

// Machine resources for a version.
message Resources {
  // Number of CPU cores needed.
  double cpu = 1;

  // Disk size (GB) needed.
  double disk_gb = 2;

  // Memory (GB) needed.
  double memory_gb = 3;
}

// Available inbound services.
enum InboundServiceType {
  // Not specified.
  INBOUND_SERVICE_UNSPECIFIED = 0;

  // Allows an application to receive mail.
  INBOUND_SERVICE_MAIL = 1;

  // Allows an application to receive email-bound notifications.
  INBOUND_SERVICE_MAIL_BOUNCE = 2;

  // Allows an application to receive error stanzas.
  INBOUND_SERVICE_XMPP_ERROR = 3;

  // Allows an application to receive instant messages.
  INBOUND_SERVICE_XMPP_MESSAGE = 4;

  // Allows an application to receive user subscription POSTs.
  INBOUND_SERVICE_XMPP_SUBSCRIBE = 5;

  // Allows an application to receive a user's chat presence.
  INBOUND_SERVICE_XMPP_PRESENCE = 6;

  // Registers an application for notifications when a client connects or
  // disconnects from a channel.
  INBOUND_SERVICE_CHANNEL_PRESENCE = 7;

  // Enables warmup requests.
  INBOUND_SERVICE_WARMUP = 9;
}

// Run states of a version.
enum ServingStatus {
  // Not specified.
  SERVING_STATUS_UNSPECIFIED = 0;

  // Currently serving. Instances are created according to the
  // scaling settings of the version.
  SERVING = 1;

  // Disabled. No instances will be created and the scaling
  // settings are ignored until the state of the version changes
  // to `SERVING`.
  STOPPED = 2;
}