osconfig_service.proto 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/api/resource.proto";
  19. import "google/cloud/osconfig/v1/patch_deployments.proto";
  20. import "google/cloud/osconfig/v1/patch_jobs.proto";
  21. import "google/protobuf/empty.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. };
  32. // OS Config API
  33. //
  34. // The OS Config service is a server-side component that you can use to
  35. // manage package installations and patch jobs for virtual machine instances.
  36. service OsConfigService {
  37. option (google.api.default_host) = "osconfig.googleapis.com";
  38. option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
  39. // Patch VM instances by creating and running a patch job.
  40. rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) {
  41. option (google.api.http) = {
  42. post: "/v1/{parent=projects/*}/patchJobs:execute"
  43. body: "*"
  44. };
  45. }
  46. // Get the patch job. This can be used to track the progress of an
  47. // ongoing patch job or review the details of completed jobs.
  48. rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) {
  49. option (google.api.http) = {
  50. get: "/v1/{name=projects/*/patchJobs/*}"
  51. };
  52. option (google.api.method_signature) = "name";
  53. }
  54. // Cancel a patch job. The patch job must be active. Canceled patch jobs
  55. // cannot be restarted.
  56. rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) {
  57. option (google.api.http) = {
  58. post: "/v1/{name=projects/*/patchJobs/*}:cancel"
  59. body: "*"
  60. };
  61. }
  62. // Get a list of patch jobs.
  63. rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) {
  64. option (google.api.http) = {
  65. get: "/v1/{parent=projects/*}/patchJobs"
  66. };
  67. option (google.api.method_signature) = "parent";
  68. }
  69. // Get a list of instance details for a given patch job.
  70. rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) {
  71. option (google.api.http) = {
  72. get: "/v1/{parent=projects/*/patchJobs/*}/instanceDetails"
  73. };
  74. option (google.api.method_signature) = "parent";
  75. }
  76. // Create an OS Config patch deployment.
  77. rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) {
  78. option (google.api.http) = {
  79. post: "/v1/{parent=projects/*}/patchDeployments"
  80. body: "patch_deployment"
  81. };
  82. option (google.api.method_signature) = "parent,patch_deployment,patch_deployment_id";
  83. }
  84. // Get an OS Config patch deployment.
  85. rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) {
  86. option (google.api.http) = {
  87. get: "/v1/{name=projects/*/patchDeployments/*}"
  88. };
  89. option (google.api.method_signature) = "name";
  90. }
  91. // Get a page of OS Config patch deployments.
  92. rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) {
  93. option (google.api.http) = {
  94. get: "/v1/{parent=projects/*}/patchDeployments"
  95. };
  96. option (google.api.method_signature) = "parent";
  97. }
  98. // Delete an OS Config patch deployment.
  99. rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) {
  100. option (google.api.http) = {
  101. delete: "/v1/{name=projects/*/patchDeployments/*}"
  102. };
  103. option (google.api.method_signature) = "name";
  104. }
  105. }