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 15syntax = "proto3"; 16 17package google.appengine.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/protobuf/timestamp.proto"; 22 23option csharp_namespace = "Google.Cloud.AppEngine.V1"; 24option go_package = "cloud.google.com/go/appengine/apiv1/appenginepb;appenginepb"; 25option java_multiple_files = true; 26option java_outer_classname = "InstanceProto"; 27option java_package = "com.google.appengine.v1"; 28option php_namespace = "Google\\Cloud\\AppEngine\\V1"; 29option ruby_package = "Google::Cloud::AppEngine::V1"; 30 31// An Instance resource is the computing unit that App Engine uses to 32// automatically scale an application. 33message Instance { 34 option (google.api.resource) = { 35 type: "appengine.googleapis.com/Instance" 36 pattern: "apps/{app}/services/{service}/versions/{version}/instances/{instance}" 37 }; 38 39 // Availability of the instance. 40 enum Availability { 41 UNSPECIFIED = 0; 42 43 RESIDENT = 1; 44 45 DYNAMIC = 2; 46 } 47 48 // Wrapper for LivenessState enum. 49 message Liveness { 50 // Liveness health check status for Flex instances. 51 enum LivenessState { 52 // There is no liveness health check for the instance. Only applicable for 53 // instances in App Engine standard environment. 54 LIVENESS_STATE_UNSPECIFIED = 0; 55 56 // The health checking system is aware of the instance but its health is 57 // not known at the moment. 58 UNKNOWN = 1; 59 60 // The instance is reachable i.e. a connection to the application health 61 // checking endpoint can be established, and conforms to the requirements 62 // defined by the health check. 63 HEALTHY = 2; 64 65 // The instance is reachable, but does not conform to the requirements 66 // defined by the health check. 67 UNHEALTHY = 3; 68 69 // The instance is being drained. The existing connections to the instance 70 // have time to complete, but the new ones are being refused. 71 DRAINING = 4; 72 73 // The instance is unreachable i.e. a connection to the application health 74 // checking endpoint cannot be established, or the server does not respond 75 // within the specified timeout. 76 TIMEOUT = 5; 77 } 78 79 80 } 81 82 // Output only. Full path to the Instance resource in the API. 83 // Example: `apps/myapp/services/default/versions/v1/instances/instance-1`. 84 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 85 86 // Output only. Relative name of the instance within the version. 87 // Example: `instance-1`. 88 string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 89 90 // Output only. App Engine release this instance is running on. 91 string app_engine_release = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 92 93 // Output only. Availability of the instance. 94 Availability availability = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; 95 96 // Output only. Name of the virtual machine where this instance lives. Only applicable 97 // for instances in App Engine flexible environment. 98 string vm_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; 99 100 // Output only. Zone where the virtual machine is located. Only applicable for instances 101 // in App Engine flexible environment. 102 string vm_zone_name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; 103 104 // Output only. Virtual machine ID of this instance. Only applicable for instances in 105 // App Engine flexible environment. 106 string vm_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 107 108 // Output only. Time that this instance was started. 109 // 110 // @OutputOnly 111 google.protobuf.Timestamp start_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; 112 113 // Output only. Number of requests since this instance was started. 114 int32 requests = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; 115 116 // Output only. Number of errors since this instance was started. 117 int32 errors = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; 118 119 // Output only. Average queries per second (QPS) over the last minute. 120 float qps = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; 121 122 // Output only. Average latency (ms) over the last minute. 123 int32 average_latency = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; 124 125 // Output only. Total memory in use (bytes). 126 int64 memory_usage = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; 127 128 // Output only. Status of the virtual machine where this instance lives. Only applicable 129 // for instances in App Engine flexible environment. 130 string vm_status = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; 131 132 // Output only. Whether this instance is in debug mode. Only applicable for instances in 133 // App Engine flexible environment. 134 bool vm_debug_enabled = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; 135 136 // Output only. The IP address of this instance. Only applicable for instances in App 137 // Engine flexible environment. 138 string vm_ip = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; 139 140 // Output only. The liveness health check of this instance. Only applicable for instances 141 // in App Engine flexible environment. 142 Liveness.LivenessState vm_liveness = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; 143} 144