blob: 3def40e173cfb244794cdf02a54e7654f046b9b4 [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
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070075<h1><a href="osconfig_v1.html">OS Config API</a> . <a href="osconfig_v1.projects.html">projects</a> . <a href="osconfig_v1.projects.patchJobs.html">patchJobs</a></h1>
Bu Sun Kim65020912020-05-20 12:08:20 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="osconfig_v1.projects.patchJobs.instanceDetails.html">instanceDetails()</a></code>
79</p>
80<p class="firstline">Returns the instanceDetails Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070084<p class="firstline">Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.</p>
85<p class="toc_element">
86 <code><a href="#close">close()</a></code></p>
87<p class="firstline">Close httplib2 connections.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070088<p class="toc_element">
89 <code><a href="#execute">execute(parent, body=None, x__xgafv=None)</a></code></p>
90<p class="firstline">Patch VM instances by creating and running a patch job.</p>
91<p class="toc_element">
92 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070093<p class="firstline">Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.</p>
Bu Sun Kim65020912020-05-20 12:08:20 -070094<p class="toc_element">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -080095 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070096<p class="firstline">Get a list of patch jobs.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<h3>Method Details</h3>
101<div class="method">
102 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <pre>Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700104
105Args:
106 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
107 body: object, The request body.
108 The object takes the form of:
109
110{ # Message for canceling a patch job.
111 }
112
113 x__xgafv: string, V1 error format.
114 Allowed values
115 1 - v1 error format
116 2 - v2 error format
117
118Returns:
119 An object of the form:
120
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use ListPatchJobInstanceDetails. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800122 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.
123 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
124 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
125 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
126 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
127 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
128 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
129 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
130 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
131 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
132 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
133 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
134 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
135 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
136 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
137 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
138 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
139 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800140 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800141 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800142 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800143 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800144 &quot;fixed&quot;: 42, # Specifies a fixed value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800145 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800146 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800147 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
148 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
149 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800150 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800151 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
152 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700153 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800154 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800155 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700156 &quot;A String&quot;,
157 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800158 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=&quot;prod-&quot;.
159 &quot;A String&quot;,
160 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800161 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800162 &quot;A String&quot;,
163 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700164 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
165 { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`.
166 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
167 &quot;a_key&quot;: &quot;A String&quot;,
168 },
169 },
170 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800171 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800172 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800173 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
174 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
175 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules.
176 &quot;excludes&quot;: [ # List of patches to exclude from update.
177 &quot;A String&quot;,
178 ],
179 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
180 &quot;A String&quot;,
181 ],
182 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches that will be installed using &#x27;zypper patch patch:&#x27; command. This field must not be used with any other patch configuration fields.
183 &quot;A String&quot;,
184 ],
185 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
186 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
187 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
188 &quot;A String&quot;,
189 ],
190 },
191 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
192 },
193 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules.
194 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
195 &quot;A String&quot;,
196 ],
197 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
198 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.
199 &quot;A String&quot;,
200 ],
201 },
202 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
203 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows 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 specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
205 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
206 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
207 42,
208 ],
209 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
210 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
211 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
212 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
213 },
214 },
215 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
216 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
217 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
218 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
219 42,
220 ],
221 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
222 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
223 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
224 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
225 },
226 },
227 },
228 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
229 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
230 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
231 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
232 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
233 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
234 42,
235 ],
236 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
237 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
238 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
239 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
240 },
241 },
242 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
243 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
244 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
245 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
246 42,
247 ],
248 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
249 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
250 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
251 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
252 },
253 },
254 },
255 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules.
256 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
257 &quot;A String&quot;,
258 ],
259 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
260 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
261 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
262 &quot;A String&quot;,
263 ],
264 },
265 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
266 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
267 &quot;A String&quot;,
268 ],
269 &quot;excludes&quot;: [ # List of KBs to exclude from update.
270 &quot;A String&quot;,
271 ],
272 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.
273 &quot;A String&quot;,
274 ],
275 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800276 },
277 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800278 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 }</pre>
280</div>
281
282<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700283 <code class="details" id="close">close()</code>
284 <pre>Close httplib2 connections.</pre>
285</div>
286
287<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700288 <code class="details" id="execute">execute(parent, body=None, x__xgafv=None)</code>
289 <pre>Patch VM instances by creating and running a patch job.
290
291Args:
292 parent: string, Required. The project in which to run this patch in the form `projects/*` (required)
293 body: object, The request body.
294 The object takes the form of:
295
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700296{ # A request message to initiate patching across Compute Engine instances.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800297 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800298 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but will do nothing.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800299 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. If omitted, instances are patched using the default configurations.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800300 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules.
301 &quot;excludes&quot;: [ # List of patches to exclude from update.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800302 &quot;A String&quot;,
303 ],
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800304 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
305 &quot;A String&quot;,
306 ],
307 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches that will be installed using &#x27;zypper patch patch:&#x27; command. This field must not be used with any other patch configuration fields.
308 &quot;A String&quot;,
309 ],
310 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
311 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
312 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
313 &quot;A String&quot;,
314 ],
315 },
316 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
317 },
318 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800319 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
320 &quot;A String&quot;,
321 ],
322 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800323 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.
324 &quot;A String&quot;,
325 ],
326 },
327 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
328 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
329 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
330 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
331 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
332 42,
333 ],
334 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
335 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
336 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
337 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
338 },
339 },
340 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
341 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
342 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
343 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
344 42,
345 ],
346 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
347 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
348 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
349 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
350 },
351 },
352 },
353 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
354 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
355 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
356 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
357 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
358 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
359 42,
360 ],
361 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
362 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
363 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
364 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
365 },
366 },
367 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
368 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
369 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
370 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
371 42,
372 ],
373 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
374 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
375 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
376 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
377 },
378 },
379 },
380 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules.
381 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
382 &quot;A String&quot;,
383 ],
384 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
385 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
386 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
387 &quot;A String&quot;,
388 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800389 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800390 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
391 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
392 &quot;A String&quot;,
393 ],
394 &quot;excludes&quot;: [ # List of KBs to exclude from update.
395 &quot;A String&quot;,
396 ],
397 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.
398 &quot;A String&quot;,
399 ],
400 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800401 },
402 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This does not have to be unique.
403 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy of the patch job.
404 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
405 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
406 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
407 &quot;fixed&quot;: 42, # Specifies a fixed value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800408 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800409 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800410 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800411 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800412 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
413 &quot;A String&quot;,
414 ],
415 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=&quot;prod-&quot;.
416 &quot;A String&quot;,
417 ],
418 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
419 &quot;A String&quot;,
420 ],
421 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
422 { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`.
423 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
424 &quot;a_key&quot;: &quot;A String&quot;,
425 },
426 },
427 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800428 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800429 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 }
431
432 x__xgafv: string, V1 error format.
433 Allowed values
434 1 - v1 error format
435 2 - v2 error format
436
437Returns:
438 An object of the form:
439
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700440 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use ListPatchJobInstanceDetails. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800441 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.
442 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
443 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
444 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
445 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
446 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
447 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
448 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
449 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
450 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
451 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
452 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
453 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
454 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
455 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
456 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
457 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
458 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800459 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800460 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800461 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800462 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800463 &quot;fixed&quot;: 42, # Specifies a fixed value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800464 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800465 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800466 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
467 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
468 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800469 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800470 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
471 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700472 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800473 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800474 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700475 &quot;A String&quot;,
476 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800477 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=&quot;prod-&quot;.
478 &quot;A String&quot;,
479 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800480 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800481 &quot;A String&quot;,
482 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700483 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
484 { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`.
485 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
486 &quot;a_key&quot;: &quot;A String&quot;,
487 },
488 },
489 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800490 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800491 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800492 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
493 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
494 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules.
495 &quot;excludes&quot;: [ # List of patches to exclude from update.
496 &quot;A String&quot;,
497 ],
498 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
499 &quot;A String&quot;,
500 ],
501 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches that will be installed using &#x27;zypper patch patch:&#x27; command. This field must not be used with any other patch configuration fields.
502 &quot;A String&quot;,
503 ],
504 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
505 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
506 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
507 &quot;A String&quot;,
508 ],
509 },
510 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
511 },
512 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules.
513 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
514 &quot;A String&quot;,
515 ],
516 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
517 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.
518 &quot;A String&quot;,
519 ],
520 },
521 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
522 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
523 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
524 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
525 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
526 42,
527 ],
528 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
529 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
530 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
531 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
532 },
533 },
534 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
535 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
536 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
537 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
538 42,
539 ],
540 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
541 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
542 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
543 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
544 },
545 },
546 },
547 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
548 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
549 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
550 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
551 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
552 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
553 42,
554 ],
555 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
556 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
557 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
558 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
559 },
560 },
561 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
562 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
563 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
564 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
565 42,
566 ],
567 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
568 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
569 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
570 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
571 },
572 },
573 },
574 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules.
575 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
576 &quot;A String&quot;,
577 ],
578 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
579 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
580 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
581 &quot;A String&quot;,
582 ],
583 },
584 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
585 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
586 &quot;A String&quot;,
587 ],
588 &quot;excludes&quot;: [ # List of KBs to exclude from update.
589 &quot;A String&quot;,
590 ],
591 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.
592 &quot;A String&quot;,
593 ],
594 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800595 },
596 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800597 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 }</pre>
599</div>
600
601<div class="method">
602 <code class="details" id="get">get(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700603 <pre>Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.
Bu Sun Kim65020912020-05-20 12:08:20 -0700604
605Args:
606 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
607 x__xgafv: string, V1 error format.
608 Allowed values
609 1 - v1 error format
610 2 - v2 error format
611
612Returns:
613 An object of the form:
614
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700615 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use ListPatchJobInstanceDetails. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800616 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.
617 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
618 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
619 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
620 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
621 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
622 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
623 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
624 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
625 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
626 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
627 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
628 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
629 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
630 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
631 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
632 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
633 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800634 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800635 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800636 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800637 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800638 &quot;fixed&quot;: 42, # Specifies a fixed value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800639 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800640 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800641 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
642 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
643 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800644 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800645 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
646 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700647 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800648 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800649 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700650 &quot;A String&quot;,
651 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800652 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=&quot;prod-&quot;.
653 &quot;A String&quot;,
654 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800655 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800656 &quot;A String&quot;,
657 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700658 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
659 { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`.
660 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
661 &quot;a_key&quot;: &quot;A String&quot;,
662 },
663 },
664 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800665 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800666 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800667 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
668 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
669 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules.
670 &quot;excludes&quot;: [ # List of patches to exclude from update.
671 &quot;A String&quot;,
672 ],
673 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
674 &quot;A String&quot;,
675 ],
676 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches that will be installed using &#x27;zypper patch patch:&#x27; command. This field must not be used with any other patch configuration fields.
677 &quot;A String&quot;,
678 ],
679 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
680 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
681 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
682 &quot;A String&quot;,
683 ],
684 },
685 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
686 },
687 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules.
688 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
689 &quot;A String&quot;,
690 ],
691 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
692 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.
693 &quot;A String&quot;,
694 ],
695 },
696 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
697 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
698 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
699 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
700 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
701 42,
702 ],
703 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
704 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
705 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
706 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
707 },
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 specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
711 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
712 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
713 42,
714 ],
715 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
716 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
717 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
718 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
719 },
720 },
721 },
722 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
723 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
724 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
725 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
726 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
727 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
728 42,
729 ],
730 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
731 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
732 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
733 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
734 },
735 },
736 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
737 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
738 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
739 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
740 42,
741 ],
742 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
743 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
744 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
745 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
746 },
747 },
748 },
749 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules.
750 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
751 &quot;A String&quot;,
752 ],
753 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
754 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
755 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
756 &quot;A String&quot;,
757 ],
758 },
759 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
760 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
761 &quot;A String&quot;,
762 ],
763 &quot;excludes&quot;: [ # List of KBs to exclude from update.
764 &quot;A String&quot;,
765 ],
766 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.
767 &quot;A String&quot;,
768 ],
769 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800770 },
771 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800772 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 }</pre>
774</div>
775
776<div class="method">
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800777 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 <pre>Get a list of patch jobs.
779
780Args:
781 parent: string, Required. In the form of `projects/*` (required)
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800782 filter: string, If provided, this field specifies the criteria that must be met by patch jobs to be included in the response. Currently, filtering is only available on the patch_deployment field.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800783 pageSize: integer, The maximum number of instance status to return.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800784 pageToken: string, A pagination token returned from a previous call that indicates where this listing should continue from.
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 x__xgafv: string, V1 error format.
786 Allowed values
787 1 - v1 error format
788 2 - v2 error format
789
790Returns:
791 An object of the form:
792
793 { # A response message for listing patch jobs.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800794 &quot;nextPageToken&quot;: &quot;A String&quot;, # A pagination token that can be used to get the next page of results.
Bu Sun Kim65020912020-05-20 12:08:20 -0700795 &quot;patchJobs&quot;: [ # The list of patch jobs.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700796 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use ListPatchJobInstanceDetails. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800797 &quot;percentComplete&quot;: 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.
798 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
799 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
800 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
801 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
802 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
803 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
804 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
805 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
806 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
807 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
808 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
809 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
810 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
811 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
812 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
813 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
814 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800815 &quot;rollout&quot;: { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800816 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800817 &quot;disruptionBudget&quot;: { # Message encapsulating a value that can be either absolute (&quot;fixed&quot;) or relative (&quot;percent&quot;) to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800818 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800819 &quot;fixed&quot;: 42, # Specifies a fixed value.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800820 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800821 },
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800822 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
823 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
824 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800825 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800826 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
827 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700828 &quot;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800829 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800830 &quot;instances&quot;: [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700831 &quot;A String&quot;,
832 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800833 &quot;instanceNamePrefixes&quot;: [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=&quot;prod-&quot;.
834 &quot;A String&quot;,
835 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800836 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800837 &quot;A String&quot;,
838 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700839 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
840 { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{&quot;env&quot;:&quot;test&quot;, &quot;app&quot;:&quot;web&quot;}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`.
841 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
842 &quot;a_key&quot;: &quot;A String&quot;,
843 },
844 },
845 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800846 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800847 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800848 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
849 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
850 &quot;zypper&quot;: { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules.
851 &quot;excludes&quot;: [ # List of patches to exclude from update.
852 &quot;A String&quot;,
853 ],
854 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
855 &quot;A String&quot;,
856 ],
857 &quot;exclusivePatches&quot;: [ # An exclusive list of patches to be updated. These are the only patches that will be installed using &#x27;zypper patch patch:&#x27; command. This field must not be used with any other patch configuration fields.
858 &quot;A String&quot;,
859 ],
860 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
861 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
862 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
863 &quot;A String&quot;,
864 ],
865 },
866 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
867 },
868 &quot;apt&quot;: { # Apt patching is completed by executing `apt-get update &amp;&amp; apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules.
869 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
870 &quot;A String&quot;,
871 ],
872 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
873 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.
874 &quot;A String&quot;,
875 ],
876 },
877 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
878 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
879 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
880 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
881 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
882 42,
883 ],
884 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
885 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
886 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
887 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
888 },
889 },
890 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
891 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
892 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
893 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
894 42,
895 ],
896 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
897 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
898 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
899 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
900 },
901 },
902 },
903 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
904 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
905 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
906 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
907 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
908 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
909 42,
910 ],
911 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
912 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
913 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
914 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
915 },
916 },
917 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
918 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
919 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
920 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
921 42,
922 ],
923 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
924 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
925 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
926 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
927 },
928 },
929 },
930 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules.
931 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
932 &quot;A String&quot;,
933 ],
934 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
935 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
936 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
937 &quot;A String&quot;,
938 ],
939 },
940 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
941 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
942 &quot;A String&quot;,
943 ],
944 &quot;excludes&quot;: [ # List of KBs to exclude from update.
945 &quot;A String&quot;,
946 ],
947 &quot;exclusivePatches&quot;: [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.
948 &quot;A String&quot;,
949 ],
950 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800951 },
952 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
Yoshi Automation Bot0bf565c2020-12-09 08:56:03 -0800953 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700954 },
955 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700956 }</pre>
957</div>
958
959<div class="method">
960 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
961 <pre>Retrieves the next page of results.
962
963Args:
964 previous_request: The request for the previous page. (required)
965 previous_response: The response from the request for the previous page. (required)
966
967Returns:
968 A request object that you can call &#x27;execute()&#x27; on to request the next
969 page. Returns None if there are no more items in the collection.
970 </pre>
971</div>
972
973</body></html>