volume.proto 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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.gkebackup.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/gkebackup/v1/common.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option csharp_namespace = "Google.Cloud.GkeBackup.V1";
  21. option go_package = "google.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackup";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "VolumeProto";
  24. option java_package = "com.google.cloud.gkebackup.v1";
  25. option php_namespace = "Google\\Cloud\\GkeBackup\\V1";
  26. option ruby_package = "Google::Cloud::GkeBackup::V1";
  27. // Represents the backup of a specific persistent volume as a component of a
  28. // Backup - both the record of the operation and a pointer to the underlying
  29. // storage-specific artifacts.
  30. // Next id: 14
  31. message VolumeBackup {
  32. option (google.api.resource) = {
  33. type: "gkebackup.googleapis.com/VolumeBackup"
  34. pattern: "projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}"
  35. };
  36. // Identifies the format used for the volume backup.
  37. enum VolumeBackupFormat {
  38. // Default value, not specified.
  39. VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0;
  40. // Compute Engine Persistent Disk snapshot based volume backup.
  41. GCE_PERSISTENT_DISK = 1;
  42. }
  43. // The current state of a VolumeBackup
  44. enum State {
  45. // This is an illegal state and should not be encountered.
  46. STATE_UNSPECIFIED = 0;
  47. // A volume for the backup was identified and backup process is about to
  48. // start.
  49. CREATING = 1;
  50. // The volume backup operation has begun and is in the initial "snapshot"
  51. // phase of the process. Any defined ProtectedApplication "pre" hooks will
  52. // be executed before entering this state and "post" hooks will be executed
  53. // upon leaving this state.
  54. SNAPSHOTTING = 2;
  55. // The snapshot phase of the volume backup operation has completed and
  56. // the snapshot is now being uploaded to backup storage.
  57. UPLOADING = 3;
  58. // The volume backup operation has completed successfully.
  59. SUCCEEDED = 4;
  60. // The volume backup operation has failed.
  61. FAILED = 5;
  62. // This VolumeBackup resource (and its associated artifacts) is in the
  63. // process of being deleted.
  64. DELETING = 6;
  65. }
  66. // Output only. The full name of the VolumeBackup resource.
  67. // Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*.
  68. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  69. // Output only. Server generated global unique identifier of
  70. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
  71. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  72. // Output only. The timestamp when this VolumeBackup resource was
  73. // created.
  74. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  75. // Output only. The timestamp when this VolumeBackup resource was last
  76. // updated.
  77. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  78. // Output only. A reference to the source Kubernetes PVC from which this VolumeBackup
  79. // was created.
  80. NamespacedName source_pvc = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  81. // Output only. A storage system-specific opaque handle to the underlying volume backup.
  82. string volume_backup_handle = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  83. // Output only. The format used for the volume backup.
  84. VolumeBackupFormat format = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  85. // Output only. The aggregate size of the underlying artifacts associated with this
  86. // VolumeBackup in the backup storage. This may change over time when
  87. // multiple backups of the same volume share the same backup storage
  88. // location. In particular, this is likely to increase in size when
  89. // the immediately preceding backup of the same volume is deleted.
  90. int64 storage_bytes = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  91. // Output only. The minimum size of the disk to which this VolumeBackup can be restored.
  92. int64 disk_size_bytes = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  93. // Output only. The timestamp when the associated underlying volume backup
  94. // operation completed.
  95. google.protobuf.Timestamp complete_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  96. // Output only. The current state of this VolumeBackup.
  97. State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  98. // Output only. A human readable message explaining why the VolumeBackup is in its current
  99. // state.
  100. string state_message = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  101. // Output only. `etag` is used for optimistic concurrency control as a way to help
  102. // prevent simultaneous updates of a volume backup from overwriting each
  103. // other. It is strongly suggested that systems make use of the `etag` in the
  104. // read-modify-write cycle to perform volume backup updates in order to avoid
  105. // race conditions.
  106. string etag = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
  107. }
  108. // Represents the operation of restoring a volume from a VolumeBackup.
  109. // Next id: 13
  110. message VolumeRestore {
  111. option (google.api.resource) = {
  112. type: "gkebackup.googleapis.com/VolumeRestore"
  113. pattern: "projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}"
  114. };
  115. // Supported volume types.
  116. enum VolumeType {
  117. // Default
  118. VOLUME_TYPE_UNSPECIFIED = 0;
  119. // Compute Engine Persistent Disk volume
  120. GCE_PERSISTENT_DISK = 1;
  121. }
  122. // The current state of a VolumeRestore
  123. enum State {
  124. // This is an illegal state and should not be encountered.
  125. STATE_UNSPECIFIED = 0;
  126. // A volume for the restore was identified and restore process is about to
  127. // start.
  128. CREATING = 1;
  129. // The volume is currently being restored.
  130. RESTORING = 2;
  131. // The volume has been successfully restored.
  132. SUCCEEDED = 3;
  133. // The volume restoration process failed.
  134. FAILED = 4;
  135. // This VolumeRestore resource is in the process of being deleted.
  136. DELETING = 5;
  137. }
  138. // Output only. Full name of the VolumeRestore resource.
  139. // Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*.
  140. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  141. // Output only. Server generated global unique identifier of
  142. // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
  143. string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  144. // Output only. The timestamp when this VolumeRestore resource was
  145. // created.
  146. google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  147. // Output only. The timestamp when this VolumeRestore resource was last
  148. // updated.
  149. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  150. // Output only. The full name of the VolumeBackup from which the volume will be restored.
  151. // Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*.
  152. string volume_backup = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  153. // Output only. The reference to the target Kubernetes PVC to be restored.
  154. NamespacedName target_pvc = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  155. // Output only. A storage system-specific opaque handler to the underlying volume created
  156. // for the target PVC from the volume backup.
  157. string volume_handle = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  158. // Output only. The type of volume provisioned
  159. VolumeType volume_type = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  160. // Output only. The timestamp when the associated underlying volume
  161. // restoration completed.
  162. google.protobuf.Timestamp complete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  163. // Output only. The current state of this VolumeRestore.
  164. State state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  165. // Output only. A human readable message explaining why the VolumeRestore is in its
  166. // current state.
  167. string state_message = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  168. // Output only. `etag` is used for optimistic concurrency control as a way to help
  169. // prevent simultaneous updates of a volume restore from overwriting each
  170. // other. It is strongly suggested that systems make use of the `etag` in the
  171. // read-modify-write cycle to perform volume restore updates in order to avoid
  172. // race conditions.
  173. string etag = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  174. }