blob: f4d99c2ea75648f80a172ed21f4412bdef57d5b4 [file] [log] [blame]
yoshi-code-bot312da312021-09-21 00:22:28 -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_v1.html">OS Config API</a> . <a href="osconfig_v1.projects.html">projects</a> . <a href="osconfig_v1.projects.locations.html">locations</a> . <a href="osconfig_v1.projects.locations.osPolicyAssignments.html">osPolicyAssignments</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81 <code><a href="#create">create(parent, body=None, osPolicyAssignmentId=None, x__xgafv=None)</a></code></p>
82<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](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).</p>
83<p class="toc_element">
84 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85<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](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).</p>
86<p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88<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>
89<p class="toc_element">
90 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91<p class="firstline">List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.</p>
92<p class="toc_element">
93 <code><a href="#listRevisions">listRevisions(name, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
94<p class="firstline">List the OS policy assignment revisions for a given OS policy assignment.</p>
95<p class="toc_element">
96 <code><a href="#listRevisions_next">listRevisions_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</p>
101<p class="toc_element">
102 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
103<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](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).</p>
104<h3>Method Details</h3>
105<div class="method">
106 <code class="details" id="close">close()</code>
107 <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
111 <code class="details" id="create">create(parent, body=None, osPolicyAssignmentId=None, x__xgafv=None)</code>
112 <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](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
113
114Args:
115 parent: string, Required. The parent resource name in the form: projects/{project}/locations/{location} (required)
116 body: object, The request body.
117 The object takes the form of:
118
119{ # 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](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
120 &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.
121 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
122 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
123 &quot;etag&quot;: &quot;A String&quot;, # The etag for this OS policy assignment. If this is provided on update, it must match the server&#x27;s etag.
124 &quot;instanceFilter&quot;: { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs.
125 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
126 &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.
127 { # 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.
128 &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.
129 &quot;a_key&quot;: &quot;A String&quot;,
130 },
131 },
132 ],
133 &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.
134 { # 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.
135 &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.
136 &quot;a_key&quot;: &quot;A String&quot;,
137 },
138 },
139 ],
140 &quot;inventories&quot;: [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.
141 { # VM inventory details.
142 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
143 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
144 },
145 ],
146 },
147 &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.
148 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
149 { # An OS policy defines the desired state configuration for a VM.
150 &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.
151 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
152 &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.
153 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
154 &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`
155 { # 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.
156 &quot;inventoryFilters&quot;: [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name=&#x27;rhel&#x27; and inventory_filters[1].os_short_name=&#x27;centos&#x27; If the list is empty, this resource group will be applied to the target VM unconditionally.
157 { # Filtering criteria to select VMs based on inventory details.
158 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
159 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
160 },
161 ],
162 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
163 { # 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.
164 &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
165 &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.
166 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
167 &quot;A String&quot;,
168 ],
169 &quot;file&quot;: { # A remote or local file. # A remote or local file.
170 &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.
171 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
172 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
173 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
174 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
175 },
176 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
177 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
178 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
179 &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}`.
180 },
181 },
182 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
183 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
184 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
185 },
186 &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.
187 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
188 &quot;A String&quot;,
189 ],
190 &quot;file&quot;: { # A remote or local file. # A remote or local file.
191 &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.
192 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
193 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
194 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
195 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
196 },
197 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
198 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
199 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
200 &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}`.
201 },
202 },
203 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
204 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
205 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
206 },
207 },
208 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
209 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
210 &quot;file&quot;: { # A remote or local file. # A remote or local source.
211 &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.
212 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
213 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
214 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
215 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
216 },
217 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
218 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
219 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
220 &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}`.
221 },
222 },
223 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
224 &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
225 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
226 },
227 &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.
228 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
229 &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.
230 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
231 },
232 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
233 &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`
234 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
235 &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.
236 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
237 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
238 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
239 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
240 },
241 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
242 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
243 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
244 &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}`.
245 },
246 },
247 },
248 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
249 &quot;googet&quot;: { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet.
250 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
251 },
252 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
253 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.
254 &quot;A String&quot;,
255 ],
256 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
257 &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.
258 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
259 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
260 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
261 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
262 },
263 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
264 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
265 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
266 &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}`.
267 },
268 },
269 },
270 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
271 &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`
272 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
273 &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.
274 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
275 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
276 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
277 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
278 },
279 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
280 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
281 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
282 &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}`.
283 },
284 },
285 },
286 &quot;yum&quot;: { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM.
287 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
288 },
289 &quot;zypper&quot;: { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper.
290 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
291 },
292 },
293 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
294 &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.
295 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
296 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
297 &quot;A String&quot;,
298 ],
299 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
300 &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`.
301 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
302 },
303 &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.
304 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
305 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
306 },
307 &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.
308 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
309 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
310 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
311 &quot;A String&quot;,
312 ],
313 &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.
314 },
315 &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.
316 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
317 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
318 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
319 &quot;A String&quot;,
320 ],
321 &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.
322 },
323 },
324 },
325 ],
326 },
327 ],
328 },
329 ],
330 &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
331 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
332 &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
333 &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.
334 &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.
335 &quot;fixed&quot;: 42, # Specifies a fixed value.
336 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
337 },
338 &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.
339 },
340 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
341 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
342}
343
344 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.
345 x__xgafv: string, V1 error format.
346 Allowed values
347 1 - v1 error format
348 2 - v2 error format
349
350Returns:
351 An object of the form:
352
353 { # This resource represents a long-running operation that is the result of a network API call.
354 &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.
355 &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.
356 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
357 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
358 {
359 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
360 },
361 ],
362 &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.
363 },
364 &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.
365 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
366 },
367 &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}`.
368 &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`.
369 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
370 },
371}</pre>
372</div>
373
374<div class="method">
375 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
376 <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](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
377
378Args:
379 name: string, Required. The name of the OS policy assignment to be deleted (required)
380 x__xgafv: string, V1 error format.
381 Allowed values
382 1 - v1 error format
383 2 - v2 error format
384
385Returns:
386 An object of the form:
387
388 { # This resource represents a long-running operation that is the result of a network API call.
389 &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.
390 &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.
391 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
392 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
393 {
394 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
395 },
396 ],
397 &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.
398 },
399 &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.
400 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
401 },
402 &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}`.
403 &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`.
404 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
405 },
406}</pre>
407</div>
408
409<div class="method">
410 <code class="details" id="get">get(name, x__xgafv=None)</code>
411 <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.
412
413Args:
414 name: string, Required. The resource name of OS policy assignment. Format: `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}` (required)
415 x__xgafv: string, V1 error format.
416 Allowed values
417 1 - v1 error format
418 2 - v2 error format
419
420Returns:
421 An object of the form:
422
423 { # 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](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
424 &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.
425 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
426 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
427 &quot;etag&quot;: &quot;A String&quot;, # The etag for this OS policy assignment. If this is provided on update, it must match the server&#x27;s etag.
428 &quot;instanceFilter&quot;: { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs.
429 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
430 &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.
431 { # 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.
432 &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.
433 &quot;a_key&quot;: &quot;A String&quot;,
434 },
435 },
436 ],
437 &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.
438 { # 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.
439 &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.
440 &quot;a_key&quot;: &quot;A String&quot;,
441 },
442 },
443 ],
444 &quot;inventories&quot;: [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.
445 { # VM inventory details.
446 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
447 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
448 },
449 ],
450 },
451 &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.
452 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
453 { # An OS policy defines the desired state configuration for a VM.
454 &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.
455 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
456 &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.
457 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
458 &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`
459 { # 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.
460 &quot;inventoryFilters&quot;: [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name=&#x27;rhel&#x27; and inventory_filters[1].os_short_name=&#x27;centos&#x27; If the list is empty, this resource group will be applied to the target VM unconditionally.
461 { # Filtering criteria to select VMs based on inventory details.
462 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
463 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
464 },
465 ],
466 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
467 { # 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.
468 &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
469 &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.
470 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
471 &quot;A String&quot;,
472 ],
473 &quot;file&quot;: { # A remote or local file. # A remote or local file.
474 &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.
475 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
476 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
477 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
478 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
479 },
480 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
481 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
482 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
483 &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}`.
484 },
485 },
486 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
487 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
488 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
489 },
490 &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.
491 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
492 &quot;A String&quot;,
493 ],
494 &quot;file&quot;: { # A remote or local file. # A remote or local file.
495 &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.
496 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
497 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
498 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
499 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
500 },
501 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
502 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
503 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
504 &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}`.
505 },
506 },
507 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
508 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
509 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
510 },
511 },
512 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
513 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
514 &quot;file&quot;: { # A remote or local file. # A remote or local source.
515 &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.
516 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
517 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
518 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
519 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
520 },
521 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
522 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
523 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
524 &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}`.
525 },
526 },
527 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
528 &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
529 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
530 },
531 &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.
532 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
533 &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.
534 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
535 },
536 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
537 &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`
538 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
539 &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.
540 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
541 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
542 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
543 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
544 },
545 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
546 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
547 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
548 &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}`.
549 },
550 },
551 },
552 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
553 &quot;googet&quot;: { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet.
554 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
555 },
556 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
557 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.
558 &quot;A String&quot;,
559 ],
560 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
561 &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.
562 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
563 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
564 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
565 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
566 },
567 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
568 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
569 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
570 &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}`.
571 },
572 },
573 },
574 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
575 &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`
576 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
577 &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.
578 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
579 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
580 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
581 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
582 },
583 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
584 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
585 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
586 &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}`.
587 },
588 },
589 },
590 &quot;yum&quot;: { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM.
591 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
592 },
593 &quot;zypper&quot;: { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper.
594 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
595 },
596 },
597 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
598 &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.
599 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
600 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
601 &quot;A String&quot;,
602 ],
603 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
604 &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`.
605 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
606 },
607 &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.
608 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
609 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
610 },
611 &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.
612 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
613 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
614 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
615 &quot;A String&quot;,
616 ],
617 &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.
618 },
619 &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.
620 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
621 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
622 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
623 &quot;A String&quot;,
624 ],
625 &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.
626 },
627 },
628 },
629 ],
630 },
631 ],
632 },
633 ],
634 &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
635 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
636 &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
637 &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.
638 &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.
639 &quot;fixed&quot;: 42, # Specifies a fixed value.
640 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
641 },
642 &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.
643 },
644 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
645 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
646}</pre>
647</div>
648
649<div class="method">
650 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
651 <pre>List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.
652
653Args:
654 parent: string, Required. The parent resource name. (required)
655 pageSize: integer, The maximum number of assignments to return.
656 pageToken: string, A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where this listing should continue from.
657 x__xgafv: string, V1 error format.
658 Allowed values
659 1 - v1 error format
660 2 - v2 error format
661
662Returns:
663 An object of the form:
664
665 { # A response message for listing all assignments under given parent.
666 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token to retrieve the next page of OS policy assignments.
667 &quot;osPolicyAssignments&quot;: [ # The list of assignments
668 { # 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](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
669 &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.
670 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
671 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
672 &quot;etag&quot;: &quot;A String&quot;, # The etag for this OS policy assignment. If this is provided on update, it must match the server&#x27;s etag.
673 &quot;instanceFilter&quot;: { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs.
674 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
675 &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.
676 { # 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.
677 &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.
678 &quot;a_key&quot;: &quot;A String&quot;,
679 },
680 },
681 ],
682 &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.
683 { # 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.
684 &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.
685 &quot;a_key&quot;: &quot;A String&quot;,
686 },
687 },
688 ],
689 &quot;inventories&quot;: [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.
690 { # VM inventory details.
691 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
692 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
693 },
694 ],
695 },
696 &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.
697 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
698 { # An OS policy defines the desired state configuration for a VM.
699 &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.
700 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
701 &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.
702 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
703 &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`
704 { # 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.
705 &quot;inventoryFilters&quot;: [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name=&#x27;rhel&#x27; and inventory_filters[1].os_short_name=&#x27;centos&#x27; If the list is empty, this resource group will be applied to the target VM unconditionally.
706 { # Filtering criteria to select VMs based on inventory details.
707 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
708 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
709 },
710 ],
711 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
712 { # 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.
713 &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
714 &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.
715 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
716 &quot;A String&quot;,
717 ],
718 &quot;file&quot;: { # A remote or local file. # A remote or local file.
719 &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.
720 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
721 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
722 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
723 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
724 },
725 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
726 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
727 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
728 &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}`.
729 },
730 },
731 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
732 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
733 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
734 },
735 &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.
736 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
737 &quot;A String&quot;,
738 ],
739 &quot;file&quot;: { # A remote or local file. # A remote or local file.
740 &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.
741 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
742 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
743 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
744 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
745 },
746 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
747 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
748 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
749 &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}`.
750 },
751 },
752 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
753 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
754 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
755 },
756 },
757 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
758 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
759 &quot;file&quot;: { # A remote or local file. # A remote or local source.
760 &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.
761 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
762 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
763 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
764 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
765 },
766 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
767 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
768 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
769 &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}`.
770 },
771 },
772 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
773 &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
774 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
775 },
776 &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.
777 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
778 &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.
779 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
780 },
781 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
782 &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`
783 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
784 &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.
785 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
786 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
787 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
788 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
789 },
790 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
791 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
792 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
793 &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}`.
794 },
795 },
796 },
797 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
798 &quot;googet&quot;: { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet.
799 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
800 },
801 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
802 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.
803 &quot;A String&quot;,
804 ],
805 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
806 &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.
807 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
808 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
809 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
810 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
811 },
812 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
813 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
814 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
815 &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}`.
816 },
817 },
818 },
819 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
820 &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`
821 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
822 &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.
823 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
824 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
825 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
826 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
827 },
828 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
829 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
830 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
831 &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}`.
832 },
833 },
834 },
835 &quot;yum&quot;: { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM.
836 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
837 },
838 &quot;zypper&quot;: { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper.
839 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
840 },
841 },
842 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
843 &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.
844 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
845 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
846 &quot;A String&quot;,
847 ],
848 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
849 &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`.
850 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
851 },
852 &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.
853 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
854 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
855 },
856 &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.
857 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
858 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
859 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
860 &quot;A String&quot;,
861 ],
862 &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.
863 },
864 &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.
865 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
866 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
867 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
868 &quot;A String&quot;,
869 ],
870 &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.
871 },
872 },
873 },
874 ],
875 },
876 ],
877 },
878 ],
879 &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
880 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
881 &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
882 &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.
883 &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.
884 &quot;fixed&quot;: 42, # Specifies a fixed value.
885 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
886 },
887 &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.
888 },
889 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
890 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
891 },
892 ],
893}</pre>
894</div>
895
896<div class="method">
897 <code class="details" id="listRevisions">listRevisions(name, pageSize=None, pageToken=None, x__xgafv=None)</code>
898 <pre>List the OS policy assignment revisions for a given OS policy assignment.
899
900Args:
901 name: string, Required. The name of the OS policy assignment to list revisions for. (required)
902 pageSize: integer, The maximum number of revisions to return.
903 pageToken: string, A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that indicates where this listing should continue from.
904 x__xgafv: string, V1 error format.
905 Allowed values
906 1 - v1 error format
907 2 - v2 error format
908
909Returns:
910 An object of the form:
911
912 { # A response message for listing all revisions for a OS policy assignment.
913 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token to retrieve the next page of OS policy assignment revisions.
914 &quot;osPolicyAssignments&quot;: [ # The OS policy assignment revisions
915 { # 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](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
916 &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.
917 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
918 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
919 &quot;etag&quot;: &quot;A String&quot;, # The etag for this OS policy assignment. If this is provided on update, it must match the server&#x27;s etag.
920 &quot;instanceFilter&quot;: { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs.
921 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
922 &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.
923 { # 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.
924 &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.
925 &quot;a_key&quot;: &quot;A String&quot;,
926 },
927 },
928 ],
929 &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.
930 { # 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.
931 &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.
932 &quot;a_key&quot;: &quot;A String&quot;,
933 },
934 },
935 ],
936 &quot;inventories&quot;: [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.
937 { # VM inventory details.
938 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
939 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
940 },
941 ],
942 },
943 &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.
944 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
945 { # An OS policy defines the desired state configuration for a VM.
946 &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.
947 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
948 &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.
949 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
950 &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`
951 { # 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.
952 &quot;inventoryFilters&quot;: [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name=&#x27;rhel&#x27; and inventory_filters[1].os_short_name=&#x27;centos&#x27; If the list is empty, this resource group will be applied to the target VM unconditionally.
953 { # Filtering criteria to select VMs based on inventory details.
954 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
955 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
956 },
957 ],
958 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
959 { # 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.
960 &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
961 &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.
962 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
963 &quot;A String&quot;,
964 ],
965 &quot;file&quot;: { # A remote or local file. # A remote or local file.
966 &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.
967 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
968 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
969 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
970 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
971 },
972 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
973 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
974 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
975 &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}`.
976 },
977 },
978 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
979 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
980 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
981 },
982 &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.
983 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
984 &quot;A String&quot;,
985 ],
986 &quot;file&quot;: { # A remote or local file. # A remote or local file.
987 &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.
988 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
989 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
990 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
991 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
992 },
993 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
994 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
995 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
996 &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}`.
997 },
998 },
999 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
1000 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
1001 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
1002 },
1003 },
1004 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
1005 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
1006 &quot;file&quot;: { # A remote or local file. # A remote or local source.
1007 &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.
1008 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1009 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1010 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1011 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1012 },
1013 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1014 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1015 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1016 &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}`.
1017 },
1018 },
1019 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
1020 &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
1021 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
1022 },
1023 &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.
1024 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
1025 &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.
1026 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1027 },
1028 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
1029 &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`
1030 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
1031 &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.
1032 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1033 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1034 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1035 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1036 },
1037 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1038 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1039 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1040 &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}`.
1041 },
1042 },
1043 },
1044 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
1045 &quot;googet&quot;: { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet.
1046 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1047 },
1048 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
1049 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.
1050 &quot;A String&quot;,
1051 ],
1052 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
1053 &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.
1054 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1055 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1056 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1057 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1058 },
1059 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1060 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1061 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1062 &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}`.
1063 },
1064 },
1065 },
1066 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
1067 &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`
1068 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
1069 &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.
1070 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1071 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1072 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1073 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1074 },
1075 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1076 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1077 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1078 &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}`.
1079 },
1080 },
1081 },
1082 &quot;yum&quot;: { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM.
1083 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1084 },
1085 &quot;zypper&quot;: { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper.
1086 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1087 },
1088 },
1089 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
1090 &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.
1091 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
1092 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
1093 &quot;A String&quot;,
1094 ],
1095 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
1096 &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`.
1097 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
1098 },
1099 &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.
1100 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
1101 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
1102 },
1103 &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.
1104 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1105 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1106 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1107 &quot;A String&quot;,
1108 ],
1109 &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.
1110 },
1111 &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.
1112 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1113 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1114 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1115 &quot;A String&quot;,
1116 ],
1117 &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.
1118 },
1119 },
1120 },
1121 ],
1122 },
1123 ],
1124 },
1125 ],
1126 &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
1127 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
1128 &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
1129 &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.
1130 &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.
1131 &quot;fixed&quot;: 42, # Specifies a fixed value.
1132 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
1133 },
1134 &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.
1135 },
1136 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
1137 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
1138 },
1139 ],
1140}</pre>
1141</div>
1142
1143<div class="method">
1144 <code class="details" id="listRevisions_next">listRevisions_next(previous_request, previous_response)</code>
1145 <pre>Retrieves the next page of results.
1146
1147Args:
1148 previous_request: The request for the previous page. (required)
1149 previous_response: The response from the request for the previous page. (required)
1150
1151Returns:
1152 A request object that you can call &#x27;execute()&#x27; on to request the next
1153 page. Returns None if there are no more items in the collection.
1154 </pre>
1155</div>
1156
1157<div class="method">
1158 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1159 <pre>Retrieves the next page of results.
1160
1161Args:
1162 previous_request: The request for the previous page. (required)
1163 previous_response: The response from the request for the previous page. (required)
1164
1165Returns:
1166 A request object that you can call &#x27;execute()&#x27; on to request the next
1167 page. Returns None if there are no more items in the collection.
1168 </pre>
1169</div>
1170
1171<div class="method">
1172 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
1173 <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](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).
1174
1175Args:
1176 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)
1177 body: object, The request body.
1178 The object takes the form of:
1179
1180{ # 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](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).
1181 &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.
1182 &quot;deleted&quot;: True or False, # Output only. Indicates that this revision deletes the OS policy assignment.
1183 &quot;description&quot;: &quot;A String&quot;, # OS policy assignment description. Length of the description is limited to 1024 characters.
1184 &quot;etag&quot;: &quot;A String&quot;, # The etag for this OS policy assignment. If this is provided on update, it must match the server&#x27;s etag.
1185 &quot;instanceFilter&quot;: { # Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them. # Required. Filter to select VMs.
1186 &quot;all&quot;: True or False, # Target all VMs in the project. If true, no other criteria is permitted.
1187 &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.
1188 { # 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.
1189 &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.
1190 &quot;a_key&quot;: &quot;A String&quot;,
1191 },
1192 },
1193 ],
1194 &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.
1195 { # 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.
1196 &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.
1197 &quot;a_key&quot;: &quot;A String&quot;,
1198 },
1199 },
1200 ],
1201 &quot;inventories&quot;: [ # List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.
1202 { # VM inventory details.
1203 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
1204 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
1205 },
1206 ],
1207 },
1208 &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.
1209 &quot;osPolicies&quot;: [ # Required. List of OS policies to be applied to the VMs.
1210 { # An OS policy defines the desired state configuration for a VM.
1211 &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.
1212 &quot;description&quot;: &quot;A String&quot;, # Policy description. Length of the description is limited to 1024 characters.
1213 &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.
1214 &quot;mode&quot;: &quot;A String&quot;, # Required. Policy mode
1215 &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`
1216 { # 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.
1217 &quot;inventoryFilters&quot;: [ # List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name=&#x27;rhel&#x27; and inventory_filters[1].os_short_name=&#x27;centos&#x27; If the list is empty, this resource group will be applied to the target VM unconditionally.
1218 { # Filtering criteria to select VMs based on inventory details.
1219 &quot;osShortName&quot;: &quot;A String&quot;, # Required. The OS short name
1220 &quot;osVersion&quot;: &quot;A String&quot;, # The OS version 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.*` An empty string matches all OS versions.
1221 },
1222 ],
1223 &quot;resources&quot;: [ # Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.
1224 { # 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.
1225 &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
1226 &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.
1227 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
1228 &quot;A String&quot;,
1229 ],
1230 &quot;file&quot;: { # A remote or local file. # A remote or local file.
1231 &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.
1232 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1233 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1234 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1235 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1236 },
1237 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1238 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1239 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1240 &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}`.
1241 },
1242 },
1243 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
1244 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
1245 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
1246 },
1247 &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.
1248 &quot;args&quot;: [ # Optional arguments to pass to the source during execution.
1249 &quot;A String&quot;,
1250 ],
1251 &quot;file&quot;: { # A remote or local file. # A remote or local file.
1252 &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.
1253 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1254 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1255 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1256 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1257 },
1258 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1259 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1260 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1261 &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}`.
1262 },
1263 },
1264 &quot;interpreter&quot;: &quot;A String&quot;, # Required. The script interpreter to use.
1265 &quot;outputFilePath&quot;: &quot;A String&quot;, # Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.
1266 &quot;script&quot;: &quot;A String&quot;, # An inline script. The size of the script is limited to 1024 characters.
1267 },
1268 },
1269 &quot;file&quot;: { # A resource that manages the state of a file. # File resource
1270 &quot;content&quot;: &quot;A String&quot;, # A a file with this content. The size of the content is limited to 1024 characters.
1271 &quot;file&quot;: { # A remote or local file. # A remote or local source.
1272 &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.
1273 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1274 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1275 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1276 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1277 },
1278 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1279 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1280 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1281 &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}`.
1282 },
1283 },
1284 &quot;path&quot;: &quot;A String&quot;, # Required. The absolute path of the file within the VM.
1285 &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
1286 &quot;state&quot;: &quot;A String&quot;, # Required. Desired state of the file.
1287 },
1288 &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.
1289 &quot;pkg&quot;: { # A resource that manages a system package. # Package resource
1290 &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.
1291 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1292 },
1293 &quot;deb&quot;: { # A deb package file. dpkg packages only support INSTALLED state. # A deb package file.
1294 &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`
1295 &quot;source&quot;: { # A remote or local file. # Required. A deb package.
1296 &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.
1297 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1298 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1299 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1300 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1301 },
1302 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1303 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1304 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1305 &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}`.
1306 },
1307 },
1308 },
1309 &quot;desiredState&quot;: &quot;A String&quot;, # Required. The desired state the agent should maintain for this package.
1310 &quot;googet&quot;: { # A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package` # A package managed by GooGet.
1311 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1312 },
1313 &quot;msi&quot;: { # An MSI package. MSI packages only support INSTALLED state. # An MSI package.
1314 &quot;properties&quot;: [ # Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.
1315 &quot;A String&quot;,
1316 ],
1317 &quot;source&quot;: { # A remote or local file. # Required. The MSI package.
1318 &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.
1319 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1320 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1321 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1322 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1323 },
1324 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1325 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1326 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1327 &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}`.
1328 },
1329 },
1330 },
1331 &quot;rpm&quot;: { # An RPM package file. RPM packages only support INSTALLED state. # An rpm package file.
1332 &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`
1333 &quot;source&quot;: { # A remote or local file. # Required. An rpm package.
1334 &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.
1335 &quot;gcs&quot;: { # Specifies a file available as a Cloud Storage Object. # A Cloud Storage object.
1336 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1337 &quot;generation&quot;: &quot;A String&quot;, # Generation number of the Cloud Storage object.
1338 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1339 },
1340 &quot;localPath&quot;: &quot;A String&quot;, # A local path within the VM to use.
1341 &quot;remote&quot;: { # Specifies a file available via some URI. # A generic remote file.
1342 &quot;sha256Checksum&quot;: &quot;A String&quot;, # SHA256 checksum of the remote file.
1343 &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}`.
1344 },
1345 },
1346 },
1347 &quot;yum&quot;: { # A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package` # A package managed by YUM.
1348 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1349 },
1350 &quot;zypper&quot;: { # A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package` # A package managed by Zypper.
1351 &quot;name&quot;: &quot;A String&quot;, # Required. Package name.
1352 },
1353 },
1354 &quot;repository&quot;: { # A resource that manages a package repository. # Package repository resource
1355 &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.
1356 &quot;archiveType&quot;: &quot;A String&quot;, # Required. Type of archive files in this repository.
1357 &quot;components&quot;: [ # Required. List of components for this repository. Must contain at least one item.
1358 &quot;A String&quot;,
1359 ],
1360 &quot;distribution&quot;: &quot;A String&quot;, # Required. Distribution of this repository.
1361 &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`.
1362 &quot;uri&quot;: &quot;A String&quot;, # Required. URI for this repository.
1363 },
1364 &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.
1365 &quot;name&quot;: &quot;A String&quot;, # Required. The name of the repository.
1366 &quot;url&quot;: &quot;A String&quot;, # Required. The url of the repository.
1367 },
1368 &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.
1369 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1370 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1371 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1372 &quot;A String&quot;,
1373 ],
1374 &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.
1375 },
1376 &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.
1377 &quot;baseUrl&quot;: &quot;A String&quot;, # Required. The location of the repository directory.
1378 &quot;displayName&quot;: &quot;A String&quot;, # The display name of the repository.
1379 &quot;gpgKeys&quot;: [ # URIs of GPG keys.
1380 &quot;A String&quot;,
1381 ],
1382 &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.
1383 },
1384 },
1385 },
1386 ],
1387 },
1388 ],
1389 },
1390 ],
1391 &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
1392 &quot;revisionCreateTime&quot;: &quot;A String&quot;, # Output only. The timestamp that the revision was created.
1393 &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
1394 &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.
1395 &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.
1396 &quot;fixed&quot;: 42, # Specifies a fixed value.
1397 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
1398 },
1399 &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.
1400 },
1401 &quot;rolloutState&quot;: &quot;A String&quot;, # Output only. OS policy assignment rollout state
1402 &quot;uid&quot;: &quot;A String&quot;, # Output only. Server generated unique id for the OS policy assignment resource.
1403}
1404
1405 updateMask: string, Optional. Field mask that controls which fields of the assignment should be updated.
1406 x__xgafv: string, V1 error format.
1407 Allowed values
1408 1 - v1 error format
1409 2 - v2 error format
1410
1411Returns:
1412 An object of the form:
1413
1414 { # This resource represents a long-running operation that is the result of a network API call.
1415 &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.
1416 &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.
1417 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
1418 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
1419 {
1420 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1421 },
1422 ],
1423 &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.
1424 },
1425 &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.
1426 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1427 },
1428 &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}`.
1429 &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`.
1430 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
1431 },
1432}</pre>
1433</div>
1434
1435</body></html>