Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / appengine / v1 / appengine.proto
1 // Copyright 2016 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.appengine.v1;
18
19 import "google/api/annotations.proto";
20 import "google/appengine/v1/application.proto";
21 import "google/appengine/v1/instance.proto";
22 import "google/appengine/v1/service.proto";
23 import "google/appengine/v1/version.proto";
24 import "google/iam/v1/iam_policy.proto";
25 import "google/iam/v1/policy.proto";
26 import "google/longrunning/operations.proto";
27 import "google/protobuf/empty.proto";
28 import "google/protobuf/field_mask.proto";
29
30 option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
31 option java_multiple_files = true;
32 option java_outer_classname = "AppengineProto";
33 option java_package = "com.google.appengine.v1";
34
35 // Manages instances of a version.
36 service Instances {
37   // Lists the instances of a version.
38   rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
39     option (google.api.http) = {
40       get: "/v1/{parent=apps/*/services/*/versions/*}/instances"
41     };
42   }
43
44   // Gets instance information.
45   rpc GetInstance(GetInstanceRequest) returns (Instance) {
46     option (google.api.http) = {
47       get: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
48     };
49   }
50
51   // Stops a running instance.
52   rpc DeleteInstance(DeleteInstanceRequest)
53       returns (google.longrunning.Operation) {
54     option (google.api.http) = {
55       delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
56     };
57   }
58
59   // Enables debugging on a VM instance. This allows you to use the SSH
60   // command to connect to the virtual machine where the instance lives.
61   // While in "debug mode", the instance continues to serve live traffic.
62   // You should delete the instance when you are done debugging and then
63   // allow the system to take over and determine if another instance
64   // should be started.
65   //
66   // Only applicable for instances in App Engine flexible environment.
67   rpc DebugInstance(DebugInstanceRequest)
68       returns (google.longrunning.Operation) {
69     option (google.api.http) = {
70       post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug"
71       body: "*"
72     };
73   }
74 }
75
76 // Manages versions of a service.
77 service Versions {
78   // Lists the versions of a service.
79   rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
80     option (google.api.http) = {
81       get: "/v1/{parent=apps/*/services/*}/versions"
82     };
83   }
84
85   // Gets the specified Version resource.
86   // By default, only a `BASIC_VIEW` will be returned.
87   // Specify the `FULL_VIEW` parameter to get the full resource.
88   rpc GetVersion(GetVersionRequest) returns (Version) {
89     option (google.api.http) = {
90       get: "/v1/{name=apps/*/services/*/versions/*}"
91     };
92   }
93
94   // Deploys code and resource files to a new version.
95   rpc CreateVersion(CreateVersionRequest)
96       returns (google.longrunning.Operation) {
97     option (google.api.http) = {
98       post: "/v1/{parent=apps/*/services/*}/versions"
99       body: "version"
100     };
101   }
102
103   // Updates the specified Version resource.
104   // You can specify the following fields depending on the App Engine
105   // environment and type of scaling that the version resource uses:
106   //
107   // * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status):
108   //   For Version resources that use basic scaling, manual scaling, or run in
109   //   the App Engine flexible environment.
110   // * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class):
111   //   For Version resources that run in the App Engine standard environment.
112   // * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling):
113   //   For Version resources that use automatic scaling and run in the App
114   //   Engine standard environment.
115   // * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling):
116   //   For Version resources that use automatic scaling and run in the App
117   //   Engine standard environment.
118   rpc UpdateVersion(UpdateVersionRequest)
119       returns (google.longrunning.Operation) {
120     option (google.api.http) = {
121       patch: "/v1/{name=apps/*/services/*/versions/*}"
122       body: "version"
123     };
124   }
125
126   // Deletes an existing Version resource.
127   rpc DeleteVersion(DeleteVersionRequest)
128       returns (google.longrunning.Operation) {
129     option (google.api.http) = {
130       delete: "/v1/{name=apps/*/services/*/versions/*}"
131     };
132   }
133 }
134
135 // Manages services of an application.
136 service Services {
137   // Lists all the services in the application.
138   rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
139     option (google.api.http) = {
140       get: "/v1/{parent=apps/*}/services"
141     };
142   }
143
144   // Gets the current configuration of the specified service.
145   rpc GetService(GetServiceRequest) returns (Service) {
146     option (google.api.http) = {
147       get: "/v1/{name=apps/*/services/*}"
148     };
149   }
150
151   // Updates the configuration of the specified service.
152   rpc UpdateService(UpdateServiceRequest)
153       returns (google.longrunning.Operation) {
154     option (google.api.http) = {
155       patch: "/v1/{name=apps/*/services/*}"
156       body: "service"
157     };
158   }
159
160   // Deletes the specified service and all enclosed versions.
161   rpc DeleteService(DeleteServiceRequest)
162       returns (google.longrunning.Operation) {
163     option (google.api.http) = {
164       delete: "/v1/{name=apps/*/services/*}"
165     };
166   }
167 }
168
169 // Manages App Engine applications.
170 service Applications {
171   // Gets information about an application.
172   rpc GetApplication(GetApplicationRequest) returns (Application) {
173     option (google.api.http) = {
174       get: "/v1/{name=apps/*}"
175     };
176   }
177
178   // Recreates the required App Engine features for the application in your
179   // project, for example a Cloud Storage bucket or App Engine service account.
180   // Use this method if you receive an error message about a missing feature,
181   // for example "*Error retrieving the App Engine service account*".
182   rpc RepairApplication(RepairApplicationRequest)
183       returns (google.longrunning.Operation) {
184     option (google.api.http) = {
185       post: "/v1/{name=apps/*}:repair"
186       body: "*"
187     };
188   }
189 }
190
191 // Request message for `Applications.GetApplication`.
192 message GetApplicationRequest {
193   // Name of the Application resource to get. Example: `apps/myapp`.
194   string name = 1;
195 }
196
197 // Request message for 'Applications.RepairApplication'.
198 message RepairApplicationRequest {
199   // Name of the application to repair. Example: `apps/myapp`
200   string name = 1;
201 }
202
203 // Request message for `Services.ListServices`.
204 message ListServicesRequest {
205   // Name of the parent Application resource. Example: `apps/myapp`.
206   string parent = 1;
207
208   // Maximum results to return per page.
209   int32 page_size = 2;
210
211   // Continuation token for fetching the next page of results.
212   string page_token = 3;
213 }
214
215 // Response message for `Services.ListServices`.
216 message ListServicesResponse {
217   // The services belonging to the requested application.
218   repeated Service services = 1;
219
220   // Continuation token for fetching the next page of results.
221   string next_page_token = 2;
222 }
223
224 // Request message for `Services.GetService`.
225 message GetServiceRequest {
226   // Name of the resource requested. Example: `apps/myapp/services/default`.
227   string name = 1;
228 }
229
230 // Request message for `Services.UpdateService`.
231 message UpdateServiceRequest {
232   // Name of the resource to update. Example: `apps/myapp/services/default`.
233   string name = 1;
234
235   // A Service resource containing the updated service. Only fields set in the
236   // field mask will be updated.
237   Service service = 2;
238
239   // Standard field mask for the set of fields to be updated.
240   google.protobuf.FieldMask update_mask = 3;
241
242   // Set to `true` to gradually shift traffic from one version to another
243   // single version. By default, traffic is shifted immediately.
244   // For gradual traffic migration, the target version
245   // must be located within instances that are configured for both
246   // [warmup
247   // requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype)
248   // and
249   // [automatic
250   // scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling).
251   // You must specify the
252   // [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby)
253   // field in the Service resource. Gradual traffic migration is not
254   // supported in the App Engine flexible environment. For examples, see
255   // [Migrating and Splitting
256   // Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
257   bool migrate_traffic = 4;
258 }
259
260 // Request message for `Services.DeleteService`.
261 message DeleteServiceRequest {
262   // Name of the resource requested. Example: `apps/myapp/services/default`.
263   string name = 1;
264 }
265
266 // Request message for `Versions.ListVersions`.
267 message ListVersionsRequest {
268   // Name of the parent Service resource. Example:
269   // `apps/myapp/services/default`.
270   string parent = 1;
271
272   // Controls the set of fields returned in the `List` response.
273   VersionView view = 2;
274
275   // Maximum results to return per page.
276   int32 page_size = 3;
277
278   // Continuation token for fetching the next page of results.
279   string page_token = 4;
280 }
281
282 // Response message for `Versions.ListVersions`.
283 message ListVersionsResponse {
284   // The versions belonging to the requested service.
285   repeated Version versions = 1;
286
287   // Continuation token for fetching the next page of results.
288   string next_page_token = 2;
289 }
290
291 // Request message for `Versions.GetVersion`.
292 message GetVersionRequest {
293   // Name of the resource requested. Example:
294   // `apps/myapp/services/default/versions/v1`.
295   string name = 1;
296
297   // Controls the set of fields returned in the `Get` response.
298   VersionView view = 2;
299 }
300
301 // Request message for `Versions.CreateVersion`.
302 message CreateVersionRequest {
303   // Name of the parent resource to create this version under. Example:
304   // `apps/myapp/services/default`.
305   string parent = 1;
306
307   // Application deployment configuration.
308   Version version = 2;
309 }
310
311 // Request message for `Versions.UpdateVersion`.
312 message UpdateVersionRequest {
313   // Name of the resource to update. Example:
314   // `apps/myapp/services/default/versions/1`.
315   string name = 1;
316
317   // A Version containing the updated resource. Only fields set in the field
318   // mask will be updated.
319   Version version = 2;
320
321   // Standard field mask for the set of fields to be updated.
322   google.protobuf.FieldMask update_mask = 3;
323 }
324
325 // Request message for `Versions.DeleteVersion`.
326 message DeleteVersionRequest {
327   // Name of the resource requested. Example:
328   // `apps/myapp/services/default/versions/v1`.
329   string name = 1;
330 }
331
332 // Request message for `Instances.ListInstances`.
333 message ListInstancesRequest {
334   // Name of the parent Version resource. Example:
335   // `apps/myapp/services/default/versions/v1`.
336   string parent = 1;
337
338   // Maximum results to return per page.
339   int32 page_size = 2;
340
341   // Continuation token for fetching the next page of results.
342   string page_token = 3;
343 }
344
345 // Response message for `Instances.ListInstances`.
346 message ListInstancesResponse {
347   // The instances belonging to the requested version.
348   repeated Instance instances = 1;
349
350   // Continuation token for fetching the next page of results.
351   string next_page_token = 2;
352 }
353
354 // Request message for `Instances.GetInstance`.
355 message GetInstanceRequest {
356   // Name of the resource requested. Example:
357   // `apps/myapp/services/default/versions/v1/instances/instance-1`.
358   string name = 1;
359 }
360
361 // Request message for `Instances.DeleteInstance`.
362 message DeleteInstanceRequest {
363   // Name of the resource requested. Example:
364   // `apps/myapp/services/default/versions/v1/instances/instance-1`.
365   string name = 1;
366 }
367
368 // Request message for `Instances.DebugInstance`.
369 message DebugInstanceRequest {
370   // Name of the resource requested. Example:
371   // `apps/myapp/services/default/versions/v1/instances/instance-1`.
372   string name = 1;
373 }
374
375 // Fields that should be returned when [Version][google.appengine.v1.Version]
376 // resources are retreived.
377 enum VersionView {
378   // Basic version information including scaling and inbound services,
379   // but not detailed deployment information.
380   BASIC = 0;
381
382   // The information from `BASIC`, plus detailed information about the
383   // deployment. This format is required when creating resources, but
384   // is not returned in `Get` or `List` by default.
385   FULL = 1;
386 }