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