osconfig_zonal_service.proto 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  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.osconfig.v1;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/cloud/osconfig/v1/inventory.proto";
  19. import "google/cloud/osconfig/v1/os_policy_assignment_reports.proto";
  20. import "google/cloud/osconfig/v1/os_policy_assignments.proto";
  21. import "google/cloud/osconfig/v1/vulnerability.proto";
  22. import "google/longrunning/operations.proto";
  23. option csharp_namespace = "Google.Cloud.OsConfig.V1";
  24. option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig";
  25. option java_multiple_files = true;
  26. option java_outer_classname = "OsConfigZonalServiceProto";
  27. option java_package = "com.google.cloud.osconfig.v1";
  28. option php_namespace = "Google\\Cloud\\OsConfig\\V1";
  29. option ruby_package = "Google::Cloud::OsConfig::V1";
  30. // Zonal OS Config API
  31. //
  32. // The OS Config service is the server-side component that allows users to
  33. // manage package installations and patch jobs for Compute Engine VM instances.
  34. service OsConfigZonalService {
  35. option (google.api.default_host) = "osconfig.googleapis.com";
  36. option (google.api.oauth_scopes) =
  37. "https://www.googleapis.com/auth/cloud-platform";
  38. // Create an OS policy assignment.
  39. //
  40. // This method also creates the first revision of the OS policy assignment.
  41. //
  42. // This method returns a long running operation (LRO) that contains the
  43. // rollout details. The rollout can be cancelled by cancelling the LRO.
  44. //
  45. // For more information, see [Method:
  46. // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
  47. rpc CreateOSPolicyAssignment(CreateOSPolicyAssignmentRequest)
  48. returns (google.longrunning.Operation) {
  49. option (google.api.http) = {
  50. post: "/v1/{parent=projects/*/locations/*}/osPolicyAssignments"
  51. body: "os_policy_assignment"
  52. };
  53. option (google.api.method_signature) =
  54. "parent,os_policy_assignment,os_policy_assignment_id";
  55. option (google.longrunning.operation_info) = {
  56. response_type: "OSPolicyAssignment"
  57. metadata_type: "OSPolicyAssignmentOperationMetadata"
  58. };
  59. }
  60. // Update an existing OS policy assignment.
  61. //
  62. // This method creates a new revision of the OS policy assignment.
  63. //
  64. // This method returns a long running operation (LRO) that contains the
  65. // rollout details. The rollout can be cancelled by cancelling the LRO.
  66. //
  67. // For more information, see [Method:
  68. // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
  69. rpc UpdateOSPolicyAssignment(UpdateOSPolicyAssignmentRequest)
  70. returns (google.longrunning.Operation) {
  71. option (google.api.http) = {
  72. patch: "/v1/{os_policy_assignment.name=projects/*/locations/*/osPolicyAssignments/*}"
  73. body: "os_policy_assignment"
  74. };
  75. option (google.api.method_signature) = "os_policy_assignment,update_mask";
  76. option (google.longrunning.operation_info) = {
  77. response_type: "OSPolicyAssignment"
  78. metadata_type: "OSPolicyAssignmentOperationMetadata"
  79. };
  80. }
  81. // Retrieve an existing OS policy assignment.
  82. //
  83. // This method always returns the latest revision. In order to retrieve a
  84. // previous revision of the assignment, also provide the revision ID in the
  85. // `name` parameter.
  86. rpc GetOSPolicyAssignment(GetOSPolicyAssignmentRequest)
  87. returns (OSPolicyAssignment) {
  88. option (google.api.http) = {
  89. get: "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}"
  90. };
  91. option (google.api.method_signature) = "name";
  92. }
  93. // List the OS policy assignments under the parent resource.
  94. //
  95. // For each OS policy assignment, the latest revision is returned.
  96. rpc ListOSPolicyAssignments(ListOSPolicyAssignmentsRequest)
  97. returns (ListOSPolicyAssignmentsResponse) {
  98. option (google.api.http) = {
  99. get: "/v1/{parent=projects/*/locations/*}/osPolicyAssignments"
  100. };
  101. option (google.api.method_signature) = "parent";
  102. }
  103. // List the OS policy assignment revisions for a given OS policy assignment.
  104. rpc ListOSPolicyAssignmentRevisions(ListOSPolicyAssignmentRevisionsRequest)
  105. returns (ListOSPolicyAssignmentRevisionsResponse) {
  106. option (google.api.http) = {
  107. get: "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}:listRevisions"
  108. };
  109. option (google.api.method_signature) = "name";
  110. }
  111. // Delete the OS policy assignment.
  112. //
  113. // This method creates a new revision of the OS policy assignment.
  114. //
  115. // This method returns a long running operation (LRO) that contains the
  116. // rollout details. The rollout can be cancelled by cancelling the LRO.
  117. //
  118. // If the LRO completes and is not cancelled, all revisions associated with
  119. // the OS policy assignment are deleted.
  120. //
  121. // For more information, see [Method:
  122. // projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
  123. rpc DeleteOSPolicyAssignment(DeleteOSPolicyAssignmentRequest)
  124. returns (google.longrunning.Operation) {
  125. option (google.api.http) = {
  126. delete: "/v1/{name=projects/*/locations/*/osPolicyAssignments/*}"
  127. };
  128. option (google.api.method_signature) = "name";
  129. option (google.longrunning.operation_info) = {
  130. response_type: "google.protobuf.Empty"
  131. metadata_type: "OSPolicyAssignmentOperationMetadata"
  132. };
  133. }
  134. // Get the OS policy asssignment report for the specified Compute Engine VM
  135. // instance.
  136. rpc GetOSPolicyAssignmentReport(GetOSPolicyAssignmentReportRequest)
  137. returns (OSPolicyAssignmentReport) {
  138. option (google.api.http) = {
  139. get: "/v1/{name=projects/*/locations/*/instances/*/osPolicyAssignments/*/report}"
  140. };
  141. option (google.api.method_signature) = "name";
  142. }
  143. // List OS policy asssignment reports for all Compute Engine VM instances in
  144. // the specified zone.
  145. rpc ListOSPolicyAssignmentReports(ListOSPolicyAssignmentReportsRequest)
  146. returns (ListOSPolicyAssignmentReportsResponse) {
  147. option (google.api.http) = {
  148. get: "/v1/{parent=projects/*/locations/*/instances/*/osPolicyAssignments/*}/reports"
  149. };
  150. option (google.api.method_signature) = "parent";
  151. }
  152. // Get inventory data for the specified VM instance. If the VM has no
  153. // associated inventory, the message `NOT_FOUND` is returned.
  154. rpc GetInventory(GetInventoryRequest) returns (Inventory) {
  155. option (google.api.http) = {
  156. get: "/v1/{name=projects/*/locations/*/instances/*/inventory}"
  157. };
  158. option (google.api.method_signature) = "name";
  159. }
  160. // List inventory data for all VM instances in the specified zone.
  161. rpc ListInventories(ListInventoriesRequest)
  162. returns (ListInventoriesResponse) {
  163. option (google.api.http) = {
  164. get: "/v1/{parent=projects/*/locations/*/instances/*}/inventories"
  165. };
  166. option (google.api.method_signature) = "parent";
  167. }
  168. // Gets the vulnerability report for the specified VM instance. Only VMs with
  169. // inventory data have vulnerability reports associated with them.
  170. rpc GetVulnerabilityReport(GetVulnerabilityReportRequest)
  171. returns (VulnerabilityReport) {
  172. option (google.api.http) = {
  173. get: "/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}"
  174. };
  175. option (google.api.method_signature) = "name";
  176. }
  177. // List vulnerability reports for all VM instances in the specified zone.
  178. rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest)
  179. returns (ListVulnerabilityReportsResponse) {
  180. option (google.api.http) = {
  181. get: "/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports"
  182. };
  183. option (google.api.method_signature) = "parent";
  184. }
  185. }