google-apis-osconfig_v1alpha 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-osconfig_v1alpha.rb +15 -0
- data/lib/google/apis/osconfig_v1alpha.rb +37 -0
- data/lib/google/apis/osconfig_v1alpha/classes.rb +2300 -0
- data/lib/google/apis/osconfig_v1alpha/gem_version.rb +28 -0
- data/lib/google/apis/osconfig_v1alpha/representations.rb +980 -0
- data/lib/google/apis/osconfig_v1alpha/service.rb +615 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ad101cfaca0bc6a526d89ab5b2f6d0aff50598b028c3f5038edfa8ebacdd5c99
|
4
|
+
data.tar.gz: 33104b718f4f1cb84a592701dfeec6b6c6d60c36a1b231f9336df67b13bdb6aa
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0c6b983c0c46db101e0b572d3f792c6c9999f07ab69357fd75785b798c0bd403d247ea28be3b8bac33170a638813963ece783f796c1335b8e1b8e6e88f599104
|
7
|
+
data.tar.gz: a16a1e4b5db2732ea4089e4168c232f623f495aa405bf23083d3dc831ec61270e34e02069c19ea3511b105730c4b0eee2eeb0cd81192e83809a66e123bdbc20c
|
data/.yardopts
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
--hide-void-return
|
2
|
+
--no-private
|
3
|
+
--verbose
|
4
|
+
--title=google-apis-osconfig_v1alpha
|
5
|
+
--markup-provider=redcarpet
|
6
|
+
--markup=markdown
|
7
|
+
--main OVERVIEW.md
|
8
|
+
lib/google/apis/osconfig_v1alpha/*.rb
|
9
|
+
lib/google/apis/osconfig_v1alpha.rb
|
10
|
+
-
|
11
|
+
OVERVIEW.md
|
12
|
+
CHANGELOG.md
|
13
|
+
LICENSE.md
|
data/CHANGELOG.md
ADDED
data/LICENSE.md
ADDED
@@ -0,0 +1,202 @@
|
|
1
|
+
|
2
|
+
Apache License
|
3
|
+
Version 2.0, January 2004
|
4
|
+
http://www.apache.org/licenses/
|
5
|
+
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
7
|
+
|
8
|
+
1. Definitions.
|
9
|
+
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
12
|
+
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
14
|
+
the copyright owner that is granting the License.
|
15
|
+
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
17
|
+
other entities that control, are controlled by, or are under common
|
18
|
+
control with that entity. For the purposes of this definition,
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
20
|
+
direction or management of such entity, whether by contract or
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
23
|
+
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
25
|
+
exercising permissions granted by this License.
|
26
|
+
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
28
|
+
including but not limited to software source code, documentation
|
29
|
+
source, and configuration files.
|
30
|
+
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
32
|
+
transformation or translation of a Source form, including but
|
33
|
+
not limited to compiled object code, generated documentation,
|
34
|
+
and conversions to other media types.
|
35
|
+
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
37
|
+
Object form, made available under the License, as indicated by a
|
38
|
+
copyright notice that is included in or attached to the work
|
39
|
+
(an example is provided in the Appendix below).
|
40
|
+
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
47
|
+
the Work and Derivative Works thereof.
|
48
|
+
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
50
|
+
the original version of the Work and any modifications or additions
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
62
|
+
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
65
|
+
subsequently incorporated within the Work.
|
66
|
+
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
73
|
+
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
79
|
+
where such license applies only to those patent claims licensable
|
80
|
+
by such Contributor that are necessarily infringed by their
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
83
|
+
institute patent litigation against any entity (including a
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
86
|
+
or contributory patent infringement, then any patent licenses
|
87
|
+
granted to You under this License for that Work shall terminate
|
88
|
+
as of the date such litigation is filed.
|
89
|
+
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
92
|
+
modifications, and in Source or Object form, provided that You
|
93
|
+
meet the following conditions:
|
94
|
+
|
95
|
+
(a) You must give any other recipients of the Work or
|
96
|
+
Derivative Works a copy of this License; and
|
97
|
+
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
99
|
+
stating that You changed the files; and
|
100
|
+
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
103
|
+
attribution notices from the Source form of the Work,
|
104
|
+
excluding those notices that do not pertain to any part of
|
105
|
+
the Derivative Works; and
|
106
|
+
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
109
|
+
include a readable copy of the attribution notices contained
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
112
|
+
of the following places: within a NOTICE text file distributed
|
113
|
+
as part of the Derivative Works; within the Source form or
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
115
|
+
within a display generated by the Derivative Works, if and
|
116
|
+
wherever such third-party notices normally appear. The contents
|
117
|
+
of the NOTICE file are for informational purposes only and
|
118
|
+
do not modify the License. You may add Your own attribution
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
121
|
+
that such additional attribution notices cannot be construed
|
122
|
+
as modifying the License.
|
123
|
+
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
125
|
+
may provide additional or different license terms and conditions
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
129
|
+
the conditions stated in this License.
|
130
|
+
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
134
|
+
this License, without any additional terms or conditions.
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
136
|
+
the terms of any separate license agreement you may have executed
|
137
|
+
with Licensor regarding such Contributions.
|
138
|
+
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
141
|
+
except as required for reasonable and customary use in describing the
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
143
|
+
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
153
|
+
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
159
|
+
incidental, or consequential damages of any character arising as a
|
160
|
+
result of this License or out of the use or inability to use the
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
163
|
+
other commercial damages or losses), even if such Contributor
|
164
|
+
has been advised of the possibility of such damages.
|
165
|
+
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
169
|
+
or other liability obligations and/or rights consistent with this
|
170
|
+
License. However, in accepting such obligations, You may act only
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
175
|
+
of your accepting any such warranty or additional liability.
|
176
|
+
|
177
|
+
END OF TERMS AND CONDITIONS
|
178
|
+
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
180
|
+
|
181
|
+
To apply the Apache License to your work, attach the following
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
183
|
+
replaced with your own identifying information. (Don't include
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
185
|
+
comment syntax for the file format. We also recommend that a
|
186
|
+
file or class name and description of purpose be included on the
|
187
|
+
same "printed page" as the copyright notice for easier
|
188
|
+
identification within third-party archives.
|
189
|
+
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
191
|
+
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
193
|
+
you may not use this file except in compliance with the License.
|
194
|
+
You may obtain a copy of the License at
|
195
|
+
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
197
|
+
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
201
|
+
See the License for the specific language governing permissions and
|
202
|
+
limitations under the License.
|
data/OVERVIEW.md
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
# Simple REST client for version V1alpha of the OS Config API
|
2
|
+
|
3
|
+
This is a simple client library for version V1alpha of the OS Config API. It provides:
|
4
|
+
|
5
|
+
* A client object that connects to the HTTP/JSON REST endpoint for the service.
|
6
|
+
* Ruby objects for data structures related to the service.
|
7
|
+
* Integration with the googleauth gem for authentication using OAuth, API keys, and service accounts.
|
8
|
+
* Control of retry, pagination, and timeouts.
|
9
|
+
|
10
|
+
Note that although this client library is supported and will continue to be updated to track changes to the service, it is otherwise considered complete and not under active development. Many Google services, especially Google Cloud Platform services, may provide a more modern client that is under more active development and improvement. See the section below titled *Which client should I use?* for more information.
|
11
|
+
|
12
|
+
## Getting started
|
13
|
+
|
14
|
+
### Before you begin
|
15
|
+
|
16
|
+
There are a few setup steps you need to complete before you can use this library:
|
17
|
+
|
18
|
+
1. If you don't already have a Google account, [sign up](https://www.google.com/accounts).
|
19
|
+
2. If you have never created a Google APIs Console project, read about [Managing Projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects) and create a project in the [Google API Console](https://console.cloud.google.com/).
|
20
|
+
3. Most APIs need to be enabled for your project. [Enable it](https://console.cloud.google.com/apis/library/osconfig.googleapis.com) in the console.
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
Add this line to your application's Gemfile:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'google-apis-osconfig_v1alpha', '~> 0.1'
|
28
|
+
```
|
29
|
+
|
30
|
+
And then execute:
|
31
|
+
|
32
|
+
```
|
33
|
+
$ bundle
|
34
|
+
```
|
35
|
+
|
36
|
+
Or install it yourself as:
|
37
|
+
|
38
|
+
```
|
39
|
+
$ gem install google-apis-osconfig_v1alpha
|
40
|
+
```
|
41
|
+
|
42
|
+
### Creating a client object
|
43
|
+
|
44
|
+
Once the gem is installed, you can load the client code and instantiate a client.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
# Load the client
|
48
|
+
require "google/apis/osconfig_v1alpha"
|
49
|
+
|
50
|
+
# Create a client object
|
51
|
+
client = Google::Apis::OsconfigV1alpha::OSConfigService.new
|
52
|
+
|
53
|
+
# Authenticate calls
|
54
|
+
client.authentication = # ... use the googleauth gem to create credentials
|
55
|
+
```
|
56
|
+
|
57
|
+
See the class reference docs for information on the methods you can call from a client.
|
58
|
+
|
59
|
+
## Documentation
|
60
|
+
|
61
|
+
More detailed descriptions of the Google simple REST clients are available in two documents.
|
62
|
+
|
63
|
+
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
64
|
+
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
65
|
+
|
66
|
+
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Osconfig service in particular.)
|
67
|
+
|
68
|
+
For reference information on specific calls in the OS Config API, see the {Google::Apis::OsconfigV1alpha::OSConfigService class reference docs}.
|
69
|
+
|
70
|
+
## Which client should I use?
|
71
|
+
|
72
|
+
Google provides two types of Ruby API client libraries: **simple REST clients** and **modern clients**.
|
73
|
+
|
74
|
+
This library, `google-apis-osconfig_v1alpha`, is a simple REST client. You can identify these clients by their gem names, which are always in the form `google-apis-<servicename>_<serviceversion>`. The simple REST clients connect to HTTP/JSON REST endpoints and are automatically generated from service discovery documents. They support most API functionality, but their class interfaces are sometimes awkward.
|
75
|
+
|
76
|
+
Modern clients are produced by a modern code generator, sometimes combined with hand-crafted functionality. Most modern clients connect to high-performance gRPC endpoints, although a few are backed by REST services. Modern clients are available for many Google services, especially Google Cloud Platform services, but do not yet support all the services covered by the simple clients.
|
77
|
+
|
78
|
+
Gem names for modern clients are often of the form `google-cloud-<service_name>`. (For example, [google-cloud-pubsub](https://rubygems.org/gems/google-cloud-pubsub).) Note that most modern clients also have corresponding "versioned" gems with names like `google-cloud-<service_name>-<version>`. (For example, [google-cloud-pubsub-v1](https://rubygems.org/gems/google-cloud-pubsub-v1).) The "versioned" gems can be used directly, but often provide lower-level interfaces. In most cases, the main gem is recommended.
|
79
|
+
|
80
|
+
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
81
|
+
|
82
|
+
The [product documentation](https://cloud.google.com/compute/docs/osconfig/rest) may provide guidance regarding the preferred client library to use.
|
83
|
+
|
84
|
+
## Supported Ruby versions
|
85
|
+
|
86
|
+
This library is supported on Ruby 2.5+.
|
87
|
+
|
88
|
+
Google provides official support for Ruby versions that are actively supported by Ruby Core -- that is, Ruby versions that are either in normal maintenance or in security maintenance, and not end of life. Currently, this means Ruby 2.5 and later. Older versions of Ruby _may_ still work, but are unsupported and not recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby support schedule.
|
89
|
+
|
90
|
+
## License
|
91
|
+
|
92
|
+
This library is licensed under Apache 2.0. Full license text is available in the {file:LICENSE.md LICENSE}.
|
93
|
+
|
94
|
+
## Support
|
95
|
+
|
96
|
+
Please [report bugs at the project on Github](https://github.com/google/google-api-ruby-client/issues). Don't hesitate to [ask questions](http://stackoverflow.com/questions/tagged/google-api-ruby-client) about the client or APIs on [StackOverflow](http://stackoverflow.com).
|
@@ -0,0 +1,15 @@
|
|
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
|
+
|
15
|
+
require "google/apis/osconfig_v1alpha"
|
@@ -0,0 +1,37 @@
|
|
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
|
+
|
15
|
+
require 'google/apis/osconfig_v1alpha/service.rb'
|
16
|
+
require 'google/apis/osconfig_v1alpha/classes.rb'
|
17
|
+
require 'google/apis/osconfig_v1alpha/representations.rb'
|
18
|
+
require 'google/apis/osconfig_v1alpha/gem_version.rb'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
# OS Config API
|
23
|
+
#
|
24
|
+
# OS management tools that can be used for patch management, patch compliance,
|
25
|
+
# and configuration management on VM instances.
|
26
|
+
#
|
27
|
+
# @see https://cloud.google.com/compute/docs/osconfig/rest
|
28
|
+
module OsconfigV1alpha
|
29
|
+
# Version of the OS Config API this client connects to.
|
30
|
+
# This is NOT the gem version.
|
31
|
+
VERSION = 'V1alpha'
|
32
|
+
|
33
|
+
# See, edit, configure, and delete your Google Cloud Platform data
|
34
|
+
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,2300 @@
|
|
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
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module OsconfigV1alpha
|
24
|
+
|
25
|
+
# Common Vulnerability Scoring System version 3. For details, see https://www.
|
26
|
+
# first.org/cvss/specification-document
|
27
|
+
class CvsSv3
|
28
|
+
include Google::Apis::Core::Hashable
|
29
|
+
|
30
|
+
# This metric describes the conditions beyond the attacker's control that must
|
31
|
+
# exist in order to exploit the vulnerability.
|
32
|
+
# Corresponds to the JSON property `attackComplexity`
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :attack_complexity
|
35
|
+
|
36
|
+
# This metric reflects the context by which vulnerability exploitation is
|
37
|
+
# possible.
|
38
|
+
# Corresponds to the JSON property `attackVector`
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :attack_vector
|
41
|
+
|
42
|
+
# This metric measures the impact to the availability of the impacted component
|
43
|
+
# resulting from a successfully exploited vulnerability.
|
44
|
+
# Corresponds to the JSON property `availabilityImpact`
|
45
|
+
# @return [String]
|
46
|
+
attr_accessor :availability_impact
|
47
|
+
|
48
|
+
# The base score is a function of the base metric scores. https://www.first.org/
|
49
|
+
# cvss/specification-document#Base-Metrics
|
50
|
+
# Corresponds to the JSON property `baseScore`
|
51
|
+
# @return [Float]
|
52
|
+
attr_accessor :base_score
|
53
|
+
|
54
|
+
# This metric measures the impact to the confidentiality of the information
|
55
|
+
# resources managed by a software component due to a successfully exploited
|
56
|
+
# vulnerability.
|
57
|
+
# Corresponds to the JSON property `confidentialityImpact`
|
58
|
+
# @return [String]
|
59
|
+
attr_accessor :confidentiality_impact
|
60
|
+
|
61
|
+
# The Exploitability sub-score equation is derived from the Base Exploitability
|
62
|
+
# metrics. https://www.first.org/cvss/specification-document#2-1-Exploitability-
|
63
|
+
# Metrics
|
64
|
+
# Corresponds to the JSON property `exploitabilityScore`
|
65
|
+
# @return [Float]
|
66
|
+
attr_accessor :exploitability_score
|
67
|
+
|
68
|
+
# The Impact sub-score equation is derived from the Base Impact metrics.
|
69
|
+
# Corresponds to the JSON property `impactScore`
|
70
|
+
# @return [Float]
|
71
|
+
attr_accessor :impact_score
|
72
|
+
|
73
|
+
# This metric measures the impact to integrity of a successfully exploited
|
74
|
+
# vulnerability.
|
75
|
+
# Corresponds to the JSON property `integrityImpact`
|
76
|
+
# @return [String]
|
77
|
+
attr_accessor :integrity_impact
|
78
|
+
|
79
|
+
# This metric describes the level of privileges an attacker must possess before
|
80
|
+
# successfully exploiting the vulnerability.
|
81
|
+
# Corresponds to the JSON property `privilegesRequired`
|
82
|
+
# @return [String]
|
83
|
+
attr_accessor :privileges_required
|
84
|
+
|
85
|
+
# The Scope metric captures whether a vulnerability in one vulnerable component
|
86
|
+
# impacts resources in components beyond its security scope.
|
87
|
+
# Corresponds to the JSON property `scope`
|
88
|
+
# @return [String]
|
89
|
+
attr_accessor :scope
|
90
|
+
|
91
|
+
# This metric captures the requirement for a human user, other than the attacker,
|
92
|
+
# to participate in the successful compromise of the vulnerable component.
|
93
|
+
# Corresponds to the JSON property `userInteraction`
|
94
|
+
# @return [String]
|
95
|
+
attr_accessor :user_interaction
|
96
|
+
|
97
|
+
def initialize(**args)
|
98
|
+
update!(**args)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Update properties of this object
|
102
|
+
def update!(**args)
|
103
|
+
@attack_complexity = args[:attack_complexity] if args.key?(:attack_complexity)
|
104
|
+
@attack_vector = args[:attack_vector] if args.key?(:attack_vector)
|
105
|
+
@availability_impact = args[:availability_impact] if args.key?(:availability_impact)
|
106
|
+
@base_score = args[:base_score] if args.key?(:base_score)
|
107
|
+
@confidentiality_impact = args[:confidentiality_impact] if args.key?(:confidentiality_impact)
|
108
|
+
@exploitability_score = args[:exploitability_score] if args.key?(:exploitability_score)
|
109
|
+
@impact_score = args[:impact_score] if args.key?(:impact_score)
|
110
|
+
@integrity_impact = args[:integrity_impact] if args.key?(:integrity_impact)
|
111
|
+
@privileges_required = args[:privileges_required] if args.key?(:privileges_required)
|
112
|
+
@scope = args[:scope] if args.key?(:scope)
|
113
|
+
@user_interaction = args[:user_interaction] if args.key?(:user_interaction)
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
# The request message for Operations.CancelOperation.
|
118
|
+
class CancelOperationRequest
|
119
|
+
include Google::Apis::Core::Hashable
|
120
|
+
|
121
|
+
def initialize(**args)
|
122
|
+
update!(**args)
|
123
|
+
end
|
124
|
+
|
125
|
+
# Update properties of this object
|
126
|
+
def update!(**args)
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# A generic empty message that you can re-use to avoid defining duplicated empty
|
131
|
+
# messages in your APIs. A typical example is to use it as the request or the
|
132
|
+
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
133
|
+
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
134
|
+
# `Empty` is empty JSON object ````.
|
135
|
+
class Empty
|
136
|
+
include Google::Apis::Core::Hashable
|
137
|
+
|
138
|
+
def initialize(**args)
|
139
|
+
update!(**args)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Update properties of this object
|
143
|
+
def update!(**args)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Message encapsulating a value that can be either absolute ("fixed") or
|
148
|
+
# relative ("percent") to a value.
|
149
|
+
class FixedOrPercent
|
150
|
+
include Google::Apis::Core::Hashable
|
151
|
+
|
152
|
+
# Specifies a fixed value.
|
153
|
+
# Corresponds to the JSON property `fixed`
|
154
|
+
# @return [Fixnum]
|
155
|
+
attr_accessor :fixed
|
156
|
+
|
157
|
+
# Specifies the relative value defined as a percentage, which will be multiplied
|
158
|
+
# by a reference value.
|
159
|
+
# Corresponds to the JSON property `percent`
|
160
|
+
# @return [Fixnum]
|
161
|
+
attr_accessor :percent
|
162
|
+
|
163
|
+
def initialize(**args)
|
164
|
+
update!(**args)
|
165
|
+
end
|
166
|
+
|
167
|
+
# Update properties of this object
|
168
|
+
def update!(**args)
|
169
|
+
@fixed = args[:fixed] if args.key?(:fixed)
|
170
|
+
@percent = args[:percent] if args.key?(:percent)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# This API resource represents the OS policies compliance data for a Compute
|
175
|
+
# Engine virtual machine (VM) instance at a given point in time. A Compute
|
176
|
+
# Engine VM can have multiple OS policy assignments, and each assignment can
|
177
|
+
# have multiple OS policies. As a result, multiple OS policies could be applied
|
178
|
+
# to a single VM. You can use this API resource to determine both the compliance
|
179
|
+
# state of your VM as well as the compliance state of an individual OS policy.
|
180
|
+
# For more information, see [View compliance](https://cloud.google.com/compute/
|
181
|
+
# docs/os-configuration-management/view-compliance).
|
182
|
+
class InstanceOsPoliciesCompliance
|
183
|
+
include Google::Apis::Core::Hashable
|
184
|
+
|
185
|
+
# Output only. Detailed compliance state of the VM. This field is populated only
|
186
|
+
# when compliance state is `UNKNOWN`. It may contain one of the following values:
|
187
|
+
# * `no-compliance-data`: Compliance data is not available for this VM. * `no-
|
188
|
+
# agent-detected`: OS Config agent is not detected for this VM. * `config-not-
|
189
|
+
# supported-by-agent`: The version of the OS Config agent running on this VM
|
190
|
+
# does not support configuration management. * `inactive`: VM is not running. * `
|
191
|
+
# internal-service-errors`: There were internal service errors encountered while
|
192
|
+
# enforcing compliance. * `agent-errors`: OS config agent encountered errors
|
193
|
+
# while enforcing compliance.
|
194
|
+
# Corresponds to the JSON property `detailedState`
|
195
|
+
# @return [String]
|
196
|
+
attr_accessor :detailed_state
|
197
|
+
|
198
|
+
# Output only. The reason for the `detailed_state` of the VM (if any).
|
199
|
+
# Corresponds to the JSON property `detailedStateReason`
|
200
|
+
# @return [String]
|
201
|
+
attr_accessor :detailed_state_reason
|
202
|
+
|
203
|
+
# Output only. The Compute Engine VM instance name.
|
204
|
+
# Corresponds to the JSON property `instance`
|
205
|
+
# @return [String]
|
206
|
+
attr_accessor :instance
|
207
|
+
|
208
|
+
# Output only. Timestamp of the last compliance check for the VM.
|
209
|
+
# Corresponds to the JSON property `lastComplianceCheckTime`
|
210
|
+
# @return [String]
|
211
|
+
attr_accessor :last_compliance_check_time
|
212
|
+
|
213
|
+
# Output only. Unique identifier for the last compliance run. This id will be
|
214
|
+
# logged by the OS config agent during a compliance run and can be used for
|
215
|
+
# debugging and tracing purpose.
|
216
|
+
# Corresponds to the JSON property `lastComplianceRunId`
|
217
|
+
# @return [String]
|
218
|
+
attr_accessor :last_compliance_run_id
|
219
|
+
|
220
|
+
# Output only. The `InstanceOSPoliciesCompliance` API resource name. Format: `
|
221
|
+
# projects/`project_number`/locations/`location`/instanceOSPoliciesCompliances/`
|
222
|
+
# instance_id``
|
223
|
+
# Corresponds to the JSON property `name`
|
224
|
+
# @return [String]
|
225
|
+
attr_accessor :name
|
226
|
+
|
227
|
+
# Output only. Compliance data for each `OSPolicy` that is applied to the VM.
|
228
|
+
# Corresponds to the JSON property `osPolicyCompliances`
|
229
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::InstanceOsPoliciesComplianceOsPolicyCompliance>]
|
230
|
+
attr_accessor :os_policy_compliances
|
231
|
+
|
232
|
+
# Output only. Compliance state of the VM.
|
233
|
+
# Corresponds to the JSON property `state`
|
234
|
+
# @return [String]
|
235
|
+
attr_accessor :state
|
236
|
+
|
237
|
+
def initialize(**args)
|
238
|
+
update!(**args)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Update properties of this object
|
242
|
+
def update!(**args)
|
243
|
+
@detailed_state = args[:detailed_state] if args.key?(:detailed_state)
|
244
|
+
@detailed_state_reason = args[:detailed_state_reason] if args.key?(:detailed_state_reason)
|
245
|
+
@instance = args[:instance] if args.key?(:instance)
|
246
|
+
@last_compliance_check_time = args[:last_compliance_check_time] if args.key?(:last_compliance_check_time)
|
247
|
+
@last_compliance_run_id = args[:last_compliance_run_id] if args.key?(:last_compliance_run_id)
|
248
|
+
@name = args[:name] if args.key?(:name)
|
249
|
+
@os_policy_compliances = args[:os_policy_compliances] if args.key?(:os_policy_compliances)
|
250
|
+
@state = args[:state] if args.key?(:state)
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
# Compliance data for an OS policy
|
255
|
+
class InstanceOsPoliciesComplianceOsPolicyCompliance
|
256
|
+
include Google::Apis::Core::Hashable
|
257
|
+
|
258
|
+
# Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs
|
259
|
+
# to. Format: `projects/`project_number`/locations/`location`/
|
260
|
+
# osPolicyAssignments/`os_policy_assignment_id@revision_id``
|
261
|
+
# Corresponds to the JSON property `osPolicyAssignment`
|
262
|
+
# @return [String]
|
263
|
+
attr_accessor :os_policy_assignment
|
264
|
+
|
265
|
+
# The OS policy id
|
266
|
+
# Corresponds to the JSON property `osPolicyId`
|
267
|
+
# @return [String]
|
268
|
+
attr_accessor :os_policy_id
|
269
|
+
|
270
|
+
# Compliance data for each `OSPolicyResource` that is applied to the VM.
|
271
|
+
# Corresponds to the JSON property `osPolicyResourceCompliances`
|
272
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyResourceCompliance>]
|
273
|
+
attr_accessor :os_policy_resource_compliances
|
274
|
+
|
275
|
+
# Compliance state of the OS policy.
|
276
|
+
# Corresponds to the JSON property `state`
|
277
|
+
# @return [String]
|
278
|
+
attr_accessor :state
|
279
|
+
|
280
|
+
def initialize(**args)
|
281
|
+
update!(**args)
|
282
|
+
end
|
283
|
+
|
284
|
+
# Update properties of this object
|
285
|
+
def update!(**args)
|
286
|
+
@os_policy_assignment = args[:os_policy_assignment] if args.key?(:os_policy_assignment)
|
287
|
+
@os_policy_id = args[:os_policy_id] if args.key?(:os_policy_id)
|
288
|
+
@os_policy_resource_compliances = args[:os_policy_resource_compliances] if args.key?(:os_policy_resource_compliances)
|
289
|
+
@state = args[:state] if args.key?(:state)
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
# This API resource represents the available inventory data for a Compute Engine
|
294
|
+
# virtual machine (VM) instance at a given point in time. You can use this API
|
295
|
+
# resource to determine the inventory data of your VM. For more information, see
|
296
|
+
# [Information provided by OS inventory management](https://cloud.google.com/
|
297
|
+
# compute/docs/instances/os-inventory-management#data-collected).
|
298
|
+
class Inventory
|
299
|
+
include Google::Apis::Core::Hashable
|
300
|
+
|
301
|
+
# Output only. Inventory items related to the VM keyed by an opaque unique
|
302
|
+
# identifier for each inventory item. The identifier is unique to each distinct
|
303
|
+
# and addressable inventory item and will change, when there is a new package
|
304
|
+
# version.
|
305
|
+
# Corresponds to the JSON property `items`
|
306
|
+
# @return [Hash<String,Google::Apis::OsconfigV1alpha::InventoryItem>]
|
307
|
+
attr_accessor :items
|
308
|
+
|
309
|
+
# Output only. The `Inventory` API resource name. Format: `projects/`
|
310
|
+
# project_number`/locations/`location`/instances/`instance_id`/inventory`
|
311
|
+
# Corresponds to the JSON property `name`
|
312
|
+
# @return [String]
|
313
|
+
attr_accessor :name
|
314
|
+
|
315
|
+
# Operating system information for the VM.
|
316
|
+
# Corresponds to the JSON property `osInfo`
|
317
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryOsInfo]
|
318
|
+
attr_accessor :os_info
|
319
|
+
|
320
|
+
# Output only. Timestamp of the last reported inventory for the VM.
|
321
|
+
# Corresponds to the JSON property `updateTime`
|
322
|
+
# @return [String]
|
323
|
+
attr_accessor :update_time
|
324
|
+
|
325
|
+
def initialize(**args)
|
326
|
+
update!(**args)
|
327
|
+
end
|
328
|
+
|
329
|
+
# Update properties of this object
|
330
|
+
def update!(**args)
|
331
|
+
@items = args[:items] if args.key?(:items)
|
332
|
+
@name = args[:name] if args.key?(:name)
|
333
|
+
@os_info = args[:os_info] if args.key?(:os_info)
|
334
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
335
|
+
end
|
336
|
+
end
|
337
|
+
|
338
|
+
# A single piece of inventory on a VM.
|
339
|
+
class InventoryItem
|
340
|
+
include Google::Apis::Core::Hashable
|
341
|
+
|
342
|
+
# Software package information of the operating system.
|
343
|
+
# Corresponds to the JSON property `availablePackage`
|
344
|
+
# @return [Google::Apis::OsconfigV1alpha::InventorySoftwarePackage]
|
345
|
+
attr_accessor :available_package
|
346
|
+
|
347
|
+
# When this inventory item was first detected.
|
348
|
+
# Corresponds to the JSON property `createTime`
|
349
|
+
# @return [String]
|
350
|
+
attr_accessor :create_time
|
351
|
+
|
352
|
+
# Identifier for this item, unique across items for this VM.
|
353
|
+
# Corresponds to the JSON property `id`
|
354
|
+
# @return [String]
|
355
|
+
attr_accessor :id
|
356
|
+
|
357
|
+
# Software package information of the operating system.
|
358
|
+
# Corresponds to the JSON property `installedPackage`
|
359
|
+
# @return [Google::Apis::OsconfigV1alpha::InventorySoftwarePackage]
|
360
|
+
attr_accessor :installed_package
|
361
|
+
|
362
|
+
# The origin of this inventory item.
|
363
|
+
# Corresponds to the JSON property `originType`
|
364
|
+
# @return [String]
|
365
|
+
attr_accessor :origin_type
|
366
|
+
|
367
|
+
# The specific type of inventory, correlating to its specific details.
|
368
|
+
# Corresponds to the JSON property `type`
|
369
|
+
# @return [String]
|
370
|
+
attr_accessor :type
|
371
|
+
|
372
|
+
# When this inventory item was last modified.
|
373
|
+
# Corresponds to the JSON property `updateTime`
|
374
|
+
# @return [String]
|
375
|
+
attr_accessor :update_time
|
376
|
+
|
377
|
+
def initialize(**args)
|
378
|
+
update!(**args)
|
379
|
+
end
|
380
|
+
|
381
|
+
# Update properties of this object
|
382
|
+
def update!(**args)
|
383
|
+
@available_package = args[:available_package] if args.key?(:available_package)
|
384
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
385
|
+
@id = args[:id] if args.key?(:id)
|
386
|
+
@installed_package = args[:installed_package] if args.key?(:installed_package)
|
387
|
+
@origin_type = args[:origin_type] if args.key?(:origin_type)
|
388
|
+
@type = args[:type] if args.key?(:type)
|
389
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
390
|
+
end
|
391
|
+
end
|
392
|
+
|
393
|
+
# Operating system information for the VM.
|
394
|
+
class InventoryOsInfo
|
395
|
+
include Google::Apis::Core::Hashable
|
396
|
+
|
397
|
+
# The system architecture of the operating system.
|
398
|
+
# Corresponds to the JSON property `architecture`
|
399
|
+
# @return [String]
|
400
|
+
attr_accessor :architecture
|
401
|
+
|
402
|
+
# The VM hostname.
|
403
|
+
# Corresponds to the JSON property `hostname`
|
404
|
+
# @return [String]
|
405
|
+
attr_accessor :hostname
|
406
|
+
|
407
|
+
# The kernel release of the operating system.
|
408
|
+
# Corresponds to the JSON property `kernelRelease`
|
409
|
+
# @return [String]
|
410
|
+
attr_accessor :kernel_release
|
411
|
+
|
412
|
+
# The kernel version of the operating system.
|
413
|
+
# Corresponds to the JSON property `kernelVersion`
|
414
|
+
# @return [String]
|
415
|
+
attr_accessor :kernel_version
|
416
|
+
|
417
|
+
# The operating system long name. For example 'Debian GNU/Linux 9' or 'Microsoft
|
418
|
+
# Window Server 2019 Datacenter'.
|
419
|
+
# Corresponds to the JSON property `longName`
|
420
|
+
# @return [String]
|
421
|
+
attr_accessor :long_name
|
422
|
+
|
423
|
+
# The current version of the OS Config agent running on the VM.
|
424
|
+
# Corresponds to the JSON property `osconfigAgentVersion`
|
425
|
+
# @return [String]
|
426
|
+
attr_accessor :osconfig_agent_version
|
427
|
+
|
428
|
+
# The operating system short name. For example, 'windows' or 'debian'.
|
429
|
+
# Corresponds to the JSON property `shortName`
|
430
|
+
# @return [String]
|
431
|
+
attr_accessor :short_name
|
432
|
+
|
433
|
+
# The version of the operating system.
|
434
|
+
# Corresponds to the JSON property `version`
|
435
|
+
# @return [String]
|
436
|
+
attr_accessor :version
|
437
|
+
|
438
|
+
def initialize(**args)
|
439
|
+
update!(**args)
|
440
|
+
end
|
441
|
+
|
442
|
+
# Update properties of this object
|
443
|
+
def update!(**args)
|
444
|
+
@architecture = args[:architecture] if args.key?(:architecture)
|
445
|
+
@hostname = args[:hostname] if args.key?(:hostname)
|
446
|
+
@kernel_release = args[:kernel_release] if args.key?(:kernel_release)
|
447
|
+
@kernel_version = args[:kernel_version] if args.key?(:kernel_version)
|
448
|
+
@long_name = args[:long_name] if args.key?(:long_name)
|
449
|
+
@osconfig_agent_version = args[:osconfig_agent_version] if args.key?(:osconfig_agent_version)
|
450
|
+
@short_name = args[:short_name] if args.key?(:short_name)
|
451
|
+
@version = args[:version] if args.key?(:version)
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# Software package information of the operating system.
|
456
|
+
class InventorySoftwarePackage
|
457
|
+
include Google::Apis::Core::Hashable
|
458
|
+
|
459
|
+
# Information related to the a standard versioned package. This includes package
|
460
|
+
# info for APT, Yum, Zypper, and Googet package managers.
|
461
|
+
# Corresponds to the JSON property `aptPackage`
|
462
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryVersionedPackage]
|
463
|
+
attr_accessor :apt_package
|
464
|
+
|
465
|
+
# Information related to the a standard versioned package. This includes package
|
466
|
+
# info for APT, Yum, Zypper, and Googet package managers.
|
467
|
+
# Corresponds to the JSON property `cosPackage`
|
468
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryVersionedPackage]
|
469
|
+
attr_accessor :cos_package
|
470
|
+
|
471
|
+
# Information related to the a standard versioned package. This includes package
|
472
|
+
# info for APT, Yum, Zypper, and Googet package managers.
|
473
|
+
# Corresponds to the JSON property `googetPackage`
|
474
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryVersionedPackage]
|
475
|
+
attr_accessor :googet_package
|
476
|
+
|
477
|
+
# Information related to a Quick Fix Engineering package. Fields are taken from
|
478
|
+
# Windows QuickFixEngineering Interface and match the source names: https://docs.
|
479
|
+
# microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
|
480
|
+
# Corresponds to the JSON property `qfePackage`
|
481
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryWindowsQuickFixEngineeringPackage]
|
482
|
+
attr_accessor :qfe_package
|
483
|
+
|
484
|
+
# Details related to a Windows Update package. Field data and names are taken
|
485
|
+
# from Windows Update API IUpdate Interface: https://docs.microsoft.com/en-us/
|
486
|
+
# windows/win32/api/_wua/ Descriptive fields like title, and description are
|
487
|
+
# localized based on the locale of the VM being updated.
|
488
|
+
# Corresponds to the JSON property `wuaPackage`
|
489
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryWindowsUpdatePackage]
|
490
|
+
attr_accessor :wua_package
|
491
|
+
|
492
|
+
# Information related to the a standard versioned package. This includes package
|
493
|
+
# info for APT, Yum, Zypper, and Googet package managers.
|
494
|
+
# Corresponds to the JSON property `yumPackage`
|
495
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryVersionedPackage]
|
496
|
+
attr_accessor :yum_package
|
497
|
+
|
498
|
+
# Information related to the a standard versioned package. This includes package
|
499
|
+
# info for APT, Yum, Zypper, and Googet package managers.
|
500
|
+
# Corresponds to the JSON property `zypperPackage`
|
501
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryVersionedPackage]
|
502
|
+
attr_accessor :zypper_package
|
503
|
+
|
504
|
+
# Details related to a Zypper Patch.
|
505
|
+
# Corresponds to the JSON property `zypperPatch`
|
506
|
+
# @return [Google::Apis::OsconfigV1alpha::InventoryZypperPatch]
|
507
|
+
attr_accessor :zypper_patch
|
508
|
+
|
509
|
+
def initialize(**args)
|
510
|
+
update!(**args)
|
511
|
+
end
|
512
|
+
|
513
|
+
# Update properties of this object
|
514
|
+
def update!(**args)
|
515
|
+
@apt_package = args[:apt_package] if args.key?(:apt_package)
|
516
|
+
@cos_package = args[:cos_package] if args.key?(:cos_package)
|
517
|
+
@googet_package = args[:googet_package] if args.key?(:googet_package)
|
518
|
+
@qfe_package = args[:qfe_package] if args.key?(:qfe_package)
|
519
|
+
@wua_package = args[:wua_package] if args.key?(:wua_package)
|
520
|
+
@yum_package = args[:yum_package] if args.key?(:yum_package)
|
521
|
+
@zypper_package = args[:zypper_package] if args.key?(:zypper_package)
|
522
|
+
@zypper_patch = args[:zypper_patch] if args.key?(:zypper_patch)
|
523
|
+
end
|
524
|
+
end
|
525
|
+
|
526
|
+
# Information related to the a standard versioned package. This includes package
|
527
|
+
# info for APT, Yum, Zypper, and Googet package managers.
|
528
|
+
class InventoryVersionedPackage
|
529
|
+
include Google::Apis::Core::Hashable
|
530
|
+
|
531
|
+
# The system architecture this package is intended for.
|
532
|
+
# Corresponds to the JSON property `architecture`
|
533
|
+
# @return [String]
|
534
|
+
attr_accessor :architecture
|
535
|
+
|
536
|
+
# The name of the package.
|
537
|
+
# Corresponds to the JSON property `packageName`
|
538
|
+
# @return [String]
|
539
|
+
attr_accessor :package_name
|
540
|
+
|
541
|
+
# The version of the package.
|
542
|
+
# Corresponds to the JSON property `version`
|
543
|
+
# @return [String]
|
544
|
+
attr_accessor :version
|
545
|
+
|
546
|
+
def initialize(**args)
|
547
|
+
update!(**args)
|
548
|
+
end
|
549
|
+
|
550
|
+
# Update properties of this object
|
551
|
+
def update!(**args)
|
552
|
+
@architecture = args[:architecture] if args.key?(:architecture)
|
553
|
+
@package_name = args[:package_name] if args.key?(:package_name)
|
554
|
+
@version = args[:version] if args.key?(:version)
|
555
|
+
end
|
556
|
+
end
|
557
|
+
|
558
|
+
# Information related to a Quick Fix Engineering package. Fields are taken from
|
559
|
+
# Windows QuickFixEngineering Interface and match the source names: https://docs.
|
560
|
+
# microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
|
561
|
+
class InventoryWindowsQuickFixEngineeringPackage
|
562
|
+
include Google::Apis::Core::Hashable
|
563
|
+
|
564
|
+
# A short textual description of the QFE update.
|
565
|
+
# Corresponds to the JSON property `caption`
|
566
|
+
# @return [String]
|
567
|
+
attr_accessor :caption
|
568
|
+
|
569
|
+
# A textual description of the QFE update.
|
570
|
+
# Corresponds to the JSON property `description`
|
571
|
+
# @return [String]
|
572
|
+
attr_accessor :description
|
573
|
+
|
574
|
+
# Unique identifier associated with a particular QFE update.
|
575
|
+
# Corresponds to the JSON property `hotFixId`
|
576
|
+
# @return [String]
|
577
|
+
attr_accessor :hot_fix_id
|
578
|
+
|
579
|
+
# Date that the QFE update was installed. Mapped from installed_on field.
|
580
|
+
# Corresponds to the JSON property `installTime`
|
581
|
+
# @return [String]
|
582
|
+
attr_accessor :install_time
|
583
|
+
|
584
|
+
def initialize(**args)
|
585
|
+
update!(**args)
|
586
|
+
end
|
587
|
+
|
588
|
+
# Update properties of this object
|
589
|
+
def update!(**args)
|
590
|
+
@caption = args[:caption] if args.key?(:caption)
|
591
|
+
@description = args[:description] if args.key?(:description)
|
592
|
+
@hot_fix_id = args[:hot_fix_id] if args.key?(:hot_fix_id)
|
593
|
+
@install_time = args[:install_time] if args.key?(:install_time)
|
594
|
+
end
|
595
|
+
end
|
596
|
+
|
597
|
+
# Details related to a Windows Update package. Field data and names are taken
|
598
|
+
# from Windows Update API IUpdate Interface: https://docs.microsoft.com/en-us/
|
599
|
+
# windows/win32/api/_wua/ Descriptive fields like title, and description are
|
600
|
+
# localized based on the locale of the VM being updated.
|
601
|
+
class InventoryWindowsUpdatePackage
|
602
|
+
include Google::Apis::Core::Hashable
|
603
|
+
|
604
|
+
# The categories that are associated with this update package.
|
605
|
+
# Corresponds to the JSON property `categories`
|
606
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::InventoryWindowsUpdatePackageWindowsUpdateCategory>]
|
607
|
+
attr_accessor :categories
|
608
|
+
|
609
|
+
# The localized description of the update package.
|
610
|
+
# Corresponds to the JSON property `description`
|
611
|
+
# @return [String]
|
612
|
+
attr_accessor :description
|
613
|
+
|
614
|
+
# A collection of Microsoft Knowledge Base article IDs that are associated with
|
615
|
+
# the update package.
|
616
|
+
# Corresponds to the JSON property `kbArticleIds`
|
617
|
+
# @return [Array<String>]
|
618
|
+
attr_accessor :kb_article_ids
|
619
|
+
|
620
|
+
# The last published date of the update, in (UTC) date and time.
|
621
|
+
# Corresponds to the JSON property `lastDeploymentChangeTime`
|
622
|
+
# @return [String]
|
623
|
+
attr_accessor :last_deployment_change_time
|
624
|
+
|
625
|
+
# A collection of URLs that provide more information about the update package.
|
626
|
+
# Corresponds to the JSON property `moreInfoUrls`
|
627
|
+
# @return [Array<String>]
|
628
|
+
attr_accessor :more_info_urls
|
629
|
+
|
630
|
+
# The revision number of this update package.
|
631
|
+
# Corresponds to the JSON property `revisionNumber`
|
632
|
+
# @return [Fixnum]
|
633
|
+
attr_accessor :revision_number
|
634
|
+
|
635
|
+
# A hyperlink to the language-specific support information for the update.
|
636
|
+
# Corresponds to the JSON property `supportUrl`
|
637
|
+
# @return [String]
|
638
|
+
attr_accessor :support_url
|
639
|
+
|
640
|
+
# The localized title of the update package.
|
641
|
+
# Corresponds to the JSON property `title`
|
642
|
+
# @return [String]
|
643
|
+
attr_accessor :title
|
644
|
+
|
645
|
+
# Gets the identifier of an update package. Stays the same across revisions.
|
646
|
+
# Corresponds to the JSON property `updateId`
|
647
|
+
# @return [String]
|
648
|
+
attr_accessor :update_id
|
649
|
+
|
650
|
+
def initialize(**args)
|
651
|
+
update!(**args)
|
652
|
+
end
|
653
|
+
|
654
|
+
# Update properties of this object
|
655
|
+
def update!(**args)
|
656
|
+
@categories = args[:categories] if args.key?(:categories)
|
657
|
+
@description = args[:description] if args.key?(:description)
|
658
|
+
@kb_article_ids = args[:kb_article_ids] if args.key?(:kb_article_ids)
|
659
|
+
@last_deployment_change_time = args[:last_deployment_change_time] if args.key?(:last_deployment_change_time)
|
660
|
+
@more_info_urls = args[:more_info_urls] if args.key?(:more_info_urls)
|
661
|
+
@revision_number = args[:revision_number] if args.key?(:revision_number)
|
662
|
+
@support_url = args[:support_url] if args.key?(:support_url)
|
663
|
+
@title = args[:title] if args.key?(:title)
|
664
|
+
@update_id = args[:update_id] if args.key?(:update_id)
|
665
|
+
end
|
666
|
+
end
|
667
|
+
|
668
|
+
# Categories specified by the Windows Update.
|
669
|
+
class InventoryWindowsUpdatePackageWindowsUpdateCategory
|
670
|
+
include Google::Apis::Core::Hashable
|
671
|
+
|
672
|
+
# The identifier of the windows update category.
|
673
|
+
# Corresponds to the JSON property `id`
|
674
|
+
# @return [String]
|
675
|
+
attr_accessor :id
|
676
|
+
|
677
|
+
# The name of the windows update category.
|
678
|
+
# Corresponds to the JSON property `name`
|
679
|
+
# @return [String]
|
680
|
+
attr_accessor :name
|
681
|
+
|
682
|
+
def initialize(**args)
|
683
|
+
update!(**args)
|
684
|
+
end
|
685
|
+
|
686
|
+
# Update properties of this object
|
687
|
+
def update!(**args)
|
688
|
+
@id = args[:id] if args.key?(:id)
|
689
|
+
@name = args[:name] if args.key?(:name)
|
690
|
+
end
|
691
|
+
end
|
692
|
+
|
693
|
+
# Details related to a Zypper Patch.
|
694
|
+
class InventoryZypperPatch
|
695
|
+
include Google::Apis::Core::Hashable
|
696
|
+
|
697
|
+
# The category of the patch.
|
698
|
+
# Corresponds to the JSON property `category`
|
699
|
+
# @return [String]
|
700
|
+
attr_accessor :category
|
701
|
+
|
702
|
+
# The name of the patch.
|
703
|
+
# Corresponds to the JSON property `patchName`
|
704
|
+
# @return [String]
|
705
|
+
attr_accessor :patch_name
|
706
|
+
|
707
|
+
# The severity specified for this patch
|
708
|
+
# Corresponds to the JSON property `severity`
|
709
|
+
# @return [String]
|
710
|
+
attr_accessor :severity
|
711
|
+
|
712
|
+
# Any summary information provided about this patch.
|
713
|
+
# Corresponds to the JSON property `summary`
|
714
|
+
# @return [String]
|
715
|
+
attr_accessor :summary
|
716
|
+
|
717
|
+
def initialize(**args)
|
718
|
+
update!(**args)
|
719
|
+
end
|
720
|
+
|
721
|
+
# Update properties of this object
|
722
|
+
def update!(**args)
|
723
|
+
@category = args[:category] if args.key?(:category)
|
724
|
+
@patch_name = args[:patch_name] if args.key?(:patch_name)
|
725
|
+
@severity = args[:severity] if args.key?(:severity)
|
726
|
+
@summary = args[:summary] if args.key?(:summary)
|
727
|
+
end
|
728
|
+
end
|
729
|
+
|
730
|
+
# A response message for listing OS policies compliance data for all Compute
|
731
|
+
# Engine VMs in the given location.
|
732
|
+
class ListInstanceOsPoliciesCompliancesResponse
|
733
|
+
include Google::Apis::Core::Hashable
|
734
|
+
|
735
|
+
# List of instance OS policies compliance objects.
|
736
|
+
# Corresponds to the JSON property `instanceOsPoliciesCompliances`
|
737
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::InstanceOsPoliciesCompliance>]
|
738
|
+
attr_accessor :instance_os_policies_compliances
|
739
|
+
|
740
|
+
# The pagination token to retrieve the next page of instance OS policies
|
741
|
+
# compliance objects.
|
742
|
+
# Corresponds to the JSON property `nextPageToken`
|
743
|
+
# @return [String]
|
744
|
+
attr_accessor :next_page_token
|
745
|
+
|
746
|
+
def initialize(**args)
|
747
|
+
update!(**args)
|
748
|
+
end
|
749
|
+
|
750
|
+
# Update properties of this object
|
751
|
+
def update!(**args)
|
752
|
+
@instance_os_policies_compliances = args[:instance_os_policies_compliances] if args.key?(:instance_os_policies_compliances)
|
753
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
754
|
+
end
|
755
|
+
end
|
756
|
+
|
757
|
+
# A response message for listing inventory data for all VMs in a specified
|
758
|
+
# location.
|
759
|
+
class ListInventoriesResponse
|
760
|
+
include Google::Apis::Core::Hashable
|
761
|
+
|
762
|
+
# List of inventory objects.
|
763
|
+
# Corresponds to the JSON property `inventories`
|
764
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::Inventory>]
|
765
|
+
attr_accessor :inventories
|
766
|
+
|
767
|
+
# The pagination token to retrieve the next page of inventory objects.
|
768
|
+
# Corresponds to the JSON property `nextPageToken`
|
769
|
+
# @return [String]
|
770
|
+
attr_accessor :next_page_token
|
771
|
+
|
772
|
+
def initialize(**args)
|
773
|
+
update!(**args)
|
774
|
+
end
|
775
|
+
|
776
|
+
# Update properties of this object
|
777
|
+
def update!(**args)
|
778
|
+
@inventories = args[:inventories] if args.key?(:inventories)
|
779
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
780
|
+
end
|
781
|
+
end
|
782
|
+
|
783
|
+
# A response message for listing all revisions for a OS policy assignment.
|
784
|
+
class ListOsPolicyAssignmentRevisionsResponse
|
785
|
+
include Google::Apis::Core::Hashable
|
786
|
+
|
787
|
+
# The pagination token to retrieve the next page of OS policy assignment
|
788
|
+
# revisions.
|
789
|
+
# Corresponds to the JSON property `nextPageToken`
|
790
|
+
# @return [String]
|
791
|
+
attr_accessor :next_page_token
|
792
|
+
|
793
|
+
# The OS policy assignment revisions
|
794
|
+
# Corresponds to the JSON property `osPolicyAssignments`
|
795
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyAssignment>]
|
796
|
+
attr_accessor :os_policy_assignments
|
797
|
+
|
798
|
+
def initialize(**args)
|
799
|
+
update!(**args)
|
800
|
+
end
|
801
|
+
|
802
|
+
# Update properties of this object
|
803
|
+
def update!(**args)
|
804
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
805
|
+
@os_policy_assignments = args[:os_policy_assignments] if args.key?(:os_policy_assignments)
|
806
|
+
end
|
807
|
+
end
|
808
|
+
|
809
|
+
# A response message for listing all assignments under given parent.
|
810
|
+
class ListOsPolicyAssignmentsResponse
|
811
|
+
include Google::Apis::Core::Hashable
|
812
|
+
|
813
|
+
# The pagination token to retrieve the next page of OS policy assignments.
|
814
|
+
# Corresponds to the JSON property `nextPageToken`
|
815
|
+
# @return [String]
|
816
|
+
attr_accessor :next_page_token
|
817
|
+
|
818
|
+
# The list of assignments
|
819
|
+
# Corresponds to the JSON property `osPolicyAssignments`
|
820
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyAssignment>]
|
821
|
+
attr_accessor :os_policy_assignments
|
822
|
+
|
823
|
+
def initialize(**args)
|
824
|
+
update!(**args)
|
825
|
+
end
|
826
|
+
|
827
|
+
# Update properties of this object
|
828
|
+
def update!(**args)
|
829
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
830
|
+
@os_policy_assignments = args[:os_policy_assignments] if args.key?(:os_policy_assignments)
|
831
|
+
end
|
832
|
+
end
|
833
|
+
|
834
|
+
# A response message for listing vulnerability reports for all VM instances in
|
835
|
+
# the specified location.
|
836
|
+
class ListVulnerabilityReportsResponse
|
837
|
+
include Google::Apis::Core::Hashable
|
838
|
+
|
839
|
+
# The pagination token to retrieve the next page of vulnerabilityReports object.
|
840
|
+
# Corresponds to the JSON property `nextPageToken`
|
841
|
+
# @return [String]
|
842
|
+
attr_accessor :next_page_token
|
843
|
+
|
844
|
+
# List of vulnerabilityReport objects.
|
845
|
+
# Corresponds to the JSON property `vulnerabilityReports`
|
846
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::VulnerabilityReport>]
|
847
|
+
attr_accessor :vulnerability_reports
|
848
|
+
|
849
|
+
def initialize(**args)
|
850
|
+
update!(**args)
|
851
|
+
end
|
852
|
+
|
853
|
+
# Update properties of this object
|
854
|
+
def update!(**args)
|
855
|
+
@next_page_token = args[:next_page_token] if args.key?(:next_page_token)
|
856
|
+
@vulnerability_reports = args[:vulnerability_reports] if args.key?(:vulnerability_reports)
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
# An OS policy defines the desired state configuration for a VM.
|
861
|
+
class OsPolicy
|
862
|
+
include Google::Apis::Core::Hashable
|
863
|
+
|
864
|
+
# This flag determines the OS policy compliance status when none of the resource
|
865
|
+
# groups within the policy are applicable for a VM. Set this value to `true` if
|
866
|
+
# the policy needs to be reported as compliant even if the policy has nothing to
|
867
|
+
# validate or enforce.
|
868
|
+
# Corresponds to the JSON property `allowNoResourceGroupMatch`
|
869
|
+
# @return [Boolean]
|
870
|
+
attr_accessor :allow_no_resource_group_match
|
871
|
+
alias_method :allow_no_resource_group_match?, :allow_no_resource_group_match
|
872
|
+
|
873
|
+
# Policy description. Length of the description is limited to 1024 characters.
|
874
|
+
# Corresponds to the JSON property `description`
|
875
|
+
# @return [String]
|
876
|
+
attr_accessor :description
|
877
|
+
|
878
|
+
# Required. The id of the OS policy with the following restrictions: * Must
|
879
|
+
# contain only lowercase letters, numbers, and hyphens. * Must start with a
|
880
|
+
# letter. * Must be between 1-63 characters. * Must end with a number or a
|
881
|
+
# letter. * Must be unique within the assignment.
|
882
|
+
# Corresponds to the JSON property `id`
|
883
|
+
# @return [String]
|
884
|
+
attr_accessor :id
|
885
|
+
|
886
|
+
# Required. Policy mode
|
887
|
+
# Corresponds to the JSON property `mode`
|
888
|
+
# @return [String]
|
889
|
+
attr_accessor :mode
|
890
|
+
|
891
|
+
# Required. List of resource groups for the policy. For a particular VM,
|
892
|
+
# resource groups are evaluated in the order specified and the first resource
|
893
|
+
# group that is applicable is selected and the rest are ignored. If none of the
|
894
|
+
# resource groups are applicable for a VM, the VM is considered to be non-
|
895
|
+
# compliant w.r.t this policy. This behavior can be toggled by the flag `
|
896
|
+
# allow_no_resource_group_match`
|
897
|
+
# Corresponds to the JSON property `resourceGroups`
|
898
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyResourceGroup>]
|
899
|
+
attr_accessor :resource_groups
|
900
|
+
|
901
|
+
def initialize(**args)
|
902
|
+
update!(**args)
|
903
|
+
end
|
904
|
+
|
905
|
+
# Update properties of this object
|
906
|
+
def update!(**args)
|
907
|
+
@allow_no_resource_group_match = args[:allow_no_resource_group_match] if args.key?(:allow_no_resource_group_match)
|
908
|
+
@description = args[:description] if args.key?(:description)
|
909
|
+
@id = args[:id] if args.key?(:id)
|
910
|
+
@mode = args[:mode] if args.key?(:mode)
|
911
|
+
@resource_groups = args[:resource_groups] if args.key?(:resource_groups)
|
912
|
+
end
|
913
|
+
end
|
914
|
+
|
915
|
+
# OS policy assignment is an API resource that is used to apply a set of OS
|
916
|
+
# policies to a dynamically targeted group of Compute Engine VM instances. An OS
|
917
|
+
# policy is used to define the desired state configuration for a Compute Engine
|
918
|
+
# VM instance through a set of configuration resources that provide capabilities
|
919
|
+
# such as installing or removing software packages, or executing a script. For
|
920
|
+
# more information, see [OS policy and OS policy assignment](https://cloud.
|
921
|
+
# google.com/compute/docs/os-configuration-management/working-with-os-policies).
|
922
|
+
class OsPolicyAssignment
|
923
|
+
include Google::Apis::Core::Hashable
|
924
|
+
|
925
|
+
# Output only. Indicates that this revision has been successfully rolled out in
|
926
|
+
# this zone and new VMs will be assigned OS policies from this revision. For a
|
927
|
+
# given OS policy assignment, there is only one revision with a value of `true`
|
928
|
+
# for this field.
|
929
|
+
# Corresponds to the JSON property `baseline`
|
930
|
+
# @return [Boolean]
|
931
|
+
attr_accessor :baseline
|
932
|
+
alias_method :baseline?, :baseline
|
933
|
+
|
934
|
+
# Output only. Indicates that this revision deletes the OS policy assignment.
|
935
|
+
# Corresponds to the JSON property `deleted`
|
936
|
+
# @return [Boolean]
|
937
|
+
attr_accessor :deleted
|
938
|
+
alias_method :deleted?, :deleted
|
939
|
+
|
940
|
+
# OS policy assignment description. Length of the description is limited to 1024
|
941
|
+
# characters.
|
942
|
+
# Corresponds to the JSON property `description`
|
943
|
+
# @return [String]
|
944
|
+
attr_accessor :description
|
945
|
+
|
946
|
+
# Message to represent the filters to select VMs for an assignment
|
947
|
+
# Corresponds to the JSON property `instanceFilter`
|
948
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyAssignmentInstanceFilter]
|
949
|
+
attr_accessor :instance_filter
|
950
|
+
|
951
|
+
# Resource name. Format: `projects/`project_number`/locations/`location`/
|
952
|
+
# osPolicyAssignments/`os_policy_assignment_id`` This field is ignored when you
|
953
|
+
# create an OS policy assignment.
|
954
|
+
# Corresponds to the JSON property `name`
|
955
|
+
# @return [String]
|
956
|
+
attr_accessor :name
|
957
|
+
|
958
|
+
# Required. List of OS policies to be applied to the VMs.
|
959
|
+
# Corresponds to the JSON property `osPolicies`
|
960
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicy>]
|
961
|
+
attr_accessor :os_policies
|
962
|
+
|
963
|
+
# Output only. Indicates that reconciliation is in progress for the revision.
|
964
|
+
# This value is `true` when the `rollout_state` is one of: * IN_PROGRESS *
|
965
|
+
# CANCELLING
|
966
|
+
# Corresponds to the JSON property `reconciling`
|
967
|
+
# @return [Boolean]
|
968
|
+
attr_accessor :reconciling
|
969
|
+
alias_method :reconciling?, :reconciling
|
970
|
+
|
971
|
+
# Output only. The timestamp that the revision was created.
|
972
|
+
# Corresponds to the JSON property `revisionCreateTime`
|
973
|
+
# @return [String]
|
974
|
+
attr_accessor :revision_create_time
|
975
|
+
|
976
|
+
# Output only. The assignment revision ID A new revision is committed whenever a
|
977
|
+
# rollout is triggered for a OS policy assignment
|
978
|
+
# Corresponds to the JSON property `revisionId`
|
979
|
+
# @return [String]
|
980
|
+
attr_accessor :revision_id
|
981
|
+
|
982
|
+
# Message to configure the rollout at the zonal level for the OS policy
|
983
|
+
# assignment.
|
984
|
+
# Corresponds to the JSON property `rollout`
|
985
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyAssignmentRollout]
|
986
|
+
attr_accessor :rollout
|
987
|
+
|
988
|
+
# Output only. OS policy assignment rollout state
|
989
|
+
# Corresponds to the JSON property `rolloutState`
|
990
|
+
# @return [String]
|
991
|
+
attr_accessor :rollout_state
|
992
|
+
|
993
|
+
# Output only. Server generated unique id for the OS policy assignment resource.
|
994
|
+
# Corresponds to the JSON property `uid`
|
995
|
+
# @return [String]
|
996
|
+
attr_accessor :uid
|
997
|
+
|
998
|
+
def initialize(**args)
|
999
|
+
update!(**args)
|
1000
|
+
end
|
1001
|
+
|
1002
|
+
# Update properties of this object
|
1003
|
+
def update!(**args)
|
1004
|
+
@baseline = args[:baseline] if args.key?(:baseline)
|
1005
|
+
@deleted = args[:deleted] if args.key?(:deleted)
|
1006
|
+
@description = args[:description] if args.key?(:description)
|
1007
|
+
@instance_filter = args[:instance_filter] if args.key?(:instance_filter)
|
1008
|
+
@name = args[:name] if args.key?(:name)
|
1009
|
+
@os_policies = args[:os_policies] if args.key?(:os_policies)
|
1010
|
+
@reconciling = args[:reconciling] if args.key?(:reconciling)
|
1011
|
+
@revision_create_time = args[:revision_create_time] if args.key?(:revision_create_time)
|
1012
|
+
@revision_id = args[:revision_id] if args.key?(:revision_id)
|
1013
|
+
@rollout = args[:rollout] if args.key?(:rollout)
|
1014
|
+
@rollout_state = args[:rollout_state] if args.key?(:rollout_state)
|
1015
|
+
@uid = args[:uid] if args.key?(:uid)
|
1016
|
+
end
|
1017
|
+
end
|
1018
|
+
|
1019
|
+
# Message to represent the filters to select VMs for an assignment
|
1020
|
+
class OsPolicyAssignmentInstanceFilter
|
1021
|
+
include Google::Apis::Core::Hashable
|
1022
|
+
|
1023
|
+
# Target all VMs in the project. If true, no other criteria is permitted.
|
1024
|
+
# Corresponds to the JSON property `all`
|
1025
|
+
# @return [Boolean]
|
1026
|
+
attr_accessor :all
|
1027
|
+
alias_method :all?, :all
|
1028
|
+
|
1029
|
+
# List of label sets used for VM exclusion. If the list has more than one label
|
1030
|
+
# set, the VM is excluded if any of the label sets are applicable for the VM.
|
1031
|
+
# This filter is applied last in the filtering chain and therefore a VM is
|
1032
|
+
# guaranteed to be excluded if it satisfies one of the below label sets.
|
1033
|
+
# Corresponds to the JSON property `exclusionLabels`
|
1034
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyAssignmentLabelSet>]
|
1035
|
+
attr_accessor :exclusion_labels
|
1036
|
+
|
1037
|
+
# List of label sets used for VM inclusion. If the list has more than one `
|
1038
|
+
# LabelSet`, the VM is included if any of the label sets are applicable for the
|
1039
|
+
# VM.
|
1040
|
+
# Corresponds to the JSON property `inclusionLabels`
|
1041
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyAssignmentLabelSet>]
|
1042
|
+
attr_accessor :inclusion_labels
|
1043
|
+
|
1044
|
+
# A VM is included if it's OS short name matches with any of the values provided
|
1045
|
+
# in this list.
|
1046
|
+
# Corresponds to the JSON property `osShortNames`
|
1047
|
+
# @return [Array<String>]
|
1048
|
+
attr_accessor :os_short_names
|
1049
|
+
|
1050
|
+
def initialize(**args)
|
1051
|
+
update!(**args)
|
1052
|
+
end
|
1053
|
+
|
1054
|
+
# Update properties of this object
|
1055
|
+
def update!(**args)
|
1056
|
+
@all = args[:all] if args.key?(:all)
|
1057
|
+
@exclusion_labels = args[:exclusion_labels] if args.key?(:exclusion_labels)
|
1058
|
+
@inclusion_labels = args[:inclusion_labels] if args.key?(:inclusion_labels)
|
1059
|
+
@os_short_names = args[:os_short_names] if args.key?(:os_short_names)
|
1060
|
+
end
|
1061
|
+
end
|
1062
|
+
|
1063
|
+
# Message representing label set. * A label is a key value pair set for a VM. *
|
1064
|
+
# A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other
|
1065
|
+
# words, a LabelSet is applicable for a VM only if it matches all the labels in
|
1066
|
+
# the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=
|
1067
|
+
# webserver` will only be applicable for those VMs with both labels present.
|
1068
|
+
class OsPolicyAssignmentLabelSet
|
1069
|
+
include Google::Apis::Core::Hashable
|
1070
|
+
|
1071
|
+
# Labels are identified by key/value pairs in this map. A VM should contain all
|
1072
|
+
# the key/value pairs specified in this map to be selected.
|
1073
|
+
# Corresponds to the JSON property `labels`
|
1074
|
+
# @return [Hash<String,String>]
|
1075
|
+
attr_accessor :labels
|
1076
|
+
|
1077
|
+
def initialize(**args)
|
1078
|
+
update!(**args)
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
# Update properties of this object
|
1082
|
+
def update!(**args)
|
1083
|
+
@labels = args[:labels] if args.key?(:labels)
|
1084
|
+
end
|
1085
|
+
end
|
1086
|
+
|
1087
|
+
# OS policy assignment operation metadata provided by OS policy assignment API
|
1088
|
+
# methods that return long running operations.
|
1089
|
+
class OsPolicyAssignmentOperationMetadata
|
1090
|
+
include Google::Apis::Core::Hashable
|
1091
|
+
|
1092
|
+
# The OS policy assignment API method.
|
1093
|
+
# Corresponds to the JSON property `apiMethod`
|
1094
|
+
# @return [String]
|
1095
|
+
attr_accessor :api_method
|
1096
|
+
|
1097
|
+
# Reference to the `OSPolicyAssignment` API resource. Format: `projects/`
|
1098
|
+
# project_number`/locations/`location`/osPolicyAssignments/`
|
1099
|
+
# os_policy_assignment_id@revision_id``
|
1100
|
+
# Corresponds to the JSON property `osPolicyAssignment`
|
1101
|
+
# @return [String]
|
1102
|
+
attr_accessor :os_policy_assignment
|
1103
|
+
|
1104
|
+
# Rollout start time
|
1105
|
+
# Corresponds to the JSON property `rolloutStartTime`
|
1106
|
+
# @return [String]
|
1107
|
+
attr_accessor :rollout_start_time
|
1108
|
+
|
1109
|
+
# State of the rollout
|
1110
|
+
# Corresponds to the JSON property `rolloutState`
|
1111
|
+
# @return [String]
|
1112
|
+
attr_accessor :rollout_state
|
1113
|
+
|
1114
|
+
# Rollout update time
|
1115
|
+
# Corresponds to the JSON property `rolloutUpdateTime`
|
1116
|
+
# @return [String]
|
1117
|
+
attr_accessor :rollout_update_time
|
1118
|
+
|
1119
|
+
def initialize(**args)
|
1120
|
+
update!(**args)
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
# Update properties of this object
|
1124
|
+
def update!(**args)
|
1125
|
+
@api_method = args[:api_method] if args.key?(:api_method)
|
1126
|
+
@os_policy_assignment = args[:os_policy_assignment] if args.key?(:os_policy_assignment)
|
1127
|
+
@rollout_start_time = args[:rollout_start_time] if args.key?(:rollout_start_time)
|
1128
|
+
@rollout_state = args[:rollout_state] if args.key?(:rollout_state)
|
1129
|
+
@rollout_update_time = args[:rollout_update_time] if args.key?(:rollout_update_time)
|
1130
|
+
end
|
1131
|
+
end
|
1132
|
+
|
1133
|
+
# Message to configure the rollout at the zonal level for the OS policy
|
1134
|
+
# assignment.
|
1135
|
+
class OsPolicyAssignmentRollout
|
1136
|
+
include Google::Apis::Core::Hashable
|
1137
|
+
|
1138
|
+
# Message encapsulating a value that can be either absolute ("fixed") or
|
1139
|
+
# relative ("percent") to a value.
|
1140
|
+
# Corresponds to the JSON property `disruptionBudget`
|
1141
|
+
# @return [Google::Apis::OsconfigV1alpha::FixedOrPercent]
|
1142
|
+
attr_accessor :disruption_budget
|
1143
|
+
|
1144
|
+
# Required. This determines the minimum duration of time to wait after the
|
1145
|
+
# configuration changes are applied through the current rollout. A VM continues
|
1146
|
+
# to count towards the `disruption_budget` at least until this duration of time
|
1147
|
+
# has passed after configuration changes are applied.
|
1148
|
+
# Corresponds to the JSON property `minWaitDuration`
|
1149
|
+
# @return [String]
|
1150
|
+
attr_accessor :min_wait_duration
|
1151
|
+
|
1152
|
+
def initialize(**args)
|
1153
|
+
update!(**args)
|
1154
|
+
end
|
1155
|
+
|
1156
|
+
# Update properties of this object
|
1157
|
+
def update!(**args)
|
1158
|
+
@disruption_budget = args[:disruption_budget] if args.key?(:disruption_budget)
|
1159
|
+
@min_wait_duration = args[:min_wait_duration] if args.key?(:min_wait_duration)
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
# The `OSFilter` is used to specify the OS filtering criteria for the resource
|
1164
|
+
# group.
|
1165
|
+
class OsPolicyOsFilter
|
1166
|
+
include Google::Apis::Core::Hashable
|
1167
|
+
|
1168
|
+
# This should match OS short name emitted by the OS inventory agent. An empty
|
1169
|
+
# value matches any OS.
|
1170
|
+
# Corresponds to the JSON property `osShortName`
|
1171
|
+
# @return [String]
|
1172
|
+
attr_accessor :os_short_name
|
1173
|
+
|
1174
|
+
# This value should match the version emitted by the OS inventory agent. Prefix
|
1175
|
+
# matches are supported if asterisk(*) is provided as the last character. For
|
1176
|
+
# example, to match all versions with a major version of `7`, specify the
|
1177
|
+
# following value for this field `7.*`
|
1178
|
+
# Corresponds to the JSON property `osVersion`
|
1179
|
+
# @return [String]
|
1180
|
+
attr_accessor :os_version
|
1181
|
+
|
1182
|
+
def initialize(**args)
|
1183
|
+
update!(**args)
|
1184
|
+
end
|
1185
|
+
|
1186
|
+
# Update properties of this object
|
1187
|
+
def update!(**args)
|
1188
|
+
@os_short_name = args[:os_short_name] if args.key?(:os_short_name)
|
1189
|
+
@os_version = args[:os_version] if args.key?(:os_version)
|
1190
|
+
end
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
# An OS policy resource is used to define the desired state configuration and
|
1194
|
+
# provides a specific functionality like installing/removing packages, executing
|
1195
|
+
# a script etc. The system ensures that resources are always in their desired
|
1196
|
+
# state by taking necessary actions if they have drifted from their desired
|
1197
|
+
# state.
|
1198
|
+
class OsPolicyResource
|
1199
|
+
include Google::Apis::Core::Hashable
|
1200
|
+
|
1201
|
+
# A resource that allows executing scripts on the VM. The `ExecResource` has 2
|
1202
|
+
# stages: `validate` and `enforce` and both stages accept a script as an
|
1203
|
+
# argument to execute. When the `ExecResource` is applied by the agent, it first
|
1204
|
+
# executes the script in the `validate` stage. The `validate` stage can signal
|
1205
|
+
# that the `ExecResource` is already in the desired state by returning an exit
|
1206
|
+
# code of `100`. If the `ExecResource` is not in the desired state, it should
|
1207
|
+
# return an exit code of `101`. Any other exit code returned by this stage is
|
1208
|
+
# considered an error. If the `ExecResource` is not in the desired state based
|
1209
|
+
# on the exit code from the `validate` stage, the agent proceeds to execute the
|
1210
|
+
# script from the `enforce` stage. If the `ExecResource` is already in the
|
1211
|
+
# desired state, the `enforce` stage will not be run. Similar to `validate`
|
1212
|
+
# stage, the `enforce` stage should return an exit code of `100` to indicate
|
1213
|
+
# that the resource in now in its desired state. Any other exit code is
|
1214
|
+
# considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101`
|
1215
|
+
# vs `1`) to have an explicit indicator of `in desired state`, `not in desired
|
1216
|
+
# state` and errors. Because, for example, Powershell will always return an exit
|
1217
|
+
# code of `0` unless an `exit` statement is provided in the script. So, for
|
1218
|
+
# reasons of consistency and being explicit, exit codes `100` and `101` were
|
1219
|
+
# chosen.
|
1220
|
+
# Corresponds to the JSON property `exec`
|
1221
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceExecResource]
|
1222
|
+
attr_accessor :exec
|
1223
|
+
|
1224
|
+
# A resource that manages the state of a file.
|
1225
|
+
# Corresponds to the JSON property `file`
|
1226
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFileResource]
|
1227
|
+
attr_accessor :file
|
1228
|
+
|
1229
|
+
# Required. The id of the resource with the following restrictions: * Must
|
1230
|
+
# contain only lowercase letters, numbers, and hyphens. * Must start with a
|
1231
|
+
# letter. * Must be between 1-63 characters. * Must end with a number or a
|
1232
|
+
# letter. * Must be unique within the OS policy.
|
1233
|
+
# Corresponds to the JSON property `id`
|
1234
|
+
# @return [String]
|
1235
|
+
attr_accessor :id
|
1236
|
+
|
1237
|
+
# A resource that manages a system package.
|
1238
|
+
# Corresponds to the JSON property `pkg`
|
1239
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResource]
|
1240
|
+
attr_accessor :pkg
|
1241
|
+
|
1242
|
+
# A resource that manages a package repository.
|
1243
|
+
# Corresponds to the JSON property `repository`
|
1244
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceRepositoryResource]
|
1245
|
+
attr_accessor :repository
|
1246
|
+
|
1247
|
+
def initialize(**args)
|
1248
|
+
update!(**args)
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# Update properties of this object
|
1252
|
+
def update!(**args)
|
1253
|
+
@exec = args[:exec] if args.key?(:exec)
|
1254
|
+
@file = args[:file] if args.key?(:file)
|
1255
|
+
@id = args[:id] if args.key?(:id)
|
1256
|
+
@pkg = args[:pkg] if args.key?(:pkg)
|
1257
|
+
@repository = args[:repository] if args.key?(:repository)
|
1258
|
+
end
|
1259
|
+
end
|
1260
|
+
|
1261
|
+
# Compliance data for an OS policy resource.
|
1262
|
+
class OsPolicyResourceCompliance
|
1263
|
+
include Google::Apis::Core::Hashable
|
1264
|
+
|
1265
|
+
# Ordered list of configuration steps taken by the agent for the OS policy
|
1266
|
+
# resource.
|
1267
|
+
# Corresponds to the JSON property `configSteps`
|
1268
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyResourceConfigStep>]
|
1269
|
+
attr_accessor :config_steps
|
1270
|
+
|
1271
|
+
# ExecResource specific output.
|
1272
|
+
# Corresponds to the JSON property `execResourceOutput`
|
1273
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceComplianceExecResourceOutput]
|
1274
|
+
attr_accessor :exec_resource_output
|
1275
|
+
|
1276
|
+
# The id of the OS policy resource.
|
1277
|
+
# Corresponds to the JSON property `osPolicyResourceId`
|
1278
|
+
# @return [String]
|
1279
|
+
attr_accessor :os_policy_resource_id
|
1280
|
+
|
1281
|
+
# Compliance state of the OS policy resource.
|
1282
|
+
# Corresponds to the JSON property `state`
|
1283
|
+
# @return [String]
|
1284
|
+
attr_accessor :state
|
1285
|
+
|
1286
|
+
def initialize(**args)
|
1287
|
+
update!(**args)
|
1288
|
+
end
|
1289
|
+
|
1290
|
+
# Update properties of this object
|
1291
|
+
def update!(**args)
|
1292
|
+
@config_steps = args[:config_steps] if args.key?(:config_steps)
|
1293
|
+
@exec_resource_output = args[:exec_resource_output] if args.key?(:exec_resource_output)
|
1294
|
+
@os_policy_resource_id = args[:os_policy_resource_id] if args.key?(:os_policy_resource_id)
|
1295
|
+
@state = args[:state] if args.key?(:state)
|
1296
|
+
end
|
1297
|
+
end
|
1298
|
+
|
1299
|
+
# ExecResource specific output.
|
1300
|
+
class OsPolicyResourceComplianceExecResourceOutput
|
1301
|
+
include Google::Apis::Core::Hashable
|
1302
|
+
|
1303
|
+
# Output from Enforcement phase output file (if run). Output size is limited to
|
1304
|
+
# 100K bytes.
|
1305
|
+
# Corresponds to the JSON property `enforcementOutput`
|
1306
|
+
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
1307
|
+
# @return [String]
|
1308
|
+
attr_accessor :enforcement_output
|
1309
|
+
|
1310
|
+
def initialize(**args)
|
1311
|
+
update!(**args)
|
1312
|
+
end
|
1313
|
+
|
1314
|
+
# Update properties of this object
|
1315
|
+
def update!(**args)
|
1316
|
+
@enforcement_output = args[:enforcement_output] if args.key?(:enforcement_output)
|
1317
|
+
end
|
1318
|
+
end
|
1319
|
+
|
1320
|
+
# Step performed by the OS Config agent for configuring an `OSPolicyResource` to
|
1321
|
+
# its desired state.
|
1322
|
+
class OsPolicyResourceConfigStep
|
1323
|
+
include Google::Apis::Core::Hashable
|
1324
|
+
|
1325
|
+
# Outcome of the configuration step.
|
1326
|
+
# Corresponds to the JSON property `outcome`
|
1327
|
+
# @return [String]
|
1328
|
+
attr_accessor :outcome
|
1329
|
+
|
1330
|
+
# Configuration step type.
|
1331
|
+
# Corresponds to the JSON property `type`
|
1332
|
+
# @return [String]
|
1333
|
+
attr_accessor :type
|
1334
|
+
|
1335
|
+
def initialize(**args)
|
1336
|
+
update!(**args)
|
1337
|
+
end
|
1338
|
+
|
1339
|
+
# Update properties of this object
|
1340
|
+
def update!(**args)
|
1341
|
+
@outcome = args[:outcome] if args.key?(:outcome)
|
1342
|
+
@type = args[:type] if args.key?(:type)
|
1343
|
+
end
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
# A resource that allows executing scripts on the VM. The `ExecResource` has 2
|
1347
|
+
# stages: `validate` and `enforce` and both stages accept a script as an
|
1348
|
+
# argument to execute. When the `ExecResource` is applied by the agent, it first
|
1349
|
+
# executes the script in the `validate` stage. The `validate` stage can signal
|
1350
|
+
# that the `ExecResource` is already in the desired state by returning an exit
|
1351
|
+
# code of `100`. If the `ExecResource` is not in the desired state, it should
|
1352
|
+
# return an exit code of `101`. Any other exit code returned by this stage is
|
1353
|
+
# considered an error. If the `ExecResource` is not in the desired state based
|
1354
|
+
# on the exit code from the `validate` stage, the agent proceeds to execute the
|
1355
|
+
# script from the `enforce` stage. If the `ExecResource` is already in the
|
1356
|
+
# desired state, the `enforce` stage will not be run. Similar to `validate`
|
1357
|
+
# stage, the `enforce` stage should return an exit code of `100` to indicate
|
1358
|
+
# that the resource in now in its desired state. Any other exit code is
|
1359
|
+
# considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101`
|
1360
|
+
# vs `1`) to have an explicit indicator of `in desired state`, `not in desired
|
1361
|
+
# state` and errors. Because, for example, Powershell will always return an exit
|
1362
|
+
# code of `0` unless an `exit` statement is provided in the script. So, for
|
1363
|
+
# reasons of consistency and being explicit, exit codes `100` and `101` were
|
1364
|
+
# chosen.
|
1365
|
+
class OsPolicyResourceExecResource
|
1366
|
+
include Google::Apis::Core::Hashable
|
1367
|
+
|
1368
|
+
# A file or script to execute.
|
1369
|
+
# Corresponds to the JSON property `enforce`
|
1370
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceExecResourceExec]
|
1371
|
+
attr_accessor :enforce
|
1372
|
+
|
1373
|
+
# A file or script to execute.
|
1374
|
+
# Corresponds to the JSON property `validate`
|
1375
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceExecResourceExec]
|
1376
|
+
attr_accessor :validate
|
1377
|
+
|
1378
|
+
def initialize(**args)
|
1379
|
+
update!(**args)
|
1380
|
+
end
|
1381
|
+
|
1382
|
+
# Update properties of this object
|
1383
|
+
def update!(**args)
|
1384
|
+
@enforce = args[:enforce] if args.key?(:enforce)
|
1385
|
+
@validate = args[:validate] if args.key?(:validate)
|
1386
|
+
end
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
# A file or script to execute.
|
1390
|
+
class OsPolicyResourceExecResourceExec
|
1391
|
+
include Google::Apis::Core::Hashable
|
1392
|
+
|
1393
|
+
# Optional arguments to pass to the source during execution.
|
1394
|
+
# Corresponds to the JSON property `args`
|
1395
|
+
# @return [Array<String>]
|
1396
|
+
attr_accessor :args
|
1397
|
+
|
1398
|
+
# A remote or local file.
|
1399
|
+
# Corresponds to the JSON property `file`
|
1400
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFile]
|
1401
|
+
attr_accessor :file
|
1402
|
+
|
1403
|
+
# Required. The script interpreter to use.
|
1404
|
+
# Corresponds to the JSON property `interpreter`
|
1405
|
+
# @return [String]
|
1406
|
+
attr_accessor :interpreter
|
1407
|
+
|
1408
|
+
# Only recorded for enforce Exec. Path to an output file (that is created by
|
1409
|
+
# this Exec) whose content will be recorded in OSPolicyResourceCompliance after
|
1410
|
+
# a successful run. Absence or failure to read this file will result in this
|
1411
|
+
# ExecResource being non-compliant. Output file size is limited to 100K bytes.
|
1412
|
+
# Corresponds to the JSON property `outputFilePath`
|
1413
|
+
# @return [String]
|
1414
|
+
attr_accessor :output_file_path
|
1415
|
+
|
1416
|
+
# An inline script. The size of the script is limited to 1024 characters.
|
1417
|
+
# Corresponds to the JSON property `script`
|
1418
|
+
# @return [String]
|
1419
|
+
attr_accessor :script
|
1420
|
+
|
1421
|
+
def initialize(**args)
|
1422
|
+
update!(**args)
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
# Update properties of this object
|
1426
|
+
def update!(**args)
|
1427
|
+
@args = args[:args] if args.key?(:args)
|
1428
|
+
@file = args[:file] if args.key?(:file)
|
1429
|
+
@interpreter = args[:interpreter] if args.key?(:interpreter)
|
1430
|
+
@output_file_path = args[:output_file_path] if args.key?(:output_file_path)
|
1431
|
+
@script = args[:script] if args.key?(:script)
|
1432
|
+
end
|
1433
|
+
end
|
1434
|
+
|
1435
|
+
# A remote or local file.
|
1436
|
+
class OsPolicyResourceFile
|
1437
|
+
include Google::Apis::Core::Hashable
|
1438
|
+
|
1439
|
+
# Defaults to false. When false, files are subject to validations based on the
|
1440
|
+
# file type: Remote: A checksum must be specified. Cloud Storage: An object
|
1441
|
+
# generation number must be specified.
|
1442
|
+
# Corresponds to the JSON property `allowInsecure`
|
1443
|
+
# @return [Boolean]
|
1444
|
+
attr_accessor :allow_insecure
|
1445
|
+
alias_method :allow_insecure?, :allow_insecure
|
1446
|
+
|
1447
|
+
# Specifies a file available as a Cloud Storage Object.
|
1448
|
+
# Corresponds to the JSON property `gcs`
|
1449
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFileGcs]
|
1450
|
+
attr_accessor :gcs
|
1451
|
+
|
1452
|
+
# A local path within the VM to use.
|
1453
|
+
# Corresponds to the JSON property `localPath`
|
1454
|
+
# @return [String]
|
1455
|
+
attr_accessor :local_path
|
1456
|
+
|
1457
|
+
# Specifies a file available via some URI.
|
1458
|
+
# Corresponds to the JSON property `remote`
|
1459
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFileRemote]
|
1460
|
+
attr_accessor :remote
|
1461
|
+
|
1462
|
+
def initialize(**args)
|
1463
|
+
update!(**args)
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
# Update properties of this object
|
1467
|
+
def update!(**args)
|
1468
|
+
@allow_insecure = args[:allow_insecure] if args.key?(:allow_insecure)
|
1469
|
+
@gcs = args[:gcs] if args.key?(:gcs)
|
1470
|
+
@local_path = args[:local_path] if args.key?(:local_path)
|
1471
|
+
@remote = args[:remote] if args.key?(:remote)
|
1472
|
+
end
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
# Specifies a file available as a Cloud Storage Object.
|
1476
|
+
class OsPolicyResourceFileGcs
|
1477
|
+
include Google::Apis::Core::Hashable
|
1478
|
+
|
1479
|
+
# Required. Bucket of the Cloud Storage object.
|
1480
|
+
# Corresponds to the JSON property `bucket`
|
1481
|
+
# @return [String]
|
1482
|
+
attr_accessor :bucket
|
1483
|
+
|
1484
|
+
# Generation number of the Cloud Storage object.
|
1485
|
+
# Corresponds to the JSON property `generation`
|
1486
|
+
# @return [Fixnum]
|
1487
|
+
attr_accessor :generation
|
1488
|
+
|
1489
|
+
# Required. Name of the Cloud Storage object.
|
1490
|
+
# Corresponds to the JSON property `object`
|
1491
|
+
# @return [String]
|
1492
|
+
attr_accessor :object
|
1493
|
+
|
1494
|
+
def initialize(**args)
|
1495
|
+
update!(**args)
|
1496
|
+
end
|
1497
|
+
|
1498
|
+
# Update properties of this object
|
1499
|
+
def update!(**args)
|
1500
|
+
@bucket = args[:bucket] if args.key?(:bucket)
|
1501
|
+
@generation = args[:generation] if args.key?(:generation)
|
1502
|
+
@object = args[:object] if args.key?(:object)
|
1503
|
+
end
|
1504
|
+
end
|
1505
|
+
|
1506
|
+
# Specifies a file available via some URI.
|
1507
|
+
class OsPolicyResourceFileRemote
|
1508
|
+
include Google::Apis::Core::Hashable
|
1509
|
+
|
1510
|
+
# SHA256 checksum of the remote file.
|
1511
|
+
# Corresponds to the JSON property `sha256Checksum`
|
1512
|
+
# @return [String]
|
1513
|
+
attr_accessor :sha256_checksum
|
1514
|
+
|
1515
|
+
# Required. URI from which to fetch the object. It should contain both the
|
1516
|
+
# protocol and path following the format ``protocol`://`location``.
|
1517
|
+
# Corresponds to the JSON property `uri`
|
1518
|
+
# @return [String]
|
1519
|
+
attr_accessor :uri
|
1520
|
+
|
1521
|
+
def initialize(**args)
|
1522
|
+
update!(**args)
|
1523
|
+
end
|
1524
|
+
|
1525
|
+
# Update properties of this object
|
1526
|
+
def update!(**args)
|
1527
|
+
@sha256_checksum = args[:sha256_checksum] if args.key?(:sha256_checksum)
|
1528
|
+
@uri = args[:uri] if args.key?(:uri)
|
1529
|
+
end
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
# A resource that manages the state of a file.
|
1533
|
+
class OsPolicyResourceFileResource
|
1534
|
+
include Google::Apis::Core::Hashable
|
1535
|
+
|
1536
|
+
# A a file with this content. The size of the content is limited to 1024
|
1537
|
+
# characters.
|
1538
|
+
# Corresponds to the JSON property `content`
|
1539
|
+
# @return [String]
|
1540
|
+
attr_accessor :content
|
1541
|
+
|
1542
|
+
# A remote or local file.
|
1543
|
+
# Corresponds to the JSON property `file`
|
1544
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFile]
|
1545
|
+
attr_accessor :file
|
1546
|
+
|
1547
|
+
# Required. The absolute path of the file within the VM.
|
1548
|
+
# Corresponds to the JSON property `path`
|
1549
|
+
# @return [String]
|
1550
|
+
attr_accessor :path
|
1551
|
+
|
1552
|
+
# Consists of three octal digits which represent, in order, the permissions of
|
1553
|
+
# the owner, group, and other users for the file (similarly to the numeric mode
|
1554
|
+
# used in the linux chmod utility). Each digit represents a three bit number
|
1555
|
+
# with the 4 bit corresponding to the read permissions, the 2 bit corresponds to
|
1556
|
+
# the write bit, and the one bit corresponds to the execute permission. Default
|
1557
|
+
# behavior is 755. Below are some examples of permissions and their associated
|
1558
|
+
# values: read, write, and execute: 7 read and execute: 5 read and write: 6 read
|
1559
|
+
# only: 4
|
1560
|
+
# Corresponds to the JSON property `permissions`
|
1561
|
+
# @return [String]
|
1562
|
+
attr_accessor :permissions
|
1563
|
+
|
1564
|
+
# Required. Desired state of the file.
|
1565
|
+
# Corresponds to the JSON property `state`
|
1566
|
+
# @return [String]
|
1567
|
+
attr_accessor :state
|
1568
|
+
|
1569
|
+
def initialize(**args)
|
1570
|
+
update!(**args)
|
1571
|
+
end
|
1572
|
+
|
1573
|
+
# Update properties of this object
|
1574
|
+
def update!(**args)
|
1575
|
+
@content = args[:content] if args.key?(:content)
|
1576
|
+
@file = args[:file] if args.key?(:file)
|
1577
|
+
@path = args[:path] if args.key?(:path)
|
1578
|
+
@permissions = args[:permissions] if args.key?(:permissions)
|
1579
|
+
@state = args[:state] if args.key?(:state)
|
1580
|
+
end
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
# Resource groups provide a mechanism to group OS policy resources. Resource
|
1584
|
+
# groups enable OS policy authors to create a single OS policy to be applied to
|
1585
|
+
# VMs running different operating Systems. When the OS policy is applied to a
|
1586
|
+
# target VM, the appropriate resource group within the OS policy is selected
|
1587
|
+
# based on the `OSFilter` specified within the resource group.
|
1588
|
+
class OsPolicyResourceGroup
|
1589
|
+
include Google::Apis::Core::Hashable
|
1590
|
+
|
1591
|
+
# The `OSFilter` is used to specify the OS filtering criteria for the resource
|
1592
|
+
# group.
|
1593
|
+
# Corresponds to the JSON property `osFilter`
|
1594
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyOsFilter]
|
1595
|
+
attr_accessor :os_filter
|
1596
|
+
|
1597
|
+
# Required. List of resources configured for this resource group. The resources
|
1598
|
+
# are executed in the exact order specified here.
|
1599
|
+
# Corresponds to the JSON property `resources`
|
1600
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::OsPolicyResource>]
|
1601
|
+
attr_accessor :resources
|
1602
|
+
|
1603
|
+
def initialize(**args)
|
1604
|
+
update!(**args)
|
1605
|
+
end
|
1606
|
+
|
1607
|
+
# Update properties of this object
|
1608
|
+
def update!(**args)
|
1609
|
+
@os_filter = args[:os_filter] if args.key?(:os_filter)
|
1610
|
+
@resources = args[:resources] if args.key?(:resources)
|
1611
|
+
end
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
# A resource that manages a system package.
|
1615
|
+
class OsPolicyResourcePackageResource
|
1616
|
+
include Google::Apis::Core::Hashable
|
1617
|
+
|
1618
|
+
# A package managed by APT. - install: `apt-get update && apt-get -y install [
|
1619
|
+
# name]` - remove: `apt-get -y remove [name]`
|
1620
|
+
# Corresponds to the JSON property `apt`
|
1621
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceApt]
|
1622
|
+
attr_accessor :apt
|
1623
|
+
|
1624
|
+
# A deb package file. dpkg packages only support INSTALLED state.
|
1625
|
+
# Corresponds to the JSON property `deb`
|
1626
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceDeb]
|
1627
|
+
attr_accessor :deb
|
1628
|
+
|
1629
|
+
# Required. The desired state the agent should maintain for this package.
|
1630
|
+
# Corresponds to the JSON property `desiredState`
|
1631
|
+
# @return [String]
|
1632
|
+
attr_accessor :desired_state
|
1633
|
+
|
1634
|
+
# A package managed by GooGet. - install: `googet -noconfirm install package` -
|
1635
|
+
# remove: `googet -noconfirm remove package`
|
1636
|
+
# Corresponds to the JSON property `googet`
|
1637
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceGooGet]
|
1638
|
+
attr_accessor :googet
|
1639
|
+
|
1640
|
+
# An MSI package. MSI packages only support INSTALLED state.
|
1641
|
+
# Corresponds to the JSON property `msi`
|
1642
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceMsi]
|
1643
|
+
attr_accessor :msi
|
1644
|
+
|
1645
|
+
# An RPM package file. RPM packages only support INSTALLED state.
|
1646
|
+
# Corresponds to the JSON property `rpm`
|
1647
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceRpm]
|
1648
|
+
attr_accessor :rpm
|
1649
|
+
|
1650
|
+
# A package managed by YUM. - install: `yum -y install package` - remove: `yum -
|
1651
|
+
# y remove package`
|
1652
|
+
# Corresponds to the JSON property `yum`
|
1653
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceYum]
|
1654
|
+
attr_accessor :yum
|
1655
|
+
|
1656
|
+
# A package managed by Zypper. - install: `zypper -y install package` - remove: `
|
1657
|
+
# zypper -y rm package`
|
1658
|
+
# Corresponds to the JSON property `zypper`
|
1659
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourcePackageResourceZypper]
|
1660
|
+
attr_accessor :zypper
|
1661
|
+
|
1662
|
+
def initialize(**args)
|
1663
|
+
update!(**args)
|
1664
|
+
end
|
1665
|
+
|
1666
|
+
# Update properties of this object
|
1667
|
+
def update!(**args)
|
1668
|
+
@apt = args[:apt] if args.key?(:apt)
|
1669
|
+
@deb = args[:deb] if args.key?(:deb)
|
1670
|
+
@desired_state = args[:desired_state] if args.key?(:desired_state)
|
1671
|
+
@googet = args[:googet] if args.key?(:googet)
|
1672
|
+
@msi = args[:msi] if args.key?(:msi)
|
1673
|
+
@rpm = args[:rpm] if args.key?(:rpm)
|
1674
|
+
@yum = args[:yum] if args.key?(:yum)
|
1675
|
+
@zypper = args[:zypper] if args.key?(:zypper)
|
1676
|
+
end
|
1677
|
+
end
|
1678
|
+
|
1679
|
+
# A package managed by APT. - install: `apt-get update && apt-get -y install [
|
1680
|
+
# name]` - remove: `apt-get -y remove [name]`
|
1681
|
+
class OsPolicyResourcePackageResourceApt
|
1682
|
+
include Google::Apis::Core::Hashable
|
1683
|
+
|
1684
|
+
# Required. Package name.
|
1685
|
+
# Corresponds to the JSON property `name`
|
1686
|
+
# @return [String]
|
1687
|
+
attr_accessor :name
|
1688
|
+
|
1689
|
+
def initialize(**args)
|
1690
|
+
update!(**args)
|
1691
|
+
end
|
1692
|
+
|
1693
|
+
# Update properties of this object
|
1694
|
+
def update!(**args)
|
1695
|
+
@name = args[:name] if args.key?(:name)
|
1696
|
+
end
|
1697
|
+
end
|
1698
|
+
|
1699
|
+
# A deb package file. dpkg packages only support INSTALLED state.
|
1700
|
+
class OsPolicyResourcePackageResourceDeb
|
1701
|
+
include Google::Apis::Core::Hashable
|
1702
|
+
|
1703
|
+
# Whether dependencies should also be installed. - install when false: `dpkg -i
|
1704
|
+
# package` - install when true: `apt-get update && apt-get -y install package.
|
1705
|
+
# deb`
|
1706
|
+
# Corresponds to the JSON property `pullDeps`
|
1707
|
+
# @return [Boolean]
|
1708
|
+
attr_accessor :pull_deps
|
1709
|
+
alias_method :pull_deps?, :pull_deps
|
1710
|
+
|
1711
|
+
# A remote or local file.
|
1712
|
+
# Corresponds to the JSON property `source`
|
1713
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFile]
|
1714
|
+
attr_accessor :source
|
1715
|
+
|
1716
|
+
def initialize(**args)
|
1717
|
+
update!(**args)
|
1718
|
+
end
|
1719
|
+
|
1720
|
+
# Update properties of this object
|
1721
|
+
def update!(**args)
|
1722
|
+
@pull_deps = args[:pull_deps] if args.key?(:pull_deps)
|
1723
|
+
@source = args[:source] if args.key?(:source)
|
1724
|
+
end
|
1725
|
+
end
|
1726
|
+
|
1727
|
+
# A package managed by GooGet. - install: `googet -noconfirm install package` -
|
1728
|
+
# remove: `googet -noconfirm remove package`
|
1729
|
+
class OsPolicyResourcePackageResourceGooGet
|
1730
|
+
include Google::Apis::Core::Hashable
|
1731
|
+
|
1732
|
+
# Required. Package name.
|
1733
|
+
# Corresponds to the JSON property `name`
|
1734
|
+
# @return [String]
|
1735
|
+
attr_accessor :name
|
1736
|
+
|
1737
|
+
def initialize(**args)
|
1738
|
+
update!(**args)
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
# Update properties of this object
|
1742
|
+
def update!(**args)
|
1743
|
+
@name = args[:name] if args.key?(:name)
|
1744
|
+
end
|
1745
|
+
end
|
1746
|
+
|
1747
|
+
# An MSI package. MSI packages only support INSTALLED state.
|
1748
|
+
class OsPolicyResourcePackageResourceMsi
|
1749
|
+
include Google::Apis::Core::Hashable
|
1750
|
+
|
1751
|
+
# Additional properties to use during installation. This should be in the format
|
1752
|
+
# of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=
|
1753
|
+
# ReallySuppress`.
|
1754
|
+
# Corresponds to the JSON property `properties`
|
1755
|
+
# @return [Array<String>]
|
1756
|
+
attr_accessor :properties
|
1757
|
+
|
1758
|
+
# A remote or local file.
|
1759
|
+
# Corresponds to the JSON property `source`
|
1760
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFile]
|
1761
|
+
attr_accessor :source
|
1762
|
+
|
1763
|
+
def initialize(**args)
|
1764
|
+
update!(**args)
|
1765
|
+
end
|
1766
|
+
|
1767
|
+
# Update properties of this object
|
1768
|
+
def update!(**args)
|
1769
|
+
@properties = args[:properties] if args.key?(:properties)
|
1770
|
+
@source = args[:source] if args.key?(:source)
|
1771
|
+
end
|
1772
|
+
end
|
1773
|
+
|
1774
|
+
# An RPM package file. RPM packages only support INSTALLED state.
|
1775
|
+
class OsPolicyResourcePackageResourceRpm
|
1776
|
+
include Google::Apis::Core::Hashable
|
1777
|
+
|
1778
|
+
# Whether dependencies should also be installed. - install when false: `rpm --
|
1779
|
+
# upgrade --replacepkgs package.rpm` - install when true: `yum -y install
|
1780
|
+
# package.rpm` or `zypper -y install package.rpm`
|
1781
|
+
# Corresponds to the JSON property `pullDeps`
|
1782
|
+
# @return [Boolean]
|
1783
|
+
attr_accessor :pull_deps
|
1784
|
+
alias_method :pull_deps?, :pull_deps
|
1785
|
+
|
1786
|
+
# A remote or local file.
|
1787
|
+
# Corresponds to the JSON property `source`
|
1788
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceFile]
|
1789
|
+
attr_accessor :source
|
1790
|
+
|
1791
|
+
def initialize(**args)
|
1792
|
+
update!(**args)
|
1793
|
+
end
|
1794
|
+
|
1795
|
+
# Update properties of this object
|
1796
|
+
def update!(**args)
|
1797
|
+
@pull_deps = args[:pull_deps] if args.key?(:pull_deps)
|
1798
|
+
@source = args[:source] if args.key?(:source)
|
1799
|
+
end
|
1800
|
+
end
|
1801
|
+
|
1802
|
+
# A package managed by YUM. - install: `yum -y install package` - remove: `yum -
|
1803
|
+
# y remove package`
|
1804
|
+
class OsPolicyResourcePackageResourceYum
|
1805
|
+
include Google::Apis::Core::Hashable
|
1806
|
+
|
1807
|
+
# Required. Package name.
|
1808
|
+
# Corresponds to the JSON property `name`
|
1809
|
+
# @return [String]
|
1810
|
+
attr_accessor :name
|
1811
|
+
|
1812
|
+
def initialize(**args)
|
1813
|
+
update!(**args)
|
1814
|
+
end
|
1815
|
+
|
1816
|
+
# Update properties of this object
|
1817
|
+
def update!(**args)
|
1818
|
+
@name = args[:name] if args.key?(:name)
|
1819
|
+
end
|
1820
|
+
end
|
1821
|
+
|
1822
|
+
# A package managed by Zypper. - install: `zypper -y install package` - remove: `
|
1823
|
+
# zypper -y rm package`
|
1824
|
+
class OsPolicyResourcePackageResourceZypper
|
1825
|
+
include Google::Apis::Core::Hashable
|
1826
|
+
|
1827
|
+
# Required. Package name.
|
1828
|
+
# Corresponds to the JSON property `name`
|
1829
|
+
# @return [String]
|
1830
|
+
attr_accessor :name
|
1831
|
+
|
1832
|
+
def initialize(**args)
|
1833
|
+
update!(**args)
|
1834
|
+
end
|
1835
|
+
|
1836
|
+
# Update properties of this object
|
1837
|
+
def update!(**args)
|
1838
|
+
@name = args[:name] if args.key?(:name)
|
1839
|
+
end
|
1840
|
+
end
|
1841
|
+
|
1842
|
+
# A resource that manages a package repository.
|
1843
|
+
class OsPolicyResourceRepositoryResource
|
1844
|
+
include Google::Apis::Core::Hashable
|
1845
|
+
|
1846
|
+
# Represents a single apt package repository. These will be added to a repo file
|
1847
|
+
# that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.
|
1848
|
+
# Corresponds to the JSON property `apt`
|
1849
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceRepositoryResourceAptRepository]
|
1850
|
+
attr_accessor :apt
|
1851
|
+
|
1852
|
+
# Represents a Goo package repository. These are added to a repo file that is
|
1853
|
+
# managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
|
1854
|
+
# Corresponds to the JSON property `goo`
|
1855
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceRepositoryResourceGooRepository]
|
1856
|
+
attr_accessor :goo
|
1857
|
+
|
1858
|
+
# Represents a single yum package repository. These are added to a repo file
|
1859
|
+
# that is managed at `/etc/yum.repos.d/google_osconfig.repo`.
|
1860
|
+
# Corresponds to the JSON property `yum`
|
1861
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceRepositoryResourceYumRepository]
|
1862
|
+
attr_accessor :yum
|
1863
|
+
|
1864
|
+
# Represents a single zypper package repository. These are added to a repo file
|
1865
|
+
# that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.
|
1866
|
+
# Corresponds to the JSON property `zypper`
|
1867
|
+
# @return [Google::Apis::OsconfigV1alpha::OsPolicyResourceRepositoryResourceZypperRepository]
|
1868
|
+
attr_accessor :zypper
|
1869
|
+
|
1870
|
+
def initialize(**args)
|
1871
|
+
update!(**args)
|
1872
|
+
end
|
1873
|
+
|
1874
|
+
# Update properties of this object
|
1875
|
+
def update!(**args)
|
1876
|
+
@apt = args[:apt] if args.key?(:apt)
|
1877
|
+
@goo = args[:goo] if args.key?(:goo)
|
1878
|
+
@yum = args[:yum] if args.key?(:yum)
|
1879
|
+
@zypper = args[:zypper] if args.key?(:zypper)
|
1880
|
+
end
|
1881
|
+
end
|
1882
|
+
|
1883
|
+
# Represents a single apt package repository. These will be added to a repo file
|
1884
|
+
# that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.
|
1885
|
+
class OsPolicyResourceRepositoryResourceAptRepository
|
1886
|
+
include Google::Apis::Core::Hashable
|
1887
|
+
|
1888
|
+
# Required. Type of archive files in this repository.
|
1889
|
+
# Corresponds to the JSON property `archiveType`
|
1890
|
+
# @return [String]
|
1891
|
+
attr_accessor :archive_type
|
1892
|
+
|
1893
|
+
# Required. List of components for this repository. Must contain at least one
|
1894
|
+
# item.
|
1895
|
+
# Corresponds to the JSON property `components`
|
1896
|
+
# @return [Array<String>]
|
1897
|
+
attr_accessor :components
|
1898
|
+
|
1899
|
+
# Required. Distribution of this repository.
|
1900
|
+
# Corresponds to the JSON property `distribution`
|
1901
|
+
# @return [String]
|
1902
|
+
attr_accessor :distribution
|
1903
|
+
|
1904
|
+
# URI of the key file for this repository. The agent maintains a keyring at `/
|
1905
|
+
# etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.
|
1906
|
+
# Corresponds to the JSON property `gpgKey`
|
1907
|
+
# @return [String]
|
1908
|
+
attr_accessor :gpg_key
|
1909
|
+
|
1910
|
+
# Required. URI for this repository.
|
1911
|
+
# Corresponds to the JSON property `uri`
|
1912
|
+
# @return [String]
|
1913
|
+
attr_accessor :uri
|
1914
|
+
|
1915
|
+
def initialize(**args)
|
1916
|
+
update!(**args)
|
1917
|
+
end
|
1918
|
+
|
1919
|
+
# Update properties of this object
|
1920
|
+
def update!(**args)
|
1921
|
+
@archive_type = args[:archive_type] if args.key?(:archive_type)
|
1922
|
+
@components = args[:components] if args.key?(:components)
|
1923
|
+
@distribution = args[:distribution] if args.key?(:distribution)
|
1924
|
+
@gpg_key = args[:gpg_key] if args.key?(:gpg_key)
|
1925
|
+
@uri = args[:uri] if args.key?(:uri)
|
1926
|
+
end
|
1927
|
+
end
|
1928
|
+
|
1929
|
+
# Represents a Goo package repository. These are added to a repo file that is
|
1930
|
+
# managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.
|
1931
|
+
class OsPolicyResourceRepositoryResourceGooRepository
|
1932
|
+
include Google::Apis::Core::Hashable
|
1933
|
+
|
1934
|
+
# Required. The name of the repository.
|
1935
|
+
# Corresponds to the JSON property `name`
|
1936
|
+
# @return [String]
|
1937
|
+
attr_accessor :name
|
1938
|
+
|
1939
|
+
# Required. The url of the repository.
|
1940
|
+
# Corresponds to the JSON property `url`
|
1941
|
+
# @return [String]
|
1942
|
+
attr_accessor :url
|
1943
|
+
|
1944
|
+
def initialize(**args)
|
1945
|
+
update!(**args)
|
1946
|
+
end
|
1947
|
+
|
1948
|
+
# Update properties of this object
|
1949
|
+
def update!(**args)
|
1950
|
+
@name = args[:name] if args.key?(:name)
|
1951
|
+
@url = args[:url] if args.key?(:url)
|
1952
|
+
end
|
1953
|
+
end
|
1954
|
+
|
1955
|
+
# Represents a single yum package repository. These are added to a repo file
|
1956
|
+
# that is managed at `/etc/yum.repos.d/google_osconfig.repo`.
|
1957
|
+
class OsPolicyResourceRepositoryResourceYumRepository
|
1958
|
+
include Google::Apis::Core::Hashable
|
1959
|
+
|
1960
|
+
# Required. The location of the repository directory.
|
1961
|
+
# Corresponds to the JSON property `baseUrl`
|
1962
|
+
# @return [String]
|
1963
|
+
attr_accessor :base_url
|
1964
|
+
|
1965
|
+
# The display name of the repository.
|
1966
|
+
# Corresponds to the JSON property `displayName`
|
1967
|
+
# @return [String]
|
1968
|
+
attr_accessor :display_name
|
1969
|
+
|
1970
|
+
# URIs of GPG keys.
|
1971
|
+
# Corresponds to the JSON property `gpgKeys`
|
1972
|
+
# @return [Array<String>]
|
1973
|
+
attr_accessor :gpg_keys
|
1974
|
+
|
1975
|
+
# Required. A one word, unique name for this repository. This is the `repo id`
|
1976
|
+
# in the yum config file and also the `display_name` if `display_name` is
|
1977
|
+
# omitted. This id is also used as the unique identifier when checking for
|
1978
|
+
# resource conflicts.
|
1979
|
+
# Corresponds to the JSON property `id`
|
1980
|
+
# @return [String]
|
1981
|
+
attr_accessor :id
|
1982
|
+
|
1983
|
+
def initialize(**args)
|
1984
|
+
update!(**args)
|
1985
|
+
end
|
1986
|
+
|
1987
|
+
# Update properties of this object
|
1988
|
+
def update!(**args)
|
1989
|
+
@base_url = args[:base_url] if args.key?(:base_url)
|
1990
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
1991
|
+
@gpg_keys = args[:gpg_keys] if args.key?(:gpg_keys)
|
1992
|
+
@id = args[:id] if args.key?(:id)
|
1993
|
+
end
|
1994
|
+
end
|
1995
|
+
|
1996
|
+
# Represents a single zypper package repository. These are added to a repo file
|
1997
|
+
# that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.
|
1998
|
+
class OsPolicyResourceRepositoryResourceZypperRepository
|
1999
|
+
include Google::Apis::Core::Hashable
|
2000
|
+
|
2001
|
+
# Required. The location of the repository directory.
|
2002
|
+
# Corresponds to the JSON property `baseUrl`
|
2003
|
+
# @return [String]
|
2004
|
+
attr_accessor :base_url
|
2005
|
+
|
2006
|
+
# The display name of the repository.
|
2007
|
+
# Corresponds to the JSON property `displayName`
|
2008
|
+
# @return [String]
|
2009
|
+
attr_accessor :display_name
|
2010
|
+
|
2011
|
+
# URIs of GPG keys.
|
2012
|
+
# Corresponds to the JSON property `gpgKeys`
|
2013
|
+
# @return [Array<String>]
|
2014
|
+
attr_accessor :gpg_keys
|
2015
|
+
|
2016
|
+
# Required. A one word, unique name for this repository. This is the `repo id`
|
2017
|
+
# in the zypper config file and also the `display_name` if `display_name` is
|
2018
|
+
# omitted. This id is also used as the unique identifier when checking for
|
2019
|
+
# GuestPolicy conflicts.
|
2020
|
+
# Corresponds to the JSON property `id`
|
2021
|
+
# @return [String]
|
2022
|
+
attr_accessor :id
|
2023
|
+
|
2024
|
+
def initialize(**args)
|
2025
|
+
update!(**args)
|
2026
|
+
end
|
2027
|
+
|
2028
|
+
# Update properties of this object
|
2029
|
+
def update!(**args)
|
2030
|
+
@base_url = args[:base_url] if args.key?(:base_url)
|
2031
|
+
@display_name = args[:display_name] if args.key?(:display_name)
|
2032
|
+
@gpg_keys = args[:gpg_keys] if args.key?(:gpg_keys)
|
2033
|
+
@id = args[:id] if args.key?(:id)
|
2034
|
+
end
|
2035
|
+
end
|
2036
|
+
|
2037
|
+
# This resource represents a long-running operation that is the result of a
|
2038
|
+
# network API call.
|
2039
|
+
class Operation
|
2040
|
+
include Google::Apis::Core::Hashable
|
2041
|
+
|
2042
|
+
# If the value is `false`, it means the operation is still in progress. If `true`
|
2043
|
+
# , the operation is completed, and either `error` or `response` is available.
|
2044
|
+
# Corresponds to the JSON property `done`
|
2045
|
+
# @return [Boolean]
|
2046
|
+
attr_accessor :done
|
2047
|
+
alias_method :done?, :done
|
2048
|
+
|
2049
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2050
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
2051
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
2052
|
+
# data: error code, error message, and error details. You can find out more
|
2053
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
2054
|
+
# //cloud.google.com/apis/design/errors).
|
2055
|
+
# Corresponds to the JSON property `error`
|
2056
|
+
# @return [Google::Apis::OsconfigV1alpha::Status]
|
2057
|
+
attr_accessor :error
|
2058
|
+
|
2059
|
+
# Service-specific metadata associated with the operation. It typically contains
|
2060
|
+
# progress information and common metadata such as create time. Some services
|
2061
|
+
# might not provide such metadata. Any method that returns a long-running
|
2062
|
+
# operation should document the metadata type, if any.
|
2063
|
+
# Corresponds to the JSON property `metadata`
|
2064
|
+
# @return [Hash<String,Object>]
|
2065
|
+
attr_accessor :metadata
|
2066
|
+
|
2067
|
+
# The server-assigned name, which is only unique within the same service that
|
2068
|
+
# originally returns it. If you use the default HTTP mapping, the `name` should
|
2069
|
+
# be a resource name ending with `operations/`unique_id``.
|
2070
|
+
# Corresponds to the JSON property `name`
|
2071
|
+
# @return [String]
|
2072
|
+
attr_accessor :name
|
2073
|
+
|
2074
|
+
# The normal response of the operation in case of success. If the original
|
2075
|
+
# method returns no data on success, such as `Delete`, the response is `google.
|
2076
|
+
# protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`,
|
2077
|
+
# the response should be the resource. For other methods, the response should
|
2078
|
+
# have the type `XxxResponse`, where `Xxx` is the original method name. For
|
2079
|
+
# example, if the original method name is `TakeSnapshot()`, the inferred
|
2080
|
+
# response type is `TakeSnapshotResponse`.
|
2081
|
+
# Corresponds to the JSON property `response`
|
2082
|
+
# @return [Hash<String,Object>]
|
2083
|
+
attr_accessor :response
|
2084
|
+
|
2085
|
+
def initialize(**args)
|
2086
|
+
update!(**args)
|
2087
|
+
end
|
2088
|
+
|
2089
|
+
# Update properties of this object
|
2090
|
+
def update!(**args)
|
2091
|
+
@done = args[:done] if args.key?(:done)
|
2092
|
+
@error = args[:error] if args.key?(:error)
|
2093
|
+
@metadata = args[:metadata] if args.key?(:metadata)
|
2094
|
+
@name = args[:name] if args.key?(:name)
|
2095
|
+
@response = args[:response] if args.key?(:response)
|
2096
|
+
end
|
2097
|
+
end
|
2098
|
+
|
2099
|
+
# The `Status` type defines a logical error model that is suitable for different
|
2100
|
+
# programming environments, including REST APIs and RPC APIs. It is used by [
|
2101
|
+
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
2102
|
+
# data: error code, error message, and error details. You can find out more
|
2103
|
+
# about this error model and how to work with it in the [API Design Guide](https:
|
2104
|
+
# //cloud.google.com/apis/design/errors).
|
2105
|
+
class Status
|
2106
|
+
include Google::Apis::Core::Hashable
|
2107
|
+
|
2108
|
+
# The status code, which should be an enum value of google.rpc.Code.
|
2109
|
+
# Corresponds to the JSON property `code`
|
2110
|
+
# @return [Fixnum]
|
2111
|
+
attr_accessor :code
|
2112
|
+
|
2113
|
+
# A list of messages that carry the error details. There is a common set of
|
2114
|
+
# message types for APIs to use.
|
2115
|
+
# Corresponds to the JSON property `details`
|
2116
|
+
# @return [Array<Hash<String,Object>>]
|
2117
|
+
attr_accessor :details
|
2118
|
+
|
2119
|
+
# A developer-facing error message, which should be in English. Any user-facing
|
2120
|
+
# error message should be localized and sent in the google.rpc.Status.details
|
2121
|
+
# field, or localized by the client.
|
2122
|
+
# Corresponds to the JSON property `message`
|
2123
|
+
# @return [String]
|
2124
|
+
attr_accessor :message
|
2125
|
+
|
2126
|
+
def initialize(**args)
|
2127
|
+
update!(**args)
|
2128
|
+
end
|
2129
|
+
|
2130
|
+
# Update properties of this object
|
2131
|
+
def update!(**args)
|
2132
|
+
@code = args[:code] if args.key?(:code)
|
2133
|
+
@details = args[:details] if args.key?(:details)
|
2134
|
+
@message = args[:message] if args.key?(:message)
|
2135
|
+
end
|
2136
|
+
end
|
2137
|
+
|
2138
|
+
# This API resource represents the vulnerability report for a specified Compute
|
2139
|
+
# Engine virtual machine (VM) instance at a given point in time. For more
|
2140
|
+
# information, see [Vulnerability reports](https://cloud.google.com/compute/docs/
|
2141
|
+
# instances/os-inventory-management#vulnerability-reports).
|
2142
|
+
class VulnerabilityReport
|
2143
|
+
include Google::Apis::Core::Hashable
|
2144
|
+
|
2145
|
+
# Output only. The `vulnerabilityReport` API resource name. Format: `projects/`
|
2146
|
+
# project_number`/locations/`location`/instances/`instance_id`/
|
2147
|
+
# vulnerabilityReport`
|
2148
|
+
# Corresponds to the JSON property `name`
|
2149
|
+
# @return [String]
|
2150
|
+
attr_accessor :name
|
2151
|
+
|
2152
|
+
# Output only. The timestamp for when the last vulnerability report was
|
2153
|
+
# generated for the VM.
|
2154
|
+
# Corresponds to the JSON property `updateTime`
|
2155
|
+
# @return [String]
|
2156
|
+
attr_accessor :update_time
|
2157
|
+
|
2158
|
+
# Output only. List of vulnerabilities affecting the VM.
|
2159
|
+
# Corresponds to the JSON property `vulnerabilities`
|
2160
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::VulnerabilityReportVulnerability>]
|
2161
|
+
attr_accessor :vulnerabilities
|
2162
|
+
|
2163
|
+
def initialize(**args)
|
2164
|
+
update!(**args)
|
2165
|
+
end
|
2166
|
+
|
2167
|
+
# Update properties of this object
|
2168
|
+
def update!(**args)
|
2169
|
+
@name = args[:name] if args.key?(:name)
|
2170
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2171
|
+
@vulnerabilities = args[:vulnerabilities] if args.key?(:vulnerabilities)
|
2172
|
+
end
|
2173
|
+
end
|
2174
|
+
|
2175
|
+
# A vulnerability affecting the VM instance.
|
2176
|
+
class VulnerabilityReportVulnerability
|
2177
|
+
include Google::Apis::Core::Hashable
|
2178
|
+
|
2179
|
+
# Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the
|
2180
|
+
# vulnerability report was not updated after the VM inventory update, these
|
2181
|
+
# values might not display in VM inventory. If there is no available fix, the
|
2182
|
+
# field is empty. The `inventory_item` value specifies the latest `
|
2183
|
+
# SoftwarePackage` available to the VM that fixes the vulnerability.
|
2184
|
+
# Corresponds to the JSON property `availableInventoryItemIds`
|
2185
|
+
# @return [Array<String>]
|
2186
|
+
attr_accessor :available_inventory_item_ids
|
2187
|
+
|
2188
|
+
# The timestamp for when the vulnerability was first detected.
|
2189
|
+
# Corresponds to the JSON property `createTime`
|
2190
|
+
# @return [String]
|
2191
|
+
attr_accessor :create_time
|
2192
|
+
|
2193
|
+
# Contains metadata information for the vulnerability. This information is
|
2194
|
+
# collected from the upstream feed of the operating system.
|
2195
|
+
# Corresponds to the JSON property `details`
|
2196
|
+
# @return [Google::Apis::OsconfigV1alpha::VulnerabilityReportVulnerabilityDetails]
|
2197
|
+
attr_accessor :details
|
2198
|
+
|
2199
|
+
# Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field
|
2200
|
+
# displays the inventory items affected by this vulnerability. If the
|
2201
|
+
# vulnerability report was not updated after the VM inventory update, these
|
2202
|
+
# values might not display in VM inventory. For some distros, this field may be
|
2203
|
+
# empty.
|
2204
|
+
# Corresponds to the JSON property `installedInventoryItemIds`
|
2205
|
+
# @return [Array<String>]
|
2206
|
+
attr_accessor :installed_inventory_item_ids
|
2207
|
+
|
2208
|
+
# The timestamp for when the vulnerability was last modified.
|
2209
|
+
# Corresponds to the JSON property `updateTime`
|
2210
|
+
# @return [String]
|
2211
|
+
attr_accessor :update_time
|
2212
|
+
|
2213
|
+
def initialize(**args)
|
2214
|
+
update!(**args)
|
2215
|
+
end
|
2216
|
+
|
2217
|
+
# Update properties of this object
|
2218
|
+
def update!(**args)
|
2219
|
+
@available_inventory_item_ids = args[:available_inventory_item_ids] if args.key?(:available_inventory_item_ids)
|
2220
|
+
@create_time = args[:create_time] if args.key?(:create_time)
|
2221
|
+
@details = args[:details] if args.key?(:details)
|
2222
|
+
@installed_inventory_item_ids = args[:installed_inventory_item_ids] if args.key?(:installed_inventory_item_ids)
|
2223
|
+
@update_time = args[:update_time] if args.key?(:update_time)
|
2224
|
+
end
|
2225
|
+
end
|
2226
|
+
|
2227
|
+
# Contains metadata information for the vulnerability. This information is
|
2228
|
+
# collected from the upstream feed of the operating system.
|
2229
|
+
class VulnerabilityReportVulnerabilityDetails
|
2230
|
+
include Google::Apis::Core::Hashable
|
2231
|
+
|
2232
|
+
# The CVE of the vulnerability. CVE cannot be empty and the combination of
|
2233
|
+
# should be unique across vulnerabilities for a VM.
|
2234
|
+
# Corresponds to the JSON property `cve`
|
2235
|
+
# @return [String]
|
2236
|
+
attr_accessor :cve
|
2237
|
+
|
2238
|
+
# The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of 0 - 10
|
2239
|
+
# where 0 indicates low severity and 10 indicates high severity.
|
2240
|
+
# Corresponds to the JSON property `cvssV2Score`
|
2241
|
+
# @return [Float]
|
2242
|
+
attr_accessor :cvss_v2_score
|
2243
|
+
|
2244
|
+
# Common Vulnerability Scoring System version 3. For details, see https://www.
|
2245
|
+
# first.org/cvss/specification-document
|
2246
|
+
# Corresponds to the JSON property `cvssV3`
|
2247
|
+
# @return [Google::Apis::OsconfigV1alpha::CvsSv3]
|
2248
|
+
attr_accessor :cvss_v3
|
2249
|
+
|
2250
|
+
# The note or description describing the vulnerability from the distro.
|
2251
|
+
# Corresponds to the JSON property `description`
|
2252
|
+
# @return [String]
|
2253
|
+
attr_accessor :description
|
2254
|
+
|
2255
|
+
# Corresponds to the references attached to the `VulnerabilityDetails`.
|
2256
|
+
# Corresponds to the JSON property `references`
|
2257
|
+
# @return [Array<Google::Apis::OsconfigV1alpha::VulnerabilityReportVulnerabilityDetailsReference>]
|
2258
|
+
attr_accessor :references
|
2259
|
+
|
2260
|
+
# Assigned severity/impact ranking from the distro.
|
2261
|
+
# Corresponds to the JSON property `severity`
|
2262
|
+
# @return [String]
|
2263
|
+
attr_accessor :severity
|
2264
|
+
|
2265
|
+
def initialize(**args)
|
2266
|
+
update!(**args)
|
2267
|
+
end
|
2268
|
+
|
2269
|
+
# Update properties of this object
|
2270
|
+
def update!(**args)
|
2271
|
+
@cve = args[:cve] if args.key?(:cve)
|
2272
|
+
@cvss_v2_score = args[:cvss_v2_score] if args.key?(:cvss_v2_score)
|
2273
|
+
@cvss_v3 = args[:cvss_v3] if args.key?(:cvss_v3)
|
2274
|
+
@description = args[:description] if args.key?(:description)
|
2275
|
+
@references = args[:references] if args.key?(:references)
|
2276
|
+
@severity = args[:severity] if args.key?(:severity)
|
2277
|
+
end
|
2278
|
+
end
|
2279
|
+
|
2280
|
+
# A reference for this vulnerability.
|
2281
|
+
class VulnerabilityReportVulnerabilityDetailsReference
|
2282
|
+
include Google::Apis::Core::Hashable
|
2283
|
+
|
2284
|
+
# The url of the reference.
|
2285
|
+
# Corresponds to the JSON property `url`
|
2286
|
+
# @return [String]
|
2287
|
+
attr_accessor :url
|
2288
|
+
|
2289
|
+
def initialize(**args)
|
2290
|
+
update!(**args)
|
2291
|
+
end
|
2292
|
+
|
2293
|
+
# Update properties of this object
|
2294
|
+
def update!(**args)
|
2295
|
+
@url = args[:url] if args.key?(:url)
|
2296
|
+
end
|
2297
|
+
end
|
2298
|
+
end
|
2299
|
+
end
|
2300
|
+
end
|