Firebase Update

This commit is contained in:
Lukas Nowy
2018-12-22 23:30:39 +01:00
parent befb44764d
commit acffe619b3
11523 changed files with 1614327 additions and 930246 deletions

View File

@ -0,0 +1,34 @@
// 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.legacy;
option go_package = "google.golang.org/genproto/googleapis/appengine/legacy;legacy";
option java_multiple_files = true;
option java_outer_classname = "AuditDataProto";
option java_package = "com.google.appengine.legacy";
// Admin Console legacy audit log.
message AuditData {
// Text description of the admin event.
// This is the "Event" column in Admin Console's Admin Logs.
string event_message = 1;
// Arbitrary event data.
// This is the "Result" column in Admin Console's Admin Logs.
map<string, string> event_data = 2;
}

View File

@ -0,0 +1,190 @@
// 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.logging.v1;
import "google/logging/type/log_severity.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/logging/v1;logging";
option java_multiple_files = true;
option java_outer_classname = "RequestLogProto";
option java_package = "com.google.appengine.logging.v1";
// Application log line emitted while processing a request.
message LogLine {
// Approximate time when this log entry was made.
google.protobuf.Timestamp time = 1;
// Severity of this log entry.
google.logging.type.LogSeverity severity = 2;
// App-provided log message.
string log_message = 3;
// Where in the source code this log message was written.
SourceLocation source_location = 4;
}
// Specifies a location in a source code file.
message SourceLocation {
// Source file name. Depending on the runtime environment, this might be a
// simple name or a fully-qualified name.
string file = 1;
// Line within the source file.
int64 line = 2;
// Human-readable name of the function or method being invoked, with optional
// context such as the class or package name. This information is used in
// contexts such as the logs viewer, where a file and line number are less
// meaningful. The format can vary by language. For example:
// `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function`
// (Python).
string function_name = 3;
}
// A reference to a particular snapshot of the source tree used to build and
// deploy an application.
message SourceReference {
// Optional. A URI string identifying the repository.
// Example: "https://github.com/GoogleCloudPlatform/kubernetes.git"
string repository = 1;
// The canonical and persistent identifier of the deployed revision.
// Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b"
string revision_id = 2;
}
// Complete log information about a single HTTP request to an App Engine
// application.
message RequestLog {
// Application that handled this request.
string app_id = 1;
// Module of the application that handled this request.
string module_id = 37;
// Version of the application that handled this request.
string version_id = 2;
// Globally unique identifier for a request, which is based on the request
// start time. Request IDs for requests which started later will compare
// greater as strings than those for requests which started earlier.
string request_id = 3;
// Origin IP address.
string ip = 4;
// Time when the request started.
google.protobuf.Timestamp start_time = 6;
// Time when the request finished.
google.protobuf.Timestamp end_time = 7;
// Latency of the request.
google.protobuf.Duration latency = 8;
// Number of CPU megacycles used to process request.
int64 mega_cycles = 9;
// Request method. Example: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`, `"DELETE"`.
string method = 10;
// Contains the path and query portion of the URL that was requested. For
// example, if the URL was "http://example.com/app?name=val", the resource
// would be "/app?name=val". The fragment identifier, which is identified by
// the `#` character, is not included.
string resource = 11;
// HTTP version of request. Example: `"HTTP/1.1"`.
string http_version = 12;
// HTTP response status code. Example: 200, 404.
int32 status = 13;
// Size in bytes sent back to client by request.
int64 response_size = 14;
// Referrer URL of request.
string referrer = 15;
// User agent that made the request.
string user_agent = 16;
// The logged-in user who made the request.
//
// Most likely, this is the part of the user's email before the `@` sign. The
// field value is the same for different requests from the same user, but
// different users can have similar names. This information is also
// available to the application via the App Engine Users API.
//
// This field will be populated starting with App Engine 1.9.21.
string nickname = 40;
// File or class that handled the request.
string url_map_entry = 17;
// Internet host and port number of the resource being requested.
string host = 20;
// An indication of the relative cost of serving this request.
double cost = 21;
// Queue name of the request, in the case of an offline request.
string task_queue_name = 22;
// Task name of the request, in the case of an offline request.
string task_name = 23;
// Whether this was a loading request for the instance.
bool was_loading_request = 24;
// Time this request spent in the pending request queue.
google.protobuf.Duration pending_time = 25;
// If the instance processing this request belongs to a manually scaled
// module, then this is the 0-based index of the instance. Otherwise, this
// value is -1.
int32 instance_index = 26;
// Whether this request is finished or active.
bool finished = 27;
// Whether this is the first `RequestLog` entry for this request. If an
// active request has several `RequestLog` entries written to Stackdriver
// Logging, then this field will be set for one of them.
bool first = 42;
// An identifier for the instance that handled the request.
string instance_id = 28;
// A list of log lines emitted by the application while serving this request.
repeated LogLine line = 29;
// App Engine release version.
string app_engine_release = 38;
// Stackdriver Trace identifier for this request.
string trace_id = 39;
// Source code for the application that handled this request. There can be
// more than one source reference per deployed application if source code is
// distributed among multiple repositories.
repeated SourceReference source_reference = 41;
}

