1 // Copyright 2016 Google Inc.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
17 package google.appengine.v1;
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";
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";
35 // Manages instances of a version.
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"
44 // Gets instance information.
45 rpc GetInstance(GetInstanceRequest) returns (Instance) {
46 option (google.api.http) = {
47 get: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
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/*}"
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
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"
76 // Manages versions of a service.
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"
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/*}"
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"
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:
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/*}"
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/*}"
135 // Manages services of an application.
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"
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/*}"
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/*}"
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/*}"
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/*}"
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"
191 // Request message for `Applications.GetApplication`.
192 message GetApplicationRequest {
193 // Name of the Application resource to get. Example: `apps/myapp`.
197 // Request message for 'Applications.RepairApplication'.
198 message RepairApplicationRequest {
199 // Name of the application to repair. Example: `apps/myapp`
203 // Request message for `Services.ListServices`.
204 message ListServicesRequest {
205 // Name of the parent Application resource. Example: `apps/myapp`.
208 // Maximum results to return per page.
211 // Continuation token for fetching the next page of results.
212 string page_token = 3;
215 // Response message for `Services.ListServices`.
216 message ListServicesResponse {
217 // The services belonging to the requested application.
218 repeated Service services = 1;
220 // Continuation token for fetching the next page of results.
221 string next_page_token = 2;
224 // Request message for `Services.GetService`.
225 message GetServiceRequest {
226 // Name of the resource requested. Example: `apps/myapp/services/default`.
230 // Request message for `Services.UpdateService`.
231 message UpdateServiceRequest {
232 // Name of the resource to update. Example: `apps/myapp/services/default`.
235 // A Service resource containing the updated service. Only fields set in the
236 // field mask will be updated.
239 // Standard field mask for the set of fields to be updated.
240 google.protobuf.FieldMask update_mask = 3;
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
247 // requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype)
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;
260 // Request message for `Services.DeleteService`.
261 message DeleteServiceRequest {
262 // Name of the resource requested. Example: `apps/myapp/services/default`.
266 // Request message for `Versions.ListVersions`.
267 message ListVersionsRequest {
268 // Name of the parent Service resource. Example:
269 // `apps/myapp/services/default`.
272 // Controls the set of fields returned in the `List` response.
273 VersionView view = 2;
275 // Maximum results to return per page.
278 // Continuation token for fetching the next page of results.
279 string page_token = 4;
282 // Response message for `Versions.ListVersions`.
283 message ListVersionsResponse {
284 // The versions belonging to the requested service.
285 repeated Version versions = 1;
287 // Continuation token for fetching the next page of results.
288 string next_page_token = 2;
291 // Request message for `Versions.GetVersion`.
292 message GetVersionRequest {
293 // Name of the resource requested. Example:
294 // `apps/myapp/services/default/versions/v1`.
297 // Controls the set of fields returned in the `Get` response.
298 VersionView view = 2;
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`.
307 // Application deployment configuration.
311 // Request message for `Versions.UpdateVersion`.
312 message UpdateVersionRequest {
313 // Name of the resource to update. Example:
314 // `apps/myapp/services/default/versions/1`.
317 // A Version containing the updated resource. Only fields set in the field
318 // mask will be updated.
321 // Standard field mask for the set of fields to be updated.
322 google.protobuf.FieldMask update_mask = 3;
325 // Request message for `Versions.DeleteVersion`.
326 message DeleteVersionRequest {
327 // Name of the resource requested. Example:
328 // `apps/myapp/services/default/versions/v1`.
332 // Request message for `Instances.ListInstances`.
333 message ListInstancesRequest {
334 // Name of the parent Version resource. Example:
335 // `apps/myapp/services/default/versions/v1`.
338 // Maximum results to return per page.
341 // Continuation token for fetching the next page of results.
342 string page_token = 3;
345 // Response message for `Instances.ListInstances`.
346 message ListInstancesResponse {
347 // The instances belonging to the requested version.
348 repeated Instance instances = 1;
350 // Continuation token for fetching the next page of results.
351 string next_page_token = 2;
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`.
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`.
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`.
375 // Fields that should be returned when [Version][google.appengine.v1.Version]
376 // resources are retreived.
378 // Basic version information including scaling and inbound services,
379 // but not detailed deployment information.
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.