instance.proto 5.6 KB

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