blob: d38be45a1caf1e2682024b061fa7c1319dd35a95 [file] [log] [blame]
Bu Sun Kim65020912020-05-20 12:08:20 -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">Cloud OS Config API</a> . <a href="osconfig_v1.projects.html">projects</a> . <a href="osconfig_v1.projects.patchJobs.html">patchJobs</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="osconfig_v1.projects.patchJobs.instanceDetails.html">instanceDetails()</a></code>
79</p>
80<p class="firstline">Returns the instanceDetails Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
84<p class="firstline">Cancel a patch job. The patch job must be active. Canceled patch jobs</p>
85<p class="toc_element">
86 <code><a href="#execute">execute(parent, body=None, x__xgafv=None)</a></code></p>
87<p class="firstline">Patch VM instances by creating and running a patch job.</p>
88<p class="toc_element">
89 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
90<p class="firstline">Get the patch job. This can be used to track the progress of an</p>
91<p class="toc_element">
92 <code><a href="#list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p>
93<p class="firstline">Get a list of patch jobs.</p>
94<p class="toc_element">
95 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
96<p class="firstline">Retrieves the next page of results.</p>
97<h3>Method Details</h3>
98<div class="method">
99 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
100 <pre>Cancel a patch job. The patch job must be active. Canceled patch jobs
101cannot be restarted.
102
103Args:
104 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
105 body: object, The request body.
106 The object takes the form of:
107
108{ # Message for canceling a patch job.
109 }
110
111 x__xgafv: string, V1 error format.
112 Allowed values
113 1 - v1 error format
114 2 - v2 error format
115
116Returns:
117 An object of the form:
118
119 { # A high level representation of a patch job that is either in progress
120 # or has completed.
121 #
122 # Instances details are not included in the job. To paginate through instance
123 # details, use ListPatchJobInstanceDetails.
124 #
125 # For more information about patch jobs, see
126 # [Creating patch
127 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700129 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
130 # finished without running any updates on the VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700131 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700132 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
133 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
134 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
135 # failure.
136 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
137 # patch(es) to a VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700138 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get # Apt update settings. Use this setting to override the default `apt` patch
139 # rules.
140 # upgrade`. Additional options can be set to control how this is executed.
141 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
142 &quot;A String&quot;,
143 ],
144 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
145 # that will be updated. If these packages are not installed, they will be
146 # ignored. This field cannot be specified with any other patch configuration
147 # fields.
148 &quot;A String&quot;,
149 ],
150 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
151 # using `apt-get dist-upgrade` instead.
152 },
153 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch
154 # rules.
155 # can be set to control how this is executed.
156 #
157 # Note that not all settings are supported on all platforms.
158 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
159 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
160 # using the yum `--exclude` flag.
161 &quot;A String&quot;,
162 ],
163 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
164 # that will be updated. If these packages are not installed, they will be
165 # ignored. This field must not be specified with any other patch
166 # configuration fields.
167 &quot;A String&quot;,
168 ],
169 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
170 # all platforms.
171 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700172 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
173 # rules.
174 },
175 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
176 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
177 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700178 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
179 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
180 # execution can return to indicate a success.
181 42,
182 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700183 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
184 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
185 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
186 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
187 # ensure that the ExecStep specified by this PatchJob does not change.
188 },
189 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
190 # specified the script will be executed directly, which will likely
191 # only succeed for scripts with [shebang lines]
192 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700193 },
194 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
196 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
197 # execution can return to indicate a success.
198 42,
199 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700200 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
201 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
202 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
203 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
204 # ensure that the ExecStep specified by this PatchJob does not change.
205 },
206 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
207 # specified the script will be executed directly, which will likely
208 # only succeed for scripts with [shebang lines]
209 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 },
211 },
212 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
213 &quot;excludes&quot;: [ # List of KBs to exclude from update.
214 &quot;A String&quot;,
215 ],
216 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
217 # that will be updated. This field must not be used with other
218 # patch configurations.
219 &quot;A String&quot;,
220 ],
221 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
222 # updates are applied.
223 &quot;A String&quot;,
224 ],
225 },
226 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
227 # patch rules.
228 # See also https://en.opensuse.org/SDB:Zypper_manual.
229 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
230 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
231 # This field must not be used with any other patch configuration fields.
232 &quot;A String&quot;,
233 ],
234 &quot;excludes&quot;: [ # List of patches to exclude from update.
235 &quot;A String&quot;,
236 ],
237 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
238 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
239 &quot;severities&quot;: [ # Install only patches with these severities.
240 # Common severities include critical, important, moderate, and low.
241 &quot;A String&quot;,
242 ],
243 &quot;categories&quot;: [ # Install only patches with these categories.
244 # Common categories include security, recommended, and feature.
245 &quot;A String&quot;,
246 ],
247 },
248 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
249 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700250 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
251 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
252 # execution can return to indicate a success.
253 42,
254 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700255 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
256 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
257 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
258 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
259 # ensure that the ExecStep specified by this PatchJob does not change.
260 },
261 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
262 # specified the script will be executed directly, which will likely
263 # only succeed for scripts with [shebang lines]
264 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 },
266 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
268 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
269 # execution can return to indicate a success.
270 42,
271 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700272 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
273 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
274 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
275 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
276 # ensure that the ExecStep specified by this PatchJob does not change.
277 },
278 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
279 # specified the script will be executed directly, which will likely
280 # only succeed for scripts with [shebang lines]
281 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700282 },
283 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700284 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
286 # VMs must meet all criteria specified. So if both labels and zones are
287 # specified, the patch job targets only VMs with those labels and in those
288 # zones.
289 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
290 # permitted.
291 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
292 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
293 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
294 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
295 &quot;A String&quot;,
296 ],
297 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
298 # labels, this is another way to group VMs when targeting configs, for
299 # example prefix=&quot;prod-&quot;.
300 &quot;A String&quot;,
301 ],
302 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
303 # instances in any zone.
304 &quot;A String&quot;,
305 ],
306 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows
307 # targeting of disparate groups of VM instances.
308 { # Targets a group of VM instances by using their [assigned
309 # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels
310 # are key-value pairs. A `GroupLabel` is a combination of labels
311 # that is used to target VMs for a patch job.
312 #
313 # For example, a patch job can target VMs that have the following
314 # `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job
315 # is applied to VMs that have both the labels `env=test` and `app=web`.
316 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM
317 # instance to be targeted by this filter.
318 &quot;a_key&quot;: &quot;A String&quot;,
319 },
320 },
321 ],
322 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700323 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
324 # patch job times out.
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
326 # job affects. Contains counts of instances in different states. These states
327 # map to `InstancePatchState`. List patch job instance details to see the
328 # specific states of each instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700329 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
330 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
331 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
332 # ensure that the agent is installed, running, and able to communicate with
333 # the service.
Bu Sun Kim65020912020-05-20 12:08:20 -0700334 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
335 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
336 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
337 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
338 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
339 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
340 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
341 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
342 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
343 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
344 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
345 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700346 },
347 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
348 # to 1024 characters.
349 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
350 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700351 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob .
352 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
353 # `projects/*/patchJobs/*`
Bu Sun Kim65020912020-05-20 12:08:20 -0700354 }</pre>
355</div>
356
357<div class="method">
358 <code class="details" id="execute">execute(parent, body=None, x__xgafv=None)</code>
359 <pre>Patch VM instances by creating and running a patch job.
360
361Args:
362 parent: string, Required. The project in which to run this patch in the form `projects/*` (required)
363 body: object, The request body.
364 The object takes the form of:
365
366{ # A request message to initiate patching across Compute Engine
367 # instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700368 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This does not have to be unique.
369 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
370 # to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700371 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but
372 # will do nothing.
373 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. If omitted, instances are
374 # patched using the default configurations.
375 # patch(es) to a VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700376 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get # Apt update settings. Use this setting to override the default `apt` patch
377 # rules.
378 # upgrade`. Additional options can be set to control how this is executed.
379 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
380 &quot;A String&quot;,
381 ],
382 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
383 # that will be updated. If these packages are not installed, they will be
384 # ignored. This field cannot be specified with any other patch configuration
385 # fields.
386 &quot;A String&quot;,
387 ],
388 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
389 # using `apt-get dist-upgrade` instead.
390 },
391 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch
392 # rules.
393 # can be set to control how this is executed.
394 #
395 # Note that not all settings are supported on all platforms.
396 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
397 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
398 # using the yum `--exclude` flag.
399 &quot;A String&quot;,
400 ],
401 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
402 # that will be updated. If these packages are not installed, they will be
403 # ignored. This field must not be specified with any other patch
404 # configuration fields.
405 &quot;A String&quot;,
406 ],
407 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
408 # all platforms.
409 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700410 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
411 # rules.
412 },
413 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
414 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
415 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700416 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
417 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
418 # execution can return to indicate a success.
419 42,
420 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700421 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
422 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
423 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
424 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
425 # ensure that the ExecStep specified by this PatchJob does not change.
426 },
427 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
428 # specified the script will be executed directly, which will likely
429 # only succeed for scripts with [shebang lines]
430 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700431 },
432 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700433 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
434 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
435 # execution can return to indicate a success.
436 42,
437 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700438 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
439 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
440 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
441 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
442 # ensure that the ExecStep specified by this PatchJob does not change.
443 },
444 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
445 # specified the script will be executed directly, which will likely
446 # only succeed for scripts with [shebang lines]
447 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700448 },
449 },
450 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
451 &quot;excludes&quot;: [ # List of KBs to exclude from update.
452 &quot;A String&quot;,
453 ],
454 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
455 # that will be updated. This field must not be used with other
456 # patch configurations.
457 &quot;A String&quot;,
458 ],
459 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
460 # updates are applied.
461 &quot;A String&quot;,
462 ],
463 },
464 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
465 # patch rules.
466 # See also https://en.opensuse.org/SDB:Zypper_manual.
467 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
468 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
469 # This field must not be used with any other patch configuration fields.
470 &quot;A String&quot;,
471 ],
472 &quot;excludes&quot;: [ # List of patches to exclude from update.
473 &quot;A String&quot;,
474 ],
475 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
476 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
477 &quot;severities&quot;: [ # Install only patches with these severities.
478 # Common severities include critical, important, moderate, and low.
479 &quot;A String&quot;,
480 ],
481 &quot;categories&quot;: [ # Install only patches with these categories.
482 # Common categories include security, recommended, and feature.
483 &quot;A String&quot;,
484 ],
485 },
486 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
487 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700488 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
489 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
490 # execution can return to indicate a success.
491 42,
492 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700493 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
494 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
495 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
496 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
497 # ensure that the ExecStep specified by this PatchJob does not change.
498 },
499 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
500 # specified the script will be executed directly, which will likely
501 # only succeed for scripts with [shebang lines]
502 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 },
504 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700505 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
506 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
507 # execution can return to indicate a success.
508 42,
509 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700510 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
511 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
512 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
513 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
514 # ensure that the ExecStep specified by this PatchJob does not change.
515 },
516 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
517 # specified the script will be executed directly, which will likely
518 # only succeed for scripts with [shebang lines]
519 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 },
521 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 },
523 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Required. Instances to patch, either explicitly or filtered by some criteria such
524 # as zone or labels.
525 # VMs must meet all criteria specified. So if both labels and zones are
526 # specified, the patch job targets only VMs with those labels and in those
527 # zones.
528 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
529 # permitted.
530 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
531 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
532 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
533 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
534 &quot;A String&quot;,
535 ],
536 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
537 # labels, this is another way to group VMs when targeting configs, for
538 # example prefix=&quot;prod-&quot;.
539 &quot;A String&quot;,
540 ],
541 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
542 # instances in any zone.
543 &quot;A String&quot;,
544 ],
545 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows
546 # targeting of disparate groups of VM instances.
547 { # Targets a group of VM instances by using their [assigned
548 # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels
549 # are key-value pairs. A `GroupLabel` is a combination of labels
550 # that is used to target VMs for a patch job.
551 #
552 # For example, a patch job can target VMs that have the following
553 # `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job
554 # is applied to VMs that have both the labels `env=test` and `app=web`.
555 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM
556 # instance to be targeted by this filter.
557 &quot;a_key&quot;: &quot;A String&quot;,
558 },
559 },
560 ],
561 },
562 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job
563 # times out.
Bu Sun Kim65020912020-05-20 12:08:20 -0700564 }
565
566 x__xgafv: string, V1 error format.
567 Allowed values
568 1 - v1 error format
569 2 - v2 error format
570
571Returns:
572 An object of the form:
573
574 { # A high level representation of a patch job that is either in progress
575 # or has completed.
576 #
577 # Instances details are not included in the job. To paginate through instance
578 # details, use ListPatchJobInstanceDetails.
579 #
580 # For more information about patch jobs, see
581 # [Creating patch
582 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim65020912020-05-20 12:08:20 -0700583 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700584 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
585 # finished without running any updates on the VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700586 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700587 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
588 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
589 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
590 # failure.
591 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
592 # patch(es) to a VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700593 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get # Apt update settings. Use this setting to override the default `apt` patch
594 # rules.
595 # upgrade`. Additional options can be set to control how this is executed.
596 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
597 &quot;A String&quot;,
598 ],
599 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
600 # that will be updated. If these packages are not installed, they will be
601 # ignored. This field cannot be specified with any other patch configuration
602 # fields.
603 &quot;A String&quot;,
604 ],
605 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
606 # using `apt-get dist-upgrade` instead.
607 },
608 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch
609 # rules.
610 # can be set to control how this is executed.
611 #
612 # Note that not all settings are supported on all platforms.
613 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
614 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
615 # using the yum `--exclude` flag.
616 &quot;A String&quot;,
617 ],
618 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
619 # that will be updated. If these packages are not installed, they will be
620 # ignored. This field must not be specified with any other patch
621 # configuration fields.
622 &quot;A String&quot;,
623 ],
624 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
625 # all platforms.
626 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700627 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
628 # rules.
629 },
630 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
631 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
632 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
634 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
635 # execution can return to indicate a success.
636 42,
637 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700638 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
639 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
640 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
641 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
642 # ensure that the ExecStep specified by this PatchJob does not change.
643 },
644 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
645 # specified the script will be executed directly, which will likely
646 # only succeed for scripts with [shebang lines]
647 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700648 },
649 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700650 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
651 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
652 # execution can return to indicate a success.
653 42,
654 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700655 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
656 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
657 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
658 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
659 # ensure that the ExecStep specified by this PatchJob does not change.
660 },
661 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
662 # specified the script will be executed directly, which will likely
663 # only succeed for scripts with [shebang lines]
664 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700665 },
666 },
667 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
668 &quot;excludes&quot;: [ # List of KBs to exclude from update.
669 &quot;A String&quot;,
670 ],
671 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
672 # that will be updated. This field must not be used with other
673 # patch configurations.
674 &quot;A String&quot;,
675 ],
676 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
677 # updates are applied.
678 &quot;A String&quot;,
679 ],
680 },
681 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
682 # patch rules.
683 # See also https://en.opensuse.org/SDB:Zypper_manual.
684 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
685 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
686 # This field must not be used with any other patch configuration fields.
687 &quot;A String&quot;,
688 ],
689 &quot;excludes&quot;: [ # List of patches to exclude from update.
690 &quot;A String&quot;,
691 ],
692 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
693 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
694 &quot;severities&quot;: [ # Install only patches with these severities.
695 # Common severities include critical, important, moderate, and low.
696 &quot;A String&quot;,
697 ],
698 &quot;categories&quot;: [ # Install only patches with these categories.
699 # Common categories include security, recommended, and feature.
700 &quot;A String&quot;,
701 ],
702 },
703 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
704 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700705 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
706 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
707 # execution can return to indicate a success.
708 42,
709 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700710 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
711 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
712 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
713 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
714 # ensure that the ExecStep specified by this PatchJob does not change.
715 },
716 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
717 # specified the script will be executed directly, which will likely
718 # only succeed for scripts with [shebang lines]
719 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700720 },
721 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700722 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
723 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
724 # execution can return to indicate a success.
725 42,
726 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700727 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
728 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
729 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
730 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
731 # ensure that the ExecStep specified by this PatchJob does not change.
732 },
733 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
734 # specified the script will be executed directly, which will likely
735 # only succeed for scripts with [shebang lines]
736 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700737 },
738 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700739 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700740 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
741 # VMs must meet all criteria specified. So if both labels and zones are
742 # specified, the patch job targets only VMs with those labels and in those
743 # zones.
744 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
745 # permitted.
746 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
747 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
748 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
749 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
750 &quot;A String&quot;,
751 ],
752 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
753 # labels, this is another way to group VMs when targeting configs, for
754 # example prefix=&quot;prod-&quot;.
755 &quot;A String&quot;,
756 ],
757 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
758 # instances in any zone.
759 &quot;A String&quot;,
760 ],
761 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows
762 # targeting of disparate groups of VM instances.
763 { # Targets a group of VM instances by using their [assigned
764 # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels
765 # are key-value pairs. A `GroupLabel` is a combination of labels
766 # that is used to target VMs for a patch job.
767 #
768 # For example, a patch job can target VMs that have the following
769 # `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job
770 # is applied to VMs that have both the labels `env=test` and `app=web`.
771 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM
772 # instance to be targeted by this filter.
773 &quot;a_key&quot;: &quot;A String&quot;,
774 },
775 },
776 ],
777 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700778 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
779 # patch job times out.
Bu Sun Kim65020912020-05-20 12:08:20 -0700780 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
781 # job affects. Contains counts of instances in different states. These states
782 # map to `InstancePatchState`. List patch job instance details to see the
783 # specific states of each instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700784 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
785 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
786 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
787 # ensure that the agent is installed, running, and able to communicate with
788 # the service.
Bu Sun Kim65020912020-05-20 12:08:20 -0700789 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
790 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
791 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
792 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
793 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
794 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
795 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
796 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
797 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
798 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
799 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
800 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kim65020912020-05-20 12:08:20 -0700801 },
802 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
803 # to 1024 characters.
804 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
805 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700806 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob .
807 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
808 # `projects/*/patchJobs/*`
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 }</pre>
810</div>
811
812<div class="method">
813 <code class="details" id="get">get(name, x__xgafv=None)</code>
814 <pre>Get the patch job. This can be used to track the progress of an
815ongoing patch job or review the details of completed jobs.
816
817Args:
818 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
819 x__xgafv: string, V1 error format.
820 Allowed values
821 1 - v1 error format
822 2 - v2 error format
823
824Returns:
825 An object of the form:
826
827 { # A high level representation of a patch job that is either in progress
828 # or has completed.
829 #
830 # Instances details are not included in the job. To paginate through instance
831 # details, use ListPatchJobInstanceDetails.
832 #
833 # For more information about patch jobs, see
834 # [Creating patch
835 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim65020912020-05-20 12:08:20 -0700836 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -0700837 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
838 # finished without running any updates on the VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700839 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Bu Sun Kim65020912020-05-20 12:08:20 -0700840 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
841 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
842 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
843 # failure.
844 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
845 # patch(es) to a VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700846 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get # Apt update settings. Use this setting to override the default `apt` patch
847 # rules.
848 # upgrade`. Additional options can be set to control how this is executed.
849 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
850 &quot;A String&quot;,
851 ],
852 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
853 # that will be updated. If these packages are not installed, they will be
854 # ignored. This field cannot be specified with any other patch configuration
855 # fields.
856 &quot;A String&quot;,
857 ],
858 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
859 # using `apt-get dist-upgrade` instead.
860 },
861 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch
862 # rules.
863 # can be set to control how this is executed.
864 #
865 # Note that not all settings are supported on all platforms.
866 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
867 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
868 # using the yum `--exclude` flag.
869 &quot;A String&quot;,
870 ],
871 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
872 # that will be updated. If these packages are not installed, they will be
873 # ignored. This field must not be specified with any other patch
874 # configuration fields.
875 &quot;A String&quot;,
876 ],
877 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
878 # all platforms.
879 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700880 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
881 # rules.
882 },
883 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
884 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
885 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
887 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
888 # execution can return to indicate a success.
889 42,
890 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700891 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
892 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
893 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
894 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
895 # ensure that the ExecStep specified by this PatchJob does not change.
896 },
897 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
898 # specified the script will be executed directly, which will likely
899 # only succeed for scripts with [shebang lines]
900 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700901 },
902 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700903 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
904 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
905 # execution can return to indicate a success.
906 42,
907 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700908 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
909 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
910 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
911 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
912 # ensure that the ExecStep specified by this PatchJob does not change.
913 },
914 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
915 # specified the script will be executed directly, which will likely
916 # only succeed for scripts with [shebang lines]
917 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700918 },
919 },
920 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
921 &quot;excludes&quot;: [ # List of KBs to exclude from update.
922 &quot;A String&quot;,
923 ],
924 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
925 # that will be updated. This field must not be used with other
926 # patch configurations.
927 &quot;A String&quot;,
928 ],
929 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
930 # updates are applied.
931 &quot;A String&quot;,
932 ],
933 },
934 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
935 # patch rules.
936 # See also https://en.opensuse.org/SDB:Zypper_manual.
937 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
938 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
939 # This field must not be used with any other patch configuration fields.
940 &quot;A String&quot;,
941 ],
942 &quot;excludes&quot;: [ # List of patches to exclude from update.
943 &quot;A String&quot;,
944 ],
945 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
946 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
947 &quot;severities&quot;: [ # Install only patches with these severities.
948 # Common severities include critical, important, moderate, and low.
949 &quot;A String&quot;,
950 ],
951 &quot;categories&quot;: [ # Install only patches with these categories.
952 # Common categories include security, recommended, and feature.
953 &quot;A String&quot;,
954 ],
955 },
956 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
957 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
959 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
960 # execution can return to indicate a success.
961 42,
962 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700963 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
964 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
965 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
966 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
967 # ensure that the ExecStep specified by this PatchJob does not change.
968 },
969 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
970 # specified the script will be executed directly, which will likely
971 # only succeed for scripts with [shebang lines]
972 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700973 },
974 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
976 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
977 # execution can return to indicate a success.
978 42,
979 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700980 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
981 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
982 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
983 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
984 # ensure that the ExecStep specified by this PatchJob does not change.
985 },
986 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
987 # specified the script will be executed directly, which will likely
988 # only succeed for scripts with [shebang lines]
989 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -0700990 },
991 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700992 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700993 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
994 # VMs must meet all criteria specified. So if both labels and zones are
995 # specified, the patch job targets only VMs with those labels and in those
996 # zones.
997 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
998 # permitted.
999 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
1000 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
1001 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
1002 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
1003 &quot;A String&quot;,
1004 ],
1005 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
1006 # labels, this is another way to group VMs when targeting configs, for
1007 # example prefix=&quot;prod-&quot;.
1008 &quot;A String&quot;,
1009 ],
1010 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
1011 # instances in any zone.
1012 &quot;A String&quot;,
1013 ],
1014 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows
1015 # targeting of disparate groups of VM instances.
1016 { # Targets a group of VM instances by using their [assigned
1017 # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels
1018 # are key-value pairs. A `GroupLabel` is a combination of labels
1019 # that is used to target VMs for a patch job.
1020 #
1021 # For example, a patch job can target VMs that have the following
1022 # `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job
1023 # is applied to VMs that have both the labels `env=test` and `app=web`.
1024 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM
1025 # instance to be targeted by this filter.
1026 &quot;a_key&quot;: &quot;A String&quot;,
1027 },
1028 },
1029 ],
1030 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001031 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
1032 # patch job times out.
Bu Sun Kim65020912020-05-20 12:08:20 -07001033 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
1034 # job affects. Contains counts of instances in different states. These states
1035 # map to `InstancePatchState`. List patch job instance details to see the
1036 # specific states of each instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001037 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
1038 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
1039 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
1040 # ensure that the agent is installed, running, and able to communicate with
1041 # the service.
Bu Sun Kim65020912020-05-20 12:08:20 -07001042 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
1043 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
1044 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
1045 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
1046 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
1047 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
1048 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
1049 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
1050 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
1051 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
1052 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
1053 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kim65020912020-05-20 12:08:20 -07001054 },
1055 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
1056 # to 1024 characters.
1057 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
1058 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001059 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob .
1060 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
1061 # `projects/*/patchJobs/*`
Bu Sun Kim65020912020-05-20 12:08:20 -07001062 }</pre>
1063</div>
1064
1065<div class="method">
1066 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
1067 <pre>Get a list of patch jobs.
1068
1069Args:
1070 parent: string, Required. In the form of `projects/*` (required)
1071 filter: string, If provided, this field specifies the criteria that must be met by patch
1072jobs to be included in the response.
1073Currently, filtering is only available on the patch_deployment field.
1074 pageToken: string, A pagination token returned from a previous call
1075that indicates where this listing should continue from.
1076 pageSize: integer, The maximum number of instance status to return.
1077 x__xgafv: string, V1 error format.
1078 Allowed values
1079 1 - v1 error format
1080 2 - v2 error format
1081
1082Returns:
1083 An object of the form:
1084
1085 { # A response message for listing patch jobs.
1086 &quot;patchJobs&quot;: [ # The list of patch jobs.
1087 { # A high level representation of a patch job that is either in progress
1088 # or has completed.
1089 #
1090 # Instances details are not included in the job. To paginate through instance
1091 # details, use ListPatchJobInstanceDetails.
1092 #
1093 # For more information about patch jobs, see
1094 # [Creating patch
1095 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
1098 # finished without running any updates on the VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001099 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Bu Sun Kim65020912020-05-20 12:08:20 -07001100 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
1101 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
1102 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
1103 # failure.
1104 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
1105 # patch(es) to a VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001106 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get # Apt update settings. Use this setting to override the default `apt` patch
1107 # rules.
1108 # upgrade`. Additional options can be set to control how this is executed.
1109 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
1110 &quot;A String&quot;,
1111 ],
1112 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
1113 # that will be updated. If these packages are not installed, they will be
1114 # ignored. This field cannot be specified with any other patch configuration
1115 # fields.
1116 &quot;A String&quot;,
1117 ],
1118 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
1119 # using `apt-get dist-upgrade` instead.
1120 },
1121 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch
1122 # rules.
1123 # can be set to control how this is executed.
1124 #
1125 # Note that not all settings are supported on all platforms.
1126 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
1127 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
1128 # using the yum `--exclude` flag.
1129 &quot;A String&quot;,
1130 ],
1131 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
1132 # that will be updated. If these packages are not installed, they will be
1133 # ignored. This field must not be specified with any other patch
1134 # configuration fields.
1135 &quot;A String&quot;,
1136 ],
1137 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
1138 # all platforms.
1139 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001140 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
1141 # rules.
1142 },
1143 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
1144 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
1145 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -07001146 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1147 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1148 # execution can return to indicate a success.
1149 42,
1150 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001151 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
1152 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1153 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1154 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
1155 # ensure that the ExecStep specified by this PatchJob does not change.
1156 },
1157 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1158 # specified the script will be executed directly, which will likely
1159 # only succeed for scripts with [shebang lines]
1160 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -07001161 },
1162 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -07001163 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1164 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1165 # execution can return to indicate a success.
1166 42,
1167 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001168 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
1169 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1170 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1171 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
1172 # ensure that the ExecStep specified by this PatchJob does not change.
1173 },
1174 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1175 # specified the script will be executed directly, which will likely
1176 # only succeed for scripts with [shebang lines]
1177 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -07001178 },
1179 },
1180 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
1181 &quot;excludes&quot;: [ # List of KBs to exclude from update.
1182 &quot;A String&quot;,
1183 ],
1184 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
1185 # that will be updated. This field must not be used with other
1186 # patch configurations.
1187 &quot;A String&quot;,
1188 ],
1189 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
1190 # updates are applied.
1191 &quot;A String&quot;,
1192 ],
1193 },
1194 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
1195 # patch rules.
1196 # See also https://en.opensuse.org/SDB:Zypper_manual.
1197 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
1198 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
1199 # This field must not be used with any other patch configuration fields.
1200 &quot;A String&quot;,
1201 ],
1202 &quot;excludes&quot;: [ # List of patches to exclude from update.
1203 &quot;A String&quot;,
1204 ],
1205 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
1206 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
1207 &quot;severities&quot;: [ # Install only patches with these severities.
1208 # Common severities include critical, important, moderate, and low.
1209 &quot;A String&quot;,
1210 ],
1211 &quot;categories&quot;: [ # Install only patches with these categories.
1212 # Common categories include security, recommended, and feature.
1213 &quot;A String&quot;,
1214 ],
1215 },
1216 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
1217 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -07001218 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1219 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1220 # execution can return to indicate a success.
1221 42,
1222 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001223 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
1224 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1225 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1226 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
1227 # ensure that the ExecStep specified by this PatchJob does not change.
1228 },
1229 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1230 # specified the script will be executed directly, which will likely
1231 # only succeed for scripts with [shebang lines]
1232 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -07001233 },
1234 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1236 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1237 # execution can return to indicate a success.
1238 42,
1239 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001240 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
1241 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
1242 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
1243 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to
1244 # ensure that the ExecStep specified by this PatchJob does not change.
1245 },
1246 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1247 # specified the script will be executed directly, which will likely
1248 # only succeed for scripts with [shebang lines]
1249 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
Bu Sun Kim65020912020-05-20 12:08:20 -07001250 },
1251 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001252 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001253 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
1254 # VMs must meet all criteria specified. So if both labels and zones are
1255 # specified, the patch job targets only VMs with those labels and in those
1256 # zones.
1257 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
1258 # permitted.
1259 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
1260 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME],
1261 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
1262 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
1263 &quot;A String&quot;,
1264 ],
1265 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
1266 # labels, this is another way to group VMs when targeting configs, for
1267 # example prefix=&quot;prod-&quot;.
1268 &quot;A String&quot;,
1269 ],
1270 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
1271 # instances in any zone.
1272 &quot;A String&quot;,
1273 ],
1274 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows
1275 # targeting of disparate groups of VM instances.
1276 { # Targets a group of VM instances by using their [assigned
1277 # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels
1278 # are key-value pairs. A `GroupLabel` is a combination of labels
1279 # that is used to target VMs for a patch job.
1280 #
1281 # For example, a patch job can target VMs that have the following
1282 # `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job
1283 # is applied to VMs that have both the labels `env=test` and `app=web`.
1284 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM
1285 # instance to be targeted by this filter.
1286 &quot;a_key&quot;: &quot;A String&quot;,
1287 },
1288 },
1289 ],
1290 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001291 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
1292 # patch job times out.
Bu Sun Kim65020912020-05-20 12:08:20 -07001293 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
1294 # job affects. Contains counts of instances in different states. These states
1295 # map to `InstancePatchState`. List patch job instance details to see the
1296 # specific states of each instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001297 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
1298 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
1299 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
1300 # ensure that the agent is installed, running, and able to communicate with
1301 # the service.
Bu Sun Kim65020912020-05-20 12:08:20 -07001302 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
1303 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
1304 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
1305 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
1306 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
1307 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
1308 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
1309 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
1310 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
1311 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
1312 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
1313 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kim65020912020-05-20 12:08:20 -07001314 },
1315 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
1316 # to 1024 characters.
1317 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
1318 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001319 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob .
1320 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
1321 # `projects/*/patchJobs/*`
Bu Sun Kim65020912020-05-20 12:08:20 -07001322 },
1323 ],
1324 &quot;nextPageToken&quot;: &quot;A String&quot;, # A pagination token that can be used to get the next page of results.
1325 }</pre>
1326</div>
1327
1328<div class="method">
1329 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1330 <pre>Retrieves the next page of results.
1331
1332Args:
1333 previous_request: The request for the previous page. (required)
1334 previous_response: The response from the request for the previous page. (required)
1335
1336Returns:
1337 A request object that you can call &#x27;execute()&#x27; on to request the next
1338 page. Returns None if there are no more items in the collection.
1339 </pre>
1340</div>
1341
1342</body></html>