blob: f4d01e8f2868aa2872cda248511886c6b14beaa0 [file] [log] [blame]
Sai Cheemalapatidf613972016-10-21 13:59:49 -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_beta.html">Compute Engine API</a> . <a href="compute_beta.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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070082<p class="firstline">Retrieves the list of managed instance groups and groups them by zone.</p>
83<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095<p class="toc_element">
96 <code><a href="#delete">delete(project, zone, instanceGroupManager, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -070097<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>
98<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700101<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -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">
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700122<p class="toc_element">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400123 <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>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700127<p class="firstline">Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700128<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">
Sai Cheemalapatidf613972016-10-21 13:59:49 -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>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400137<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -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">
141 <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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700143<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 <code><a href="#resize">resize(project, zone, instanceGroupManager, size, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700145<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>
146<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700147 <code><a href="#resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700148<p class="firstline">Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.</p>
149<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 <code><a href="#setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151<p class="firstline">Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.</p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700152<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 <code><a href="#setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700154<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 recreate them.</p>
155<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700156 <code><a href="#setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700157<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>
158<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700159 <code><a href="#testIamPermissions">testIamPermissions(project, zone, resource, body=None)</a></code></p>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700160<p class="firstline">Returns permissions that a caller has on the specified resource.</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400161<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700162 <code><a href="#update">update(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400163<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 updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -0700164<p class="toc_element">
165 <code><a href="#updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</a></code></p>
166<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>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700167<h3>Method Details</h3>
168<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700169 <code class="details" id="abandonInstances">abandonInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700170 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700171
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400172If 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.
173
174You can specify a maximum of 1000 instances with this method per request.
175
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700176Args:
177 project: string, Project ID for this request. (required)
178 zone: string, The name of the zone where the managed instance group is located. (required)
179 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700180 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700181 The object takes the form of:
182
183{
Bu Sun Kim65020912020-05-20 12:08:20 -0700184 &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].
185 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700186 ],
187 }
188
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700189 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.
190
191For 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.
192
193The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700194
195Returns:
196 An object of the form:
197
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700198 { # Represents an Operation resource.
199 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700200 # Google Compute Engine has three Operation resources:
201 #
202 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
203 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700204 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
205 #
206 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700207 # - For global operations, use the `globalOperations` resource.
208 # - For regional operations, use the `regionOperations` resource.
209 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700210 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700211 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700212 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
213 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
214 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
215 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
216 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
217 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700218 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700219 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
220 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
221 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700222 },
223 ],
224 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700225 &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`.
226 &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.
227 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
228 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
229 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
230 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
231 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
232 &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.
233 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
234 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
235 &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.
236 &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`.
237 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
238 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
239 &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.
240 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
241 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
242 {
243 &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.
244 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
245 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
246 {
247 &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).
248 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
249 },
250 ],
251 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
252 },
253 ],
254 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700255 }</pre>
256</div>
257
258<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700259 <code class="details" id="aggregatedList">aggregatedList(project, filter=None, includeAllScopes=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700260 <pre>Retrieves the list of managed instance groups and groups them by zone.
261
262Args:
263 project: string, Project ID for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700264 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;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700265
Dan O'Mearadd494642020-05-01 07:42:23 -0700266For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700267
Dan O'Mearadd494642020-05-01 07:42:23 -0700268You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700269
Bu Sun Kim65020912020-05-20 12:08:20 -0700270To 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 -0700271 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 -0700272 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`)
273 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
274
275You 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.
276
277Currently, only sorting by `name` or `creationTimestamp desc` is supported.
278 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 -0700279 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700280
281Returns:
282 An object of the form:
283
284 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700285 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
286 &quot;items&quot;: { # A list of InstanceGroupManagersScopedList resources.
287 &quot;a_key&quot;: { # [Output Only] The name of the scope that contains this set of managed instance groups.
288 &quot;instanceGroupManagers&quot;: [ # [Output Only] The list of managed instance groups that are contained in the specified project and zone.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700289 { # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700290 #
291 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
292 #
293 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
294 #
295 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700296 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -0700297 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700298 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
299 &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].
Dan O'Mearadd494642020-05-01 07:42:23 -0700300 },
301 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700302 &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.
303 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
304 &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.
305 &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.
306 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700307 #
308 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700309 &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.
310 &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.
311 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
312 &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.
313 &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.
314 &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.
315 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700316 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700317 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
318 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
319 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700321 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700322 },
323 ],
324 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700325 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
326 &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.
327 #
328 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
329 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
330 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
331 &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.
332 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
333 &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.
334 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
335 { # The named port. For example: .
336 &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.
337 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
338 },
339 ],
340 &quot;pendingActions&quot;: { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
341 &quot;creating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
342 &quot;deleting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
343 &quot;recreating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
344 &quot;restarting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
345 },
346 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
347 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
348 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
349 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
350 &quot;preservedState&quot;: { # Configuration of preserved resources.
351 &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.
352 &quot;a_key&quot;: {
353 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700354 },
355 },
356 },
357 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700358 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
359 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
360 &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.
361 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
362 &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.
363 &quot;isStateful&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. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700364 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
365 &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.
366 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700367 },
368 &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.
369 &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.
370 },
371 },
372 &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.
373 &quot;A String&quot;,
374 ],
375 &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.
376 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
377 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
378 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
379 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
380 &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.
381 #
382 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
383 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
384 #
385 #
386 # - If the value is fixed, then the calculated value is equal to the fixed value.
387 # - 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.
388 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
389 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
390 },
391 &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:
392 #
393 #
394 # - The instance&#x27;s status is RUNNING.
395 # - 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.
396 #
397 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
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 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
407 &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.
408 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
409 &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).
410 },
411 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
412 #
413 # 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.
414 {
415 &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.
416 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
417 &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:
418 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
419 # - 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.
420 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
421 #
422 #
423 # - If the value is fixed, then the calculated value is equal to the fixed value.
424 # - 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.
425 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
426 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
427 },
428 },
429 ],
430 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -0700431 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700432 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700433 &quot;warning&quot;: { # [Output Only] The warning that replaces the list of managed instance groups when the list is empty.
434 &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.
435 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
436 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
437 {
438 &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).
439 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
440 },
441 ],
442 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
443 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700444 },
445 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700446 &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.
447 &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.
448 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700449 &quot;unreachables&quot;: [ # [Output Only] Unreachable resources.
450 &quot;A String&quot;,
451 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700452 &quot;warning&quot;: { # [Output Only] Informational warning message.
453 &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.
454 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
455 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700456 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700457 &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).
458 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700459 },
460 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700461 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700462 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700463 }</pre>
464</div>
465
466<div class="method">
467 <code class="details" id="aggregatedList_next">aggregatedList_next(previous_request, previous_response)</code>
468 <pre>Retrieves the next page of results.
469
470Args:
471 previous_request: The request for the previous page. (required)
472 previous_response: The response from the request for the previous page. (required)
473
474Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700475 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700476 page. Returns None if there are no more items in the collection.
477 </pre>
478</div>
479
480<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700481 <code class="details" id="applyUpdatesToInstances">applyUpdatesToInstances(project, zone, instanceGroupManager, body=None)</code>
482 <pre>Applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700483
484Args:
485 project: string, Project ID for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700486 zone: string, The name of the zone where the managed instance group is located. Should conform to RFC1035. (required)
487 instanceGroupManager: string, The name of the managed instance group, should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700488 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700489 The object takes the form of:
490
491{ # InstanceGroupManagers.applyUpdatesToInstances
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700492 &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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700493 &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].
494 &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700495 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700496 &quot;minimalAction&quot;: &quot;A String&quot;, # The minimal action that you want to perform on each instance during the update:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700497 # - REPLACE: At minimum, delete the instance and create it again.
498 # - RESTART: Stop the instance and start it again.
499 # - REFRESH: Do not stop the instance.
500 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700501 &quot;mostDisruptiveAllowedAction&quot;: &quot;A String&quot;, # The most disruptive action that you want to perform on each instance during the update:
502 # - REPLACE: Delete the instance and create it again.
503 # - RESTART: Stop the instance and start it again.
504 # - REFRESH: Do not stop the instance.
505 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700506 }
507
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700508
509Returns:
510 An object of the form:
511
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700512 { # Represents an Operation resource.
513 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700514 # Google Compute Engine has three Operation resources:
515 #
516 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
517 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700518 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
519 #
520 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700521 # - For global operations, use the `globalOperations` resource.
522 # - For regional operations, use the `regionOperations` resource.
523 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700525 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700526 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
527 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
528 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
529 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
530 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
531 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700532 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700533 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
534 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
535 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700536 },
537 ],
538 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700539 &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`.
540 &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.
541 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
542 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
543 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
544 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
545 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
546 &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.
547 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
548 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
549 &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.
550 &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`.
551 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
552 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
553 &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.
554 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
555 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
556 {
557 &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.
558 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
559 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
560 {
561 &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).
562 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
563 },
564 ],
565 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
566 },
567 ],
568 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700569 }</pre>
570</div>
571
572<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700573 <code class="details" id="close">close()</code>
574 <pre>Close httplib2 connections.</pre>
575</div>
576
577<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700578 <code class="details" id="createInstances">createInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
579 <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.
580
581Args:
582 project: string, Project ID for this request. (required)
583 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
584 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
585 body: object, The request body.
586 The object takes the form of:
587
588{ # InstanceGroupManagers.createInstances
Bu Sun Kim65020912020-05-20 12:08:20 -0700589 &quot;instances&quot;: [ # [Required] List of specifications of per-instance configs.
Dan O'Mearadd494642020-05-01 07:42:23 -0700590 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700591 &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.
592 &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.
593 &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.
594 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
595 &quot;a_key&quot;: {
596 &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.
597 &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.
598 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700599 },
600 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700601 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
602 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700603 },
604 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700605 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Dan O'Mearadd494642020-05-01 07:42:23 -0700606 },
607 ],
608 }
609
610 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.
611
612For 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.
613
614The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
615
616Returns:
617 An object of the form:
618
619 { # Represents an Operation resource.
620 #
621 # Google Compute Engine has three Operation resources:
622 #
623 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
624 #
625 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
626 #
627 # Operations can be global, regional or zonal.
628 # - For global operations, use the `globalOperations` resource.
629 # - For regional operations, use the `regionOperations` resource.
630 # - For zonal operations, use the `zonalOperations` resource.
631 #
632 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700633 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
634 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
635 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
636 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
637 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
638 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700639 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700640 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
641 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
642 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700643 },
644 ],
645 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700646 &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`.
647 &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.
648 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
649 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
650 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
651 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
652 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
653 &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.
654 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
655 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
656 &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.
657 &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`.
658 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
659 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
660 &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.
661 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
662 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
663 {
664 &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.
665 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
666 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
667 {
668 &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).
669 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
670 },
671 ],
672 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
673 },
674 ],
675 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700676 }</pre>
677</div>
678
679<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700680 <code class="details" id="delete">delete(project, zone, instanceGroupManager, requestId=None)</code>
681 <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.
682
683Args:
684 project: string, Project ID for this request. (required)
685 zone: string, The name of the zone where the managed instance group is located. (required)
686 instanceGroupManager: string, The name of the managed instance group to delete. (required)
687 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.
688
689For 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.
690
691The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
692
693Returns:
694 An object of the form:
695
696 { # Represents an Operation resource.
697 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700698 # Google Compute Engine has three Operation resources:
699 #
700 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
701 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700702 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
703 #
704 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700705 # - For global operations, use the `globalOperations` resource.
706 # - For regional operations, use the `regionOperations` resource.
707 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700708 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700709 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700710 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
711 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
712 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
713 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
714 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
715 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700716 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700717 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
718 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
719 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700720 },
721 ],
722 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700723 &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`.
724 &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.
725 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
726 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
727 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
728 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
729 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
730 &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.
731 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
732 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
733 &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.
734 &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`.
735 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
736 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
737 &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.
738 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
739 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
740 {
741 &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.
742 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
743 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
744 {
745 &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).
746 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
747 },
748 ],
749 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
750 },
751 ],
752 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700753 }</pre>
754</div>
755
756<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700757 <code class="details" id="deleteInstances">deleteInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700758 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700759
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400760If 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.
761
762You can specify a maximum of 1000 instances with this method per request.
763
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700764Args:
765 project: string, Project ID for this request. (required)
766 zone: string, The name of the zone where the managed instance group is located. (required)
767 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700768 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700769 The object takes the form of:
770
771{
Bu Sun Kim65020912020-05-20 12:08:20 -0700772 &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].
773 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700774 ],
775 }
776
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700777 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.
778
779For 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.
780
781The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700782
783Returns:
784 An object of the form:
785
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700786 { # Represents an Operation resource.
787 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700788 # Google Compute Engine has three Operation resources:
789 #
790 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
791 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700792 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
793 #
794 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -0700795 # - For global operations, use the `globalOperations` resource.
796 # - For regional operations, use the `regionOperations` resource.
797 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700798 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700799 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700800 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
801 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
802 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
803 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
804 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
805 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -0700806 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700807 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
808 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
809 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -0700810 },
811 ],
812 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700813 &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`.
814 &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.
815 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
816 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
817 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
818 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
819 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
820 &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.
821 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
822 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
823 &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.
824 &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`.
825 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
826 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
827 &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.
828 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
829 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
830 {
831 &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.
832 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
833 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
834 {
835 &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).
836 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
837 },
838 ],
839 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
840 },
841 ],
842 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700843 }</pre>
844</div>
845
846<div class="method">
847 <code class="details" id="deletePerInstanceConfigs">deletePerInstanceConfigs(project, zone, instanceGroupManager, body=None)</code>
848 <pre>Deletes selected per-instance configs for the managed instance group.
849
850Args:
851 project: string, Project ID for this request. (required)
852 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
853 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
854 body: object, The request body.
855 The object takes the form of:
856
857{ # InstanceGroupManagers.deletePerInstanceConfigs
Bu Sun Kim65020912020-05-20 12:08:20 -0700858 &quot;names&quot;: [ # The list of instance names for which we want to delete per-instance configs on this managed instance group.
859 &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700860 ],
861 }
862
863
864Returns:
865 An object of the form:
866
867 { # Represents an Operation resource.
868 #
869 # Google Compute Engine has three Operation resources:
870 #
871 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
872 #
873 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
874 #
875 # Operations can be global, regional or zonal.
876 # - For global operations, use the `globalOperations` resource.
877 # - For regional operations, use the `regionOperations` resource.
878 # - For zonal operations, use the `zonalOperations` resource.
879 #
880 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700881 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
882 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
883 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
884 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
885 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
886 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700887 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700888 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
889 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
890 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700891 },
892 ],
893 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700894 &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`.
895 &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.
896 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
897 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
898 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
899 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
900 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
901 &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.
902 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
903 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
904 &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.
905 &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`.
906 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
907 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
908 &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.
909 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
910 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
911 {
912 &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.
913 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
914 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
915 {
916 &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).
917 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
918 },
919 ],
920 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
921 },
922 ],
923 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700924 }</pre>
925</div>
926
927<div class="method">
928 <code class="details" id="get">get(project, zone, instanceGroupManager)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700929 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -0700930
931Args:
932 project: string, Project ID for this request. (required)
933 zone: string, The name of the zone where the managed instance group is located. (required)
934 instanceGroupManager: string, The name of the managed instance group. (required)
935
936Returns:
937 An object of the form:
938
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700939 { # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700940 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700941 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
Dan O'Mearadd494642020-05-01 07:42:23 -0700942 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700943 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
Dan O'Mearadd494642020-05-01 07:42:23 -0700944 #
945 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Bu Sun Kim65020912020-05-20 12:08:20 -0700946 &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 -0700947 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700948 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
949 &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 -0700950 },
951 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700952 &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.
953 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
954 &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.
955 &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.
956 &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 Kim715bd7f2019-06-14 16:50:42 -0700957 #
958 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -0700959 &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.
960 &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.
961 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
962 &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.
963 &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.
964 &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.
965 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700966 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700967 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
968 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
969 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700971 &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 -0700972 },
973 ],
974 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700975 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
976 &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.
977 #
978 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
979 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
980 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
981 &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.
982 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
983 &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.
984 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
985 { # The named port. For example: .
986 &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.
987 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
988 },
989 ],
990 &quot;pendingActions&quot;: { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
991 &quot;creating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
992 &quot;deleting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
993 &quot;recreating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
994 &quot;restarting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
995 },
996 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
997 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
998 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
999 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1000 &quot;preservedState&quot;: { # Configuration of preserved resources.
1001 &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.
1002 &quot;a_key&quot;: {
1003 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001004 },
1005 },
1006 },
1007 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001008 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1009 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1010 &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.
1011 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1012 &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.
1013 &quot;isStateful&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. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001014 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1015 &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.
1016 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001017 },
1018 &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.
1019 &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.
1020 },
1021 },
1022 &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.
1023 &quot;A String&quot;,
1024 ],
1025 &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.
1026 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1027 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1028 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1029 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1030 &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.
1031 #
1032 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1033 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1034 #
1035 #
1036 # - If the value is fixed, then the calculated value is equal to the fixed value.
1037 # - 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.
1038 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1039 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1040 },
1041 &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:
1042 #
1043 #
1044 # - The instance&#x27;s status is RUNNING.
1045 # - 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.
1046 #
1047 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1048 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1049 #
1050 #
1051 # - If the value is fixed, then the calculated value is equal to the fixed value.
1052 # - 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.
1053 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1054 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1055 },
1056 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1057 &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.
1058 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1059 &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).
1060 },
1061 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1062 #
1063 # 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.
1064 {
1065 &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.
1066 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1067 &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:
1068 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1069 # - 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.
1070 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1071 #
1072 #
1073 # - If the value is fixed, then the calculated value is equal to the fixed value.
1074 # - 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.
1075 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1076 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1077 },
1078 },
1079 ],
1080 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07001081 }</pre>
1082</div>
1083
1084<div class="method">
1085 <code class="details" id="insert">insert(project, zone, body=None, requestId=None)</code>
1086 <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.
1087
1088A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.
1089
1090Args:
1091 project: string, Project ID for this request. (required)
1092 zone: string, The name of the zone where you want to create the managed instance group. (required)
1093 body: object, The request body.
1094 The object takes the form of:
1095
1096{ # Represents a Managed Instance Group resource.
1097 #
1098 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1099 #
1100 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1101 #
1102 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001103 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -07001104 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001105 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1106 &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].
Dan O'Mearadd494642020-05-01 07:42:23 -07001107 },
1108 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001109 &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.
1110 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1111 &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.
1112 &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.
1113 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001114 #
1115 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001116 &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.
1117 &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.
1118 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1119 &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.
1120 &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.
1121 &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.
1122 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001123 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001124 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1125 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
1126 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07001127 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001128 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001129 },
1130 ],
1131 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001132 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1133 &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.
1134 #
1135 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1136 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1137 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1138 &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.
1139 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1140 &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.
1141 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1142 { # The named port. For example: .
1143 &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.
1144 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1145 },
1146 ],
1147 &quot;pendingActions&quot;: { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1148 &quot;creating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1149 &quot;deleting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1150 &quot;recreating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1151 &quot;restarting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1152 },
1153 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1154 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1155 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1156 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1157 &quot;preservedState&quot;: { # Configuration of preserved resources.
1158 &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.
1159 &quot;a_key&quot;: {
1160 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001161 },
1162 },
1163 },
1164 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001165 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1166 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1167 &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.
1168 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1169 &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.
1170 &quot;isStateful&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. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001171 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1172 &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.
1173 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001174 },
1175 &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.
1176 &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.
1177 },
1178 },
1179 &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.
1180 &quot;A String&quot;,
1181 ],
1182 &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.
1183 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1184 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1185 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1186 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1187 &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.
1188 #
1189 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1190 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1191 #
1192 #
1193 # - If the value is fixed, then the calculated value is equal to the fixed value.
1194 # - 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.
1195 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1196 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1197 },
1198 &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:
1199 #
1200 #
1201 # - The instance&#x27;s status is RUNNING.
1202 # - 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.
1203 #
1204 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1205 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1206 #
1207 #
1208 # - If the value is fixed, then the calculated value is equal to the fixed value.
1209 # - 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.
1210 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1211 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1212 },
1213 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1214 &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.
1215 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1216 &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).
1217 },
1218 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1219 #
1220 # 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.
1221 {
1222 &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.
1223 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1224 &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:
1225 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1226 # - 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.
1227 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1228 #
1229 #
1230 # - If the value is fixed, then the calculated value is equal to the fixed value.
1231 # - 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.
1232 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1233 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1234 },
1235 },
1236 ],
1237 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07001238}
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001239
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001240 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.
1241
1242For 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.
1243
1244The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001245
1246Returns:
1247 An object of the form:
1248
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001249 { # Represents an Operation resource.
1250 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001251 # Google Compute Engine has three Operation resources:
1252 #
1253 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1254 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001255 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1256 #
1257 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 # - For global operations, use the `globalOperations` resource.
1259 # - For regional operations, use the `regionOperations` resource.
1260 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001261 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001262 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001263 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1264 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1265 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1266 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1267 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1268 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001269 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001270 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1271 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1272 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001273 },
1274 ],
1275 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001276 &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`.
1277 &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.
1278 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1279 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1280 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1281 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1282 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1283 &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.
1284 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1285 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1286 &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.
1287 &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`.
1288 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1289 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1290 &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.
1291 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1292 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1293 {
1294 &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.
1295 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1296 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1297 {
1298 &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).
1299 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1300 },
1301 ],
1302 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1303 },
1304 ],
1305 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001306 }</pre>
1307</div>
1308
1309<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001310 <code class="details" id="list">list(project, zone, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001311 <pre>Retrieves a list of managed instance groups that are contained within the specified project and zone.
1312
1313Args:
1314 project: string, Project ID for this request. (required)
1315 zone: string, The name of the zone where the managed instance group is located. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001316 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;`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001317
Dan O'Mearadd494642020-05-01 07:42:23 -07001318For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001319
Dan O'Mearadd494642020-05-01 07:42:23 -07001320You 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001321
Bu Sun Kim65020912020-05-20 12:08:20 -07001322To 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) ```
1323 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`)
1324 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1325
1326You 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.
1327
1328Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1329 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 -07001330 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001331
1332Returns:
1333 An object of the form:
1334
1335 { # [Output Only] A list of managed instance groups.
Bu Sun Kim65020912020-05-20 12:08:20 -07001336 &quot;id&quot;: &quot;A String&quot;, # [Output Only] Unique identifier for the resource; defined by the server.
1337 &quot;items&quot;: [ # A list of InstanceGroupManager resources.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 { # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001339 #
1340 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1341 #
1342 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1343 #
1344 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001345 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -07001346 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001347 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1348 &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].
Dan O'Mearadd494642020-05-01 07:42:23 -07001349 },
1350 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001351 &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.
1352 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1353 &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.
1354 &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.
1355 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001356 #
1357 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001358 &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.
1359 &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.
1360 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1361 &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.
1362 &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.
1363 &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.
1364 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001365 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001366 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1367 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
1368 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Dan O'Mearadd494642020-05-01 07:42:23 -07001369 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001370 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001371 },
1372 ],
1373 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001374 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1375 &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.
1376 #
1377 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1378 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1379 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1380 &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.
1381 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1382 &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.
1383 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1384 { # The named port. For example: .
1385 &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.
1386 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1387 },
1388 ],
1389 &quot;pendingActions&quot;: { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1390 &quot;creating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1391 &quot;deleting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1392 &quot;recreating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1393 &quot;restarting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1394 },
1395 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1396 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1397 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1398 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1399 &quot;preservedState&quot;: { # Configuration of preserved resources.
1400 &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.
1401 &quot;a_key&quot;: {
1402 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001403 },
1404 },
1405 },
1406 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001407 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1408 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1409 &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.
1410 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1411 &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.
1412 &quot;isStateful&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. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001413 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1414 &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.
1415 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001416 },
1417 &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.
1418 &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.
1419 },
1420 },
1421 &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.
1422 &quot;A String&quot;,
1423 ],
1424 &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.
1425 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1426 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1427 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1428 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1429 &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.
1430 #
1431 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1432 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1433 #
1434 #
1435 # - If the value is fixed, then the calculated value is equal to the fixed value.
1436 # - 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.
1437 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1438 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1439 },
1440 &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:
1441 #
1442 #
1443 # - The instance&#x27;s status is RUNNING.
1444 # - 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.
1445 #
1446 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1447 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1448 #
1449 #
1450 # - If the value is fixed, then the calculated value is equal to the fixed value.
1451 # - 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.
1452 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1453 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1454 },
1455 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1456 &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.
1457 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1458 &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).
1459 },
1460 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1461 #
1462 # 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.
1463 {
1464 &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.
1465 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1466 &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:
1467 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1468 # - 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.
1469 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1470 #
1471 #
1472 # - If the value is fixed, then the calculated value is equal to the fixed value.
1473 # - 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.
1474 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1475 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1476 },
1477 },
1478 ],
1479 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07001480 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001481 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001482 &quot;kind&quot;: &quot;compute#instanceGroupManagerList&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManagerList for a list of managed instance groups.
1483 &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.
1484 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for this resource.
1485 &quot;warning&quot;: { # [Output Only] Informational warning message.
1486 &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.
1487 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1488 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001489 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001490 &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).
1491 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001492 },
1493 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001494 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001495 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001496 }</pre>
1497</div>
1498
1499<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001500 <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 -07001501 <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 -07001502
1503Args:
1504 project: string, Project ID for this request. (required)
1505 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1506 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 -07001507 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;`.
1508
1509For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1510
1511You 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.
1512
Bu Sun Kim65020912020-05-20 12:08:20 -07001513To 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) ```
1514 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`)
1515 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1516
1517You 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.
1518
1519Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1520 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 -07001521 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 -07001522
1523Returns:
1524 An object of the form:
1525
1526 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001527 &quot;items&quot;: [ # [Output Only] The list of errors of the managed instance group.
Dan O'Mearadd494642020-05-01 07:42:23 -07001528 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001529 &quot;error&quot;: { # [Output Only] Contents of the error.
1530 &quot;code&quot;: &quot;A String&quot;, # [Output Only] Error code.
1531 &quot;message&quot;: &quot;A String&quot;, # [Output Only] Error message.
1532 },
1533 &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.
1534 &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:
1535 &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.
1536 &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.
1537 &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 }.
1538 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
Dan O'Mearadd494642020-05-01 07:42:23 -07001539 },
1540 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001541 &quot;timestamp&quot;: &quot;A String&quot;, # [Output Only] The time that this error occurred. This value is in RFC3339 text format.
Dan O'Mearadd494642020-05-01 07:42:23 -07001542 },
1543 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001545 }</pre>
1546</div>
1547
1548<div class="method">
1549 <code class="details" id="listErrors_next">listErrors_next(previous_request, previous_response)</code>
1550 <pre>Retrieves the next page of results.
1551
1552Args:
1553 previous_request: The request for the previous page. (required)
1554 previous_response: The response from the request for the previous page. (required)
1555
1556Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001557 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001558 page. Returns None if there are no more items in the collection.
1559 </pre>
1560</div>
1561
1562<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001563 <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 -07001564 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001565
1566Args:
1567 project: string, Project ID for this request. (required)
1568 zone: string, The name of the zone where the managed instance group is located. (required)
1569 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001570 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 -07001571
Dan O'Mearadd494642020-05-01 07:42:23 -07001572For 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 -07001573
Dan O'Mearadd494642020-05-01 07:42:23 -07001574You 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 -07001575
Bu Sun Kim65020912020-05-20 12:08:20 -07001576To 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) ```
1577 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`)
1578 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1579
1580You 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.
1581
1582Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1583 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 -07001584 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001585
1586Returns:
1587 An object of the form:
1588
1589 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001590 &quot;managedInstances&quot;: [ # [Output Only] The list of instances in the managed instance group.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001591 { # A Managed Instance resource.
Bu Sun Kim65020912020-05-20 12:08:20 -07001592 &quot;currentAction&quot;: &quot;A String&quot;, # [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001593 # - NONE The instance is running, and the managed instance group does not have any scheduled actions for this instance.
1594 # - 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.
Bu Sun Kim65020912020-05-20 12:08:20 -07001595 # - 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.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001596 # - RECREATING The managed instance group is recreating this instance.
1597 # - DELETING The managed instance group is permanently deleting this instance.
1598 # - 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.
1599 # - RESTARTING The managed instance group is restarting the instance.
1600 # - 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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001601 # - VERIFYING The managed instance group has created the instance and it is in the process of being verified.
Bu Sun Kim65020912020-05-20 12:08:20 -07001602 &quot;id&quot;: &quot;A String&quot;, # [Output only] The unique identifier for this resource. This field is empty when instance does not exist.
1603 &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.
1604 &quot;instanceHealth&quot;: [ # [Output Only] Health state of the instance per health-check.
1605 {
1606 &quot;detailedHealthState&quot;: &quot;A String&quot;, # [Output Only] The current detailed instance health state.
1607 &quot;healthCheck&quot;: &quot;A String&quot;, # [Output Only] The URL for the health check that verifies whether the instance is healthy.
Dan O'Mearadd494642020-05-01 07:42:23 -07001608 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001609 ],
1610 &quot;instanceStatus&quot;: &quot;A String&quot;, # [Output Only] The status of the instance. This field is empty when the instance does not exist.
1611 &quot;lastAttempt&quot;: { # [Output Only] Information about the last attempt to create or delete the instance.
1612 &quot;errors&quot;: { # [Output Only] Encountered errors during the last attempt to create or delete the instance.
1613 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
1614 {
1615 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1616 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1617 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
1618 },
1619 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001620 },
1621 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001622 &quot;preservedStateFromConfig&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state applied from per-instance config for this instance.
1623 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1624 &quot;a_key&quot;: {
1625 &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.
1626 &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.
1627 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1628 },
1629 },
1630 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1631 &quot;a_key&quot;: &quot;A String&quot;,
1632 },
1633 },
1634 &quot;preservedStateFromPolicy&quot;: { # Preserved state for a given instance. # [Output Only] Preserved state generated based on stateful policy for this instance.
1635 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1636 &quot;a_key&quot;: {
1637 &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.
1638 &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.
1639 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
1640 },
1641 },
1642 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1643 &quot;a_key&quot;: &quot;A String&quot;,
1644 },
1645 },
1646 &quot;version&quot;: { # [Output Only] Intended version of this instance.
1647 &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 }.
1648 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the version.
1649 },
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001650 },
1651 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001652 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001653 }</pre>
1654</div>
1655
1656<div class="method">
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001657 <code class="details" id="listManagedInstances_next">listManagedInstances_next(previous_request, previous_response)</code>
1658 <pre>Retrieves the next page of results.
1659
1660Args:
1661 previous_request: The request for the previous page. (required)
1662 previous_response: The response from the request for the previous page. (required)
1663
1664Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001665 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001666 page. Returns None if there are no more items in the collection.
1667 </pre>
1668</div>
1669
1670<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -07001671 <code class="details" id="listPerInstanceConfigs">listPerInstanceConfigs(project, zone, instanceGroupManager, filter=None, maxResults=None, orderBy=None, pageToken=None, returnPartialSuccess=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001672 <pre>Lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.
Dan O'Mearadd494642020-05-01 07:42:23 -07001673
1674Args:
1675 project: string, Project ID for this request. (required)
1676 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1677 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001678 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;`.
1679
1680For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`.
1681
1682You 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.
1683
Bu Sun Kim65020912020-05-20 12:08:20 -07001684To 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) ```
1685 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`)
1686 orderBy: string, Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name.
1687
1688You 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.
1689
1690Currently, only sorting by `name` or `creationTimestamp desc` is supported.
1691 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 -07001692 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 -07001693
1694Returns:
1695 An object of the form:
1696
1697 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001698 &quot;items&quot;: [ # [Output Only] The list of PerInstanceConfig.
Dan O'Mearadd494642020-05-01 07:42:23 -07001699 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001700 &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.
1701 &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.
1702 &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.
1703 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
1704 &quot;a_key&quot;: {
1705 &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.
1706 &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.
1707 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001708 },
1709 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001710 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
1711 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001712 },
1713 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001714 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07001715 },
1716 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001717 &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.
1718 &quot;warning&quot;: { # [Output Only] Informational warning message.
1719 &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.
1720 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1721 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
Dan O'Mearadd494642020-05-01 07:42:23 -07001722 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001723 &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).
1724 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
Dan O'Mearadd494642020-05-01 07:42:23 -07001725 },
1726 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001727 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
Dan O'Mearadd494642020-05-01 07:42:23 -07001728 },
1729 }</pre>
1730</div>
1731
1732<div class="method">
1733 <code class="details" id="listPerInstanceConfigs_next">listPerInstanceConfigs_next(previous_request, previous_response)</code>
1734 <pre>Retrieves the next page of results.
1735
1736Args:
1737 previous_request: The request for the previous page. (required)
1738 previous_response: The response from the request for the previous page. (required)
1739
1740Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001741 A request object that you can call &#x27;execute()&#x27; on to request the next
Dan O'Mearadd494642020-05-01 07:42:23 -07001742 page. Returns None if there are no more items in the collection.
1743 </pre>
1744</div>
1745
1746<div class="method">
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001747 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
1748 <pre>Retrieves the next page of results.
1749
1750Args:
1751 previous_request: The request for the previous page. (required)
1752 previous_response: The response from the request for the previous page. (required)
1753
1754Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -07001755 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapatidf613972016-10-21 13:59:49 -07001756 page. Returns None if there are no more items in the collection.
1757 </pre>
1758</div>
1759
1760<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001761 <code class="details" id="patch">patch(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001762 <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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001763
1764Args:
1765 project: string, Project ID for this request. (required)
1766 zone: string, The name of the zone where you want to create the managed instance group. (required)
1767 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001768 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001769 The object takes the form of:
1770
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001771{ # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07001772 #
1773 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
1774 #
1775 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
1776 #
1777 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001778 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -07001779 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001780 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
1781 &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].
Dan O'Mearadd494642020-05-01 07:42:23 -07001782 },
1783 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001784 &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.
1785 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
1786 &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.
1787 &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.
1788 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001789 #
1790 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07001791 &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.
1792 &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.
1793 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
1794 &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.
1795 &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.
1796 &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.
1797 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07001798 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001799 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
1800 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
1801 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001802 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001803 &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 -07001804 },
1805 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07001806 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001807 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
1808 &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.
1809 #
1810 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
1811 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
1812 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
1813 &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.
1814 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
1815 &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.
1816 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
1817 { # The named port. For example: .
1818 &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.
1819 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
1820 },
1821 ],
1822 &quot;pendingActions&quot;: { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
1823 &quot;creating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
1824 &quot;deleting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
1825 &quot;recreating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
1826 &quot;restarting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
1827 },
1828 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
1829 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
1830 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
1831 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
1832 &quot;preservedState&quot;: { # Configuration of preserved resources.
1833 &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.
1834 &quot;a_key&quot;: {
1835 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001836 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001837 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001838 },
Dan O'Mearadd494642020-05-01 07:42:23 -07001839 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001840 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
1841 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
1842 &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.
1843 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
1844 &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.
1845 &quot;isStateful&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. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001846 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
1847 &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.
1848 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001849 },
1850 &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.
1851 &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.
1852 },
1853 },
1854 &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.
1855 &quot;A String&quot;,
1856 ],
1857 &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.
1858 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
1859 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
1860 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
1861 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
1862 &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.
1863 #
1864 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
1865 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1866 #
1867 #
1868 # - If the value is fixed, then the calculated value is equal to the fixed value.
1869 # - 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.
1870 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1871 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1872 },
1873 &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:
1874 #
1875 #
1876 # - The instance&#x27;s status is RUNNING.
1877 # - 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.
1878 #
1879 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
1880 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1881 #
1882 #
1883 # - If the value is fixed, then the calculated value is equal to the fixed value.
1884 # - 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.
1885 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1886 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1887 },
1888 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
1889 &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.
1890 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
1891 &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).
1892 },
1893 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
1894 #
1895 # 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.
1896 {
1897 &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.
1898 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
1899 &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:
1900 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
1901 # - 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.
1902 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
1903 #
1904 #
1905 # - If the value is fixed, then the calculated value is equal to the fixed value.
1906 # - 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.
1907 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
1908 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
1909 },
1910 },
1911 ],
1912 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07001913}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001914
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001915 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.
1916
1917For 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.
1918
1919The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001920
1921Returns:
1922 An object of the form:
1923
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001924 { # Represents an Operation resource.
1925 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001926 # Google Compute Engine has three Operation resources:
1927 #
1928 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
1929 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
1931 #
1932 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07001933 # - For global operations, use the `globalOperations` resource.
1934 # - For regional operations, use the `regionOperations` resource.
1935 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001936 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001937 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07001938 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
1939 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
1940 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
1941 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
1942 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
1943 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001944 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001945 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
1946 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
1947 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001948 },
1949 ],
1950 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001951 &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`.
1952 &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.
1953 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
1954 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
1955 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
1956 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
1957 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
1958 &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.
1959 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
1960 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
1961 &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.
1962 &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`.
1963 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
1964 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
1965 &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.
1966 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
1967 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
1968 {
1969 &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.
1970 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
1971 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
1972 {
1973 &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).
1974 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
1975 },
1976 ],
1977 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
1978 },
1979 ],
1980 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001981 }</pre>
1982</div>
1983
1984<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001985 <code class="details" id="patchPerInstanceConfigs">patchPerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
1986 <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.
1987
1988Args:
1989 project: string, Project ID for this request. (required)
1990 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
1991 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
1992 body: object, The request body.
1993 The object takes the form of:
1994
1995{ # InstanceGroupManagers.patchPerInstanceConfigs
Bu Sun Kim65020912020-05-20 12:08:20 -07001996 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
Dan O'Mearadd494642020-05-01 07:42:23 -07001997 {
Bu Sun Kim65020912020-05-20 12:08:20 -07001998 &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.
1999 &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.
2000 &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.
2001 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2002 &quot;a_key&quot;: {
2003 &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.
2004 &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.
2005 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002006 },
2007 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002008 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2009 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002010 },
2011 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002012 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002013 },
2014 ],
2015 }
2016
2017 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.
2018
2019For 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.
2020
2021The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2022
2023Returns:
2024 An object of the form:
2025
2026 { # Represents an Operation resource.
2027 #
2028 # Google Compute Engine has three Operation resources:
2029 #
2030 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2031 #
2032 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2033 #
2034 # Operations can be global, regional or zonal.
2035 # - For global operations, use the `globalOperations` resource.
2036 # - For regional operations, use the `regionOperations` resource.
2037 # - For zonal operations, use the `zonalOperations` resource.
2038 #
2039 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002040 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2041 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2042 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2043 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2044 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2045 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002046 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002047 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2048 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2049 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07002050 },
2051 ],
2052 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002053 &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`.
2054 &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.
2055 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2056 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2057 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2058 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2059 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2060 &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.
2061 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2062 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2063 &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.
2064 &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`.
2065 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2066 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2067 &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.
2068 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2069 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2070 {
2071 &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.
2072 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2073 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2074 {
2075 &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).
2076 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2077 },
2078 ],
2079 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2080 },
2081 ],
2082 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002083 }</pre>
2084</div>
2085
2086<div class="method">
2087 <code class="details" id="recreateInstances">recreateInstances(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002088 <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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002089
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002090If 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.
2091
2092You can specify a maximum of 1000 instances with this method per request.
2093
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002094Args:
2095 project: string, Project ID for this request. (required)
2096 zone: string, The name of the zone where the managed instance group is located. (required)
2097 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002098 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002099 The object takes the form of:
2100
2101{
Bu Sun Kim65020912020-05-20 12:08:20 -07002102 &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].
2103 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002104 ],
2105 }
2106
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002107 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.
2108
2109For 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.
2110
2111The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002112
2113Returns:
2114 An object of the form:
2115
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002116 { # Represents an Operation resource.
2117 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002118 # Google Compute Engine has three Operation resources:
2119 #
2120 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2121 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002122 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2123 #
2124 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002125 # - For global operations, use the `globalOperations` resource.
2126 # - For regional operations, use the `regionOperations` resource.
2127 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002128 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002129 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002130 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2131 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2132 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2133 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2134 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2135 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002136 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002137 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2138 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2139 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002140 },
2141 ],
2142 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002143 &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`.
2144 &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.
2145 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2146 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2147 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2148 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2149 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2150 &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.
2151 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2152 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2153 &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.
2154 &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`.
2155 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2156 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2157 &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.
2158 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2159 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2160 {
2161 &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.
2162 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2163 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2164 {
2165 &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).
2166 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2167 },
2168 ],
2169 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2170 },
2171 ],
2172 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002173 }</pre>
2174</div>
2175
2176<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002177 <code class="details" id="resize">resize(project, zone, instanceGroupManager, size, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002178 <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.
2179
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002180When 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:
2181
2182+ 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.
2183
2184This list is subject to change.
2185
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002186If 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.
2187
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002188Args:
2189 project: string, Project ID for this request. (required)
2190 zone: string, The name of the zone where the managed instance group is located. (required)
2191 instanceGroupManager: string, The name of the managed instance group. (required)
2192 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 -07002193 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.
2194
2195For 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.
2196
2197The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002198
2199Returns:
2200 An object of the form:
2201
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002202 { # Represents an Operation resource.
2203 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002204 # Google Compute Engine has three Operation resources:
2205 #
2206 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2207 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002208 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2209 #
2210 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002211 # - For global operations, use the `globalOperations` resource.
2212 # - For regional operations, use the `regionOperations` resource.
2213 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002214 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002215 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002216 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2217 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2218 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2219 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2220 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2221 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002222 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002223 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2224 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2225 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002226 },
2227 ],
2228 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002229 &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`.
2230 &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.
2231 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2232 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2233 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2234 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2235 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2236 &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.
2237 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2238 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2239 &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.
2240 &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`.
2241 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2242 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2243 &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.
2244 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2245 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2246 {
2247 &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.
2248 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2249 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2250 {
2251 &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).
2252 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2253 },
2254 ],
2255 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2256 },
2257 ],
2258 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002259 }</pre>
2260</div>
2261
2262<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002263 <code class="details" id="resizeAdvanced">resizeAdvanced(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002264 <pre>Resizes the managed instance group with advanced configuration options like disabling creation retries. This is an extended version of the resize method.
2265
2266If you increase the size of the instance group, 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, creatingWithoutRetries, or deleting actions with the get or listmanagedinstances method.
2267
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002268If 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.
2269
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002270Args:
2271 project: string, Project ID for this request. (required)
2272 zone: string, The name of the zone where the managed instance group is located. (required)
2273 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002274 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002275 The object takes the form of:
2276
2277{
Bu Sun Kim65020912020-05-20 12:08:20 -07002278 &quot;noCreationRetries&quot;: True or False, # If this flag is true, the managed instance group attempts to create all instances initiated by this resize request only once. If there is an error during creation, the managed instance group does not retry create this instance, and we will decrease the targetSize of the request instead. If the flag is false, the group attempts to recreate each instance continuously until it succeeds.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002279 #
2280 # This flag matters only in the first attempt of creation of an instance. After an instance is successfully created while this flag is enabled, the instance behaves the same way as all the other instances created with a regular resize request. In particular, if a running instance dies unexpectedly at a later time and needs to be recreated, this mode does not affect the recreation behavior in that scenario.
2281 #
2282 # This flag is applicable only to the current resize request. It does not influence other resize requests in any way.
2283 #
2284 # You can see which instances is being creating in which mode by calling the get or listManagedInstances API.
Bu Sun Kim65020912020-05-20 12:08:20 -07002285 &quot;targetSize&quot;: 42, # 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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002286 }
2287
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002288 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.
2289
2290For 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.
2291
2292The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002293
2294Returns:
2295 An object of the form:
2296
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002297 { # Represents an Operation resource.
2298 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002299 # Google Compute Engine has three Operation resources:
2300 #
2301 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2302 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002303 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2304 #
2305 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002306 # - For global operations, use the `globalOperations` resource.
2307 # - For regional operations, use the `regionOperations` resource.
2308 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002309 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002310 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002311 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2312 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2313 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2314 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2315 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2316 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002317 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002318 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2319 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2320 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002321 },
2322 ],
2323 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002324 &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`.
2325 &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.
2326 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2327 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2328 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2329 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2330 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2331 &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.
2332 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2333 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2334 &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.
2335 &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`.
2336 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2337 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2338 &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.
2339 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2340 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2341 {
2342 &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.
2343 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2344 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2345 {
2346 &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).
2347 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2348 },
2349 ],
2350 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2351 },
2352 ],
2353 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002354 }</pre>
2355</div>
2356
2357<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002358 <code class="details" id="setAutoHealingPolicies">setAutoHealingPolicies(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002359 <pre>Modifies the autohealing policies. [Deprecated] This method is deprecated. Please use Patch instead.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002360
2361Args:
2362 project: string, Project ID for this request. (required)
2363 zone: string, The name of the zone where the managed instance group is located. (required)
2364 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002365 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002366 The object takes the form of:
2367
2368{
Bu Sun Kim65020912020-05-20 12:08:20 -07002369 &quot;autoHealingPolicies&quot;: [
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002370 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002371 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2372 &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].
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002373 },
2374 ],
2375 }
2376
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002377 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.
2378
2379For 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.
2380
2381The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002382
2383Returns:
2384 An object of the form:
2385
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002386 { # Represents an Operation resource.
2387 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002388 # Google Compute Engine has three Operation resources:
2389 #
2390 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2391 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002392 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2393 #
2394 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002395 # - For global operations, use the `globalOperations` resource.
2396 # - For regional operations, use the `regionOperations` resource.
2397 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002398 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002399 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002400 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2401 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2402 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2403 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2404 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2405 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002406 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002407 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2408 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2409 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002410 },
2411 ],
2412 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002413 &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`.
2414 &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.
2415 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2416 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2417 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2418 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2419 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2420 &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.
2421 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2422 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2423 &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.
2424 &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`.
2425 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2426 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2427 &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.
2428 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2429 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2430 {
2431 &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.
2432 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2433 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2434 {
2435 &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).
2436 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2437 },
2438 ],
2439 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2440 },
2441 ],
2442 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002443 }</pre>
2444</div>
2445
2446<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002447 <code class="details" id="setInstanceTemplate">setInstanceTemplate(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002448 <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 recreate them.
2449
2450Args:
2451 project: string, Project ID for this request. (required)
2452 zone: string, The name of the zone where the managed instance group is located. (required)
2453 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002454 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002455 The object takes the form of:
2456
2457{
Bu Sun Kim65020912020-05-20 12:08:20 -07002458 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002459 }
2460
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002461 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.
2462
2463For 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.
2464
2465The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002466
2467Returns:
2468 An object of the form:
2469
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002470 { # Represents an Operation resource.
2471 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002472 # Google Compute Engine has three Operation resources:
2473 #
2474 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2475 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002476 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2477 #
2478 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002479 # - For global operations, use the `globalOperations` resource.
2480 # - For regional operations, use the `regionOperations` resource.
2481 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002482 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002483 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002484 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2485 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2486 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2487 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2488 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2489 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002490 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002491 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2492 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2493 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002494 },
2495 ],
2496 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002497 &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`.
2498 &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.
2499 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2500 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2501 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2502 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2503 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2504 &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.
2505 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2506 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2507 &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.
2508 &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`.
2509 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2510 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2511 &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.
2512 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2513 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2514 {
2515 &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.
2516 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2517 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2518 {
2519 &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).
2520 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2521 },
2522 ],
2523 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2524 },
2525 ],
2526 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002527 }</pre>
2528</div>
2529
2530<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002531 <code class="details" id="setTargetPools">setTargetPools(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002532 <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.
2533
2534Args:
2535 project: string, Project ID for this request. (required)
2536 zone: string, The name of the zone where the managed instance group is located. (required)
2537 instanceGroupManager: string, The name of the managed instance group. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002538 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002539 The object takes the form of:
2540
2541{
Bu Sun Kim65020912020-05-20 12:08:20 -07002542 &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.
2543 &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.
2544 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002545 ],
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002546 }
2547
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002548 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.
2549
2550For 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.
2551
2552The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002553
2554Returns:
2555 An object of the form:
2556
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002557 { # Represents an Operation resource.
2558 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002559 # Google Compute Engine has three Operation resources:
2560 #
2561 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2562 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002563 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2564 #
2565 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002566 # - For global operations, use the `globalOperations` resource.
2567 # - For regional operations, use the `regionOperations` resource.
2568 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002569 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002570 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002571 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2572 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2573 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2574 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2575 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2576 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002577 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002578 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2579 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2580 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002581 },
2582 ],
2583 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002584 &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`.
2585 &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.
2586 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2587 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2588 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2589 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2590 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2591 &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.
2592 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2593 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2594 &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.
2595 &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`.
2596 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2597 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2598 &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.
2599 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2600 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2601 {
2602 &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.
2603 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2604 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2605 {
2606 &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).
2607 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2608 },
2609 ],
2610 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2611 },
2612 ],
2613 &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.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002614 }</pre>
2615</div>
2616
2617<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002618 <code class="details" id="testIamPermissions">testIamPermissions(project, zone, resource, body=None)</code>
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002619 <pre>Returns permissions that a caller has on the specified resource.
2620
2621Args:
2622 project: string, Project ID for this request. (required)
2623 zone: string, The name of the zone for this request. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002624 resource: string, Name or id of the resource for this request. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002625 body: object, The request body.
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002626 The object takes the form of:
2627
2628{
Bu Sun Kim65020912020-05-20 12:08:20 -07002629 &quot;permissions&quot;: [ # The set of permissions to check for the &#x27;resource&#x27;. Permissions with wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed.
2630 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002631 ],
2632 }
2633
2634
2635Returns:
2636 An object of the form:
2637
2638 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002639 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
2640 &quot;A String&quot;,
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002641 ],
2642 }</pre>
2643</div>
2644
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002645<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07002646 <code class="details" id="update">update(project, zone, instanceGroupManager, body=None, requestId=None)</code>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04002647 <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 updated even if the instances in the group have not yet been updated. You must separately verify the status of the individual instances with the listManagedInstances method.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002648
2649Args:
2650 project: string, Project ID for this request. (required)
2651 zone: string, The name of the zone where you want to create the managed instance group. (required)
2652 instanceGroupManager: string, The name of the instance group manager. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07002653 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002654 The object takes the form of:
2655
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002656{ # Represents a Managed Instance Group resource.
Dan O'Mearadd494642020-05-01 07:42:23 -07002657 #
2658 # An instance group is a collection of VM instances that you can manage as a single entity. For more information, read Instance groups.
2659 #
2660 # For zonal Managed Instance Group, use the instanceGroupManagers resource.
2661 #
2662 # For regional Managed Instance Group, use the regionInstanceGroupManagers resource. (== resource_for {$api_version}.instanceGroupManagers ==) (== resource_for {$api_version}.regionInstanceGroupManagers ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002663 &quot;autoHealingPolicies&quot;: [ # The autohealing policy for this managed instance group. You can specify only one value.
Dan O'Mearadd494642020-05-01 07:42:23 -07002664 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002665 &quot;healthCheck&quot;: &quot;A String&quot;, # The URL for the health check that signals autohealing.
2666 &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].
Dan O'Mearadd494642020-05-01 07:42:23 -07002667 },
2668 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07002669 &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.
2670 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Output Only] The creation timestamp for this managed instance group in RFC3339 text format.
2671 &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.
2672 &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.
2673 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002674 #
2675 # If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated.
Bu Sun Kim65020912020-05-20 12:08:20 -07002676 &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.
2677 &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.
2678 &quot;none&quot;: 42, # [Output Only] The number of instances in the managed instance group that are running and have no scheduled actions.
2679 &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.
2680 &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.
2681 &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.
2682 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002683 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002684 &quot;description&quot;: &quot;A String&quot;, # An optional description of this resource. Provide this property when you create the resource.
2685 &quot;distributionPolicy&quot;: { # Policy specifying intended distribution of instances in regional managed instance group.
2686 &quot;zones&quot;: [ # Zones where the regional managed instance group will create and manage instances.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002687 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002688 &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 -07002689 },
2690 ],
Dan O'Mearadd494642020-05-01 07:42:23 -07002691 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002692 &quot;failoverAction&quot;: &quot;A String&quot;, # The action to perform in case of zone failure. Only one value is supported, NO_FAILOVER. The default is NO_FAILOVER.
2693 &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.
2694 #
2695 # To see the latest fingerprint, make a get() request to retrieve an InstanceGroupManager.
2696 &quot;id&quot;: &quot;A String&quot;, # [Output Only] A unique identifier for this resource type. The server generates this identifier.
2697 &quot;instanceGroup&quot;: &quot;A String&quot;, # [Output Only] The URL of the Instance Group resource.
2698 &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.
2699 &quot;kind&quot;: &quot;compute#instanceGroupManager&quot;, # [Output Only] The resource type, which is always compute#instanceGroupManager for managed instance groups.
2700 &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.
2701 &quot;namedPorts&quot;: [ # Named ports configured for the Instance Groups complementary to this Instance Group Manager.
2702 { # The named port. For example: .
2703 &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.
2704 &quot;port&quot;: 42, # The port number, which can be a value between 1 and 65535.
2705 },
2706 ],
2707 &quot;pendingActions&quot;: { # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The list of instance actions and the number of instances in this managed instance group that are pending for each of those actions.
2708 &quot;creating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be created.
2709 &quot;deleting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be deleted.
2710 &quot;recreating&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be recreated.
2711 &quot;restarting&quot;: 42, # [Deprecated] This field is deprecated and will be removed. Prefer using the status field instead. Please contact cloud-updater-feedback@google.com to leave feedback if your workload relies on this field. [Output Only] The number of instances in the managed instance group that are pending to be restarted.
2712 },
2713 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the managed instance group resides (for regional resources).
2714 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] The URL for this managed instance group. The server defines this URL.
2715 &quot;serviceAccount&quot;: &quot;A String&quot;, # The service account to be used as credentials for all operations performed by the managed instance group on instances. The service accounts needs all permissions required to create and delete instances. By default, the service account {projectNumber}@cloudservices.gserviceaccount.com is used.
2716 &quot;statefulPolicy&quot;: { # Stateful configuration for this Instanced Group Manager
2717 &quot;preservedState&quot;: { # Configuration of preserved resources.
2718 &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.
2719 &quot;a_key&quot;: {
2720 &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.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002721 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002722 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002723 },
Dan O'Mearadd494642020-05-01 07:42:23 -07002724 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002725 &quot;status&quot;: { # [Output Only] The status of this managed instance group.
2726 &quot;autoscaler&quot;: &quot;A String&quot;, # [Output Only] The URL of the Autoscaler that targets this instance group manager.
2727 &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.
2728 &quot;stateful&quot;: { # [Output Only] Stateful status of the given Instance Group Manager.
2729 &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.
2730 &quot;isStateful&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. This field is deprecated in favor of has_stateful_config.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002731 &quot;perInstanceConfigs&quot;: { # [Output Only] Status of per-instance configs on the instance.
2732 &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.
2733 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002734 },
2735 &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.
2736 &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.
2737 },
2738 },
2739 &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.
2740 &quot;A String&quot;,
2741 ],
2742 &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.
2743 &quot;updatePolicy&quot;: { # The update policy for this managed instance group.
2744 &quot;instanceRedistributionType&quot;: &quot;A String&quot;, # The instance redistribution policy for regional managed instance groups. Valid values are:
2745 # - PROACTIVE (default): The group attempts to maintain an even distribution of VM instances across zones in the region.
2746 # - NONE: For non-autoscaled groups, proactive redistribution is disabled.
2747 &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.
2748 #
2749 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxSurge.
2750 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2751 #
2752 #
2753 # - If the value is fixed, then the calculated value is equal to the fixed value.
2754 # - 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.
2755 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2756 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2757 },
2758 &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:
2759 #
2760 #
2761 # - The instance&#x27;s status is RUNNING.
2762 # - 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.
2763 #
2764 # At least one of either maxSurge or maxUnavailable must be greater than 0. Learn more about maxUnavailable.
2765 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2766 #
2767 #
2768 # - If the value is fixed, then the calculated value is equal to the fixed value.
2769 # - 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.
2770 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2771 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2772 },
2773 &quot;minReadySec&quot;: 42, # Minimum number of seconds to wait for after a newly created instance becomes available. This value must be from range [0, 3600].
2774 &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.
2775 &quot;replacementMethod&quot;: &quot;A String&quot;, # What action should be used to replace instances. See minimal_action.REPLACE
2776 &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).
2777 },
2778 &quot;versions&quot;: [ # Specifies the instance templates used by this managed instance group to create instances.
2779 #
2780 # 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.
2781 {
2782 &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.
2783 &quot;name&quot;: &quot;A String&quot;, # Name of the version. Unique among all versions in the scope of this managed instance group.
2784 &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:
2785 # - If expressed as a fixed number, the minimum of either targetSize.fixed or instanceGroupManager.targetSize is used.
2786 # - 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.
2787 &quot;calculated&quot;: 42, # [Output Only] Absolute value of VM instances calculated based on the specific mode.
2788 #
2789 #
2790 # - If the value is fixed, then the calculated value is equal to the fixed value.
2791 # - 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.
2792 &quot;fixed&quot;: 42, # Specifies a fixed number of VM instances. This must be a positive integer.
2793 &quot;percent&quot;: 42, # Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
2794 },
2795 },
2796 ],
2797 &quot;zone&quot;: &quot;A String&quot;, # [Output Only] The URL of the zone where the managed instance group is located (for zonal resources).
Dan O'Mearadd494642020-05-01 07:42:23 -07002798}
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002799
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002800 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.
2801
2802For 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.
2803
2804The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002805
2806Returns:
2807 An object of the form:
2808
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002809 { # Represents an Operation resource.
2810 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002811 # Google Compute Engine has three Operation resources:
2812 #
2813 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2814 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002815 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2816 #
2817 # Operations can be global, regional or zonal.
Dan O'Mearadd494642020-05-01 07:42:23 -07002818 # - For global operations, use the `globalOperations` resource.
2819 # - For regional operations, use the `regionOperations` resource.
2820 # - For zonal operations, use the `zonalOperations` resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07002821 #
Dan O'Mearadd494642020-05-01 07:42:23 -07002822 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002823 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2824 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2825 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2826 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2827 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2828 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Dan O'Mearadd494642020-05-01 07:42:23 -07002829 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002830 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2831 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2832 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Dan O'Mearadd494642020-05-01 07:42:23 -07002833 },
2834 ],
2835 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002836 &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`.
2837 &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.
2838 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2839 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2840 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2841 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2842 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2843 &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.
2844 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2845 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2846 &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.
2847 &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`.
2848 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2849 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2850 &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.
2851 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2852 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2853 {
2854 &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.
2855 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2856 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2857 {
2858 &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).
2859 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2860 },
2861 ],
2862 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2863 },
2864 ],
2865 &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.
Dan O'Mearadd494642020-05-01 07:42:23 -07002866 }</pre>
2867</div>
2868
2869<div class="method">
2870 <code class="details" id="updatePerInstanceConfigs">updatePerInstanceConfigs(project, zone, instanceGroupManager, body=None, requestId=None)</code>
2871 <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.
2872
2873Args:
2874 project: string, Project ID for this request. (required)
2875 zone: string, The name of the zone where the managed instance group is located. It should conform to RFC1035. (required)
2876 instanceGroupManager: string, The name of the managed instance group. It should conform to RFC1035. (required)
2877 body: object, The request body.
2878 The object takes the form of:
2879
2880{ # InstanceGroupManagers.updatePerInstanceConfigs
Bu Sun Kim65020912020-05-20 12:08:20 -07002881 &quot;perInstanceConfigs&quot;: [ # The list of per-instance configs to insert or patch on this managed instance group.
Dan O'Mearadd494642020-05-01 07:42:23 -07002882 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002883 &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.
2884 &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.
2885 &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.
2886 &quot;disks&quot;: { # Preserved disks defined for this instance. This map is keyed with the device names of the disks.
2887 &quot;a_key&quot;: {
2888 &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.
2889 &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.
2890 &quot;source&quot;: &quot;A String&quot;, # The URL of the disk resource that is stateful and should be attached to the VM instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002891 },
2892 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002893 &quot;metadata&quot;: { # Preserved metadata defined for this instance.
2894 &quot;a_key&quot;: &quot;A String&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07002895 },
2896 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -07002897 &quot;status&quot;: &quot;A String&quot;, # The status of applying this per-instance config on the corresponding managed instance.
Dan O'Mearadd494642020-05-01 07:42:23 -07002898 },
2899 ],
2900 }
2901
2902 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.
2903
2904For 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.
2905
2906The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
2907
2908Returns:
2909 An object of the form:
2910
2911 { # Represents an Operation resource.
2912 #
2913 # Google Compute Engine has three Operation resources:
2914 #
2915 # * [Global](/compute/docs/reference/rest/{$api_version}/globalOperations) * [Regional](/compute/docs/reference/rest/{$api_version}/regionOperations) * [Zonal](/compute/docs/reference/rest/{$api_version}/zoneOperations)
2916 #
2917 # You can use an operation resource to manage asynchronous API requests. For more information, read Handling API responses.
2918 #
2919 # Operations can be global, regional or zonal.
2920 # - For global operations, use the `globalOperations` resource.
2921 # - For regional operations, use the `regionOperations` resource.
2922 # - For zonal operations, use the `zonalOperations` resource.
2923 #
2924 # For more information, read Global, Regional, and Zonal Resources. (== resource_for {$api_version}.globalOperations ==) (== resource_for {$api_version}.regionOperations ==) (== resource_for {$api_version}.zoneOperations ==)
Bu Sun Kim65020912020-05-20 12:08:20 -07002925 &quot;clientOperationId&quot;: &quot;A String&quot;, # [Output Only] The value of `requestId` if you provided it in the request. Not present otherwise.
2926 &quot;creationTimestamp&quot;: &quot;A String&quot;, # [Deprecated] This field is deprecated.
2927 &quot;description&quot;: &quot;A String&quot;, # [Output Only] A textual description of the operation, which is set when the operation is created.
2928 &quot;endTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was completed. This value is in RFC3339 text format.
2929 &quot;error&quot;: { # [Output Only] If errors are generated during processing of the operation, this field will be populated.
2930 &quot;errors&quot;: [ # [Output Only] The array of errors encountered while processing this operation.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002931 {
Bu Sun Kim65020912020-05-20 12:08:20 -07002932 &quot;code&quot;: &quot;A String&quot;, # [Output Only] The error type identifier for this error.
2933 &quot;location&quot;: &quot;A String&quot;, # [Output Only] Indicates the field in the request that caused the error. This property is optional.
2934 &quot;message&quot;: &quot;A String&quot;, # [Output Only] An optional, human-readable error message.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002935 },
2936 ],
2937 },
Bu Sun Kim65020912020-05-20 12:08:20 -07002938 &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`.
2939 &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.
2940 &quot;id&quot;: &quot;A String&quot;, # [Output Only] The unique identifier for the operation. This identifier is defined by the server.
2941 &quot;insertTime&quot;: &quot;A String&quot;, # [Output Only] The time that this operation was requested. This value is in RFC3339 text format.
2942 &quot;kind&quot;: &quot;compute#operation&quot;, # [Output Only] Type of the resource. Always `compute#operation` for Operation resources.
2943 &quot;name&quot;: &quot;A String&quot;, # [Output Only] Name of the operation.
2944 &quot;operationType&quot;: &quot;A String&quot;, # [Output Only] The type of operation, such as `insert`, `update`, or `delete`, and so on.
2945 &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.
2946 &quot;region&quot;: &quot;A String&quot;, # [Output Only] The URL of the region where the operation resides. Only applicable when performing regional operations.
2947 &quot;selfLink&quot;: &quot;A String&quot;, # [Output Only] Server-defined URL for the resource.
2948 &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.
2949 &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`.
2950 &quot;statusMessage&quot;: &quot;A String&quot;, # [Output Only] An optional textual description of the current status of the operation.
2951 &quot;targetId&quot;: &quot;A String&quot;, # [Output Only] The unique target ID, which identifies a specific incarnation of the target resource.
2952 &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.
2953 &quot;user&quot;: &quot;A String&quot;, # [Output Only] User who requested the operation, for example: `user@example.com`.
2954 &quot;warnings&quot;: [ # [Output Only] If warning messages are generated during processing of the operation, this field will be populated.
2955 {
2956 &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.
2957 &quot;data&quot;: [ # [Output Only] Metadata about this warning in key: value format. For example:
2958 # &quot;data&quot;: [ { &quot;key&quot;: &quot;scope&quot;, &quot;value&quot;: &quot;zones/us-east1-d&quot; }
2959 {
2960 &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).
2961 &quot;value&quot;: &quot;A String&quot;, # [Output Only] A warning data value corresponding to the key.
2962 },
2963 ],
2964 &quot;message&quot;: &quot;A String&quot;, # [Output Only] A human-readable description of the warning code.
2965 },
2966 ],
2967 &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.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04002968 }</pre>
2969</div>
2970
Sai Cheemalapatidf613972016-10-21 13:59:49 -07002971</body></html>