xref: /aosp_15_r20/external/googleapis/google/cloud/visionai/v1/health_service.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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.cloud.visionai.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/resource.proto";
22
23option csharp_namespace = "Google.Cloud.VisionAI.V1";
24option go_package = "cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb";
25option java_multiple_files = true;
26option java_outer_classname = "HealthCheckServiceProto";
27option java_package = "com.google.cloud.visionai.v1";
28option php_namespace = "Google\\Cloud\\VisionAI\\V1";
29option ruby_package = "Google::Cloud::VisionAI::V1";
30
31// HealthCheckService provides an interface for Vertex AI Vision Cluster Health
32// Check.
33service HealthCheckService {
34  option (google.api.default_host) = "visionai.googleapis.com";
35  option (google.api.oauth_scopes) =
36      "https://www.googleapis.com/auth/cloud-platform";
37
38  // HealthCheck method checks the health status of the cluster.
39  rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse) {
40    option (google.api.http) = {
41      get: "/v1/{cluster=projects/*/locations/*/clusters/*}:healthCheck"
42    };
43  }
44}
45
46// HealthCheckRequest is the request message for Check.
47message HealthCheckRequest {
48  // The parent of the resource.
49  string cluster = 1 [(google.api.resource_reference) = {
50    type: "visionai.googleapis.com/Cluster"
51  }];
52}
53
54// HealthCheckResponse is the response message for Check.
55message HealthCheckResponse {
56  // Indicates whether the cluster is in healthy state or not.
57  bool healthy = 1;
58
59  // Reason of why the cluster is in unhealthy state.
60  string reason = 2;
61
62  // Other information of the cluster client may be interested.
63  ClusterInfo cluster_info = 3;
64}
65
66message ClusterInfo {
67  // The number of active streams in the cluster.
68  int32 streams_count = 1;
69
70  // The number of active processes in the cluster.
71  int32 processes_count = 2;
72}
73