View File

@ -0,0 +1,285 @@
// 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/protobuf/duration.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "AppYamlProto";
option java_package = "com.google.appengine.v1";
// [Google Cloud Endpoints](https://cloud.google.com/appengine/docs/python/endpoints/)
// configuration for API handlers.
message ApiConfigHandler {
// Action to take when users access resources that require
// authentication. Defaults to `redirect`.
AuthFailAction auth_fail_action = 1;
// Level of login required to access this resource. Defaults to
// `optional`.
LoginRequirement login = 2;
// Path to the script from the application root directory.
string script = 3;
// Security (HTTPS) enforcement for this URL.
SecurityLevel security_level = 4;
// URL to serve the endpoint at.
string url = 5;
}
// Custom static error page to be served when an error occurs.
message ErrorHandler {
// Error codes.
enum ErrorCode {
option allow_alias = true;
// Not specified. ERROR_CODE_DEFAULT is assumed.
ERROR_CODE_UNSPECIFIED = 0;
// All other error types.
ERROR_CODE_DEFAULT = 0;
// Application has exceeded a resource quota.
ERROR_CODE_OVER_QUOTA = 1;
// Client blocked by the application's Denial of Service protection
// configuration.
ERROR_CODE_DOS_API_DENIAL = 2;
// Deadline reached before the application responds.
ERROR_CODE_TIMEOUT = 3;
}
// Error condition this handler applies to.
ErrorCode error_code = 1;
// Static file content to be served for this error.
string static_file = 2;
// MIME type of file. Defaults to `text/html`.
string mime_type = 3;
}
// URL pattern and description of how the URL should be handled. App Engine can
// handle URLs by executing application code or by serving static files
// uploaded with the version, such as images, CSS, or JavaScript.
message UrlMap {
// Redirect codes.
enum RedirectHttpResponseCode {
// Not specified. `302` is assumed.
REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0;
// `301 Moved Permanently` code.
REDIRECT_HTTP_RESPONSE_CODE_301 = 1;
// `302 Moved Temporarily` code.
REDIRECT_HTTP_RESPONSE_CODE_302 = 2;
// `303 See Other` code.
REDIRECT_HTTP_RESPONSE_CODE_303 = 3;
// `307 Temporary Redirect` code.
REDIRECT_HTTP_RESPONSE_CODE_307 = 4;
}
// URL prefix. Uses regular expression syntax, which means regexp
// special characters must be escaped, but should not contain groupings.
// All URLs that begin with this prefix are handled by this handler, using the
// portion of the URL after the prefix as part of the file path.
string url_regex = 1;
// Type of handler for this URL pattern.
oneof handler_type {
// Returns the contents of a file, such as an image, as the response.
StaticFilesHandler static_files = 2;
// Executes a script to handle the request that matches this URL
// pattern.
ScriptHandler script = 3;
// Uses API Endpoints to handle requests.
ApiEndpointHandler api_endpoint = 4;
}
// Security (HTTPS) enforcement for this URL.
SecurityLevel security_level = 5;
// Level of login required to access this resource.
LoginRequirement login = 6;
// Action to take when users access resources that require
// authentication. Defaults to `redirect`.
AuthFailAction auth_fail_action = 7;
// `30x` code to use when performing redirects for the `secure` field.
// Defaults to `302`.
RedirectHttpResponseCode redirect_http_response_code = 8;
}
// Files served directly to the user for a given URL, such as images, CSS
// stylesheets, or JavaScript source files. Static file handlers describe which
// files in the application directory are static files, and which URLs serve
// them.
message StaticFilesHandler {
// Path to the static files matched by the URL pattern, from the
// application root directory. The path can refer to text matched in groupings
// in the URL pattern.
string path = 1;
// Regular expression that matches the file paths for all files that should be
// referenced by this handler.
string upload_path_regex = 2;
// HTTP headers to use for all responses from these URLs.
map<string, string> http_headers = 3;
// MIME type used to serve all files served by this handler.
//
// Defaults to file-specific MIME types, which are derived from each file's
// filename extension.
string mime_type = 4;
// Time a static file served by this handler should be cached
// by web proxies and browsers.
google.protobuf.Duration expiration = 5;
// Whether this handler should match the request if the file
// referenced by the handler does not exist.
bool require_matching_file = 6;
// Whether files should also be uploaded as code data. By default, files
// declared in static file handlers are uploaded as static
// data and are only served to end users; they cannot be read by the
// application. If enabled, uploads are charged against both your code and
// static data storage resource quotas.
bool application_readable = 7;
}
// Executes a script to handle the request that matches the URL pattern.
message ScriptHandler {
// Path to the script from the application root directory.
string script_path = 1;
}
// Uses Google Cloud Endpoints to handle requests.
message ApiEndpointHandler {
// Path to the script from the application root directory.
string script_path = 1;
}
// Health checking configuration for VM instances. Unhealthy instances
// are killed and replaced with new instances. Only applicable for
// instances in App Engine flexible environment.
message HealthCheck {
// Whether to explicitly disable health checks for this instance.
bool disable_health_check = 1;
// Host header to send when performing an HTTP health check.
// Example: "myapp.appspot.com"
string host = 2;
// Number of consecutive successful health checks required before receiving
// traffic.
uint32 healthy_threshold = 3;
// Number of consecutive failed health checks required before removing
// traffic.
uint32 unhealthy_threshold = 4;
// Number of consecutive failed health checks required before an instance is
// restarted.
uint32 restart_threshold = 5;
// Interval between health checks.
google.protobuf.Duration check_interval = 6;
// Time before the health check is considered failed.
google.protobuf.Duration timeout = 7;
}
// Third-party Python runtime library that is required by the application.
message Library {
// Name of the library. Example: "django".
string name = 1;
// Version of the library to select, or "latest".
string version = 2;
}
// Actions to take when the user is not logged in.
enum AuthFailAction {
// Not specified. `AUTH_FAIL_ACTION_REDIRECT` is assumed.
AUTH_FAIL_ACTION_UNSPECIFIED = 0;
// Redirects user to "accounts.google.com". The user is redirected back to the
// application URL after signing in or creating an account.
AUTH_FAIL_ACTION_REDIRECT = 1;
// Rejects request with a `401` HTTP status code and an error
// message.
AUTH_FAIL_ACTION_UNAUTHORIZED = 2;
}
// Methods to restrict access to a URL based on login status.
enum LoginRequirement {
// Not specified. `LOGIN_OPTIONAL` is assumed.
LOGIN_UNSPECIFIED = 0;
// Does not require that the user is signed in.
LOGIN_OPTIONAL = 1;
// If the user is not signed in, the `auth_fail_action` is taken.
// In addition, if the user is not an administrator for the
// application, they are given an error message regardless of
// `auth_fail_action`. If the user is an administrator, the handler
// proceeds.
LOGIN_ADMIN = 2;
// If the user has signed in, the handler proceeds normally. Otherwise, the
// auth_fail_action is taken.
LOGIN_REQUIRED = 3;
}
// Methods to enforce security (HTTPS) on a URL.
enum SecurityLevel {
option allow_alias = true;
// Not specified.
SECURE_UNSPECIFIED = 0;
// Both HTTP and HTTPS requests with URLs that match the handler succeed
// without redirects. The application can examine the request to determine
// which protocol was used, and respond accordingly.
SECURE_DEFAULT = 0;
// Requests for a URL that match this handler that use HTTPS are automatically
// redirected to the HTTP equivalent URL.
SECURE_NEVER = 1;
// Both HTTP and HTTPS requests with URLs that match the handler succeed
// without redirects. The application can examine the request to determine
// which protocol was used and respond accordingly.
SECURE_OPTIONAL = 2;
// Requests for a URL that match this handler that do not use HTTPS are
// automatically redirected to the HTTPS URL with the same path. Query
// parameters are reserved for the redirect.
SECURE_ALWAYS = 3;
}

