Content-Length: 842843 | pFad | https://github.com/googleapis/googleapis/commit/31d2d3432d9a0b910d7858eab7720b63445f23b2

E3 feat: add OSConfigZonalService API · googleapis/googleapis@31d2d34 · GitHub
Skip to content

Commit 31d2d34

Browse files
Google APIscopybara-github
Google APIs
authored andcommitted
feat: add OSConfigZonalService API
Committer: @jaiminsh PiperOrigin-RevId: 394704298
1 parent 9c7eb1f commit 31d2d34

File tree

7 files changed

+541
-22
lines changed

7 files changed

+541
-22
lines changed

google/cloud/osconfig/v1/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ proto_library(
2424
"inventory.proto",
2525
"osconfig_common.proto",
2626
"osconfig_service.proto",
27+
"osconfig_zonal_service.proto",
2728
"patch_deployments.proto",
2829
"patch_jobs.proto",
30+
"vulnerability.proto",
2931
],
3032
deps = [
3133
"//google/api:annotations_proto",

google/cloud/osconfig/v1/inventory.proto

Lines changed: 117 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2020 Google LLC
1+
// Copyright 2021 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -16,6 +16,8 @@ syntax = "proto3";
1616

1717
package google.cloud.osconfig.v1;
1818

19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
1921
import "google/protobuf/timestamp.proto";
2022
import "google/type/date.proto";
2123

@@ -30,8 +32,19 @@ option ruby_package = "Google::Cloud::OsConfig::V1";
3032
// OS Config Inventory is a service for collecting and reporting operating
3133
// system and package information on VM instances.
3234

33-
// The inventory details of a VM.
35+
// This API resource represents the available inventory data for a
36+
// Compute Engine virtual machine (VM) instance at a given point in time.
37+
//
38+
// You can use this API resource to determine the inventory data of your VM.
39+
//
40+
// For more information, see [Information provided by OS inventory
41+
// management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).
3442
message Inventory {
43+
option (google.api.resource) = {
44+
type: "osconfig.googleapis.com/Inventory"
45+
pattern: "projects/{project}/locations/{location}/instances/{instance}/inventory"
46+
};
47+
3548
// Operating system information for the VM.
3649
message OsInfo {
3750
// The VM hostname.
@@ -154,7 +167,7 @@ message Inventory {
154167
// Details of a COS package.
155168
VersionedPackage cos_package = 8;
156169

157-
// Details of a Windows Application
170+
// Details of Windows Application.
158171
WindowsApplication windows_application = 9;
159172
}
160173
}
@@ -172,6 +185,21 @@ message Inventory {
172185
string version = 3;
173186
}
174187

188+
// Details related to a Zypper Patch.
189+
message ZypperPatch {
190+
// The name of the patch.
191+
string patch_name = 5;
192+
193+
// The category of the patch.
194+
string category = 2;
195+
196+
// The severity specified for this patch
197+
string severity = 3;
198+
199+
// Any summary information provided about this patch.
200+
string summary = 4;
201+
}
202+
175203
// Details related to a Windows Update package.
176204
// Field data and names are taken from Windows Update API IUpdate Interface:
177205
// https://docs.microsoft.com/en-us/windows/win32/api/_wua/
@@ -218,21 +246,6 @@ message Inventory {
218246
google.protobuf.Timestamp last_deployment_change_time = 10;
219247
}
220248

221-
// Details related to a Zypper Patch.
222-
message ZypperPatch {
223-
// The name of the patch.
224-
string patch_name = 5;
225-
226-
// The category of the patch.
227-
string category = 2;
228-
229-
// The severity specified for this patch
230-
string severity = 3;
231-
232-
// Any summary information provided about this patch.
233-
string summary = 4;
234-
}
235-
236249
// Information related to a Quick Fix Engineering package.
237250
// Fields are taken from Windows QuickFixEngineering Interface and match
238251
// the source names:
@@ -276,6 +289,12 @@ message Inventory {
276289
string help_link = 5;
277290
}
278291

292+
// Output only. The `Inventory` API resource name.
293+
//
294+
// Format:
295+
// `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`
296+
string name = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
297+
279298
// Base level operating system information for the VM.
280299
OsInfo os_info = 1;
281300

@@ -284,4 +303,84 @@ message Inventory {
284303
// addressable inventory item and will change, when there is a new package
285304
// version.
286305
map<string, Item> items = 2;
306+
307+
// Output only. Timestamp of the last reported inventory for the VM.
308+
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
309+
}
310+
311+
// A request message for getting inventory data for the specified VM.
312+
message GetInventoryRequest {
313+
// Required. API resource name for inventory resource.
314+
//
315+
// Format:
316+
// `projects/{project}/locations/{location}/instances/{instance}/inventory`
317+
//
318+
// For `{project}`, either `project-number` or `project-id` can be provided.
319+
// For `{instance}`, either Compute Engine `instance-id` or `instance-name`
320+
// can be provided.
321+
string name = 1 [
322+
(google.api.field_behavior) = REQUIRED,
323+
(google.api.resource_reference) = {
324+
type: "osconfig.googleapis.com/Inventory"
325+
}
326+
];
327+
328+
// Inventory view indicating what information should be included in the
329+
// inventory resource. If unspecified, the default view is BASIC.
330+
InventoryView view = 2;
331+
}
332+
333+
// A request message for listing inventory data for all VMs in the specified
334+
// location.
335+
message ListInventoriesRequest {
336+
// Required. The parent resource name.
337+
//
338+
// Format: `projects/{project}/locations/{location}/instances/-`
339+
//
340+
// For `{project}`, either `project-number` or `project-id` can be provided.
341+
string parent = 1 [
342+
(google.api.field_behavior) = REQUIRED,
343+
(google.api.resource_reference) = {
344+
type: "compute.googleapis.com/Instance"
345+
}
346+
];
347+
348+
// Inventory view indicating what information should be included in the
349+
// inventory resource. If unspecified, the default view is BASIC.
350+
InventoryView view = 2;
351+
352+
// The maximum number of results to return.
353+
int32 page_size = 3;
354+
355+
// A pagination token returned from a previous call to
356+
// `ListInventories` that indicates where this listing
357+
// should continue from.
358+
string page_token = 4;
359+
360+
// If provided, this field specifies the criteria that must be met by a
361+
// `Inventory` API resource to be included in the response.
362+
string filter = 5;
363+
}
364+
365+
// A response message for listing inventory data for all VMs in a specified
366+
// location.
367+
message ListInventoriesResponse {
368+
// List of inventory objects.
369+
repeated Inventory inventories = 1;
370+
371+
// The pagination token to retrieve the next page of inventory objects.
372+
string next_page_token = 2;
373+
}
374+
375+
// The view for inventory objects.
376+
enum InventoryView {
377+
// The default value.
378+
// The API defaults to the BASIC view.
379+
INVENTORY_VIEW_UNSPECIFIED = 0;
380+
381+
// Returns the basic inventory information that includes `os_info`.
382+
BASIC = 1;
383+
384+
// Returns all fields.
385+
FULL = 2;
287386
}

google/cloud/osconfig/v1/osconfig_grpc_service_config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"methodConfig": [{
3-
"name": [{ "service": "google.cloud.osconfig.v1.OsConfigService" }],
3+
"name": [
4+
{ "service": "google.cloud.osconfig.v1.OsConfigService" },
5+
{ "service": "google.cloud.osconfig.v1.OsConfigZonalService" }
6+
],
47
"timeout": "60s",
58
"retryPolicy": {
69
"maxAttempts": 5,

google/cloud/osconfig/v1/osconfig_service.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ option ruby_package = "Google::Cloud::OsConfig::V1";
3232
option (google.api.resource_definition) = {
3333
type: "compute.googleapis.com/Instance"
3434
pattern: "projects/{project}/zones/{zone}/instances/{instance}"
35+
pattern: "projects/{project}/locations/{location}/instances/{instance}"
3536
};
3637

3738
// OS Config API

google/cloud/osconfig/v1/osconfig_v1.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ title: OS Config API
55

66
apis:
77
- name: google.cloud.osconfig.v1.OsConfigService
8-
9-
types:
10-
- name: google.cloud.osconfig.v1.Inventory
8+
- name: google.cloud.osconfig.v1.OsConfigZonalService
119

1210
documentation:
1311
summary: |-
@@ -18,10 +16,16 @@ backend:
1816
rules:
1917
- selector: 'google.cloud.osconfig.v1.OsConfigService.*'
2018
deadline: 30.0
19+
- selector: 'google.cloud.osconfig.v1.OsConfigZonalService.*'
20+
deadline: 30.0
2121

2222
authentication:
2323
rules:
2424
- selector: 'google.cloud.osconfig.v1.OsConfigService.*'
2525
oauth:
2626
canonical_scopes: |-
2727
https://www.googleapis.com/auth/cloud-platform
28+
- selector: 'google.cloud.osconfig.v1.OsConfigZonalService.*'
29+
oauth:
30+
canonical_scopes: |-
31+
https://www.googleapis.com/auth/cloud-platform
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
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+
15+
syntax = "proto3";
16+
17+
package google.cloud.osconfig.v1;
18+
19+
import "google/api/annotations.proto";
20+
import "google/api/client.proto";
21+
import "google/api/resource.proto";
22+
import "google/cloud/osconfig/v1/inventory.proto";
23+
import "google/cloud/osconfig/v1/vulnerability.proto";
24+
25+
option csharp_namespace = "Google.Cloud.OsConfig.V1";
26+
option go_package = "google.golang.org/genproto/googleapis/cloud/osconfig/v1;osconfig";
27+
option java_multiple_files = true;
28+
option java_outer_classname = "OsConfigZonalServiceProto";
29+
option java_package = "com.google.cloud.osconfig.v1";
30+
option php_namespace = "Google\\Cloud\\OsConfig\\V1";
31+
option ruby_package = "Google::Cloud::OsConfig::V1";
32+
33+
// Zonal OS Config API
34+
//
35+
// The OS Config service is the server-side component that allows users to
36+
// manage package installations and patch jobs for Compute Engine VM instances.
37+
service OsConfigZonalService {
38+
option (google.api.default_host) = "osconfig.googleapis.com";
39+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
40+
41+
// Get inventory data for the specified VM instance. If the VM has no
42+
// associated inventory, the message `NOT_FOUND` is returned.
43+
rpc GetInventory(GetInventoryRequest) returns (Inventory) {
44+
option (google.api.http) = {
45+
get: "/v1/{name=projects/*/locations/*/instances/*/inventory}"
46+
};
47+
option (google.api.method_signature) = "name";
48+
}
49+
50+
// List inventory data for all VM instances in the specified zone.
51+
rpc ListInventories(ListInventoriesRequest) returns (ListInventoriesResponse) {
52+
option (google.api.http) = {
53+
get: "/v1/{parent=projects/*/locations/*/instances/*}/inventories"
54+
};
55+
option (google.api.method_signature) = "parent";
56+
}
57+
58+
// Gets the vulnerability report for the specified VM instance. Only VMs with
59+
// inventory data have vulnerability reports associated with them.
60+
rpc GetVulnerabilityReport(GetVulnerabilityReportRequest) returns (VulnerabilityReport) {
61+
option (google.api.http) = {
62+
get: "/v1/{name=projects/*/locations/*/instances/*/vulnerabilityReport}"
63+
};
64+
option (google.api.method_signature) = "name";
65+
}
66+
67+
// List vulnerability reports for all VM instances in the specified zone.
68+
rpc ListVulnerabilityReports(ListVulnerabilityReportsRequest) returns (ListVulnerabilityReportsResponse) {
69+
option (google.api.http) = {
70+
get: "/v1/{parent=projects/*/locations/*/instances/*}/vulnerabilityReports"
71+
};
72+
option (google.api.method_signature) = "parent";
73+
}
74+
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/googleapis/commit/31d2d3432d9a0b910d7858eab7720b63445f23b2

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy