mesh.proto 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. // Copyright 2022 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.networkservices.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/field_mask.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.NetworkServices.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/networkservices/v1;networkservices";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "MeshProto";
  24. option java_package = "com.google.cloud.networkservices.v1";
  25. option php_namespace = "Google\\Cloud\\NetworkServices\\V1";
  26. option ruby_package = "Google::Cloud::NetworkServices::V1";
  27. // Mesh represents a logical configuration grouping for workload to workload
  28. // communication within a service mesh. Routes that point to mesh dictate how
  29. // requests are routed within this logical mesh boundary.
  30. message Mesh {
  31. option (google.api.resource) = {
  32. type: "networkservices.googleapis.com/Mesh"
  33. pattern: "projects/{project}/locations/{location}/meshes/{mesh}"
  34. };
  35. // Required. Name of the Mesh resource. It matches pattern
  36. // `projects/*/locations/global/meshes/<mesh_name>`.
  37. string name = 1 [(google.api.field_behavior) = REQUIRED];
  38. // Output only. Server-defined URL of this resource
  39. string self_link = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  40. // Output only. The timestamp when the resource was created.
  41. google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  42. // Output only. The timestamp when the resource was updated.
  43. google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  44. // Optional. Set of label tags associated with the Mesh resource.
  45. map<string, string> labels = 4 [(google.api.field_behavior) = OPTIONAL];
  46. // Optional. A free-text description of the resource. Max length 1024 characters.
  47. string description = 5 [(google.api.field_behavior) = OPTIONAL];
  48. // Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen
  49. // on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy
  50. // will expect all traffic to be redirected to this port regardless of its
  51. // actual ip:port destination. If unset, a port '15001' is used as the
  52. // interception port. This will is applicable only for sidecar proxy
  53. // deployments.
  54. int32 interception_port = 8 [(google.api.field_behavior) = OPTIONAL];
  55. }
  56. // Request used with the ListMeshes method.
  57. message ListMeshesRequest {
  58. // Required. The project and location from which the Meshes should be
  59. // listed, specified in the format `projects/*/locations/global`.
  60. string parent = 1 [
  61. (google.api.field_behavior) = REQUIRED,
  62. (google.api.resource_reference) = {
  63. child_type: "networkservices.googleapis.com/Mesh"
  64. }
  65. ];
  66. // Maximum number of Meshes to return per call.
  67. int32 page_size = 2;
  68. // The value returned by the last `ListMeshesResponse`
  69. // Indicates that this is a continuation of a prior `ListMeshes` call,
  70. // and that the system should return the next page of data.
  71. string page_token = 3;
  72. }
  73. // Response returned by the ListMeshes method.
  74. message ListMeshesResponse {
  75. // List of Mesh resources.
  76. repeated Mesh meshes = 1;
  77. // If there might be more results than those appearing in this response, then
  78. // `next_page_token` is included. To get the next set of results, call this
  79. // method again using the value of `next_page_token` as `page_token`.
  80. string next_page_token = 2;
  81. }
  82. // Request used by the GetMesh method.
  83. message GetMeshRequest {
  84. // Required. A name of the Mesh to get. Must be in the format
  85. // `projects/*/locations/global/meshes/*`.
  86. string name = 1 [
  87. (google.api.field_behavior) = REQUIRED,
  88. (google.api.resource_reference) = {
  89. type: "networkservices.googleapis.com/Mesh"
  90. }
  91. ];
  92. }
  93. // Request used by the CreateMesh method.
  94. message CreateMeshRequest {
  95. // Required. The parent resource of the Mesh. Must be in the
  96. // format `projects/*/locations/global`.
  97. string parent = 1 [
  98. (google.api.field_behavior) = REQUIRED,
  99. (google.api.resource_reference) = {
  100. child_type: "networkservices.googleapis.com/Mesh"
  101. }
  102. ];
  103. // Required. Short name of the Mesh resource to be created.
  104. string mesh_id = 2 [(google.api.field_behavior) = REQUIRED];
  105. // Required. Mesh resource to be created.
  106. Mesh mesh = 3 [(google.api.field_behavior) = REQUIRED];
  107. }
  108. // Request used by the UpdateMesh method.
  109. message UpdateMeshRequest {
  110. // Optional. Field mask is used to specify the fields to be overwritten in the
  111. // Mesh resource by the update.
  112. // The fields specified in the update_mask are relative to the resource, not
  113. // the full request. A field will be overwritten if it is in the mask. If the
  114. // user does not provide a mask then all fields will be overwritten.
  115. google.protobuf.FieldMask update_mask = 1 [(google.api.field_behavior) = OPTIONAL];
  116. // Required. Updated Mesh resource.
  117. Mesh mesh = 2 [(google.api.field_behavior) = REQUIRED];
  118. }
  119. // Request used by the DeleteMesh method.
  120. message DeleteMeshRequest {
  121. // Required. A name of the Mesh to delete. Must be in the format
  122. // `projects/*/locations/global/meshes/*`.
  123. string name = 1 [
  124. (google.api.field_behavior) = REQUIRED,
  125. (google.api.resource_reference) = {
  126. type: "networkservices.googleapis.com/Mesh"
  127. }
  128. ];
  129. }