blob: e63ba87a7585b6e44a2872ca81abb10f88f4713b [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">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -080095 <code><a href="#list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p>
Bu Sun Kim65020912020-05-20 12:08:20 -070096<p class="firstline">Get a list of patch jobs.</p>
97<p class="toc_element">
98 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
99<p class="firstline">Retrieves the next page of results.</p>
100<h3>Method Details</h3>
101<div class="method">
102 <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700103 <pre>Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700104
105Args:
106 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
107 body: object, The request body.
108 The object takes the form of:
109
110{ # Message for canceling a patch job.
111 }
112
113 x__xgafv: string, V1 error format.
114 Allowed values
115 1 - v1 error format
116 2 - v2 error format
117
118Returns:
119 An object of the form:
120
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700121 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800122 &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.
123 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
124 &quot;A String&quot;,
125 ],
126 &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;.
127 &quot;A String&quot;,
128 ],
129 &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;.
130 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
131 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
132 &quot;a_key&quot;: &quot;A String&quot;,
133 },
134 },
135 ],
136 &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]`
137 &quot;A String&quot;,
138 ],
139 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800140 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800141 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
142 &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.
143 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
144 &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.
145 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
146 &quot;fixed&quot;: 42, # Specifies a fixed value.
147 },
148 },
149 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800150 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800151 &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.
152 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
153 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
154 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800155 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800156 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800157 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800158 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
159 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800160 &quot;A String&quot;,
161 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800162 &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.
163 &quot;A String&quot;,
164 ],
165 &quot;excludes&quot;: [ # List of KBs to exclude from update.
166 &quot;A String&quot;,
167 ],
168 },
169 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800170 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
171 &quot;A String&quot;,
172 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800173 &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.
174 &quot;A String&quot;,
175 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800176 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800177 &quot;A String&quot;,
178 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800179 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
180 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
181 &quot;excludes&quot;: [ # List of patches to exclude from update.
182 &quot;A String&quot;,
183 ],
184 },
185 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
186 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
187 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
188 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
189 &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.
190 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
191 },
192 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
193 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
194 42,
195 ],
196 &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\)).
197 },
198 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
199 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
200 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
201 &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.
202 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
203 },
204 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
205 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
206 42,
207 ],
208 &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\)).
209 },
210 },
211 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800212 &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.
213 &quot;A String&quot;,
214 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800215 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
216 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
217 &quot;A String&quot;,
218 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800219 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
220 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800221 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
222 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
223 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
224 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
225 &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.
226 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
227 },
228 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
229 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
230 42,
231 ],
232 &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\)).
233 },
234 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
235 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
236 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
237 &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.
238 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
239 },
240 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
241 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
242 42,
243 ],
244 &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\)).
245 },
246 },
247 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
248 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
249 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800250 &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.
251 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
252 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
253 &quot;A String&quot;,
254 ],
255 &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.
256 &quot;A String&quot;,
257 ],
258 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800259 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800260 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
261 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
262 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
263 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
264 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
265 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
266 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
267 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
268 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
269 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
270 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
271 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
272 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
273 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
274 &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.
275 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700276 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800277 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800278 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
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;instanceFilter&quot;: { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800298 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700299 &quot;A String&quot;,
300 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800301 &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;.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700302 &quot;A String&quot;,
303 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700304 &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;.
305 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
306 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
307 &quot;a_key&quot;: &quot;A String&quot;,
308 },
309 },
310 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800311 &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]`
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700312 &quot;A String&quot;,
313 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800314 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700315 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800316 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800317 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800318 &quot;dryRun&quot;: True or False, # If this patch is a dry-run only, instances are contacted but will do nothing.
319 &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.
320 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
321 &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.
322 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
323 &quot;fixed&quot;: 42, # Specifies a fixed value.
324 },
325 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700326 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. If omitted, instances are patched using the default configurations.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800327 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
328 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700329 &quot;A String&quot;,
330 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800331 &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.
332 &quot;A String&quot;,
333 ],
334 &quot;excludes&quot;: [ # List of KBs to exclude from update.
335 &quot;A String&quot;,
336 ],
337 },
338 &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.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700339 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
340 &quot;A String&quot;,
341 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800342 &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 Kim673ec5c2020-11-16 11:05:03 -0700343 &quot;A String&quot;,
344 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800345 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700346 &quot;A String&quot;,
347 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800348 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
349 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
350 &quot;excludes&quot;: [ # List of patches to exclude from update.
351 &quot;A String&quot;,
352 ],
353 },
354 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
355 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
356 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
357 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
358 &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.
359 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
360 },
361 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
362 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
363 42,
364 ],
365 &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\)).
366 },
367 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
368 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
369 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
370 &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.
371 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
372 },
373 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
374 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
375 42,
376 ],
377 &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\)).
378 },
379 },
380 &quot;yum&quot;: { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700381 &quot;exclusivePackages&quot;: [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.
382 &quot;A String&quot;,
383 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800384 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
385 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
386 &quot;A String&quot;,
387 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800388 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
389 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800390 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
391 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
392 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
393 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
394 &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.
395 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
396 },
397 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
398 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
399 42,
400 ],
401 &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\)).
402 },
403 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
404 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
405 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
406 &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.
407 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
408 },
409 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
410 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
411 42,
412 ],
413 &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\)).
414 },
415 },
416 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
417 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
418 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800419 &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.
420 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
421 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
422 &quot;A String&quot;,
423 ],
424 &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.
425 &quot;A String&quot;,
426 ],
427 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700428 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800429 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This does not have to be unique.
Bu Sun Kim65020912020-05-20 12:08:20 -0700430 }
431
432 x__xgafv: string, V1 error format.
433 Allowed values
434 1 - v1 error format
435 2 - v2 error format
436
437Returns:
438 An object of the form:
439
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700440 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800441 &quot;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.
442 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
443 &quot;A String&quot;,
444 ],
445 &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;.
446 &quot;A String&quot;,
447 ],
448 &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;.
449 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
450 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
451 &quot;a_key&quot;: &quot;A String&quot;,
452 },
453 },
454 ],
455 &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]`
456 &quot;A String&quot;,
457 ],
458 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800459 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800460 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
461 &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.
462 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
463 &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.
464 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
465 &quot;fixed&quot;: 42, # Specifies a fixed value.
466 },
467 },
468 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800469 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800470 &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.
471 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
472 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
473 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800474 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800475 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800476 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800477 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
478 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800479 &quot;A String&quot;,
480 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800481 &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.
482 &quot;A String&quot;,
483 ],
484 &quot;excludes&quot;: [ # List of KBs to exclude from update.
485 &quot;A String&quot;,
486 ],
487 },
488 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800489 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
490 &quot;A String&quot;,
491 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800492 &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.
493 &quot;A String&quot;,
494 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800495 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800496 &quot;A String&quot;,
497 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800498 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
499 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
500 &quot;excludes&quot;: [ # List of patches to exclude from update.
501 &quot;A String&quot;,
502 ],
503 },
504 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
505 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
506 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
507 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
508 &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.
509 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
510 },
511 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
512 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
513 42,
514 ],
515 &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\)).
516 },
517 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
518 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
519 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
520 &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.
521 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
522 },
523 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
524 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
525 42,
526 ],
527 &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\)).
528 },
529 },
530 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800531 &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.
532 &quot;A String&quot;,
533 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800534 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
535 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
536 &quot;A String&quot;,
537 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800538 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
539 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800540 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
541 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
542 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
543 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
544 &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.
545 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
546 },
547 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
548 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
549 42,
550 ],
551 &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\)).
552 },
553 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
554 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
555 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
556 &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.
557 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
558 },
559 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
560 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
561 42,
562 ],
563 &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\)).
564 },
565 },
566 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
567 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
568 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800569 &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.
570 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
571 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
572 &quot;A String&quot;,
573 ],
574 &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.
575 &quot;A String&quot;,
576 ],
577 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800578 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800579 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
580 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
581 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
582 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
583 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
584 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
585 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
586 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
587 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
588 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
589 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
590 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
591 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
592 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
593 &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.
594 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700595 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800596 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800597 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700598 }</pre>
599</div>
600
601<div class="method">
602 <code class="details" id="get">get(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700603 <pre>Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.
Bu Sun Kim65020912020-05-20 12:08:20 -0700604
605Args:
606 name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required)
607 x__xgafv: string, V1 error format.
608 Allowed values
609 1 - v1 error format
610 2 - v2 error format
611
612Returns:
613 An object of the form:
614
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700615 { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800616 &quot;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.
617 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
618 &quot;A String&quot;,
619 ],
620 &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;.
621 &quot;A String&quot;,
622 ],
623 &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;.
624 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
625 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
626 &quot;a_key&quot;: &quot;A String&quot;,
627 },
628 },
629 ],
630 &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]`
631 &quot;A String&quot;,
632 ],
633 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800634 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800635 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
636 &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.
637 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
638 &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.
639 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
640 &quot;fixed&quot;: 42, # Specifies a fixed value.
641 },
642 },
643 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800644 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800645 &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.
646 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
647 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
648 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800649 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800650 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800651 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800652 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
653 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800654 &quot;A String&quot;,
655 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800656 &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.
657 &quot;A String&quot;,
658 ],
659 &quot;excludes&quot;: [ # List of KBs to exclude from update.
660 &quot;A String&quot;,
661 ],
662 },
663 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800664 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
665 &quot;A String&quot;,
666 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800667 &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.
668 &quot;A String&quot;,
669 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800670 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800671 &quot;A String&quot;,
672 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800673 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
674 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
675 &quot;excludes&quot;: [ # List of patches to exclude from update.
676 &quot;A String&quot;,
677 ],
678 },
679 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
680 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
681 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
682 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
683 &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.
684 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
685 },
686 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
687 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
688 42,
689 ],
690 &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\)).
691 },
692 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
693 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
694 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
695 &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.
696 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
697 },
698 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
699 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
700 42,
701 ],
702 &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\)).
703 },
704 },
705 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800706 &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.
707 &quot;A String&quot;,
708 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800709 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
710 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
711 &quot;A String&quot;,
712 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800713 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
714 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800715 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
716 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
717 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
718 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
719 &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.
720 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
721 },
722 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
723 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
724 42,
725 ],
726 &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\)).
727 },
728 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
729 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
730 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
731 &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.
732 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
733 },
734 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
735 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
736 42,
737 ],
738 &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\)).
739 },
740 },
741 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
742 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
743 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800744 &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.
745 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
746 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
747 &quot;A String&quot;,
748 ],
749 &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.
750 &quot;A String&quot;,
751 ],
752 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800753 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800754 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
755 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
756 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
757 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
758 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
759 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
760 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
761 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
762 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
763 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
764 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
765 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
766 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
767 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
768 &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.
769 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700770 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800771 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800772 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700773 }</pre>
774</div>
775
776<div class="method">
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800777 <code class="details" id="list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code>
Bu Sun Kim65020912020-05-20 12:08:20 -0700778 <pre>Get a list of patch jobs.
779
780Args:
781 parent: string, Required. In the form of `projects/*` (required)
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800782 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).
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800796 &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.
797 &quot;zones&quot;: [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.
798 &quot;A String&quot;,
799 ],
800 &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;.
801 &quot;A String&quot;,
802 ],
803 &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;.
804 { # Represents a group of VMs that can be identified as having all these labels, for example &quot;env=prod and app=web&quot;.
805 &quot;labels&quot;: { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.
806 &quot;a_key&quot;: &quot;A String&quot;,
807 },
808 },
809 ],
810 &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]`
811 &quot;A String&quot;,
812 ],
813 &quot;all&quot;: True or False, # Target all VM instances in the project. If true, no other criteria is permitted.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800814 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800815 &quot;errorMessage&quot;: &quot;A String&quot;, # If this patch job failed, this message provides information about the failure.
816 &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.
817 &quot;mode&quot;: &quot;A String&quot;, # Mode of the patch rollout.
818 &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.
819 &quot;percent&quot;: 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value.
820 &quot;fixed&quot;: 42, # Specifies a fixed value.
821 },
822 },
823 &quot;patchDeployment&quot;: &quot;A String&quot;, # Output only. Name of the patch deployment that created this patch job.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800824 &quot;displayName&quot;: &quot;A String&quot;, # Display name for this patch job. This is not a unique identifier.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800825 &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.
826 &quot;description&quot;: &quot;A String&quot;, # Description of the patch job. Length of the description is limited to 1024 characters.
827 &quot;name&quot;: &quot;A String&quot;, # Unique identifier for this patch job in the form `projects/*/patchJobs/*`
828 &quot;dryRun&quot;: True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800829 &quot;createTime&quot;: &quot;A String&quot;, # Time this patch job was created.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800830 &quot;state&quot;: &quot;A String&quot;, # The current state of the PatchJob.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800831 &quot;patchConfig&quot;: { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied.
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800832 &quot;windowsUpdate&quot;: { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules.
833 &quot;classifications&quot;: [ # Only apply updates of these windows update classifications. If empty, all updates are applied.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800834 &quot;A String&quot;,
835 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800836 &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.
837 &quot;A String&quot;,
838 ],
839 &quot;excludes&quot;: [ # List of KBs to exclude from update.
840 &quot;A String&quot;,
841 ],
842 },
843 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800844 &quot;categories&quot;: [ # Install only patches with these categories. Common categories include security, recommended, and feature.
845 &quot;A String&quot;,
846 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800847 &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.
848 &quot;A String&quot;,
849 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800850 &quot;severities&quot;: [ # Install only patches with these severities. Common severities include critical, important, moderate, and low.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800851 &quot;A String&quot;,
852 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800853 &quot;withUpdate&quot;: True or False, # Adds the `--with-update` flag, to `zypper patch`.
854 &quot;withOptional&quot;: True or False, # Adds the `--with-optional` flag to `zypper patch`.
855 &quot;excludes&quot;: [ # List of patches to exclude from update.
856 &quot;A String&quot;,
857 ],
858 },
859 &quot;postStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update.
860 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
861 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
862 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
863 &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.
864 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
865 },
866 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
867 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
868 42,
869 ],
870 &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\)).
871 },
872 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
873 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
874 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
875 &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.
876 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
877 },
878 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
879 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
880 42,
881 ],
882 &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\)).
883 },
884 },
885 &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.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800886 &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.
887 &quot;A String&quot;,
888 ],
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800889 &quot;minimal&quot;: True or False, # Will cause patch to run `yum update-minimal` instead.
890 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.
891 &quot;A String&quot;,
892 ],
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800893 &quot;security&quot;: True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms.
894 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800895 &quot;preStep&quot;: { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update.
896 &quot;windowsExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob.
897 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
898 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
899 &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.
900 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
901 },
902 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
903 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
904 42,
905 ],
906 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
907 },
908 &quot;linuxExecStepConfig&quot;: { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob.
909 &quot;gcsObject&quot;: { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable.
910 &quot;object&quot;: &quot;A String&quot;, # Required. Name of the Google Cloud Storage object.
911 &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.
912 &quot;bucket&quot;: &quot;A String&quot;, # Required. Bucket of the Google Cloud Storage object.
913 },
914 &quot;localPath&quot;: &quot;A String&quot;, # An absolute path to the executable on the VM.
915 &quot;allowedSuccessCodes&quot;: [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success.
916 42,
917 ],
918 &quot;interpreter&quot;: &quot;A String&quot;, # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)).
919 },
920 },
921 &quot;rebootConfig&quot;: &quot;A String&quot;, # Post-patch reboot settings.
922 &quot;goo&quot;: { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules.
923 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800924 &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.
925 &quot;type&quot;: &quot;A String&quot;, # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.
926 &quot;excludes&quot;: [ # List of packages to exclude from update. These packages will be excluded
927 &quot;A String&quot;,
928 ],
929 &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.
930 &quot;A String&quot;,
931 ],
932 },
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800933 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800934 &quot;instanceDetailsSummary&quot;: { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details.
935 &quot;notifiedInstanceCount&quot;: &quot;A String&quot;, # Number of instances notified about patch job.
936 &quot;postPatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the post-patch step.
937 &quot;ackedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have acked and will start shortly.
938 &quot;succeededRebootRequiredInstanceCount&quot;: &quot;A String&quot;, # Number of instances that require reboot.
939 &quot;prePatchStepInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are running the pre-patch step.
940 &quot;failedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that failed.
941 &quot;downloadingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are downloading patches.
942 &quot;succeededInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have completed successfully.
943 &quot;timedOutInstanceCount&quot;: &quot;A String&quot;, # Number of instances that exceeded the time out while applying the patch.
944 &quot;rebootingInstanceCount&quot;: &quot;A String&quot;, # Number of instances rebooting.
945 &quot;startedInstanceCount&quot;: &quot;A String&quot;, # Number of instances that have started.
946 &quot;pendingInstanceCount&quot;: &quot;A String&quot;, # Number of instances pending patch job.
947 &quot;applyingPatchesInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are applying patches.
948 &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.
949 &quot;inactiveInstanceCount&quot;: &quot;A String&quot;, # Number of instances that are inactive.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700950 },
Yoshi Automation Bot0d561ef2020-11-25 07:50:41 -0800951 &quot;duration&quot;: &quot;A String&quot;, # Duration of the patch job. After the duration ends, the patch job times out.
Yoshi Automation Botc2228be2020-11-24 15:48:03 -0800952 &quot;updateTime&quot;: &quot;A String&quot;, # Last time this patch job was updated.
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>