xref: /aosp_15_r20/external/googleapis/google/appengine/v1beta/instance.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2021 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.v1beta;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/protobuf/timestamp.proto";
22
23option csharp_namespace = "Google.Cloud.AppEngine.V1Beta";
24option go_package = "google.golang.org/genproto/googleapis/appengine/v1beta;appengine";
25option java_multiple_files = true;
26option java_outer_classname = "InstanceProto";
27option java_package = "com.google.appengine.v1beta";
28option php_namespace = "Google\\Cloud\\AppEngine\\V1beta";
29option ruby_package = "Google::Cloud::AppEngine::V1beta";
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  // Wrapper for LivenessState enum.
40  message Liveness {
41    // Liveness health check status for Flex instances.
42    enum LivenessState {
43      // There is no liveness health check for the instance. Only applicable for
44      // instances in App Engine standard environment.
45      LIVENESS_STATE_UNSPECIFIED = 0;
46
47      // The health checking system is aware of the instance but its health is
48      // not known at the moment.
49      UNKNOWN = 1;
50
51      // The instance is reachable i.e. a connection to the application health
52      // checking endpoint can be established, and conforms to the requirements
53      // defined by the health check.
54      HEALTHY = 2;
55
56      // The instance is reachable, but does not conform to the requirements
57      // defined by the health check.
58      UNHEALTHY = 3;
59
60      // The instance is being drained. The existing connections to the instance
61      // have time to complete, but the new ones are being refused.
62      DRAINING = 4;
63
64      // The instance is unreachable i.e. a connection to the application health
65      // checking endpoint cannot be established, or the server does not respond
66      // within the specified timeout.
67      TIMEOUT = 5;
68    }
69
70
71  }
72
73  // Availability of the instance.
74  enum Availability {
75    UNSPECIFIED = 0;
76
77    RESIDENT = 1;
78
79    DYNAMIC = 2;
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