blob: 15e0b63f53e003bbff7d117d92716c9b291e6b38 [file] [log] [blame]
Takashi Matsuo06694102015-09-11 13:55:40 -07001<html><body>
2<style>
3
4body, 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
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="compute_v1.html">Compute Engine API</a> . <a href="compute_v1.instanceGroupManagers.html">instanceGroupManagers</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070080<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070081 <code><a href="#aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080082<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070083<p class="toc_element">
84 <code><a href="#aggregatedList_next">aggregatedList_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</a></code></p>
88<p class="firstline">Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.</p>
89<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070090 <code><a href="#close">close()</a></code></p>
91<p class="firstline">Close httplib2 connections.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
94<p class="firstline">Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.</p>
95<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070096 <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="firstline">Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -070098<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070099 <code><a href="#deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100<p class="firstline">Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700101<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700102 <code><a href="#deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</a></code></p>
103<p class="firstline">Deletes selected per-instance configs for the managed instance group.</p>
104<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -0700105 <code><a href="#get">get(project, zone, instanceGroupManager)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700106<p class="firstline">Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700107<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700108 <code><a href="#insert">insert(project, zone, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700109<p class="firstline">Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700110<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700111 <code><a href="#list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700112<p class="firstline">Retrieves a list of managed instance groups that are contained within the specified project and zone.</p>
113<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700114 <code><a href="#listErrors">listErrors(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700115<p class="firstline">Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700116<p class="toc_element">
117 <code><a href="#listErrors_next">listErrors_next(previous_request, previous_response)</a></code></p>
118<p class="firstline">Retrieves the next page of results.</p>
119<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700120 <code><a href="#listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700121<p class="firstline">Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700122<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700123 <code><a href="#listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</a></code></p>
124<p class="firstline">Retrieves the next page of results.</p>
125<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700126 <code><a href="#listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</a></code></p>
127<p class="firstline">Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.</p>
128<p class="toc_element">
129 <code><a href="#listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</a></code></p>
130<p class="firstline">Retrieves the next page of results.</p>
131<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -0700132 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
133<p class="firstline">Retrieves the next page of results.</p>
134<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 <code><a href="#patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700136<p class="firstline">Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700137<p class="toc_element">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 <code><a href="#patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
139<p class="firstline">Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
140<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700141 <code><a href="#recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142<p class="firstline">Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.</p>
143<p class="toc_element">
144 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800145<p class="firstline">Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700148<p class="firstline">Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800151<p class="firstline">Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.</p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700152<p class="toc_element">
153 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
154<p class="firstline">Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.</p>
Takashi Matsuo06694102015-09-11 13:55:40 -0700155<h3>Method Details</h3>
156<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700157 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 <pre>Flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700159
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400160If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
161
162You can specify a maximum of 1000 instances with this method per request.
163
Takashi Matsuo06694102015-09-11 13:55:40 -0700164Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 project: string, Project ID for this request. (required)
166 zone: string, The name of the zone where the managed instance group is located. (required)
167 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700168 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700169 The object takes the form of:
170
171{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800172 &quot;instances&quot;: [ # The URLs of one or more instances to abandon. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
173 &quot;A String&quot;,
174 ],
175}
Takashi Matsuo06694102015-09-11 13:55:40 -0700176
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
178
179For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
180
181The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700182
183Returns:
184 An object of the form:
185
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700186 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800187 #
188 # Google Compute Engine has three Operation resources:
189 #
190 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
191 #
192 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
193 #
194 # Operations can be global, regional or zonal.
195 # - For global operations, use the `globalOperations` resource.
196 # - For regional operations, use the `regionOperations` resource.
197 # - For zonal operations, use the `zonalOperations` resource.
198 #
199 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
200 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
201 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
202 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
203 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
204 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
205 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800207 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
208 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
209 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700210 },
211 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800212 },
213 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
214 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
215 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
216 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
217 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
218 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
219 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
220 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
221 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
222 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
223 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
224 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
225 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
226 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
227 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
228 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
229 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
230 {
231 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
232 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
233 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
234 {
235 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
236 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
237 },
238 ],
239 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
240 },
241 ],
242 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
243}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700244</div>
245
246<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700247 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800248 <pre>Retrieves the list of managed instance groups and groups them by zone.
Takashi Matsuo06694102015-09-11 13:55:40 -0700249
250Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800251 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700252 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700253
Dan O'Mearadd494642020-05-01 07:42:23 -0700254For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -0700255
Dan O'Mearadd494642020-05-01 07:42:23 -0700256You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800257
Bu Sun Kim65020912020-05-20 12:08:20 -0700258To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
Dan O'Mearadd494642020-05-01 07:42:23 -0700259 includeAllScopes: boolean, Indicates whether every visible scope for each scope type (zone, region, global) should be included in the response. For new resource types added after this field, the flag has no effect as new resource types will always include every visible scope for each scope type in response. For resource types which predate this field, if this flag is omitted or false, only scopes of the scope types where the resource type is expected to be found will be included.
Bu Sun Kim65020912020-05-20 12:08:20 -0700260 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
261 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
262
263You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
264
265Currently, only sorting by `name` or `creationTimestamp desc` is supported.
266 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700267 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Takashi Matsuo06694102015-09-11 13:55:40 -0700268
269Returns:
270 An object of the form:
271
272 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800273 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
274 &quot;items&quot;: { # A list of InstanceGroupManagersScopedList resources.
275 &quot;a_key&quot;: { # [Output Only] The name of the scope that contains this set of managed instance groups.
276 &quot;instanceGroupManagers&quot;: [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
277 { # Represents a Managed Instance Group resource.
278 #
279 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
280 #
281 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
282 #
283 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
284 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Takashi Matsuo06694102015-09-11 13:55:40 -0700285 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800286 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
287 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Takashi Matsuo06694102015-09-11 13:55:40 -0700288 },
289 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800290 &quot;baseInstanceName&quot;: &quot;A String&quot;, # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
291 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
292 &quot;currentActions&quot;: { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
293 &quot;abandoning&quot;: 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
294 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
295 #
296 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
297 &quot;creatingWithoutRetries&quot;: 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group&#x27;s targetSize value accordingly.
298 &quot;deleting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
299 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
300 &quot;recreating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
301 &quot;refreshing&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
302 &quot;restarting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
303 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
304 },
305 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
306 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
307 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
308 {
309 &quot;zone&quot;: &quot;A String&quot;, # The URL of the zone. The zone must exist in the region where the managed instance group is located.
310 },
311 ],
312 },
313 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
314 #
315 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
316 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
317 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
318 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
319 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
320 &quot;name&quot;: &quot;A String&quot;, # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
321 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
322 { # The named port. For example: .
323 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
324 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
325 },
326 ],
327 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
328 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
329 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
330 &quot;preservedState&quot;: { # Configuration of preserved resources.
331 &quot;disks&quot;: { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
332 &quot;a_key&quot;: {
333 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
334 },
335 },
336 },
337 },
338 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
339 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
340 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
341 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
342 &quot;hasStatefulConfig&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
343 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
344 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
345 },
346 },
347 &quot;versionTarget&quot;: { # [Output Only] A status of consistency of Instances&#x27; versions with their target version specified by version field on Instance Group Manager.
348 &quot;isReached&quot;: True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances&#x27; target version are specified by version field on Instance Group Manager.
349 },
350 },
351 &quot;targetPools&quot;: [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
352 &quot;A String&quot;,
353 ],
354 &quot;targetSize&quot;: 42, # The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
355 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
356 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
357 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
358 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
359 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
360 #
361 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
362 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
363 #
364 #
365 # - If the value is fixed, then the calculated value is equal to the fixed value.
366 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
367 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
368 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
369 },
370 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
371 #
372 #
373 # - The instance&#x27;s status is RUNNING.
374 # - If there is a health check on the instance group, the instance&#x27;s liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
375 #
376 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
377 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
378 #
379 #
380 # - If the value is fixed, then the calculated value is equal to the fixed value.
381 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
382 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
383 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
384 },
385 &quot;minimalAction&quot;: &quot;A String&quot;, # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
386 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
387 &quot;type&quot;: &quot;A String&quot;, # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
388 },
389 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
390 #
391 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
392 {
393 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
394 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
395 &quot;targetSize&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
396 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
397 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
398 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
399 #
400 #
401 # - If the value is fixed, then the calculated value is equal to the fixed value.
402 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
403 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
404 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
405 },
406 },
407 ],
408 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700409 },
410 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800411 &quot;warning&quot;: { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
412 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
413 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
414 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
415 {
416 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
417 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
418 },
419 ],
420 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
421 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700422 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800423 },
424 &quot;kind&quot;: &quot;compute#instanceGroupManagerAggregatedList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerAggregatedList for an aggregated list of managed instance groups.
425 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
426 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
427 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
428 &quot;A String&quot;,
429 ],
430 &quot;warning&quot;: { # [Output Only] Informational warning message.
431 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
432 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
433 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
434 {
435 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
436 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
437 },
438 ],
439 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
440 },
441}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700442</div>
443
444<div class="method">
445 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
446 <pre>Retrieves the next page of results.
447
448Args:
449 previous_request: The request for the previous page. (required)
450 previous_response: The response from the request for the previous page. (required)
451
452Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700453 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -0700454 page. Returns None if there are no more items in the collection.
455 </pre>
456</div>
457
458<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700459 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</code>
460 <pre>Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
461
462Args:
463 project: string, Project ID for this request. (required)
464 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
465 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
466 body: object, The request body.
467 The object takes the form of:
468
469{ # InstanceGroupManagers.applyUpdatesToInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800470 &quot;allInstances&quot;: True or False, # Flag to update all instances instead of specified list of ?instances?. If the flag is set to true then the instances may not be specified in the request.
471 &quot;instances&quot;: [ # The list of URLs of one or more instances for which you want to apply updates. Each URL can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
472 &quot;A String&quot;,
473 ],
474 &quot;minimalAction&quot;: &quot;A String&quot;, # The minimal action that you want to perform on each instance during the update:
475 # - REPLACE: At minimum, delete the instance and create it again.
476 # - RESTART: Stop the instance and start it again.
477 # - REFRESH: Do not stop the instance.
478 # - NONE: Do not disrupt the instance at all. By default, the minimum action is NONE. If your update requires a more disruptive action than you set with this flag, the necessary action is performed to execute the update.
479 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
480 # - REPLACE: Delete the instance and create it again.
481 # - RESTART: Stop the instance and start it again.
482 # - REFRESH: Do not stop the instance.
483 # - NONE: Do not disrupt the instance at all. By default, the most disruptive allowed action is REPLACE. If your update requires a more disruptive action than you set with this flag, the update request will fail.
484}
Dan O'Mearadd494642020-05-01 07:42:23 -0700485
486
487Returns:
488 An object of the form:
489
490 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800491 #
492 # Google Compute Engine has three Operation resources:
493 #
494 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
495 #
496 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
497 #
498 # Operations can be global, regional or zonal.
499 # - For global operations, use the `globalOperations` resource.
500 # - For regional operations, use the `regionOperations` resource.
501 # - For zonal operations, use the `zonalOperations` resource.
502 #
503 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
504 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
505 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
506 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
507 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
508 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
509 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800511 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
512 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
513 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700514 },
515 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800516 },
517 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
518 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
519 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
520 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
521 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
522 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
523 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
524 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
525 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
526 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
527 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
528 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
529 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
530 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
531 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
532 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
533 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
534 {
535 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
536 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
537 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
538 {
539 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
540 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
541 },
542 ],
543 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
544 },
545 ],
546 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
547}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700548</div>
549
550<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700551 <code class="details" id="close">close()</code>
552 <pre>Close httplib2 connections.</pre>
553</div>
554
555<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700556 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
557 <pre>Creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.
558
559Args:
560 project: string, Project ID for this request. (required)
561 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
562 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
563 body: object, The request body.
564 The object takes the form of:
565
566{ # InstanceGroupManagers.createInstances
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800567 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
568 {
569 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
570 &quot;name&quot;: &quot;A String&quot;, # The name of a per-instance config and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn&#x27;t exist or is not part of the group will result in an error.
571 &quot;preservedState&quot;: { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
572 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
573 &quot;a_key&quot;: {
574 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
575 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
576 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700577 },
578 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800579 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
580 &quot;a_key&quot;: &quot;A String&quot;,
581 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700582 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800583 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
584 },
585 ],
586}
Dan O'Mearadd494642020-05-01 07:42:23 -0700587
588 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
589
590For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request.
591
592The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
593
594Returns:
595 An object of the form:
596
597 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800598 #
599 # Google Compute Engine has three Operation resources:
600 #
601 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
602 #
603 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
604 #
605 # Operations can be global, regional or zonal.
606 # - For global operations, use the `globalOperations` resource.
607 # - For regional operations, use the `regionOperations` resource.
608 # - For zonal operations, use the `zonalOperations` resource.
609 #
610 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
611 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
612 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
613 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
614 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
615 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
616 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700617 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800618 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
619 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
620 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700621 },
622 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800623 },
624 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
625 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
626 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
627 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
628 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
629 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
630 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
631 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
632 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
633 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
634 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
635 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
636 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
637 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
638 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
639 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
640 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
641 {
642 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
643 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
644 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
645 {
646 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
647 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
648 },
649 ],
650 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
651 },
652 ],
653 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
654}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -0700655</div>
656
657<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700658 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800659 <pre>Deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.
Takashi Matsuo06694102015-09-11 13:55:40 -0700660
661Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800662 project: string, Project ID for this request. (required)
663 zone: string, The name of the zone where the managed instance group is located. (required)
664 instanceGroupManager: string, The name of the managed instance group to delete. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700665 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
666
667For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
668
669The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700670
671Returns:
672 An object of the form:
673
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700674 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800675 #
676 # Google Compute Engine has three Operation resources:
677 #
678 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
679 #
680 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
681 #
682 # Operations can be global, regional or zonal.
683 # - For global operations, use the `globalOperations` resource.
684 # - For regional operations, use the `regionOperations` resource.
685 # - For zonal operations, use the `zonalOperations` resource.
686 #
687 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
688 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
689 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
690 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
691 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
692 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
693 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700694 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800695 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
696 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
697 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700698 },
699 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800700 },
701 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
702 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
703 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
704 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
705 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
706 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
707 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
708 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
709 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
710 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
711 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
712 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
713 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
714 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
715 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
716 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
717 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
718 {
719 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
720 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
721 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
722 {
723 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
724 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
725 },
726 ],
727 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
728 },
729 ],
730 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
731}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700732</div>
733
734<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700735 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700736 <pre>Flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -0700737
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400738If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
739
740You can specify a maximum of 1000 instances with this method per request.
741
Takashi Matsuo06694102015-09-11 13:55:40 -0700742Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800743 project: string, Project ID for this request. (required)
744 zone: string, The name of the zone where the managed instance group is located. (required)
745 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700746 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -0700747 The object takes the form of:
748
749{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800750 &quot;instances&quot;: [ # The URLs of one or more instances to delete. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
751 &quot;A String&quot;,
752 ],
753}
Takashi Matsuo06694102015-09-11 13:55:40 -0700754
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700755 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
756
757For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
758
759The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -0700760
761Returns:
762 An object of the form:
763
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700764 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800765 #
766 # Google Compute Engine has three Operation resources:
767 #
768 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
769 #
770 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
771 #
772 # Operations can be global, regional or zonal.
773 # - For global operations, use the `globalOperations` resource.
774 # - For regional operations, use the `regionOperations` resource.
775 # - For zonal operations, use the `zonalOperations` resource.
776 #
777 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
778 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
779 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
780 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
781 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
782 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
783 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -0700784 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800785 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
786 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
787 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -0700788 },
789 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800790 },
791 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
792 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
793 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
794 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
795 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
796 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
797 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
798 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
799 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
800 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
801 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
802 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
803 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
804 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
805 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
806 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
807 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
808 {
809 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
810 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
811 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
812 {
813 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
814 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
815 },
816 ],
817 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
818 },
819 ],
820 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
821}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -0700822</div>
823
824<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700825 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</code>
826 <pre>Deletes selected per-instance configs for the managed instance group.
827
828Args:
829 project: string, Project ID for this request. (required)
830 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
831 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
832 body: object, The request body.
833 The object takes the form of:
834
835{ # InstanceGroupManagers.deletePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800836 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
837 &quot;A String&quot;,
838 ],
839}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700840
841
842Returns:
843 An object of the form:
844
845 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800846 #
847 # Google Compute Engine has three Operation resources:
848 #
849 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
850 #
851 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
852 #
853 # Operations can be global, regional or zonal.
854 # - For global operations, use the `globalOperations` resource.
855 # - For regional operations, use the `regionOperations` resource.
856 # - For zonal operations, use the `zonalOperations` resource.
857 #
858 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
859 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
860 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
861 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
862 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
863 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
864 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700865 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800866 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
867 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
868 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700869 },
870 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800871 },
872 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
873 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
874 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
875 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
876 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
877 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
878 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
879 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
880 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
881 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
882 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
883 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
884 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
885 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
886 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
887 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
888 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
889 {
890 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
891 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
892 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
893 {
894 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
895 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
896 },
897 ],
898 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
899 },
900 ],
901 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
902}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700903</div>
904
905<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700906 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700907 <pre>Returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.
Takashi Matsuo06694102015-09-11 13:55:40 -0700908
909Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800910 project: string, Project ID for this request. (required)
911 zone: string, The name of the zone where the managed instance group is located. (required)
912 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700913
914Returns:
915 An object of the form:
916
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700917 { # Represents a Managed Instance Group resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800918 #
919 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
920 #
921 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
922 #
923 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
924 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
925 {
926 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
927 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim65020912020-05-20 12:08:20 -0700928 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800929 ],
930 &quot;baseInstanceName&quot;: &quot;A String&quot;, # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
931 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
932 &quot;currentActions&quot;: { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
933 &quot;abandoning&quot;: 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
934 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
Bu Sun Kim65020912020-05-20 12:08:20 -0700935 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800936 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
937 &quot;creatingWithoutRetries&quot;: 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group&#x27;s targetSize value accordingly.
938 &quot;deleting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
939 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
940 &quot;recreating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
941 &quot;refreshing&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
942 &quot;restarting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
943 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
944 },
945 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
946 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
947 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
948 {
949 &quot;zone&quot;: &quot;A String&quot;, # The URL of the zone. The zone must exist in the region where the managed instance group is located.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700950 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700951 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800952 },
953 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
954 #
955 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
956 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
957 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
958 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
959 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
960 &quot;name&quot;: &quot;A String&quot;, # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
961 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
962 { # The named port. For example: .
963 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
964 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
965 },
966 ],
967 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
968 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
969 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
970 &quot;preservedState&quot;: { # Configuration of preserved resources.
971 &quot;disks&quot;: { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
972 &quot;a_key&quot;: {
973 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700974 },
975 },
976 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800977 },
978 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
979 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
980 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
981 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
982 &quot;hasStatefulConfig&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
983 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
984 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
Bu Sun Kim65020912020-05-20 12:08:20 -0700985 },
986 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -0800987 &quot;versionTarget&quot;: { # [Output Only] A status of consistency of Instances&#x27; versions with their target version specified by version field on Instance Group Manager.
988 &quot;isReached&quot;: True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances&#x27; target version are specified by version field on Instance Group Manager.
989 },
990 },
991 &quot;targetPools&quot;: [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
992 &quot;A String&quot;,
993 ],
994 &quot;targetSize&quot;: 42, # The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
995 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
996 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
997 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
998 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
999 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1000 #
1001 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1002 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim65020912020-05-20 12:08:20 -07001003 #
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001004 #
1005 # - If the value is fixed, then the calculated value is equal to the fixed value.
1006 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1007 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1008 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1009 },
1010 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
1011 #
1012 #
1013 # - The instance&#x27;s status is RUNNING.
1014 # - If there is a health check on the instance group, the instance&#x27;s liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1015 #
1016 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1017 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1018 #
1019 #
1020 # - If the value is fixed, then the calculated value is equal to the fixed value.
1021 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1022 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1023 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1024 },
1025 &quot;minimalAction&quot;: &quot;A String&quot;, # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
1026 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1027 &quot;type&quot;: &quot;A String&quot;, # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
1028 },
1029 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1030 #
1031 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
1032 {
1033 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
1034 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1035 &quot;targetSize&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1036 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1037 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
Bu Sun Kim65020912020-05-20 12:08:20 -07001038 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001039 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001040 #
1041 # - If the value is fixed, then the calculated value is equal to the fixed value.
1042 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1043 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1044 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1045 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001046 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001047 ],
1048 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
1049}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001050</div>
1051
1052<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001053 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001054 <pre>Creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -07001055
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001056A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
1057
Takashi Matsuo06694102015-09-11 13:55:40 -07001058Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001059 project: string, Project ID for this request. (required)
1060 zone: string, The name of the zone where you want to create the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001061 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07001062 The object takes the form of:
1063
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001064{ # Represents a Managed Instance Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001065 #
1066 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1067 #
1068 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1069 #
1070 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1071 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
1072 {
1073 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1074 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001075 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001076 ],
1077 &quot;baseInstanceName&quot;: &quot;A String&quot;, # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
1078 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1079 &quot;currentActions&quot;: { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
1080 &quot;abandoning&quot;: 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
1081 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
1082 #
1083 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1084 &quot;creatingWithoutRetries&quot;: 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group&#x27;s targetSize value accordingly.
1085 &quot;deleting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1086 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1087 &quot;recreating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
1088 &quot;refreshing&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
1089 &quot;restarting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1090 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
1091 },
1092 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001093 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
1094 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001095 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001096 &quot;zone&quot;: &quot;A String&quot;, # The URL of the zone. The zone must exist in the region where the managed instance group is located.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001097 },
1098 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001099 },
1100 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
1101 #
1102 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1103 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1104 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001105 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001106 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1107 &quot;name&quot;: &quot;A String&quot;, # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1108 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1109 { # The named port. For example: .
1110 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1111 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001112 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001113 ],
1114 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1115 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001116 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1117 &quot;preservedState&quot;: { # Configuration of preserved resources.
1118 &quot;disks&quot;: { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1119 &quot;a_key&quot;: {
1120 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1121 },
1122 },
1123 },
1124 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001125 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1126 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1127 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001128 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1129 &quot;hasStatefulConfig&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
1130 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1131 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
1132 },
1133 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001134 &quot;versionTarget&quot;: { # [Output Only] A status of consistency of Instances&#x27; versions with their target version specified by version field on Instance Group Manager.
1135 &quot;isReached&quot;: True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances&#x27; target version are specified by version field on Instance Group Manager.
1136 },
1137 },
1138 &quot;targetPools&quot;: [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
1139 &quot;A String&quot;,
1140 ],
1141 &quot;targetSize&quot;: 42, # The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
1142 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1143 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1144 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1145 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1146 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1147 #
1148 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1149 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001150 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001151 #
1152 # - If the value is fixed, then the calculated value is equal to the fixed value.
1153 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1154 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1155 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1156 },
1157 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
1158 #
1159 #
1160 # - The instance&#x27;s status is RUNNING.
1161 # - If there is a health check on the instance group, the instance&#x27;s liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1162 #
1163 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1164 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1165 #
1166 #
1167 # - If the value is fixed, then the calculated value is equal to the fixed value.
1168 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1169 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1170 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1171 },
1172 &quot;minimalAction&quot;: &quot;A String&quot;, # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
1173 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1174 &quot;type&quot;: &quot;A String&quot;, # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
1175 },
1176 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1177 #
1178 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
1179 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001180 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
Bu Sun Kim65020912020-05-20 12:08:20 -07001181 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1182 &quot;targetSize&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1183 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1184 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1185 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001186 #
1187 #
1188 # - If the value is fixed, then the calculated value is equal to the fixed value.
1189 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07001190 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1191 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001192 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001193 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001194 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001195 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim65020912020-05-20 12:08:20 -07001196}
Takashi Matsuo06694102015-09-11 13:55:40 -07001197
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001198 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1199
1200For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1201
1202The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07001203
1204Returns:
1205 An object of the form:
1206
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001207 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001208 #
1209 # Google Compute Engine has three Operation resources:
1210 #
1211 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1212 #
1213 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1214 #
1215 # Operations can be global, regional or zonal.
1216 # - For global operations, use the `globalOperations` resource.
1217 # - For regional operations, use the `regionOperations` resource.
1218 # - For zonal operations, use the `zonalOperations` resource.
1219 #
1220 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1221 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1222 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1223 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1224 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1225 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1226 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001227 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001228 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1229 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1230 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001231 },
1232 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001233 },
1234 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1235 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1236 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1237 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1238 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1239 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1240 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1241 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1242 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1243 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1244 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1245 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1246 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1247 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1248 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1249 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1250 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1251 {
1252 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1253 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1254 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1255 {
1256 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1257 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1258 },
1259 ],
1260 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1261 },
1262 ],
1263 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1264}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001265</div>
1266
1267<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001268 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Takashi Matsuo06694102015-09-11 13:55:40 -07001269 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1270
1271Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001272 project: string, Project ID for this request. (required)
1273 zone: string, The name of the zone where the managed instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001274 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001275
Dan O'Mearadd494642020-05-01 07:42:23 -07001276For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Takashi Matsuo06694102015-09-11 13:55:40 -07001277
Dan O'Mearadd494642020-05-01 07:42:23 -07001278You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001279
Bu Sun Kim65020912020-05-20 12:08:20 -07001280To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1281 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1282 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1283
1284You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1285
1286Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1287 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001288 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Takashi Matsuo06694102015-09-11 13:55:40 -07001289
1290Returns:
1291 An object of the form:
1292
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001293 { # [Output Only] A list of managed instance groups.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001294 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1295 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
1296 { # Represents a Managed Instance Group resource.
1297 #
1298 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1299 #
1300 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1301 #
1302 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1303 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001304 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001305 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1306 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001307 },
1308 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001309 &quot;baseInstanceName&quot;: &quot;A String&quot;, # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
1310 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1311 &quot;currentActions&quot;: { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
1312 &quot;abandoning&quot;: 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
1313 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
1314 #
1315 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1316 &quot;creatingWithoutRetries&quot;: 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group&#x27;s targetSize value accordingly.
1317 &quot;deleting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1318 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1319 &quot;recreating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
1320 &quot;refreshing&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
1321 &quot;restarting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1322 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
1323 },
1324 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1325 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
1326 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
1327 {
1328 &quot;zone&quot;: &quot;A String&quot;, # The URL of the zone. The zone must exist in the region where the managed instance group is located.
1329 },
1330 ],
1331 },
1332 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
1333 #
1334 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1335 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1336 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1337 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
1338 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1339 &quot;name&quot;: &quot;A String&quot;, # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1340 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1341 { # The named port. For example: .
1342 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1343 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1344 },
1345 ],
1346 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1347 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1348 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1349 &quot;preservedState&quot;: { # Configuration of preserved resources.
1350 &quot;disks&quot;: { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1351 &quot;a_key&quot;: {
1352 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1353 },
1354 },
1355 },
1356 },
1357 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1358 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1359 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
1360 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1361 &quot;hasStatefulConfig&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
1362 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1363 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
1364 },
1365 },
1366 &quot;versionTarget&quot;: { # [Output Only] A status of consistency of Instances&#x27; versions with their target version specified by version field on Instance Group Manager.
1367 &quot;isReached&quot;: True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances&#x27; target version are specified by version field on Instance Group Manager.
1368 },
1369 },
1370 &quot;targetPools&quot;: [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
1371 &quot;A String&quot;,
1372 ],
1373 &quot;targetSize&quot;: 42, # The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
1374 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1375 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1376 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1377 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1378 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1379 #
1380 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1381 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1382 #
1383 #
1384 # - If the value is fixed, then the calculated value is equal to the fixed value.
1385 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1386 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1387 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1388 },
1389 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
1390 #
1391 #
1392 # - The instance&#x27;s status is RUNNING.
1393 # - If there is a health check on the instance group, the instance&#x27;s liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1394 #
1395 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1396 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1397 #
1398 #
1399 # - If the value is fixed, then the calculated value is equal to the fixed value.
1400 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1401 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1402 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1403 },
1404 &quot;minimalAction&quot;: &quot;A String&quot;, # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
1405 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1406 &quot;type&quot;: &quot;A String&quot;, # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
1407 },
1408 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1409 #
1410 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
1411 {
1412 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
1413 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1414 &quot;targetSize&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1415 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1416 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1417 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1418 #
1419 #
1420 # - If the value is fixed, then the calculated value is equal to the fixed value.
1421 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1422 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1423 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1424 },
1425 },
1426 ],
1427 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001428 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001429 ],
1430 &quot;kind&quot;: &quot;compute#instanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1431 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1432 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1433 &quot;warning&quot;: { # [Output Only] Informational warning message.
1434 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1435 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1436 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1437 {
1438 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1439 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1440 },
1441 ],
1442 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1443 },
1444}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001445</div>
1446
1447<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001448 <code class="details" id="listErrors">listErrors(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001449 <pre>Lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001450
1451Args:
1452 project: string, Project ID for this request. (required)
1453 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1454 instanceGroupManager: string, The name of the managed instance group. It must be a string that meets the requirements in RFC1035, or an unsigned long integer: must match regexp pattern: (?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?)|[1-9][0-9]{0,19}. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001455 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
1456
1457For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1458
1459You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
1460
Bu Sun Kim65020912020-05-20 12:08:20 -07001461To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1462 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1463 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1464
1465You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1466
1467Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1468 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001469 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Dan O'Mearadd494642020-05-01 07:42:23 -07001470
1471Returns:
1472 An object of the form:
1473
1474 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001475 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
1476 {
1477 &quot;error&quot;: { # [Output Only] Contents of the error.
1478 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1479 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001481 &quot;instanceActionDetails&quot;: { # [Output Only] Details of the instance action that triggered this error. May be null, if the error was not caused by an action on an instance. This field is optional.
1482 &quot;action&quot;: &quot;A String&quot;, # [Output Only] Action that managed instance group was executing on the instance when the error occurred. Possible values:
1483 &quot;instance&quot;: &quot;A String&quot;, # [Output Only] The URL of the instance. The URL can be set even if the instance has not yet been created.
1484 &quot;version&quot;: { # [Output Only] Version this instance was created from, or was being created from, but the creation failed. Corresponds to one of the versions that were set on the Instance Group Manager resource at the time this instance was being created.
1485 &quot;instanceTemplate&quot;: &quot;A String&quot;, # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1486 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1487 },
1488 },
1489 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
1490 },
1491 ],
1492 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1493}</pre>
Dan O'Mearadd494642020-05-01 07:42:23 -07001494</div>
1495
1496<div class="method">
1497 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1498 <pre>Retrieves the next page of results.
1499
1500Args:
1501 previous_request: The request for the previous page. (required)
1502 previous_response: The response from the request for the previous page. (required)
1503
1504Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001505 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001506 page. Returns None if there are no more items in the collection.
1507 </pre>
1508</div>
1509
1510<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001511 <code class="details" id="listManagedInstances">listManagedInstances(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001512 <pre>Lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.
Takashi Matsuo06694102015-09-11 13:55:40 -07001513
1514Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001515 project: string, Project ID for this request. (required)
1516 zone: string, The name of the zone where the managed instance group is located. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07001517 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001518 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001519
Dan O'Mearadd494642020-05-01 07:42:23 -07001520For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001521
Dan O'Mearadd494642020-05-01 07:42:23 -07001522You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001523
Bu Sun Kim65020912020-05-20 12:08:20 -07001524To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1525 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1526 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1527
1528You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1529
1530Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1531 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001532 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
Takashi Matsuo06694102015-09-11 13:55:40 -07001533
1534Returns:
1535 An object of the form:
1536
1537 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001538 &quot;managedInstances&quot;: [ # [Output Only] The list of instances in the managed instance group.
1539 { # A Managed Instance resource.
1540 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
1541 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1542 # - CREATING The managed instance group is creating this instance. If the group fails to create this instance, it will try again until it is successful.
1543 # - CREATING_WITHOUT_RETRIES The managed instance group is attempting to create this instance only once. If the group fails to create this instance, it does not try again and the group&#x27;s targetSize value is decreased instead.
1544 # - RECREATING The managed instance group is recreating this instance.
1545 # - DELETING The managed instance group is permanently deleting this instance.
1546 # - ABANDONING The managed instance group is abandoning this instance. The instance will be removed from the instance group and from any target pools that are associated with this group.
1547 # - RESTARTING The managed instance group is restarting the instance.
1548 # - REFRESHING The managed instance group is applying configuration changes to the instance without stopping it. For example, the group can update the target pool list for an instance without stopping that instance.
1549 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
1550 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1551 &quot;instance&quot;: &quot;A String&quot;, # [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created.
1552 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1553 {
1554 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1555 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
Bu Sun Kim65020912020-05-20 12:08:20 -07001556 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001557 ],
1558 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1559 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1560 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1561 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1562 {
1563 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1564 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1565 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001566 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001567 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001568 },
Takashi Matsuo06694102015-09-11 13:55:40 -07001569 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001570 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1571 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1572 &quot;a_key&quot;: {
1573 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1574 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1575 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1576 },
1577 },
1578 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1579 &quot;a_key&quot;: &quot;A String&quot;,
1580 },
1581 },
1582 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1583 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1584 &quot;a_key&quot;: {
1585 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1586 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1587 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1588 },
1589 },
1590 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1591 &quot;a_key&quot;: &quot;A String&quot;,
1592 },
1593 },
1594 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1595 &quot;instanceTemplate&quot;: &quot;A String&quot;, # [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }.
1596 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1597 },
1598 },
1599 ],
1600 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1601}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07001602</div>
1603
1604<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001605 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1606 <pre>Retrieves the next page of results.
1607
1608Args:
1609 previous_request: The request for the previous page. (required)
1610 previous_response: The response from the request for the previous page. (required)
1611
1612Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001613 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001614 page. Returns None if there are no more items in the collection.
1615 </pre>
1616</div>
1617
1618<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001619 <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
1620 <pre>Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
1621
1622Args:
1623 project: string, Project ID for this request. (required)
1624 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1625 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1626 filter: string, A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be either `=`, `!=`, `&gt;`, or `&lt;`.
1627
1628For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1629
1630You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels.
1631
1632To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = &quot;Intel Skylake&quot;) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = &quot;Intel Skylake&quot;) OR (cpuPlatform = &quot;Intel Broadwell&quot;) AND (scheduling.automaticRestart = true) ```
1633 maxResults: integer, The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)
1634 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1635
1636You can also sort results in descending order based on the creation timestamp using `orderBy=&quot;creationTimestamp desc&quot;`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first.
1637
1638Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1639 pageToken: string, Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.
1640 returnPartialSuccess: boolean, Opt-in for partial success behavior which provides partial results in case of failure. The default value is false and the logic is the same as today.
1641
1642Returns:
1643 An object of the form:
1644
1645 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001646 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
1647 {
1648 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
1649 &quot;name&quot;: &quot;A String&quot;, # The name of a per-instance config and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn&#x27;t exist or is not part of the group will result in an error.
1650 &quot;preservedState&quot;: { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
1651 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1652 &quot;a_key&quot;: {
1653 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1654 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1655 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001656 },
1657 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001658 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1659 &quot;a_key&quot;: &quot;A String&quot;,
1660 },
1661 },
1662 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1663 },
1664 ],
1665 &quot;nextPageToken&quot;: &quot;A String&quot;, # [Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.
1666 &quot;warning&quot;: { # [Output Only] Informational warning message.
1667 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1668 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1669 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1670 {
1671 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1672 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001673 },
1674 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001675 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1676 },
1677}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001678</div>
1679
1680<div class="method">
1681 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1682 <pre>Retrieves the next page of results.
1683
1684Args:
1685 previous_request: The request for the previous page. (required)
1686 previous_response: The response from the request for the previous page. (required)
1687
1688Returns:
1689 A request object that you can call &#x27;execute()&#x27; on to request the next
1690 page. Returns None if there are no more items in the collection.
1691 </pre>
1692</div>
1693
1694<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -07001695 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1696 <pre>Retrieves the next page of results.
1697
1698Args:
1699 previous_request: The request for the previous page. (required)
1700 previous_response: The response from the request for the previous page. (required)
1701
1702Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001703 A request object that you can call &#x27;execute()&#x27; on to request the next
Takashi Matsuo06694102015-09-11 13:55:40 -07001704 page. Returns None if there are no more items in the collection.
1705 </pre>
1706</div>
1707
1708<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001709 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001710 <pre>Updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
1711
1712Args:
1713 project: string, Project ID for this request. (required)
1714 zone: string, The name of the zone where you want to create the managed instance group. (required)
1715 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001716 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001717 The object takes the form of:
1718
1719{ # Represents a Managed Instance Group resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001720 #
1721 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1722 #
1723 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1724 #
1725 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
1726 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
1727 {
1728 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1729 &quot;initialDelaySec&quot;: 42, # The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances. This initial delay allows instances to initialize and run their startup scripts before the instance group determines that they are UNHEALTHY. This prevents the managed instance group from recreating its instances prematurely. This value must be from range [0, 3600].
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001730 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001731 ],
1732 &quot;baseInstanceName&quot;: &quot;A String&quot;, # The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035.
1733 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1734 &quot;currentActions&quot;: { # [Output Only] The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions.
1735 &quot;abandoning&quot;: 42, # [Output Only] The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it.
1736 &quot;creating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully.
1737 #
1738 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
1739 &quot;creatingWithoutRetries&quot;: 42, # [Output Only] The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group&#x27;s targetSize value accordingly.
1740 &quot;deleting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted.
1741 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1742 &quot;recreating&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template.
1743 &quot;refreshing&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance.
1744 &quot;restarting&quot;: 42, # [Output Only] The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted.
1745 &quot;verifying&quot;: 42, # [Output Only] The number of instances in the managed instance group that are being verified. See the managedInstances[].currentAction property in the listManagedInstances method documentation.
1746 },
1747 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001748 &quot;distributionPolicy&quot;: { # Policy specifying the intended distribution of managed instances across zones in a regional managed instance group.
1749 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage its instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001750 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001751 &quot;zone&quot;: &quot;A String&quot;, # The URL of the zone. The zone must exist in the region where the managed instance group is located.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001752 },
1753 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001754 },
1755 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this resource. This field may be used in optimistic locking. It will be ignored when inserting an InstanceGroupManager. An up-to-date fingerprint must be provided in order to update the InstanceGroupManager, otherwise the request will fail with error 412 conditionNotMet.
1756 #
1757 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1758 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1759 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001760 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Bu Sun Kim65020912020-05-20 12:08:20 -07001761 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1762 &quot;name&quot;: &quot;A String&quot;, # The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035.
1763 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1764 { # The named port. For example: .
1765 &quot;name&quot;: &quot;A String&quot;, # The name for this named port. The name must be 1-63 characters long, and comply with RFC1035.
1766 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001767 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001768 ],
1769 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1770 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001771 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1772 &quot;preservedState&quot;: { # Configuration of preserved resources.
1773 &quot;disks&quot;: { # Disks created on the instances that will be preserved on instance delete, update, etc. This map is keyed with the device names of the disks.
1774 &quot;a_key&quot;: {
1775 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update or VM instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1776 },
1777 },
1778 },
1779 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001780 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1781 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1782 &quot;isStable&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group is in a stable state. A stable state means that: none of the instances in the managed instance group is currently undergoing any type of change (for example, creation, restart, or deletion); no future changes are scheduled for instances in the managed instance group; and the managed instance group itself is not being modified.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001783 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1784 &quot;hasStatefulConfig&quot;: True or False, # [Output Only] A bit indicating whether the managed instance group has stateful configuration, that is, if you have configured any items in a stateful policy or in per-instance configs. The group might report that it has no stateful config even when there is still some preserved state on a managed instance, for example, if you have deleted all PICs but not yet applied those deletions.
1785 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1786 &quot;allEffective&quot;: True or False, # A bit indicating if all of the group&#x27;s per-instance configs (listed in the output of a listPerInstanceConfigs API call) have status EFFECTIVE or there are no per-instance-configs.
1787 },
1788 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001789 &quot;versionTarget&quot;: { # [Output Only] A status of consistency of Instances&#x27; versions with their target version specified by version field on Instance Group Manager.
1790 &quot;isReached&quot;: True or False, # [Output Only] A bit indicating whether version target has been reached in this managed instance group, i.e. all instances are in their target version. Instances&#x27; target version are specified by version field on Instance Group Manager.
1791 },
1792 },
1793 &quot;targetPools&quot;: [ # The URLs for all TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group.
1794 &quot;A String&quot;,
1795 ],
1796 &quot;targetSize&quot;: 42, # The target number of running instances for this managed instance group. You can reduce this number by using the instanceGroupManager deleteInstances or abandonInstances methods. Resizing the group also changes this number.
1797 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1798 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1799 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1800 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1801 &quot;maxSurge&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be created above the specified targetSize during the update process. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1802 #
1803 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1804 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001805 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001806 #
1807 # - If the value is fixed, then the calculated value is equal to the fixed value.
1808 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1809 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1810 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1811 },
1812 &quot;maxUnavailable&quot;: { # Encapsulates numeric value that can be either absolute or relative. # The maximum number of instances that can be unavailable during the update process. An instance is considered available if all of the following conditions are satisfied:
1813 #
1814 #
1815 # - The instance&#x27;s status is RUNNING.
1816 # - If there is a health check on the instance group, the instance&#x27;s liveness health check result must be HEALTHY at least once. If there is no health check on the group, then the instance only needs to have a status of RUNNING to be considered available. By default, a fixed value of 1 is used. This value can be either a fixed number or a percentage if the instance group has 10 or more instances. If you set a percentage, the number of instances will be rounded up if necessary.
1817 #
1818 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1819 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1820 #
1821 #
1822 # - If the value is fixed, then the calculated value is equal to the fixed value.
1823 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
1824 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1825 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1826 },
1827 &quot;minimalAction&quot;: &quot;A String&quot;, # Minimal action to be taken on an instance. You can specify either RESTART to restart existing instances or REPLACE to delete and create new instances from the target template. If you specify a RESTART, the Updater will attempt to perform that action only. However, if the Updater determines that the minimal action you specify is not enough to perform the update, it might perform a more disruptive action.
1828 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1829 &quot;type&quot;: &quot;A String&quot;, # The type of update process. You can specify either PROACTIVE so that the instance group manager proactively executes actions in order to bring instances to their target versions or OPPORTUNISTIC so that no action is proactively executed but the update will be performed as part of other actions (for example, resizes or recreateInstances calls).
1830 },
1831 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1832 #
1833 # Each version is defined by an instanceTemplate and a name. Every version can appear at most once per instance group. This field overrides the top-level instanceTemplate field. Read more about the relationships between these fields. Exactly one version must leave the targetSize field unset. That version will be applied to all remaining instances. For more information, read about canary updates.
1834 {
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001835 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create new instances in the managed instance group until the `targetSize` for this version is reached. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE; in those cases, existing instances are updated until the `targetSize` for this version is reached.
Bu Sun Kim65020912020-05-20 12:08:20 -07001836 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1837 &quot;targetSize&quot;: { # Encapsulates numeric value that can be either absolute or relative. # Specifies the intended number of instances to be created from the instanceTemplate. The final number of instances created from the template will be equal to:
1838 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1839 # - if expressed as a percent, the targetSize would be (targetSize.percent/100 * InstanceGroupManager.targetSize) If there is a remainder, the number is rounded up. If unset, this version will update any remaining instances not updated by another version. Read Starting a canary update for more information.
1840 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001841 #
1842 #
1843 # - If the value is fixed, then the calculated value is equal to the fixed value.
1844 # - If the value is a percent, then the calculated value is percent/100 * targetSize. For example, the calculated value of a 80% of a managed instance group with 150 instances would be (80/100 * 150) = 120 VM instances. If there is a remainder, the number is rounded up.
Bu Sun Kim65020912020-05-20 12:08:20 -07001845 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1846 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001847 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001848 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001849 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07001850 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of a zone where the managed instance group is located (for zonal resources).
Bu Sun Kim65020912020-05-20 12:08:20 -07001851}
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001852
1853 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1854
1855For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1856
1857The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1858
1859Returns:
1860 An object of the form:
1861
1862 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001863 #
1864 # Google Compute Engine has three Operation resources:
1865 #
1866 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1867 #
1868 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1869 #
1870 # Operations can be global, regional or zonal.
1871 # - For global operations, use the `globalOperations` resource.
1872 # - For regional operations, use the `regionOperations` resource.
1873 # - For zonal operations, use the `zonalOperations` resource.
1874 #
1875 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1876 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1877 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1878 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1879 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1880 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1881 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07001882 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001883 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1884 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1885 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07001886 },
1887 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001888 },
1889 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1890 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1891 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1892 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1893 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1894 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1895 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1896 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1897 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1898 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1899 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
1900 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
1901 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1902 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1903 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
1904 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1905 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1906 {
1907 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
1908 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1909 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1910 {
1911 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
1912 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1913 },
1914 ],
1915 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1916 },
1917 ],
1918 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
1919}</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001920</div>
1921
1922<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001923 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
1924 <pre>Inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
1925
1926Args:
1927 project: string, Project ID for this request. (required)
1928 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1929 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1930 body: object, The request body.
1931 The object takes the form of:
1932
1933{ # InstanceGroupManagers.patchPerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001934 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
1935 {
1936 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
1937 &quot;name&quot;: &quot;A String&quot;, # The name of a per-instance config and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn&#x27;t exist or is not part of the group will result in an error.
1938 &quot;preservedState&quot;: { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
1939 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1940 &quot;a_key&quot;: {
1941 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
1942 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
1943 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001944 },
1945 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001946 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1947 &quot;a_key&quot;: &quot;A String&quot;,
1948 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001949 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001950 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
1951 },
1952 ],
1953}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001954
1955 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
1956
1957For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
1958
1959The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
1960
1961Returns:
1962 An object of the form:
1963
1964 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001965 #
1966 # Google Compute Engine has three Operation resources:
1967 #
1968 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1969 #
1970 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1971 #
1972 # Operations can be global, regional or zonal.
1973 # - For global operations, use the `globalOperations` resource.
1974 # - For regional operations, use the `regionOperations` resource.
1975 # - For zonal operations, use the `zonalOperations` resource.
1976 #
1977 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
1978 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1979 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1980 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1981 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1982 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1983 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001984 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001985 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1986 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1987 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001988 },
1989 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08001990 },
1991 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
1992 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
1993 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1994 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1995 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1996 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1997 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1998 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
1999 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2000 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2001 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2002 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2003 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2004 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2005 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2006 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2007 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2008 {
2009 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2010 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2011 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2012 {
2013 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2014 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2015 },
2016 ],
2017 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2018 },
2019 ],
2020 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2021}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002022</div>
2023
2024<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002025 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002026 <pre>Flags the specified instances in the managed instance group to be immediately recreated. The instances are deleted and recreated using the current instance template for the managed instance group. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of the recreating action with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -07002027
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002028If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
2029
2030You can specify a maximum of 1000 instances with this method per request.
2031
Takashi Matsuo06694102015-09-11 13:55:40 -07002032Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002033 project: string, Project ID for this request. (required)
2034 zone: string, The name of the zone where the managed instance group is located. (required)
2035 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002036 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002037 The object takes the form of:
2038
2039{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002040 &quot;instances&quot;: [ # The URLs of one or more instances to recreate. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
2041 &quot;A String&quot;,
2042 ],
2043}
Takashi Matsuo06694102015-09-11 13:55:40 -07002044
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002045 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2046
2047For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2048
2049The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002050
2051Returns:
2052 An object of the form:
2053
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002054 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002055 #
2056 # Google Compute Engine has three Operation resources:
2057 #
2058 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2059 #
2060 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2061 #
2062 # Operations can be global, regional or zonal.
2063 # - For global operations, use the `globalOperations` resource.
2064 # - For regional operations, use the `regionOperations` resource.
2065 # - For zonal operations, use the `zonalOperations` resource.
2066 #
2067 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2068 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2069 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2070 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2071 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2072 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2073 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002074 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002075 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2076 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2077 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002078 },
2079 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002080 },
2081 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2082 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2083 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2084 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2085 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2086 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2087 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2088 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2089 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2090 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2091 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2092 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2093 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2094 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2095 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2096 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2097 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2098 {
2099 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2100 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2101 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2102 {
2103 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2104 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2105 },
2106 ],
2107 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2108 },
2109 ],
2110 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2111}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002112</div>
2113
2114<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002115 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002116 <pre>Resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method.
Takashi Matsuo06694102015-09-11 13:55:40 -07002117
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002118When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including:
2119
2120+ The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance.
2121
2122This list is subject to change.
2123
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002124If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.
2125
Takashi Matsuo06694102015-09-11 13:55:40 -07002126Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002127 project: string, Project ID for this request. (required)
2128 zone: string, The name of the zone where the managed instance group is located. (required)
2129 instanceGroupManager: string, The name of the managed instance group. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -07002130 size: integer, The number of running instances that the managed instance group should maintain at any given time. The group automatically adds or removes instances to maintain the number of instances specified by this parameter. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002131 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2132
2133For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2134
2135The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002136
2137Returns:
2138 An object of the form:
2139
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002140 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002141 #
2142 # Google Compute Engine has three Operation resources:
2143 #
2144 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2145 #
2146 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2147 #
2148 # Operations can be global, regional or zonal.
2149 # - For global operations, use the `globalOperations` resource.
2150 # - For regional operations, use the `regionOperations` resource.
2151 # - For zonal operations, use the `zonalOperations` resource.
2152 #
2153 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2154 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2155 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2156 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2157 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2158 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2159 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002160 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002161 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2162 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2163 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002164 },
2165 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002166 },
2167 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2168 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2169 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2170 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2171 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2172 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2173 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2174 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2175 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2176 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2177 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2178 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2179 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2180 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2181 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2182 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2183 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2184 {
2185 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2186 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2187 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2188 {
2189 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2190 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2191 },
2192 ],
2193 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2194 },
2195 ],
2196 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2197}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002198</div>
2199
2200<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002201 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim673ec5c2020-11-16 11:05:03 -07002202 <pre>Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
Takashi Matsuo06694102015-09-11 13:55:40 -07002203
2204Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002205 project: string, Project ID for this request. (required)
2206 zone: string, The name of the zone where the managed instance group is located. (required)
2207 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002208 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002209 The object takes the form of:
2210
2211{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002212 &quot;instanceTemplate&quot;: &quot;A String&quot;, # The URL of the instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group&#x27;s updatePolicy.type to PROACTIVE.
2213}
Takashi Matsuo06694102015-09-11 13:55:40 -07002214
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002215 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2216
2217For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2218
2219The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002220
2221Returns:
2222 An object of the form:
2223
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002224 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002225 #
2226 # Google Compute Engine has three Operation resources:
2227 #
2228 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2229 #
2230 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2231 #
2232 # Operations can be global, regional or zonal.
2233 # - For global operations, use the `globalOperations` resource.
2234 # - For regional operations, use the `regionOperations` resource.
2235 # - For zonal operations, use the `zonalOperations` resource.
2236 #
2237 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2238 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2239 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2240 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2241 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2242 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2243 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002244 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002245 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2246 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2247 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002248 },
2249 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002250 },
2251 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2252 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2253 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2254 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2255 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2256 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2257 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2258 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2259 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2260 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2261 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2262 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2263 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2264 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2265 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2266 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2267 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2268 {
2269 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2270 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2271 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2272 {
2273 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2274 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2275 },
2276 ],
2277 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2278 },
2279 ],
2280 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2281}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002282</div>
2283
2284<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002285 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002286 <pre>Modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.
Takashi Matsuo06694102015-09-11 13:55:40 -07002287
2288Args:
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002289 project: string, Project ID for this request. (required)
2290 zone: string, The name of the zone where the managed instance group is located. (required)
2291 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002292 body: object, The request body.
Takashi Matsuo06694102015-09-11 13:55:40 -07002293 The object takes the form of:
2294
2295{
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002296 &quot;fingerprint&quot;: &quot;A String&quot;, # The fingerprint of the target pools information. Use this optional property to prevent conflicts when multiple users change the target pools settings concurrently. Obtain the fingerprint with the instanceGroupManagers.get method. Then, include the fingerprint in your request to ensure that you do not overwrite changes that were applied from another concurrent request.
2297 &quot;targetPools&quot;: [ # The list of target pool URLs that instances in this managed instance group belong to. The managed instance group applies these target pools to all of the instances in the group. Existing instances and new instances in the group all receive these target pool settings.
2298 &quot;A String&quot;,
2299 ],
2300}
Takashi Matsuo06694102015-09-11 13:55:40 -07002301
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002302 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2303
2304For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2305
2306The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Takashi Matsuo06694102015-09-11 13:55:40 -07002307
2308Returns:
2309 An object of the form:
2310
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002311 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002312 #
2313 # Google Compute Engine has three Operation resources:
2314 #
2315 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2316 #
2317 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2318 #
2319 # Operations can be global, regional or zonal.
2320 # - For global operations, use the `globalOperations` resource.
2321 # - For regional operations, use the `regionOperations` resource.
2322 # - For zonal operations, use the `zonalOperations` resource.
2323 #
2324 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2325 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2326 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2327 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2328 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2329 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2330 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim65020912020-05-20 12:08:20 -07002331 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002332 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2333 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2334 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim65020912020-05-20 12:08:20 -07002335 },
2336 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002337 },
2338 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2339 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2340 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2341 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2342 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2343 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2344 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2345 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2346 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2347 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2348 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2349 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2350 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2351 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2352 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2353 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2354 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2355 {
2356 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2357 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2358 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2359 {
2360 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2361 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2362 },
2363 ],
2364 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2365 },
2366 ],
2367 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2368}</pre>
Takashi Matsuo06694102015-09-11 13:55:40 -07002369</div>
2370
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002371<div class="method">
2372 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2373 <pre>Inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.
2374
2375Args:
2376 project: string, Project ID for this request. (required)
2377 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2378 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2379 body: object, The request body.
2380 The object takes the form of:
2381
2382{ # InstanceGroupManagers.updatePerInstanceConfigs
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002383 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
2384 {
2385 &quot;fingerprint&quot;: &quot;A String&quot;, # Fingerprint of this per-instance config. This field can be used in optimistic locking. It is ignored when inserting a per-instance config. An up-to-date fingerprint must be provided in order to update an existing per-instance config or the field needs to be unset.
2386 &quot;name&quot;: &quot;A String&quot;, # The name of a per-instance config and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance config with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance config for a VM instance that either doesn&#x27;t exist or is not part of the group will result in an error.
2387 &quot;preservedState&quot;: { # Preserved state for a given instance. # The intended preserved state for the given instance. Does not contain preserved state generated from a stateful policy.
2388 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2389 &quot;a_key&quot;: {
2390 &quot;autoDelete&quot;: &quot;A String&quot;, # These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in READ_ONLY mode cannot be auto-deleted.
2391 &quot;mode&quot;: &quot;A String&quot;, # The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.
2392 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002393 },
2394 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002395 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2396 &quot;a_key&quot;: &quot;A String&quot;,
2397 },
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002398 },
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002399 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
2400 },
2401 ],
2402}
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002403
2404 requestId: string, An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed.
2405
2406For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments.
2407
2408The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2409
2410Returns:
2411 An object of the form:
2412
2413 { # Represents an Operation resource.
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002414 #
2415 # Google Compute Engine has three Operation resources:
2416 #
2417 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2418 #
2419 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2420 #
2421 # Operations can be global, regional or zonal.
2422 # - For global operations, use the `globalOperations` resource.
2423 # - For regional operations, use the `regionOperations` resource.
2424 # - For zonal operations, use the `zonalOperations` resource.
2425 #
2426 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
2427 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2428 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2429 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2430 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2431 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2432 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002433 {
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002434 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2435 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2436 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002437 },
2438 ],
Yoshi Automation Botcc94ec82021-01-15 07:10:04 -08002439 },
2440 &quot;httpErrorMessage&quot;: &quot;A String&quot;, # [Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as `NOT FOUND`.
2441 &quot;httpErrorStatusCode&quot;: 42, # [Output Only] If the operation fails, this field contains the HTTP error status code that was returned. For example, a `404` means the resource was not found.
2442 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2443 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2444 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2445 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2446 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2447 &quot;progress&quot;: 42, # [Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess when the operation will be complete. This number should monotonically increase as the operation progresses.
2448 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2449 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2450 &quot;startTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was started by the server. This value is in RFC3339 text format.
2451 &quot;status&quot;: &quot;A String&quot;, # [Output Only] The status of the operation, which can be one of the following: `PENDING`, `RUNNING`, or `DONE`.
2452 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2453 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2454 &quot;targetLink&quot;: &quot;A String&quot;, # [Output Only] The URL of the resource that the operation modifies. For operations related to creating a snapshot, this points to the persistent disk that the snapshot was created from.
2455 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2456 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2457 {
2458 &quot;code&quot;: &quot;A String&quot;, # [Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.
2459 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2460 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2461 {
2462 &quot;key&quot;: &quot;A String&quot;, # [Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).
2463 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2464 },
2465 ],
2466 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2467 },
2468 ],
2469 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the operation resides. Only applicable when performing per-zone operations.
2470}</pre>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07002471</div>
2472
Takashi Matsuo06694102015-09-11 13:55:40 -07002473</body></html>