blob: b87e45d627bd3207f4613bbb162f91a5f56f9c39 [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 Botc2228be2020-11-24 15:48:03 -080095 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070096<p class="firstline">Get a list of patch jobs.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<h3>Method Details</h3>
101<div class="method">
102 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <pre>Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700104
105Args:
106 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
107 body: object, The request body.
108 The object takes the form of:
109
110{ # Message for canceling a patch job.
111 }
112
113 x__xgafv: string, V1 error format.
114 Allowed values
115 1 - v1 error format
116 2 - v2 error format
117
118Returns:
119 An object of the form:
120
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use ListPatchJobInstanceDetails. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800122 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
123 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
124 &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.
125 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
126 &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.
127 &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.
128 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
129 &quot;fixed&quot;: 42, # Specifies a fixed value.
130 },
131 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
132 },
133 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
134 &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.
135 &quot;excludes&quot;: [ # List of patches to exclude from update.
136 &quot;A String&quot;,
137 ],
138 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
139 &quot;A String&quot;,
140 ],
141 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
142 &quot;A String&quot;,
143 ],
144 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
145 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
146 &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.
147 &quot;A String&quot;,
148 ],
149 },
150 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
151 },
152 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
153 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
154 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
155 &quot;A String&quot;,
156 ],
157 &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.
158 &quot;A String&quot;,
159 ],
160 &quot;excludes&quot;: [ # List of KBs to exclude from update.
161 &quot;A String&quot;,
162 ],
163 },
164 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
165 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
166 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
167 &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\)).
168 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
169 42,
170 ],
171 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
172 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
173 &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.
174 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
175 },
176 },
177 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
178 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
179 &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\)).
180 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
181 42,
182 ],
183 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
184 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
185 &quot;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.
186 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
187 },
188 },
189 },
190 &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.
191 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
192 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
193 &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.
194 &quot;A String&quot;,
195 ],
196 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
197 &quot;A String&quot;,
198 ],
199 },
200 &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.
201 &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.
202 &quot;A String&quot;,
203 ],
204 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
205 &quot;A String&quot;,
206 ],
207 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
208 },
209 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
210 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
211 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
212 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
217 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
218 &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.
219 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
220 },
221 },
222 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
223 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
224 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
229 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
230 &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.
231 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
232 },
233 },
234 },
235 },
236 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
237 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
238 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
239 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
240 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
241 &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.
242 &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.
243 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
244 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
245 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
246 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
247 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
248 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
249 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
250 &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.
251 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
252 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
253 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
254 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
255 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
256 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
257 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
258 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700259 &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.
260 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
261 &quot;A String&quot;,
262 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800263 &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;.
264 &quot;A String&quot;,
265 ],
266 &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]`
267 &quot;A String&quot;,
268 ],
269 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700270 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
271 { # 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`.
272 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
273 &quot;a_key&quot;: &quot;A String&quot;,
274 },
275 },
276 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800277 },
278 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
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 Bot0d561ef2020-11-25 07:50:41 -0800297 &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.
298 &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.
299 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
300 &quot;fixed&quot;: 42, # Specifies a fixed value.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800301 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800302 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700303 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700304 &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.
305 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
306 &quot;A String&quot;,
307 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800308 &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;.
309 &quot;A String&quot;,
310 ],
311 &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]`
312 &quot;A String&quot;,
313 ],
314 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700315 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
316 { # 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`.
317 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
318 &quot;a_key&quot;: &quot;A String&quot;,
319 },
320 },
321 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700322 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800323 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but will do nothing.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800324 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800325 &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.
326 &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.
327 &quot;excludes&quot;: [ # List of patches to exclude from update.
328 &quot;A String&quot;,
329 ],
330 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
331 &quot;A String&quot;,
332 ],
333 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
334 &quot;A String&quot;,
335 ],
336 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
337 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
338 &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.
339 &quot;A String&quot;,
340 ],
341 },
342 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
343 },
344 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
345 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
346 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
347 &quot;A String&quot;,
348 ],
349 &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.
350 &quot;A String&quot;,
351 ],
352 &quot;excludes&quot;: [ # List of KBs to exclude from update.
353 &quot;A String&quot;,
354 ],
355 },
356 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
357 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
358 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
359 &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\)).
360 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
361 42,
362 ],
363 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
364 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
365 &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.
366 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
367 },
368 },
369 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
370 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
371 &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\)).
372 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
373 42,
374 ],
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 },
381 },
382 &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.
383 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
384 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
385 &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.
386 &quot;A String&quot;,
387 ],
388 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
389 &quot;A String&quot;,
390 ],
391 },
392 &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.
393 &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.
394 &quot;A String&quot;,
395 ],
396 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
397 &quot;A String&quot;,
398 ],
399 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
400 },
401 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
402 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
403 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
404 &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\)).
405 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
406 42,
407 ],
408 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
409 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
410 &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.
411 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
412 },
413 },
414 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
415 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
416 &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\)).
417 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
418 42,
419 ],
420 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
421 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
422 &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.
423 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
424 },
425 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800426 },
427 },
428 &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 -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 Bot0d561ef2020-11-25 07:50:41 -0800441 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
442 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
443 &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.
444 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
445 &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.
446 &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.
447 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
448 &quot;fixed&quot;: 42, # Specifies a fixed value.
449 },
450 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
451 },
452 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
453 &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.
454 &quot;excludes&quot;: [ # List of patches to exclude from update.
455 &quot;A String&quot;,
456 ],
457 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
458 &quot;A String&quot;,
459 ],
460 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
461 &quot;A String&quot;,
462 ],
463 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
464 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
465 &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.
466 &quot;A String&quot;,
467 ],
468 },
469 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
470 },
471 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
472 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
473 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
474 &quot;A String&quot;,
475 ],
476 &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.
477 &quot;A String&quot;,
478 ],
479 &quot;excludes&quot;: [ # List of KBs to exclude from update.
480 &quot;A String&quot;,
481 ],
482 },
483 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
484 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
485 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
486 &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\)).
487 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
488 42,
489 ],
490 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
491 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
492 &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.
493 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
494 },
495 },
496 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
497 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
498 &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\)).
499 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
500 42,
501 ],
502 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
503 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
504 &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.
505 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
506 },
507 },
508 },
509 &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.
510 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
511 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
512 &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.
513 &quot;A String&quot;,
514 ],
515 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
516 &quot;A String&quot;,
517 ],
518 },
519 &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.
520 &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.
521 &quot;A String&quot;,
522 ],
523 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
524 &quot;A String&quot;,
525 ],
526 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
527 },
528 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
529 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
530 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
531 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
536 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
537 &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.
538 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
539 },
540 },
541 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
542 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
543 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
548 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
549 &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.
550 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
551 },
552 },
553 },
554 },
555 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
556 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
557 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
558 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
559 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
560 &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.
561 &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.
562 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
563 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
564 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
565 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
566 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
567 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
568 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
569 &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.
570 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
571 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
572 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
573 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
574 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
575 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
576 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
577 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700578 &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.
579 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
580 &quot;A String&quot;,
581 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800582 &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;.
583 &quot;A String&quot;,
584 ],
585 &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]`
586 &quot;A String&quot;,
587 ],
588 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700589 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
590 { # 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`.
591 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
592 &quot;a_key&quot;: &quot;A String&quot;,
593 },
594 },
595 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800596 },
597 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
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 Bot0d561ef2020-11-25 07:50:41 -0800616 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
617 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
618 &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.
619 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
620 &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.
621 &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.
622 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
623 &quot;fixed&quot;: 42, # Specifies a fixed value.
624 },
625 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
626 },
627 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
628 &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.
629 &quot;excludes&quot;: [ # List of patches to exclude from update.
630 &quot;A String&quot;,
631 ],
632 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
633 &quot;A String&quot;,
634 ],
635 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
636 &quot;A String&quot;,
637 ],
638 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
639 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
640 &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.
641 &quot;A String&quot;,
642 ],
643 },
644 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
645 },
646 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
647 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
648 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
649 &quot;A String&quot;,
650 ],
651 &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.
652 &quot;A String&quot;,
653 ],
654 &quot;excludes&quot;: [ # List of KBs to exclude from update.
655 &quot;A String&quot;,
656 ],
657 },
658 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
659 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
660 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
661 &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\)).
662 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
663 42,
664 ],
665 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
666 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
667 &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.
668 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
669 },
670 },
671 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
672 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
673 &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\)).
674 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
675 42,
676 ],
677 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
678 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
679 &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.
680 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
681 },
682 },
683 },
684 &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.
685 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
686 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
687 &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.
688 &quot;A String&quot;,
689 ],
690 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
691 &quot;A String&quot;,
692 ],
693 },
694 &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.
695 &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.
696 &quot;A String&quot;,
697 ],
698 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
699 &quot;A String&quot;,
700 ],
701 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
702 },
703 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
704 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
705 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
706 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
711 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
712 &quot;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.
713 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
714 },
715 },
716 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
717 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
718 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
723 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
724 &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.
725 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
726 },
727 },
728 },
729 },
730 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
731 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
732 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
733 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
734 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
735 &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.
736 &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.
737 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
738 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
739 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
740 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
741 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
742 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
743 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
744 &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.
745 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
746 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
747 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
748 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
749 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
750 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
751 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
752 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700753 &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.
754 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
755 &quot;A String&quot;,
756 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800757 &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;.
758 &quot;A String&quot;,
759 ],
760 &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]`
761 &quot;A String&quot;,
762 ],
763 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700764 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
765 { # 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`.
766 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
767 &quot;a_key&quot;: &quot;A String&quot;,
768 },
769 },
770 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800771 },
772 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 }</pre>
774</div>
775
776<div class="method">
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800777 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 <pre>Get a list of patch jobs.
779
780Args:
781 parent: string, Required. In the form of `projects/*` (required)
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700782 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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700783 pageSize: integer, The maximum number of instance status to return.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800784 pageToken: string, A pagination token returned from a previous call that indicates where this listing should continue from.
Bu Sun Kim65020912020-05-20 12:08:20 -0700785 x__xgafv: string, V1 error format.
786 Allowed values
787 1 - v1 error format
788 2 - v2 error format
789
790Returns:
791 An object of the form:
792
793 { # A response message for listing patch jobs.
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 Bot0d561ef2020-11-25 07:50:41 -0800796 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
797 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
798 &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.
799 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
800 &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.
801 &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.
802 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
803 &quot;fixed&quot;: 42, # Specifies a fixed value.
804 },
805 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
806 },
807 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
808 &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.
809 &quot;excludes&quot;: [ # List of patches to exclude from update.
810 &quot;A String&quot;,
811 ],
812 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
813 &quot;A String&quot;,
814 ],
815 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
816 &quot;A String&quot;,
817 ],
818 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
819 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
820 &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.
821 &quot;A String&quot;,
822 ],
823 },
824 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
825 },
826 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
827 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
828 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
829 &quot;A String&quot;,
830 ],
831 &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.
832 &quot;A String&quot;,
833 ],
834 &quot;excludes&quot;: [ # List of KBs to exclude from update.
835 &quot;A String&quot;,
836 ],
837 },
838 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
839 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
840 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
841 &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\)).
842 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
843 42,
844 ],
845 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
846 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
847 &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.
848 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
849 },
850 },
851 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
852 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
853 &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\)).
854 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
855 42,
856 ],
857 &quot;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
858 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
859 &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.
860 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
861 },
862 },
863 },
864 &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.
865 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
866 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
867 &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.
868 &quot;A String&quot;,
869 ],
870 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
871 &quot;A String&quot;,
872 ],
873 },
874 &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.
875 &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.
876 &quot;A String&quot;,
877 ],
878 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
879 &quot;A String&quot;,
880 ],
881 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
882 },
883 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
884 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
885 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
886 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
891 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
892 &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.
893 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
894 },
895 },
896 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
897 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
898 &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\)).
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;gcsObject&quot;: { # Cloud Storage object representation. # A Cloud Storage object containing the executable.
903 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Cloud Storage object.
904 &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.
905 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Cloud Storage object.
906 },
907 },
908 },
909 },
910 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
911 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
912 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
913 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
914 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
915 &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.
916 &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.
917 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
918 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
919 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
920 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
921 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
922 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
923 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
924 &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.
925 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
926 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
927 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
928 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
929 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
930 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
931 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
932 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700933 &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.
934 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
935 &quot;A String&quot;,
936 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800937 &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;.
938 &quot;A String&quot;,
939 ],
940 &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]`
941 &quot;A String&quot;,
942 ],
943 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700944 &quot;groupLabels&quot;: [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.
945 { # 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`.
946 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
947 &quot;a_key&quot;: &quot;A String&quot;,
948 },
949 },
950 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800951 },
952 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
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>