View File

@ -0,0 +1,341 @@
// 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/application.proto";
import "google/appengine/v1/instance.proto";
import "google/appengine/v1/service.proto";
import "google/appengine/v1/version.proto";
import "google/iam/v1/iam_policy.proto";
import "google/iam/v1/policy.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "AppengineProto";
option java_package = "com.google.appengine.v1";
// Manages instances of a version.
service Instances {
// Lists the instances of a version.
rpc ListInstances(ListInstancesRequest) returns (ListInstancesResponse) {
option (google.api.http) = { get: "/v1/{parent=apps/*/services/*/versions/*}/instances" };
}
// Gets instance information.
rpc GetInstance(GetInstanceRequest) returns (Instance) {
option (google.api.http) = { get: "/v1/{name=apps/*/services/*/versions/*/instances/*}" };
}
// Stops a running instance.
rpc DeleteInstance(DeleteInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { delete: "/v1/{name=apps/*/services/*/versions/*/instances/*}" };
}
// Enables debugging on a VM instance. This allows you to use the SSH
// command to connect to the virtual machine where the instance lives.
// While in "debug mode", the instance continues to serve live traffic.
// You should delete the instance when you are done debugging and then
// allow the system to take over and determine if another instance
// should be started.
//
// Only applicable for instances in App Engine flexible environment.
rpc DebugInstance(DebugInstanceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { post: "/v1/{name=apps/*/services/*/versions/*/instances/*}:debug" body: "*" };
}
}
// Manages versions of a service.
service Versions {
// Lists the versions of a service.
rpc ListVersions(ListVersionsRequest) returns (ListVersionsResponse) {
option (google.api.http) = { get: "/v1/{parent=apps/*/services/*}/versions" };
}
// Gets the specified Version resource.
// By default, only a `BASIC_VIEW` will be returned.
// Specify the `FULL_VIEW` parameter to get the full resource.
rpc GetVersion(GetVersionRequest) returns (Version) {
option (google.api.http) = { get: "/v1/{name=apps/*/services/*/versions/*}" };
}
// Deploys code and resource files to a new version.
rpc CreateVersion(CreateVersionRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { post: "/v1/{parent=apps/*/services/*}/versions" body: "version" };
}
// Updates the specified Version resource.
// You can specify the following fields depending on the App Engine
// environment and type of scaling that the version resource uses:
//
// * [`serving_status`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.serving_status):
// For Version resources that use basic scaling, manual scaling, or run in
// the App Engine flexible environment.
// * [`instance_class`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.instance_class):
// For Version resources that run in the App Engine standard environment.
// * [`automatic_scaling.min_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling):
// For Version resources that use automatic scaling and run in the App
// Engine standard environment.
// * [`automatic_scaling.max_idle_instances`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#Version.FIELDS.automatic_scaling):
// For Version resources that use automatic scaling and run in the App
// Engine standard environment.
rpc UpdateVersion(UpdateVersionRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { patch: "/v1/{name=apps/*/services/*/versions/*}" body: "version" };
}
// Deletes an existing Version resource.
rpc DeleteVersion(DeleteVersionRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { delete: "/v1/{name=apps/*/services/*/versions/*}" };
}
}
// Manages services of an application.
service Services {
// Lists all the services in the application.
rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
option (google.api.http) = { get: "/v1/{parent=apps/*}/services" };
}
// Gets the current configuration of the specified service.
rpc GetService(GetServiceRequest) returns (Service) {
option (google.api.http) = { get: "/v1/{name=apps/*/services/*}" };
}
// Updates the configuration of the specified service.
rpc UpdateService(UpdateServiceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { patch: "/v1/{name=apps/*/services/*}" body: "service" };
}
// Deletes the specified service and all enclosed versions.
rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { delete: "/v1/{name=apps/*/services/*}" };
}
}
// Manages App Engine applications.
service Applications {
// Gets information about an application.
rpc GetApplication(GetApplicationRequest) returns (Application) {
option (google.api.http) = { get: "/v1/{name=apps/*}" };
}
// Recreates the required App Engine features for the application in your
// project, for example a Cloud Storage bucket or App Engine service account.
// Use this method if you receive an error message about a missing feature,
// for example "*Error retrieving the App Engine service account*".
rpc RepairApplication(RepairApplicationRequest) returns (google.longrunning.Operation) {
option (google.api.http) = { post: "/v1/{name=apps/*}:repair" body: "*" };
}
}
// Request message for `Applications.GetApplication`.
message GetApplicationRequest {
// Name of the Application resource to get. Example: `apps/myapp`.
string name = 1;
}
// Request message for 'Applications.RepairApplication'.
message RepairApplicationRequest {
// Name of the application to repair. Example: `apps/myapp`
string name = 1;
}
// Request message for `Services.ListServices`.
message ListServicesRequest {
// Name of the parent Application resource. Example: `apps/myapp`.
string parent = 1;
// Maximum results to return per page.
int32 page_size = 2;
// Continuation token for fetching the next page of results.
string page_token = 3;
}
// Response message for `Services.ListServices`.
message ListServicesResponse {
// The services belonging to the requested application.
repeated Service services = 1;
// Continuation token for fetching the next page of results.
string next_page_token = 2;
}
// Request message for `Services.GetService`.
message GetServiceRequest {
// Name of the resource requested. Example: `apps/myapp/services/default`.
string name = 1;
}
// Request message for `Services.UpdateService`.
message UpdateServiceRequest {
// Name of the resource to update. Example: `apps/myapp/services/default`.
string name = 1;
// A Service resource containing the updated service. Only fields set in the
// field mask will be updated.
Service service = 2;
// Standard field mask for the set of fields to be updated.
google.protobuf.FieldMask update_mask = 3;
// Set to `true` to gradually shift traffic from one version to another
// single version. By default, traffic is shifted immediately.
// For gradual traffic migration, the target version
// must be located within instances that are configured for both
// [warmup requests](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#inboundservicetype)
// and
// [automatic scaling](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions#automaticscaling).
// You must specify the
// [`shardBy`](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services#shardby)
// field in the Service resource. Gradual traffic migration is not
// supported in the App Engine flexible environment. For examples, see
// [Migrating and Splitting Traffic](https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traffic).
bool migrate_traffic = 4;
}
// Request message for `Services.DeleteService`.
message DeleteServiceRequest {
// Name of the resource requested. Example: `apps/myapp/services/default`.
string name = 1;
}
// Request message for `Versions.ListVersions`.
message ListVersionsRequest {
// Name of the parent Service resource. Example:
// `apps/myapp/services/default`.
string parent = 1;
// Controls the set of fields returned in the `List` response.
VersionView view = 2;
// Maximum results to return per page.
int32 page_size = 3;
// Continuation token for fetching the next page of results.
string page_token = 4;
}
// Response message for `Versions.ListVersions`.
message ListVersionsResponse {
// The versions belonging to the requested service.
repeated Version versions = 1;
// Continuation token for fetching the next page of results.
string next_page_token = 2;
}
// Request message for `Versions.GetVersion`.
message GetVersionRequest {
// Name of the resource requested. Example:
// `apps/myapp/services/default/versions/v1`.
string name = 1;
// Controls the set of fields returned in the `Get` response.
VersionView view = 2;
}
// Request message for `Versions.CreateVersion`.
message CreateVersionRequest {
// Name of the parent resource to create this version under. Example:
// `apps/myapp/services/default`.
string parent = 1;
// Application deployment configuration.
Version version = 2;
}
// Request message for `Versions.UpdateVersion`.
message UpdateVersionRequest {
// Name of the resource to update. Example:
// `apps/myapp/services/default/versions/1`.
string name = 1;
// A Version containing the updated resource. Only fields set in the field
// mask will be updated.
Version version = 2;
// Standard field mask for the set of fields to be updated.
google.protobuf.FieldMask update_mask = 3;
}
// Request message for `Versions.DeleteVersion`.
message DeleteVersionRequest {
// Name of the resource requested. Example:
// `apps/myapp/services/default/versions/v1`.
string name = 1;
}
// Request message for `Instances.ListInstances`.
message ListInstancesRequest {
// Name of the parent Version resource. Example:
// `apps/myapp/services/default/versions/v1`.
string parent = 1;
// Maximum results to return per page.
int32 page_size = 2;
// Continuation token for fetching the next page of results.
string page_token = 3;
}
// Response message for `Instances.ListInstances`.
message ListInstancesResponse {
// The instances belonging to the requested version.
repeated Instance instances = 1;
// Continuation token for fetching the next page of results.
string next_page_token = 2;
}
// Request message for `Instances.GetInstance`.
message GetInstanceRequest {
// Name of the resource requested. Example:
// `apps/myapp/services/default/versions/v1/instances/instance-1`.
string name = 1;
}
// Request message for `Instances.DeleteInstance`.
message DeleteInstanceRequest {
// Name of the resource requested. Example:
// `apps/myapp/services/default/versions/v1/instances/instance-1`.
string name = 1;
}
// Request message for `Instances.DebugInstance`.
message DebugInstanceRequest {
// Name of the resource requested. Example:
// `apps/myapp/services/default/versions/v1/instances/instance-1`.
string name = 1;
}
// Fields that should be returned when [Version][google.appengine.v1.Version] resources
// are retreived.
enum VersionView {
// Basic version information including scaling and inbound services,
// but not detailed deployment information.
BASIC = 0;
// The information from `BASIC`, plus detailed information about the
// deployment. This format is required when creating resources, but
// is not returned in `Get` or `List` by default.
FULL = 1;
}

