blob: bfb28789239dd8df4cb69f45a2cb6112cc0f73f2 [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_v1beta.html">Cloud OS Config API</a> . <a href="osconfig_v1beta.projects.html">projects</a> . <a href="osconfig_v1beta.projects.patchJobs.html">patchJobs</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="osconfig_v1beta.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 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700122 # Instance details are not included in the job. To paginate through instance
123 # details, use `ListPatchJobInstanceDetails`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700124 #
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 Kim4ed7d3f2020-05-27 12:20:54 -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;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700130 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
131 # patch job times out.
132 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied.
133 # concurrency control when applying patch(es) to all targeted VMs.
134 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or # The maximum number (or percentage) of VMs per zone to disrupt at any given
135 # moment. The number of VMs calculated from multiplying the percentage by the
136 # total number of VMs in a zone is rounded up.
137 #
138 # During patching, a VM is considered disrupted from the time the agent is
139 # notified to begin until patching has completed. This disruption time
140 # includes the time to complete reboot and any post-patch steps.
141 #
142 # A VM contributes to the disruption budget if its patching operation fails
143 # either when applying the patches, running pre or post patch steps, or if it
144 # fails to respond with a success notification before timing out. VMs that
145 # are not running or do not have an active agent do not count toward this
146 # disruption budget.
147 #
148 # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
149 # the patch job stops, because continuing to the next zone requires
150 # completion of the patch process in the previous zone.
151 #
152 # For example, if the disruption budget has a fixed value of `10`, and 8 VMs
153 # fail to patch in the current zone, the patch job continues to patch 2 VMs
154 # at a time until the zone is completed. When that zone is completed
155 # successfully, patching begins with 10 VMs at a time in the next zone. If 10
156 # VMs in the next zone fail to patch, the patch job stops.
157 # relative (&quot;percent&quot;) to a value.
158 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be
159 # multiplied by a reference value.
160 &quot;fixed&quot;: 42, # Specifies a fixed value.
161 },
162 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
163 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700164 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
165 # patch(es) to a VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700166 &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
167 # rules.
168 # can be set to control how this is executed.
169 #
170 # Note that not all settings are supported on all platforms.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700171 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
172 # using the yum `--exclude` flag.
173 &quot;A String&quot;,
174 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700175 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
176 # that will be updated. If these packages are not installed, they will be
177 # ignored. This field must not be specified with any other patch
178 # configuration fields.
179 &quot;A String&quot;,
180 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700181 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
183 # all platforms.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700184 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700185 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
186 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
187 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
188 # specified the script will be executed directly, which will likely
189 # only succeed for scripts with [shebang lines]
190 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
191 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
192 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
193 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
194 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
195 # ensure that the ExecStep specified by this PatchJob does not change.
196 },
197 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
198 # execution can return to indicate a success.
199 42,
200 ],
201 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
202 },
203 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
204 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
205 # specified the script will be executed directly, which will likely
206 # only succeed for scripts with [shebang lines]
207 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
208 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
209 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
210 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
211 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
212 # ensure that the ExecStep specified by this PatchJob does not change.
213 },
214 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
215 # execution can return to indicate a success.
216 42,
217 ],
218 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
219 },
220 },
221 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
222 # rules.
223 },
224 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700225 &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
226 # rules.
227 # upgrade`. Additional options can be set to control how this is executed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700228 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
229 # that will be updated. If these packages are not installed, they will be
230 # ignored. This field cannot be specified with any other patch configuration
231 # fields.
232 &quot;A String&quot;,
233 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700234 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
235 # using `apt-get dist-upgrade` instead.
236 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
237 &quot;A String&quot;,
238 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700239 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700240 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
241 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
242 # that will be updated. This field must not be used with other
243 # patch configurations.
244 &quot;A String&quot;,
245 ],
246 &quot;excludes&quot;: [ # List of KBs to exclude from update.
247 &quot;A String&quot;,
248 ],
249 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
250 # updates are applied.
251 &quot;A String&quot;,
252 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700253 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700254 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
255 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
256 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
257 # specified the script will be executed directly, which will likely
258 # only succeed for scripts with [shebang lines]
259 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
260 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
261 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
262 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
263 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
264 # ensure that the ExecStep specified by this PatchJob does not change.
265 },
266 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
267 # execution can return to indicate a success.
268 42,
269 ],
270 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
271 },
272 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
273 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
274 # specified the script will be executed directly, which will likely
275 # only succeed for scripts with [shebang lines]
276 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
277 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
278 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
279 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
280 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
281 # ensure that the ExecStep specified by this PatchJob does not change.
282 },
283 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
284 # execution can return to indicate a success.
285 42,
286 ],
287 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
288 },
289 },
290 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
291 # patch rules.
292 # See also https://en.opensuse.org/SDB:Zypper_manual.
293 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
294 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
295 # This field must not be used with any other patch configuration fields.
296 &quot;A String&quot;,
297 ],
298 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
299 &quot;excludes&quot;: [ # List of patches to exclude from update.
300 &quot;A String&quot;,
301 ],
302 &quot;severities&quot;: [ # Install only patches with these severities.
303 # Common severities include critical, important, moderate, and low.
304 &quot;A String&quot;,
305 ],
306 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
307 &quot;categories&quot;: [ # Install only patches with these categories.
308 # Common categories include security, recommended, and feature.
309 &quot;A String&quot;,
310 ],
311 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700312 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700313 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
314 # job affects. Contains counts of instances in different states. These states
315 # map to `InstancePatchState`. List patch job instance details to see the
316 # specific states of each instance.
317 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
318 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
319 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
320 # ensure that the agent is installed, running, and able to communicate with
321 # the service.
322 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
323 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
324 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
325 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
326 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
327 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
328 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
329 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
330 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
331 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
332 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
333 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
334 },
335 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
336 # finished without running any updates on the VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
338 # VMs must meet all criteria specified. So if both labels and zones are
339 # specified, the patch job targets only VMs with those labels and in those
340 # zones.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700341 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
342 # permitted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700343 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
344 # instances in any zone.
345 &quot;A String&quot;,
346 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700347 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
348 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`,
349 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
350 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
351 &quot;A String&quot;,
352 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700353 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows
354 # targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
355 { # Represents a group of VMs that can be identified as having all these
356 # labels, for example &quot;env=prod and app=web&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700357 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to
358 # be targeted by this filter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;a_key&quot;: &quot;A String&quot;,
360 },
361 },
362 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700363 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
364 # labels, this is another way to group VMs when targeting configs, for
365 # example prefix=&quot;prod-&quot;.
366 &quot;A String&quot;,
367 ],
368 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700369 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
370 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700371 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
372 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
373 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
374 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
375 # failure.
376 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
377 # `projects/*/patchJobs/*`
378 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
379 # to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 }</pre>
381</div>
382
383<div class="method">
384 <code class="details" id="execute">execute(parent, body=None, x__xgafv=None)</code>
385 <pre>Patch VM instances by creating and running a patch job.
386
387Args:
388 parent: string, Required. The project in which to run this patch in the form `projects/*` (required)
389 body: object, The request body.
390 The object takes the form of:
391
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700392{ # A request message to initiate patching across Compute Engine instances.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700393 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. If omitted, instances are
394 # patched using the default configurations.
395 # patch(es) to a VM instance.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700396 &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
397 # rules.
398 # can be set to control how this is executed.
399 #
400 # Note that not all settings are supported on all platforms.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700401 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
402 # using the yum `--exclude` flag.
403 &quot;A String&quot;,
404 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700405 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
406 # that will be updated. If these packages are not installed, they will be
407 # ignored. This field must not be specified with any other patch
408 # configuration fields.
409 &quot;A String&quot;,
410 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700411 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700412 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
413 # all platforms.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700414 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700415 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
416 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
417 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
418 # specified the script will be executed directly, which will likely
419 # only succeed for scripts with [shebang lines]
420 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
421 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
422 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
423 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
424 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
425 # ensure that the ExecStep specified by this PatchJob does not change.
426 },
427 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
428 # execution can return to indicate a success.
429 42,
430 ],
431 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
432 },
433 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
434 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
435 # specified the script will be executed directly, which will likely
436 # only succeed for scripts with [shebang lines]
437 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
438 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
439 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
440 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
441 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
442 # ensure that the ExecStep specified by this PatchJob does not change.
443 },
444 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
445 # execution can return to indicate a success.
446 42,
447 ],
448 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
449 },
450 },
451 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
452 # rules.
453 },
454 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700455 &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
456 # rules.
457 # upgrade`. Additional options can be set to control how this is executed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700458 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
459 # that will be updated. If these packages are not installed, they will be
460 # ignored. This field cannot be specified with any other patch configuration
461 # fields.
462 &quot;A String&quot;,
463 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700464 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
465 # using `apt-get dist-upgrade` instead.
466 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
467 &quot;A String&quot;,
468 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700469 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700470 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
471 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
472 # that will be updated. This field must not be used with other
473 # patch configurations.
474 &quot;A String&quot;,
475 ],
476 &quot;excludes&quot;: [ # List of KBs to exclude from update.
477 &quot;A String&quot;,
478 ],
479 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
480 # updates are applied.
481 &quot;A String&quot;,
482 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700483 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700484 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
485 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
486 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
487 # specified the script will be executed directly, which will likely
488 # only succeed for scripts with [shebang lines]
489 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
490 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
491 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
492 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
493 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
494 # ensure that the ExecStep specified by this PatchJob does not change.
495 },
496 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
497 # execution can return to indicate a success.
498 42,
499 ],
500 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
501 },
502 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
503 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
504 # specified the script will be executed directly, which will likely
505 # only succeed for scripts with [shebang lines]
506 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
507 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
508 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
509 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
510 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
511 # ensure that the ExecStep specified by this PatchJob does not change.
512 },
513 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
514 # execution can return to indicate a success.
515 42,
516 ],
517 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
518 },
519 },
520 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
521 # patch rules.
522 # See also https://en.opensuse.org/SDB:Zypper_manual.
523 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
524 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
525 # This field must not be used with any other patch configuration fields.
526 &quot;A String&quot;,
527 ],
528 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
529 &quot;excludes&quot;: [ # List of patches to exclude from update.
530 &quot;A String&quot;,
531 ],
532 &quot;severities&quot;: [ # Install only patches with these severities.
533 # Common severities include critical, important, moderate, and low.
534 &quot;A String&quot;,
535 ],
536 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
537 &quot;categories&quot;: [ # Install only patches with these categories.
538 # Common categories include security, recommended, and feature.
539 &quot;A String&quot;,
540 ],
541 },
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700542 },
543 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job
544 # times out.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700545 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This does not have to be unique.
546 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but
547 # will do nothing.
Bu Sun Kim65020912020-05-20 12:08:20 -0700548 &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
549 # as zone or labels.
550 # VMs must meet all criteria specified. So if both labels and zones are
551 # specified, the patch job targets only VMs with those labels and in those
552 # zones.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700553 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
554 # permitted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700555 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
556 # instances in any zone.
557 &quot;A String&quot;,
558 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700559 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
560 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`,
561 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
562 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
563 &quot;A String&quot;,
564 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700565 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows
566 # targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
567 { # Represents a group of VMs that can be identified as having all these
568 # labels, for example &quot;env=prod and app=web&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700569 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to
570 # be targeted by this filter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700571 &quot;a_key&quot;: &quot;A String&quot;,
572 },
573 },
574 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700575 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
576 # labels, this is another way to group VMs when targeting configs, for
577 # example prefix=&quot;prod-&quot;.
578 &quot;A String&quot;,
579 ],
580 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700581 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
582 # to 1024 characters.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700583 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the # Rollout strategy of the patch job.
584 # concurrency control when applying patch(es) to all targeted VMs.
585 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or # The maximum number (or percentage) of VMs per zone to disrupt at any given
586 # moment. The number of VMs calculated from multiplying the percentage by the
587 # total number of VMs in a zone is rounded up.
588 #
589 # During patching, a VM is considered disrupted from the time the agent is
590 # notified to begin until patching has completed. This disruption time
591 # includes the time to complete reboot and any post-patch steps.
592 #
593 # A VM contributes to the disruption budget if its patching operation fails
594 # either when applying the patches, running pre or post patch steps, or if it
595 # fails to respond with a success notification before timing out. VMs that
596 # are not running or do not have an active agent do not count toward this
597 # disruption budget.
598 #
599 # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
600 # the patch job stops, because continuing to the next zone requires
601 # completion of the patch process in the previous zone.
602 #
603 # For example, if the disruption budget has a fixed value of `10`, and 8 VMs
604 # fail to patch in the current zone, the patch job continues to patch 2 VMs
605 # at a time until the zone is completed. When that zone is completed
606 # successfully, patching begins with 10 VMs at a time in the next zone. If 10
607 # VMs in the next zone fail to patch, the patch job stops.
608 # relative (&quot;percent&quot;) to a value.
609 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be
610 # multiplied by a reference value.
611 &quot;fixed&quot;: 42, # Specifies a fixed value.
612 },
613 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
614 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700615 }
616
617 x__xgafv: string, V1 error format.
618 Allowed values
619 1 - v1 error format
620 2 - v2 error format
621
622Returns:
623 An object of the form:
624
625 { # A high level representation of a patch job that is either in progress
626 # or has completed.
627 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700628 # Instance details are not included in the job. To paginate through instance
629 # details, use `ListPatchJobInstanceDetails`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700630 #
631 # For more information about patch jobs, see
632 # [Creating patch
633 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700634 &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 -0700635 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700636 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
637 # patch job times out.
638 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied.
639 # concurrency control when applying patch(es) to all targeted VMs.
640 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or # The maximum number (or percentage) of VMs per zone to disrupt at any given
641 # moment. The number of VMs calculated from multiplying the percentage by the
642 # total number of VMs in a zone is rounded up.
643 #
644 # During patching, a VM is considered disrupted from the time the agent is
645 # notified to begin until patching has completed. This disruption time
646 # includes the time to complete reboot and any post-patch steps.
647 #
648 # A VM contributes to the disruption budget if its patching operation fails
649 # either when applying the patches, running pre or post patch steps, or if it
650 # fails to respond with a success notification before timing out. VMs that
651 # are not running or do not have an active agent do not count toward this
652 # disruption budget.
653 #
654 # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
655 # the patch job stops, because continuing to the next zone requires
656 # completion of the patch process in the previous zone.
657 #
658 # For example, if the disruption budget has a fixed value of `10`, and 8 VMs
659 # fail to patch in the current zone, the patch job continues to patch 2 VMs
660 # at a time until the zone is completed. When that zone is completed
661 # successfully, patching begins with 10 VMs at a time in the next zone. If 10
662 # VMs in the next zone fail to patch, the patch job stops.
663 # relative (&quot;percent&quot;) to a value.
664 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be
665 # multiplied by a reference value.
666 &quot;fixed&quot;: 42, # Specifies a fixed value.
667 },
668 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
669 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700670 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
671 # patch(es) to a VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700672 &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
673 # rules.
674 # can be set to control how this is executed.
675 #
676 # Note that not all settings are supported on all platforms.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700677 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
678 # using the yum `--exclude` flag.
679 &quot;A String&quot;,
680 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
682 # that will be updated. If these packages are not installed, they will be
683 # ignored. This field must not be specified with any other patch
684 # configuration fields.
685 &quot;A String&quot;,
686 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700687 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700688 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
689 # all platforms.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700690 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700691 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
692 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
693 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
694 # specified the script will be executed directly, which will likely
695 # only succeed for scripts with [shebang lines]
696 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
697 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
698 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
699 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
700 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
701 # ensure that the ExecStep specified by this PatchJob does not change.
702 },
703 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
704 # execution can return to indicate a success.
705 42,
706 ],
707 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
708 },
709 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
710 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
711 # specified the script will be executed directly, which will likely
712 # only succeed for scripts with [shebang lines]
713 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
714 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
715 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
716 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
717 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
718 # ensure that the ExecStep specified by this PatchJob does not change.
719 },
720 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
721 # execution can return to indicate a success.
722 42,
723 ],
724 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
725 },
726 },
727 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
728 # rules.
729 },
730 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700731 &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
732 # rules.
733 # upgrade`. Additional options can be set to control how this is executed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700734 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
735 # that will be updated. If these packages are not installed, they will be
736 # ignored. This field cannot be specified with any other patch configuration
737 # fields.
738 &quot;A String&quot;,
739 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700740 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
741 # using `apt-get dist-upgrade` instead.
742 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
743 &quot;A String&quot;,
744 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700745 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700746 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
747 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
748 # that will be updated. This field must not be used with other
749 # patch configurations.
750 &quot;A String&quot;,
751 ],
752 &quot;excludes&quot;: [ # List of KBs to exclude from update.
753 &quot;A String&quot;,
754 ],
755 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
756 # updates are applied.
757 &quot;A String&quot;,
758 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700759 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700760 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
761 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
762 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
763 # specified the script will be executed directly, which will likely
764 # only succeed for scripts with [shebang lines]
765 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
766 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
767 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
768 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
769 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
770 # ensure that the ExecStep specified by this PatchJob does not change.
771 },
772 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
773 # execution can return to indicate a success.
774 42,
775 ],
776 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
777 },
778 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
779 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
780 # specified the script will be executed directly, which will likely
781 # only succeed for scripts with [shebang lines]
782 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
783 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
784 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
785 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
786 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
787 # ensure that the ExecStep specified by this PatchJob does not change.
788 },
789 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
790 # execution can return to indicate a success.
791 42,
792 ],
793 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
794 },
795 },
796 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
797 # patch rules.
798 # See also https://en.opensuse.org/SDB:Zypper_manual.
799 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
800 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
801 # This field must not be used with any other patch configuration fields.
802 &quot;A String&quot;,
803 ],
804 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
805 &quot;excludes&quot;: [ # List of patches to exclude from update.
806 &quot;A String&quot;,
807 ],
808 &quot;severities&quot;: [ # Install only patches with these severities.
809 # Common severities include critical, important, moderate, and low.
810 &quot;A String&quot;,
811 ],
812 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
813 &quot;categories&quot;: [ # Install only patches with these categories.
814 # Common categories include security, recommended, and feature.
815 &quot;A String&quot;,
816 ],
817 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700818 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700819 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
820 # job affects. Contains counts of instances in different states. These states
821 # map to `InstancePatchState`. List patch job instance details to see the
822 # specific states of each instance.
823 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
824 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
825 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
826 # ensure that the agent is installed, running, and able to communicate with
827 # the service.
828 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
829 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
830 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
831 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
832 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
833 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
834 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
835 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
836 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
837 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
838 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
839 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
840 },
841 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
842 # finished without running any updates on the VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700843 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
844 # VMs must meet all criteria specified. So if both labels and zones are
845 # specified, the patch job targets only VMs with those labels and in those
846 # zones.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700847 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
848 # permitted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700849 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
850 # instances in any zone.
851 &quot;A String&quot;,
852 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700853 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
854 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`,
855 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
856 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
857 &quot;A String&quot;,
858 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700859 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows
860 # targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
861 { # Represents a group of VMs that can be identified as having all these
862 # labels, for example &quot;env=prod and app=web&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700863 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to
864 # be targeted by this filter.
Bu Sun Kim65020912020-05-20 12:08:20 -0700865 &quot;a_key&quot;: &quot;A String&quot;,
866 },
867 },
868 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700869 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
870 # labels, this is another way to group VMs when targeting configs, for
871 # example prefix=&quot;prod-&quot;.
872 &quot;A String&quot;,
873 ],
874 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700875 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
876 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700877 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
878 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
879 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
880 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
881 # failure.
882 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
883 # `projects/*/patchJobs/*`
884 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
885 # to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700886 }</pre>
887</div>
888
889<div class="method">
890 <code class="details" id="get">get(name, x__xgafv=None)</code>
891 <pre>Get the patch job. This can be used to track the progress of an
892ongoing patch job or review the details of completed jobs.
893
894Args:
895 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
896 x__xgafv: string, V1 error format.
897 Allowed values
898 1 - v1 error format
899 2 - v2 error format
900
901Returns:
902 An object of the form:
903
904 { # A high level representation of a patch job that is either in progress
905 # or has completed.
906 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700907 # Instance details are not included in the job. To paginate through instance
908 # details, use `ListPatchJobInstanceDetails`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700909 #
910 # For more information about patch jobs, see
911 # [Creating patch
912 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700913 &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 -0700914 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700915 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
916 # patch job times out.
917 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied.
918 # concurrency control when applying patch(es) to all targeted VMs.
919 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or # The maximum number (or percentage) of VMs per zone to disrupt at any given
920 # moment. The number of VMs calculated from multiplying the percentage by the
921 # total number of VMs in a zone is rounded up.
922 #
923 # During patching, a VM is considered disrupted from the time the agent is
924 # notified to begin until patching has completed. This disruption time
925 # includes the time to complete reboot and any post-patch steps.
926 #
927 # A VM contributes to the disruption budget if its patching operation fails
928 # either when applying the patches, running pre or post patch steps, or if it
929 # fails to respond with a success notification before timing out. VMs that
930 # are not running or do not have an active agent do not count toward this
931 # disruption budget.
932 #
933 # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
934 # the patch job stops, because continuing to the next zone requires
935 # completion of the patch process in the previous zone.
936 #
937 # For example, if the disruption budget has a fixed value of `10`, and 8 VMs
938 # fail to patch in the current zone, the patch job continues to patch 2 VMs
939 # at a time until the zone is completed. When that zone is completed
940 # successfully, patching begins with 10 VMs at a time in the next zone. If 10
941 # VMs in the next zone fail to patch, the patch job stops.
942 # relative (&quot;percent&quot;) to a value.
943 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be
944 # multiplied by a reference value.
945 &quot;fixed&quot;: 42, # Specifies a fixed value.
946 },
947 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
948 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700949 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
950 # patch(es) to a VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 &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
952 # rules.
953 # can be set to control how this is executed.
954 #
955 # Note that not all settings are supported on all platforms.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700956 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
957 # using the yum `--exclude` flag.
958 &quot;A String&quot;,
959 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700960 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
961 # that will be updated. If these packages are not installed, they will be
962 # ignored. This field must not be specified with any other patch
963 # configuration fields.
964 &quot;A String&quot;,
965 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700966 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
Bu Sun Kim65020912020-05-20 12:08:20 -0700967 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
968 # all platforms.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700969 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700970 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
971 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
972 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
973 # specified the script will be executed directly, which will likely
974 # only succeed for scripts with [shebang lines]
975 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
976 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
977 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
978 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
979 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
980 # ensure that the ExecStep specified by this PatchJob does not change.
981 },
982 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
983 # execution can return to indicate a success.
984 42,
985 ],
986 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
987 },
988 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
989 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
990 # specified the script will be executed directly, which will likely
991 # only succeed for scripts with [shebang lines]
992 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
993 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
994 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
995 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
996 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
997 # ensure that the ExecStep specified by this PatchJob does not change.
998 },
999 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1000 # execution can return to indicate a success.
1001 42,
1002 ],
1003 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1004 },
1005 },
1006 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
1007 # rules.
1008 },
1009 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001010 &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
1011 # rules.
1012 # upgrade`. Additional options can be set to control how this is executed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001013 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
1014 # that will be updated. If these packages are not installed, they will be
1015 # ignored. This field cannot be specified with any other patch configuration
1016 # fields.
1017 &quot;A String&quot;,
1018 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001019 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
1020 # using `apt-get dist-upgrade` instead.
1021 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
1022 &quot;A String&quot;,
1023 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001024 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001025 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
1026 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
1027 # that will be updated. This field must not be used with other
1028 # patch configurations.
1029 &quot;A String&quot;,
1030 ],
1031 &quot;excludes&quot;: [ # List of KBs to exclude from update.
1032 &quot;A String&quot;,
1033 ],
1034 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
1035 # updates are applied.
1036 &quot;A String&quot;,
1037 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001039 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
1040 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
1041 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1042 # specified the script will be executed directly, which will likely
1043 # only succeed for scripts with [shebang lines]
1044 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
1045 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
1046 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
1047 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
1048 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
1049 # ensure that the ExecStep specified by this PatchJob does not change.
1050 },
1051 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1052 # execution can return to indicate a success.
1053 42,
1054 ],
1055 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1056 },
1057 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
1058 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1059 # specified the script will be executed directly, which will likely
1060 # only succeed for scripts with [shebang lines]
1061 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
1062 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
1063 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
1064 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
1065 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
1066 # ensure that the ExecStep specified by this PatchJob does not change.
1067 },
1068 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1069 # execution can return to indicate a success.
1070 42,
1071 ],
1072 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1073 },
1074 },
1075 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
1076 # patch rules.
1077 # See also https://en.opensuse.org/SDB:Zypper_manual.
1078 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
1079 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
1080 # This field must not be used with any other patch configuration fields.
1081 &quot;A String&quot;,
1082 ],
1083 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
1084 &quot;excludes&quot;: [ # List of patches to exclude from update.
1085 &quot;A String&quot;,
1086 ],
1087 &quot;severities&quot;: [ # Install only patches with these severities.
1088 # Common severities include critical, important, moderate, and low.
1089 &quot;A String&quot;,
1090 ],
1091 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
1092 &quot;categories&quot;: [ # Install only patches with these categories.
1093 # Common categories include security, recommended, and feature.
1094 &quot;A String&quot;,
1095 ],
1096 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001097 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001098 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
1099 # job affects. Contains counts of instances in different states. These states
1100 # map to `InstancePatchState`. List patch job instance details to see the
1101 # specific states of each instance.
1102 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
1103 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
1104 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
1105 # ensure that the agent is installed, running, and able to communicate with
1106 # the service.
1107 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
1108 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
1109 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
1110 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
1111 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
1112 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
1113 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
1114 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
1115 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
1116 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
1117 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
1118 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
1119 },
1120 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
1121 # finished without running any updates on the VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001122 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
1123 # VMs must meet all criteria specified. So if both labels and zones are
1124 # specified, the patch job targets only VMs with those labels and in those
1125 # zones.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001126 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
1127 # permitted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
1129 # instances in any zone.
1130 &quot;A String&quot;,
1131 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001132 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
1133 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`,
1134 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
1135 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
1136 &quot;A String&quot;,
1137 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001138 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows
1139 # targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
1140 { # Represents a group of VMs that can be identified as having all these
1141 # labels, for example &quot;env=prod and app=web&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001142 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to
1143 # be targeted by this filter.
Bu Sun Kim65020912020-05-20 12:08:20 -07001144 &quot;a_key&quot;: &quot;A String&quot;,
1145 },
1146 },
1147 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001148 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
1149 # labels, this is another way to group VMs when targeting configs, for
1150 # example prefix=&quot;prod-&quot;.
1151 &quot;A String&quot;,
1152 ],
1153 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001154 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
1155 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001156 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
1157 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
1158 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
1159 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
1160 # failure.
1161 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
1162 # `projects/*/patchJobs/*`
1163 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
1164 # to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001165 }</pre>
1166</div>
1167
1168<div class="method">
1169 <code class="details" id="list">list(parent, filter=None, pageToken=None, pageSize=None, x__xgafv=None)</code>
1170 <pre>Get a list of patch jobs.
1171
1172Args:
1173 parent: string, Required. In the form of `projects/*` (required)
1174 filter: string, If provided, this field specifies the criteria that must be met by patch
1175jobs to be included in the response.
1176Currently, filtering is only available on the patch_deployment field.
1177 pageToken: string, A pagination token returned from a previous call
1178that indicates where this listing should continue from.
1179 pageSize: integer, The maximum number of instance status to return.
1180 x__xgafv: string, V1 error format.
1181 Allowed values
1182 1 - v1 error format
1183 2 - v2 error format
1184
1185Returns:
1186 An object of the form:
1187
1188 { # A response message for listing patch jobs.
1189 &quot;patchJobs&quot;: [ # The list of patch jobs.
1190 { # A high level representation of a patch job that is either in progress
1191 # or has completed.
1192 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001193 # Instance details are not included in the job. To paginate through instance
1194 # details, use `ListPatchJobInstanceDetails`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001195 #
1196 # For more information about patch jobs, see
1197 # [Creating patch
1198 # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001199 &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 -07001200 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001201 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the
1202 # patch job times out.
1203 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied.
1204 # concurrency control when applying patch(es) to all targeted VMs.
1205 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or # The maximum number (or percentage) of VMs per zone to disrupt at any given
1206 # moment. The number of VMs calculated from multiplying the percentage by the
1207 # total number of VMs in a zone is rounded up.
1208 #
1209 # During patching, a VM is considered disrupted from the time the agent is
1210 # notified to begin until patching has completed. This disruption time
1211 # includes the time to complete reboot and any post-patch steps.
1212 #
1213 # A VM contributes to the disruption budget if its patching operation fails
1214 # either when applying the patches, running pre or post patch steps, or if it
1215 # fails to respond with a success notification before timing out. VMs that
1216 # are not running or do not have an active agent do not count toward this
1217 # disruption budget.
1218 #
1219 # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
1220 # the patch job stops, because continuing to the next zone requires
1221 # completion of the patch process in the previous zone.
1222 #
1223 # For example, if the disruption budget has a fixed value of `10`, and 8 VMs
1224 # fail to patch in the current zone, the patch job continues to patch 2 VMs
1225 # at a time until the zone is completed. When that zone is completed
1226 # successfully, patching begins with 10 VMs at a time in the next zone. If 10
1227 # VMs in the next zone fail to patch, the patch job stops.
1228 # relative (&quot;percent&quot;) to a value.
1229 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be
1230 # multiplied by a reference value.
1231 &quot;fixed&quot;: 42, # Specifies a fixed value.
1232 },
1233 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
1234 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied.
1236 # patch(es) to a VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001237 &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
1238 # rules.
1239 # can be set to control how this is executed.
1240 #
1241 # Note that not all settings are supported on all platforms.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001242 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by
1243 # using the yum `--exclude` flag.
1244 &quot;A String&quot;,
1245 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001246 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
1247 # that will be updated. If these packages are not installed, they will be
1248 # ignored. This field must not be specified with any other patch
1249 # configuration fields.
1250 &quot;A String&quot;,
1251 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001252 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
Bu Sun Kim65020912020-05-20 12:08:20 -07001253 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on
1254 # all platforms.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001255 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001256 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
1257 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
1258 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1259 # specified the script will be executed directly, which will likely
1260 # only succeed for scripts with [shebang lines]
1261 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
1262 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
1263 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
1264 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
1265 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
1266 # ensure that the ExecStep specified by this PatchJob does not change.
1267 },
1268 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1269 # execution can return to indicate a success.
1270 42,
1271 ],
1272 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1273 },
1274 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
1275 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1276 # specified the script will be executed directly, which will likely
1277 # only succeed for scripts with [shebang lines]
1278 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
1279 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
1280 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
1281 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
1282 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
1283 # ensure that the ExecStep specified by this PatchJob does not change.
1284 },
1285 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1286 # execution can return to indicate a success.
1287 42,
1288 ],
1289 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1290 },
1291 },
1292 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch
1293 # rules.
1294 },
1295 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001296 &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
1297 # rules.
1298 # upgrade`. Additional options can be set to control how this is executed.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -07001299 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages
1300 # that will be updated. If these packages are not installed, they will be
1301 # ignored. This field cannot be specified with any other patch configuration
1302 # fields.
1303 &quot;A String&quot;,
1304 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001305 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed
1306 # using `apt-get dist-upgrade` instead.
1307 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
1308 &quot;A String&quot;,
1309 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001310 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001311 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
1312 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches
1313 # that will be updated. This field must not be used with other
1314 # patch configurations.
1315 &quot;A String&quot;,
1316 ],
1317 &quot;excludes&quot;: [ # List of KBs to exclude from update.
1318 &quot;A String&quot;,
1319 ],
1320 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all
1321 # updates are applied.
1322 &quot;A String&quot;,
1323 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001324 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001325 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
1326 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
1327 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1328 # specified the script will be executed directly, which will likely
1329 # only succeed for scripts with [shebang lines]
1330 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
1331 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
1332 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
1333 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
1334 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
1335 # ensure that the ExecStep specified by this PatchJob does not change.
1336 },
1337 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1338 # execution can return to indicate a success.
1339 42,
1340 ],
1341 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1342 },
1343 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
1344 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is
1345 # specified the script will be executed directly, which will likely
1346 # only succeed for scripts with [shebang lines]
1347 # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
1348 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
1349 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
1350 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
1351 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to
1352 # ensure that the ExecStep specified by this PatchJob does not change.
1353 },
1354 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the
1355 # execution can return to indicate a success.
1356 42,
1357 ],
1358 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
1359 },
1360 },
1361 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper`
1362 # patch rules.
1363 # See also https://en.opensuse.org/SDB:Zypper_manual.
1364 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches
1365 # that will be installed using &#x27;zypper patch patch:&lt;patch_name&gt;&#x27; command.
1366 # This field must not be used with any other patch configuration fields.
1367 &quot;A String&quot;,
1368 ],
1369 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
1370 &quot;excludes&quot;: [ # List of patches to exclude from update.
1371 &quot;A String&quot;,
1372 ],
1373 &quot;severities&quot;: [ # Install only patches with these severities.
1374 # Common severities include critical, important, moderate, and low.
1375 &quot;A String&quot;,
1376 ],
1377 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
1378 &quot;categories&quot;: [ # Install only patches with these categories.
1379 # Common categories include security, recommended, and feature.
1380 &quot;A String&quot;,
1381 ],
1382 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001383 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001384 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch # Summary of instance details.
1385 # job affects. Contains counts of instances in different states. These states
1386 # map to `InstancePatchState`. List patch job instance details to see the
1387 # specific states of each instance.
1388 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
1389 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
1390 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to
1391 # ensure that the agent is installed, running, and able to communicate with
1392 # the service.
1393 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
1394 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
1395 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
1396 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
1397 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
1398 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
1399 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
1400 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
1401 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
1402 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
1403 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
1404 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
1405 },
1406 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has
1407 # finished without running any updates on the VM instance.
Bu Sun Kim65020912020-05-20 12:08:20 -07001408 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted # Instances to patch.
1409 # VMs must meet all criteria specified. So if both labels and zones are
1410 # specified, the patch job targets only VMs with those labels and in those
1411 # zones.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001412 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is
1413 # permitted.
Bu Sun Kim65020912020-05-20 12:08:20 -07001414 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM
1415 # instances in any zone.
1416 &quot;A String&quot;,
1417 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001418 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their
1419 # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`,
1420 # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or
1421 # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
1422 &quot;A String&quot;,
1423 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001424 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows
1425 # targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
1426 { # Represents a group of VMs that can be identified as having all these
1427 # labels, for example &quot;env=prod and app=web&quot;.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001428 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to
1429 # be targeted by this filter.
Bu Sun Kim65020912020-05-20 12:08:20 -07001430 &quot;a_key&quot;: &quot;A String&quot;,
1431 },
1432 },
1433 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001434 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to
1435 # labels, this is another way to group VMs when targeting configs, for
1436 # example prefix=&quot;prod-&quot;.
1437 &quot;A String&quot;,
1438 ],
1439 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001440 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of
1441 # 0.0 being no progress to 100.0 being complete.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001442 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
1443 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
1444 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
1445 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the
1446 # failure.
1447 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form
1448 # `projects/*/patchJobs/*`
1449 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited
1450 # to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -07001451 },
1452 ],
1453 &quot;nextPageToken&quot;: &quot;A String&quot;, # A pagination token that can be used to get the next page of results.
1454 }</pre>
1455</div>
1456
1457<div class="method">
1458 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1459 <pre>Retrieves the next page of results.
1460
1461Args:
1462 previous_request: The request for the previous page. (required)
1463 previous_response: The response from the request for the previous page. (required)
1464
1465Returns:
1466 A request object that you can call &#x27;execute()&#x27; on to request the next
1467 page. Returns None if there are no more items in the collection.
1468 </pre>
1469</div>
1470
1471</body></html>