Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 | |
| 75 | <h1><a href="osconfig_v1.html">Cloud OS Config API</a> . <a href="osconfig_v1.projects.html">projects</a> . <a href="osconfig_v1.projects.patchJobs.html">patchJobs</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="osconfig_v1.projects.patchJobs.instanceDetails.html">instanceDetails()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the instanceDetails Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
| 83 | <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p> |
| 84 | <p class="firstline">Cancel a patch job. The patch job must be active. Canceled patch jobs</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#execute">execute(parent, body=None, x__xgafv=None)</a></code></p> |
| 87 | <p class="firstline">Patch VM instances by creating and running a patch job.</p> |
| 88 | <p class="toc_element"> |
| 89 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 90 | <p class="firstline">Get the patch job. This can be used to track the progress of an</p> |
| 91 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 92 | <code><a href="#list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 93 | <p class="firstline">Get a list of patch jobs.</p> |
| 94 | <p class="toc_element"> |
| 95 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 96 | <p class="firstline">Retrieves the next page of results.</p> |
| 97 | <h3>Method Details</h3> |
| 98 | <div class="method"> |
| 99 | <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code> |
| 100 | <pre>Cancel a patch job. The patch job must be active. Canceled patch jobs |
| 101 | cannot be restarted. |
| 102 | |
| 103 | Args: |
| 104 | name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required) |
| 105 | body: object, The request body. |
| 106 | The object takes the form of: |
| 107 | |
| 108 | { # Message for canceling a patch job. |
| 109 | } |
| 110 | |
| 111 | x__xgafv: string, V1 error format. |
| 112 | Allowed values |
| 113 | 1 - v1 error format |
| 114 | 2 - v2 error format |
| 115 | |
| 116 | Returns: |
| 117 | An object of the form: |
| 118 | |
| 119 | { # A high level representation of a patch job that is either in progress |
| 120 | # or has completed. |
| 121 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 122 | # Instance details are not included in the job. To paginate through instance |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 123 | # details, use ListPatchJobInstanceDetails. |
| 124 | # |
| 125 | # For more information about patch jobs, see |
| 126 | # [Creating patch |
| 127 | # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 128 | "name": "A String", # Unique identifier for this patch job in the form |
| 129 | # `projects/*/patchJobs/*` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 130 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 131 | "state": "A String", # The current state of the PatchJob. |
| 132 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch # Summary of instance details. |
| 133 | # job affects. Contains counts of instances in different states. These states |
| 134 | # map to `InstancePatchState`. List patch job instance details to see the |
| 135 | # specific states of each instance. |
| 136 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 137 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 138 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 139 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 140 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 141 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 142 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 143 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to |
| 144 | # ensure that the agent is installed, running, and able to communicate with |
| 145 | # the service. |
| 146 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 147 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 148 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 149 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 150 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 151 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 152 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 153 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 154 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. |
| 155 | # patch(es) to a VM instance. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 156 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 157 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches |
| 158 | # that will be updated. This field must not be used with other |
| 159 | # patch configurations. |
| 160 | "A String", |
| 161 | ], |
| 162 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all |
| 163 | # updates are applied. |
| 164 | "A String", |
| 165 | ], |
| 166 | "excludes": [ # List of KBs to exclude from update. |
| 167 | "A String", |
| 168 | ], |
| 169 | }, |
| 170 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 171 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 172 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 173 | # specified the script will be executed directly, which will likely |
| 174 | # only succeed for scripts with [shebang lines] |
| 175 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 176 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 177 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 178 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 179 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 180 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 181 | }, |
| 182 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 183 | # execution can return to indicate a success. |
| 184 | 42, |
| 185 | ], |
| 186 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 187 | }, |
| 188 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 189 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 190 | # specified the script will be executed directly, which will likely |
| 191 | # only succeed for scripts with [shebang lines] |
| 192 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 193 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 194 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 195 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 196 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 197 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 198 | }, |
| 199 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 200 | # execution can return to indicate a success. |
| 201 | 42, |
| 202 | ], |
| 203 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 204 | }, |
| 205 | }, |
| 206 | "yum": { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch |
| 207 | # rules. |
| 208 | # can be set to control how this is executed. |
| 209 | # |
| 210 | # Note that not all settings are supported on all platforms. |
| 211 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 212 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on |
| 213 | # all platforms. |
| 214 | "excludes": [ # List of packages to exclude from update. These packages are excluded by |
| 215 | # using the yum `--exclude` flag. |
| 216 | "A String", |
| 217 | ], |
| 218 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 219 | # that will be updated. If these packages are not installed, they will be |
| 220 | # ignored. This field must not be specified with any other patch |
| 221 | # configuration fields. |
| 222 | "A String", |
| 223 | ], |
| 224 | }, |
| 225 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch |
| 226 | # rules. |
| 227 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 228 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get # Apt update settings. Use this setting to override the default `apt` patch |
| 229 | # rules. |
| 230 | # upgrade`. Additional options can be set to control how this is executed. |
| 231 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 232 | "A String", |
| 233 | ], |
| 234 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 235 | # that will be updated. If these packages are not installed, they will be |
| 236 | # ignored. This field cannot be specified with any other patch configuration |
| 237 | # fields. |
| 238 | "A String", |
| 239 | ], |
| 240 | "type": "A String", # By changing the type to DIST, the patching is performed |
| 241 | # using `apt-get dist-upgrade` instead. |
| 242 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 243 | "rebootConfig": "A String", # Post-patch reboot settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 244 | "zypper": { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper` |
| 245 | # patch rules. |
| 246 | # See also https://en.opensuse.org/SDB:Zypper_manual. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 247 | "excludes": [ # List of patches to exclude from update. |
| 248 | "A String", |
| 249 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 250 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 251 | "severities": [ # Install only patches with these severities. |
| 252 | # Common severities include critical, important, moderate, and low. |
| 253 | "A String", |
| 254 | ], |
| 255 | "categories": [ # Install only patches with these categories. |
| 256 | # Common categories include security, recommended, and feature. |
| 257 | "A String", |
| 258 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 259 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches |
| 260 | # that will be installed using 'zypper patch patch:<patch_name>' command. |
| 261 | # This field must not be used with any other patch configuration fields. |
| 262 | "A String", |
| 263 | ], |
| 264 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 265 | }, |
| 266 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 267 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 268 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 269 | # specified the script will be executed directly, which will likely |
| 270 | # only succeed for scripts with [shebang lines] |
| 271 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 272 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 273 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 274 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 275 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 276 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 277 | }, |
| 278 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 279 | # execution can return to indicate a success. |
| 280 | 42, |
| 281 | ], |
| 282 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 283 | }, |
| 284 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 285 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 286 | # specified the script will be executed directly, which will likely |
| 287 | # only succeed for scripts with [shebang lines] |
| 288 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 289 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 290 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 291 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 292 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 293 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 294 | }, |
| 295 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 296 | # execution can return to indicate a success. |
| 297 | 42, |
| 298 | ], |
| 299 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 300 | }, |
| 301 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 302 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 303 | "createTime": "A String", # Time this patch job was created. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 304 | "instanceFilter": { # A filter to target VM instances for patching. The targeted # Instances to patch. |
| 305 | # VMs must meet all criteria specified. So if both labels and zones are |
| 306 | # specified, the patch job targets only VMs with those labels and in those |
| 307 | # zones. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 308 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to |
| 309 | # labels, this is another way to group VMs when targeting configs, for |
| 310 | # example prefix="prod-". |
| 311 | "A String", |
| 312 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 313 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows |
| 314 | # targeting of disparate groups of VM instances. |
| 315 | { # Targets a group of VM instances by using their [assigned |
| 316 | # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels |
| 317 | # are key-value pairs. A `GroupLabel` is a combination of labels |
| 318 | # that is used to target VMs for a patch job. |
| 319 | # |
| 320 | # For example, a patch job can target VMs that have the following |
| 321 | # `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job |
| 322 | # is applied to VMs that have both the labels `env=test` and `app=web`. |
| 323 | "labels": { # Compute Engine instance labels that must be present for a VM |
| 324 | # instance to be targeted by this filter. |
| 325 | "a_key": "A String", |
| 326 | }, |
| 327 | }, |
| 328 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 329 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM |
| 330 | # instances in any zone. |
| 331 | "A String", |
| 332 | ], |
| 333 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is |
| 334 | # permitted. |
| 335 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their |
| 336 | # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, |
| 337 | # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or |
| 338 | # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 339 | "A String", |
| 340 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 341 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 342 | "rollout": { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied. |
| 343 | # concurrency control when applying patch(es) to all targeted VMs. |
| 344 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or # The maximum number (or percentage) of VMs per zone to disrupt at any given |
| 345 | # moment. The number of VMs calculated from multiplying the percentage by the |
| 346 | # total number of VMs in a zone is rounded up. |
| 347 | # |
| 348 | # During patching, a VM is considered disrupted from the time the agent is |
| 349 | # notified to begin until patching has completed. This disruption time |
| 350 | # includes the time to complete reboot and any post-patch steps. |
| 351 | # |
| 352 | # A VM contributes to the disruption budget if its patching operation fails |
| 353 | # either when applying the patches, running pre or post patch steps, or if it |
| 354 | # fails to respond with a success notification before timing out. VMs that |
| 355 | # are not running or do not have an active agent do not count toward this |
| 356 | # disruption budget. |
| 357 | # |
| 358 | # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, |
| 359 | # the patch job stops, because continuing to the next zone requires |
| 360 | # completion of the patch process in the previous zone. |
| 361 | # |
| 362 | # For example, if the disruption budget has a fixed value of `10`, and 8 VMs |
| 363 | # fail to patch in the current zone, the patch job continues to patch 2 VMs |
| 364 | # at a time until the zone is completed. When that zone is completed |
| 365 | # successfully, patching begins with 10 VMs at a time in the next zone. If 10 |
| 366 | # VMs in the next zone fail to patch, the patch job stops. |
| 367 | # relative ("percent") to a value. |
| 368 | "percent": 42, # Specifies the relative value defined as a percentage, which will be |
| 369 | # multiplied by a reference value. |
| 370 | "fixed": 42, # Specifies a fixed value. |
| 371 | }, |
| 372 | "mode": "A String", # Mode of the patch rollout. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 373 | }, |
| 374 | "description": "A String", # Description of the patch job. Length of the description is limited |
| 375 | # to 1024 characters. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 376 | "duration": "A String", # Duration of the patch job. After the duration ends, the |
| 377 | # patch job times out. |
| 378 | "errorMessage": "A String", # If this patch job failed, this message provides information about the |
| 379 | # failure. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 380 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of |
| 381 | # 0.0 being no progress to 100.0 being complete. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 382 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
| 383 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
| 384 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has |
| 385 | # finished without running any updates on the VM instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 386 | }</pre> |
| 387 | </div> |
| 388 | |
| 389 | <div class="method"> |
| 390 | <code class="details" id="execute">execute(parent, body=None, x__xgafv=None)</code> |
| 391 | <pre>Patch VM instances by creating and running a patch job. |
| 392 | |
| 393 | Args: |
| 394 | parent: string, Required. The project in which to run this patch in the form `projects/*` (required) |
| 395 | body: object, The request body. |
| 396 | The object takes the form of: |
| 397 | |
| 398 | { # A request message to initiate patching across Compute Engine |
| 399 | # instances. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 400 | "displayName": "A String", # Display name for this patch job. This does not have to be unique. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 401 | "instanceFilter": { # A filter to target VM instances for patching. The targeted # Required. Instances to patch, either explicitly or filtered by some criteria such |
| 402 | # as zone or labels. |
| 403 | # VMs must meet all criteria specified. So if both labels and zones are |
| 404 | # specified, the patch job targets only VMs with those labels and in those |
| 405 | # zones. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 406 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to |
| 407 | # labels, this is another way to group VMs when targeting configs, for |
| 408 | # example prefix="prod-". |
| 409 | "A String", |
| 410 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 411 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows |
| 412 | # targeting of disparate groups of VM instances. |
| 413 | { # Targets a group of VM instances by using their [assigned |
| 414 | # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels |
| 415 | # are key-value pairs. A `GroupLabel` is a combination of labels |
| 416 | # that is used to target VMs for a patch job. |
| 417 | # |
| 418 | # For example, a patch job can target VMs that have the following |
| 419 | # `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job |
| 420 | # is applied to VMs that have both the labels `env=test` and `app=web`. |
| 421 | "labels": { # Compute Engine instance labels that must be present for a VM |
| 422 | # instance to be targeted by this filter. |
| 423 | "a_key": "A String", |
| 424 | }, |
| 425 | }, |
| 426 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 427 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM |
| 428 | # instances in any zone. |
| 429 | "A String", |
| 430 | ], |
| 431 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is |
| 432 | # permitted. |
| 433 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their |
| 434 | # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, |
| 435 | # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or |
| 436 | # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 437 | "A String", |
| 438 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 439 | }, |
| 440 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job |
| 441 | # times out. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 442 | "rollout": { # Patch rollout configuration specifications. Contains details on the # Rollout strategy of the patch job. |
| 443 | # concurrency control when applying patch(es) to all targeted VMs. |
| 444 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or # The maximum number (or percentage) of VMs per zone to disrupt at any given |
| 445 | # moment. The number of VMs calculated from multiplying the percentage by the |
| 446 | # total number of VMs in a zone is rounded up. |
| 447 | # |
| 448 | # During patching, a VM is considered disrupted from the time the agent is |
| 449 | # notified to begin until patching has completed. This disruption time |
| 450 | # includes the time to complete reboot and any post-patch steps. |
| 451 | # |
| 452 | # A VM contributes to the disruption budget if its patching operation fails |
| 453 | # either when applying the patches, running pre or post patch steps, or if it |
| 454 | # fails to respond with a success notification before timing out. VMs that |
| 455 | # are not running or do not have an active agent do not count toward this |
| 456 | # disruption budget. |
| 457 | # |
| 458 | # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, |
| 459 | # the patch job stops, because continuing to the next zone requires |
| 460 | # completion of the patch process in the previous zone. |
| 461 | # |
| 462 | # For example, if the disruption budget has a fixed value of `10`, and 8 VMs |
| 463 | # fail to patch in the current zone, the patch job continues to patch 2 VMs |
| 464 | # at a time until the zone is completed. When that zone is completed |
| 465 | # successfully, patching begins with 10 VMs at a time in the next zone. If 10 |
| 466 | # VMs in the next zone fail to patch, the patch job stops. |
| 467 | # relative ("percent") to a value. |
| 468 | "percent": 42, # Specifies the relative value defined as a percentage, which will be |
| 469 | # multiplied by a reference value. |
| 470 | "fixed": 42, # Specifies a fixed value. |
| 471 | }, |
| 472 | "mode": "A String", # Mode of the patch rollout. |
| 473 | }, |
| 474 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. If omitted, instances are |
| 475 | # patched using the default configurations. |
| 476 | # patch(es) to a VM instance. |
| 477 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 478 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches |
| 479 | # that will be updated. This field must not be used with other |
| 480 | # patch configurations. |
| 481 | "A String", |
| 482 | ], |
| 483 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all |
| 484 | # updates are applied. |
| 485 | "A String", |
| 486 | ], |
| 487 | "excludes": [ # List of KBs to exclude from update. |
| 488 | "A String", |
| 489 | ], |
| 490 | }, |
| 491 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 492 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 493 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 494 | # specified the script will be executed directly, which will likely |
| 495 | # only succeed for scripts with [shebang lines] |
| 496 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 497 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 498 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 499 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 500 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 501 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 502 | }, |
| 503 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 504 | # execution can return to indicate a success. |
| 505 | 42, |
| 506 | ], |
| 507 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 508 | }, |
| 509 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 510 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 511 | # specified the script will be executed directly, which will likely |
| 512 | # only succeed for scripts with [shebang lines] |
| 513 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 514 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 515 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 516 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 517 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 518 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 519 | }, |
| 520 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 521 | # execution can return to indicate a success. |
| 522 | 42, |
| 523 | ], |
| 524 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 525 | }, |
| 526 | }, |
| 527 | "yum": { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch |
| 528 | # rules. |
| 529 | # can be set to control how this is executed. |
| 530 | # |
| 531 | # Note that not all settings are supported on all platforms. |
| 532 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 533 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on |
| 534 | # all platforms. |
| 535 | "excludes": [ # List of packages to exclude from update. These packages are excluded by |
| 536 | # using the yum `--exclude` flag. |
| 537 | "A String", |
| 538 | ], |
| 539 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 540 | # that will be updated. If these packages are not installed, they will be |
| 541 | # ignored. This field must not be specified with any other patch |
| 542 | # configuration fields. |
| 543 | "A String", |
| 544 | ], |
| 545 | }, |
| 546 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch |
| 547 | # rules. |
| 548 | }, |
| 549 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get # Apt update settings. Use this setting to override the default `apt` patch |
| 550 | # rules. |
| 551 | # upgrade`. Additional options can be set to control how this is executed. |
| 552 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 553 | "A String", |
| 554 | ], |
| 555 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 556 | # that will be updated. If these packages are not installed, they will be |
| 557 | # ignored. This field cannot be specified with any other patch configuration |
| 558 | # fields. |
| 559 | "A String", |
| 560 | ], |
| 561 | "type": "A String", # By changing the type to DIST, the patching is performed |
| 562 | # using `apt-get dist-upgrade` instead. |
| 563 | }, |
| 564 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 565 | "zypper": { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper` |
| 566 | # patch rules. |
| 567 | # See also https://en.opensuse.org/SDB:Zypper_manual. |
| 568 | "excludes": [ # List of patches to exclude from update. |
| 569 | "A String", |
| 570 | ], |
| 571 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 572 | "severities": [ # Install only patches with these severities. |
| 573 | # Common severities include critical, important, moderate, and low. |
| 574 | "A String", |
| 575 | ], |
| 576 | "categories": [ # Install only patches with these categories. |
| 577 | # Common categories include security, recommended, and feature. |
| 578 | "A String", |
| 579 | ], |
| 580 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches |
| 581 | # that will be installed using 'zypper patch patch:<patch_name>' command. |
| 582 | # This field must not be used with any other patch configuration fields. |
| 583 | "A String", |
| 584 | ], |
| 585 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 586 | }, |
| 587 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 588 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 589 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 590 | # specified the script will be executed directly, which will likely |
| 591 | # only succeed for scripts with [shebang lines] |
| 592 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 593 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 594 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 595 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 596 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 597 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 598 | }, |
| 599 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 600 | # execution can return to indicate a success. |
| 601 | 42, |
| 602 | ], |
| 603 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 604 | }, |
| 605 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 606 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 607 | # specified the script will be executed directly, which will likely |
| 608 | # only succeed for scripts with [shebang lines] |
| 609 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 610 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 611 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 612 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 613 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 614 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 615 | }, |
| 616 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 617 | # execution can return to indicate a success. |
| 618 | 42, |
| 619 | ], |
| 620 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 621 | }, |
| 622 | }, |
| 623 | }, |
| 624 | "description": "A String", # Description of the patch job. Length of the description is limited |
| 625 | # to 1024 characters. |
| 626 | "dryRun": True or False, # If this patch is a dry-run only, instances are contacted but |
| 627 | # will do nothing. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 628 | } |
| 629 | |
| 630 | x__xgafv: string, V1 error format. |
| 631 | Allowed values |
| 632 | 1 - v1 error format |
| 633 | 2 - v2 error format |
| 634 | |
| 635 | Returns: |
| 636 | An object of the form: |
| 637 | |
| 638 | { # A high level representation of a patch job that is either in progress |
| 639 | # or has completed. |
| 640 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 641 | # Instance details are not included in the job. To paginate through instance |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 642 | # details, use ListPatchJobInstanceDetails. |
| 643 | # |
| 644 | # For more information about patch jobs, see |
| 645 | # [Creating patch |
| 646 | # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 647 | "name": "A String", # Unique identifier for this patch job in the form |
| 648 | # `projects/*/patchJobs/*` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 649 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 650 | "state": "A String", # The current state of the PatchJob. |
| 651 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch # Summary of instance details. |
| 652 | # job affects. Contains counts of instances in different states. These states |
| 653 | # map to `InstancePatchState`. List patch job instance details to see the |
| 654 | # specific states of each instance. |
| 655 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 656 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 657 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 658 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 659 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 660 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 661 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 662 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to |
| 663 | # ensure that the agent is installed, running, and able to communicate with |
| 664 | # the service. |
| 665 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 666 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 667 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 668 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 669 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 670 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 671 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 672 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 673 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. |
| 674 | # patch(es) to a VM instance. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 675 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 676 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches |
| 677 | # that will be updated. This field must not be used with other |
| 678 | # patch configurations. |
| 679 | "A String", |
| 680 | ], |
| 681 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all |
| 682 | # updates are applied. |
| 683 | "A String", |
| 684 | ], |
| 685 | "excludes": [ # List of KBs to exclude from update. |
| 686 | "A String", |
| 687 | ], |
| 688 | }, |
| 689 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 690 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 691 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 692 | # specified the script will be executed directly, which will likely |
| 693 | # only succeed for scripts with [shebang lines] |
| 694 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 695 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 696 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 697 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 698 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 699 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 700 | }, |
| 701 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 702 | # execution can return to indicate a success. |
| 703 | 42, |
| 704 | ], |
| 705 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 706 | }, |
| 707 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 708 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 709 | # specified the script will be executed directly, which will likely |
| 710 | # only succeed for scripts with [shebang lines] |
| 711 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 712 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 713 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 714 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 715 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 716 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 717 | }, |
| 718 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 719 | # execution can return to indicate a success. |
| 720 | 42, |
| 721 | ], |
| 722 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 723 | }, |
| 724 | }, |
| 725 | "yum": { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch |
| 726 | # rules. |
| 727 | # can be set to control how this is executed. |
| 728 | # |
| 729 | # Note that not all settings are supported on all platforms. |
| 730 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 731 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on |
| 732 | # all platforms. |
| 733 | "excludes": [ # List of packages to exclude from update. These packages are excluded by |
| 734 | # using the yum `--exclude` flag. |
| 735 | "A String", |
| 736 | ], |
| 737 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 738 | # that will be updated. If these packages are not installed, they will be |
| 739 | # ignored. This field must not be specified with any other patch |
| 740 | # configuration fields. |
| 741 | "A String", |
| 742 | ], |
| 743 | }, |
| 744 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch |
| 745 | # rules. |
| 746 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 747 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get # Apt update settings. Use this setting to override the default `apt` patch |
| 748 | # rules. |
| 749 | # upgrade`. Additional options can be set to control how this is executed. |
| 750 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 751 | "A String", |
| 752 | ], |
| 753 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 754 | # that will be updated. If these packages are not installed, they will be |
| 755 | # ignored. This field cannot be specified with any other patch configuration |
| 756 | # fields. |
| 757 | "A String", |
| 758 | ], |
| 759 | "type": "A String", # By changing the type to DIST, the patching is performed |
| 760 | # using `apt-get dist-upgrade` instead. |
| 761 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 762 | "rebootConfig": "A String", # Post-patch reboot settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 763 | "zypper": { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper` |
| 764 | # patch rules. |
| 765 | # See also https://en.opensuse.org/SDB:Zypper_manual. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 766 | "excludes": [ # List of patches to exclude from update. |
| 767 | "A String", |
| 768 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 769 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 770 | "severities": [ # Install only patches with these severities. |
| 771 | # Common severities include critical, important, moderate, and low. |
| 772 | "A String", |
| 773 | ], |
| 774 | "categories": [ # Install only patches with these categories. |
| 775 | # Common categories include security, recommended, and feature. |
| 776 | "A String", |
| 777 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 778 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches |
| 779 | # that will be installed using 'zypper patch patch:<patch_name>' command. |
| 780 | # This field must not be used with any other patch configuration fields. |
| 781 | "A String", |
| 782 | ], |
| 783 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 784 | }, |
| 785 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 786 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 787 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 788 | # specified the script will be executed directly, which will likely |
| 789 | # only succeed for scripts with [shebang lines] |
| 790 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 791 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 792 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 793 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 794 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 795 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 796 | }, |
| 797 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 798 | # execution can return to indicate a success. |
| 799 | 42, |
| 800 | ], |
| 801 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 802 | }, |
| 803 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 804 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 805 | # specified the script will be executed directly, which will likely |
| 806 | # only succeed for scripts with [shebang lines] |
| 807 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 808 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 809 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 810 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 811 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 812 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 813 | }, |
| 814 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 815 | # execution can return to indicate a success. |
| 816 | 42, |
| 817 | ], |
| 818 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 819 | }, |
| 820 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 821 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 822 | "createTime": "A String", # Time this patch job was created. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 823 | "instanceFilter": { # A filter to target VM instances for patching. The targeted # Instances to patch. |
| 824 | # VMs must meet all criteria specified. So if both labels and zones are |
| 825 | # specified, the patch job targets only VMs with those labels and in those |
| 826 | # zones. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 827 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to |
| 828 | # labels, this is another way to group VMs when targeting configs, for |
| 829 | # example prefix="prod-". |
| 830 | "A String", |
| 831 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 832 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows |
| 833 | # targeting of disparate groups of VM instances. |
| 834 | { # Targets a group of VM instances by using their [assigned |
| 835 | # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels |
| 836 | # are key-value pairs. A `GroupLabel` is a combination of labels |
| 837 | # that is used to target VMs for a patch job. |
| 838 | # |
| 839 | # For example, a patch job can target VMs that have the following |
| 840 | # `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job |
| 841 | # is applied to VMs that have both the labels `env=test` and `app=web`. |
| 842 | "labels": { # Compute Engine instance labels that must be present for a VM |
| 843 | # instance to be targeted by this filter. |
| 844 | "a_key": "A String", |
| 845 | }, |
| 846 | }, |
| 847 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 848 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM |
| 849 | # instances in any zone. |
| 850 | "A String", |
| 851 | ], |
| 852 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is |
| 853 | # permitted. |
| 854 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their |
| 855 | # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, |
| 856 | # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or |
| 857 | # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 858 | "A String", |
| 859 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 860 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 861 | "rollout": { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied. |
| 862 | # concurrency control when applying patch(es) to all targeted VMs. |
| 863 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or # The maximum number (or percentage) of VMs per zone to disrupt at any given |
| 864 | # moment. The number of VMs calculated from multiplying the percentage by the |
| 865 | # total number of VMs in a zone is rounded up. |
| 866 | # |
| 867 | # During patching, a VM is considered disrupted from the time the agent is |
| 868 | # notified to begin until patching has completed. This disruption time |
| 869 | # includes the time to complete reboot and any post-patch steps. |
| 870 | # |
| 871 | # A VM contributes to the disruption budget if its patching operation fails |
| 872 | # either when applying the patches, running pre or post patch steps, or if it |
| 873 | # fails to respond with a success notification before timing out. VMs that |
| 874 | # are not running or do not have an active agent do not count toward this |
| 875 | # disruption budget. |
| 876 | # |
| 877 | # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, |
| 878 | # the patch job stops, because continuing to the next zone requires |
| 879 | # completion of the patch process in the previous zone. |
| 880 | # |
| 881 | # For example, if the disruption budget has a fixed value of `10`, and 8 VMs |
| 882 | # fail to patch in the current zone, the patch job continues to patch 2 VMs |
| 883 | # at a time until the zone is completed. When that zone is completed |
| 884 | # successfully, patching begins with 10 VMs at a time in the next zone. If 10 |
| 885 | # VMs in the next zone fail to patch, the patch job stops. |
| 886 | # relative ("percent") to a value. |
| 887 | "percent": 42, # Specifies the relative value defined as a percentage, which will be |
| 888 | # multiplied by a reference value. |
| 889 | "fixed": 42, # Specifies a fixed value. |
| 890 | }, |
| 891 | "mode": "A String", # Mode of the patch rollout. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 892 | }, |
| 893 | "description": "A String", # Description of the patch job. Length of the description is limited |
| 894 | # to 1024 characters. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 895 | "duration": "A String", # Duration of the patch job. After the duration ends, the |
| 896 | # patch job times out. |
| 897 | "errorMessage": "A String", # If this patch job failed, this message provides information about the |
| 898 | # failure. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 899 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of |
| 900 | # 0.0 being no progress to 100.0 being complete. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 901 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
| 902 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
| 903 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has |
| 904 | # finished without running any updates on the VM instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 905 | }</pre> |
| 906 | </div> |
| 907 | |
| 908 | <div class="method"> |
| 909 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
| 910 | <pre>Get the patch job. This can be used to track the progress of an |
| 911 | ongoing patch job or review the details of completed jobs. |
| 912 | |
| 913 | Args: |
| 914 | name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required) |
| 915 | x__xgafv: string, V1 error format. |
| 916 | Allowed values |
| 917 | 1 - v1 error format |
| 918 | 2 - v2 error format |
| 919 | |
| 920 | Returns: |
| 921 | An object of the form: |
| 922 | |
| 923 | { # A high level representation of a patch job that is either in progress |
| 924 | # or has completed. |
| 925 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 926 | # Instance details are not included in the job. To paginate through instance |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 927 | # details, use ListPatchJobInstanceDetails. |
| 928 | # |
| 929 | # For more information about patch jobs, see |
| 930 | # [Creating patch |
| 931 | # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 932 | "name": "A String", # Unique identifier for this patch job in the form |
| 933 | # `projects/*/patchJobs/*` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 934 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 935 | "state": "A String", # The current state of the PatchJob. |
| 936 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch # Summary of instance details. |
| 937 | # job affects. Contains counts of instances in different states. These states |
| 938 | # map to `InstancePatchState`. List patch job instance details to see the |
| 939 | # specific states of each instance. |
| 940 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 941 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 942 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 943 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 944 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 945 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 946 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 947 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to |
| 948 | # ensure that the agent is installed, running, and able to communicate with |
| 949 | # the service. |
| 950 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 951 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 952 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 953 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 954 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 955 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 956 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 957 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 958 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. |
| 959 | # patch(es) to a VM instance. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 960 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 961 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches |
| 962 | # that will be updated. This field must not be used with other |
| 963 | # patch configurations. |
| 964 | "A String", |
| 965 | ], |
| 966 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all |
| 967 | # updates are applied. |
| 968 | "A String", |
| 969 | ], |
| 970 | "excludes": [ # List of KBs to exclude from update. |
| 971 | "A String", |
| 972 | ], |
| 973 | }, |
| 974 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 975 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 976 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 977 | # specified the script will be executed directly, which will likely |
| 978 | # only succeed for scripts with [shebang lines] |
| 979 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 980 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 981 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 982 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 983 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 984 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 985 | }, |
| 986 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 987 | # execution can return to indicate a success. |
| 988 | 42, |
| 989 | ], |
| 990 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 991 | }, |
| 992 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 993 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 994 | # specified the script will be executed directly, which will likely |
| 995 | # only succeed for scripts with [shebang lines] |
| 996 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 997 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 998 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 999 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1000 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1001 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1002 | }, |
| 1003 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1004 | # execution can return to indicate a success. |
| 1005 | 42, |
| 1006 | ], |
| 1007 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 1008 | }, |
| 1009 | }, |
| 1010 | "yum": { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch |
| 1011 | # rules. |
| 1012 | # can be set to control how this is executed. |
| 1013 | # |
| 1014 | # Note that not all settings are supported on all platforms. |
| 1015 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 1016 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on |
| 1017 | # all platforms. |
| 1018 | "excludes": [ # List of packages to exclude from update. These packages are excluded by |
| 1019 | # using the yum `--exclude` flag. |
| 1020 | "A String", |
| 1021 | ], |
| 1022 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 1023 | # that will be updated. If these packages are not installed, they will be |
| 1024 | # ignored. This field must not be specified with any other patch |
| 1025 | # configuration fields. |
| 1026 | "A String", |
| 1027 | ], |
| 1028 | }, |
| 1029 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch |
| 1030 | # rules. |
| 1031 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1032 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get # Apt update settings. Use this setting to override the default `apt` patch |
| 1033 | # rules. |
| 1034 | # upgrade`. Additional options can be set to control how this is executed. |
| 1035 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 1036 | "A String", |
| 1037 | ], |
| 1038 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 1039 | # that will be updated. If these packages are not installed, they will be |
| 1040 | # ignored. This field cannot be specified with any other patch configuration |
| 1041 | # fields. |
| 1042 | "A String", |
| 1043 | ], |
| 1044 | "type": "A String", # By changing the type to DIST, the patching is performed |
| 1045 | # using `apt-get dist-upgrade` instead. |
| 1046 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1047 | "rebootConfig": "A String", # Post-patch reboot settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1048 | "zypper": { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper` |
| 1049 | # patch rules. |
| 1050 | # See also https://en.opensuse.org/SDB:Zypper_manual. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1051 | "excludes": [ # List of patches to exclude from update. |
| 1052 | "A String", |
| 1053 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1054 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 1055 | "severities": [ # Install only patches with these severities. |
| 1056 | # Common severities include critical, important, moderate, and low. |
| 1057 | "A String", |
| 1058 | ], |
| 1059 | "categories": [ # Install only patches with these categories. |
| 1060 | # Common categories include security, recommended, and feature. |
| 1061 | "A String", |
| 1062 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1063 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches |
| 1064 | # that will be installed using 'zypper patch patch:<patch_name>' command. |
| 1065 | # This field must not be used with any other patch configuration fields. |
| 1066 | "A String", |
| 1067 | ], |
| 1068 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1069 | }, |
| 1070 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 1071 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1072 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 1073 | # specified the script will be executed directly, which will likely |
| 1074 | # only succeed for scripts with [shebang lines] |
| 1075 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1076 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 1077 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 1078 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1079 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1080 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1081 | }, |
| 1082 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1083 | # execution can return to indicate a success. |
| 1084 | 42, |
| 1085 | ], |
| 1086 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1087 | }, |
| 1088 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1089 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 1090 | # specified the script will be executed directly, which will likely |
| 1091 | # only succeed for scripts with [shebang lines] |
| 1092 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1093 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 1094 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 1095 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1096 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1097 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1098 | }, |
| 1099 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1100 | # execution can return to indicate a success. |
| 1101 | 42, |
| 1102 | ], |
| 1103 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1104 | }, |
| 1105 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1106 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1107 | "createTime": "A String", # Time this patch job was created. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1108 | "instanceFilter": { # A filter to target VM instances for patching. The targeted # Instances to patch. |
| 1109 | # VMs must meet all criteria specified. So if both labels and zones are |
| 1110 | # specified, the patch job targets only VMs with those labels and in those |
| 1111 | # zones. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1112 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to |
| 1113 | # labels, this is another way to group VMs when targeting configs, for |
| 1114 | # example prefix="prod-". |
| 1115 | "A String", |
| 1116 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1117 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows |
| 1118 | # targeting of disparate groups of VM instances. |
| 1119 | { # Targets a group of VM instances by using their [assigned |
| 1120 | # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels |
| 1121 | # are key-value pairs. A `GroupLabel` is a combination of labels |
| 1122 | # that is used to target VMs for a patch job. |
| 1123 | # |
| 1124 | # For example, a patch job can target VMs that have the following |
| 1125 | # `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job |
| 1126 | # is applied to VMs that have both the labels `env=test` and `app=web`. |
| 1127 | "labels": { # Compute Engine instance labels that must be present for a VM |
| 1128 | # instance to be targeted by this filter. |
| 1129 | "a_key": "A String", |
| 1130 | }, |
| 1131 | }, |
| 1132 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1133 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM |
| 1134 | # instances in any zone. |
| 1135 | "A String", |
| 1136 | ], |
| 1137 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is |
| 1138 | # permitted. |
| 1139 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their |
| 1140 | # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, |
| 1141 | # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or |
| 1142 | # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 1143 | "A String", |
| 1144 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1145 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1146 | "rollout": { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied. |
| 1147 | # concurrency control when applying patch(es) to all targeted VMs. |
| 1148 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or # The maximum number (or percentage) of VMs per zone to disrupt at any given |
| 1149 | # moment. The number of VMs calculated from multiplying the percentage by the |
| 1150 | # total number of VMs in a zone is rounded up. |
| 1151 | # |
| 1152 | # During patching, a VM is considered disrupted from the time the agent is |
| 1153 | # notified to begin until patching has completed. This disruption time |
| 1154 | # includes the time to complete reboot and any post-patch steps. |
| 1155 | # |
| 1156 | # A VM contributes to the disruption budget if its patching operation fails |
| 1157 | # either when applying the patches, running pre or post patch steps, or if it |
| 1158 | # fails to respond with a success notification before timing out. VMs that |
| 1159 | # are not running or do not have an active agent do not count toward this |
| 1160 | # disruption budget. |
| 1161 | # |
| 1162 | # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, |
| 1163 | # the patch job stops, because continuing to the next zone requires |
| 1164 | # completion of the patch process in the previous zone. |
| 1165 | # |
| 1166 | # For example, if the disruption budget has a fixed value of `10`, and 8 VMs |
| 1167 | # fail to patch in the current zone, the patch job continues to patch 2 VMs |
| 1168 | # at a time until the zone is completed. When that zone is completed |
| 1169 | # successfully, patching begins with 10 VMs at a time in the next zone. If 10 |
| 1170 | # VMs in the next zone fail to patch, the patch job stops. |
| 1171 | # relative ("percent") to a value. |
| 1172 | "percent": 42, # Specifies the relative value defined as a percentage, which will be |
| 1173 | # multiplied by a reference value. |
| 1174 | "fixed": 42, # Specifies a fixed value. |
| 1175 | }, |
| 1176 | "mode": "A String", # Mode of the patch rollout. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1177 | }, |
| 1178 | "description": "A String", # Description of the patch job. Length of the description is limited |
| 1179 | # to 1024 characters. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1180 | "duration": "A String", # Duration of the patch job. After the duration ends, the |
| 1181 | # patch job times out. |
| 1182 | "errorMessage": "A String", # If this patch job failed, this message provides information about the |
| 1183 | # failure. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1184 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of |
| 1185 | # 0.0 being no progress to 100.0 being complete. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1186 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
| 1187 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
| 1188 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has |
| 1189 | # finished without running any updates on the VM instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1190 | }</pre> |
| 1191 | </div> |
| 1192 | |
| 1193 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1194 | <code class="details" id="list">list(parent, pageSize=None, pageToken=None, filter=None, x__xgafv=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1195 | <pre>Get a list of patch jobs. |
| 1196 | |
| 1197 | Args: |
| 1198 | parent: string, Required. In the form of `projects/*` (required) |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1199 | pageSize: integer, The maximum number of instance status to return. |
| 1200 | pageToken: string, A pagination token returned from a previous call |
| 1201 | that indicates where this listing should continue from. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1202 | filter: string, If provided, this field specifies the criteria that must be met by patch |
| 1203 | jobs to be included in the response. |
| 1204 | Currently, filtering is only available on the patch_deployment field. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1205 | x__xgafv: string, V1 error format. |
| 1206 | Allowed values |
| 1207 | 1 - v1 error format |
| 1208 | 2 - v2 error format |
| 1209 | |
| 1210 | Returns: |
| 1211 | An object of the form: |
| 1212 | |
| 1213 | { # A response message for listing patch jobs. |
| 1214 | "patchJobs": [ # The list of patch jobs. |
| 1215 | { # A high level representation of a patch job that is either in progress |
| 1216 | # or has completed. |
| 1217 | # |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1218 | # Instance details are not included in the job. To paginate through instance |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1219 | # details, use ListPatchJobInstanceDetails. |
| 1220 | # |
| 1221 | # For more information about patch jobs, see |
| 1222 | # [Creating patch |
| 1223 | # jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1224 | "name": "A String", # Unique identifier for this patch job in the form |
| 1225 | # `projects/*/patchJobs/*` |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1226 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1227 | "state": "A String", # The current state of the PatchJob. |
| 1228 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch # Summary of instance details. |
| 1229 | # job affects. Contains counts of instances in different states. These states |
| 1230 | # map to `InstancePatchState`. List patch job instance details to see the |
| 1231 | # specific states of each instance. |
| 1232 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 1233 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 1234 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 1235 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 1236 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 1237 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 1238 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 1239 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to |
| 1240 | # ensure that the agent is installed, running, and able to communicate with |
| 1241 | # the service. |
| 1242 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 1243 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 1244 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 1245 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 1246 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 1247 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 1248 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 1249 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1250 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the # Patch configuration being applied. |
| 1251 | # patch(es) to a VM instance. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1252 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 1253 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches |
| 1254 | # that will be updated. This field must not be used with other |
| 1255 | # patch configurations. |
| 1256 | "A String", |
| 1257 | ], |
| 1258 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all |
| 1259 | # updates are applied. |
| 1260 | "A String", |
| 1261 | ], |
| 1262 | "excludes": [ # List of KBs to exclude from update. |
| 1263 | "A String", |
| 1264 | ], |
| 1265 | }, |
| 1266 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 1267 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 1268 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 1269 | # specified the script will be executed directly, which will likely |
| 1270 | # only succeed for scripts with [shebang lines] |
| 1271 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 1272 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 1273 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 1274 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1275 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1276 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1277 | }, |
| 1278 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1279 | # execution can return to indicate a success. |
| 1280 | 42, |
| 1281 | ], |
| 1282 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 1283 | }, |
| 1284 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 1285 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 1286 | # specified the script will be executed directly, which will likely |
| 1287 | # only succeed for scripts with [shebang lines] |
| 1288 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 1289 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 1290 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 1291 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1292 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1293 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1294 | }, |
| 1295 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1296 | # execution can return to indicate a success. |
| 1297 | 42, |
| 1298 | ], |
| 1299 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 1300 | }, |
| 1301 | }, |
| 1302 | "yum": { # Yum patching is performed by executing `yum update`. Additional options # Yum update settings. Use this setting to override the default `yum` patch |
| 1303 | # rules. |
| 1304 | # can be set to control how this is executed. |
| 1305 | # |
| 1306 | # Note that not all settings are supported on all platforms. |
| 1307 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 1308 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on |
| 1309 | # all platforms. |
| 1310 | "excludes": [ # List of packages to exclude from update. These packages are excluded by |
| 1311 | # using the yum `--exclude` flag. |
| 1312 | "A String", |
| 1313 | ], |
| 1314 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 1315 | # that will be updated. If these packages are not installed, they will be |
| 1316 | # ignored. This field must not be specified with any other patch |
| 1317 | # configuration fields. |
| 1318 | "A String", |
| 1319 | ], |
| 1320 | }, |
| 1321 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch |
| 1322 | # rules. |
| 1323 | }, |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1324 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get # Apt update settings. Use this setting to override the default `apt` patch |
| 1325 | # rules. |
| 1326 | # upgrade`. Additional options can be set to control how this is executed. |
| 1327 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 1328 | "A String", |
| 1329 | ], |
| 1330 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages |
| 1331 | # that will be updated. If these packages are not installed, they will be |
| 1332 | # ignored. This field cannot be specified with any other patch configuration |
| 1333 | # fields. |
| 1334 | "A String", |
| 1335 | ], |
| 1336 | "type": "A String", # By changing the type to DIST, the patching is performed |
| 1337 | # using `apt-get dist-upgrade` instead. |
| 1338 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1339 | "rebootConfig": "A String", # Post-patch reboot settings. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1340 | "zypper": { # Zypper patching is performed by running `zypper patch`. # Zypper update settings. Use this setting to override the default `zypper` |
| 1341 | # patch rules. |
| 1342 | # See also https://en.opensuse.org/SDB:Zypper_manual. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1343 | "excludes": [ # List of patches to exclude from update. |
| 1344 | "A String", |
| 1345 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1346 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 1347 | "severities": [ # Install only patches with these severities. |
| 1348 | # Common severities include critical, important, moderate, and low. |
| 1349 | "A String", |
| 1350 | ], |
| 1351 | "categories": [ # Install only patches with these categories. |
| 1352 | # Common categories include security, recommended, and feature. |
| 1353 | "A String", |
| 1354 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1355 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches |
| 1356 | # that will be installed using 'zypper patch patch:<patch_name>' command. |
| 1357 | # This field must not be used with any other patch configuration fields. |
| 1358 | "A String", |
| 1359 | ], |
| 1360 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1361 | }, |
| 1362 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 1363 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1364 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 1365 | # specified the script will be executed directly, which will likely |
| 1366 | # only succeed for scripts with [shebang lines] |
| 1367 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1368 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 1369 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 1370 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1371 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1372 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1373 | }, |
| 1374 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1375 | # execution can return to indicate a success. |
| 1376 | 42, |
| 1377 | ], |
| 1378 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1379 | }, |
| 1380 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 1381 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is |
| 1382 | # specified the script will be executed directly, which will likely |
| 1383 | # only succeed for scripts with [shebang lines] |
| 1384 | # (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1385 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 1386 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 1387 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 1388 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to |
| 1389 | # ensure that the ExecStep specified by this PatchJob does not change. |
| 1390 | }, |
| 1391 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the |
| 1392 | # execution can return to indicate a success. |
| 1393 | 42, |
| 1394 | ], |
| 1395 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1396 | }, |
| 1397 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1398 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1399 | "createTime": "A String", # Time this patch job was created. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1400 | "instanceFilter": { # A filter to target VM instances for patching. The targeted # Instances to patch. |
| 1401 | # VMs must meet all criteria specified. So if both labels and zones are |
| 1402 | # specified, the patch job targets only VMs with those labels and in those |
| 1403 | # zones. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1404 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to |
| 1405 | # labels, this is another way to group VMs when targeting configs, for |
| 1406 | # example prefix="prod-". |
| 1407 | "A String", |
| 1408 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1409 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows |
| 1410 | # targeting of disparate groups of VM instances. |
| 1411 | { # Targets a group of VM instances by using their [assigned |
| 1412 | # labels](https://cloud.google.com/compute/docs/labeling-resources). Labels |
| 1413 | # are key-value pairs. A `GroupLabel` is a combination of labels |
| 1414 | # that is used to target VMs for a patch job. |
| 1415 | # |
| 1416 | # For example, a patch job can target VMs that have the following |
| 1417 | # `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job |
| 1418 | # is applied to VMs that have both the labels `env=test` and `app=web`. |
| 1419 | "labels": { # Compute Engine instance labels that must be present for a VM |
| 1420 | # instance to be targeted by this filter. |
| 1421 | "a_key": "A String", |
| 1422 | }, |
| 1423 | }, |
| 1424 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1425 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM |
| 1426 | # instances in any zone. |
| 1427 | "A String", |
| 1428 | ], |
| 1429 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is |
| 1430 | # permitted. |
| 1431 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their |
| 1432 | # URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, |
| 1433 | # `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or |
| 1434 | # `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 1435 | "A String", |
| 1436 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1437 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1438 | "rollout": { # Patch rollout configuration specifications. Contains details on the # Rollout strategy being applied. |
| 1439 | # concurrency control when applying patch(es) to all targeted VMs. |
| 1440 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or # The maximum number (or percentage) of VMs per zone to disrupt at any given |
| 1441 | # moment. The number of VMs calculated from multiplying the percentage by the |
| 1442 | # total number of VMs in a zone is rounded up. |
| 1443 | # |
| 1444 | # During patching, a VM is considered disrupted from the time the agent is |
| 1445 | # notified to begin until patching has completed. This disruption time |
| 1446 | # includes the time to complete reboot and any post-patch steps. |
| 1447 | # |
| 1448 | # A VM contributes to the disruption budget if its patching operation fails |
| 1449 | # either when applying the patches, running pre or post patch steps, or if it |
| 1450 | # fails to respond with a success notification before timing out. VMs that |
| 1451 | # are not running or do not have an active agent do not count toward this |
| 1452 | # disruption budget. |
| 1453 | # |
| 1454 | # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, |
| 1455 | # the patch job stops, because continuing to the next zone requires |
| 1456 | # completion of the patch process in the previous zone. |
| 1457 | # |
| 1458 | # For example, if the disruption budget has a fixed value of `10`, and 8 VMs |
| 1459 | # fail to patch in the current zone, the patch job continues to patch 2 VMs |
| 1460 | # at a time until the zone is completed. When that zone is completed |
| 1461 | # successfully, patching begins with 10 VMs at a time in the next zone. If 10 |
| 1462 | # VMs in the next zone fail to patch, the patch job stops. |
| 1463 | # relative ("percent") to a value. |
| 1464 | "percent": 42, # Specifies the relative value defined as a percentage, which will be |
| 1465 | # multiplied by a reference value. |
| 1466 | "fixed": 42, # Specifies a fixed value. |
| 1467 | }, |
| 1468 | "mode": "A String", # Mode of the patch rollout. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1469 | }, |
| 1470 | "description": "A String", # Description of the patch job. Length of the description is limited |
| 1471 | # to 1024 characters. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1472 | "duration": "A String", # Duration of the patch job. After the duration ends, the |
| 1473 | # patch job times out. |
| 1474 | "errorMessage": "A String", # If this patch job failed, this message provides information about the |
| 1475 | # failure. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1476 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of |
| 1477 | # 0.0 being no progress to 100.0 being complete. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame^] | 1478 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
| 1479 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
| 1480 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has |
| 1481 | # finished without running any updates on the VM instance. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1482 | }, |
| 1483 | ], |
| 1484 | "nextPageToken": "A String", # A pagination token that can be used to get the next page of results. |
| 1485 | }</pre> |
| 1486 | </div> |
| 1487 | |
| 1488 | <div class="method"> |
| 1489 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 1490 | <pre>Retrieves the next page of results. |
| 1491 | |
| 1492 | Args: |
| 1493 | previous_request: The request for the previous page. (required) |
| 1494 | previous_response: The response from the request for the previous page. (required) |
| 1495 | |
| 1496 | Returns: |
| 1497 | A request object that you can call 'execute()' on to request the next |
| 1498 | page. Returns None if there are no more items in the collection. |
| 1499 | </pre> |
| 1500 | </div> |
| 1501 | |
| 1502 | </body></html> |