View File

@ -0,0 +1,112 @@
// 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/protobuf/duration.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "ApplicationProto";
option java_package = "com.google.appengine.v1";
// An Application resource contains the top-level configuration of an App
// Engine application.
message Application {
// Full path to the Application resource in the API.
// Example: `apps/myapp`.
//
// @OutputOnly
string name = 1;
// Identifier of the Application resource. This identifier is equivalent
// to the project ID of the Google Cloud Platform project where you want to
// deploy your application.
// Example: `myapp`.
string id = 2;
// HTTP path dispatch rules for requests to the application that do not
// explicitly target a service or version. Rules are order-dependent.
//
// @OutputOnly
repeated UrlDispatchRule dispatch_rules = 3;
// Google Apps authentication domain that controls which users can access
// this application.
//
// Defaults to open access for any Google Account.
string auth_domain = 6;
// Location from which this application will be run. Application instances
// will run out of data centers in the chosen location, which is also where
// all of the application's end user content is stored.
//
// Defaults to `us-central`.
//
// Options are:
//
// `us-central` - Central US
//
// `europe-west` - Western Europe
//
// `us-east1` - Eastern US
string location_id = 7;
// Google Cloud Storage bucket that can be used for storing files
// associated with this application. This bucket is associated with the
// application and can be used by the gcloud deployment commands.
//
// @OutputOnly
string code_bucket = 8;
// Cookie expiration policy for this application.
//
// @OutputOnly
google.protobuf.Duration default_cookie_expiration = 9;
// Hostname used to reach this application, as resolved by App Engine.
//
// @OutputOnly
string default_hostname = 11;
// Google Cloud Storage bucket that can be used by this application to store
// content.
//
// @OutputOnly
string default_bucket = 12;
}
// Rules to match an HTTP request and dispatch that request to a service.
message UrlDispatchRule {
// Domain name to match against. The wildcard "`*`" is supported if
// specified before a period: "`*.`".
//
// Defaults to matching all domains: "`*`".
string domain = 1;
// Pathname within the host. Must start with a "`/`". A
// single "`*`" can be included at the end of the path. The sum
// of the lengths of the domain and path may not exceed 100
// characters.
string path = 2;
// Resource ID of a service in this application that should
// serve the matched request. The service must already
// exist. Example: `default`.
string service = 3;
}

