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 | |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 75 | <h1><a href="osconfig_v1beta.html">OS Config API</a> . <a href="osconfig_v1beta.projects.html">projects</a> . <a href="osconfig_v1beta.projects.patchJobs.html">patchJobs</a></h1> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 84 | <p class="firstline">Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.</p> |
| 85 | <p class="toc_element"> |
| 86 | <code><a href="#close">close()</a></code></p> |
| 87 | <p class="firstline">Close httplib2 connections.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 88 | <p class="toc_element"> |
| 89 | <code><a href="#execute">execute(parent, body=None, x__xgafv=None)</a></code></p> |
| 90 | <p class="firstline">Patch VM instances by creating and running a patch job.</p> |
| 91 | <p class="toc_element"> |
| 92 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 93 | <p class="firstline">Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.</p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 94 | <p class="toc_element"> |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 95 | <code><a href="#list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 96 | <p class="firstline">Get a list of patch jobs.</p> |
| 97 | <p class="toc_element"> |
| 98 | <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> |
| 99 | <p class="firstline">Retrieves the next page of results.</p> |
| 100 | <h3>Method Details</h3> |
| 101 | <div class="method"> |
| 102 | <code class="details" id="cancel">cancel(name, body=None, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 103 | <pre>Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 104 | |
| 105 | Args: |
| 106 | name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required) |
| 107 | body: object, The request body. |
| 108 | The object takes the form of: |
| 109 | |
| 110 | { # Message for canceling a patch job. |
| 111 | } |
| 112 | |
| 113 | x__xgafv: string, V1 error format. |
| 114 | Allowed values |
| 115 | 1 - v1 error format |
| 116 | 2 - v2 error format |
| 117 | |
| 118 | Returns: |
| 119 | An object of the form: |
| 120 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 121 | { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 122 | "instanceFilter": { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch. |
| 123 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
| 124 | "A String", |
| 125 | ], |
| 126 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-". |
| 127 | "A String", |
| 128 | ], |
| 129 | "groupLabels": [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging". |
| 130 | { # Represents a group of VMs that can be identified as having all these labels, for example "env=prod and app=web". |
| 131 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
| 132 | "a_key": "A String", |
| 133 | }, |
| 134 | }, |
| 135 | ], |
| 136 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 137 | "A String", |
| 138 | ], |
| 139 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 140 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 141 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 142 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 143 | "mode": "A String", # Mode of the patch rollout. |
| 144 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops. |
| 145 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 146 | "fixed": 42, # Specifies a fixed value. |
| 147 | }, |
| 148 | }, |
| 149 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 150 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 151 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete. |
| 152 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 153 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 154 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 155 | "createTime": "A String", # Time this patch job was created. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 156 | "state": "A String", # The current state of the PatchJob. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 157 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 158 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 159 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 160 | "A String", |
| 161 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 162 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations. |
| 163 | "A String", |
| 164 | ], |
| 165 | "excludes": [ # List of KBs to exclude from update. |
| 166 | "A String", |
| 167 | ], |
| 168 | }, |
| 169 | "zypper": { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 170 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 171 | "A String", |
| 172 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 173 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields. |
| 174 | "A String", |
| 175 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 176 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 177 | "A String", |
| 178 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 179 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 180 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 181 | "excludes": [ # List of patches to exclude from update. |
| 182 | "A String", |
| 183 | ], |
| 184 | }, |
| 185 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 186 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 187 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 188 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 189 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 190 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 191 | }, |
| 192 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 193 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 194 | 42, |
| 195 | ], |
| 196 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 197 | }, |
| 198 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 199 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 200 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 201 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 202 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 203 | }, |
| 204 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 205 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 206 | 42, |
| 207 | ], |
| 208 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 209 | }, |
| 210 | }, |
| 211 | "yum": { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 212 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields. |
| 213 | "A String", |
| 214 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 215 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 216 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 217 | "A String", |
| 218 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 219 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 220 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 221 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 222 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 223 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 224 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 225 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 226 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 227 | }, |
| 228 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 229 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 230 | 42, |
| 231 | ], |
| 232 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 233 | }, |
| 234 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 235 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 236 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 237 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 238 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 239 | }, |
| 240 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 241 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 242 | 42, |
| 243 | ], |
| 244 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 245 | }, |
| 246 | }, |
| 247 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 248 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 249 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 250 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules. |
| 251 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 252 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 253 | "A String", |
| 254 | ], |
| 255 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields. |
| 256 | "A String", |
| 257 | ], |
| 258 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 259 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 260 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details. |
| 261 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 262 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 263 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 264 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 265 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 266 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 267 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 268 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 269 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 270 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 271 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 272 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 273 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 274 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service. |
| 275 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 276 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 277 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 278 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 279 | }</pre> |
| 280 | </div> |
| 281 | |
| 282 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 283 | <code class="details" id="close">close()</code> |
| 284 | <pre>Close httplib2 connections.</pre> |
| 285 | </div> |
| 286 | |
| 287 | <div class="method"> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 288 | <code class="details" id="execute">execute(parent, body=None, x__xgafv=None)</code> |
| 289 | <pre>Patch VM instances by creating and running a patch job. |
| 290 | |
| 291 | Args: |
| 292 | parent: string, Required. The project in which to run this patch in the form `projects/*` (required) |
| 293 | body: object, The request body. |
| 294 | The object takes the form of: |
| 295 | |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 296 | { # A request message to initiate patching across Compute Engine instances. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 297 | "instanceFilter": { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 298 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 299 | "A String", |
| 300 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 301 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-". |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 302 | "A String", |
| 303 | ], |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 304 | "groupLabels": [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging". |
| 305 | { # Represents a group of VMs that can be identified as having all these labels, for example "env=prod and app=web". |
| 306 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
| 307 | "a_key": "A String", |
| 308 | }, |
| 309 | }, |
| 310 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 311 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 312 | "A String", |
| 313 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 314 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 315 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 316 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 317 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 318 | "dryRun": True or False, # If this patch is a dry-run only, instances are contacted but will do nothing. |
| 319 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy of the patch job. |
| 320 | "mode": "A String", # Mode of the patch rollout. |
| 321 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops. |
| 322 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 323 | "fixed": 42, # Specifies a fixed value. |
| 324 | }, |
| 325 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 326 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. If omitted, instances are patched using the default configurations. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 327 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 328 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 329 | "A String", |
| 330 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 331 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations. |
| 332 | "A String", |
| 333 | ], |
| 334 | "excludes": [ # List of KBs to exclude from update. |
| 335 | "A String", |
| 336 | ], |
| 337 | }, |
| 338 | "zypper": { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 339 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 340 | "A String", |
| 341 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 342 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 343 | "A String", |
| 344 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 345 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 346 | "A String", |
| 347 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 348 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 349 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 350 | "excludes": [ # List of patches to exclude from update. |
| 351 | "A String", |
| 352 | ], |
| 353 | }, |
| 354 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 355 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 356 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 357 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 358 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 359 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 360 | }, |
| 361 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 362 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 363 | 42, |
| 364 | ], |
| 365 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 366 | }, |
| 367 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 368 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 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 ensure that the ExecStep specified by this PatchJob does not change. |
| 371 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 372 | }, |
| 373 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 374 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 375 | 42, |
| 376 | ], |
| 377 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 378 | }, |
| 379 | }, |
| 380 | "yum": { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 381 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields. |
| 382 | "A String", |
| 383 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 384 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 385 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 386 | "A String", |
| 387 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 388 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 389 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 390 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 391 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 392 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 393 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 394 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 395 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 396 | }, |
| 397 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 398 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 399 | 42, |
| 400 | ], |
| 401 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 402 | }, |
| 403 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 404 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 405 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 406 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 407 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 408 | }, |
| 409 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 410 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 411 | 42, |
| 412 | ], |
| 413 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 414 | }, |
| 415 | }, |
| 416 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 417 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 418 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 419 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules. |
| 420 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 421 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 422 | "A String", |
| 423 | ], |
| 424 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields. |
| 425 | "A String", |
| 426 | ], |
| 427 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 428 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 429 | "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] | 430 | } |
| 431 | |
| 432 | x__xgafv: string, V1 error format. |
| 433 | Allowed values |
| 434 | 1 - v1 error format |
| 435 | 2 - v2 error format |
| 436 | |
| 437 | Returns: |
| 438 | An object of the form: |
| 439 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 440 | { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 441 | "instanceFilter": { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch. |
| 442 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
| 443 | "A String", |
| 444 | ], |
| 445 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-". |
| 446 | "A String", |
| 447 | ], |
| 448 | "groupLabels": [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging". |
| 449 | { # Represents a group of VMs that can be identified as having all these labels, for example "env=prod and app=web". |
| 450 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
| 451 | "a_key": "A String", |
| 452 | }, |
| 453 | }, |
| 454 | ], |
| 455 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 456 | "A String", |
| 457 | ], |
| 458 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 459 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 460 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 461 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 462 | "mode": "A String", # Mode of the patch rollout. |
| 463 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops. |
| 464 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 465 | "fixed": 42, # Specifies a fixed value. |
| 466 | }, |
| 467 | }, |
| 468 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 469 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 470 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete. |
| 471 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 472 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 473 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 474 | "createTime": "A String", # Time this patch job was created. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 475 | "state": "A String", # The current state of the PatchJob. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 476 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 477 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 478 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 479 | "A String", |
| 480 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 481 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations. |
| 482 | "A String", |
| 483 | ], |
| 484 | "excludes": [ # List of KBs to exclude from update. |
| 485 | "A String", |
| 486 | ], |
| 487 | }, |
| 488 | "zypper": { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 489 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 490 | "A String", |
| 491 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 492 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields. |
| 493 | "A String", |
| 494 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 495 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 496 | "A String", |
| 497 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 498 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 499 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 500 | "excludes": [ # List of patches to exclude from update. |
| 501 | "A String", |
| 502 | ], |
| 503 | }, |
| 504 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 505 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 506 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 507 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 508 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 509 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 510 | }, |
| 511 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 512 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 513 | 42, |
| 514 | ], |
| 515 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 516 | }, |
| 517 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 518 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 519 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 520 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 521 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 522 | }, |
| 523 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 524 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 525 | 42, |
| 526 | ], |
| 527 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 528 | }, |
| 529 | }, |
| 530 | "yum": { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 531 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields. |
| 532 | "A String", |
| 533 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 534 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 535 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 536 | "A String", |
| 537 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 538 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 539 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 540 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 541 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 542 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 543 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 544 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 545 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 546 | }, |
| 547 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 548 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 549 | 42, |
| 550 | ], |
| 551 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 552 | }, |
| 553 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 554 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 555 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 556 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 557 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 558 | }, |
| 559 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 560 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 561 | 42, |
| 562 | ], |
| 563 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 564 | }, |
| 565 | }, |
| 566 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 567 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 568 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 569 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules. |
| 570 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 571 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 572 | "A String", |
| 573 | ], |
| 574 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields. |
| 575 | "A String", |
| 576 | ], |
| 577 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 578 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 579 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details. |
| 580 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 581 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 582 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 583 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 584 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 585 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 586 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 587 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 588 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 589 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 590 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 591 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 592 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 593 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service. |
| 594 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 595 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 596 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 597 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 598 | }</pre> |
| 599 | </div> |
| 600 | |
| 601 | <div class="method"> |
| 602 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 603 | <pre>Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 604 | |
| 605 | Args: |
| 606 | name: string, Required. Name of the patch in the form `projects/*/patchJobs/*` (required) |
| 607 | x__xgafv: string, V1 error format. |
| 608 | Allowed values |
| 609 | 1 - v1 error format |
| 610 | 2 - v2 error format |
| 611 | |
| 612 | Returns: |
| 613 | An object of the form: |
| 614 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 615 | { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 616 | "instanceFilter": { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch. |
| 617 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
| 618 | "A String", |
| 619 | ], |
| 620 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-". |
| 621 | "A String", |
| 622 | ], |
| 623 | "groupLabels": [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging". |
| 624 | { # Represents a group of VMs that can be identified as having all these labels, for example "env=prod and app=web". |
| 625 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
| 626 | "a_key": "A String", |
| 627 | }, |
| 628 | }, |
| 629 | ], |
| 630 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 631 | "A String", |
| 632 | ], |
| 633 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 634 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 635 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 636 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 637 | "mode": "A String", # Mode of the patch rollout. |
| 638 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops. |
| 639 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 640 | "fixed": 42, # Specifies a fixed value. |
| 641 | }, |
| 642 | }, |
| 643 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 644 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 645 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete. |
| 646 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 647 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 648 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 649 | "createTime": "A String", # Time this patch job was created. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 650 | "state": "A String", # The current state of the PatchJob. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 651 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 652 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 653 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 654 | "A String", |
| 655 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 656 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations. |
| 657 | "A String", |
| 658 | ], |
| 659 | "excludes": [ # List of KBs to exclude from update. |
| 660 | "A String", |
| 661 | ], |
| 662 | }, |
| 663 | "zypper": { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 664 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 665 | "A String", |
| 666 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 667 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields. |
| 668 | "A String", |
| 669 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 670 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 671 | "A String", |
| 672 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 673 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 674 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 675 | "excludes": [ # List of patches to exclude from update. |
| 676 | "A String", |
| 677 | ], |
| 678 | }, |
| 679 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 680 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 681 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 682 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 683 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 684 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 685 | }, |
| 686 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 687 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 688 | 42, |
| 689 | ], |
| 690 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 691 | }, |
| 692 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 693 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 694 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 695 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 696 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 697 | }, |
| 698 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 699 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 700 | 42, |
| 701 | ], |
| 702 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 703 | }, |
| 704 | }, |
| 705 | "yum": { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 706 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields. |
| 707 | "A String", |
| 708 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 709 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 710 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 711 | "A String", |
| 712 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 713 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 714 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 715 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 716 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 717 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 718 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 719 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 720 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 721 | }, |
| 722 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 723 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 724 | 42, |
| 725 | ], |
| 726 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 727 | }, |
| 728 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 729 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 730 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 731 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 732 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 733 | }, |
| 734 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 735 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 736 | 42, |
| 737 | ], |
| 738 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 739 | }, |
| 740 | }, |
| 741 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 742 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 743 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 744 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules. |
| 745 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 746 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 747 | "A String", |
| 748 | ], |
| 749 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields. |
| 750 | "A String", |
| 751 | ], |
| 752 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 753 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 754 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details. |
| 755 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 756 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 757 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 758 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 759 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 760 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 761 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 762 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 763 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 764 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 765 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 766 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 767 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 768 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service. |
| 769 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 770 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 771 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 772 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 773 | }</pre> |
| 774 | </div> |
| 775 | |
| 776 | <div class="method"> |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 777 | <code class="details" id="list">list(parent, pageSize=None, filter=None, pageToken=None, x__xgafv=None)</code> |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 778 | <pre>Get a list of patch jobs. |
| 779 | |
| 780 | Args: |
| 781 | parent: string, Required. In the form of `projects/*` (required) |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 782 | pageSize: integer, The maximum number of instance status to return. |
Bu Sun Kim | 673ec5c | 2020-11-16 11:05:03 -0700 | [diff] [blame] | 783 | filter: string, If provided, this field specifies the criteria that must be met by patch jobs to be included in the response. Currently, filtering is only available on the patch_deployment field. |
| 784 | pageToken: string, A pagination token returned from a previous call that indicates where this listing should continue from. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 785 | x__xgafv: string, V1 error format. |
| 786 | Allowed values |
| 787 | 1 - v1 error format |
| 788 | 2 - v2 error format |
| 789 | |
| 790 | Returns: |
| 791 | An object of the form: |
| 792 | |
| 793 | { # A response message for listing patch jobs. |
| 794 | "patchJobs": [ # The list of patch jobs. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame] | 795 | { # A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job). |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 796 | "instanceFilter": { # A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones. # Instances to patch. |
| 797 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
| 798 | "A String", |
| 799 | ], |
| 800 | "instanceNamePrefixes": [ # Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix="prod-". |
| 801 | "A String", |
| 802 | ], |
| 803 | "groupLabels": [ # Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example "env=prod or env=staging". |
| 804 | { # Represents a group of VMs that can be identified as having all these labels, for example "env=prod and app=web". |
| 805 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
| 806 | "a_key": "A String", |
| 807 | }, |
| 808 | }, |
| 809 | ], |
| 810 | "instances": [ # Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]` |
| 811 | "A String", |
| 812 | ], |
| 813 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 814 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 815 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 816 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 817 | "mode": "A String", # Mode of the patch rollout. |
| 818 | "disruptionBudget": { # Message encapsulating a value that can be either absolute ("fixed") or relative ("percent") to a value. # The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops. |
| 819 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 820 | "fixed": 42, # Specifies a fixed value. |
| 821 | }, |
| 822 | }, |
| 823 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 824 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 825 | "percentComplete": 3.14, # Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete. |
| 826 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 827 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 828 | "dryRun": True or False, # If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 829 | "createTime": "A String", # Time this patch job was created. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 830 | "state": "A String", # The current state of the PatchJob. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 831 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 832 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 833 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 834 | "A String", |
| 835 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 836 | "exclusivePatches": [ # An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations. |
| 837 | "A String", |
| 838 | ], |
| 839 | "excludes": [ # List of KBs to exclude from update. |
| 840 | "A String", |
| 841 | ], |
| 842 | }, |
| 843 | "zypper": { # Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual. # Zypper update settings. Use this setting to override the default `zypper` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 844 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 845 | "A String", |
| 846 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 847 | "exclusivePatches": [ # An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields. |
| 848 | "A String", |
| 849 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 850 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 851 | "A String", |
| 852 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 853 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 854 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 855 | "excludes": [ # List of patches to exclude from update. |
| 856 | "A String", |
| 857 | ], |
| 858 | }, |
| 859 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 860 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 861 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 862 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 863 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 864 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 865 | }, |
| 866 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 867 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 868 | 42, |
| 869 | ], |
| 870 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 871 | }, |
| 872 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 873 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 874 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 875 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 876 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 877 | }, |
| 878 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 879 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 880 | 42, |
| 881 | ], |
| 882 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 883 | }, |
| 884 | }, |
| 885 | "yum": { # Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms. # Yum update settings. Use this setting to override the default `yum` patch rules. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 886 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields. |
| 887 | "A String", |
| 888 | ], |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 889 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 890 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 891 | "A String", |
| 892 | ], |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 893 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 894 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 895 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 896 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 897 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 898 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 899 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 900 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 901 | }, |
| 902 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 903 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 904 | 42, |
| 905 | ], |
| 906 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 907 | }, |
| 908 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 909 | "gcsObject": { # Google Cloud Storage object representation. # A Google Cloud Storage object containing the executable. |
| 910 | "object": "A String", # Required. Name of the Google Cloud Storage object. |
| 911 | "generationNumber": "A String", # Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 912 | "bucket": "A String", # Required. Bucket of the Google Cloud Storage object. |
| 913 | }, |
| 914 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 915 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 916 | 42, |
| 917 | ], |
| 918 | "interpreter": "A String", # The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\(Unix\)). |
| 919 | }, |
| 920 | }, |
| 921 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 922 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 923 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 924 | "apt": { # Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed. # Apt update settings. Use this setting to override the default `apt` patch rules. |
| 925 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 926 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 927 | "A String", |
| 928 | ], |
| 929 | "exclusivePackages": [ # An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields. |
| 930 | "A String", |
| 931 | ], |
| 932 | }, |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 933 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 934 | "instanceDetailsSummary": { # A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance. # Summary of instance details. |
| 935 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
| 936 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 937 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
| 938 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
| 939 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
| 940 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 941 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 942 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
| 943 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 944 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 945 | "startedInstanceCount": "A String", # Number of instances that have started. |
| 946 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 947 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
| 948 | "noAgentDetectedInstanceCount": "A String", # Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service. |
| 949 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 950 | }, |
Yoshi Automation Bot | 0d561ef | 2020-11-25 07:50:41 -0800 | [diff] [blame] | 951 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
Yoshi Automation Bot | c2228be | 2020-11-24 15:48:03 -0800 | [diff] [blame] | 952 | "updateTime": "A String", # Last time this patch job was updated. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 953 | }, |
| 954 | ], |
| 955 | "nextPageToken": "A String", # A pagination token that can be used to get the next page of results. |
| 956 | }</pre> |
| 957 | </div> |
| 958 | |
| 959 | <div class="method"> |
| 960 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 961 | <pre>Retrieves the next page of results. |
| 962 | |
| 963 | Args: |
| 964 | previous_request: The request for the previous page. (required) |
| 965 | previous_response: The response from the request for the previous page. (required) |
| 966 | |
| 967 | Returns: |
| 968 | A request object that you can call 'execute()' on to request the next |
| 969 | page. Returns None if there are no more items in the collection. |
| 970 | </pre> |
| 971 | </div> |
| 972 | |
| 973 | </body></html> |