gkebackup.proto 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940
  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/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/field_behavior.proto";
  19. import "google/api/resource.proto";
  20. import "google/cloud/gkebackup/v1/backup.proto";
  21. import "google/cloud/gkebackup/v1/backup_plan.proto";
  22. import "google/cloud/gkebackup/v1/restore.proto";
  23. import "google/cloud/gkebackup/v1/restore_plan.proto";
  24. import "google/cloud/gkebackup/v1/volume.proto";
  25. import "google/longrunning/operations.proto";
  26. import "google/protobuf/field_mask.proto";
  27. import "google/protobuf/timestamp.proto";
  28. option csharp_namespace = "Google.Cloud.GkeBackup.V1";
  29. option go_package = "google.golang.org/genproto/googleapis/cloud/gkebackup/v1;gkebackup";
  30. option java_multiple_files = true;
  31. option java_outer_classname = "GKEBackupProto";
  32. option java_package = "com.google.cloud.gkebackup.v1";
  33. option php_namespace = "Google\\Cloud\\GkeBackup\\V1";
  34. option ruby_package = "Google::Cloud::GkeBackup::V1";
  35. option (google.api.resource_definition) = {
  36. type: "container.googleapis.com/Cluster"
  37. pattern: "projects/{project}/locations/{location}/clusters/{cluster}"
  38. };
  39. option (google.api.resource_definition) = {
  40. type: "cloudkms.googleapis.com/CryptoKey"
  41. pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}"
  42. };
  43. // BackupForGKE allows Kubernetes administrators to configure, execute, and
  44. // manage backup and restore operations for their GKE clusters.
  45. service BackupForGKE {
  46. option (google.api.default_host) = "gkebackup.googleapis.com";
  47. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  48. // Creates a new BackupPlan in a given location.
  49. rpc CreateBackupPlan(CreateBackupPlanRequest) returns (google.longrunning.Operation) {
  50. option (google.api.http) = {
  51. post: "/v1/{parent=projects/*/locations/*}/backupPlans"
  52. body: "backup_plan"
  53. };
  54. option (google.api.method_signature) = "parent,backup_plan,backup_plan_id";
  55. option (google.longrunning.operation_info) = {
  56. response_type: "BackupPlan"
  57. metadata_type: "OperationMetadata"
  58. };
  59. }
  60. // Lists BackupPlans in a given location.
  61. rpc ListBackupPlans(ListBackupPlansRequest) returns (ListBackupPlansResponse) {
  62. option (google.api.http) = {
  63. get: "/v1/{parent=projects/*/locations/*}/backupPlans"
  64. };
  65. option (google.api.method_signature) = "parent";
  66. }
  67. // Retrieve the details of a single BackupPlan.
  68. rpc GetBackupPlan(GetBackupPlanRequest) returns (BackupPlan) {
  69. option (google.api.http) = {
  70. get: "/v1/{name=projects/*/locations/*/backupPlans/*}"
  71. };
  72. option (google.api.method_signature) = "name";
  73. }
  74. // Update a BackupPlan.
  75. rpc UpdateBackupPlan(UpdateBackupPlanRequest) returns (google.longrunning.Operation) {
  76. option (google.api.http) = {
  77. patch: "/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}"
  78. body: "backup_plan"
  79. };
  80. option (google.api.method_signature) = "backup_plan,update_mask";
  81. option (google.longrunning.operation_info) = {
  82. response_type: "BackupPlan"
  83. metadata_type: "OperationMetadata"
  84. };
  85. }
  86. // Deletes an existing BackupPlan.
  87. rpc DeleteBackupPlan(DeleteBackupPlanRequest) returns (google.longrunning.Operation) {
  88. option (google.api.http) = {
  89. delete: "/v1/{name=projects/*/locations/*/backupPlans/*}"
  90. };
  91. option (google.api.method_signature) = "name";
  92. option (google.longrunning.operation_info) = {
  93. response_type: "google.protobuf.Empty"
  94. metadata_type: "OperationMetadata"
  95. };
  96. }
  97. // Creates a Backup for the given BackupPlan.
  98. rpc CreateBackup(CreateBackupRequest) returns (google.longrunning.Operation) {
  99. option (google.api.http) = {
  100. post: "/v1/{parent=projects/*/locations/*/backupPlans/*}/backups"
  101. body: "backup"
  102. };
  103. option (google.api.method_signature) = "parent,backup,backup_id";
  104. option (google.longrunning.operation_info) = {
  105. response_type: "Backup"
  106. metadata_type: "OperationMetadata"
  107. };
  108. }
  109. // Lists the Backups for a given BackupPlan.
  110. rpc ListBackups(ListBackupsRequest) returns (ListBackupsResponse) {
  111. option (google.api.http) = {
  112. get: "/v1/{parent=projects/*/locations/*/backupPlans/*}/backups"
  113. };
  114. option (google.api.method_signature) = "parent";
  115. }
  116. // Retrieve the details of a single Backup.
  117. rpc GetBackup(GetBackupRequest) returns (Backup) {
  118. option (google.api.http) = {
  119. get: "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}"
  120. };
  121. option (google.api.method_signature) = "name";
  122. }
  123. // Update a Backup.
  124. rpc UpdateBackup(UpdateBackupRequest) returns (google.longrunning.Operation) {
  125. option (google.api.http) = {
  126. patch: "/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}"
  127. body: "backup"
  128. };
  129. option (google.api.method_signature) = "backup,update_mask";
  130. option (google.longrunning.operation_info) = {
  131. response_type: "Backup"
  132. metadata_type: "OperationMetadata"
  133. };
  134. }
  135. // Deletes an existing Backup.
  136. rpc DeleteBackup(DeleteBackupRequest) returns (google.longrunning.Operation) {
  137. option (google.api.http) = {
  138. delete: "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}"
  139. };
  140. option (google.api.method_signature) = "name";
  141. option (google.longrunning.operation_info) = {
  142. response_type: "google.protobuf.Empty"
  143. metadata_type: "OperationMetadata"
  144. };
  145. }
  146. // Lists the VolumeBackups for a given Backup.
  147. rpc ListVolumeBackups(ListVolumeBackupsRequest) returns (ListVolumeBackupsResponse) {
  148. option (google.api.http) = {
  149. get: "/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups"
  150. };
  151. option (google.api.method_signature) = "parent";
  152. }
  153. // Retrieve the details of a single VolumeBackup.
  154. rpc GetVolumeBackup(GetVolumeBackupRequest) returns (VolumeBackup) {
  155. option (google.api.http) = {
  156. get: "/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}"
  157. };
  158. option (google.api.method_signature) = "name";
  159. }
  160. // Creates a new RestorePlan in a given location.
  161. rpc CreateRestorePlan(CreateRestorePlanRequest) returns (google.longrunning.Operation) {
  162. option (google.api.http) = {
  163. post: "/v1/{parent=projects/*/locations/*}/restorePlans"
  164. body: "restore_plan"
  165. };
  166. option (google.api.method_signature) = "parent,restore_plan,restore_plan_id";
  167. option (google.longrunning.operation_info) = {
  168. response_type: "RestorePlan"
  169. metadata_type: "OperationMetadata"
  170. };
  171. }
  172. // Lists RestorePlans in a given location.
  173. rpc ListRestorePlans(ListRestorePlansRequest) returns (ListRestorePlansResponse) {
  174. option (google.api.http) = {
  175. get: "/v1/{parent=projects/*/locations/*}/restorePlans"
  176. };
  177. option (google.api.method_signature) = "parent";
  178. }
  179. // Retrieve the details of a single RestorePlan.
  180. rpc GetRestorePlan(GetRestorePlanRequest) returns (RestorePlan) {
  181. option (google.api.http) = {
  182. get: "/v1/{name=projects/*/locations/*/restorePlans/*}"
  183. };
  184. option (google.api.method_signature) = "name";
  185. }
  186. // Update a RestorePlan.
  187. rpc UpdateRestorePlan(UpdateRestorePlanRequest) returns (google.longrunning.Operation) {
  188. option (google.api.http) = {
  189. patch: "/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}"
  190. body: "restore_plan"
  191. };
  192. option (google.api.method_signature) = "restore_plan,update_mask";
  193. option (google.longrunning.operation_info) = {
  194. response_type: "RestorePlan"
  195. metadata_type: "OperationMetadata"
  196. };
  197. }
  198. // Deletes an existing RestorePlan.
  199. rpc DeleteRestorePlan(DeleteRestorePlanRequest) returns (google.longrunning.Operation) {
  200. option (google.api.http) = {
  201. delete: "/v1/{name=projects/*/locations/*/restorePlans/*}"
  202. };
  203. option (google.api.method_signature) = "name";
  204. option (google.longrunning.operation_info) = {
  205. response_type: "google.protobuf.Empty"
  206. metadata_type: "OperationMetadata"
  207. };
  208. }
  209. // Creates a new Restore for the given RestorePlan.
  210. rpc CreateRestore(CreateRestoreRequest) returns (google.longrunning.Operation) {
  211. option (google.api.http) = {
  212. post: "/v1/{parent=projects/*/locations/*/restorePlans/*}/restores"
  213. body: "restore"
  214. };
  215. option (google.api.method_signature) = "parent,restore,restore_id";
  216. option (google.longrunning.operation_info) = {
  217. response_type: "Restore"
  218. metadata_type: "OperationMetadata"
  219. };
  220. }
  221. // Lists the Restores for a given RestorePlan.
  222. rpc ListRestores(ListRestoresRequest) returns (ListRestoresResponse) {
  223. option (google.api.http) = {
  224. get: "/v1/{parent=projects/*/locations/*/restorePlans/*}/restores"
  225. };
  226. option (google.api.method_signature) = "parent";
  227. }
  228. // Retrieves the details of a single Restore.
  229. rpc GetRestore(GetRestoreRequest) returns (Restore) {
  230. option (google.api.http) = {
  231. get: "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}"
  232. };
  233. option (google.api.method_signature) = "name";
  234. }
  235. // Update a Restore.
  236. rpc UpdateRestore(UpdateRestoreRequest) returns (google.longrunning.Operation) {
  237. option (google.api.http) = {
  238. patch: "/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}"
  239. body: "restore"
  240. };
  241. option (google.api.method_signature) = "restore,update_mask";
  242. option (google.longrunning.operation_info) = {
  243. response_type: "Restore"
  244. metadata_type: "OperationMetadata"
  245. };
  246. }
  247. // Deletes an existing Restore.
  248. rpc DeleteRestore(DeleteRestoreRequest) returns (google.longrunning.Operation) {
  249. option (google.api.http) = {
  250. delete: "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}"
  251. };
  252. option (google.api.method_signature) = "name";
  253. option (google.longrunning.operation_info) = {
  254. response_type: "google.protobuf.Empty"
  255. metadata_type: "OperationMetadata"
  256. };
  257. }
  258. // Lists the VolumeRestores for a given Restore.
  259. rpc ListVolumeRestores(ListVolumeRestoresRequest) returns (ListVolumeRestoresResponse) {
  260. option (google.api.http) = {
  261. get: "/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores"
  262. };
  263. option (google.api.method_signature) = "parent";
  264. }
  265. // Retrieve the details of a single VolumeRestore.
  266. rpc GetVolumeRestore(GetVolumeRestoreRequest) returns (VolumeRestore) {
  267. option (google.api.http) = {
  268. get: "/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}"
  269. };
  270. option (google.api.method_signature) = "name";
  271. }
  272. }
  273. // Represents the metadata of the long-running operation.
  274. message OperationMetadata {
  275. // Output only. The time the operation was created.
  276. google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  277. // Output only. The time the operation finished running.
  278. google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  279. // Output only. Server-defined resource path for the target of the operation.
  280. string target = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
  281. // Output only. Name of the verb executed by the operation.
  282. string verb = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  283. // Output only. Human-readable status of the operation, if any.
  284. string status_message = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  285. // Output only. Identifies whether the user has requested cancellation
  286. // of the operation. Operations that have successfully been cancelled
  287. // have [Operation.error][] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
  288. // corresponding to `Code.CANCELLED`.
  289. bool requested_cancellation = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
  290. // Output only. API version used to start the operation.
  291. string api_version = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  292. }
  293. // Request message for CreateBackupPlan.
  294. message CreateBackupPlanRequest {
  295. // Required. The location within which to create the BackupPlan.
  296. // Format: projects/*/locations/*
  297. string parent = 1 [
  298. (google.api.field_behavior) = REQUIRED,
  299. (google.api.resource_reference) = {
  300. type: "locations.googleapis.com/Location"
  301. }
  302. ];
  303. // Required. The BackupPlan resource object to create.
  304. BackupPlan backup_plan = 2 [(google.api.field_behavior) = REQUIRED];
  305. // Required. The client-provided short name for the BackupPlan resource.
  306. // This name must:
  307. //
  308. // - be between 1 and 63 characters long (inclusive)
  309. // - consist of only lower-case ASCII letters, numbers, and dashes
  310. // - start with a lower-case letter
  311. // - end with a lower-case letter or number
  312. // - be unique within the set of BackupPlans in this location
  313. string backup_plan_id = 3 [(google.api.field_behavior) = REQUIRED];
  314. }
  315. // Request message for ListBackupPlans.
  316. message ListBackupPlansRequest {
  317. // Required. The location that contains the BackupPlans to list.
  318. // Format: projects/*/locations/*
  319. string parent = 1 [
  320. (google.api.field_behavior) = REQUIRED,
  321. (google.api.resource_reference) = {
  322. type: "locations.googleapis.com/Location"
  323. }
  324. ];
  325. // The target number of results to return in a single response.
  326. // If not specified, a default value will be chosen by the service.
  327. // Note that the response may inclue a partial list and a caller should
  328. // only rely on the response's
  329. // [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token]
  330. // to determine if there are more instances left to be queried.
  331. int32 page_size = 2;
  332. // The value of
  333. // [next_page_token][google.cloud.gkebackup.v1.ListBackupPlansResponse.next_page_token]
  334. // received from a previous `ListBackupPlans` call.
  335. // Provide this to retrieve the subsequent page in a multi-page list of
  336. // results. When paginating, all other parameters provided to
  337. // `ListBackupPlans` must match the call that provided the page token.
  338. string page_token = 3;
  339. // Field match expression used to filter the results.
  340. string filter = 4;
  341. // Field by which to sort the results.
  342. string order_by = 5;
  343. }
  344. // Response message for ListBackupPlans.
  345. message ListBackupPlansResponse {
  346. // The list of BackupPlans matching the given criteria.
  347. repeated BackupPlan backup_plans = 1;
  348. // A token which may be sent as
  349. // [page_token][google.cloud.gkebackup.v1.ListBackupPlansRequest.page_token] in a subsequent
  350. // `ListBackupPlans` call to retrieve the next page of results.
  351. // If this field is omitted or empty, then there are no more results to
  352. // return.
  353. string next_page_token = 2;
  354. // Locations that could not be reached.
  355. repeated string unreachable = 3;
  356. }
  357. // Request message for GetBackupPlan.
  358. message GetBackupPlanRequest {
  359. // Required. Fully qualified BackupPlan name.
  360. // Format: projects/*/locations/*/backupPlans/*
  361. string name = 1 [
  362. (google.api.field_behavior) = REQUIRED,
  363. (google.api.resource_reference) = {
  364. type: "gkebackup.googleapis.com/BackupPlan"
  365. }
  366. ];
  367. }
  368. // Request message for UpdateBackupPlan.
  369. message UpdateBackupPlanRequest {
  370. // Required. A new version of the BackupPlan resource that contains updated fields.
  371. // This may be sparsely populated if an `update_mask` is provided.
  372. BackupPlan backup_plan = 1 [(google.api.field_behavior) = REQUIRED];
  373. // This is used to specify the fields to be overwritten in the
  374. // BackupPlan targeted for update. The values for each of these
  375. // updated fields will be taken from the `backup_plan` provided
  376. // with this request. Field names are relative to the root of the resource
  377. // (e.g., `description`, `backup_config.include_volume_data`, etc.)
  378. // If no `update_mask` is provided, all fields in `backup_plan` will be
  379. // written to the target BackupPlan resource.
  380. // Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored
  381. // and are not used to update the target BackupPlan.
  382. google.protobuf.FieldMask update_mask = 2;
  383. }
  384. // Request message for DeleteBackupPlan.
  385. message DeleteBackupPlanRequest {
  386. // Required. Fully qualified BackupPlan name.
  387. // Format: projects/*/locations/*/backupPlans/*
  388. string name = 1 [
  389. (google.api.field_behavior) = REQUIRED,
  390. (google.api.resource_reference) = {
  391. type: "gkebackup.googleapis.com/BackupPlan"
  392. }
  393. ];
  394. // If provided, this value must match the current value of the
  395. // target BackupPlan's [etag][google.cloud.gkebackup.v1.BackupPlan.etag] field or the request is
  396. // rejected.
  397. string etag = 2;
  398. }
  399. // Request message for CreateBackup.
  400. message CreateBackupRequest {
  401. // Required. The BackupPlan within which to create the Backup.
  402. // Format: projects/*/locations/*/backupPlans/*
  403. string parent = 1 [
  404. (google.api.field_behavior) = REQUIRED,
  405. (google.api.resource_reference) = {
  406. type: "gkebackup.googleapis.com/BackupPlan"
  407. }
  408. ];
  409. // The Backup resource to create.
  410. Backup backup = 2;
  411. // The client-provided short name for the Backup resource.
  412. // This name must:
  413. //
  414. // - be between 1 and 63 characters long (inclusive)
  415. // - consist of only lower-case ASCII letters, numbers, and dashes
  416. // - start with a lower-case letter
  417. // - end with a lower-case letter or number
  418. // - be unique within the set of Backups in this BackupPlan
  419. string backup_id = 3;
  420. }
  421. // Request message for ListBackups.
  422. message ListBackupsRequest {
  423. // Required. The BackupPlan that contains the Backups to list.
  424. // Format: projects/*/locations/*/backupPlans/*
  425. string parent = 1 [
  426. (google.api.field_behavior) = REQUIRED,
  427. (google.api.resource_reference) = {
  428. type: "gkebackup.googleapis.com/BackupPlan"
  429. }
  430. ];
  431. // The target number of results to return in a single response.
  432. // If not specified, a default value will be chosen by the service.
  433. // Note that the response may inclue a partial list and a caller should
  434. // only rely on the response's
  435. // [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token]
  436. // to determine if there are more instances left to be queried.
  437. int32 page_size = 2;
  438. // The value of
  439. // [next_page_token][google.cloud.gkebackup.v1.ListBackupsResponse.next_page_token]
  440. // received from a previous `ListBackups` call.
  441. // Provide this to retrieve the subsequent page in a multi-page list of
  442. // results. When paginating, all other parameters provided to
  443. // `ListBackups` must match the call that provided the page token.
  444. string page_token = 3;
  445. // Field match expression used to filter the results.
  446. string filter = 4;
  447. // Field by which to sort the results.
  448. string order_by = 5;
  449. }
  450. // Response message for ListBackups.
  451. message ListBackupsResponse {
  452. // The list of Backups matching the given criteria.
  453. repeated Backup backups = 1;
  454. // A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListBackupsRequest.page_token] in
  455. // a subsequent `ListBackups` call to retrieve the next page of results. If
  456. // this field is omitted or empty, then there are no more results to return.
  457. string next_page_token = 2;
  458. }
  459. // Request message for GetBackup.
  460. message GetBackupRequest {
  461. // Required. Full name of the Backup resource.
  462. // Format: projects/*/locations/*/backupPlans/*/backups/*
  463. string name = 1 [
  464. (google.api.field_behavior) = REQUIRED,
  465. (google.api.resource_reference) = {
  466. type: "gkebackup.googleapis.com/Backup"
  467. }
  468. ];
  469. }
  470. // Request message for UpdateBackup.
  471. message UpdateBackupRequest {
  472. // Required. A new version of the Backup resource that contains updated fields.
  473. // This may be sparsely populated if an `update_mask` is provided.
  474. Backup backup = 1 [(google.api.field_behavior) = REQUIRED];
  475. // This is used to specify the fields to be overwritten in the
  476. // Backup targeted for update. The values for each of these
  477. // updated fields will be taken from the `backup_plan` provided
  478. // with this request. Field names are relative to the root of the resource.
  479. // If no `update_mask` is provided, all fields in `backup` will be
  480. // written to the target Backup resource.
  481. // Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored
  482. // and are not used to update the target Backup.
  483. google.protobuf.FieldMask update_mask = 2;
  484. }
  485. // Request message for DeleteBackup.
  486. message DeleteBackupRequest {
  487. // Required. Name of the Backup resource.
  488. // Format: projects/*/locations/*/backupPlans/*/backups/*
  489. string name = 1 [
  490. (google.api.field_behavior) = REQUIRED,
  491. (google.api.resource_reference) = {
  492. type: "gkebackup.googleapis.com/Backup"
  493. }
  494. ];
  495. // If provided, this value must match the current value of the
  496. // target Backup's [etag][google.cloud.gkebackup.v1.Backup.etag] field or the request is
  497. // rejected.
  498. string etag = 2;
  499. // If set to true, any VolumeBackups below this Backup will also be deleted.
  500. // Otherwise, the request will only succeed if the Backup has no
  501. // VolumeBackups.
  502. bool force = 3;
  503. }
  504. // Request message for ListVolumeBackups.
  505. message ListVolumeBackupsRequest {
  506. // Required. The Backup that contains the VolumeBackups to list.
  507. // Format: projects/*/locations/*/backupPlans/*/backups/*
  508. string parent = 1 [
  509. (google.api.field_behavior) = REQUIRED,
  510. (google.api.resource_reference) = {
  511. type: "gkebackup.googleapis.com/Backup"
  512. }
  513. ];
  514. // The target number of results to return in a single response.
  515. // If not specified, a default value will be chosen by the service.
  516. // Note that the response may inclue a partial list and a caller should
  517. // only rely on the response's
  518. // [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token]
  519. // to determine if there are more instances left to be queried.
  520. int32 page_size = 2;
  521. // The value of
  522. // [next_page_token][google.cloud.gkebackup.v1.ListVolumeBackupsResponse.next_page_token]
  523. // received from a previous `ListVolumeBackups` call.
  524. // Provide this to retrieve the subsequent page in a multi-page list of
  525. // results. When paginating, all other parameters provided to
  526. // `ListVolumeBackups` must match the call that provided the page token.
  527. string page_token = 3;
  528. // Field match expression used to filter the results.
  529. string filter = 4;
  530. // Field by which to sort the results.
  531. string order_by = 5;
  532. }
  533. // Response message for ListVolumeBackups.
  534. message ListVolumeBackupsResponse {
  535. // The list of VolumeBackups matching the given criteria.
  536. repeated VolumeBackup volume_backups = 1;
  537. // A token which may be sent as
  538. // [page_token][google.cloud.gkebackup.v1.ListVolumeBackupsRequest.page_token] in a subsequent
  539. // `ListVolumeBackups` call to retrieve the next page of results.
  540. // If this field is omitted or empty, then there are no more results to
  541. // return.
  542. string next_page_token = 2;
  543. }
  544. // Request message for GetVolumeBackup.
  545. message GetVolumeBackupRequest {
  546. // Required. Full name of the VolumeBackup resource.
  547. // Format: projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*
  548. string name = 1 [
  549. (google.api.field_behavior) = REQUIRED,
  550. (google.api.resource_reference) = {
  551. type: "gkebackup.googleapis.com/VolumeBackup"
  552. }
  553. ];
  554. }
  555. // Request message for CreateRestorePlan.
  556. message CreateRestorePlanRequest {
  557. // Required. The location within which to create the RestorePlan.
  558. // Format: projects/*/locations/*
  559. string parent = 1 [
  560. (google.api.field_behavior) = REQUIRED,
  561. (google.api.resource_reference) = {
  562. type: "locations.googleapis.com/Location"
  563. }
  564. ];
  565. // Required. The RestorePlan resource object to create.
  566. RestorePlan restore_plan = 2 [(google.api.field_behavior) = REQUIRED];
  567. // Required. The client-provided short name for the RestorePlan resource.
  568. // This name must:
  569. //
  570. // - be between 1 and 63 characters long (inclusive)
  571. // - consist of only lower-case ASCII letters, numbers, and dashes
  572. // - start with a lower-case letter
  573. // - end with a lower-case letter or number
  574. // - be unique within the set of RestorePlans in this location
  575. string restore_plan_id = 3 [(google.api.field_behavior) = REQUIRED];
  576. }
  577. // Request message for ListRestorePlans.
  578. message ListRestorePlansRequest {
  579. // Required. The location that contains the RestorePlans to list.
  580. // Format: projects/*/locations/*
  581. string parent = 1 [
  582. (google.api.field_behavior) = REQUIRED,
  583. (google.api.resource_reference) = {
  584. type: "locations.googleapis.com/Location"
  585. }
  586. ];
  587. // The target number of results to return in a single response.
  588. // If not specified, a default value will be chosen by the service.
  589. // Note that the response may inclue a partial list and a caller should
  590. // only rely on the response's
  591. // [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token]
  592. // to determine if there are more instances left to be queried.
  593. int32 page_size = 2;
  594. // The value of
  595. // [next_page_token][google.cloud.gkebackup.v1.ListRestorePlansResponse.next_page_token]
  596. // received from a previous `ListRestorePlans` call.
  597. // Provide this to retrieve the subsequent page in a multi-page list of
  598. // results. When paginating, all other parameters provided to
  599. // `ListRestorePlans` must match the call that provided the page token.
  600. string page_token = 3;
  601. // Field match expression used to filter the results.
  602. string filter = 4;
  603. // Field by which to sort the results.
  604. string order_by = 5;
  605. }
  606. // Response message for ListRestorePlans.
  607. message ListRestorePlansResponse {
  608. // The list of RestorePlans matching the given criteria.
  609. repeated RestorePlan restore_plans = 1;
  610. // A token which may be sent as
  611. // [page_token][google.cloud.gkebackup.v1.ListRestorePlansRequest.page_token] in a subsequent
  612. // `ListRestorePlans` call to retrieve the next page of results.
  613. // If this field is omitted or empty, then there are no more results to
  614. // return.
  615. string next_page_token = 2;
  616. // Locations that could not be reached.
  617. repeated string unreachable = 3;
  618. }
  619. // Request message for GetRestorePlan.
  620. message GetRestorePlanRequest {
  621. // Required. Fully qualified RestorePlan name.
  622. // Format: projects/*/locations/*/restorePlans/*
  623. string name = 1 [
  624. (google.api.field_behavior) = REQUIRED,
  625. (google.api.resource_reference) = {
  626. type: "gkebackup.googleapis.com/RestorePlan"
  627. }
  628. ];
  629. }
  630. // Request message for UpdateRestorePlan.
  631. message UpdateRestorePlanRequest {
  632. // Required. A new version of the RestorePlan resource that contains updated fields.
  633. // This may be sparsely populated if an `update_mask` is provided.
  634. RestorePlan restore_plan = 1 [(google.api.field_behavior) = REQUIRED];
  635. // This is used to specify the fields to be overwritten in the
  636. // RestorePlan targeted for update. The values for each of these
  637. // updated fields will be taken from the `restore_plan` provided
  638. // with this request. Field names are relative to the root of the resource.
  639. // If no `update_mask` is provided, all fields in `restore_plan` will be
  640. // written to the target RestorePlan resource.
  641. // Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored
  642. // and are not used to update the target RestorePlan.
  643. google.protobuf.FieldMask update_mask = 2;
  644. }
  645. // Request message for DeleteRestorePlan.
  646. message DeleteRestorePlanRequest {
  647. // Required. Fully qualified RestorePlan name.
  648. // Format: projects/*/locations/*/restorePlans/*
  649. string name = 1 [
  650. (google.api.field_behavior) = REQUIRED,
  651. (google.api.resource_reference) = {
  652. type: "gkebackup.googleapis.com/RestorePlan"
  653. }
  654. ];
  655. // If provided, this value must match the current value of the
  656. // target RestorePlan's [etag][google.cloud.gkebackup.v1.RestorePlan.etag] field or the request is
  657. // rejected.
  658. string etag = 2;
  659. // If set to true, any Restores below this RestorePlan will also be deleted.
  660. // Otherwise, the request will only succeed if the RestorePlan has no
  661. // Restores.
  662. bool force = 3;
  663. }
  664. // Request message for CreateRestore.
  665. message CreateRestoreRequest {
  666. // Required. The RestorePlan within which to create the Restore.
  667. // Format: projects/*/locations/*/restorePlans/*
  668. string parent = 1 [
  669. (google.api.field_behavior) = REQUIRED,
  670. (google.api.resource_reference) = {
  671. type: "gkebackup.googleapis.com/RestorePlan"
  672. }
  673. ];
  674. // Required. The restore resource to create.
  675. Restore restore = 2 [(google.api.field_behavior) = REQUIRED];
  676. // Required. The client-provided short name for the Restore resource.
  677. // This name must:
  678. //
  679. // - be between 1 and 63 characters long (inclusive)
  680. // - consist of only lower-case ASCII letters, numbers, and dashes
  681. // - start with a lower-case letter
  682. // - end with a lower-case letter or number
  683. // - be unique within the set of Restores in this RestorePlan.
  684. string restore_id = 3 [(google.api.field_behavior) = REQUIRED];
  685. }
  686. // Request message for ListRestores.
  687. message ListRestoresRequest {
  688. // Required. The RestorePlan that contains the Restores to list.
  689. // Format: projects/*/locations/*/restorePlans/*
  690. string parent = 1 [
  691. (google.api.field_behavior) = REQUIRED,
  692. (google.api.resource_reference) = {
  693. type: "gkebackup.googleapis.com/RestorePlan"
  694. }
  695. ];
  696. // The target number of results to return in a single response.
  697. // If not specified, a default value will be chosen by the service.
  698. // Note that the response may inclue a partial list and a caller should
  699. // only rely on the response's
  700. // [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token]
  701. // to determine if there are more instances left to be queried.
  702. int32 page_size = 2;
  703. // The value of
  704. // [next_page_token][google.cloud.gkebackup.v1.ListRestoresResponse.next_page_token]
  705. // received from a previous `ListRestores` call.
  706. // Provide this to retrieve the subsequent page in a multi-page list of
  707. // results. When paginating, all other parameters provided to `ListRestores`
  708. // must match the call that provided the page token.
  709. string page_token = 3;
  710. // Field match expression used to filter the results.
  711. string filter = 4;
  712. // Field by which to sort the results.
  713. string order_by = 5;
  714. }
  715. // Response message for ListRestores.
  716. message ListRestoresResponse {
  717. // The list of Restores matching the given criteria.
  718. repeated Restore restores = 1;
  719. // A token which may be sent as [page_token][google.cloud.gkebackup.v1.ListRestoresRequest.page_token]
  720. // in a subsequent `ListRestores` call to retrieve the next page of results.
  721. // If this field is omitted or empty, then there are no more results to
  722. // return.
  723. string next_page_token = 2;
  724. // Locations that could not be reached.
  725. repeated string unreachable = 3;
  726. }
  727. // Request message for GetRestore.
  728. message GetRestoreRequest {
  729. // Required. Name of the restore resource.
  730. // Format: projects/*/locations/*/restorePlans/*/restores/*
  731. string name = 1 [
  732. (google.api.field_behavior) = REQUIRED,
  733. (google.api.resource_reference) = {
  734. type: "gkebackup.googleapis.com/Restore"
  735. }
  736. ];
  737. }
  738. // Request message for UpdateRestore.
  739. message UpdateRestoreRequest {
  740. // Required. A new version of the Restore resource that contains updated fields.
  741. // This may be sparsely populated if an `update_mask` is provided.
  742. Restore restore = 1 [(google.api.field_behavior) = REQUIRED];
  743. // This is used to specify the fields to be overwritten in the
  744. // Restore targeted for update. The values for each of these
  745. // updated fields will be taken from the `restore` provided
  746. // with this request. Field names are relative to the root of the resource.
  747. // If no `update_mask` is provided, all fields in `restore` will be
  748. // written to the target Restore resource.
  749. // Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored
  750. // and are not used to update the target Restore.
  751. google.protobuf.FieldMask update_mask = 2;
  752. }
  753. // Request message for DeleteRestore.
  754. message DeleteRestoreRequest {
  755. // Required. Full name of the Restore
  756. // Format: projects/*/locations/*/restorePlans/*/restores/*
  757. string name = 1 [
  758. (google.api.field_behavior) = REQUIRED,
  759. (google.api.resource_reference) = {
  760. type: "gkebackup.googleapis.com/Restore"
  761. }
  762. ];
  763. // If provided, this value must match the current value of the
  764. // target Restore's [etag][google.cloud.gkebackup.v1.Restore.etag] field or the request is
  765. // rejected.
  766. string etag = 2;
  767. // If set to true, any VolumeRestores below this restore will also be deleted.
  768. // Otherwise, the request will only succeed if the restore has no
  769. // VolumeRestores.
  770. bool force = 3;
  771. }
  772. // Request message for ListVolumeRestores.
  773. message ListVolumeRestoresRequest {
  774. // Required. The Restore that contains the VolumeRestores to list.
  775. // Format: projects/*/locations/*/restorePlans/*/restores/*
  776. string parent = 1 [
  777. (google.api.field_behavior) = REQUIRED,
  778. (google.api.resource_reference) = {
  779. type: "gkebackup.googleapis.com/Restore"
  780. }
  781. ];
  782. // The target number of results to return in a single response.
  783. // If not specified, a default value will be chosen by the service.
  784. // Note that the response may inclue a partial list and a caller should
  785. // only rely on the response's
  786. // [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token]
  787. // to determine if there are more instances left to be queried.
  788. int32 page_size = 2;
  789. // The value of
  790. // [next_page_token][google.cloud.gkebackup.v1.ListVolumeRestoresResponse.next_page_token]
  791. // received from a previous `ListVolumeRestores` call.
  792. // Provide this to retrieve the subsequent page in a multi-page list of
  793. // results. When paginating, all other parameters provided to
  794. // `ListVolumeRestores` must match the call that provided the page token.
  795. string page_token = 3;
  796. // Field match expression used to filter the results.
  797. string filter = 4;
  798. // Field by which to sort the results.
  799. string order_by = 5;
  800. }
  801. // Response message for ListVolumeRestores.
  802. message ListVolumeRestoresResponse {
  803. // The list of VolumeRestores matching the given criteria.
  804. repeated VolumeRestore volume_restores = 1;
  805. // A token which may be sent as
  806. // [page_token][google.cloud.gkebackup.v1.ListVolumeRestoresRequest.page_token] in a subsequent
  807. // `ListVolumeRestores` call to retrieve the next page of results.
  808. // If this field is omitted or empty, then there are no more results to
  809. // return.
  810. string next_page_token = 2;
  811. }
  812. // Request message for GetVolumeRestore.
  813. message GetVolumeRestoreRequest {
  814. // Required. Full name of the VolumeRestore resource.
  815. // Format: projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*
  816. string name = 1 [
  817. (google.api.field_behavior) = REQUIRED,
  818. (google.api.resource_reference) = {
  819. type: "gkebackup.googleapis.com/VolumeRestore"
  820. }
  821. ];
  822. }