View File

@ -0,0 +1,53 @@
// Copyright 2017 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/appengine/v1/appengine.proto";
import "google/iam/v1/iam_policy.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "AuditDataProto";
option java_package = "com.google.appengine.v1";
// App Engine admin service audit log.
message AuditData {
// Detailed information about methods that require it. Does not include
// simple Get, List or Delete methods because all significant information
// (resource name, number of returned elements for List operations) is already
// included in parent audit log message.
oneof method {
// Detailed information about UpdateService call.
UpdateServiceMethod update_service = 1;
// Detailed information about CreateVersion call.
CreateVersionMethod create_version = 2;
}
}
// Detailed information about UpdateService call.
message UpdateServiceMethod {
// Update service request.
google.appengine.v1.UpdateServiceRequest request = 1;
}
// Detailed information about CreateVersion call.
message CreateVersionMethod {
// Create version request.
google.appengine.v1.CreateVersionRequest request = 1;
}

View File

@ -0,0 +1,78 @@
// 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";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "DeployProto";
option java_package = "com.google.appengine.v1";
// Code and application artifacts used to deploy a version to App Engine.
message Deployment {
// Manifest of the files stored in Google Cloud Storage that are included
// as part of this version. All files must be readable using the
// credentials supplied with this call.
map<string, FileInfo> files = 1;
// A Docker image that App Engine uses to run the version.
// Only applicable for instances in App Engine flexible environment.
ContainerInfo container = 2;
// The zip file for this deployment, if this is a zip deployment.
ZipInfo zip = 3;
}
// Single source file that is part of the version to be deployed. Each source
// file that is deployed must be specified separately.
message FileInfo {
// URL source to use to fetch this file. Must be a URL to a resource in
// Google Cloud Storage in the form
// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
string source_url = 1;
// The SHA1 hash of the file, in hex.
string sha1_sum = 2;
// The MIME type of the file.
//
// Defaults to the value from Google Cloud Storage.
string mime_type = 3;
}
// Docker image that is used to start a VM container for the version you
// deploy.
message ContainerInfo {
// URI to the hosted container image in a Docker repository. The URI must be
// fully qualified and include a tag or digest.
// Examples: "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest"
string image = 1;
}
message ZipInfo {
// URL of the zip file to deploy from. Must be a URL to a resource in
// Google Cloud Storage in the form
// 'http(s)://storage.googleapis.com/\<bucket\>/\<object\>'.
string source_url = 3;
// An estimate of the number of files in a zip for a zip deployment.
// If set, must be greater than or equal to the actual number of files.
// Used for optimizing performance; if not provided, deployment may be slow.
int32 files_count = 4;
}

