xref: /aosp_15_r20/external/googleapis/google/cloud/apigeeconnect/v1/connection.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.cloud.apigeeconnect.v1;
18
19import "google/api/annotations.proto";
20import "google/api/client.proto";
21import "google/api/field_behavior.proto";
22import "google/api/resource.proto";
23
24option csharp_namespace = "Google.Cloud.ApigeeConnect.V1";
25option go_package = "cloud.google.com/go/apigeeconnect/apiv1/apigeeconnectpb;apigeeconnectpb";
26option java_multiple_files = true;
27option java_outer_classname = "ConnectionProto";
28option java_package = "com.google.cloud.apigeeconnect.v1";
29option php_namespace = "Google\\Cloud\\ApigeeConnect\\V1";
30option ruby_package = "Google::Cloud::ApigeeConnect::V1";
31option (google.api.resource_definition) = {
32  type: "apigeeconnect.googleapis.com/Endpoint"
33  pattern: "projects/{project}/endpoints/{endpoint}"
34};
35
36// Service Interface for the Apigee Connect connection management APIs.
37service ConnectionService {
38  option (google.api.default_host) = "apigeeconnect.googleapis.com";
39  option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
40
41  // Lists connections that are currently active for the given Apigee Connect
42  // endpoint.
43  rpc ListConnections(ListConnectionsRequest) returns (ListConnectionsResponse) {
44    option (google.api.http) = {
45      get: "/v1/{parent=projects/*/endpoints/*}/connections"
46    };
47    option (google.api.method_signature) = "parent";
48  }
49}
50
51// The request for [ListConnections][Management.ListConnections].
52message ListConnectionsRequest {
53  // Required. Parent name of the form:
54  //     `projects/{project_number or project_id}/endpoints/{endpoint}`.
55  string parent = 1 [
56    (google.api.field_behavior) = REQUIRED,
57    (google.api.resource_reference) = {
58      type: "apigeeconnect.googleapis.com/Endpoint"
59    }
60  ];
61
62  // The maximum number of connections to return. The service may return fewer
63  // than this value. If unspecified, at most 100 connections will be returned.
64  // The maximum value is 1000; values above 1000 will be coerced to 1000.
65  int32 page_size = 2;
66
67  // A page token, received from a previous `ListConnections` call.
68  // Provide this to retrieve the subsequent page.
69  //
70  // When paginating, all other parameters provided to `ListConnections` must
71  // match the call that provided the page token.
72  string page_token = 3;
73}
74
75// The response for
76// [ListConnections][Management.ListConnections].
77message ListConnectionsResponse {
78  // A list of clients.
79  repeated Connection connections = 1;
80
81  // A token that can be sent as `page_token` to retrieve the next page.
82  // If this field is omitted, there are no subsequent pages.
83  string next_page_token = 2;
84}
85
86message Connection {
87  // The endpoint that the connection is made against.
88  // Format: `projects/{project_number}/endpoints/{endpoint}`
89  string endpoint = 1;
90
91  // Cluster information.
92  Cluster cluster = 2;
93
94  // The count of streams.
95  int32 stream_count = 3;
96}
97
98message Cluster {
99  // The name of the cluster.
100  string name = 1;
101
102  // The region of the cluster.
103  string region = 2;
104}
105