blob: 2d312b10290c6ebe901235d14f335cbcedd6b509 [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_v1beta.html">OS Config API</a> . <a href="osconfig_v1beta.projects.html">projects</a> . <a href="osconfig_v1beta.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_v1beta.projects.patchJobs.instanceDetails.html">instanceDetails()</a></code>
79</p>
80<p class="firstline">Returns the instanceDetails Resource.</p>
81
82<p class="toc_element">
83 <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p>
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">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070095 <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).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700122 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
123 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
124 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
125 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
126 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
127 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
128 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
129 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
130 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
131 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
132 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
133 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
134 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
135 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
136 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
137 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
138 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700139 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700140 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
141 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
142 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700143 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700144 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700145 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700146 &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;.
147 &quot;A String&quot;,
148 ],
149 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
150 &quot;A String&quot;,
151 ],
152 &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 -0700153 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
154 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
155 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
156 &quot;a_key&quot;: &quot;A String&quot;,
157 },
158 },
159 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700160 &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]`
161 &quot;A String&quot;,
162 ],
163 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700164 &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.
165 &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.
166 &quot;fixed&quot;: 42, # Specifies a fixed value.
167 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
168 },
169 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700170 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700171 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
172 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
173 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700174 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700175 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
176 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
177 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
178 &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\)).
179 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
180 42,
181 ],
182 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
183 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
184 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
185 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
186 },
187 },
188 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
189 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
190 &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\)).
191 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
192 42,
193 ],
194 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
195 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
196 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
197 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
198 },
199 },
200 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700201 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700202 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700203 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &quot;A String&quot;,
205 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700206 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
207 &quot;A String&quot;,
208 ],
209 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
210 &quot;A String&quot;,
211 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700212 &quot;excludes&quot;: [ # List of patches to exclude from update.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700213 &quot;A String&quot;,
214 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700215 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700216 },
217 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700218 &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.
219 &quot;A String&quot;,
220 ],
221 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700222 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
223 &quot;A String&quot;,
224 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700226 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700227 &quot;excludes&quot;: [ # List of KBs to exclude from update.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700228 &quot;A String&quot;,
229 ],
230 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700231 &quot;A String&quot;,
232 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700233 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700234 &quot;A String&quot;,
235 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700236 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700237 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
238 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
239 },
240 &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.
241 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
242 &quot;A String&quot;,
243 ],
244 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
245 &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.
246 &quot;A String&quot;,
247 ],
248 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
249 },
250 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
251 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
252 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
253 &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\)).
254 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
255 42,
256 ],
257 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
258 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
259 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
260 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
261 },
262 },
263 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
264 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
265 &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\)).
266 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
267 42,
268 ],
269 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
270 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
271 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
272 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
273 },
274 },
275 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700276 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700277 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
278 &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.
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
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700296{ # A request message to initiate patching across Compute Engine instances.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700297 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700298 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This does not have to be unique.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700299 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700300 &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;.
301 &quot;A String&quot;,
302 ],
303 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
304 &quot;A String&quot;,
305 ],
306 &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 -0700307 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
308 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
309 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
310 &quot;a_key&quot;: &quot;A String&quot;,
311 },
312 },
313 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700314 &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]`
315 &quot;A String&quot;,
316 ],
317 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700318 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but will do nothing.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700319 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700320 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
321 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
322 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
323 &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\)).
324 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
325 42,
326 ],
327 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
328 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
329 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
330 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
331 },
332 },
333 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
334 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
335 &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\)).
336 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
337 42,
338 ],
339 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
340 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
341 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
342 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
343 },
344 },
345 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700346 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700347 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700348 &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.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700349 &quot;A String&quot;,
350 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700351 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
352 &quot;A String&quot;,
353 ],
354 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
355 &quot;A String&quot;,
356 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700357 &quot;excludes&quot;: [ # List of patches to exclude from update.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700358 &quot;A String&quot;,
359 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700360 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700361 },
362 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700363 &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.
364 &quot;A String&quot;,
365 ],
366 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700367 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
368 &quot;A String&quot;,
369 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700370 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700371 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700372 &quot;excludes&quot;: [ # List of KBs to exclude from update.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700373 &quot;A String&quot;,
374 ],
375 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700376 &quot;A String&quot;,
377 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700378 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700379 &quot;A String&quot;,
380 ],
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700381 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700382 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
383 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
384 },
385 &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.
386 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
387 &quot;A String&quot;,
388 ],
389 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
390 &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.
391 &quot;A String&quot;,
392 ],
393 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
394 },
395 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
396 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
397 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
398 &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\)).
399 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
400 42,
401 ],
402 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
403 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
404 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
405 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
406 },
407 },
408 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
409 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
410 &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\)).
411 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
412 42,
413 ],
414 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
415 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
416 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
417 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
418 },
419 },
420 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700421 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700422 &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;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.
424 &quot;fixed&quot;: 42, # Specifies a fixed value.
425 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
426 },
427 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
428 },
429 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 }
431
432 x__xgafv: string, V1 error format.
433 Allowed values
434 1 - v1 error format
435 2 - v2 error format
436
437Returns:
438 An object of the form:
439
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700440 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700441 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
442 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
443 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
444 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
445 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
446 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
447 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
448 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
449 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
450 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
451 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
452 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
453 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
454 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
455 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
456 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
457 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700458 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700459 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
460 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
461 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700462 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700463 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700464 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700465 &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;.
466 &quot;A String&quot;,
467 ],
468 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
469 &quot;A String&quot;,
470 ],
471 &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 -0700472 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
473 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
474 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
475 &quot;a_key&quot;: &quot;A String&quot;,
476 },
477 },
478 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700479 &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]`
480 &quot;A String&quot;,
481 ],
482 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700483 &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.
484 &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.
485 &quot;fixed&quot;: 42, # Specifies a fixed value.
486 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
487 },
488 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700489 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700490 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
491 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
492 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700493 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700494 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
495 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
496 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
497 &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\)).
498 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
499 42,
500 ],
501 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
502 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
503 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
504 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
505 },
506 },
507 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
508 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
509 &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\)).
510 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
511 42,
512 ],
513 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
514 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
515 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
516 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
517 },
518 },
519 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700520 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700521 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700522 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700523 &quot;A String&quot;,
524 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700525 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
526 &quot;A String&quot;,
527 ],
528 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
529 &quot;A String&quot;,
530 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700531 &quot;excludes&quot;: [ # List of patches to exclude from update.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700532 &quot;A String&quot;,
533 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700534 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700535 },
536 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700537 &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.
538 &quot;A String&quot;,
539 ],
540 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700541 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
542 &quot;A String&quot;,
543 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700544 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700545 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700546 &quot;excludes&quot;: [ # List of KBs to exclude from update.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700547 &quot;A String&quot;,
548 ],
549 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700550 &quot;A String&quot;,
551 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700552 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700553 &quot;A String&quot;,
554 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700555 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700556 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
557 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
558 },
559 &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.
560 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
561 &quot;A String&quot;,
562 ],
563 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
564 &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.
565 &quot;A String&quot;,
566 ],
567 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
568 },
569 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
570 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
571 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
572 &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\)).
573 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
574 42,
575 ],
576 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
577 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
578 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
579 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
580 },
581 },
582 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
583 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
584 &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\)).
585 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
586 42,
587 ],
588 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
589 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
590 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
591 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
592 },
593 },
594 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700595 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700596 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
597 &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.
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).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700616 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
617 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
618 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
619 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
620 &quot;noAgentDetectedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.
621 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
622 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
623 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
624 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
625 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
626 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
627 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
628 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
629 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
630 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
631 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
632 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700633 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700634 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
635 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
636 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700637 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700638 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700639 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700640 &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;.
641 &quot;A String&quot;,
642 ],
643 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
644 &quot;A String&quot;,
645 ],
646 &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 -0700647 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
648 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
649 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
650 &quot;a_key&quot;: &quot;A String&quot;,
651 },
652 },
653 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700654 &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]`
655 &quot;A String&quot;,
656 ],
657 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700658 &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.
659 &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.
660 &quot;fixed&quot;: 42, # Specifies a fixed value.
661 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
662 },
663 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700664 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700665 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
666 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
667 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700668 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700669 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
670 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
671 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
672 &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\)).
673 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
674 42,
675 ],
676 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
677 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
678 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
679 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
680 },
681 },
682 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
683 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
684 &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\)).
685 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
686 42,
687 ],
688 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
689 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
690 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
691 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
692 },
693 },
694 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700695 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700696 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700697 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 &quot;A String&quot;,
699 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700700 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
701 &quot;A String&quot;,
702 ],
703 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
704 &quot;A String&quot;,
705 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700706 &quot;excludes&quot;: [ # List of patches to exclude from update.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700707 &quot;A String&quot;,
708 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700709 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700710 },
711 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700712 &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.
713 &quot;A String&quot;,
714 ],
715 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700716 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
717 &quot;A String&quot;,
718 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700719 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700720 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700721 &quot;excludes&quot;: [ # List of KBs to exclude from update.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700722 &quot;A String&quot;,
723 ],
724 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700725 &quot;A String&quot;,
726 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700727 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700728 &quot;A String&quot;,
729 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700730 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700731 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
732 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
733 },
734 &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.
735 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
736 &quot;A String&quot;,
737 ],
738 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
739 &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.
740 &quot;A String&quot;,
741 ],
742 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
743 },
744 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
745 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
746 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
747 &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\)).
748 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
749 42,
750 ],
751 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
752 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
753 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
754 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
755 },
756 },
757 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
758 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
759 &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\)).
760 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
761 42,
762 ],
763 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
764 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
765 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
766 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
767 },
768 },
769 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700770 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700771 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
772 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 }</pre>
774</div>
775
776<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700777 <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 Kim65020912020-05-20 12:08:20 -0700782 pageSize: integer, The maximum number of instance status to return.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700783 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.
784 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).
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700796 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
797 &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.
798 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
799 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
800 &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.
801 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
802 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
803 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
804 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
805 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
806 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
807 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
808 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
809 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
810 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
811 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
812 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700813 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700814 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
815 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
816 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700817 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700818 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700819 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700820 &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;.
821 &quot;A String&quot;,
822 ],
823 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
824 &quot;A String&quot;,
825 ],
826 &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 -0700827 &quot;groupLabels&quot;: [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example &quot;env=prod or env=staging&quot;.
828 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
829 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
830 &quot;a_key&quot;: &quot;A String&quot;,
831 },
832 },
833 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700834 &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]`
835 &quot;A String&quot;,
836 ],
837 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700838 &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.
839 &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.
840 &quot;fixed&quot;: 42, # Specifies a fixed value.
841 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
842 },
843 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700844 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700845 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
846 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
847 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700848 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700849 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
850 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
851 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
852 &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\)).
853 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
854 42,
855 ],
856 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
857 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
858 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
859 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
860 },
861 },
862 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
863 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
864 &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\)).
865 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
866 42,
867 ],
868 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
869 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
870 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
871 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
872 },
873 },
874 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700875 &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.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700876 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700877 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700878 &quot;A String&quot;,
879 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700880 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
881 &quot;A String&quot;,
882 ],
883 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
884 &quot;A String&quot;,
885 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700886 &quot;excludes&quot;: [ # List of patches to exclude from update.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700887 &quot;A String&quot;,
888 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700889 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700890 },
891 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700892 &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.
893 &quot;A String&quot;,
894 ],
895 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700896 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
897 &quot;A String&quot;,
898 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700899 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700900 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700901 &quot;excludes&quot;: [ # List of KBs to exclude from update.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700902 &quot;A String&quot;,
903 ],
904 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700905 &quot;A String&quot;,
906 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700907 &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.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700908 &quot;A String&quot;,
909 ],
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700910 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700911 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
912 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
913 },
914 &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.
915 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
916 &quot;A String&quot;,
917 ],
918 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
919 &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.
920 &quot;A String&quot;,
921 ],
922 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
923 },
924 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
925 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
926 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
927 &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\)).
928 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
929 42,
930 ],
931 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
932 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
933 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
934 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
935 },
936 },
937 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
938 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
939 &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\)).
940 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
941 42,
942 ],
943 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
944 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
945 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
946 &quot;generationNumber&quot;: &quot;A String&quot;, # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.
947 },
948 },
949 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700950 },
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700951 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
952 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700953 },
954 ],
955 &quot;nextPageToken&quot;: &quot;A String&quot;, # A pagination token that can be used to get the next page of results.
956 }</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>