View File

@ -0,0 +1,121 @@
// 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/protobuf/timestamp.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "InstanceProto";
option java_package = "com.google.appengine.v1";
// An Instance resource is the computing unit that App Engine uses to
// automatically scale an application.
message Instance {
// Availability of the instance.
enum Availability {
UNSPECIFIED = 0;
RESIDENT = 1;
DYNAMIC = 2;
}
// Full path to the Instance resource in the API.
// Example: `apps/myapp/services/default/versions/v1/instances/instance-1`.
//
// @OutputOnly
string name = 1;
// Relative name of the instance within the version.
// Example: `instance-1`.
//
// @OutputOnly
string id = 2;
// App Engine release this instance is running on.
//
// @OutputOnly
string app_engine_release = 3;
// Availability of the instance.
//
// @OutputOnly
Availability availability = 4;
// Name of the virtual machine where this instance lives. Only applicable
// for instances in App Engine flexible environment.
//
// @OutputOnly
string vm_name = 5;
// Zone where the virtual machine is located. Only applicable for instances
// in App Engine flexible environment.
//
// @OutputOnly
string vm_zone_name = 6;
// Virtual machine ID of this instance. Only applicable for instances in
// App Engine flexible environment.
//
// @OutputOnly
string vm_id = 7;
// Time that this instance was started.
//
// @OutputOnly
google.protobuf.Timestamp start_time = 8;
// Number of requests since this instance was started.
//
// @OutputOnly
int32 requests = 9;
// Number of errors since this instance was started.
//
// @OutputOnly
int32 errors = 10;
// Average queries per second (QPS) over the last minute.
//
// @OutputOnly
float qps = 11;
// Average latency (ms) over the last minute.
//
// @OutputOnly
int32 average_latency = 12;
// Total memory in use (bytes).
//
// @OutputOnly
int64 memory_usage = 13;
// Status of the virtual machine where this instance lives. Only applicable
// for instances in App Engine flexible environment.
//
// @OutputOnly
string vm_status = 14;
// Whether this instance is in debug mode. Only applicable for instances in
// App Engine flexible environment.
//
// @OutputOnly
bool vm_debug_enabled = 15;
}

