connection.proto 3.5 KB

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