cloud_sql_operations.proto 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.sql.v1;
  16. import "google/api/annotations.proto";
  17. import "google/cloud/sql/v1/cloud_sql_resources.proto";
  18. import "google/api/client.proto";
  19. option go_package = "google.golang.org/genproto/googleapis/cloud/sql/v1;sql";
  20. option java_multiple_files = true;
  21. option java_outer_classname = "CloudSqlOperationsProto";
  22. option java_package = "com.google.cloud.sql.v1";
  23. // LINT: LEGACY_NAMES
  24. // Service to fetch operations for database instances.
  25. service SqlOperationsService {
  26. option (google.api.default_host) = "sqladmin.googleapis.com";
  27. option (google.api.oauth_scopes) =
  28. "https://www.googleapis.com/auth/cloud-platform,"
  29. "https://www.googleapis.com/auth/sqlservice.admin";
  30. // Retrieves an instance operation that has been performed on an instance.
  31. rpc Get(SqlOperationsGetRequest) returns (Operation) {
  32. option (google.api.http) = {
  33. get: "/v1/projects/{project}/operations/{operation}"
  34. };
  35. }
  36. // Lists all instance operations that have been performed on the given Cloud
  37. // SQL instance in the reverse chronological order of the start time.
  38. rpc List(SqlOperationsListRequest) returns (OperationsListResponse) {
  39. option (google.api.http) = {
  40. get: "/v1/projects/{project}/operations"
  41. };
  42. }
  43. }
  44. // Operations get request.
  45. message SqlOperationsGetRequest {
  46. // Instance operation ID.
  47. string operation = 1;
  48. // Project ID of the project that contains the instance.
  49. string project = 2;
  50. }
  51. // Operations list request.
  52. message SqlOperationsListRequest {
  53. // Cloud SQL instance ID. This does not include the project ID.
  54. string instance = 1;
  55. // Maximum number of operations per response.
  56. uint32 max_results = 2;
  57. // A previously-returned page token representing part of the larger set of
  58. // results to view.
  59. string page_token = 3;
  60. // Project ID of the project that contains the instance.
  61. string project = 4;
  62. }
  63. // Operations list response.
  64. message OperationsListResponse {
  65. // This is always **sql#operationsList**.
  66. string kind = 1;
  67. // List of operation resources.
  68. repeated Operation items = 2;
  69. // The continuation token, used to page through large result sets. Provide
  70. // this value in a subsequent request to return the next page of results.
  71. string next_page_token = 3;
  72. }