osconfig_service.proto 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. // Copyright 2020 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.osconfig.v1;
  16. import "google/api/client.proto";
  17. import "google/api/resource.proto";
  18. import "google/cloud/osconfig/v1/patch_deployments.proto";
  19. import "google/cloud/osconfig/v1/patch_jobs.proto";
  20. import "google/protobuf/empty.proto";
  21. import "google/api/annotations.proto";
  22. option csharp_namespace = "Google.Cloud.OsConfig.V1";
  23. option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig";
  24. option java_outer_classname = "OsConfigProto";
  25. option java_package = "com.google.cloud.osconfig.v1";
  26. option php_namespace = "Google\\Cloud\\OsConfig\\V1";
  27. option ruby_package = "Google::Cloud::OsConfig::V1";
  28. option (google.api.resource_definition) = {
  29. type: "compute.googleapis.com/Instance"
  30. pattern: "projects/{project}/zones/{zone}/instances/{instance}"
  31. pattern: "projects/{project}/locations/{location}/instances/{instance}"
  32. };
  33. // OS Config API
  34. //
  35. // The OS Config service is a server-side component that you can use to
  36. // manage package installations and patch jobs for virtual machine instances.
  37. service OsConfigService {
  38. option (google.api.default_host) = "osconfig.googleapis.com";
  39. option (google.api.oauth_scopes) =
  40. "https://www.googleapis.com/auth/cloud-platform";
  41. // Patch VM instances by creating and running a patch job.
  42. rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) {
  43. option (google.api.http) = {
  44. post: "/v1/{parent=projects/*}/patchJobs:execute"
  45. body: "*"
  46. };
  47. }
  48. // Get the patch job. This can be used to track the progress of an
  49. // ongoing patch job or review the details of completed jobs.
  50. rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) {
  51. option (google.api.http) = {
  52. get: "/v1/{name=projects/*/patchJobs/*}"
  53. };
  54. option (google.api.method_signature) = "name";
  55. }
  56. // Cancel a patch job. The patch job must be active. Canceled patch jobs
  57. // cannot be restarted.
  58. rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) {
  59. option (google.api.http) = {
  60. post: "/v1/{name=projects/*/patchJobs/*}:cancel"
  61. body: "*"
  62. };
  63. }
  64. // Get a list of patch jobs.
  65. rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) {
  66. option (google.api.http) = {
  67. get: "/v1/{parent=projects/*}/patchJobs"
  68. };
  69. option (google.api.method_signature) = "parent";
  70. }
  71. // Get a list of instance details for a given patch job.
  72. rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest)
  73. returns (ListPatchJobInstanceDetailsResponse) {
  74. option (google.api.http) = {
  75. get: "/v1/{parent=projects/*/patchJobs/*}/instanceDetails"
  76. };
  77. option (google.api.method_signature) = "parent";
  78. }
  79. // Create an OS Config patch deployment.
  80. rpc CreatePatchDeployment(CreatePatchDeploymentRequest)
  81. returns (PatchDeployment) {
  82. option (google.api.http) = {
  83. post: "/v1/{parent=projects/*}/patchDeployments"
  84. body: "patch_deployment"
  85. };
  86. option (google.api.method_signature) =
  87. "parent,patch_deployment,patch_deployment_id";
  88. }
  89. // Get an OS Config patch deployment.
  90. rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) {
  91. option (google.api.http) = {
  92. get: "/v1/{name=projects/*/patchDeployments/*}"
  93. };
  94. option (google.api.method_signature) = "name";
  95. }
  96. // Get a page of OS Config patch deployments.
  97. rpc ListPatchDeployments(ListPatchDeploymentsRequest)
  98. returns (ListPatchDeploymentsResponse) {
  99. option (google.api.http) = {
  100. get: "/v1/{parent=projects/*}/patchDeployments"
  101. };
  102. option (google.api.method_signature) = "parent";
  103. }
  104. // Delete an OS Config patch deployment.
  105. rpc DeletePatchDeployment(DeletePatchDeploymentRequest)
  106. returns (google.protobuf.Empty) {
  107. option (google.api.http) = {
  108. delete: "/v1/{name=projects/*/patchDeployments/*}"
  109. };
  110. option (google.api.method_signature) = "name";
  111. }
  112. // Update an OS Config patch deployment.
  113. rpc UpdatePatchDeployment(UpdatePatchDeploymentRequest)
  114. returns (PatchDeployment) {
  115. option (google.api.http) = {
  116. patch: "/v1/{patch_deployment.name=projects/*/patchDeployments/*}"
  117. body: "patch_deployment"
  118. };
  119. option (google.api.method_signature) = "patch_deployment,update_mask";
  120. }
  121. // Change state of patch deployment to "PAUSED".
  122. // Patch deployment in paused state doesn't generate patch jobs.
  123. rpc PausePatchDeployment(PausePatchDeploymentRequest)
  124. returns (PatchDeployment) {
  125. option (google.api.http) = {
  126. post: "/v1/{name=projects/*/patchDeployments/*}:pause"
  127. body: "*"
  128. };
  129. option (google.api.method_signature) = "name";
  130. }
  131. // Change state of patch deployment back to "ACTIVE".
  132. // Patch deployment in active state continues to generate patch jobs.
  133. rpc ResumePatchDeployment(ResumePatchDeploymentRequest)
  134. returns (PatchDeployment) {
  135. option (google.api.http) = {
  136. post: "/v1/{name=projects/*/patchDeployments/*}:resume"
  137. body: "*"
  138. };
  139. option (google.api.method_signature) = "name";
  140. }
  141. }