blob: 2c24de6ad88c630e0253c1c2d69bca386ff10ef2 [file] [log] [blame]
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="osconfig_v1alpha.html">OS Config API</a> . <a href="osconfig_v1alpha.projects.html">projects</a> . <a href="osconfig_v1alpha.projects.locations.html">locations</a> . <a href="osconfig_v1alpha.projects.locations.osPolicyAssignments.html">osPolicyAssignments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="osconfig_v1alpha.projects.locations.osPolicyAssignments.operations.html">operations()</a></code>
79</p>
80<p class="firstline">Returns the operations Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#close">close()</a></code></p>
84<p class="firstline">Close httplib2 connections.</p>
85<p class="toc_element">
86 <code><a href="#create">create(parent, body=None, osPolicyAssignmentId=None, x__xgafv=None)</a></code></p>
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -070087<p class="firstline">Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).</p>
yoshi-code-bot227f8c92021-05-26 00:34:03 -070088<p class="toc_element">
89 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -070090<p class="firstline">Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).</p>
yoshi-code-bot227f8c92021-05-26 00:34:03 -070091<p class="toc_element">
92 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
93<p class="firstline">Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.</p>
94<p class="toc_element">
95 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
96<p class="firstline">List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.</p>
97<p class="toc_element">
98 <code><a href="#listRevisions">listRevisions(name, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
99<p class="firstline">List the OS policy assignment revisions for a given OS policy assignment.</p>
100<p class="toc_element">
101 <code><a href="#listRevisions_next">listRevisions_next(previous_request, previous_response)</a></code></p>
102<p class="firstline">Retrieves the next page of results.</p>
103<p class="toc_element">
104 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
105<p class="firstline">Retrieves the next page of results.</p>
106<p class="toc_element">
107 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700108<p class="firstline">Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).</p>
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700109<h3>Method Details</h3>
110<div class="method">
111 <code class="details" id="close">close()</code>
112 <pre>Close httplib2 connections.</pre>
113</div>
114
115<div class="method">
116 <code class="details" id="create">create(parent, body=None, osPolicyAssignmentId=None, x__xgafv=None)</code>
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700117 <pre>Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700118
119Args:
120 parent: string, Required. The parent resource name in the form: projects/{project}/locations/{location} (required)
121 body: object, The request body.
122 The object takes the form of:
123
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700124{ # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see [OS policy and OS policy assignment](/compute/docs/os-configuration-management/working-with-os-policies).
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700125 &quot;baseline&quot;: True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.
126 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
127 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
128 &quot;instanceFilter&quot;: { # Message to represent the filters to select VMs for an assignment # Required. Filter to select VMs.
129 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
130 &quot;exclusionLabels&quot;: [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. This filter is applied last in the filtering chain and therefore a VM is guaranteed to be excluded if it satisfies one of the below label sets.
131 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
132 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
133 &quot;a_key&quot;: &quot;A String&quot;,
134 },
135 },
136 ],
137 &quot;inclusionLabels&quot;: [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.
138 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
139 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
140 &quot;a_key&quot;: &quot;A String&quot;,
141 },
142 },
143 ],
144 &quot;osShortNames&quot;: [ # A VM is included if it&#x27;s OS short name matches with any of the values provided in this list.
145 &quot;A String&quot;,
146 ],
147 },
148 &quot;name&quot;: &quot;A String&quot;, # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.
149 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
150 { # An OS policy defines the desired state configuration for a VM.
151 &quot;allowNoResourceGroupMatch&quot;: True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.
152 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
153 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.
154 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
155 &quot;resourceGroups&quot;: [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`
156 { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.
157 &quot;osFilter&quot;: { # The `OSFilter` is used to specify the OS filtering criteria for the resource group. # Used to specify the OS filter for a resource group
158 &quot;osShortName&quot;: &quot;A String&quot;, # This should match OS short name emitted by the OS inventory agent. An empty value matches any OS.
159 &quot;osVersion&quot;: &quot;A String&quot;, # This value should match the version emitted by the OS inventory agent. Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*`
160 },
161 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
162 { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.
163 &quot;exec&quot;: { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource
164 &quot;enforce&quot;: { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates &quot;success&quot;, any other exit code indicates a failure running enforce.
165 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
166 &quot;A String&quot;,
167 ],
168 &quot;file&quot;: { # A remote or local file. # A remote or local file.
169 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
170 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
171 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
172 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
173 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
174 },
175 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
176 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
177 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
178 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
179 },
180 },
181 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
182 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
183 },
184 &quot;validate&quot;: { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates &quot;in desired state&quot;, and exit code of 101 indicates &quot;not in desired state&quot;. Any other exit code indicates a failure running validate.
185 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
186 &quot;A String&quot;,
187 ],
188 &quot;file&quot;: { # A remote or local file. # A remote or local file.
189 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
190 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
191 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
192 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
193 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
194 },
195 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
196 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
197 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
198 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
199 },
200 },
201 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
202 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
203 },
204 },
205 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
206 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
207 &quot;file&quot;: { # A remote or local file. # A remote or local source.
208 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
209 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
210 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
211 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
212 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
213 },
214 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
215 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
216 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
217 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
218 },
219 },
220 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
221 &quot;permissions&quot;: &quot;A String&quot;, # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
222 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
223 },
224 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.
225 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700226 &quot;apt&quot;: { # A package managed by APT. install: `apt-get update &amp;&amp; apt-get -y install [name]` remove: `apt-get -y remove [name]` # A package managed by Apt.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700227 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
228 },
229 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700230 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `dpkg -i package` install when true: `apt-get update &amp;&amp; apt-get -y install package.deb`
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700231 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
232 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
233 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
234 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
235 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
236 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
237 },
238 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
239 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
240 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
241 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
242 },
243 },
244 },
245 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700246 &quot;googet&quot;: { # A package managed by GooGet. install: `googet -noconfirm install package` remove: `googet -noconfirm remove package` # A package managed by GooGet.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700247 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
248 },
249 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700250 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of &quot;ACTION=INSTALL REBOOT=ReallySuppress&quot;.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700251 &quot;A String&quot;,
252 ],
253 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
254 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
255 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
256 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
257 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
258 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
259 },
260 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
261 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
262 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
263 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
264 },
265 },
266 },
267 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700268 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `rpm --upgrade --replacepkgs package.rpm` install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700269 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
270 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
271 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
272 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
273 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
274 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
275 },
276 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
277 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
278 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
279 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
280 },
281 },
282 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700283 &quot;yum&quot;: { # A package managed by YUM. install: `yum -y install package` remove: `yum -y remove package` # A package managed by YUM.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700284 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
285 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700286 &quot;zypper&quot;: { # A package managed by Zypper. install: `zypper -y install package` remove: `zypper -y rm package` # A package managed by Zypper.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700287 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
288 },
289 },
290 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700291 &quot;apt&quot;: { # Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list. # An Apt Repository.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700292 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
293 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
294 &quot;A String&quot;,
295 ],
296 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700297 &quot;gpgKey&quot;: &quot;A String&quot;, # URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700298 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
299 },
300 &quot;goo&quot;: { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository.
301 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
302 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
303 },
304 &quot;yum&quot;: { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository.
305 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
306 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
307 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
308 &quot;A String&quot;,
309 ],
310 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.
311 },
312 &quot;zypper&quot;: { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository.
313 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
314 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
315 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
316 &quot;A String&quot;,
317 ],
318 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.
319 },
320 },
321 },
322 ],
323 },
324 ],
325 },
326 ],
327 &quot;reconciling&quot;: True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING
328 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
329 &quot;revisionId&quot;: &quot;A String&quot;, # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
330 &quot;rollout&quot;: { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted.
331 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment.
332 &quot;fixed&quot;: 42, # Specifies a fixed value.
333 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
334 },
335 &quot;minWaitDuration&quot;: &quot;A String&quot;, # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.
336 },
337 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
338 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
339}
340
341 osPolicyAssignmentId: string, Required. The logical name of the OS policy assignment in the project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.
342 x__xgafv: string, V1 error format.
343 Allowed values
344 1 - v1 error format
345 2 - v2 error format
346
347Returns:
348 An object of the form:
349
350 { # This resource represents a long-running operation that is the result of a network API call.
351 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
352 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
353 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
354 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
355 {
356 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
357 },
358 ],
359 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
360 },
361 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
362 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
363 },
364 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
365 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
366 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
367 },
368}</pre>
369</div>
370
371<div class="method">
372 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700373 <pre>Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700374
375Args:
376 name: string, Required. The name of the OS policy assignment to be deleted (required)
377 x__xgafv: string, V1 error format.
378 Allowed values
379 1 - v1 error format
380 2 - v2 error format
381
382Returns:
383 An object of the form:
384
385 { # This resource represents a long-running operation that is the result of a network API call.
386 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
387 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
388 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
389 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
390 {
391 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
392 },
393 ],
394 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
395 },
396 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
397 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
398 },
399 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
400 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
401 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
402 },
403}</pre>
404</div>
405
406<div class="method">
407 <code class="details" id="get">get(name, x__xgafv=None)</code>
408 <pre>Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.
409
410Args:
411 name: string, Required. The resource name of OS policy assignment. Format: `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` (required)
412 x__xgafv: string, V1 error format.
413 Allowed values
414 1 - v1 error format
415 2 - v2 error format
416
417Returns:
418 An object of the form:
419
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700420 { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see [OS policy and OS policy assignment](/compute/docs/os-configuration-management/working-with-os-policies).
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700421 &quot;baseline&quot;: True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.
422 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
423 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
424 &quot;instanceFilter&quot;: { # Message to represent the filters to select VMs for an assignment # Required. Filter to select VMs.
425 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
426 &quot;exclusionLabels&quot;: [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. This filter is applied last in the filtering chain and therefore a VM is guaranteed to be excluded if it satisfies one of the below label sets.
427 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
428 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
429 &quot;a_key&quot;: &quot;A String&quot;,
430 },
431 },
432 ],
433 &quot;inclusionLabels&quot;: [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.
434 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
435 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
436 &quot;a_key&quot;: &quot;A String&quot;,
437 },
438 },
439 ],
440 &quot;osShortNames&quot;: [ # A VM is included if it&#x27;s OS short name matches with any of the values provided in this list.
441 &quot;A String&quot;,
442 ],
443 },
444 &quot;name&quot;: &quot;A String&quot;, # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.
445 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
446 { # An OS policy defines the desired state configuration for a VM.
447 &quot;allowNoResourceGroupMatch&quot;: True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.
448 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
449 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.
450 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
451 &quot;resourceGroups&quot;: [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`
452 { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.
453 &quot;osFilter&quot;: { # The `OSFilter` is used to specify the OS filtering criteria for the resource group. # Used to specify the OS filter for a resource group
454 &quot;osShortName&quot;: &quot;A String&quot;, # This should match OS short name emitted by the OS inventory agent. An empty value matches any OS.
455 &quot;osVersion&quot;: &quot;A String&quot;, # This value should match the version emitted by the OS inventory agent. Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*`
456 },
457 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
458 { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.
459 &quot;exec&quot;: { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource
460 &quot;enforce&quot;: { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates &quot;success&quot;, any other exit code indicates a failure running enforce.
461 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
462 &quot;A String&quot;,
463 ],
464 &quot;file&quot;: { # A remote or local file. # A remote or local file.
465 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
466 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
467 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
468 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
469 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
470 },
471 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
472 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
473 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
474 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
475 },
476 },
477 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
478 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
479 },
480 &quot;validate&quot;: { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates &quot;in desired state&quot;, and exit code of 101 indicates &quot;not in desired state&quot;. Any other exit code indicates a failure running validate.
481 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
482 &quot;A String&quot;,
483 ],
484 &quot;file&quot;: { # A remote or local file. # A remote or local file.
485 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
486 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
487 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
488 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
489 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
490 },
491 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
492 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
493 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
494 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
495 },
496 },
497 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
498 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
499 },
500 },
501 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
502 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
503 &quot;file&quot;: { # A remote or local file. # A remote or local source.
504 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
505 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
506 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
507 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
508 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
509 },
510 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
511 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
512 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
513 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
514 },
515 },
516 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
517 &quot;permissions&quot;: &quot;A String&quot;, # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
518 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
519 },
520 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.
521 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700522 &quot;apt&quot;: { # A package managed by APT. install: `apt-get update &amp;&amp; apt-get -y install [name]` remove: `apt-get -y remove [name]` # A package managed by Apt.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700523 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
524 },
525 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700526 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `dpkg -i package` install when true: `apt-get update &amp;&amp; apt-get -y install package.deb`
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700527 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
528 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
529 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
530 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
531 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
532 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
533 },
534 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
535 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
536 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
537 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
538 },
539 },
540 },
541 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700542 &quot;googet&quot;: { # A package managed by GooGet. install: `googet -noconfirm install package` remove: `googet -noconfirm remove package` # A package managed by GooGet.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700543 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
544 },
545 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700546 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of &quot;ACTION=INSTALL REBOOT=ReallySuppress&quot;.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700547 &quot;A String&quot;,
548 ],
549 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
550 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
551 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
552 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
553 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
554 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
555 },
556 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
557 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
558 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
559 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
560 },
561 },
562 },
563 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700564 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `rpm --upgrade --replacepkgs package.rpm` install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700565 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
566 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
567 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
568 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
569 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
570 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
571 },
572 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
573 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
574 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
575 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
576 },
577 },
578 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700579 &quot;yum&quot;: { # A package managed by YUM. install: `yum -y install package` remove: `yum -y remove package` # A package managed by YUM.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700580 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
581 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700582 &quot;zypper&quot;: { # A package managed by Zypper. install: `zypper -y install package` remove: `zypper -y rm package` # A package managed by Zypper.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700583 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
584 },
585 },
586 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700587 &quot;apt&quot;: { # Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list. # An Apt Repository.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700588 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
589 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
590 &quot;A String&quot;,
591 ],
592 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700593 &quot;gpgKey&quot;: &quot;A String&quot;, # URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700594 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
595 },
596 &quot;goo&quot;: { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository.
597 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
598 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
599 },
600 &quot;yum&quot;: { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository.
601 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
602 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
603 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
604 &quot;A String&quot;,
605 ],
606 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.
607 },
608 &quot;zypper&quot;: { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository.
609 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
610 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
611 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
612 &quot;A String&quot;,
613 ],
614 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.
615 },
616 },
617 },
618 ],
619 },
620 ],
621 },
622 ],
623 &quot;reconciling&quot;: True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING
624 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
625 &quot;revisionId&quot;: &quot;A String&quot;, # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
626 &quot;rollout&quot;: { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted.
627 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment.
628 &quot;fixed&quot;: 42, # Specifies a fixed value.
629 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
630 },
631 &quot;minWaitDuration&quot;: &quot;A String&quot;, # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.
632 },
633 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
634 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
635}</pre>
636</div>
637
638<div class="method">
639 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
640 <pre>List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.
641
642Args:
643 parent: string, Required. The parent resource name. (required)
644 pageSize: integer, The maximum number of assignments to return.
645 pageToken: string, A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where this listing should continue from.
646 x__xgafv: string, V1 error format.
647 Allowed values
648 1 - v1 error format
649 2 - v2 error format
650
651Returns:
652 An object of the form:
653
654 { # A response message for listing all assignments under given parent.
655 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token to retrieve the next page of OS policy assignments.
656 &quot;osPolicyAssignments&quot;: [ # The list of assignments
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700657 { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see [OS policy and OS policy assignment](/compute/docs/os-configuration-management/working-with-os-policies).
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700658 &quot;baseline&quot;: True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.
659 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
660 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
661 &quot;instanceFilter&quot;: { # Message to represent the filters to select VMs for an assignment # Required. Filter to select VMs.
662 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
663 &quot;exclusionLabels&quot;: [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. This filter is applied last in the filtering chain and therefore a VM is guaranteed to be excluded if it satisfies one of the below label sets.
664 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
665 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
666 &quot;a_key&quot;: &quot;A String&quot;,
667 },
668 },
669 ],
670 &quot;inclusionLabels&quot;: [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.
671 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
672 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
673 &quot;a_key&quot;: &quot;A String&quot;,
674 },
675 },
676 ],
677 &quot;osShortNames&quot;: [ # A VM is included if it&#x27;s OS short name matches with any of the values provided in this list.
678 &quot;A String&quot;,
679 ],
680 },
681 &quot;name&quot;: &quot;A String&quot;, # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.
682 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
683 { # An OS policy defines the desired state configuration for a VM.
684 &quot;allowNoResourceGroupMatch&quot;: True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.
685 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
686 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.
687 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
688 &quot;resourceGroups&quot;: [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`
689 { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.
690 &quot;osFilter&quot;: { # The `OSFilter` is used to specify the OS filtering criteria for the resource group. # Used to specify the OS filter for a resource group
691 &quot;osShortName&quot;: &quot;A String&quot;, # This should match OS short name emitted by the OS inventory agent. An empty value matches any OS.
692 &quot;osVersion&quot;: &quot;A String&quot;, # This value should match the version emitted by the OS inventory agent. Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*`
693 },
694 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
695 { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.
696 &quot;exec&quot;: { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource
697 &quot;enforce&quot;: { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates &quot;success&quot;, any other exit code indicates a failure running enforce.
698 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
699 &quot;A String&quot;,
700 ],
701 &quot;file&quot;: { # A remote or local file. # A remote or local file.
702 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
703 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
704 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
705 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
706 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
707 },
708 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
709 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
710 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
711 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
712 },
713 },
714 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
715 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
716 },
717 &quot;validate&quot;: { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates &quot;in desired state&quot;, and exit code of 101 indicates &quot;not in desired state&quot;. Any other exit code indicates a failure running validate.
718 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
719 &quot;A String&quot;,
720 ],
721 &quot;file&quot;: { # A remote or local file. # A remote or local file.
722 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
723 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
724 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
725 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
726 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
727 },
728 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
729 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
730 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
731 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
732 },
733 },
734 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
735 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
736 },
737 },
738 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
739 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
740 &quot;file&quot;: { # A remote or local file. # A remote or local source.
741 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
742 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
743 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
744 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
745 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
746 },
747 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
748 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
749 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
750 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
751 },
752 },
753 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
754 &quot;permissions&quot;: &quot;A String&quot;, # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
755 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
756 },
757 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.
758 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700759 &quot;apt&quot;: { # A package managed by APT. install: `apt-get update &amp;&amp; apt-get -y install [name]` remove: `apt-get -y remove [name]` # A package managed by Apt.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700760 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
761 },
762 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700763 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `dpkg -i package` install when true: `apt-get update &amp;&amp; apt-get -y install package.deb`
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700764 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
765 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
766 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
767 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
768 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
769 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
770 },
771 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
772 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
773 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
774 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
775 },
776 },
777 },
778 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700779 &quot;googet&quot;: { # A package managed by GooGet. install: `googet -noconfirm install package` remove: `googet -noconfirm remove package` # A package managed by GooGet.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700780 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
781 },
782 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700783 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of &quot;ACTION=INSTALL REBOOT=ReallySuppress&quot;.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700784 &quot;A String&quot;,
785 ],
786 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
787 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
788 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
789 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
790 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
791 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
792 },
793 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
794 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
795 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
796 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
797 },
798 },
799 },
800 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700801 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `rpm --upgrade --replacepkgs package.rpm` install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700802 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
803 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
804 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
805 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
806 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
807 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
808 },
809 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
810 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
811 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
812 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
813 },
814 },
815 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700816 &quot;yum&quot;: { # A package managed by YUM. install: `yum -y install package` remove: `yum -y remove package` # A package managed by YUM.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700817 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
818 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700819 &quot;zypper&quot;: { # A package managed by Zypper. install: `zypper -y install package` remove: `zypper -y rm package` # A package managed by Zypper.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700820 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
821 },
822 },
823 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700824 &quot;apt&quot;: { # Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list. # An Apt Repository.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700825 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
826 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
827 &quot;A String&quot;,
828 ],
829 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700830 &quot;gpgKey&quot;: &quot;A String&quot;, # URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700831 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
832 },
833 &quot;goo&quot;: { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository.
834 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
835 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
836 },
837 &quot;yum&quot;: { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository.
838 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
839 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
840 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
841 &quot;A String&quot;,
842 ],
843 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.
844 },
845 &quot;zypper&quot;: { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository.
846 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
847 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
848 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
849 &quot;A String&quot;,
850 ],
851 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.
852 },
853 },
854 },
855 ],
856 },
857 ],
858 },
859 ],
860 &quot;reconciling&quot;: True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING
861 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
862 &quot;revisionId&quot;: &quot;A String&quot;, # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
863 &quot;rollout&quot;: { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted.
864 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment.
865 &quot;fixed&quot;: 42, # Specifies a fixed value.
866 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
867 },
868 &quot;minWaitDuration&quot;: &quot;A String&quot;, # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.
869 },
870 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
871 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
872 },
873 ],
874}</pre>
875</div>
876
877<div class="method">
878 <code class="details" id="listRevisions">listRevisions(name, pageSize=None, pageToken=None, x__xgafv=None)</code>
879 <pre>List the OS policy assignment revisions for a given OS policy assignment.
880
881Args:
882 name: string, Required. The name of the OS policy assignment to list revisions for. (required)
883 pageSize: integer, The maximum number of revisions to return.
884 pageToken: string, A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that indicates where this listing should continue from.
885 x__xgafv: string, V1 error format.
886 Allowed values
887 1 - v1 error format
888 2 - v2 error format
889
890Returns:
891 An object of the form:
892
893 { # A response message for listing all revisions for a OS policy assignment.
894 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token to retrieve the next page of OS policy assignment revisions.
895 &quot;osPolicyAssignments&quot;: [ # The OS policy assignment revisions
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700896 { # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see [OS policy and OS policy assignment](/compute/docs/os-configuration-management/working-with-os-policies).
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700897 &quot;baseline&quot;: True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.
898 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
899 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
900 &quot;instanceFilter&quot;: { # Message to represent the filters to select VMs for an assignment # Required. Filter to select VMs.
901 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
902 &quot;exclusionLabels&quot;: [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. This filter is applied last in the filtering chain and therefore a VM is guaranteed to be excluded if it satisfies one of the below label sets.
903 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
904 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
905 &quot;a_key&quot;: &quot;A String&quot;,
906 },
907 },
908 ],
909 &quot;inclusionLabels&quot;: [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.
910 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
911 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
912 &quot;a_key&quot;: &quot;A String&quot;,
913 },
914 },
915 ],
916 &quot;osShortNames&quot;: [ # A VM is included if it&#x27;s OS short name matches with any of the values provided in this list.
917 &quot;A String&quot;,
918 ],
919 },
920 &quot;name&quot;: &quot;A String&quot;, # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.
921 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
922 { # An OS policy defines the desired state configuration for a VM.
923 &quot;allowNoResourceGroupMatch&quot;: True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.
924 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
925 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.
926 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
927 &quot;resourceGroups&quot;: [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`
928 { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.
929 &quot;osFilter&quot;: { # The `OSFilter` is used to specify the OS filtering criteria for the resource group. # Used to specify the OS filter for a resource group
930 &quot;osShortName&quot;: &quot;A String&quot;, # This should match OS short name emitted by the OS inventory agent. An empty value matches any OS.
931 &quot;osVersion&quot;: &quot;A String&quot;, # This value should match the version emitted by the OS inventory agent. Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*`
932 },
933 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
934 { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.
935 &quot;exec&quot;: { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource
936 &quot;enforce&quot;: { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates &quot;success&quot;, any other exit code indicates a failure running enforce.
937 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
938 &quot;A String&quot;,
939 ],
940 &quot;file&quot;: { # A remote or local file. # A remote or local file.
941 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
942 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
943 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
944 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
945 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
946 },
947 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
948 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
949 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
950 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
951 },
952 },
953 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
954 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
955 },
956 &quot;validate&quot;: { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates &quot;in desired state&quot;, and exit code of 101 indicates &quot;not in desired state&quot;. Any other exit code indicates a failure running validate.
957 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
958 &quot;A String&quot;,
959 ],
960 &quot;file&quot;: { # A remote or local file. # A remote or local file.
961 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
962 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
963 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
964 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
965 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
966 },
967 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
968 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
969 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
970 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
971 },
972 },
973 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
974 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
975 },
976 },
977 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
978 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
979 &quot;file&quot;: { # A remote or local file. # A remote or local source.
980 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
981 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
982 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
983 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
984 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
985 },
986 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
987 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
988 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
989 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
990 },
991 },
992 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
993 &quot;permissions&quot;: &quot;A String&quot;, # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
994 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
995 },
996 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.
997 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -0700998 &quot;apt&quot;: { # A package managed by APT. install: `apt-get update &amp;&amp; apt-get -y install [name]` remove: `apt-get -y remove [name]` # A package managed by Apt.
yoshi-code-bot227f8c92021-05-26 00:34:03 -0700999 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1000 },
1001 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001002 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `dpkg -i package` install when true: `apt-get update &amp;&amp; apt-get -y install package.deb`
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001003 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
1004 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1005 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1006 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1007 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1008 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1009 },
1010 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1011 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1012 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1013 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1014 },
1015 },
1016 },
1017 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001018 &quot;googet&quot;: { # A package managed by GooGet. install: `googet -noconfirm install package` remove: `googet -noconfirm remove package` # A package managed by GooGet.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001019 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1020 },
1021 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001022 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of &quot;ACTION=INSTALL REBOOT=ReallySuppress&quot;.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001023 &quot;A String&quot;,
1024 ],
1025 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
1026 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1027 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1028 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1029 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1030 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1031 },
1032 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1033 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1034 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1035 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1036 },
1037 },
1038 },
1039 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001040 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `rpm --upgrade --replacepkgs package.rpm` install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001041 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
1042 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1043 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1044 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1045 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1046 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1047 },
1048 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1049 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1050 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1051 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1052 },
1053 },
1054 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001055 &quot;yum&quot;: { # A package managed by YUM. install: `yum -y install package` remove: `yum -y remove package` # A package managed by YUM.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001056 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1057 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001058 &quot;zypper&quot;: { # A package managed by Zypper. install: `zypper -y install package` remove: `zypper -y rm package` # A package managed by Zypper.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001059 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1060 },
1061 },
1062 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001063 &quot;apt&quot;: { # Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list. # An Apt Repository.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001064 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
1065 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
1066 &quot;A String&quot;,
1067 ],
1068 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001069 &quot;gpgKey&quot;: &quot;A String&quot;, # URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001070 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
1071 },
1072 &quot;goo&quot;: { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository.
1073 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
1074 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
1075 },
1076 &quot;yum&quot;: { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository.
1077 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1078 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1079 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1080 &quot;A String&quot;,
1081 ],
1082 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.
1083 },
1084 &quot;zypper&quot;: { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository.
1085 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1086 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1087 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1088 &quot;A String&quot;,
1089 ],
1090 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.
1091 },
1092 },
1093 },
1094 ],
1095 },
1096 ],
1097 },
1098 ],
1099 &quot;reconciling&quot;: True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING
1100 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
1101 &quot;revisionId&quot;: &quot;A String&quot;, # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
1102 &quot;rollout&quot;: { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted.
1103 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment.
1104 &quot;fixed&quot;: 42, # Specifies a fixed value.
1105 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
1106 },
1107 &quot;minWaitDuration&quot;: &quot;A String&quot;, # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.
1108 },
1109 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
1110 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
1111 },
1112 ],
1113}</pre>
1114</div>
1115
1116<div class="method">
1117 <code class="details" id="listRevisions_next">listRevisions_next(previous_request, previous_response)</code>
1118 <pre>Retrieves the next page of results.
1119
1120Args:
1121 previous_request: The request for the previous page. (required)
1122 previous_response: The response from the request for the previous page. (required)
1123
1124Returns:
1125 A request object that you can call &#x27;execute()&#x27; on to request the next
1126 page. Returns None if there are no more items in the collection.
1127 </pre>
1128</div>
1129
1130<div class="method">
1131 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1132 <pre>Retrieves the next page of results.
1133
1134Args:
1135 previous_request: The request for the previous page. (required)
1136 previous_response: The response from the request for the previous page. (required)
1137
1138Returns:
1139 A request object that you can call &#x27;execute()&#x27; on to request the next
1140 page. Returns None if there are no more items in the collection.
1141 </pre>
1142</div>
1143
1144<div class="method">
1145 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001146 <pre>Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001147
1148Args:
1149 name: string, Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment. (required)
1150 body: object, The request body.
1151 The object takes the form of:
1152
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001153{ # OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see [OS policy and OS policy assignment](/compute/docs/os-configuration-management/working-with-os-policies).
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001154 &quot;baseline&quot;: True or False, # Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.
1155 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
1156 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
1157 &quot;instanceFilter&quot;: { # Message to represent the filters to select VMs for an assignment # Required. Filter to select VMs.
1158 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
1159 &quot;exclusionLabels&quot;: [ # List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM. This filter is applied last in the filtering chain and therefore a VM is guaranteed to be excluded if it satisfies one of the below label sets.
1160 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
1161 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
1162 &quot;a_key&quot;: &quot;A String&quot;,
1163 },
1164 },
1165 ],
1166 &quot;inclusionLabels&quot;: [ # List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.
1167 { # Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.
1168 &quot;labels&quot;: { # Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.
1169 &quot;a_key&quot;: &quot;A String&quot;,
1170 },
1171 },
1172 ],
1173 &quot;osShortNames&quot;: [ # A VM is included if it&#x27;s OS short name matches with any of the values provided in this list.
1174 &quot;A String&quot;,
1175 ],
1176 },
1177 &quot;name&quot;: &quot;A String&quot;, # Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.
1178 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
1179 { # An OS policy defines the desired state configuration for a VM.
1180 &quot;allowNoResourceGroupMatch&quot;: True or False, # This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.
1181 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
1182 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.
1183 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
1184 &quot;resourceGroups&quot;: [ # Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`
1185 { # Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.
1186 &quot;osFilter&quot;: { # The `OSFilter` is used to specify the OS filtering criteria for the resource group. # Used to specify the OS filter for a resource group
1187 &quot;osShortName&quot;: &quot;A String&quot;, # This should match OS short name emitted by the OS inventory agent. An empty value matches any OS.
1188 &quot;osVersion&quot;: &quot;A String&quot;, # This value should match the version emitted by the OS inventory agent. Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*`
1189 },
1190 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
1191 { # An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.
1192 &quot;exec&quot;: { # A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen. # Exec resource
1193 &quot;enforce&quot;: { # A file or script to execute. # What to run to bring this resource into the desired state. An exit code of 100 indicates &quot;success&quot;, any other exit code indicates a failure running enforce.
1194 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
1195 &quot;A String&quot;,
1196 ],
1197 &quot;file&quot;: { # A remote or local file. # A remote or local file.
1198 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1199 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1200 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1201 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1202 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1203 },
1204 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1205 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1206 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1207 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1208 },
1209 },
1210 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
1211 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
1212 },
1213 &quot;validate&quot;: { # A file or script to execute. # Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates &quot;in desired state&quot;, and exit code of 101 indicates &quot;not in desired state&quot;. Any other exit code indicates a failure running validate.
1214 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
1215 &quot;A String&quot;,
1216 ],
1217 &quot;file&quot;: { # A remote or local file. # A remote or local file.
1218 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1219 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1220 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1221 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1222 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1223 },
1224 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1225 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1226 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1227 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1228 },
1229 },
1230 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
1231 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
1232 },
1233 },
1234 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
1235 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
1236 &quot;file&quot;: { # A remote or local file. # A remote or local source.
1237 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1238 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1239 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1240 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1241 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1242 },
1243 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1244 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1245 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1246 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1247 },
1248 },
1249 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
1250 &quot;permissions&quot;: &quot;A String&quot;, # Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4
1251 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
1252 },
1253 &quot;id&quot;: &quot;A String&quot;, # Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.
1254 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001255 &quot;apt&quot;: { # A package managed by APT. install: `apt-get update &amp;&amp; apt-get -y install [name]` remove: `apt-get -y remove [name]` # A package managed by Apt.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001256 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1257 },
1258 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001259 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `dpkg -i package` install when true: `apt-get update &amp;&amp; apt-get -y install package.deb`
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001260 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
1261 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1262 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1263 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1264 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1265 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1266 },
1267 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1268 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1269 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1270 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1271 },
1272 },
1273 },
1274 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001275 &quot;googet&quot;: { # A package managed by GooGet. install: `googet -noconfirm install package` remove: `googet -noconfirm remove package` # A package managed by GooGet.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001276 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1277 },
1278 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001279 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of &quot;ACTION=INSTALL REBOOT=ReallySuppress&quot;.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001280 &quot;A String&quot;,
1281 ],
1282 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
1283 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1284 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1285 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1286 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1287 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1288 },
1289 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1290 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1291 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1292 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1293 },
1294 },
1295 },
1296 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001297 &quot;pullDeps&quot;: True or False, # Whether dependencies should also be installed. install when false: `rpm --upgrade --replacepkgs package.rpm` install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001298 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
1299 &quot;allowInsecure&quot;: True or False, # Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.
1300 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1301 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1302 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1303 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1304 },
1305 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1306 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1307 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1308 &quot;uri&quot;: &quot;A String&quot;, # Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.
1309 },
1310 },
1311 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001312 &quot;yum&quot;: { # A package managed by YUM. install: `yum -y install package` remove: `yum -y remove package` # A package managed by YUM.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001313 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1314 },
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001315 &quot;zypper&quot;: { # A package managed by Zypper. install: `zypper -y install package` remove: `zypper -y rm package` # A package managed by Zypper.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001316 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1317 },
1318 },
1319 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001320 &quot;apt&quot;: { # Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list. # An Apt Repository.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001321 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
1322 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
1323 &quot;A String&quot;,
1324 ],
1325 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
yoshi-code-bot50e1b7a2021-06-03 00:48:27 -07001326 &quot;gpgKey&quot;: &quot;A String&quot;, # URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.
yoshi-code-bot227f8c92021-05-26 00:34:03 -07001327 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
1328 },
1329 &quot;goo&quot;: { # Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`. # A Goo Repository.
1330 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
1331 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
1332 },
1333 &quot;yum&quot;: { # Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`. # A Yum Repository.
1334 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1335 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1336 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1337 &quot;A String&quot;,
1338 ],
1339 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.
1340 },
1341 &quot;zypper&quot;: { # Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`. # A Zypper Repository.
1342 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1343 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1344 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1345 &quot;A String&quot;,
1346 ],
1347 &quot;id&quot;: &quot;A String&quot;, # Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.
1348 },
1349 },
1350 },
1351 ],
1352 },
1353 ],
1354 },
1355 ],
1356 &quot;reconciling&quot;: True or False, # Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING
1357 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
1358 &quot;revisionId&quot;: &quot;A String&quot;, # Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment
1359 &quot;rollout&quot;: { # Message to configure the rollout at the zonal level for the OS policy assignment. # Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted.
1360 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment.
1361 &quot;fixed&quot;: 42, # Specifies a fixed value.
1362 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
1363 },
1364 &quot;minWaitDuration&quot;: &quot;A String&quot;, # Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.
1365 },
1366 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
1367 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
1368}
1369
1370 updateMask: string, Optional. Field mask that controls which fields of the assignment should be updated.
1371 x__xgafv: string, V1 error format.
1372 Allowed values
1373 1 - v1 error format
1374 2 - v2 error format
1375
1376Returns:
1377 An object of the form:
1378
1379 { # This resource represents a long-running operation that is the result of a network API call.
1380 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
1381 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
1382 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1383 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1384 {
1385 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1386 },
1387 ],
1388 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
1389 },
1390 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
1391 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1392 },
1393 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
1394 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
1395 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1396 },
1397}</pre>
1398</div>
1399
1400</body></html>