View File

@ -0,0 +1,39 @@
// 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/type/latlng.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "LocationProto";
option java_package = "com.google.appengine.v1";
// Metadata for the given [google.cloud.location.Location][google.cloud.location.Location].
message LocationMetadata {
// App Engine Standard Environment is available in the given location.
//
// @OutputOnly
bool standard_environment_available = 2;
// App Engine Flexible Environment is available in the given location.
//
// @OutputOnly
bool flexible_environment_available = 4;
}

View File

@ -0,0 +1,56 @@
// 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/protobuf/timestamp.proto";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "OperationProto";
option java_package = "com.google.appengine.v1";
// Metadata for the given [google.longrunning.Operation][google.longrunning.Operation].
message OperationMetadataV1 {
// API method that initiated this operation. Example:
// `google.appengine.v1.Versions.CreateVersion`.
//
// @OutputOnly
string method = 1;
// Time that this operation was created.
//
// @OutputOnly
google.protobuf.Timestamp insert_time = 2;
// Time that this operation completed.
//
// @OutputOnly
google.protobuf.Timestamp end_time = 3;
// User who requested this operation.
//
// @OutputOnly
string user = 4;
// Name of the resource that this operation is acting on. Example:
// `apps/myapp/services/default`.
//
// @OutputOnly
string target = 5;
}

