instance.proto 5.6 KB

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