Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, h1, h2, h3, div, span, p, pre, a { |
| 5 | margin: 0; |
| 6 | padding: 0; |
| 7 | border: 0; |
| 8 | font-weight: inherit; |
| 9 | font-style: inherit; |
| 10 | font-size: 100%; |
| 11 | font-family: inherit; |
| 12 | vertical-align: baseline; |
| 13 | } |
| 14 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, h2, h3 { |
| 50 | border-bottom: solid #CCC 1px; |
| 51 | } |
| 52 | |
| 53 | .toc_element { |
| 54 | margin-top: 0.5em; |
| 55 | } |
| 56 | |
| 57 | .firstline { |
| 58 | margin-left: 2 em; |
| 59 | } |
| 60 | |
| 61 | .method { |
| 62 | margin-top: 1em; |
| 63 | border: solid 1px #CCC; |
| 64 | padding: 1em; |
| 65 | background: #EEE; |
| 66 | } |
| 67 | |
| 68 | .details { |
| 69 | font-weight: bold; |
| 70 | font-size: 14px; |
| 71 | } |
| 72 | |
| 73 | </style> |
| 74 | |
| 75 | <h1><a href="osconfig_v1.html">Cloud OS Config API</a> . <a href="osconfig_v1.projects.html">projects</a> . <a href="osconfig_v1.projects.patchJobs.html">patchJobs</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
| 78 | <code><a href="osconfig_v1.projects.patchJobs.instanceDetails.html">instanceDetails()</a></code> |
| 79 | </p> |
| 80 | <p class="firstline">Returns the instanceDetails Resource.</p> |
| 81 | |
| 82 | <p class="toc_element"> |
| 83 | <code><a href="#cancel">cancel(name, body=None, x__xgafv=None)</a></code></p> |
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"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 95 | <code><a href="#list">list(parent, pageToken=None, filter=None, pageSize=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). |
| 122 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 123 | "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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 124 | "updateTime": "A String", # Last time this patch job was updated. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 125 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 126 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 127 | "startedInstanceCount": "A String", # Number of instances that have started. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 128 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 129 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 130 | "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. |
| 131 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 132 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 133 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 134 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 135 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 136 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 137 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 138 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 139 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 140 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 141 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 142 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 143 | "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. |
| 144 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances. |
| 145 | { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`. |
| 146 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 147 | "a_key": "A String", |
| 148 | }, |
| 149 | }, |
| 150 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 151 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 152 | "A String", |
| 153 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 154 | "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]` |
| 155 | "A String", |
| 156 | ], |
| 157 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
| 158 | "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-". |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 159 | "A String", |
| 160 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 161 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 162 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 163 | "createTime": "A String", # Time this patch job was created. |
| 164 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 165 | "mode": "A String", # Mode of the patch rollout. |
| 166 | "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. |
| 167 | "fixed": 42, # Specifies a fixed value. |
| 168 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 169 | }, |
| 170 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 171 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 172 | "state": "A String", # The current state of the PatchJob. |
| 173 | "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. |
| 174 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 175 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
| 176 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
| 177 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 178 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 179 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 180 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 181 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 182 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 183 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 184 | }, |
| 185 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 186 | 42, |
| 187 | ], |
| 188 | "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\)). |
| 189 | }, |
| 190 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 191 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 192 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 193 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 194 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 195 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 196 | }, |
| 197 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 198 | 42, |
| 199 | ], |
| 200 | "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\)). |
| 201 | }, |
| 202 | }, |
| 203 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 204 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 205 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 206 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 207 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 208 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 209 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 210 | }, |
| 211 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 212 | 42, |
| 213 | ], |
| 214 | "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\)). |
| 215 | }, |
| 216 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 217 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 218 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 219 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 220 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 221 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 222 | }, |
| 223 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 224 | 42, |
| 225 | ], |
| 226 | "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\)). |
| 227 | }, |
| 228 | }, |
| 229 | "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. |
| 230 | "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. |
| 231 | "A String", |
| 232 | ], |
| 233 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 234 | "A String", |
| 235 | ], |
| 236 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 237 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 238 | }, |
| 239 | "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. |
| 240 | "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. |
| 241 | "A String", |
| 242 | ], |
| 243 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 244 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 245 | "A String", |
| 246 | ], |
| 247 | }, |
| 248 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 249 | "excludes": [ # List of KBs to exclude from update. |
| 250 | "A String", |
| 251 | ], |
| 252 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
| 253 | "A String", |
| 254 | ], |
| 255 | "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. |
| 256 | "A String", |
| 257 | ], |
| 258 | }, |
| 259 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 260 | }, |
| 261 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 262 | "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. |
| 263 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 264 | "excludes": [ # List of patches to exclude from update. |
| 265 | "A String", |
| 266 | ], |
| 267 | "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. |
| 268 | "A String", |
| 269 | ], |
| 270 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 271 | "A String", |
| 272 | ], |
| 273 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 274 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
| 275 | "A String", |
| 276 | ], |
| 277 | }, |
| 278 | }, |
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 | |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 296 | { # A request message to initiate patching across Compute Engine instances. |
| 297 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
| 298 | "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. |
| 299 | "mode": "A String", # Mode of the patch rollout. |
| 300 | "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. |
| 301 | "fixed": 42, # Specifies a fixed value. |
| 302 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 303 | }, |
| 304 | }, |
| 305 | "dryRun": True or False, # If this patch is a dry-run only, instances are contacted but will do nothing. |
| 306 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 307 | "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. |
| 308 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances. |
| 309 | { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`. |
| 310 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 311 | "a_key": "A String", |
| 312 | }, |
| 313 | }, |
| 314 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 315 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 316 | "A String", |
| 317 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 318 | "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]` |
| 319 | "A String", |
| 320 | ], |
| 321 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
| 322 | "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-". |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 323 | "A String", |
| 324 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 325 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 326 | "displayName": "A String", # Display name for this patch job. This does not have to be unique. |
| 327 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 328 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 329 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 330 | "localPath": "A String", # An absolute path to the executable on the VM. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 331 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 332 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 333 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 334 | "object": "A String", # Required. Name of the Cloud Storage object. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 335 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 336 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 337 | 42, |
| 338 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 339 | "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\)). |
| 340 | }, |
| 341 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 342 | "localPath": "A String", # An absolute path to the executable on the VM. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 343 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 344 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 345 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 346 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 347 | }, |
| 348 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 349 | 42, |
| 350 | ], |
| 351 | "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\)). |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 352 | }, |
| 353 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 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 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 357 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 358 | "generationNumber": "A String", # Required. Generation number of the 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 Cloud Storage object. |
| 360 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 361 | }, |
| 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 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 369 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 370 | "generationNumber": "A String", # Required. Generation number of the 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 Cloud Storage object. |
| 372 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 373 | }, |
| 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. |
| 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 | ], |
| 384 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 385 | "A String", |
| 386 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 387 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 388 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 389 | }, |
| 390 | "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. |
| 391 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 392 | "A String", |
| 393 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 394 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 395 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 396 | "A String", |
| 397 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 398 | }, |
| 399 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 400 | "excludes": [ # List of KBs to exclude from update. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 401 | "A String", |
| 402 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 403 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
| 404 | "A String", |
| 405 | ], |
| 406 | "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. |
| 407 | "A String", |
| 408 | ], |
| 409 | }, |
| 410 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 411 | }, |
| 412 | "rebootConfig": "A String", # Post-patch reboot settings. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 413 | "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. |
| 414 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 415 | "excludes": [ # List of patches to exclude from update. |
| 416 | "A String", |
| 417 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 418 | "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 | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 419 | "A String", |
| 420 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 421 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 422 | "A String", |
| 423 | ], |
| 424 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 425 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
| 426 | "A String", |
| 427 | ], |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 428 | }, |
| 429 | }, |
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). |
| 441 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 442 | "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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 443 | "updateTime": "A String", # Last time this patch job was updated. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 444 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 445 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 446 | "startedInstanceCount": "A String", # Number of instances that have started. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 447 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 448 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 449 | "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. |
| 450 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 451 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 452 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 453 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 454 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 455 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 456 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 457 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 458 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 459 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 460 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 461 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 462 | "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. |
| 463 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances. |
| 464 | { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`. |
| 465 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 466 | "a_key": "A String", |
| 467 | }, |
| 468 | }, |
| 469 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 470 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 471 | "A String", |
| 472 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 473 | "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]` |
| 474 | "A String", |
| 475 | ], |
| 476 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
| 477 | "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-". |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 478 | "A String", |
| 479 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 480 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 481 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 482 | "createTime": "A String", # Time this patch job was created. |
| 483 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 484 | "mode": "A String", # Mode of the patch rollout. |
| 485 | "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. |
| 486 | "fixed": 42, # Specifies a fixed value. |
| 487 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 488 | }, |
| 489 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 490 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 491 | "state": "A String", # The current state of the PatchJob. |
| 492 | "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. |
| 493 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 494 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
| 495 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
| 496 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 497 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 498 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 499 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 500 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 501 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 502 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 503 | }, |
| 504 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 505 | 42, |
| 506 | ], |
| 507 | "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\)). |
| 508 | }, |
| 509 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 510 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 511 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 512 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 513 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 514 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 515 | }, |
| 516 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 517 | 42, |
| 518 | ], |
| 519 | "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\)). |
| 520 | }, |
| 521 | }, |
| 522 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 523 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 524 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 525 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 526 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 527 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 528 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 529 | }, |
| 530 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 531 | 42, |
| 532 | ], |
| 533 | "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\)). |
| 534 | }, |
| 535 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 536 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 537 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 538 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 539 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 540 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 541 | }, |
| 542 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 543 | 42, |
| 544 | ], |
| 545 | "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\)). |
| 546 | }, |
| 547 | }, |
| 548 | "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. |
| 549 | "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. |
| 550 | "A String", |
| 551 | ], |
| 552 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 553 | "A String", |
| 554 | ], |
| 555 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 556 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 557 | }, |
| 558 | "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. |
| 559 | "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. |
| 560 | "A String", |
| 561 | ], |
| 562 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 563 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 564 | "A String", |
| 565 | ], |
| 566 | }, |
| 567 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 568 | "excludes": [ # List of KBs to exclude from update. |
| 569 | "A String", |
| 570 | ], |
| 571 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
| 572 | "A String", |
| 573 | ], |
| 574 | "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. |
| 575 | "A String", |
| 576 | ], |
| 577 | }, |
| 578 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 579 | }, |
| 580 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 581 | "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. |
| 582 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 583 | "excludes": [ # List of patches to exclude from update. |
| 584 | "A String", |
| 585 | ], |
| 586 | "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. |
| 587 | "A String", |
| 588 | ], |
| 589 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 590 | "A String", |
| 591 | ], |
| 592 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 593 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
| 594 | "A String", |
| 595 | ], |
| 596 | }, |
| 597 | }, |
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). |
| 616 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 617 | "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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 618 | "updateTime": "A String", # Last time this patch job was updated. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 619 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 620 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 621 | "startedInstanceCount": "A String", # Number of instances that have started. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 622 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 623 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 624 | "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. |
| 625 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 626 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 627 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 628 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 629 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 630 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 631 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 632 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 633 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 634 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 635 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 636 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 637 | "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. |
| 638 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances. |
| 639 | { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`. |
| 640 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 641 | "a_key": "A String", |
| 642 | }, |
| 643 | }, |
| 644 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 645 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 646 | "A String", |
| 647 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 648 | "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]` |
| 649 | "A String", |
| 650 | ], |
| 651 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
| 652 | "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-". |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 653 | "A String", |
| 654 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 655 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 656 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 657 | "createTime": "A String", # Time this patch job was created. |
| 658 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 659 | "mode": "A String", # Mode of the patch rollout. |
| 660 | "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. |
| 661 | "fixed": 42, # Specifies a fixed value. |
| 662 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 663 | }, |
| 664 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 665 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 666 | "state": "A String", # The current state of the PatchJob. |
| 667 | "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. |
| 668 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 669 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
| 670 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
| 671 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 672 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 673 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 674 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 675 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 676 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 677 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 678 | }, |
| 679 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 680 | 42, |
| 681 | ], |
| 682 | "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\)). |
| 683 | }, |
| 684 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 685 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 686 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 687 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 688 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 689 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 690 | }, |
| 691 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 692 | 42, |
| 693 | ], |
| 694 | "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\)). |
| 695 | }, |
| 696 | }, |
| 697 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 698 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 699 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 700 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 701 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 702 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 703 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 704 | }, |
| 705 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 706 | 42, |
| 707 | ], |
| 708 | "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\)). |
| 709 | }, |
| 710 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 711 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 712 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 713 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 714 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 715 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 716 | }, |
| 717 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 718 | 42, |
| 719 | ], |
| 720 | "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\)). |
| 721 | }, |
| 722 | }, |
| 723 | "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. |
| 724 | "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. |
| 725 | "A String", |
| 726 | ], |
| 727 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 728 | "A String", |
| 729 | ], |
| 730 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 731 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 732 | }, |
| 733 | "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. |
| 734 | "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. |
| 735 | "A String", |
| 736 | ], |
| 737 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 738 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 739 | "A String", |
| 740 | ], |
| 741 | }, |
| 742 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 743 | "excludes": [ # List of KBs to exclude from update. |
| 744 | "A String", |
| 745 | ], |
| 746 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
| 747 | "A String", |
| 748 | ], |
| 749 | "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. |
| 750 | "A String", |
| 751 | ], |
| 752 | }, |
| 753 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 754 | }, |
| 755 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 756 | "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. |
| 757 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 758 | "excludes": [ # List of patches to exclude from update. |
| 759 | "A String", |
| 760 | ], |
| 761 | "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. |
| 762 | "A String", |
| 763 | ], |
| 764 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 765 | "A String", |
| 766 | ], |
| 767 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 768 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
| 769 | "A String", |
| 770 | ], |
| 771 | }, |
| 772 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 773 | }</pre> |
| 774 | </div> |
| 775 | |
| 776 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 777 | <code class="details" id="list">list(parent, pageToken=None, filter=None, pageSize=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) |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 782 | pageToken: string, A pagination token returned from a previous call that indicates where this listing should continue from. |
| 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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 784 | pageSize: integer, The maximum number of instance status to return. |
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. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 794 | "nextPageToken": "A String", # A pagination token that can be used to get the next page of results. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 795 | "patchJobs": [ # The list of patch jobs. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 796 | { # 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). |
| 797 | "name": "A String", # Unique identifier for this patch job in the form `projects/*/patchJobs/*` |
| 798 | "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. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 799 | "updateTime": "A String", # Last time this patch job was updated. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 800 | "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. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 801 | "ackedInstanceCount": "A String", # Number of instances that have acked and will start shortly. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 802 | "startedInstanceCount": "A String", # Number of instances that have started. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 803 | "downloadingPatchesInstanceCount": "A String", # Number of instances that are downloading patches. |
| 804 | "pendingInstanceCount": "A String", # Number of instances pending patch job. |
| 805 | "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. |
| 806 | "prePatchStepInstanceCount": "A String", # Number of instances that are running the pre-patch step. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 807 | "succeededInstanceCount": "A String", # Number of instances that have completed successfully. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 808 | "failedInstanceCount": "A String", # Number of instances that failed. |
| 809 | "succeededRebootRequiredInstanceCount": "A String", # Number of instances that require reboot. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 810 | "notifiedInstanceCount": "A String", # Number of instances notified about patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 811 | "rebootingInstanceCount": "A String", # Number of instances rebooting. |
| 812 | "timedOutInstanceCount": "A String", # Number of instances that exceeded the time out while applying the patch. |
| 813 | "postPatchStepInstanceCount": "A String", # Number of instances that are running the post-patch step. |
| 814 | "inactiveInstanceCount": "A String", # Number of instances that are inactive. |
| 815 | "applyingPatchesInstanceCount": "A String", # Number of instances that are applying patches. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 816 | }, |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 817 | "errorMessage": "A String", # If this patch job failed, this message provides information about the failure. |
| 818 | "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. |
| 819 | "groupLabels": [ # Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances. |
| 820 | { # Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{"env":"test", "app":"web"}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`. |
| 821 | "labels": { # Compute Engine instance labels that must be present for a VM instance to be targeted by this filter. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 822 | "a_key": "A String", |
| 823 | }, |
| 824 | }, |
| 825 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 826 | "zones": [ # Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 827 | "A String", |
| 828 | ], |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 829 | "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]` |
| 830 | "A String", |
| 831 | ], |
| 832 | "all": True or False, # Target all VM instances in the project. If true, no other criteria is permitted. |
| 833 | "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-". |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 834 | "A String", |
| 835 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 836 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 837 | "patchDeployment": "A String", # Output only. Name of the patch deployment that created this patch job. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 838 | "createTime": "A String", # Time this patch job was created. |
| 839 | "rollout": { # Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs. # Rollout strategy being applied. |
| 840 | "mode": "A String", # Mode of the patch rollout. |
| 841 | "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. |
| 842 | "fixed": 42, # Specifies a fixed value. |
| 843 | "percent": 42, # Specifies the relative value defined as a percentage, which will be multiplied by a reference value. |
| 844 | }, |
| 845 | }, |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 846 | "displayName": "A String", # Display name for this patch job. This is not a unique identifier. |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 847 | "state": "A String", # The current state of the PatchJob. |
| 848 | "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. |
| 849 | "description": "A String", # Description of the patch job. Length of the description is limited to 1024 characters. |
| 850 | "duration": "A String", # Duration of the patch job. After the duration ends, the patch job times out. |
| 851 | "patchConfig": { # Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance. # Patch configuration being applied. |
| 852 | "preStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run before the patch update. |
| 853 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 854 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 855 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 856 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 857 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 858 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 859 | }, |
| 860 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 861 | 42, |
| 862 | ], |
| 863 | "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\)). |
| 864 | }, |
| 865 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 866 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 867 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 868 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 869 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 870 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 871 | }, |
| 872 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 873 | 42, |
| 874 | ], |
| 875 | "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\)). |
| 876 | }, |
| 877 | }, |
| 878 | "postStep": { # A step that runs an executable for a PatchJob. # The `ExecStep` to run after the patch update. |
| 879 | "windowsExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Windows VMs targeted by the PatchJob. |
| 880 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 881 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 882 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 883 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 884 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 885 | }, |
| 886 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 887 | 42, |
| 888 | ], |
| 889 | "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\)). |
| 890 | }, |
| 891 | "linuxExecStepConfig": { # Common configurations for an ExecStep. # The ExecStepConfig for all Linux VMs targeted by the PatchJob. |
| 892 | "localPath": "A String", # An absolute path to the executable on the VM. |
| 893 | "gcsObject": { # Cloud Storage object representation. # A Cloud Storage object containing the executable. |
| 894 | "generationNumber": "A String", # Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change. |
| 895 | "bucket": "A String", # Required. Bucket of the Cloud Storage object. |
| 896 | "object": "A String", # Required. Name of the Cloud Storage object. |
| 897 | }, |
| 898 | "allowedSuccessCodes": [ # Defaults to [0]. A list of possible return values that the execution can return to indicate a success. |
| 899 | 42, |
| 900 | ], |
| 901 | "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\)). |
| 902 | }, |
| 903 | }, |
| 904 | "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. |
| 905 | "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. |
| 906 | "A String", |
| 907 | ], |
| 908 | "excludes": [ # List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag. |
| 909 | "A String", |
| 910 | ], |
| 911 | "minimal": True or False, # Will cause patch to run `yum update-minimal` instead. |
| 912 | "security": True or False, # Adds the `--security` flag to `yum update`. Not supported on all platforms. |
| 913 | }, |
| 914 | "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. |
| 915 | "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. |
| 916 | "A String", |
| 917 | ], |
| 918 | "type": "A String", # By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead. |
| 919 | "excludes": [ # List of packages to exclude from update. These packages will be excluded |
| 920 | "A String", |
| 921 | ], |
| 922 | }, |
| 923 | "windowsUpdate": { # Windows patching is performed using the Windows Update Agent. # Windows update settings. Use this override the default windows patch rules. |
| 924 | "excludes": [ # List of KBs to exclude from update. |
| 925 | "A String", |
| 926 | ], |
| 927 | "classifications": [ # Only apply updates of these windows update classifications. If empty, all updates are applied. |
| 928 | "A String", |
| 929 | ], |
| 930 | "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. |
| 931 | "A String", |
| 932 | ], |
| 933 | }, |
| 934 | "goo": { # Googet patching is performed by running `googet update`. # Goo update settings. Use this setting to override the default `goo` patch rules. |
| 935 | }, |
| 936 | "rebootConfig": "A String", # Post-patch reboot settings. |
| 937 | "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. |
| 938 | "withOptional": True or False, # Adds the `--with-optional` flag to `zypper patch`. |
| 939 | "excludes": [ # List of patches to exclude from update. |
| 940 | "A String", |
| 941 | ], |
| 942 | "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. |
| 943 | "A String", |
| 944 | ], |
| 945 | "categories": [ # Install only patches with these categories. Common categories include security, recommended, and feature. |
| 946 | "A String", |
| 947 | ], |
| 948 | "withUpdate": True or False, # Adds the `--with-update` flag, to `zypper patch`. |
| 949 | "severities": [ # Install only patches with these severities. Common severities include critical, important, moderate, and low. |
| 950 | "A String", |
| 951 | ], |
| 952 | }, |
| 953 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 954 | }, |
| 955 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 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> |