nfs_share.proto 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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.baremetalsolution.v2;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/protobuf/field_mask.proto";
  19. option csharp_namespace = "Google.Cloud.BareMetalSolution.V2";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/baremetalsolution/v2;baremetalsolution";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "NfsShareProto";
  23. option java_package = "com.google.cloud.baremetalsolution.v2";
  24. option php_namespace = "Google\\Cloud\\BareMetalSolution\\V2";
  25. option ruby_package = "Google::Cloud::BareMetalSolution::V2";
  26. // An NFS share.
  27. message NfsShare {
  28. option (google.api.resource) = {
  29. type: "baremetalsolution.googleapis.com/NFSShare"
  30. pattern: "projects/{project}/locations/{location}/nfsShares/{nfs_share}"
  31. };
  32. // The possible states for this NFS share.
  33. enum State {
  34. // The share is in an unknown state.
  35. STATE_UNSPECIFIED = 0;
  36. // The share has been provisioned.
  37. PROVISIONED = 1;
  38. }
  39. // The possible mount permissions.
  40. enum MountPermissions {
  41. // Permissions were not specified.
  42. MOUNT_PERMISSIONS_UNSPECIFIED = 0;
  43. // NFS share can be mount with read-only permissions.
  44. READ = 1;
  45. // NFS share can be mount with read-write permissions.
  46. READ_WRITE = 2;
  47. }
  48. // Represents an 'access point' for the share.
  49. message AllowedClient {
  50. // The network the access point sits on.
  51. string network = 1 [(google.api.resource_reference) = {
  52. type: "baremetalsolution.googleapis.com/Network"
  53. }];
  54. // The IP address of the share on this network.
  55. string share_ip = 2;
  56. // The subnet of IP addresses permitted to access the share.
  57. string allowed_clients_cidr = 3;
  58. // Mount permissions.
  59. MountPermissions mount_permissions = 4;
  60. // Allow dev flag. Which controls whether to allow creation of devices.
  61. bool allow_dev = 5;
  62. // Allow the setuid flag.
  63. bool allow_suid = 6;
  64. // Disable root squashing, which is a feature of NFS.
  65. // Root squash is a special mapping of the remote superuser (root) identity
  66. // when using identity authentication.
  67. bool no_root_squash = 7;
  68. }
  69. // Output only. The name of the NFS share.
  70. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  71. // Output only. An identifier for the NFS share, generated by the backend.
  72. string nfs_share_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  73. // The state of the NFS share.
  74. State state = 3;
  75. // The volume containing the share.
  76. string volume = 4 [(google.api.resource_reference) = {
  77. type: "baremetalsolution.googleapis.com/Volume"
  78. }];
  79. // List of allowed access points.
  80. repeated AllowedClient allowed_clients = 5;
  81. // Labels as key value pairs.
  82. map<string, string> labels = 6;
  83. }
  84. // Message for requesting NFS share information.
  85. message GetNfsShareRequest {
  86. // Required. Name of the resource.
  87. string name = 1 [
  88. (google.api.field_behavior) = REQUIRED,
  89. (google.api.resource_reference) = {
  90. type: "baremetalsolution.googleapis.com/NFSShare"
  91. }
  92. ];
  93. }
  94. // Message for requesting a list of NFS shares.
  95. message ListNfsSharesRequest {
  96. // Required. Parent value for ListNfsSharesRequest.
  97. string parent = 1 [
  98. (google.api.field_behavior) = REQUIRED,
  99. (google.api.resource_reference) = {
  100. type: "locations.googleapis.com/Location"
  101. }
  102. ];
  103. // Requested page size. The server might return fewer items than requested.
  104. // If unspecified, server will pick an appropriate default.
  105. int32 page_size = 2;
  106. // A token identifying a page of results from the server.
  107. string page_token = 3;
  108. // List filter.
  109. string filter = 4;
  110. }
  111. // Response message containing the list of NFS shares.
  112. message ListNfsSharesResponse {
  113. // The list of NFS shares.
  114. repeated NfsShare nfs_shares = 1;
  115. // A token identifying a page of results from the server.
  116. string next_page_token = 2;
  117. // Locations that could not be reached.
  118. repeated string unreachable = 3;
  119. }
  120. // Message requesting to updating a NFS share.
  121. message UpdateNfsShareRequest {
  122. // Required. The NFS share to update.
  123. //
  124. // The `name` field is used to identify the NFS share to update.
  125. // Format: projects/{project}/locations/{location}/nfsShares/{nfs_share}
  126. NfsShare nfs_share = 1 [(google.api.field_behavior) = REQUIRED];
  127. // The list of fields to update.
  128. // The only currently supported fields are:
  129. // `labels`
  130. google.protobuf.FieldMask update_mask = 2;
  131. }