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