View File

@ -0,0 +1,83 @@
// 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";
option go_package = "google.golang.org/genproto/googleapis/appengine/v1;appengine";
option java_multiple_files = true;
option java_outer_classname = "ServiceProto";
option java_package = "com.google.appengine.v1";
// A Service resource is a logical component of an application that can share
// state and communicate in a secure fashion with other services.
// For example, an application that handles customer requests might
// include separate services to handle tasks such as backend data
// analysis or API requests from mobile devices. Each service has a
// collection of versions that define a specific set of code used to
// implement the functionality of that service.
message Service {
// Full path to the Service resource in the API.
// Example: `apps/myapp/services/default`.
//
// @OutputOnly
string name = 1;
// Relative name of the service within the application.
// Example: `default`.
//
// @OutputOnly
string id = 2;
// Mapping that defines fractional HTTP traffic diversion to
// different versions within the service.
TrafficSplit split = 3;
}
// Traffic routing configuration for versions within a single service. Traffic
// splits define how traffic directed to the service is assigned to versions.
message TrafficSplit {
// Available sharding mechanisms.
enum ShardBy {
// Diversion method unspecified.
UNSPECIFIED = 0;
// Diversion based on a specially named cookie, "GOOGAPPUID." The cookie
// must be set by the application itself or no diversion will occur.
COOKIE = 1;
// Diversion based on applying the modulus operation to a fingerprint
// of the IP address.
IP = 2;
}
// Mechanism used to determine which version a request is sent to.
// The traffic selection algorithm will
// be stable for either type until allocations are changed.
ShardBy shard_by = 1;
// Mapping from version IDs within the service to fractional
// (0.000, 1] allocations of traffic for that version. Each version can
// be specified only once, but some versions in the service may not
// have any traffic allocation. Services that have traffic allocated
// cannot be deleted until either the service is deleted or
// their traffic allocation is removed. Allocations must sum to 1.
// Up to two decimal place precision is supported for IP-based splits and
// up to three decimal places is supported for cookie-based splits.
map<string, double> allocations = 2;
}

View File

@ -0,0 +1,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;
}