appengine.proto 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008
  1. // Copyright 2022 Google LLC
  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. syntax = "proto3";
  15. package google.appengine.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/appengine/v1/application.proto";
  19. import "google/appengine/v1/certificate.proto";
  20. import "google/appengine/v1/domain.proto";
  21. import "google/appengine/v1/domain_mapping.proto";
  22. import "google/appengine/v1/firewall.proto";
  23. import "google/appengine/v1/instance.proto";
  24. import "google/appengine/v1/service.proto";
  25. import "google/appengine/v1/version.proto";
  26. import "google/longrunning/operations.proto";
  27. import "google/protobuf/empty.proto";
  28. import "google/protobuf/field_mask.proto";
  29. option csharp_namespace = "Google.Cloud.AppEngine.V1";
  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. option php_namespace = "Google\\Cloud\\AppEngine\\V1";
  35. option ruby_package = "Google::Cloud::AppEngine::V1";
  36. // Manages App Engine applications.
  37. service Applications {
  38. option (google.api.default_host) = "appengine.googleapis.com";
  39. option (google.api.oauth_scopes) =
  40. "https://www.googleapis.com/auth/appengine.admin,"
  41. "https://www.googleapis.com/auth/cloud-platform,"
  42. "https://www.googleapis.com/auth/cloud-platform.read-only";
  43. // Gets information about an application.
  44. rpc GetApplication(GetApplicationRequest) returns (Application) {
  45. option (google.api.http) = {
  46. get: "/v1/{name=apps/*}"
  47. };
  48. option (google.api.method_signature) = "name";
  49. }
  50. // Creates an App Engine application for a Google Cloud Platform project.
  51. // Required fields:
  52. //
  53. // * `id` - The ID of the target Cloud Platform project.
  54. // * *location* - The [region](https://cloud.google.com/appengine/docs/locations) where you want the App Engine application located.
  55. //
  56. // For more information about App Engine applications, see [Managing Projects, Applications, and Billing](https://cloud.google.com/appengine/docs/standard/python/console/).
  57. rpc CreateApplication(CreateApplicationRequest) returns (google.longrunning.Operation) {
  58. option (google.api.http) = {
  59. post: "/v1/apps"
  60. body: "application"
  61. };
  62. option (google.longrunning.operation_info) = {
  63. response_type: "Application"
  64. metadata_type: "OperationMetadataV1"
  65. };
  66. }
  67. // Updates the specified Application resource.
  68. // You can update the following fields:
  69. //
  70. // * `auth_domain` - Google authentication domain for controlling user access to the application.
  71. // * `default_cookie_expiration` - Cookie expiration policy for the application.
  72. // * `iap` - Identity-Aware Proxy properties for the application.
  73. rpc UpdateApplication(UpdateApplicationRequest) returns (google.longrunning.Operation) {
  74. option (google.api.http) = {
  75. patch: "/v1/{name=apps/*}"
  76. body: "application"
  77. };
  78. option (google.longrunning.operation_info) = {
  79. response_type: "Application"
  80. metadata_type: "OperationMetadataV1"
  81. };
  82. }
  83. // Recreates the required App Engine features for the specified App Engine
  84. // application, for example a Cloud Storage bucket or App Engine service
  85. // account.
  86. // Use this method if you receive an error message about a missing feature,
  87. // for example, *Error retrieving the App Engine service account*.
  88. // If you have deleted your App Engine service account, this will
  89. // not be able to recreate it. Instead, you should attempt to use the
  90. // IAM undelete API if possible at https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts/undelete?apix_params=%7B"name"%3A"projects%2F-%2FserviceAccounts%2Funique_id"%2C"resource"%3A%7B%7D%7D .
  91. // If the deletion was recent, the numeric ID can be found in the Cloud
  92. // Console Activity Log.
  93. rpc RepairApplication(RepairApplicationRequest) returns (google.longrunning.Operation) {
  94. option (google.api.http) = {
  95. post: "/v1/{name=apps/*}:repair"
  96. body: "*"
  97. };
  98. option (google.longrunning.operation_info) = {
  99. response_type: "Application"
  100. metadata_type: "OperationMetadataV1"
  101. };
  102. }
  103. }
  104. // Request message for `Applications.GetApplication`.
  105. message GetApplicationRequest {
  106. // Name of the Application resource to get. Example: `apps/myapp`.
  107. string name = 1;
  108. }
  109. // Request message for `Applications.CreateApplication`.
  110. message CreateApplicationRequest {
  111. // Application configuration.
  112. Application application = 2;
  113. }
  114. // Request message for `Applications.UpdateApplication`.
  115. message UpdateApplicationRequest {
  116. // Name of the Application resource to update. Example: `apps/myapp`.
  117. string name = 1;
  118. // An Application containing the updated resource.
  119. Application application = 2;
  120. // Required. Standard field mask for the set of fields to be updated.
  121. google.protobuf.FieldMask update_mask = 3;
  122. }
  123. // Request message for 'Applications.RepairApplication'.
  124. message RepairApplicationRequest {
  125. // Name of the application to repair. Example: `apps/myapp`
  126. string name = 1;
  127. }
  128. // Manages services of an application.
  129. service Services {
  130. option (google.api.default_host) = "appengine.googleapis.com";
  131. option (google.api.oauth_scopes) =
  132. "https://www.googleapis.com/auth/appengine.admin,"
  133. "https://www.googleapis.com/auth/cloud-platform,"
  134. "https://www.googleapis.com/auth/cloud-platform.read-only";
  135. // Lists all the services in the application.
  136. rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
  137. option (google.api.http) = {
  138. get: "/v1/{parent=apps/*}/services"
  139. };
  140. }
  141. // Gets the current configuration of the specified service.
  142. rpc GetService(GetServiceRequest) returns (Service) {
  143. option (google.api.http) = {
  144. get: "/v1/{name=apps/*/services/*}"
  145. };
  146. }
  147. // Updates the configuration of the specified service.
  148. rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) {
  149. option (google.api.http) = {
  150. patch: "/v1/{name=apps/*/services/*}"
  151. body: "service"
  152. };
  153. option (google.longrunning.operation_info) = {
  154. response_type: "Service"
  155. metadata_type: "OperationMetadataV1"
  156. };
  157. }
  158. // Deletes the specified service and all enclosed versions.
  159. rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) {
  160. option (google.api.http) = {
  161. delete: "/v1/{name=apps/*/services/*}"
  162. };
  163. option (google.longrunning.operation_info) = {
  164. response_type: "google.protobuf.Empty"
  165. metadata_type: "OperationMetadataV1"
  166. };
  167. }
  168. }
  169. // Request message for `Services.ListServices`.
  170. message ListServicesRequest {
  171. // Name of the parent Application resource. Example: `apps/myapp`.
  172. string parent = 1;
  173. // Maximum results to return per page.
  174. int32 page_size = 2;
  175. // Continuation token for fetching the next page of results.
  176. string page_token = 3;
  177. }
  178. // Response message for `Services.ListServices`.
  179. message ListServicesResponse {
  180. // The services belonging to the requested application.
  181. repeated Service services = 1;
  182. // Continuation token for fetching the next page of results.
  183. string next_page_token = 2;
  184. }
  185. // Request message for `Services.GetService`.
  186. message GetServiceRequest {
  187. // Name of the resource requested. Example: `apps/myapp/services/default`.
  188. string name = 1;
  189. }
  190. // Request message for `Services.UpdateService`.
  191. message UpdateServiceRequest {
  192. // Name of the resource to update. Example: `apps/myapp/services/default`.
  193. string name = 1;
  194. // A Service resource containing the updated service. Only fields set in the
  195. // field mask will be updated.
  196. Service service = 2;
  197. // Required. Standard field mask for the set of fields to be updated.
  198. google.protobuf.FieldMask update_mask = 3;
  199. // Set to `true` to gradually shift traffic to one or more versions that you
  200. // specify. By default, traffic is shifted immediately.
  201. // For gradual traffic migration, the target versions
  202. // must be located within instances that are configured for both
  203. // [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#InboundServiceType)
  204. // and
  205. // [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#AutomaticScaling).
  206. // You must specify the
  207. // [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#ShardBy)
  208. // field in the Service resource. Gradual traffic migration is not
  209. // supported in the App Engine flexible environment. For examples, see
  210. // [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
  211. bool migrate_traffic = 4;
  212. }
  213. // Request message for `Services.DeleteService`.
  214. message DeleteServiceRequest {
  215. // Name of the resource requested. Example: `apps/myapp/services/default`.
  216. string name = 1;
  217. }
  218. // Manages versions of a service.
  219. service Versions {
  220. option (google.api.default_host) = "appengine.googleapis.com";
  221. option (google.api.oauth_scopes) =
  222. "https://www.googleapis.com/auth/appengine.admin,"
  223. "https://www.googleapis.com/auth/cloud-platform,"
  224. "https://www.googleapis.com/auth/cloud-platform.read-only";
  225. // Lists the versions of a service.
  226. rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
  227. option (google.api.http) = {
  228. get: "/v1/{parent=apps/*/services/*}/versions"
  229. };
  230. }
  231. // Gets the specified Version resource.
  232. // By default, only a `BASIC_VIEW` will be returned.
  233. // Specify the `FULL_VIEW` parameter to get the full resource.
  234. rpc GetVersion(GetVersionRequest) returns (Version) {
  235. option (google.api.http) = {
  236. get: "/v1/{name=apps/*/services/*/versions/*}"
  237. };
  238. }
  239. // Deploys code and resource files to a new version.
  240. rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) {
  241. option (google.api.http) = {
  242. post: "/v1/{parent=apps/*/services/*}/versions"
  243. body: "version"
  244. };
  245. option (google.longrunning.operation_info) = {
  246. response_type: "Version"
  247. metadata_type: "CreateVersionMetadataV1"
  248. };
  249. }
  250. // Updates the specified Version resource.
  251. // You can specify the following fields depending on the App Engine
  252. // environment and type of scaling that the version resource uses:
  253. //
  254. // **Standard environment**
  255. //
  256. // * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class)
  257. //
  258. // *automatic scaling* in the standard environment:
  259. //
  260. // * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
  261. // * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
  262. // * [`automaticScaling.standard_scheduler_settings.max_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
  263. // * [`automaticScaling.standard_scheduler_settings.min_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
  264. // * [`automaticScaling.standard_scheduler_settings.target_cpu_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
  265. // * [`automaticScaling.standard_scheduler_settings.target_throughput_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#StandardSchedulerSettings)
  266. //
  267. // *basic scaling* or *manual scaling* in the standard environment:
  268. //
  269. // * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
  270. // * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
  271. //
  272. // **Flexible environment**
  273. //
  274. // * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status)
  275. //
  276. // *automatic scaling* in the flexible environment:
  277. //
  278. // * [`automatic_scaling.min_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
  279. // * [`automatic_scaling.max_total_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
  280. // * [`automatic_scaling.cool_down_period_sec`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
  281. // * [`automatic_scaling.cpu_utilization.target_utilization`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling)
  282. //
  283. // *manual scaling* in the flexible environment:
  284. //
  285. // * [`manual_scaling.instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#manualscaling)
  286. rpc UpdateVersion(UpdateVersionRequest) returns (google.longrunning.Operation) {
  287. option (google.api.http) = {
  288. patch: "/v1/{name=apps/*/services/*/versions/*}"
  289. body: "version"
  290. };
  291. option (google.longrunning.operation_info) = {
  292. response_type: "Version"
  293. metadata_type: "OperationMetadataV1"
  294. };
  295. }
  296. // Deletes an existing Version resource.
  297. rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) {
  298. option (google.api.http) = {
  299. delete: "/v1/{name=apps/*/services/*/versions/*}"
  300. };
  301. option (google.longrunning.operation_info) = {
  302. response_type: "google.protobuf.Empty"
  303. metadata_type: "OperationMetadataV1"
  304. };
  305. }
  306. }
  307. // Request message for `Versions.ListVersions`.
  308. message ListVersionsRequest {
  309. // Name of the parent Service resource. Example:
  310. // `apps/myapp/services/default`.
  311. string parent = 1;
  312. // Controls the set of fields returned in the `List` response.
  313. VersionView view = 2;
  314. // Maximum results to return per page.
  315. int32 page_size = 3;
  316. // Continuation token for fetching the next page of results.
  317. string page_token = 4;
  318. }
  319. // Response message for `Versions.ListVersions`.
  320. message ListVersionsResponse {
  321. // The versions belonging to the requested service.
  322. repeated Version versions = 1;
  323. // Continuation token for fetching the next page of results.
  324. string next_page_token = 2;
  325. }
  326. // Fields that should be returned when [Version][google.appengine.v1.Version] resources
  327. // are retrieved.
  328. enum VersionView {
  329. // Basic version information including scaling and inbound services,
  330. // but not detailed deployment information.
  331. BASIC = 0;
  332. // The information from `BASIC`, plus detailed information about the
  333. // deployment. This format is required when creating resources, but
  334. // is not returned in `Get` or `List` by default.
  335. FULL = 1;
  336. }
  337. // Request message for `Versions.GetVersion`.
  338. message GetVersionRequest {
  339. // Name of the resource requested. Example:
  340. // `apps/myapp/services/default/versions/v1`.
  341. string name = 1;
  342. // Controls the set of fields returned in the `Get` response.
  343. VersionView view = 2;
  344. }
  345. // Request message for `Versions.CreateVersion`.
  346. message CreateVersionRequest {
  347. // Name of the parent resource to create this version under. Example:
  348. // `apps/myapp/services/default`.
  349. string parent = 1;
  350. // Application deployment configuration.
  351. Version version = 2;
  352. }
  353. // Request message for `Versions.UpdateVersion`.
  354. message UpdateVersionRequest {
  355. // Name of the resource to update. Example:
  356. // `apps/myapp/services/default/versions/1`.
  357. string name = 1;
  358. // A Version containing the updated resource. Only fields set in the field
  359. // mask will be updated.
  360. Version version = 2;
  361. // Standard field mask for the set of fields to be updated.
  362. google.protobuf.FieldMask update_mask = 3;
  363. }
  364. // Request message for `Versions.DeleteVersion`.
  365. message DeleteVersionRequest {
  366. // Name of the resource requested. Example:
  367. // `apps/myapp/services/default/versions/v1`.
  368. string name = 1;
  369. }
  370. // Manages instances of a version.
  371. service Instances {
  372. option (google.api.default_host) = "appengine.googleapis.com";
  373. option (google.api.oauth_scopes) =
  374. "https://www.googleapis.com/auth/appengine.admin,"
  375. "https://www.googleapis.com/auth/cloud-platform,"
  376. "https://www.googleapis.com/auth/cloud-platform.read-only";
  377. // Lists the instances of a version.
  378. //
  379. // Tip: To aggregate details about instances over time, see the
  380. // [Stackdriver Monitoring API](https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list).
  381. rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
  382. option (google.api.http) = {
  383. get: "/v1/{parent=apps/*/services/*/versions/*}/instances"
  384. };
  385. }
  386. // Gets instance information.
  387. rpc GetInstance(GetInstanceRequest) returns (Instance) {
  388. option (google.api.http) = {
  389. get: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
  390. };
  391. }
  392. // Stops a running instance.
  393. //
  394. // The instance might be automatically recreated based on the scaling settings
  395. // of the version. For more information, see "How Instances are Managed"
  396. // ([standard environment](https://cloud.google.com/appengine/docs/standard/python/how-instances-are-managed) |
  397. // [flexible environment](https://cloud.google.com/appengine/docs/flexible/python/how-instances-are-managed)).
  398. //
  399. // To ensure that instances are not re-created and avoid getting billed, you
  400. // can stop all instances within the target version by changing the serving
  401. // status of the version to `STOPPED` with the
  402. // [`apps.services.versions.patch`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions/patch)
  403. // method.
  404. rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
  405. option (google.api.http) = {
  406. delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}"
  407. };
  408. option (google.longrunning.operation_info) = {
  409. response_type: "google.protobuf.Empty"
  410. metadata_type: "OperationMetadataV1"
  411. };
  412. }
  413. // Enables debugging on a VM instance. This allows you to use the SSH
  414. // command to connect to the virtual machine where the instance lives.
  415. // While in "debug mode", the instance continues to serve live traffic.
  416. // You should delete the instance when you are done debugging and then
  417. // allow the system to take over and determine if another instance
  418. // should be started.
  419. //
  420. // Only applicable for instances in App Engine flexible environment.
  421. rpc DebugInstance(DebugInstanceRequest) returns (google.longrunning.Operation) {
  422. option (google.api.http) = {
  423. post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug"
  424. body: "*"
  425. };
  426. option (google.longrunning.operation_info) = {
  427. response_type: "Instance"
  428. metadata_type: "OperationMetadataV1"
  429. };
  430. }
  431. }
  432. // Request message for `Instances.ListInstances`.
  433. message ListInstancesRequest {
  434. // Name of the parent Version resource. Example:
  435. // `apps/myapp/services/default/versions/v1`.
  436. string parent = 1;
  437. // Maximum results to return per page.
  438. int32 page_size = 2;
  439. // Continuation token for fetching the next page of results.
  440. string page_token = 3;
  441. }
  442. // Response message for `Instances.ListInstances`.
  443. message ListInstancesResponse {
  444. // The instances belonging to the requested version.
  445. repeated Instance instances = 1;
  446. // Continuation token for fetching the next page of results.
  447. string next_page_token = 2;
  448. }
  449. // Request message for `Instances.GetInstance`.
  450. message GetInstanceRequest {
  451. // Name of the resource requested. Example:
  452. // `apps/myapp/services/default/versions/v1/instances/instance-1`.
  453. string name = 1;
  454. }
  455. // Request message for `Instances.DeleteInstance`.
  456. message DeleteInstanceRequest {
  457. // Name of the resource requested. Example:
  458. // `apps/myapp/services/default/versions/v1/instances/instance-1`.
  459. string name = 1;
  460. }
  461. // Request message for `Instances.DebugInstance`.
  462. message DebugInstanceRequest {
  463. // Name of the resource requested. Example:
  464. // `apps/myapp/services/default/versions/v1/instances/instance-1`.
  465. string name = 1;
  466. // Public SSH key to add to the instance. Examples:
  467. //
  468. // * `[USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME]`
  469. // * `[USERNAME]:ssh-rsa [KEY_VALUE] google-ssh {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}`
  470. //
  471. // For more information, see
  472. // [Adding and Removing SSH Keys](https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys).
  473. string ssh_key = 2;
  474. }
  475. // Firewall resources are used to define a collection of access control rules
  476. // for an Application. Each rule is defined with a position which specifies
  477. // the rule's order in the sequence of rules, an IP range to be matched against
  478. // requests, and an action to take upon matching requests.
  479. //
  480. // Every request is evaluated against the Firewall rules in priority order.
  481. // Processesing stops at the first rule which matches the request's IP address.
  482. // A final rule always specifies an action that applies to all remaining
  483. // IP addresses. The default final rule for a newly-created application will be
  484. // set to "allow" if not otherwise specified by the user.
  485. service Firewall {
  486. option (google.api.default_host) = "appengine.googleapis.com";
  487. option (google.api.oauth_scopes) =
  488. "https://www.googleapis.com/auth/appengine.admin,"
  489. "https://www.googleapis.com/auth/cloud-platform,"
  490. "https://www.googleapis.com/auth/cloud-platform.read-only";
  491. // Lists the firewall rules of an application.
  492. rpc ListIngressRules(ListIngressRulesRequest) returns (ListIngressRulesResponse) {
  493. option (google.api.http) = {
  494. get: "/v1/{parent=apps/*}/firewall/ingressRules"
  495. };
  496. }
  497. // Replaces the entire firewall ruleset in one bulk operation. This overrides
  498. // and replaces the rules of an existing firewall with the new rules.
  499. //
  500. // If the final rule does not match traffic with the '*' wildcard IP range,
  501. // then an "allow all" rule is explicitly added to the end of the list.
  502. rpc BatchUpdateIngressRules(BatchUpdateIngressRulesRequest) returns (BatchUpdateIngressRulesResponse) {
  503. option (google.api.http) = {
  504. post: "/v1/{name=apps/*/firewall/ingressRules}:batchUpdate"
  505. body: "*"
  506. };
  507. }
  508. // Creates a firewall rule for the application.
  509. rpc CreateIngressRule(CreateIngressRuleRequest) returns (google.appengine.v1.FirewallRule) {
  510. option (google.api.http) = {
  511. post: "/v1/{parent=apps/*}/firewall/ingressRules"
  512. body: "rule"
  513. };
  514. }
  515. // Gets the specified firewall rule.
  516. rpc GetIngressRule(GetIngressRuleRequest) returns (google.appengine.v1.FirewallRule) {
  517. option (google.api.http) = {
  518. get: "/v1/{name=apps/*/firewall/ingressRules/*}"
  519. };
  520. }
  521. // Updates the specified firewall rule.
  522. rpc UpdateIngressRule(UpdateIngressRuleRequest) returns (google.appengine.v1.FirewallRule) {
  523. option (google.api.http) = {
  524. patch: "/v1/{name=apps/*/firewall/ingressRules/*}"
  525. body: "rule"
  526. };
  527. }
  528. // Deletes the specified firewall rule.
  529. rpc DeleteIngressRule(DeleteIngressRuleRequest) returns (google.protobuf.Empty) {
  530. option (google.api.http) = {
  531. delete: "/v1/{name=apps/*/firewall/ingressRules/*}"
  532. };
  533. }
  534. }
  535. // Request message for `Firewall.ListIngressRules`.
  536. message ListIngressRulesRequest {
  537. // Name of the Firewall collection to retrieve.
  538. // Example: `apps/myapp/firewall/ingressRules`.
  539. string parent = 1;
  540. // Maximum results to return per page.
  541. int32 page_size = 2;
  542. // Continuation token for fetching the next page of results.
  543. string page_token = 3;
  544. // A valid IP Address. If set, only rules matching this address will be
  545. // returned. The first returned rule will be the rule that fires on requests
  546. // from this IP.
  547. string matching_address = 4;
  548. }
  549. // Response message for `Firewall.ListIngressRules`.
  550. message ListIngressRulesResponse {
  551. // The ingress FirewallRules for this application.
  552. repeated google.appengine.v1.FirewallRule ingress_rules = 1;
  553. // Continuation token for fetching the next page of results.
  554. string next_page_token = 2;
  555. }
  556. // Request message for `Firewall.BatchUpdateIngressRules`.
  557. message BatchUpdateIngressRulesRequest {
  558. // Name of the Firewall collection to set.
  559. // Example: `apps/myapp/firewall/ingressRules`.
  560. string name = 1;
  561. // A list of FirewallRules to replace the existing set.
  562. repeated google.appengine.v1.FirewallRule ingress_rules = 2;
  563. }
  564. // Response message for `Firewall.UpdateAllIngressRules`.
  565. message BatchUpdateIngressRulesResponse {
  566. // The full list of ingress FirewallRules for this application.
  567. repeated google.appengine.v1.FirewallRule ingress_rules = 1;
  568. }
  569. // Request message for `Firewall.CreateIngressRule`.
  570. message CreateIngressRuleRequest {
  571. // Name of the parent Firewall collection in which to create a new rule.
  572. // Example: `apps/myapp/firewall/ingressRules`.
  573. string parent = 1;
  574. // A FirewallRule containing the new resource.
  575. //
  576. // The user may optionally provide a position at which the new rule will be
  577. // placed. The positions define a sequential list starting at 1. If a rule
  578. // already exists at the given position, rules greater than the provided
  579. // position will be moved forward by one.
  580. //
  581. // If no position is provided, the server will place the rule as the second to
  582. // last rule in the sequence before the required default allow-all or deny-all
  583. // rule.
  584. google.appengine.v1.FirewallRule rule = 2;
  585. }
  586. // Request message for `Firewall.GetIngressRule`.
  587. message GetIngressRuleRequest {
  588. // Name of the Firewall resource to retrieve.
  589. // Example: `apps/myapp/firewall/ingressRules/100`.
  590. string name = 1;
  591. }
  592. // Request message for `Firewall.UpdateIngressRule`.
  593. message UpdateIngressRuleRequest {
  594. // Name of the Firewall resource to update.
  595. // Example: `apps/myapp/firewall/ingressRules/100`.
  596. string name = 1;
  597. // A FirewallRule containing the updated resource
  598. google.appengine.v1.FirewallRule rule = 2;
  599. // Standard field mask for the set of fields to be updated.
  600. google.protobuf.FieldMask update_mask = 3;
  601. }
  602. // Request message for `Firewall.DeleteIngressRule`.
  603. message DeleteIngressRuleRequest {
  604. // Name of the Firewall resource to delete.
  605. // Example: `apps/myapp/firewall/ingressRules/100`.
  606. string name = 1;
  607. }
  608. // Manages domains a user is authorized to administer. To authorize use of a
  609. // domain, verify ownership via
  610. // [Webmaster Central](https://www.google.com/webmasters/verification/home).
  611. service AuthorizedDomains {
  612. option (google.api.default_host) = "appengine.googleapis.com";
  613. option (google.api.oauth_scopes) =
  614. "https://www.googleapis.com/auth/appengine.admin,"
  615. "https://www.googleapis.com/auth/cloud-platform,"
  616. "https://www.googleapis.com/auth/cloud-platform.read-only";
  617. // Lists all domains the user is authorized to administer.
  618. rpc ListAuthorizedDomains(ListAuthorizedDomainsRequest) returns (ListAuthorizedDomainsResponse) {
  619. option (google.api.http) = {
  620. get: "/v1/{parent=apps/*}/authorizedDomains"
  621. };
  622. }
  623. }
  624. // Request message for `AuthorizedDomains.ListAuthorizedDomains`.
  625. message ListAuthorizedDomainsRequest {
  626. // Name of the parent Application resource. Example: `apps/myapp`.
  627. string parent = 1;
  628. // Maximum results to return per page.
  629. int32 page_size = 2;
  630. // Continuation token for fetching the next page of results.
  631. string page_token = 3;
  632. }
  633. // Response message for `AuthorizedDomains.ListAuthorizedDomains`.
  634. message ListAuthorizedDomainsResponse {
  635. // The authorized domains belonging to the user.
  636. repeated google.appengine.v1.AuthorizedDomain domains = 1;
  637. // Continuation token for fetching the next page of results.
  638. string next_page_token = 2;
  639. }
  640. // Manages SSL certificates a user is authorized to administer. A user can
  641. // administer any SSL certificates applicable to their authorized domains.
  642. service AuthorizedCertificates {
  643. option (google.api.default_host) = "appengine.googleapis.com";
  644. option (google.api.oauth_scopes) =
  645. "https://www.googleapis.com/auth/appengine.admin,"
  646. "https://www.googleapis.com/auth/cloud-platform,"
  647. "https://www.googleapis.com/auth/cloud-platform.read-only";
  648. // Lists all SSL certificates the user is authorized to administer.
  649. rpc ListAuthorizedCertificates(ListAuthorizedCertificatesRequest) returns (ListAuthorizedCertificatesResponse) {
  650. option (google.api.http) = {
  651. get: "/v1/{parent=apps/*}/authorizedCertificates"
  652. };
  653. }
  654. // Gets the specified SSL certificate.
  655. rpc GetAuthorizedCertificate(GetAuthorizedCertificateRequest) returns (google.appengine.v1.AuthorizedCertificate) {
  656. option (google.api.http) = {
  657. get: "/v1/{name=apps/*/authorizedCertificates/*}"
  658. };
  659. }
  660. // Uploads the specified SSL certificate.
  661. rpc CreateAuthorizedCertificate(CreateAuthorizedCertificateRequest) returns (google.appengine.v1.AuthorizedCertificate) {
  662. option (google.api.http) = {
  663. post: "/v1/{parent=apps/*}/authorizedCertificates"
  664. body: "certificate"
  665. };
  666. }
  667. // Updates the specified SSL certificate. To renew a certificate and maintain
  668. // its existing domain mappings, update `certificate_data` with a new
  669. // certificate. The new certificate must be applicable to the same domains as
  670. // the original certificate. The certificate `display_name` may also be
  671. // updated.
  672. rpc UpdateAuthorizedCertificate(UpdateAuthorizedCertificateRequest) returns (google.appengine.v1.AuthorizedCertificate) {
  673. option (google.api.http) = {
  674. patch: "/v1/{name=apps/*/authorizedCertificates/*}"
  675. body: "certificate"
  676. };
  677. }
  678. // Deletes the specified SSL certificate.
  679. rpc DeleteAuthorizedCertificate(DeleteAuthorizedCertificateRequest) returns (google.protobuf.Empty) {
  680. option (google.api.http) = {
  681. delete: "/v1/{name=apps/*/authorizedCertificates/*}"
  682. };
  683. }
  684. }
  685. // Request message for `AuthorizedCertificates.ListAuthorizedCertificates`.
  686. message ListAuthorizedCertificatesRequest {
  687. // Name of the parent `Application` resource. Example: `apps/myapp`.
  688. string parent = 1;
  689. // Controls the set of fields returned in the `LIST` response.
  690. AuthorizedCertificateView view = 4;
  691. // Maximum results to return per page.
  692. int32 page_size = 2;
  693. // Continuation token for fetching the next page of results.
  694. string page_token = 3;
  695. }
  696. // Response message for `AuthorizedCertificates.ListAuthorizedCertificates`.
  697. message ListAuthorizedCertificatesResponse {
  698. // The SSL certificates the user is authorized to administer.
  699. repeated google.appengine.v1.AuthorizedCertificate certificates = 1;
  700. // Continuation token for fetching the next page of results.
  701. string next_page_token = 2;
  702. }
  703. // Request message for `AuthorizedCertificates.GetAuthorizedCertificate`.
  704. message GetAuthorizedCertificateRequest {
  705. // Name of the resource requested. Example:
  706. // `apps/myapp/authorizedCertificates/12345`.
  707. string name = 1;
  708. // Controls the set of fields returned in the `GET` response.
  709. AuthorizedCertificateView view = 2;
  710. }
  711. // Fields that should be returned when an AuthorizedCertificate resource is
  712. // retrieved.
  713. enum AuthorizedCertificateView {
  714. // Basic certificate information, including applicable domains and expiration
  715. // date.
  716. BASIC_CERTIFICATE = 0;
  717. // The information from `BASIC_CERTIFICATE`, plus detailed information on the
  718. // domain mappings that have this certificate mapped.
  719. FULL_CERTIFICATE = 1;
  720. }
  721. // Request message for `AuthorizedCertificates.CreateAuthorizedCertificate`.
  722. message CreateAuthorizedCertificateRequest {
  723. // Name of the parent `Application` resource. Example: `apps/myapp`.
  724. string parent = 1;
  725. // SSL certificate data.
  726. google.appengine.v1.AuthorizedCertificate certificate = 2;
  727. }
  728. // Request message for `AuthorizedCertificates.UpdateAuthorizedCertificate`.
  729. message UpdateAuthorizedCertificateRequest {
  730. // Name of the resource to update. Example:
  731. // `apps/myapp/authorizedCertificates/12345`.
  732. string name = 1;
  733. // An `AuthorizedCertificate` containing the updated resource. Only fields set
  734. // in the field mask will be updated.
  735. google.appengine.v1.AuthorizedCertificate certificate = 2;
  736. // Standard field mask for the set of fields to be updated. Updates are only
  737. // supported on the `certificate_raw_data` and `display_name` fields.
  738. google.protobuf.FieldMask update_mask = 3;
  739. }
  740. // Request message for `AuthorizedCertificates.DeleteAuthorizedCertificate`.
  741. message DeleteAuthorizedCertificateRequest {
  742. // Name of the resource to delete. Example:
  743. // `apps/myapp/authorizedCertificates/12345`.
  744. string name = 1;
  745. }
  746. // Manages domains serving an application.
  747. service DomainMappings {
  748. option (google.api.default_host) = "appengine.googleapis.com";
  749. option (google.api.oauth_scopes) =
  750. "https://www.googleapis.com/auth/appengine.admin,"
  751. "https://www.googleapis.com/auth/cloud-platform,"
  752. "https://www.googleapis.com/auth/cloud-platform.read-only";
  753. // Lists the domain mappings on an application.
  754. rpc ListDomainMappings(ListDomainMappingsRequest) returns (ListDomainMappingsResponse) {
  755. option (google.api.http) = {
  756. get: "/v1/{parent=apps/*}/domainMappings"
  757. };
  758. }
  759. // Gets the specified domain mapping.
  760. rpc GetDomainMapping(GetDomainMappingRequest) returns (google.appengine.v1.DomainMapping) {
  761. option (google.api.http) = {
  762. get: "/v1/{name=apps/*/domainMappings/*}"
  763. };
  764. }
  765. // Maps a domain to an application. A user must be authorized to administer a
  766. // domain in order to map it to an application. For a list of available
  767. // authorized domains, see [`AuthorizedDomains.ListAuthorizedDomains`]().
  768. rpc CreateDomainMapping(CreateDomainMappingRequest) returns (google.longrunning.Operation) {
  769. option (google.api.http) = {
  770. post: "/v1/{parent=apps/*}/domainMappings"
  771. body: "domain_mapping"
  772. };
  773. option (google.longrunning.operation_info) = {
  774. response_type: "DomainMapping"
  775. metadata_type: "OperationMetadataV1"
  776. };
  777. }
  778. // Updates the specified domain mapping. To map an SSL certificate to a
  779. // domain mapping, update `certificate_id` to point to an `AuthorizedCertificate`
  780. // resource. A user must be authorized to administer the associated domain
  781. // in order to update a `DomainMapping` resource.
  782. rpc UpdateDomainMapping(UpdateDomainMappingRequest) returns (google.longrunning.Operation) {
  783. option (google.api.http) = {
  784. patch: "/v1/{name=apps/*/domainMappings/*}"
  785. body: "domain_mapping"
  786. };
  787. option (google.longrunning.operation_info) = {
  788. response_type: "DomainMapping"
  789. metadata_type: "OperationMetadataV1"
  790. };
  791. }
  792. // Deletes the specified domain mapping. A user must be authorized to
  793. // administer the associated domain in order to delete a `DomainMapping`
  794. // resource.
  795. rpc DeleteDomainMapping(DeleteDomainMappingRequest) returns (google.longrunning.Operation) {
  796. option (google.api.http) = {
  797. delete: "/v1/{name=apps/*/domainMappings/*}"
  798. };
  799. option (google.longrunning.operation_info) = {
  800. response_type: "google.protobuf.Empty"
  801. metadata_type: "OperationMetadataV1"
  802. };
  803. }
  804. }
  805. // Request message for `DomainMappings.ListDomainMappings`.
  806. message ListDomainMappingsRequest {
  807. // Name of the parent Application resource. Example: `apps/myapp`.
  808. string parent = 1;
  809. // Maximum results to return per page.
  810. int32 page_size = 2;
  811. // Continuation token for fetching the next page of results.
  812. string page_token = 3;
  813. }
  814. // Response message for `DomainMappings.ListDomainMappings`.
  815. message ListDomainMappingsResponse {
  816. // The domain mappings for the application.
  817. repeated google.appengine.v1.DomainMapping domain_mappings = 1;
  818. // Continuation token for fetching the next page of results.
  819. string next_page_token = 2;
  820. }
  821. // Request message for `DomainMappings.GetDomainMapping`.
  822. message GetDomainMappingRequest {
  823. // Name of the resource requested. Example:
  824. // `apps/myapp/domainMappings/example.com`.
  825. string name = 1;
  826. }
  827. // Override strategy for mutating an existing mapping.
  828. enum DomainOverrideStrategy {
  829. // Strategy unspecified. Defaults to `STRICT`.
  830. UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0;
  831. // Overrides not allowed. If a mapping already exists for the
  832. // specified domain, the request will return an ALREADY_EXISTS (409).
  833. STRICT = 1;
  834. // Overrides allowed. If a mapping already exists for the specified domain,
  835. // the request will overwrite it. Note that this might stop another
  836. // Google product from serving. For example, if the domain is
  837. // mapped to another App Engine application, that app will no
  838. // longer serve from that domain.
  839. OVERRIDE = 2;
  840. }
  841. // Request message for `DomainMappings.CreateDomainMapping`.
  842. message CreateDomainMappingRequest {
  843. // Name of the parent Application resource. Example: `apps/myapp`.
  844. string parent = 1;
  845. // Domain mapping configuration.
  846. google.appengine.v1.DomainMapping domain_mapping = 2;
  847. // Whether the domain creation should override any existing mappings for this
  848. // domain. By default, overrides are rejected.
  849. DomainOverrideStrategy override_strategy = 4;
  850. }
  851. // Request message for `DomainMappings.UpdateDomainMapping`.
  852. message UpdateDomainMappingRequest {
  853. // Name of the resource to update. Example:
  854. // `apps/myapp/domainMappings/example.com`.
  855. string name = 1;
  856. // A domain mapping containing the updated resource. Only fields set
  857. // in the field mask will be updated.
  858. google.appengine.v1.DomainMapping domain_mapping = 2;
  859. // Required. Standard field mask for the set of fields to be updated.
  860. google.protobuf.FieldMask update_mask = 3;
  861. }
  862. // Request message for `DomainMappings.DeleteDomainMapping`.
  863. message DeleteDomainMappingRequest {
  864. // Name of the resource to delete. Example:
  865. // `apps/myapp/domainMappings/example.com`.
  866. string name = 1;
  867. }