osconfig_service.proto 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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.v1beta;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/cloud/osconfig/v1beta/guest_policies.proto";
  19. import "google/cloud/osconfig/v1beta/patch_deployments.proto";
  20. import "google/cloud/osconfig/v1beta/patch_jobs.proto";
  21. import "google/protobuf/empty.proto";
  22. option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig";
  23. option java_outer_classname = "OsConfigProto";
  24. option java_package = "com.google.cloud.osconfig.v1beta";
  25. // OS Config API
  26. //
  27. // The OS Config service is a server-side component that you can use to
  28. // manage package installations and patch jobs for virtual machine instances.
  29. service OsConfigService {
  30. option (google.api.default_host) = "osconfig.googleapis.com";
  31. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  32. // Patch VM instances by creating and running a patch job.
  33. rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) {
  34. option (google.api.http) = {
  35. post: "/v1beta/{parent=projects/*}/patchJobs:execute"
  36. body: "*"
  37. };
  38. }
  39. // Get the patch job. This can be used to track the progress of an
  40. // ongoing patch job or review the details of completed jobs.
  41. rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) {
  42. option (google.api.http) = {
  43. get: "/v1beta/{name=projects/*/patchJobs/*}"
  44. };
  45. }
  46. // Cancel a patch job. The patch job must be active. Canceled patch jobs
  47. // cannot be restarted.
  48. rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) {
  49. option (google.api.http) = {
  50. post: "/v1beta/{name=projects/*/patchJobs/*}:cancel"
  51. body: "*"
  52. };
  53. }
  54. // Get a list of patch jobs.
  55. rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) {
  56. option (google.api.http) = {
  57. get: "/v1beta/{parent=projects/*}/patchJobs"
  58. };
  59. }
  60. // Get a list of instance details for a given patch job.
  61. rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) {
  62. option (google.api.http) = {
  63. get: "/v1beta/{parent=projects/*/patchJobs/*}/instanceDetails"
  64. };
  65. option (google.api.method_signature) = "parent";
  66. }
  67. // Create an OS Config patch deployment.
  68. rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) {
  69. option (google.api.http) = {
  70. post: "/v1beta/{parent=projects/*}/patchDeployments"
  71. body: "patch_deployment"
  72. };
  73. }
  74. // Get an OS Config patch deployment.
  75. rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) {
  76. option (google.api.http) = {
  77. get: "/v1beta/{name=projects/*/patchDeployments/*}"
  78. };
  79. }
  80. // Get a page of OS Config patch deployments.
  81. rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) {
  82. option (google.api.http) = {
  83. get: "/v1beta/{parent=projects/*}/patchDeployments"
  84. };
  85. }
  86. // Delete an OS Config patch deployment.
  87. rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) {
  88. option (google.api.http) = {
  89. delete: "/v1beta/{name=projects/*/patchDeployments/*}"
  90. };
  91. }
  92. // Create an OS Config guest policy.
  93. rpc CreateGuestPolicy(CreateGuestPolicyRequest) returns (GuestPolicy) {
  94. option (google.api.http) = {
  95. post: "/v1beta/{parent=projects/*}/guestPolicies"
  96. body: "guest_policy"
  97. };
  98. option (google.api.method_signature) = "parent, guest_policy";
  99. }
  100. // Get an OS Config guest policy.
  101. rpc GetGuestPolicy(GetGuestPolicyRequest) returns (GuestPolicy) {
  102. option (google.api.http) = {
  103. get: "/v1beta/{name=projects/*/guestPolicies/*}"
  104. };
  105. option (google.api.method_signature) = "name";
  106. }
  107. // Get a page of OS Config guest policies.
  108. rpc ListGuestPolicies(ListGuestPoliciesRequest) returns (ListGuestPoliciesResponse) {
  109. option (google.api.http) = {
  110. get: "/v1beta/{parent=projects/*}/guestPolicies"
  111. };
  112. option (google.api.method_signature) = "parent";
  113. }
  114. // Update an OS Config guest policy.
  115. rpc UpdateGuestPolicy(UpdateGuestPolicyRequest) returns (GuestPolicy) {
  116. option (google.api.http) = {
  117. patch: "/v1beta/{guest_policy.name=projects/*/guestPolicies/*}"
  118. body: "guest_policy"
  119. };
  120. option (google.api.method_signature) = "guest_policy,update_mask";
  121. }
  122. // Delete an OS Config guest policy.
  123. rpc DeleteGuestPolicy(DeleteGuestPolicyRequest) returns (google.protobuf.Empty) {
  124. option (google.api.http) = {
  125. delete: "/v1beta/{name=projects/*/guestPolicies/*}"
  126. };
  127. option (google.api.method_signature) = "name";
  128. }
  129. // Lookup the effective guest policy that applies to a VM instance. This
  130. // lookup merges all policies that are assigned to the instance ancestry.
  131. rpc LookupEffectiveGuestPolicy(LookupEffectiveGuestPolicyRequest) returns (EffectiveGuestPolicy) {
  132. option (google.api.http) = {
  133. post: "/v1beta/{instance=projects/*/zones/*/instances/*}:lookupEffectiveGuestPolicy"
  134. body: "*"
  135. };
  136. }
  137. }