// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. syntax = "proto3"; package google.cloud.osconfig.v1beta; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/cloud/osconfig/v1beta/guest_policies.proto"; import "google/cloud/osconfig/v1beta/patch_deployments.proto"; import "google/cloud/osconfig/v1beta/patch_jobs.proto"; import "google/protobuf/empty.proto"; option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1beta;osconfig"; option java_outer_classname = "OsConfigProto"; option java_package = "com.google.cloud.osconfig.v1beta"; // OS Config API // // The OS Config service is a server-side component that you can use to // manage package installations and patch jobs for virtual machine instances. service OsConfigService { option (google.api.default_host) = "osconfig.googleapis.com"; option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Patch VM instances by creating and running a patch job. rpc ExecutePatchJob(ExecutePatchJobRequest) returns (PatchJob) { option (google.api.http) = { post: "/v1beta/{parent=projects/*}/patchJobs:execute" body: "*" }; } // Get the patch job. This can be used to track the progress of an // ongoing patch job or review the details of completed jobs. rpc GetPatchJob(GetPatchJobRequest) returns (PatchJob) { option (google.api.http) = { get: "/v1beta/{name=projects/*/patchJobs/*}" }; } // Cancel a patch job. The patch job must be active. Canceled patch jobs // cannot be restarted. rpc CancelPatchJob(CancelPatchJobRequest) returns (PatchJob) { option (google.api.http) = { post: "/v1beta/{name=projects/*/patchJobs/*}:cancel" body: "*" }; } // Get a list of patch jobs. rpc ListPatchJobs(ListPatchJobsRequest) returns (ListPatchJobsResponse) { option (google.api.http) = { get: "/v1beta/{parent=projects/*}/patchJobs" }; } // Get a list of instance details for a given patch job. rpc ListPatchJobInstanceDetails(ListPatchJobInstanceDetailsRequest) returns (ListPatchJobInstanceDetailsResponse) { option (google.api.http) = { get: "/v1beta/{parent=projects/*/patchJobs/*}/instanceDetails" }; option (google.api.method_signature) = "parent"; } // Create an OS Config patch deployment. rpc CreatePatchDeployment(CreatePatchDeploymentRequest) returns (PatchDeployment) { option (google.api.http) = { post: "/v1beta/{parent=projects/*}/patchDeployments" body: "patch_deployment" }; } // Get an OS Config patch deployment. rpc GetPatchDeployment(GetPatchDeploymentRequest) returns (PatchDeployment) { option (google.api.http) = { get: "/v1beta/{name=projects/*/patchDeployments/*}" }; } // Get a page of OS Config patch deployments. rpc ListPatchDeployments(ListPatchDeploymentsRequest) returns (ListPatchDeploymentsResponse) { option (google.api.http) = { get: "/v1beta/{parent=projects/*}/patchDeployments" }; } // Delete an OS Config patch deployment. rpc DeletePatchDeployment(DeletePatchDeploymentRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=projects/*/patchDeployments/*}" }; } // Create an OS Config guest policy. rpc CreateGuestPolicy(CreateGuestPolicyRequest) returns (GuestPolicy) { option (google.api.http) = { post: "/v1beta/{parent=projects/*}/guestPolicies" body: "guest_policy" }; option (google.api.method_signature) = "parent, guest_policy"; } // Get an OS Config guest policy. rpc GetGuestPolicy(GetGuestPolicyRequest) returns (GuestPolicy) { option (google.api.http) = { get: "/v1beta/{name=projects/*/guestPolicies/*}" }; option (google.api.method_signature) = "name"; } // Get a page of OS Config guest policies. rpc ListGuestPolicies(ListGuestPoliciesRequest) returns (ListGuestPoliciesResponse) { option (google.api.http) = { get: "/v1beta/{parent=projects/*}/guestPolicies" }; option (google.api.method_signature) = "parent"; } // Update an OS Config guest policy. rpc UpdateGuestPolicy(UpdateGuestPolicyRequest) returns (GuestPolicy) { option (google.api.http) = { patch: "/v1beta/{guest_policy.name=projects/*/guestPolicies/*}" body: "guest_policy" }; option (google.api.method_signature) = "guest_policy,update_mask"; } // Delete an OS Config guest policy. rpc DeleteGuestPolicy(DeleteGuestPolicyRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta/{name=projects/*/guestPolicies/*}" }; option (google.api.method_signature) = "name"; } // Lookup the effective guest policy that applies to a VM instance. This // lookup merges all policies that are assigned to the instance ancestry. rpc LookupEffectiveGuestPolicy(LookupEffectiveGuestPolicyRequest) returns (EffectiveGuestPolicy) { option (google.api.http) = { post: "/v1beta/{instance=projects/*/zones/*/instances/*}:lookupEffectiveGuestPolicy" body: "*" }; } }