blob: 2f31ccdd5d8556e61890e14570aefeacc616ebe8 [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 Botb6971b02020-11-26 17:16:03 -080095 <code><a href="#list">list(parent, pageSize=None, filter=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 Botb6971b02020-11-26 17:16:03 -0800122 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
123 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800124 &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 -0800125 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800126 &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.
127 &quot;fixed&quot;: 42, # Specifies a fixed value.
128 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
129 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800130 },
131 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800132 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800133 &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.
134 &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.
135 &quot;A String&quot;,
136 ],
137 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
138 &quot;A String&quot;,
139 ],
140 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
141 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800142 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
143 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
144 &quot;A String&quot;,
145 ],
146 &quot;excludes&quot;: [ # List of KBs to exclude from update.
147 &quot;A String&quot;,
148 ],
149 &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.
150 &quot;A String&quot;,
151 ],
152 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800153 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800154 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800155 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
156 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
157 &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.
158 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
159 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800160 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
161 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
162 42,
163 ],
164 &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\)).
165 },
166 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
167 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
168 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
169 &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.
170 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
171 },
172 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
173 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
174 42,
175 ],
176 &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\)).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800177 },
178 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800179 &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.
180 &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.
181 &quot;A String&quot;,
182 ],
183 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
184 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
185 &quot;A String&quot;,
186 ],
187 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
188 &quot;A String&quot;,
189 ],
190 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
191 &quot;excludes&quot;: [ # List of patches to exclude from update.
192 &quot;A String&quot;,
193 ],
194 },
195 &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.
196 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
197 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
198 &quot;A String&quot;,
199 ],
200 &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.
201 &quot;A String&quot;,
202 ],
203 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
204 },
205 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
206 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
207 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
208 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
209 &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.
210 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
211 },
212 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
213 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
214 42,
215 ],
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 },
218 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
219 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
220 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
221 &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.
222 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
223 },
224 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
225 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
226 42,
227 ],
228 &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\)).
229 },
230 },
231 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
232 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800233 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800234 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800235 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800236 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700237 &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 Botb6971b02020-11-26 17:16:03 -0800238 &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 -0700239 &quot;A String&quot;,
240 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800241 &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;.
242 &quot;A String&quot;,
243 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800244 &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 -0800245 &quot;A String&quot;,
246 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700247 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
248 { # 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`.
249 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
250 &quot;a_key&quot;: &quot;A String&quot;,
251 },
252 },
253 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800254 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800255 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800256 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800257 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800258 &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.
259 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
260 &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.
261 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
262 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
263 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
264 &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.
265 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
266 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
267 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
268 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
269 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
270 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
271 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
272 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
273 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
274 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
275 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
276 },
277 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
278 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
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 Botb6971b02020-11-26 17:16:03 -0800298 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
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 Bot0d561ef2020-11-25 07:50:41 -0800300 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800301 &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.
302 &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.
303 &quot;A String&quot;,
304 ],
305 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
306 &quot;A String&quot;,
307 ],
308 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
309 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800310 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
311 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
312 &quot;A String&quot;,
313 ],
314 &quot;excludes&quot;: [ # List of KBs to exclude from update.
315 &quot;A String&quot;,
316 ],
317 &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.
318 &quot;A String&quot;,
319 ],
320 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800321 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800322 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800323 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
324 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
325 &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.
326 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
327 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800328 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
329 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
330 42,
331 ],
332 &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\)).
333 },
334 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
335 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
336 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket 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 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
339 },
340 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
341 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
342 42,
343 ],
344 &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\)).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800345 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800346 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800347 &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.
348 &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.
349 &quot;A String&quot;,
350 ],
351 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
352 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
353 &quot;A String&quot;,
354 ],
355 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
356 &quot;A String&quot;,
357 ],
358 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
359 &quot;excludes&quot;: [ # List of patches to exclude from update.
360 &quot;A String&quot;,
361 ],
362 },
363 &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.
364 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
365 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
366 &quot;A String&quot;,
367 ],
368 &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.
369 &quot;A String&quot;,
370 ],
371 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
372 },
373 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
374 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
375 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
376 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
377 &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.
378 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
379 },
380 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
381 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
382 42,
383 ],
384 &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\)).
385 },
386 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
387 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
388 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
389 &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.
390 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
391 },
392 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
393 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
394 42,
395 ],
396 &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\)).
397 },
398 },
399 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
400 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800401 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800402 &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.
403 &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]`
404 &quot;A String&quot;,
405 ],
406 &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;.
407 &quot;A String&quot;,
408 ],
409 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
410 &quot;A String&quot;,
411 ],
412 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
413 { # 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`.
414 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
415 &quot;a_key&quot;: &quot;A String&quot;,
416 },
417 },
418 ],
419 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
420 },
421 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but will do nothing.
422 &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.
423 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
424 &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.
425 &quot;fixed&quot;: 42, # Specifies a fixed value.
426 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
427 },
428 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800429 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This does not have to be unique.
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 Botb6971b02020-11-26 17:16:03 -0800441 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
442 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800443 &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 -0800444 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800445 &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.
446 &quot;fixed&quot;: 42, # Specifies a fixed value.
447 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
448 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800449 },
450 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800451 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800452 &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.
453 &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.
454 &quot;A String&quot;,
455 ],
456 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
457 &quot;A String&quot;,
458 ],
459 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
460 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800461 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
462 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
463 &quot;A String&quot;,
464 ],
465 &quot;excludes&quot;: [ # List of KBs to exclude from update.
466 &quot;A String&quot;,
467 ],
468 &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.
469 &quot;A String&quot;,
470 ],
471 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800472 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800473 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800474 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
475 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
476 &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.
477 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
478 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800479 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
480 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
481 42,
482 ],
483 &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\)).
484 },
485 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
486 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
487 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
488 &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.
489 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
490 },
491 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
492 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
493 42,
494 ],
495 &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\)).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800496 },
497 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800498 &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.
499 &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.
500 &quot;A String&quot;,
501 ],
502 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
503 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
504 &quot;A String&quot;,
505 ],
506 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
507 &quot;A String&quot;,
508 ],
509 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
510 &quot;excludes&quot;: [ # List of patches to exclude from update.
511 &quot;A String&quot;,
512 ],
513 },
514 &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.
515 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
516 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
517 &quot;A String&quot;,
518 ],
519 &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.
520 &quot;A String&quot;,
521 ],
522 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
523 },
524 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
525 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
526 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
527 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
528 &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.
529 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
530 },
531 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
532 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
533 42,
534 ],
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 },
537 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
538 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
539 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
540 &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.
541 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
542 },
543 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
544 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
545 42,
546 ],
547 &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\)).
548 },
549 },
550 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
551 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800552 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800553 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800554 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800555 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700556 &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 Botb6971b02020-11-26 17:16:03 -0800557 &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 -0700558 &quot;A String&quot;,
559 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800560 &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;.
561 &quot;A String&quot;,
562 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800563 &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 -0800564 &quot;A String&quot;,
565 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700566 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
567 { # 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`.
568 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
569 &quot;a_key&quot;: &quot;A String&quot;,
570 },
571 },
572 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800573 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800574 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800575 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800576 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800577 &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.
578 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
579 &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.
580 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
581 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
582 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
583 &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.
584 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
585 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
586 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
587 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
588 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
589 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
590 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
591 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
592 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
593 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
594 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
595 },
596 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
597 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
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 Botb6971b02020-11-26 17:16:03 -0800616 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
617 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800618 &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 -0800619 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800620 &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.
621 &quot;fixed&quot;: 42, # Specifies a fixed value.
622 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
623 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800624 },
625 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800626 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800627 &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.
628 &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.
629 &quot;A String&quot;,
630 ],
631 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
632 &quot;A String&quot;,
633 ],
634 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
635 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800636 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
637 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
638 &quot;A String&quot;,
639 ],
640 &quot;excludes&quot;: [ # List of KBs to exclude from update.
641 &quot;A String&quot;,
642 ],
643 &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.
644 &quot;A String&quot;,
645 ],
646 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800647 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800648 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800649 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
650 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
651 &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.
652 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
653 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800654 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
655 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
656 42,
657 ],
658 &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\)).
659 },
660 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
661 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
662 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
663 &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.
664 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
665 },
666 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
667 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
668 42,
669 ],
670 &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\)).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800671 },
672 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800673 &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.
674 &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.
675 &quot;A String&quot;,
676 ],
677 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
678 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
679 &quot;A String&quot;,
680 ],
681 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
682 &quot;A String&quot;,
683 ],
684 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
685 &quot;excludes&quot;: [ # List of patches to exclude from update.
686 &quot;A String&quot;,
687 ],
688 },
689 &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.
690 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
691 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
692 &quot;A String&quot;,
693 ],
694 &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.
695 &quot;A String&quot;,
696 ],
697 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
698 },
699 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
700 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
701 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
702 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
703 &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.
704 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
705 },
706 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
707 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
708 42,
709 ],
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 },
712 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
713 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
714 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
715 &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.
716 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
717 },
718 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
719 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
720 42,
721 ],
722 &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\)).
723 },
724 },
725 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
726 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800727 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800728 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800729 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800730 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700731 &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 Botb6971b02020-11-26 17:16:03 -0800732 &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 -0700733 &quot;A String&quot;,
734 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800735 &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;.
736 &quot;A String&quot;,
737 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800738 &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 -0800739 &quot;A String&quot;,
740 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700741 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
742 { # 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`.
743 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
744 &quot;a_key&quot;: &quot;A String&quot;,
745 },
746 },
747 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800748 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800749 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800750 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800751 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800752 &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.
753 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
754 &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.
755 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
756 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
757 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
758 &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.
759 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
760 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
761 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
762 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
763 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
764 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
765 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
766 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
767 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
768 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
769 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
770 },
771 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
772 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 }</pre>
774</div>
775
776<div class="method">
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800777 <code class="details" id="list">list(parent, pageSize=None, filter=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)
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700782 pageSize: integer, The maximum number of instance status to return.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800783 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 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.
794 &quot;patchJobs&quot;: [ # The list of patch jobs.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700795 { # 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 Botb6971b02020-11-26 17:16:03 -0800796 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
797 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800798 &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 -0800799 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800800 &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.
801 &quot;fixed&quot;: 42, # Specifies a fixed value.
802 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
803 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800804 },
805 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800806 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800807 &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.
808 &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.
809 &quot;A String&quot;,
810 ],
811 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
812 &quot;A String&quot;,
813 ],
814 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
815 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800816 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
817 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
818 &quot;A String&quot;,
819 ],
820 &quot;excludes&quot;: [ # List of KBs to exclude from update.
821 &quot;A String&quot;,
822 ],
823 &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.
824 &quot;A String&quot;,
825 ],
826 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800827 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800828 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800829 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
830 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
831 &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.
832 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
833 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800834 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
835 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
836 42,
837 ],
838 &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\)).
839 },
840 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
841 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
842 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
843 &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.
844 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
845 },
846 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
847 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
848 42,
849 ],
850 &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\)).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800851 },
852 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800853 &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.
854 &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.
855 &quot;A String&quot;,
856 ],
857 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
858 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
859 &quot;A String&quot;,
860 ],
861 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
862 &quot;A String&quot;,
863 ],
864 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
865 &quot;excludes&quot;: [ # List of patches to exclude from update.
866 &quot;A String&quot;,
867 ],
868 },
869 &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.
870 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
871 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
872 &quot;A String&quot;,
873 ],
874 &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.
875 &quot;A String&quot;,
876 ],
877 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
878 },
879 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
880 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
881 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
882 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
883 &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.
884 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
885 },
886 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
887 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
888 42,
889 ],
890 &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\)).
891 },
892 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
893 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
894 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
895 &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.
896 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
897 },
898 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
899 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
900 42,
901 ],
902 &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\)).
903 },
904 },
905 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
906 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800907 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800908 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800909 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800910 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700911 &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 Botb6971b02020-11-26 17:16:03 -0800912 &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 -0700913 &quot;A String&quot;,
914 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800915 &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;.
916 &quot;A String&quot;,
917 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800918 &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 -0800919 &quot;A String&quot;,
920 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700921 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
922 { # 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`.
923 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
924 &quot;a_key&quot;: &quot;A String&quot;,
925 },
926 },
927 ],
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800928 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800929 },
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800930 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800931 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
Yoshi Automation Botb6971b02020-11-26 17:16:03 -0800932 &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.
933 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
934 &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.
935 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
936 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
937 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
938 &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.
939 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
940 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
941 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
942 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
943 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
944 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
945 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
946 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
947 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
948 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
949 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
950 },
951 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
952 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 },
954 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700955 &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 -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>